Blackberry kSoap2 & Soap Header

后端 未结 1 385
无人共我
无人共我 2021-01-01 05:33

Trying to specify a custom soap header. Not sure how the SoapEnvelope.headerOut propery is to be populated.

My code so far?

String soapAction = servi         


        
相关标签:
1条回答
  • 2021-01-01 06:00

    headerOut is an Element[] that you need to build.

    Something like this

      Element usernameElement = new Element().createElement(OASIS_SECURITY_XSD_URL, "Username");
      usernameElement.addChild(Node.TEXT, username);
      Element passwordElement = new Element().createElement(OASIS_SECURITY_XSD_URL, "Password");
      passwordElement.addChild(Node.TEXT, password);
    

    and then add it to an array..

    0 讨论(0)
提交回复
热议问题