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

Complex type - need blank

Expand Messages
  • Jeff Yoak
    Hi there! I am new to SOAP::Lite and ran into what is probably a simple problem, but I am dead in the water. I have a wsdl here:
    Message 1 of 1 , Jul 11 7:44 AM
    • 0 Attachment
      Hi there!

      I am new to SOAP::Lite and ran into what is probably a simple problem,
      but I am dead in the water.

      I have a wsdl here: http://bsgi.predawntechnology.com/BSGlobalInterface.asmx?wsdl

      The interesting part is:

      <s:element name="PlaceOrder">
      <s:complexType>
      <s:sequence>
      <s:element minOccurs="0" maxOccurs="1" ref="order"/>
      </s:sequence>
      </s:complexType>
      </s:element>

      and

      <s:schema elementFormDefault="qualified">
      <s:element name="order">
      <s:complexType>
      <s:sequence>
      <s:element minOccurs="0" maxOccurs="unbounded"
      name="OrderLine">
      .... etc ....

      The Sample XML the service expects

      <PlaceOrder xmlns="http://bsgi.predawntechnology.com/">
      <order CustomerOrderId="int" OutSourcerId="int"
      CustomerId="int" PurchaserFirstname="string"
      PurchaserPostalCode="string" PurchaserStateProvince="string"
      PurchaserCity="string" PurchaserAddress2="string"
      PurchaserAddress1="string" PurchaserLastName="string" xmlns="">

      ... and so on...

      Note how in the sample XML there is no type associated with "order".
      \When instantiating the order data structure, I use

      my $elem = SOAP::Data->new(type=>'', name=> 'order', value =>
      \SOAP::Data->value(@orderlines)
      );


      The resulting XML has type='namesp5';
      Interestingly, if I use type=>'foo', the result will be
      type='namesp5:foo'. So setting the type to blank sort of works, but I
      am stuck with the namespace.

      The XML I send does include this:
      xmlns:namesp5="http://namespaces.soaplite.com/perl" - which I imagine
      is where namesp5 came from. But that appears to happen automatically -
      I don't know either how to remove it, nor whether it's appropriate.

      I hope this is enough information! Thanks for the help guys.

      Cheers,
      Jeff
    Your message has been successfully submitted and would be delivered to recipients shortly.