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

Adding namespaces to SOAP-ENV::Envelope

Expand Messages
  • Paul Harman
    I d like to be able to add further namespaces into the Envelope. The web service I am connecting my SOAP::Lite client to declares many methods and data types
    Message 1 of 3 , Nov 20, 2003
    • 0 Attachment
      I'd like to be able to add further namespaces into the Envelope.

      The web service I am connecting my SOAP::Lite client to declares many
      methods and data types in its own namespace. SOAP::Lite handles the method
      names in a rather peculiar way, and doesn't seem to handle the structure
      types very well at all.

      For method names, what I'm expecting is this:

      <SOAP-ENV:Envelope [...] xmlns:myNamespace="myURI" [...]>
      <SOAP-ENV:Body>
      <myNamespace:myMethod>

      But what I'm getting is an unchanged envelope, then this:

      <namesp1:myMethod xmlns:namesp1="myURI">

      Now, this seems to work okay (odd though it looks). The problem comes where
      I need to use structures that belong to the 'myNamespace' namespace. WHat I
      want to do is this:

      <thing xsi:type="myNamespace:myStructureType">

      ...but the closest I've been able to get using SOAP::Lite is:

      <thing xsi:type="namesp1:myStructureType">

      ...which works (presumably because 'namesp1' was decalred and linked to the
      URI in the 'myMethod' element), but I don't want to have to keep using trace
      to second-guess the namepsaces that SOAP::Lite is going to auto-create for
      things.

      Paul




      This E-Mail and any attachment is intended only for the person or entity for
      which it is addressed and may contain confidential material. If you are not
      the addressee or have received this E-Mail in error, please inform the
      sender immediately and delete it from your computer. In addition, if you are
      not the addressee or have received this E-Mail in error, any disclosure,
      copying, distribution or any action taken or omitted to be taken in reliance
      upon it is prohibited and may be unlawful.
      If this E-Mail has been transmitted outside the ordinary course of its
      business, the company for which the sender works accepts no liability for
      any loss or damage suffered by any person arising from any use of or
      reliance on information contained in this E-Mail, and any opinion expressed
      in this E-Mail is personal to the sender and may not reflect the opinion of
      such company. Although the network operator makes every reasonable effort to
      keep its network free from viruses, neither the network operator nor the
      sender or the company for which the sender works accepts any responsibility
      for computer viruses transmitted through this E-Mail or any attachments; it
      is your responsibility to virus scan this E-Mail and any attachments. Any
      E-Mail reply to this address may be subject to interception or monitoring
      for operational reasons or for lawful business practices.
    • Byrne Reese
      This is an excellent question - something I will have to write about... at least more explicitly on majordojo.com. Future versions of SOAP::Lite will make this
      Message 2 of 3 , Nov 26, 2003
      • 0 Attachment
        This is an excellent question - something I will have to write about... at
        least more explicitly on majordojo.com. Future versions of SOAP::Lite will
        make this easier. Here is how *I* would address the problem:

        http://www.majordojo.com/archives/000009.html

        This tells about how to override the root element of the response. In this
        way you can take exact control over the namespaces and prefixes used...

        > I'd like to be able to add further namespaces into the Envelope.
        >
        > The web service I am connecting my SOAP::Lite client to declares many
        > methods and data types in its own namespace. SOAP::Lite handles the method
        > names in a rather peculiar way, and doesn't seem to handle the structure
        > types very well at all.
        >
        > For method names, what I'm expecting is this:
        >
        > >SOAP-ENV:Envelope [...] xmlns:myNamespace="myURI"
        > [...]SOAP-ENV:BodymyNamespace:myMethodnamesp1:myMethod
        > xmlns:namesp1="myURI"thing
        > xsi:type="myNamespace:myStructureType"thing
        > xsi:type="namesp1:myStructureType"
        >
        >
        >
        >
        > To unsubscribe from this group, send an email to:
        > soaplite-unsubscribe@yahoogroups.com
        >
        >
        >
        >
        >
        > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
        >
        >
        >
        >
        >


        ^byrne :/
      • Aaron Trevena
        ... using call() gives you a lot more flexibility. see also http://groups.yahoo.com/group/soaplite/message/3155 which is very helpful, I have used this
        Message 3 of 3 , Nov 27, 2003
        • 0 Attachment
          On Wed, 26 Nov 2003, Byrne Reese wrote:
          > This is an excellent question - something I will have to write about... at
          > least more explicitly on majordojo.com. Future versions of SOAP::Lite will
          > make this easier. Here is how *I* would address the problem:
          >
          > http://www.majordojo.com/archives/000009.html

          using call() gives you a lot more flexibility.

          see also

          http://groups.yahoo.com/group/soaplite/message/3155

          which is very helpful, I have used this technique successfully to set the
          namespace of the envelope, because ebXML-MS requires you specify the
          namespace of things like ebXML, xlink, etc in the Envelope, Header and
          Body.

          Unfortunately there is still now way to specify a namespace in the
          SOAP-BODY or SOAP-Header.

          Any help on munging these without writing my own serializer would be much
          appreciated.

          cheers,

          A.

          p.s. I have uploaded version 0.6 of SOAP::Data::Builder to CPAN, it is now
          more OO and doesn't churn out pages of debug info anymore. Patches welcome
          :)

          --
          Aaron J Trevena - Perl Hacker, Kung Fu Geek, Internet Consultant
          AutoDia --- Automatic UML and HTML Specifications from Perl, C++
          and Any Datasource with a Handler. http://droogs.org/autodia
        Your message has been successfully submitted and would be delivered to recipients shortly.