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

Re: [soaplite] Is it possible to call without a method?

Expand Messages
  • Duncan Cameron
    ... The envelope() method in the SOAP::Serializer class does seem to support a freeform option where the complete XML is passed in, but there isn t a way to
    Message 1 of 3 , Nov 30, 2004
      On 2004-11-30 at 16:56:54 James Detwiler wrote:

      >Up to this point the SOAP servers I have worked with have a generic
      >method that I call. The specific function is contained in the XML
      >that
      >I pass as an argument to that generic method.
      >
      >But the SOAP server I am working with now is different. It has
      >numerous methods and each method has numerous attributes in addition
      >to the usual namespace declarations.
      >
      >My problem is this: I construct the XML request on a legacy machine
      >and pass it to my SOAP gateway. I need to find a way use that XML
      >message as it is constucted -- since it already contains the method
      >and attributes. Everything that I try in SOAP::Lite generates some
      >kind of an error!
      >
      >The only solution I can think of is to strip off the outer tag and
      >use that to build the method and attributes for the call, but this
      >seems like it should be unnecessary. There has to be a way to get
      >SOAP::Lite to realize that the XML I give to the call is the complete
      >contents of the SOAP Body.

      The envelope() method in the SOAP::Serializer class does seem to
      support a 'freeform' option where the complete XML is passed in, but
      there isn't a way to invoke it currently.

      Look at the call() method in the SOAP::Lite class and you will see
      where the envelope() method is called. You could change the call to
      envelope to pass 'freeform' instead of 'method'. The cleanest ways
      would be to subclass SOAP::Lite, to override the call() method, or to
      create a new freeform() method that does exactly what you want.

      You can then simply pass the complete XML as a SOAP::Data object.

      Another suggestion is to create the complete SOAP envelope yourself
      and use the LWP::UA package to do the sending and receiving.

      Duncan
    • James Detwiler
      After searching and browsing through a lot of posts in the soaplite group and reading Duncan s reply to my original problem, I am starting to wonder if I
      Message 2 of 3 , Nov 30, 2004
        After searching and browsing through a lot of posts in the soaplite
        group and reading Duncan's reply to my original problem, I am starting
        to wonder if I should even be using SOAP::Lite!

        The following messages make it clear that in some cases it just makes
        more sense to use LWP to post a manually constructed SOAP message:
        4055 "Re: How to resubmit raw SOAP XML"
        4198 "Re: Using SOAP to transfer XML document"
        4217 "Re: Is it possible to call without a method?"

        In my case, so far, here is what I am doing:

        [1] The application server (legacy software) constructs an XML
        request.

        [2] The XML request is passed to the SOAP gateway.

        [3] SOAP::Lite places the reqest inside a SOAP Body and Envelope and
        then sends it to the appropriate vendor's SOAP server.

        [4] The results are passed back from the SOAP gateway to the
        application server for parsing and processing.

        In this scenario, SOAP::Lite does not seem to do much for me.

        So here is the big question: Is there any reason that it would be a
        bad idea to drop using SOAP::Lite and use a simple LWP POST in its
        place? Is there something I am missing here? Is SOAP::Lite doing more
        for me than I realize?

        Thank you,
        --James Detwiler
      Your message has been successfully submitted and would be delivered to recipients shortly.