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

Namespace issues with SOAP::Lite 0.60

Expand Messages
  • ashgromnies
    I am using SOAP::Lite 0.60 and upgrade is not an option. I am using dispatch_with to call the modules that have my logic to generate the SOAP in them. Here is
    Message 1 of 1 , Sep 27, 2008
    View Source
    • 0 Attachment
      I am using SOAP::Lite 0.60 and upgrade is not an option.

      I am using dispatch_with to call the modules that have my logic to
      generate the SOAP in them.

      Here is a Data::Dumper of the return from a particular method call:

      [Sat Sep 27 17:34:13 2008] $VAR1 = bless( {
      [Sat Sep 27 17:34:13 2008] null: '_value' => [
      [Sat Sep 27 17:34:13 2008] null: bless( {
      [Sat Sep 27 17:34:13 2008] null:
      '_value' => [
      [Sat Sep 27 17:34:13 2008] null:
      3
      [Sat Sep 27 17:34:13 2008] null:
      ],
      [Sat Sep 27 17:34:13 2008] null:
      '_type' => 'xsd:int',
      [Sat Sep 27 17:34:13 2008] null:
      '_signature' => [],
      [Sat Sep 27 17:34:13 2008] null:
      '_name' => 'status',
      [Sat Sep 27 17:34:13 2008] null:
      '_attr' => {}
      [Sat Sep 27 17:34:13 2008] null:
      }, 'SOAP::Data' )
      [Sat Sep 27 17:34:13 2008] null: ],
      [Sat Sep 27 17:34:13 2008] null: '_type' =>
      'tns1:pointHistoryRequestResponse',
      [Sat Sep 27 17:34:13 2008] null: '_signature' => [],
      [Sat Sep 27 17:34:13 2008] null: '_attr' => {
      [Sat Sep 27 17:34:13 2008] null:
      'xmlns:tns1' => 'http://soap.mysite.com'
      [Sat Sep 27 17:34:13 2008] null: }
      [Sat Sep 27 17:34:13 2008] null: }, 'SOAP::Data' );


      As you can see, I made a SOAP::Data object and forced the namespace to
      be "tns1" and made the type of the pointHistoryRequestResponse element
      in that namespace.

      However, the XML SOAP::Lite generates from that SOAP::Data object is
      different...

      <SOAP-ENV:Envelope
      SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
      xmlns:xsd="http://www.w3.org/1999/XMLSchema">
      <SOAP-ENV:Body>
      <namesp1:pointHistoryRequestResponse
      xmlns:namesp1="http://soap.mysite.com">
      <status xsi:type="xsd:int">3</status>
      </namesp1:pointHistoryRequestResponse>
      </SOAP-ENV:Body>
      </SOAP-ENV:Envelope>


      Some reason it decided to completely ignore my tns1 and make up its
      own namespace, namesp1. This is causing extremely frustrating issues
      for me.

      In a more complex response, the tns1 will appear but SOAP::Lite also
      decides to make up its own namespace.

      If you'd like to see a more complex response, please ask, but that
      simple one should be enough to show what I mean when I say that
      SOAP::Lite is changing my namespace names.


      How can I get around this issue and force SOAP::Lite to use the "tns1"
      namespace like I want? I would greatly appreciate any assistance, I am
      at wit's end.
    Your message has been successfully submitted and would be delivered to recipients shortly.