WSDL 文件和 SOAP 标头

发布于 2024-12-01 21:38:47 字数 423 浏览 3 评论 0原文

我这里有一个 wsdl 文件:“模糊” 我想知道如何从该文件中获取 SOAP 标头?这对我来说看起来非常神秘,所以如果有人能给我指出一个教程,那就太好了。我想要的只是需要传递到 NSURLConnection 的肥皂字符串,我可以使用 NSXMLParser 进行解析。

例如,本教程位于: http://www.icodeblog.com/2008/11/03/iphone-programming-tutorial-intro-to-soap-web-services/展示了如何做到这一点,但它不显示如何从 wsdl 文件获取 SOAP 消息。

谢谢!

I have a wsdl file here: "obscured"
I was wondering how can I get the SOAP headers from this file? This looks very cryptic to me, so if someone can point me to a tutorial, it would be great. All I want this is soap string that I need to pass into NSURLConnection, I can do the parsing using NSXMLParser.

For example, this tutorial here: http://www.icodeblog.com/2008/11/03/iphone-programming-tutorial-intro-to-soap-web-services/ shows how to to it, but it doesn't show how to get the SOAP message from the wsdl file.

Thanks!

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

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

发布评论

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

评论(1

阳光的暖冬 2024-12-08 21:38:47

http://www.soapui.org/ 下载 SOAPUI 应用程序(适用于 MAC 和 PC)。我将该 WSDL 提供给 SOAP UI,然后我看到 GetAdvertisers、GetPlans、GetPlansByAdvertiser、GetReportPostBuy、HelloWorld、Login。您希望获取哪一个 SOAP 请求。 SOAP UI 为您构建示例请求。一探究竟。如果您遇到困难,现在我在这里发布所有这些请求:

GetAdvertisers:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mss="http://MSS">
   <soapenv:Header/>
   <soapenv:Body>
      <mss:GetAdvertisers>
         <mss:userID>?</mss:userID>
      </mss:GetAdvertisers>
   </soapenv:Body>
</soapenv:Envelope>

GetPlans:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mss="http://MSS">
   <soapenv:Header/>
   <soapenv:Body>
      <mss:GetPlans>
         <mss:userID>?</mss:userID>
      </mss:GetPlans>
   </soapenv:Body>
</soapenv:Envelope>

GetPlansByAdvertiser:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mss="http://MSS">
   <soapenv:Header/>
   <soapenv:Body>
      <mss:GetPlansByAdvertiser>
         <mss:UserID>?</mss:UserID>
         <!--Optional:-->
         <mss:Advertiser>?</mss:Advertiser>
      </mss:GetPlansByAdvertiser>
   </soapenv:Body>
</soapenv:Envelope>

GetReportPostBuy:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mss="http://MSS">
   <soapenv:Header/>
   <soapenv:Body>
      <mss:GetReportPostBuy>
         <mss:UserID>?</mss:UserID>
         <mss:PlanID>?</mss:PlanID>
         <mss:CompanyID>?</mss:CompanyID>
         <!--Optional:-->
         <mss:CompanyName>?</mss:CompanyName>
         <mss:AdvertiserID>?</mss:AdvertiserID>
         <!--Optional:-->
         <mss:AdvertiserName>?</mss:AdvertiserName>
         <mss:PubdateFrom>?</mss:PubdateFrom>
         <mss:PubdateTo>?</mss:PubdateTo>
      </mss:GetReportPostBuy>
   </soapenv:Body>
</soapenv:Envelope>

登录:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mss="http://MSS">
   <soapenv:Header/>
   <soapenv:Body>
      <mss:Login>
         <!--Optional:-->
         <mss:username>?</mss:username>
         <!--Optional:-->
         <mss:password>?</mss:password>
      </mss:Login>
   </soapenv:Body>
</soapenv:Envelope>

Download SOAPUI Application (Available for both MAC and PC) from http://www.soapui.org/. I gave that WSDL to SOAP UI and I see GetAdvertisers, GetPlans, GetPlansByAdvertiser,GetReportPostBuy, HelloWorld,Login. For which one are you looking to get SOAP Request. SOAP UI constructs sample request for you. Check it out. If you are having difficulty, for now I am posting all those requests here:

GetAdvertisers:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mss="http://MSS">
   <soapenv:Header/>
   <soapenv:Body>
      <mss:GetAdvertisers>
         <mss:userID>?</mss:userID>
      </mss:GetAdvertisers>
   </soapenv:Body>
</soapenv:Envelope>

GetPlans:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mss="http://MSS">
   <soapenv:Header/>
   <soapenv:Body>
      <mss:GetPlans>
         <mss:userID>?</mss:userID>
      </mss:GetPlans>
   </soapenv:Body>
</soapenv:Envelope>

GetPlansByAdvertiser:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mss="http://MSS">
   <soapenv:Header/>
   <soapenv:Body>
      <mss:GetPlansByAdvertiser>
         <mss:UserID>?</mss:UserID>
         <!--Optional:-->
         <mss:Advertiser>?</mss:Advertiser>
      </mss:GetPlansByAdvertiser>
   </soapenv:Body>
</soapenv:Envelope>

GetReportPostBuy:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mss="http://MSS">
   <soapenv:Header/>
   <soapenv:Body>
      <mss:GetReportPostBuy>
         <mss:UserID>?</mss:UserID>
         <mss:PlanID>?</mss:PlanID>
         <mss:CompanyID>?</mss:CompanyID>
         <!--Optional:-->
         <mss:CompanyName>?</mss:CompanyName>
         <mss:AdvertiserID>?</mss:AdvertiserID>
         <!--Optional:-->
         <mss:AdvertiserName>?</mss:AdvertiserName>
         <mss:PubdateFrom>?</mss:PubdateFrom>
         <mss:PubdateTo>?</mss:PubdateTo>
      </mss:GetReportPostBuy>
   </soapenv:Body>
</soapenv:Envelope>

Login:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mss="http://MSS">
   <soapenv:Header/>
   <soapenv:Body>
      <mss:Login>
         <!--Optional:-->
         <mss:username>?</mss:username>
         <!--Optional:-->
         <mss:password>?</mss:password>
      </mss:Login>
   </soapenv:Body>
</soapenv:Envelope>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文