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

6544code not generated as expected

Expand Messages
  • as.aellen
    Dec 3, 2010
    • 0 Attachment

      Hi all

      My soap::lie script calls a webservice on a server. Unfortunately the server finds only some attributes/elements from the request, but not all.

      Perlcode
      ---------
      my $webService = SOAP::Lite
       -> uri('http://www.swisscom.com/onecrm/potree/propagation')
       -> proxy('http://138.187.96.39:8199/Processes/NetCracker/OneCRM/ReplicateProductInventory/v01')  #Sys1 Sirius
       -> on_action(sub{"/Processes/NetCracker/OneCRM/ReplicateProductInventory"}); #Set SoapAction, because it is different to URI

      $webService->serializer->register_ns('http://www.swisscom.com/onecrm/potree/propagation','xmlns');

      my $result = $webService-> CustomerAccount( 
       SOAP::Data->name("CustomerAccount")->type("")->value(
         SOAP::Data->attr({SCN => "1111"}),
         SOAP::Data->name("POInstance")->type("")->value(
          SOAP::Data->attr({"Action" => 'Update'}),
          SOAP::Data->name("Name")->type("")->value('TestAA'),
          SOAP::Data->name("Type")->type("")->value('PO_TestAA'),
          SOAP::Data->name("POIID")->type("")->value('ALL:SUB:1111AA')
          )
         )
        );

      Generated xml request
      -----------------------------

      <?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:xmlns="http://www.swisscom.com/onecrm/potree/propagation" xmlns:xsd="http://www.w3.org/2001/XMLSchema" soap:encodingStyle="http://schemas.xmlsoap.org/soap/enco
      ding/" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body>
      <CustomerAccount xmlns="http://www.swisscom.com/onecrm/potree/propagation">
      <CustomerAccount
      SCN="1111" />
      <POInstance Action="Update" />
      <Name>TestAA</Name>
      <Type>PO_TestAA</Type>
      <POIID>ALL:SUB:1111AA</POIID>
      </CustomerAccount>
      </soap:Body>
      </soap:Envelope>

      Detail Problem
      The server does not find SCN, Name,Type,POIID. It recognizes only POInstance Action = Update, but not the rest of the fields in the request.

      I pasted the generated request to SoapUI.
      When I manually change the line CustomerAccount.... to:
      <CustomerAccount SCN="1111" xmlns="http://www.swisscom.com/onecrm/potree/propagation">   

      When I manually change the line POInstance.... to:
      <POInstance Action="Update" >      / deleted
      </POInstance>      inserted at the end

      then the request works out of SoapUI

      How can I bring the soap::lite module to generate code as described. (without / at the end bySCN and Update and proper POInstance element)?

      e.g. I tried following
      SOAP::Data->name("POInstance")->type("")->value(\
      unfortunately this generated errors

      Version
      soap::lite v0.712

      I'm struggling around with that problem for a long time. So help is very appreciated!

      Thanks very much for support

      Best regards

      Andres

       

    • Show all 6 messages in this topic