あなたの助けが必要です。使用バージョンは JAX-WS RI 2.2.6b21 / SOAP 1.2
ベンダー製のWebServiceサーバーに接続するWSクライアントを開発しています。次の XML リクエストを送信できます。
<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>
XML 応答フォーム WebService server の下:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://vendor.com/">
<soapenv:Body>
<executeAboutResponse xmlns="">
<AboutResponse success="true">
</AboutResponse>
</executeAboutResponse>
</soapenv:Body>
</soapenv:Envelope>
クラスAboutResponseType
:
@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;
}
}
残念ながら、JAVA オブジェクトの応答は null であり、Java 例外は発生しません。
AboutType aboutType = new AboutType();
AboutResponseType aboutResponse = myProxy.executeAbout(aboutType);
assertNotNull(aboutResponse);
インターネットで検索してわかったのは、応答の名前空間の問題です。しかし、問題はどこにあり、どのように修正するのでしょうか?
助けてくれてありがとう、私は考えが及ばない。