How to call a WCF service using ksoap2 on android?
    I know this question has been here but anyway for me it didn't work until now...
    
    So i have an android app 
    code here
    
    private static final String SOAP_ACTION = "http://tempuri.org/IService1/GetDataString";
        private static final String METHOD_NAME = "GetDataString";
        private static final String NAMESPACE = "http://www.tempuri.org/";
        private static final String URL = "http://192.168.0.101/TEST1/WcfService1/Service1.svc";
        private static final String URL2 = "http://192.168.0.101/ubik/ubikservice.svc";
    	TextView myText;
    	
    	
        @Override
        public void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.main);
            myText = (TextView)findViewById(R.id.mytext);
            
            //creating the object and packing it into a package
           // Element  newElement
            SoapObject mSoapObject = new SoapObject(NAMESPACE, METHOD_NAME);
            PropertyInfo info = new PropertyInfo();
           
            mSoapObject.addProperty("value","32");
            SoapSerializationEnvelope mEnvelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
            mEnvelope.dotNet=true;
            mEnvelope.setOutputSoapObject(mSoapObject);
            
            HttpTransportSE newTransport = new HttpTransportSE(URL);
            try
            {
            	newTransport.debug=true;//check if the message was sent
            	newTransport.call(SOAP_ACTION, mEnvelope);
            	String requestDump = newTransport.requestDump;
                String resultDump = newTransport.responseDump;
            	SoapObject response = (SoapObject)mEnvelope.getResponse();
            	myText.setText("Received:" + response.toString());
            }
    
          and the 
    
          WCF code(the important part)
          //interface
           public interface IService1
        {
    
            [OperationContract]
            string GetData(int value);
            [OperationContract]
            string GetDataString(string value);
            [OperationContract]
            CompositeType GetDataUsingDataContract(CompositeType composite);
    
            // TODO: Add your service operations here
        }
        and the implementation
         public class Service1 : IService1
        {
            [WebMethod]
            public string GetData(int value)
            {
                return string.Format("You entered: {0}", value);
            }
            public string GetDataString(string value) 
            {
                return string.Format("You have entered :{0}" , value.ToString());
    
            }
            [WebMethod]
            public CompositeType GetDataUsingDataContract(CompositeType composite)
            {
                if (composite == null)
                {
                    throw new ArgumentNullException("composite");
                }
                if (composite.BoolValue)
                {
                    composite.StringValue += "Suffix";
                }
                return composite;
            }
        }
    
        the error from bodyin is this
        SoapFault - faultcode: 'a:InternalServiceFault' faultstring: 'Error in deserializing body of request message for operation 'GetDataString'. OperationFormatter encountered an invalid Message body. Expected to find node type 'Element' with name 'GetDataString' and namespace 'http://tempuri.org/'. Found node type 'Element' with name 'GetDataString' and namespace 'http://www.tempuri.org/'' faultactor: 'null' detail: org.kxml2.kdom.Node@458fb600
         one small add on...is that my android code works for w3schools web service so it's pretty weird...
       Can u give me some real hints...
    the wsdl code is
        <?xml version="1.0" encoding="utf-8" ?> 
    - <wsdl:definitions name="Service1" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:tns="http://tempuri.org/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
    - <wsdl:types>
    - <xsd:schema targetNamespace="http://tempuri.org/Imports">
      <xsd:import schemaLocation="http://localhost/TEST1/WcfService1/Service1.svc?xsd=xsd0" namespace="http://tempuri.org/" /> 
      <xsd:import schemaLocation="http://localhost/TEST1/WcfService1/Service1.svc?xsd=xsd1" namespace="http://schemas.microsoft.com/2003/10/Serialization/" /> 
      <xsd:import schemaLocation="http://localhost/TEST1/WcfService1/Service1.svc?xsd=xsd2" namespace="http://schemas.datacontract.org/2004/07/WcfService1" /> 
      </xsd:schema>
      </wsdl:types>
    - <wsdl:message name="IService1_GetData_InputMessage">
      <wsdl:part name="parameters" element="tns:GetData" /> 
      </wsdl:message>
    - <wsdl:message name="IService1_GetData_OutputMessage">
      <wsdl:part name="parameters" element="tns:GetDataResponse" /> 
      </wsdl:message>
    - <wsdl:message name="IService1_GetDataString_InputMessage">
      <wsdl:part name="parameters" element="tns:GetDataString" /> 
      </wsdl:message>
    - <wsdl:message name="IService1_GetDataString_OutputMessage">
      <wsdl:part name="parameters" element="tns:GetDataStringResponse" /> 
      </wsdl:message>
    - <wsdl:message name="IService1_GetDataUsingDataContract_InputMessage">
      <wsdl:part name="parameters" element="tns:GetDataUsingDataContract" /> 
      </wsdl:message>
    - <wsdl:message name="IService1_GetDataUsingDataContract_OutputMessage">
      <wsdl:part name="parameters" element="tns:GetDataUsingDataContractResponse" /> 
      </wsdl:message>
    - <wsdl:portType name="IService1">
    - <wsdl:operation name="GetData">
      <wsdl:input wsaw:Action="http://tempuri.org/IService1/GetData" message="tns:IService1_GetData_InputMessage" /> 
      <wsdl:output wsaw:Action="http://tempuri.org/IService1/GetDataResponse" message="tns:IService1_GetData_OutputMessage" /> 
      </wsdl:operation>
    - <wsdl:operation name="GetDataString">
      <wsdl:input wsaw:Action="http://tempuri.org/IService1/GetDataString" message="tns:IService1_GetDataString_InputMessage" /> 
      <wsdl:output wsaw:Action="http://tempuri.org/IService1/GetDataStringResponse" message="tns:IService1_GetDataString_OutputMessage" /> 
      </wsdl:operation>
    - <wsdl:operation name="GetDataUsingDataContract">
      <wsdl:input wsaw:Action="http://tempuri.org/IService1/GetDataUsingDataContract" message="tns:IService1_GetDataUsingDataContract_InputMessage" /> 
      <wsdl:output wsaw:Action="http://tempuri.org/IService1/GetDataUsingDataContractResponse" message="tns:IService1_GetDataUsingDataContract_OutputMessage" /> 
      </wsdl:operation>
      </wsdl:portType>
    - <wsdl:binding name="BasicHttpBinding_IService1" type="tns:IService1">
      <soap:binding transport="http://schemas.xmlsoap.org/soap/http" /> 
    - <wsdl:operation name="GetData">
      <soap:operation soapAction="http://tempuri.org/IService1/GetData" style="document" /> 
    - <wsdl:input>
      <soap:body use="literal" /> 
      </wsdl:input>
    - <wsdl:output>
      <soap:body use="literal" /> 
      </wsdl:output>
      </wsdl:operation>
    - <wsdl:operation name="GetDataString">
      <soap:operation soapAction="http://tempuri.org/IService1/GetDataString" style="document" /> 
    - <wsdl:input>
      <soap:body use="literal" /> 
      </wsdl:input>
    - <wsdl:output>
      <soap:body use="literal" /> 
      </wsdl:output>
      </wsdl:operation>
    - <wsdl:operation name="GetDataUsingDataContract">
      <soap:operation soapAction="http://tempuri.org/IService1/GetDataUsingDataContract" style="document" /> 
    - <wsdl:input>
      <soap:body use="literal" /> 
      </wsdl:input>
    - <wsdl:output>
      <soap:body use="literal" /> 
      </wsdl:output>
      </wsdl:operation>
      </wsdl:binding>
    - <wsdl:service name="Service1">
    - <wsdl:port name="BasicHttpBinding_IService1" binding="tns:BasicHttpBinding_IService1">
      <soap:address location="http://localhost/TEST1/WcfService1/Service1.svc" /> 
      </wsdl:port>
      </wsdl:service>
      </wsdl:definitions>
        
