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

Setting the Prefix for a SOAP Response via SOAP::Data

Expand Messages
  • Lamar Hawkins
    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
    Message 1 of 1 , Sep 10 2:14 PM

      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="


      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://my.server.com/v7/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.