android的wsdl Soap请求格式

android的wsdl Soap请求格式,android,web-services,android-ksoap2,Android,Web Services,Android Ksoap2,我正在尝试使用ksoap2从Android访问web服务。从我的android模拟器发送的Soap请求如下: <v:Envelope xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:d="http://www.w3.org/2001/XMLSchema" xmlns:c="http://schemas.xmlsoap.org/soap/encoding/" xmlns:v="http://schemas.xmlsoap.o

我正在尝试使用ksoap2从Android访问web服务。从我的android模拟器发送的Soap请求如下:

<v:Envelope xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:d="http://www.w3.org/2001/XMLSchema" xmlns:c="http://schemas.xmlsoap.org/soap/encoding/" xmlns:v="http://schemas.xmlsoap.org/soap/envelope/">
<v:Header />
<v:Body>
<Login xmlns="http://xxx.com/" id="o0" c:root="1">
<MyLoginCredentials i:type="d:anyType">
<Email i:type="d:string">asdf@asd.com</Email>
<Password i:type="d:string">asdf</Password>
</MyLoginCredentials>
</Login>
</v:Body>
</v:Envelope>

请帮我解决这个问题。谢谢。

参考下面的链接可能对您有用

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:str="http://xxx.com/">
    <soapenv:Header/>
    <soapenv:Body>
        <str:Login>
    <str:MyLoginCredentials>

        <str:Email>asdf@asd.com</str:Email>
        <str:Password>asdf</str:Password>
    </str:MyLoginCredentials>
</str:Login>
    </soapenv:Body>
</soapenv:Envelope>
        String NAMESPACE = "http://xxx.com/";
        String METHOD_NAME = "Login";
        String SOAP_ACTION = "http://xxx.com/Login";
        String URL = "http://xxx.tk/service.asmx?wsdl";

        Object results;

        System.setProperty("http.keepAlive", "false");

        SoapObject Request = new SoapObject(NAMESPACE, METHOD_NAME);


        Request.addProperty("MyLoginCredentials", myLoginCredentials);

        SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
        envelope.dotNet = true;
        envelope.setOutputSoapObject(Request);

        HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);
        androidHttpTransport.debug = true; 

        String Str = null;
        try
        {
            androidHttpTransport.call(SOAP_ACTION, envelope);
        }
        catch(Exception e)
        {
            e.printStackTrace();
        }