Search code examples
objective-cioscocoa-touchsoapwsdl

WSDL file and SOAP headers


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!


Solution

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