复杂的 SOAP 请求

发布于 2024-10-20 22:27:16 字数 881 浏览 2 评论 0原文

我的请求如下...

 <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>

如何通过 Android Soap 请求传递相同的请求...

谢谢。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

°如果伤别离去 2024-10-27 22:27:16

尝试这样会对你有帮助

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);

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);
翻身的咸鱼 2024-10-27 22:27:16

我将完整的 xml 作为字节数组传递到输出流,而不是转换 SOAP 信封,它起作用了!

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文