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

Server does not find attribute

Expand Messages
  • as.aellen
    Hi all My Perl WebClient calls over soap::lite a webservice on a server and gets following error from the server: Problem # 08.11.2010 15:20:59.549 [INFO ]
    Message 1 of 1 , Nov 8, 2010
    View Source
    • 0 Attachment

      Hi all

      My Perl WebClient calls over soap::lite a webservice on a server and gets following error from the server:

      Problem

      #' 08.11.2010 15:20:59.549 [INFO ] v01.OneCRMWs  [Key: 9127214485921132518] ReplicateProductInventory() SCN=null '
       #' 08.11.2010 15:20:59.556 [DEBUG] v01.OneCRMWs [Key: 9127214485921132518] CustomerAccount: SCN=null; poInstance={} '
       #' 08.11.2010 15:20:59.556 [DEBUG] v01.OneCRMWs [Key: 9127214485921132518] ReplicateProductInventory() OneCRM WebService start
      <prop:CustomerAccount SCN="null">

       

      The server finds the operation, but the attribute SCN is empty and the poInstance seems also to be empty or not found. The client fills values for SCN and poInstance

       

      Perl Client Code

      Version 1

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


      #WebService Call
      #---------------- 
       

      my $result = $webService-> CustomerAccount(             
         SOAP::Data->name("CustomerAccount")->type("")->value(
         SOAP::Data->name("SCN")->type("")->value('1111'),
         SOAP::Data->name("POInstance")->type("")->value(
          SOAP::Data->name("Action")->type("")->value("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')
          #SOAP::Data->name("ParentPOIID")->type("")->value('2010-10-14T08:30:00'),
          #SOAP::Data->name("CFSIID")->type("")->value('2010-10-14T08:30:00'))
          )
          )
        );

      Version 2

      ....

      my $result = $webService-> CustomerAccount(             
         SOAP::Data->name("SCN")->type("")->value('1111'),
         SOAP::Data->name("POInstance")->type("")->value(
          SOAP::Data->name("Action")->type("")->value("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')
          #SOAP::Data->name("ParentPOIID")->type("")->value('2010-10-14T08:30:00'),
          #SOAP::Data->name("CFSIID")->type("")->value('2010-10-14T08:30:00'))
          )
        );

      -> The same error message in the log

      Call

      Content-Type: text/xml; charset=utf-8
      SOAPAction: /Processes/NetCracker/OneCRM/ReplicateProductInventory

      <?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:xsd="http://www.w3.org/2001/XMLSchema" soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
       xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><CustomerAccount xmlns="http://www.swisscom.com/onecrm/potree/propaga
      tion"><SCN>1111</SCN><Action>Update</Action><Name>TestAA</Name><Type>PO_TestAA</Type><POIID>ALL:SUB:1111AA</POIID></CustomerAccount></so
      ap:Body></soap:Envelope>
      SOAP::Transport::HTTP::Client::send_receive: HTTP::Response=HASH(0x209454c)
      SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 200 OK

       

      I tried also to force the generation of a poInstance element with

      my $result = $webService-> CustomerAccount(             #You have to call it directly with the CustomerAccount and not with the operation ReplicateProductInventory
         SOAP::Data->name("SCN")->type("")->value('1111'),
         SOAP::Data->name("POInstance")->type("")->value(\
          SOAP::Data->name("Action")->type("")->value("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')
          #SOAP::Data->name("ParentPOIID")->type("")->value('2010-10-14T08:30:00'),
          #SOAP::Data->name("CFSIID")->type("")->value('2010-10-14T08:30:00'))
          )
        );

      But then I get an other error with namespace


      <?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:namesp1="http://namespaces.soaplite.com/perl" xmlns:xsi="http://www.w3.org/20
      01/XMLSchema-instance" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" soap:encod
      ingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><CustomerAccount
      xmlns="http://www.swisscom.com/onecrm/potree/propagation"><SCN>1111</SCN><POInstance xsi:type="namesp1"><Action>Update</Action></POInsta
      nce><Name>TestAA</Name><Type>PO_TestAA</Type><POIID>ALL:SUB:1111AA</POIID></CustomerAccount></soap:Body></soap:Envelope>
      SOAP::Transport::HTTP::Client::send_receive: HTTP::Response=HASH(0x2138704)
      SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 500 Internal Server Error

      SoapUI Call that works

      <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:prop="http://www.swisscom.com/onecrm/potree/propagation">
         <soapenv:Header/>
         <soapenv:Body>
          <prop:CustomerAccount SCN="1111" xmlns:prop="http://www.swisscom.com/onecrm/potree/propagation">
                <prop:POInstance Action="Update">
                  <prop:Name>TestAA</prop:Name>
                  <prop:Type>PO_TestAA</prop:Type>
                  <prop:POIID>ALL:SUB:1111AA</prop:POIID>
                  <!--prop:ParentPOIID>ALL:SUB:91610111</prop:ParentPOIID-->
                  <!--prop:CFSIID>AC0.123.456.71</prop:CFSIID-->
                 </prop:POInstance>
          </prop:CustomerAccount>
         </soapenv:Body>
      </soapenv:Envelope>

      WSDL

      <?

      xml version="1.0" encoding="UTF-8"?>

      <

      wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://www.swisscom.com/onecrm/potree/propagation" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:ns0="http://www.swisscom.com/onecrm/potree/propagation" name="GetObjectState" targetNamespace="http://www.swisscom.com/onecrm/potree/propagation">

      <wsdl:types>

      <

      xs:schema xmlns="http://www.swisscom.com/onecrm/potree/propagation" elementFormDefault="qualified" targetNamespace="http://www.swisscom.com/onecrm/potree/propagation" version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">

      <xs:element name="CustomerAccount">

      <xs:complexType>

      <xs:sequence>

      <xs:element maxOccurs="unbounded" name="POInstance">

      <xs:complexType>

      <xs:sequence>

      <xs:element name="Name" type="NonEmptyStringType" />

      <xs:element minOccurs="0" name="Type" type="NonEmptyStringType" />

      <xs:element name="POIID" type="NonEmptyStringType" />

      <xs:element minOccurs="0" maxOccurs="unbounded" name="ParentPOIID" type="NonEmptyStringType" />

      <xs:element minOccurs="0" maxOccurs="unbounded" name="CFSIID" type="NonEmptyStringType" />

      </xs:sequence>

      <xs:attribute name="Action" type="ActionType" use="required" />

      </xs:complexType>

      </xs:element>

      </xs:sequence>

      <xs:attribute name="SCN" type="NonEmptyStringType" use="required" />

      </xs:complexType>

      <xs:key name="POInstanceKey">

      <xs:selector xpath="POInstance" />

      <xs:field xpath="POIID" />

      </xs:key>

      </xs:element>

      <xs:simpleType name="ActionType">

      <xs:restriction base="xs:string">

      <xs:enumeration value="Create" />

      <xs:enumeration value="Update" />

      <xs:enumeration value="Delete" />

      </xs:restriction>

      </xs:simpleType>

      <xs:simpleType name="ResponseType">

      <xs:restriction base="xs:string">

      <xs:enumeration value="Success" />

      <xs:enumeration value="Failure" />

      </xs:restriction>

      </xs:simpleType>

      <xs:simpleType name="NonEmptyStringType">

      <xs:restriction base="xs:string">

      <xs:minLength value="1" />

      </xs:restriction>

      </xs:simpleType>

      <xs:element name="ExceptionDetails">

      <xs:complexType>

      <xs:sequence>

      <xs:element name="Type" type="xs:string" />

      <xs:element name="Message" type="xs:string" />

      <xs:element

      (Message over 64 KB, truncated)
    Your message has been successfully submitted and would be delivered to recipients shortly.