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

4756Getting started with WSDL

Expand Messages
  • haltarac
    Jun 16 2:56 PM
    • 0 Attachment
      Hi All,

      I am just starting with WSDL & SOAP::Lite (using Lite.pm version
      0.65_6 to have som access).

      I tried a couple of sample client apps: GoogleSearch works fine but
      all the message parts in their WSDL are plain simple types as in:

      <message name="doSpellingSuggestion">
      <part name="key" type="xsd:string"/>
      <part name="phrase" type="xsd:string"/>
      </message>

      But I cannot get the Amazon web service (AWS) sample to work :(

      Error message :
      String value expected instead of SOAP::Data reference

      The AWS WSDL looks like:

      <xs:element name="ItemSearch">
      <xs:complexType>
      <xs:sequence>
      <xs:element name="SubscriptionId" type="xs:string" minOccurs="0"/>
      ...
      </xs:sequence>
      </xs:complexType>
      </xs:element>
      ...
      <message name="ItemSearchRequestMsg">
      <part name="body" element="tns:ItemSearch"/> </message>

      and the sample code is like:
      my $aws_handle = SOAP::Lite->service("$aws_wsdl");
      $aws_handle->want_som(1); # I added that

      my $itemsearch_request = SOAP::Data->value(
      SOAP::Data->name('SubscriptionId')->value($susbscription_id),
      ...
      );
      my $som = $aws_handle->ItemSearch($itemsearch_request);

      I tried several other similar experiments trying to reference types
      defined in the WSDL schema section, it usually ends up with:
      Type '' can't be found in a schema class 'SOAP::Serializer'

      I am a bit lost right now... Is there any sample client + wsdl that
      would work with non trivial message parts?

      Thanks for any help...

      Henri.
    • Show all 2 messages in this topic