Is it possible to call WSHTTPBINDING from android?

后端 未结 1 1295
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-21 12:47
private static final String SOAP_ACTION = \"http://tempuri.org/IService1/HelloTest\";
private static final String METHOD_NAME = \"HelloTest\";
private static final Strin         


        
相关标签:
1条回答
  • 2021-01-21 13:27
        Element e = new Element();
            e.setName("To");
            e.setNamespace("http://www.w3.org/2005/08/addressing");
            e.addChild(Node.TEXT,
                    "your URL HERE");
    
    
            Element e1 = new Element();
            e1.setName("Action");
            e1.setNamespace("http://www.w3.org/2005/08/addressing");
            e1.addChild(Node.TEXT,
                    "http://tempuri.org/IService1/HelloTest");
    
        request.addProperty("Celsius", "32");    
    
        // use VER12 instead of VER11
        SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER12);
    
        envelope.dotNet=true;
    
        // add HederOut to envelope
        envelope.headerOut = new Element[] { e, e1 };
    
        envelope.setOutputSoapObject(request);
    
    0 讨论(0)
提交回复
热议问题