Skip to Content
author's profile photo Former Member
Former Member

XML Parse problem consuming external webservice

Hi all,

I'm testing consuming an external webservice from a WAS 6.40 client. I generated an ABAP proxy for it .

I managed to get the correct soap request out and receiving the response, but while parsing the SOAP XML response back into the output parameter, I'm running into a parse error :

- <CX_XMS_SYSTEM_ERROR>

<ID>PARSE_APPLICATION_DATA</ID>

<P1>Response Message</P1>

<P2>CX_ST_MATCH_TYPE</P2>

<P3>/1SAI/TXS00000000000000000003</P3>

<P4>XML Bytepos.: 354 XML Path: root(1)ns1:checkValidSerialNumbersResponse(1)checkValidSerialNumbersReturn(1) Error Text: System expected a value for the type g</P4>

<INFO />

<CATEGORY>XIProxy</CATEGORY>

<AREA>ABAP</AREA>

<RETRY>M</RETRY>

</CX_XMS_SYSTEM_ERROR>

- <CX_XMS_SYSERR_PROXY>

<CO_AREA_ABAP>ABAP</CO_AREA_ABAP>

</CX_XMS_SYSERR_PROXY>

</cls:CX_XMS_SYSERR_PROXY>

- <cls:CX_ST_MATCH_TYPE id="o163">

The response parameter is defined as xsd:string ( and string in the generated ABAP structure ).

IF the byteposition is correct there would be a problem

with the '?' characeter being in the response.

What does the datatype 'g' mean ?

see also in the error message :

<ACTUAL_NAMESPACE />

<ACTUAL_VALUE />

</CX_ST_MATCH>

- <CX_ST_MATCH_TYPE>

<EXPECTED_TYPE>g</EXPECTED_TYPE>

</CX_ST_MATCH_TYPE>

Any ideas ? Using 2 other soap clients give no issue what soever...:(

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Mar 09, 2006 at 05:31 PM

    Hi all

    For those who are interested , I solved on my own.

    The datatype 'g' refers to string data type ( see internal codes for ABAP data types ).

    The parse error was generated in the internal simple XSLT transformation : This transformation is again based upon the WSDL file that was used for generating te proxy and although it passed the SAP checks, it was apparently not in a format support by SAP.

    In brief : All types must be defined as complex elements , even if they are as simple as an input string and an output string

    Hope it helps somebody.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      <wsdl:definitions targetNamespace="http://shareTax.DataExchange.NonLiveSchema.Web.Service/">

      u2212

      <wsdl:types>

      u2212

      <s:schema elementFormDefault="qualified" targetNamespace="http://shareTax.DataExchange.NonLiveSchema.Web.Service/">

      u2212

      <s:element name="processInputXML">

      u2212

      <s:complexType>

      u2212

      <s:sequence>

      <s:element minOccurs="0" maxOccurs="1" name="InputXML" type="s:string"/>

      </s:sequence>

      </s:complexType>

      </s:element>

      u2212

      <s:element name="processInputXMLResponse">

      u2212

      <s:complexType>

      u2212

      <s:sequence>

      <s:element minOccurs="0" maxOccurs="1" name="processInputXMLResult" type="s:string"/>

      </s:sequence>

      </s:complexType>

      </s:element>

      </s:schema>

      </wsdl:types>

      u2212

      <wsdl:message name="processInputXMLSoapIn">

      <wsdl:part name="parameters" element="tns:processInputXML"/>

      </wsdl:message>

      u2212

      <wsdl:message name="processInputXMLSoapOut">

      <wsdl:part name="parameters" element="tns:processInputXMLResponse"/>

      </wsdl:message>

      u2212

      <wsdl:portType name="NonLiveSchemaSoap">

      u2212

      <wsdl:operation name="processInputXML">

      <wsdl:input message="tns:processInputXMLSoapIn"/>

      <wsdl:output message="tns:processInputXMLSoapOut"/>

      </wsdl:operation>

      </wsdl:portType>

      u2212

      <wsdl:binding name="NonLiveSchemaSoap" type="tns:NonLiveSchemaSoap">

      http://schemas.xmlsoap.org/soap/http"/>

      u2212

      <wsdl:operation name="processInputXML">

      <soap:operation soapAction="http://shareTax.DataExchange.NonLiveSchema.Web.Service/processInputXML" style="document"/>

      u2212

      <wsdl:input>

      <soap:body use="literal"/>

      </wsdl:input>

      u2212

      <wsdl:output>

      <soap:body use="literal"/>

      </wsdl:output>

      </wsdl:operation>

      </wsdl:binding>

      u2212

      <wsdl:binding name="NonLiveSchemaSoap12" type="tns:NonLiveSchemaSoap">

      http://schemas.xmlsoap.org/soap/http"/>

      u2212

      <wsdl:operation name="processInputXML">

      <soap12:operation soapAction="http://shareTax.DataExchange.NonLiveSchema.Web.Service/processInputXML" style="document"/>

      u2212

      <wsdl:input>

      <soap12:body use="literal"/>

      </wsdl:input>

      u2212

      <wsdl:output>

      <soap12:body use="literal"/>

      </wsdl:output>

      </wsdl:operation>

      </wsdl:binding>

      u2212

      <wsdl:service name="NonLiveSchema">

      u2212

      <wsdl:port name="NonLiveSchemaSoap" binding="tns:NonLiveSchemaSoap">

      <soap:address location="http://89.234.8.200:8085/shareTaxDataExchangeWebService/NonLiveSchema.asmx"/>

      </wsdl:port>

      u2212

      <wsdl:port name="NonLiveSchemaSoap12" binding="tns:NonLiveSchemaSoap12">

      <soap12:address location="http://89.234.8.200:8085/shareTaxDataExchangeWebService/NonLiveSchema.asmx"/>

      </wsdl:port>

      </wsdl:service>

      </wsdl:definitions>

      I am facing same problem.

      This is WSDL. Could you please tell if anything is wrong in WSDL?

      I am not aware of WSDL files.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.