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

3002Multiple attr and "anyType" (Client: Soap::Lite/Server: MS SOAP)

Expand Messages
  • mpafrica2001
    Sep 16, 2003
    • 0 Attachment
      Apologies for the length of this message but I've tried to include
      everything relevent. Unfortunately, I can't make the web service
      available outside our firewall.

      I'm trying to communicate with a WSDL based service on
      an MS SOAP server. If anybody has done that and can
      share code or ideas, I'd love to see it.

      I've found a lot of documentation on how to talk to .NET SOAP
      (which I have working) but very little about the MS SOAP
      toolkit (which I haven't).

      I've been given an XML trace of a successful session with a VB
      client which I include below. I've also included the WSDL.

      Client: SOAP::Lite 0.60
      Server: MS SOAP toolkit (version 3 I believe)

      FaultCode: SOAP-ENV:Server
      FaultString: SoapMapper: Restoring data into SoapMapper
      anyType failed

      Notes:

      - The error seems fair enough as I am passing strings instead
      of "anyType"s

      - The WSDL lists the last two parameters as type anyType.
      Explicitly setting them as such in the SOAP::Data calls
      returns the SOAP::Lite error: Schema/namespace for type
      'anyType' is not specified

      - The VB code creates data entries with two xmlns attributes
      (in two different namespaces). I haven't been able to
      generate this with SOAP::Lite. Maybe I need to write
      a custom serializer.

      - Any help/suggestions very gratefully received.

      Perl Client code (IP addresses ellided):

      use SOAP::Lite +trace => 'debug';

      my $service = SOAP::Lite
      ->service('http://IP ADDRESS/webservices/ntlBusiness.wsdl')
      ->readable(1);

      my $method = SOAP::Data->name('CheckAvailability')
      ->attr({xmlns => 'http://tempuri.org/ntlBusiness/message/'});

      my $av = SOAP::Data->name('strAvailability')
      ->attr({xmlns => 'http://www.w3.org/2001/XMLSchema-instance'})
      ->type('string')->value('');

      my $ed = SOAP::Data->name('strEnabledDate')
      ->attr({xmlns => 'http://www.w3.org/2001/XMLSchema-instance'})
      ->type('string')->value('');

      my $result = $service->CheckAvailability('PO57 0DE', '01256881234',
      $av, $ed)
      ->result;

      print STDERR $result;


      Perl client XML trace

      ?xml version="1.0" encoding="UTF-8"?>
      <SOAP-ENV:Envelope
      xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
      SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
      xmlns:xsd="http://www.w3.org/1999/XMLSchema">
      <SOAP-ENV:Body>
      <namesp1:CheckAvailability
      xmlns:namesp1="http://tempuri.org/ntlBusiness/message/">
      <strPostCode xsi:type="xsd:string"
      >PO57 0DE</strPostCode>
      <strPhoneNumber xsi:type="xsd:string"
      >01256881234</strPhoneNumber>
      <strAvailability
      xmlns="http://www.w3.org/2001/XMLSchema-instance"
      xsi:type="xsd:string"/>
      <strEnabledDate
      xmlns="http://www.w3.org/2001/XMLSchema-instance"
      xsi:type="xsd:string"/>
      </namesp1:CheckAvailability><
      /SOAP-ENV:Body>
      </SOAP-ENV:Envelope>

      VB client xml trace:
      ----- sent --------
      <?xml version="1.0" encoding="UTF-8" standalone="no" ?>
      <SOAP-ENV:Envelope
      SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
      <SOAP-ENV:Body>
      <SOAPSDK1:CheckAvailability
      xmlns:SOAPSDK1="http://tempuri.org/ntlBusiness/message/">
      <strPostCode>SL7 1HX</strPostCode>
      <strPhoneNumber>01628474907</strPhoneNumber>
      <strAvailability
      xmlns:SOAPSDK2="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:SOAPSDK3="http://www.w3.org/2001/XMLSchema"
      SOAPSDK2:type="SOAPSDK3:string" />
      <strEnabledDate
      xmlns:SOAPSDK4="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:SOAPSDK5="http://www.w3.org/2001/XMLSchema"
      SOAPSDK4:type="SOAPSDK5:string" />
      </SOAPSDK1:CheckAvailability>
      </SOAP-ENV:Body>
      </SOAP-ENV:Envelope>

      ----- received --------

      <?xml version="1.0" encoding="UTF-8" standalone="no" ?>
      <SOAP-ENV:Envelope
      SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
      <SOAP-ENV:Body>
      <SOAPSDK1:CheckAvailabilityResponse
      xmlns:SOAPSDK1="http://tempuri.org/ntlBusiness/message/">
      <Result>0</Result>
      <strPostCode>SL7 1HX</strPostCode>
      <strPhoneNumber>01628474907</strPhoneNumber>
      <strAvailability
      xmlns:SOAPSDK2="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:SOAPSDK3="http://www.w3.org/2001/XMLSchema"
      SOAPSDK2:type="SOAPSDK3:string">G</strAvailability>
      <strEnabledDate
      xmlns:SOAPSDK4="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:SOAPSDK5="http://www.w3.org/2001/XMLSchema"
      SOAPSDK4:type="SOAPSDK5:string" />
      </SOAPSDK1:CheckAvailabilityResponse>
      </SOAP-ENV:Body>
      </SOAP-ENV:Envelope>

      WSDL (IP addresses ellided):

      <?xml version="1.0" encoding="UTF-8" ?>
      - <!-- Generated 08/13/03 by Microsoft SOAP Toolkit WSDL File
      Generator, Version 3.00.1325.0
      -->
      - <definitions name="ntlBusiness"
      targetNamespace="http://tempuri.org/ntlBusiness/wsdl/"
      xmlns:wsdlns="http://tempuri.org/ntlBusiness/wsdl/"
      xmlns:typens="http://tempuri.org/ntlBusiness/type/"
      xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns:stk="http://schemas.microsoft.com/soap-toolkit/wsdl-extension"
      xmlns:dime="http://schemas.xmlsoap.org/ws/2002/04/dime/wsdl/"
      xmlns:ref="http://schemas.xmlsoap.org/ws/2002/04/reference/"
      xmlns:content="http://schemas.xmlsoap.org/ws/2002/04/content-type/"
      xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
      xmlns="http://schemas.xmlsoap.org/wsdl/">
      - <types>
      - <schema targetNamespace="http://tempuri.org/ntlBusiness/type/"
      xmlns="http://www.w3.org/2001/XMLSchema"
      xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
      elementFormDefault="qualified">
      <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
      <import namespace="http://schemas.xmlsoap.org/wsdl/" />
      <import namespace="http://schemas.xmlsoap.org/ws
      /2002/04/reference/" />
      <import
      namespace="http://schemas.xmlsoap.org/ws/2002/04/content-type/" />
      </schema>
      </types>
      - <message name="SOAPAPI.CheckAvailability">
      <part name="strPostCode" type="xsd:string" />
      <part name="strPhoneNumber" type="xsd:string" />
      <part name="strAvailability" type="xsd:anyType" />
      <part name="strEnabledDate" type="xsd:anyType" />
      </message>
      - <message name="SOAPAPI.CheckAvailabilityResponse">
      <part name="Result" type="xsd:int" />
      <part name="strPostCode" type="xsd:string" />
      <part name="strPhoneNumber" type="xsd:string" />
      <part name="strAvailability" type="xsd:anyType" />
      <part name="strEnabledDate" type="xsd:anyType" />
      </message>
      - <message name="SOAPAPI.RetrieveSubscriberInformation">
      <part name="strUserName" type="xsd:string" />
      <part name="lngSuNumber" type="xsd:int" />
      </message>
      - <message name="SOAPAPI.RetrieveSubscriberInformationResponse">
      <part name="Result" type="xsd:string" />
      <part name="strUserName" type="xsd:string" />
      <part name="lngSuNumber" type="xsd:int" />
      </message>
      - <message name="SOAPAPI.OrderADSLForExistingSub">
      <part name="lngSuNumber" type="xsd:int" />
      <part name="strCLI" type="xsd:string" />
      <part name="strAltContactNumber" type="xsd:string" />
      <part name="bolUseCurrentPM" type="xsd:boolean" />
      <part name="strPMType" type="xsd:string" />
      <part name="lngCardType" type="xsd:int" />
      <part name="strExpiryDate" type="xsd:string" />
      <part name="strCardNumber" type="xsd:string" />
      <part name="strCardName" type="xsd:string" />
      <part name="strCardAddress" type="xsd:string" />
      <part name="intCardIssueNumber" type="xsd:short" />
      <part name="strDDSortCode" type="xsd:string" />
      <part name="lngDDBankNumber" type="xsd:int" />
      <part name="strDDAccNumber" type="xsd:string" />
      <part name="strDDAccName" type="xsd:string" />
      <part name="strDDBankAddress" type="xsd:string" />
      <part name="strDDBankPostCode" type="xsd:string" />
      <part name="bolPaperMandate" type="xsd:boolean" />
      <part name="intPackageCode" type="xsd:short" />
      <part name="bISDNSwitch" type="xsd:boolean" />
      <part name="strAltEmailAddr" type="xsd:string" />
      <part name="lngReseller" type="xsd:int" />
      </message>
      - <message name="SOAPAPI.OrderADSLForExistingSubResponse">
      <part name="Result" type="xsd:int" />
      <part name="lngSuNumber" type="xsd:int" />
      <part name="strCLI" type="xsd:string" />
      <part name="strAltContactNumber" type="xsd:string" />
      <part name="bolUseCurrentPM" type="xsd:boolean" />
      <part name="strPMType" type="xsd:string" />
      <part name="lngCardType" type="xsd:int" />
      <part name="strExpiryDate" type="xsd:string" />
      <part name="strCardNumber" type="xsd:string" />
      <part name="strCardName" type="xsd:string" />
      <part name="strCardAddress" type="xsd:string" />
      <part name="intCardIssueNumber" type="xsd:short" />
      <part name="strDDSortCode" type="xsd:string" />
      <part name="lngDDBankNumber" type="xsd:int" />
      <part name="strDDAccNumber" type="xsd:string" />
      <part name="strDDAccName" type="xsd:string" />
      <part name="strDDBankAddress" type="xsd:string" />
      <part name="strDDBankPostCode" type="xsd:string" />
      <part name="bolPaperMandate" type="xsd:boolean" />
      <part name="intPackageCode" type="xsd:short" />
      <part name="bISDNSwitch" type="xsd:boolean" />
      <part name="strAltEmailAddr" type="xsd:string" />
      <part name="lngReseller" type="xsd:int" />
      </message>
      - <message name="SOAPAPI.ArrearsCheck">
      <part name="lngSuNumber" type="xsd:int" />
      <part name="strErrorDescription" type="xsd:anyType" />
      </message>
      - <message name="SOAPAPI.ArrearsCheckResponse">
      <part name="Result" type="xsd:int" />
      <part name="lngSuNumber" type="xsd:int" />
      <part name="strErrorDescription" type="xsd:anyType" />
      </message>
      - <portType name="SOAPAPISoapPort">
      - <operation name="CheckAvailability" parameterOrder="strPostCode
      strPhoneNumber strAvailability strEnabledDate">
      <input message="wsdlns:SOAPAPI.CheckAvailability" />
      <output message="wsdlns:SOAPAPI.CheckAvailabilityResponse" />
      </operation>
      - <operation name="RetrieveSubscriberInformation"
      parameterOrder="strUserName lngSuNumber">
      <input message="wsdlns:SOAPAPI.RetrieveSubscriberInformation" />
      <output
      message="wsdlns:SOAPAPI.RetrieveSubscriberInformationResponse" />
      </operation>
      - <operation name="OrderADSLForExistingSub"
      parameterOrder="lngSuNumber strCLI strAltContactNumber bolUseCurrentPM
      strPMType lngCardType strExpiryDate strCardNumber strCardName
      strCardAddress intCardIssueNumber strDDSortCode lngDDBankNumber
      strDDAccNumber strDDAccName strDDBankAddress strDDBankPostCode
      bolPaperMandate intPackageCode bISDNSwitch strAltEmailAddr
      lngReseller">
      <input message="wsdlns:SOAPAPI.OrderADSLForExistingSub" />
      <output message="wsdlns:SOAPAPI.OrderADSLForExistingSubResponse" />
      </operation>
      - <operation name="ArrearsCheck" parameterOrder="lngSuNumber
      strErrorDescription">
      <input message="wsdlns:SOAPAPI.ArrearsCheck" />
      <output message="wsdlns:SOAPAPI.ArrearsCheckResponse" />
      </operation>
      </portType>
      - <binding name="SOAPAPISoapBinding" type="wsdlns:SOAPAPISoapPort">
      <stk:binding preferredEncoding="UTF-8" />
      <soap:binding style="rpc"
      transport="http://schemas.xmlsoap.org/soap/http" />
      - <operation name="CheckAvailability">
      <soap:operation
      soapAction="http://tempuri.org/ntlBusiness/action/
      SOAPAPI.CheckAvailability"
      />
      - <input>
      <soap:body use="encoded"
      namespace="http://tempuri.org/ntlBusiness/message/"
      encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      parts="strPostCode strPhoneNumber strAvailability strEnabledDate" />
      </input>
      - <output>
      <soap:body use="encoded"
      namespace="http://tempuri.org/ntlBusiness/message/"
      encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      parts="Result strPostCode strPhoneNumber strAvailability
      strEnabledDate" />
      </output>
      </operation>
      - <operation name="RetrieveSubscriberInformation">
      <soap:operation
      soapAction="http://tempuri.org/ntlBusiness/action/
      SOAPAPI.RetrieveSubscriberInformation"
      />
      - <input>
      <soap:body use="encoded"
      namespace="http://tempuri.org/ntlBusiness/message/"
      encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      parts="strUserName lngSuNumber" />
      </input>
      - <output>
      <soap:body use="encoded"
      namespace="http://tempuri.org/ntlBusiness/message/"
      encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      parts="Result strUserName lngSuNumber" />
      </output>
      </operation>
      - <operation name="OrderADSLForExistingSub">
      <soap:operation
      soapAction="http://tempuri.org/ntlBusiness/action/
      SOAPAPI.OrderADSLForExistingSub"
      />
      - <input>
      <soap:body use="encoded"
      namespace="http://tempuri.org/ntlBusiness/message/"
      encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      parts="lngSuNumber strCLI strAltContactNumber bolUseCurrentPM
      strPMType lngCardType strExpiryDate strCardNumber strCardName
      strCardAddress intCardIssueNumber strDDSortCode lngDDBankNumber
      strDDAccNumber strDDAccName strDDBankAddress strDDBankPostCode
      bolPaperMandate intPackageCode bISDNSwitch strAltEmailAddr
      lngReseller" />
      </input>
      - <output>
      <soap:body use="encoded"
      namespace="http://tempuri.org/ntlBusiness/message/"
      encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      parts="Result lngSuNumber strCLI strAltContactNumber bolUseCurrentPM
      strPMType lngCardType strExpiryDate strCardNumber strCardName
      strCardAddress intCardIssueNumber strDDSortCode lngDDBankNumber
      strDDAccNumber strDDAccName strDDBankAddress strDDBankPostCode
      bolPaperMandate intPackageCode bISDNSwitch strAltEmailAddr
      lngReseller" />
      </output>
      </operation>
      - <operation name="ArrearsCheck">
      <soap:operation
      soapAction="http://tempuri.org/ntlBusiness/action/
      SOAPAPI.ArrearsCheck"
      />
      - <input>
      <soap:body use="encoded"
      namespace="http://tempuri.org/ntlBusiness/message/"
      encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      parts="lngSuNumber strErrorDescription" />
      </input>
      - <output>
      <soap:body use="encoded"
      namespace="http://tempuri.org/ntlBusiness/message/"
      encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      parts="Result lngSuNumber strErrorDescription" />
      </output>
      </operation>
      </binding>
      - <service name="ntlBusiness">
      - <port name="SOAPAPISoapPort" binding="wsdlns:SOAPAPISoapBinding">
      <soap:address
      location="http://IP ADDRESS/webservices/ntlBusiness.WSDL" />
      </port>
      </service>
      </definitions>

      --
      Michael Brader michael.brader@...
      Senior Software Developer (Unix) ntl:ipd
      Hook 01256 75(3413)
    • Show all 4 messages in this topic