我试图用Retrofit发布一个soap xml,但它失败了,我正在使用一个简单的XML框架来建模一个如下所示的SOAP请求:
请求XML
@Root(name = "soap12:Envelope")
@NamespaceList({
@Namespace(reference = "http://www.w3.org/2001/XMLSchema-instance", prefix = "xsi"),
@Namespace(reference = "http://www.w3.org/2001/XMLSchema", prefix = "xsd"),
@Namespace(prefix = "soap12", reference = "http://www.w3.org/2003/05/soap-envelope")
})
@Element(name = "soap12:Body")
public class GeoIP {
@Namespace(reference = "http://www.webservicex.net/")
@Element(name="GetGeoIP")
private GetGeoIP GetGeoIP;
public GetGeoIP getGetGeoIP() {
return GetGeoIP;
}
public void setGetGeoIP(GetGeoIP getGeoIP) {
this.GetGeoIP = getGeoIP;
}
@Namespace(reference = "http://www.webservicex.net/")
public static class GetGeoIP{
@Element(name = "IPAddress")
private String IPAddress;
public String getIP() {
return IPAddress;
}
public void setIP(String IP) …Run Code Online (Sandbox Code Playgroud)