Is it possible to call WSHTTPBINDING from android?

吃可爱长大的小学妹 提交于 2019-12-02 02:18:32
    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);
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!