Loading ...
Sorry, an error occurred while loading the content.

3669questions on using stubmaker

Expand Messages
  • Gary Lawrence Murphy
    Jun 11, 2004
    • 0 Attachment
      This is my first time using SOAP::Lite where it wasn't mostly done by
      someone else (like in MovableType ;) and I'm still slowly sorting out
      all the bits and rules, so I hope this isn't too novice of a question,
      but I'm having some trouble wrapping my head around the stubmaker ...

      it /seems/ like exactly what I need but I'm having trouble sending a
      request with two typed parameters.

      My goal is to send out a request as follows:

      <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
      <soap:Body>
      <updatesxml xmlns="http://www.HOST.com/new/feed/feed.asmx">
      <since>xx</since>
      <updatekey>0</updatekey>
      </updatesxml>
      </soap:Body>
      </soap:Envelope>

      I ran stubmaker on their WSDL file and received a stub as follows:

      updatesxml => {
      endpoint => 'http://www.HOST.com/new/feed/feed.asmx',
      soapaction => 'http://www.HOST.com/new/feed/feed.asmx/updatesxml',
      uri => '',
      parameters => [
      SOAP::Data->new(name => 'parameters, type => '', attr => {}),
      ],
      },

      I call this with the following perl syntax:

      $ws = new feed;
      $res = $ws->updatesxml( $since, $updatekey );

      but the response comes back as if both variables were undefined.

      I've verified the behaviour of their service using the CGI test thing
      at http://soapclient.com/soaptest.html, so I know there must be some
      problem with my code.

      looking at the stub returned from the stubmaker example in the docs
      (net_xmethods_services_stockquote_StockQuoteService.pm) I thought perhaps
      I should specify more about the parameters to get that <since>xx</since>
      and I tried replacing "parameter" with

      SOAP::Data->new(name => 'since', type => '', attr => {}),
      SOAP::Data->new(name => 'updatekey', type => '', attr => {}),

      but my results are the same. I also naively tried types like
      "xsd:string" as in many of the SOAP::Lite examples. I also tried this
      with the type set as s:string and s:double as listed in the display on
      soapclient, but I get the same result.

      Is there something really basic that I'm forgetting? Is there an easy
      way to observe the soap request message stubmaker creates?

      Docs on stubmaker seem a little lean, which suggests it either works
      so well no one ever thinks twice about it, or that most people don't
      use it :)

      --
      gary lawrence murphy <gary@...> :: xml team solutions
      :: sports data integration through open standard sportsml ::
      www.xmlteam.com :: sportwire.sourceforge.net