开发者

Complex SOAP Request

My request is as below...

 <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:arr="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
   <soapenv:Header/>
   <soapenv:Body>
      <Search>
         <specialties>
            <!--Zero or more repetitions:-->
            <arr:int>1</arr:int>
            <arr:int>2</arr:int>
            <arr:int>3</arr:int>
         </specialties>                      
         <gender>
            <!--Zero or more repetitions:-->
            <arr:string>male</arr:string>
            <arr:string>female</arr:string>
         </gender>            
      </Search>
   </soapenv:Body>
</soapenv:Envelope>
开发者_开发知识库

How to pass the same with Android Soap Request...

Thanks.


try in this way it will help u

SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
        SoapObject Search= new SoapObject(NAMESPACE, "Search");
        for(int i=0;i<mID.length & i<qty.length;i++){
            SoapObject Specialities=  new SoapObject("http://www.FoodTruck.zsl.com/", "Specialities");
            Specialities.addProperty("MenuItemID", mID[i]);
            Specialities.addProperty("Quantity",1);
            Specialities.addProperty("CartItems", CartItems);
        }
        request.addProperty("Search", Search);


I passed complete xml as byte array to Output stream instead of converting SOAP envelope and it worked !!!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