Java 客户端上的JAXWS-SOAP-WebService-Null对象,尽管有来自WebService的XML响应
我需要你的帮助。 使用的版本是JAX-WSRI2.2.6b21/SOAP1.2 我正在开发一个WS-client来连接一个供应商制造的WebService服务器。 我能够发送下一个XML请求:Java 客户端上的JAXWS-SOAP-WebService-Null对象,尽管有来自WebService的XML响应,java,soap,jax-ws,jaxb2,Java,Soap,Jax Ws,Jaxb2,我需要你的帮助。 使用的版本是JAX-WSRI2.2.6b21/SOAP1.2 我正在开发一个WS-client来连接一个供应商制造的WebService服务器。 我能够发送下一个XML请求: <S:Envelope xmlns:S="http://www.w3.org/2003/05/soap-envelope"> <S:Body> <ns2:executeAbout xmlns:ns2="http://vendor.com/">
<S:Envelope xmlns:S="http://www.w3.org/2003/05/soap-envelope">
<S:Body>
<ns2:executeAbout xmlns:ns2="http://vendor.com/">
<About/>
</ns2:executeAbout>
</S:Body>
</S:Envelope>
但不幸的是,JAVA对象响应为null,并且没有引发JAVA异常:
AboutType aboutType = new AboutType();
AboutResponseType aboutResponse = myProxy.executeAbout(aboutType);
assertNotNull(aboutResponse);
我在互联网上搜索的理解是,这是回复中的名称空间问题。
但问题在哪里?如何解决
非常感谢您的帮助,我不知道。请添加类的代码AboutResponsetType,以便我们知道您是如何映射响应的Hello,对不起,我只是看到您关于添加代码的请求。我将在星期一完成,
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "AboutResponseType", propOrder = {
"result",
"messages"
})
public class AboutResponseType {
@XmlElement(name = "Result")
protected AboutResultType result;
@XmlElement(name = "Messages")
protected MessagesType messages;
@XmlAttribute(name = "success")
protected Boolean success;
/**
* Gets the value of the result property.
*
* @return
* possible object is
* {@link AboutResultType }
*
*/
public AboutResultType getResult() {
return result;
}
/**
* Sets the value of the result property.
*
* @param value
* allowed object is
* {@link AboutResultType }
*
*/
public void setResult(AboutResultType value) {
this.result = value;
}
/**
* Gets the value of the messages property.
*
* @return
* possible object is
* {@link MessagesType }
*
*/
public MessagesType getMessages() {
return messages;
}
/**
* Sets the value of the messages property.
*
* @param value
* allowed object is
* {@link MessagesType }
*
*/
public void setMessages(MessagesType value) {
this.messages = value;
}
/**
* Gets the value of the success property.
*
* @return
* possible object is
* {@link Boolean }
*
*/
public Boolean isSuccess() {
return success;
}
/**
* Sets the value of the success property.
*
* @param value
* allowed object is
* {@link Boolean }
*
*/
public void setSuccess(Boolean value) {
this.success = value;
}
}
AboutType aboutType = new AboutType();
AboutResponseType aboutResponse = myProxy.executeAbout(aboutType);
assertNotNull(aboutResponse);