当我尝试运行"mvn generate-sources"时,这是我的输出:
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building gensourcesfromwsdl 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.104s
[INFO] Finished at: Tue Aug 20 15:41:10 BST 2013
[INFO] Final Memory: 2M/15M
[INFO] ------------------------------------------------------------------------
Run Code Online (Sandbox Code Playgroud)
我没有收到任何错误,但没有从wsdl文件生成的java类.
这是我正在运行插件的pom.xml文件:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>gensourcesfromwsdl</groupId>
<artifactId>gensourcesfromwsdl</artifactId>
<version>0.0.1-SNAPSHOT</version>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
<version>1.12</version>
<executions>
<execution> …Run Code Online (Sandbox Code Playgroud) 我在Android应用http://code.google.com/p/dalvik/wiki/JavaxPackages中看到了一篇关于包含其他javax.*软件包的文章 .
我想做同样的事情,但是使用Eclipse.谁能帮我弄明白怎么做?
我使用eclipse Helios创建了一个Web服务客户端,用于使用轴1.4 Web服务.
它生成了2个包:
1 - datamodel.
2 - 客户.
内部客户端包有5个类:
1- ServiceName
2- ServiceNameProxy
3- ServiceNameService
4- ServiceNameServiceLocator
5- ServiceNameSoapBindingStub
我需要知道这些是什么?和
如何使用参数调用Web服务方法?
提前致谢
我使用以下代码来解析soap响应,但我收到UnmarshallingFailureException,我将@XmlSeeAlso更改为@XMLRootElement但问题仍然存在.WSDL就在这里.
Caused by: javax.xml.bind.UnmarshalException: unexpected element
(uri:"ElsyArres.API", local:"SearchFlightsResponse"). Expected elements are
<{ElsyArres.API}Inbound>,<{ElsyArres.API}Leg>,<{ElsyArres.API}Legs>,
<{ElsyArres.API}Outbound>,<{ElsyArres.API}Request>,<{ElsyArres.API}Response>,
<{ElsyArres.API}SearchFlights>,<{ElsyArres.API}SoapMessage>
Run Code Online (Sandbox Code Playgroud)
码
@XmlRootElement(name = "SoapMessage")
@XmlAccessorType(XmlAccessType.FIELD)
public class WegoloSoapMessageResponse {
@XmlElement(name = "Username")
private String username;
@XmlElement(name = "Password")
private String password;
@XmlElement(name = "LanguageCode")
private String languageCode;
@XmlElement(name = "ErrorMessage")
private String errorMessage;
@XmlElement(name = "ErrorCode")
private int errorCode;
@XmlElement(name = "AppVersion")
private String appVersion;
@XmlElement(name = "Request")
private Request request;
@XmlElement(name = "Response")
private Response response;
getters and setters
@XmlRootElement(name = "Request")
@XmlAccessorType(XmlAccessType.FIELD) …Run Code Online (Sandbox Code Playgroud)