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

(Correction) Setting the Prefix for a SOAP Response via SOAP::Data

Expand Messages
  • Lamar Hawkins
    (A few of the xmlns values were incorrect. They have been corrected inline below.) I m running Perl v5.8.0 built for i386-linux-thread-multi under Linux
    Message 1 of 1 , Sep 16, 2008
    • 0 Attachment

      (A few of the xmlns values were incorrect.  They have been corrected inline below.)

      I'm running Perl v5.8.0 built for i386-linux-thread-multi under Linux 2.4.21-57.ELsmp.  Our SOAP::Lite is at v0.710.08.

      We're dealing with a picky SOAP client and have set up the following CGI dispatch file (use statements ommitted for brevity):

        ->dispatch_with({'http://echo.nasa.gov/v9/order/fulfillment' =>

      exit 0;

      package OrderFulfillmentService;

      sub Submit {return (SOAP::Data->name('SubmitResponse')->type('xml')

      Because of the way the SOAP client calls our Submit service, we have to use the dispatch_with() syntax.  We successfully receive and process their communication and respond with something like this:

      <soap:Envelope soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
            <SubmitResponse xmlns="http://echo.nasa.gov/v9/order/fulfillment">


      For some reason, SOAP::Lite automatically inserts the xmlns=http://my.server.com/v7/order/fulfillment in the SubmitResponse tag.  In any case, the SOAP client rejects our response.  The authors of the SOAP client believe that we need to modify our SubmitResponse such that a prefix is added like this:

            <order:SubmitResponse xmlns:order="http://echo.nasa.gov/v9/order/fulfillment">


      I have tried adding various elements to our "{return (SOAP::Data->" statement like "->prefix('order')" and "->attr({prefix=> 'order'}), but everything seems to be ignored.  How can I specify the prefix of my SubmitResponse message/tag?  Many thanks!

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