How to call a WCF service using ksoap2 on android?
===

    I know this question has been here but anyway for me it didn't work until now...
    
    So i have an android app 
    code here
    
    private static final String SOAP_ACTION = "http://tempuri.org/IService1/GetDataString";
        private static final String METHOD_NAME = "GetDataString";
        private static final String NAMESPACE = "http://www.tempuri.org/";
        private static final String URL = "http://192.168.0.101/TEST1/WcfService1/Service1.svc";
        private static final String URL2 = "http://192.168.0.101/ubik/ubikservice.svc";
    	TextView myText;
    	
    	
        @Override
        public void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.main);
            myText = (TextView)findViewById(R.id.mytext);
            
            //creating the object and packing it into a package
           // Element  newElement
            SoapObject mSoapObject = new SoapObject(NAMESPACE, METHOD_NAME);
            PropertyInfo info = new PropertyInfo();
           
            mSoapObject.addProperty("value","32");
            SoapSerializationEnvelope mEnvelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
            mEnvelope.dotNet=true;
            mEnvelope.setOutputSoapObject(mSoapObject);
            
            HttpTransportSE newTransport = new HttpTransportSE(URL);
            try
            {
            	newTransport.debug=true;//check if the message was sent
            	newTransport.call(SOAP_ACTION, mEnvelope);
            	String requestDump = newTransport.requestDump;
                String resultDump = newTransport.responseDump;
            	SoapObject response = (SoapObject)mEnvelope.getResponse();
            	myText.setText("Received:" + response.toString());
            }
    
          and the 
    
          WCF code(the important part)
          //interface
           public interface IService1
        {
    
            [OperationContract]
            string GetData(int value);
            [OperationContract]
            string GetDataString(string value);
            [OperationContract]
            CompositeType GetDataUsingDataContract(CompositeType composite);
    
            // TODO: Add your service operations here
        }
        and the implementation
         public class Service1 : IService1
        {
            [WebMethod]
            public string GetData(int value)
            {
                return string.Format("You entered: {0}", value);
            }
            public string GetDataString(string value) 
            {
                return string.Format("You have entered :{0}" , value.ToString());
    
            }
            [WebMethod]
            public CompositeType GetDataUsingDataContract(CompositeType composite)
            {
                if (composite == null)
                {
                    throw new ArgumentNullException("composite");
                }
                if (composite.BoolValue)
                {
                    composite.StringValue += "Suffix";
                }
                return composite;
            }
        }
    
        the error from bodyin is this
        SoapFault - faultcode: 'a:InternalServiceFault' faultstring: 'Error in deserializing body of request message for operation 'GetDataString'. OperationFormatter encountered an invalid Message body. Expected to find node type 'Element' with name 'GetDataString' and namespace 'http://tempuri.org/'. Found node type 'Element' with name 'GetDataString' and namespace 'http://www.tempuri.org/'' faultactor: 'null' detail: org.kxml2.kdom.Node@458fb600
         one small add on...is that my android code works for w3schools web service so it's pretty weird...
       Can u give me some real hints...
    the wsdl code is
        <?xml version="1.0" encoding="utf-8" ?> 
    - <wsdl:definitions name="Service1" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:tns="http://tempuri.org/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
    - <wsdl:types>
    - <xsd:schema targetNamespace="http://tempuri.org/Imports">
      <xsd:import schemaLocation="http://localhost/TEST1/WcfService1/Service1.svc?xsd=xsd0" namespace="http://tempuri.org/" /> 
      <xsd:import schemaLocation="http://localhost/TEST1/WcfService1/Service1.svc?xsd=xsd1" namespace="http://schemas.microsoft.com/2003/10/Serialization/" /> 
      <xsd:import schemaLocation="http://localhost/TEST1/WcfService1/Service1.svc?xsd=xsd2" namespace="http://schemas.datacontract.org/2004/07/WcfService1" /> 
      </xsd:schema>
      </wsdl:types>
    - <wsdl:message name="IService1_GetData_InputMessage">
      <wsdl:part name="parameters" element="tns:GetData" /> 
      </wsdl:message>
    - <wsdl:message name="IService1_GetData_OutputMessage">
      <wsdl:part name="parameters" element="tns:GetDataResponse" /> 
      </wsdl:message>
    - <wsdl:message name="IService1_GetDataString_InputMessage">
      <wsdl:part name="parameters" element="tns:GetDataString" /> 
      </wsdl:message>
    - <wsdl:message name="IService1_GetDataString_OutputMessage">
      <wsdl:part name="parameters" element="tns:GetDataStringResponse" /> 
      </wsdl:message>
    - <wsdl:message name="IService1_GetDataUsingDataContract_InputMessage">
      <wsdl:part name="parameters" element="tns:GetDataUsingDataContract" /> 
      </wsdl:message>
    - <wsdl:message name="IService1_GetDataUsingDataContract_OutputMessage">
      <wsdl:part name="parameters" element="tns:GetDataUsingDataContractResponse" /> 
      </wsdl:message>
    - <wsdl:portType name="IService1">
    - <wsdl:operation name="GetData">
      <wsdl:input wsaw:Action="http://tempuri.org/IService1/GetData" message="tns:IService1_GetData_InputMessage" /> 
      <wsdl:output wsaw:Action="http://tempuri.org/IService1/GetDataResponse" message="tns:IService1_GetData_OutputMessage" /> 
      </wsdl:operation>
    - <wsdl:operation name="GetDataString">
      <wsdl:input wsaw:Action="http://tempuri.org/IService1/GetDataString" message="tns:IService1_GetDataString_InputMessage" /> 
      <wsdl:output wsaw:Action="http://tempuri.org/IService1/GetDataStringResponse" message="tns:IService1_GetDataString_OutputMessage" /> 
      </wsdl:operation>
    - <wsdl:operation name="GetDataUsingDataContract">
      <wsdl:input wsaw:Action="http://tempuri.org/IService1/GetDataUsingDataContract" message="tns:IService1_GetDataUsingDataContract_InputMessage" /> 
      <wsdl:output wsaw:Action="http://tempuri.org/IService1/GetDataUsingDataContractResponse" message="tns:IService1_GetDataUsingDataContract_OutputMessage" /> 
      </wsdl:operation>
      </wsdl:portType>
    - <wsdl:binding name="BasicHttpBinding_IService1" type="tns:IService1">
      <soap:binding transport="http://schemas.xmlsoap.org/soap/http" /> 
    - <wsdl:operation name="GetData">
      <soap:operation soapAction="http://tempuri.org/IService1/GetData" style="document" /> 
    - <wsdl:input>
      <soap:body use="literal" /> 
      </wsdl:input>
    - <wsdl:output>
      <soap:body use="literal" /> 
      </wsdl:output>
      </wsdl:operation>
    - <wsdl:operation name="GetDataString">
      <soap:operation soapAction="http://tempuri.org/IService1/GetDataString" style="document" /> 
    - <wsdl:input>
      <soap:body use="literal" /> 
      </wsdl:input>
    - <wsdl:output>
      <soap:body use="literal" /> 
      </wsdl:output>
      </wsdl:operation>
    - <wsdl:operation name="GetDataUsingDataContract">
      <soap:operation soapAction="http://tempuri.org/IService1/GetDataUsingDataContract" style="document" /> 
    - <wsdl:input>
      <soap:body use="literal" /> 
      </wsdl:input>
    - <wsdl:output>
      <soap:body use="literal" /> 
      </wsdl:output>
      </wsdl:operation>
      </wsdl:binding>
    - <wsdl:service name="Service1">
    - <wsdl:port name="BasicHttpBinding_IService1" binding="tns:BasicHttpBinding_IService1">
      <soap:address location="http://localhost/TEST1/WcfService1/Service1.svc" /> 
      </wsdl:port>
      </wsdl:service>
      </wsdl:definitions>
        