cancel
Showing results for 
Search instead for 
Did you mean: 

Issue Web service consumption in ABAP - unexpected node '#text' within node

Former Member
0 Kudos

Hi All,

I'm trying to consume a .net web service in ABAP. I get an error in before the proxy creation.

I validated the XML schema but found no errors. I checked if it has some XML elements unsupported in my NW version but I dont see anything there.

The error description is too vague to understand. There is no node #text in the WSDL.

I didnt find anything on sdn, service.sap that helps.

Error:

Exception occurred in Library Handler

Error:

Invalid Schema: unexpected node '#text' within node 'complexType'

Message no. SPRX189

Version:

SAP_ABA 700 0018 SAPKA70018

SAP_BASIS 700 0018 SAPKB70018

Thank you,

Vasu

Edited by: Sri on Aug 27, 2010 7:20 PM

Accepted Solutions (1)

Accepted Solutions (1)

stefan_grube
Active Contributor
0 Kudos

In the XSD there is a complex type, but in XML is a document,

so expected: <a><b>...</b></a>

found. <a>text</a>

Former Member
0 Kudos

Hi Stefan,

But there is not #text node in the WSDL.

And when I directly use the WSDL URL, I get another error.

Exception in Library Handler error

Do you know why this error occurs.

Where can I check the detailed error message for these kind of errors?

Appreciate your help.

Thank you,

Vasu

stefan_grube
Active Contributor
0 Kudos

>

> In the XSD there is a complex type, but in XML is a document,

>

 so expected: <a><b>...</b></a>
 found. <a>element<b>....</b></a>

Edited by: Stefan Grube on Aug 27, 2010 8:11 PM

Answers (3)

Answers (3)

Former Member
0 Kudos

WSDL doc is attached in the link for reference

<?xml version="1.0" encoding="UTF-8" ?>]- <wsdl:definitions targetNamespace="urn:ec.europa.eu:taxud:vies:services:checkVat" xmlns:tns1="urn:ec.europa.eu:taxud:vies:services:checkVat:types" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:impl="urn:ec.europa.eu:taxud:vies:services:checkVat" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/">- <wsdl:types>- <xsd:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="urn:ec.europa.eu:taxud:vies:services:checkVat:types" xmlns="urn:ec.europa.eu:taxud:vies:services:checkVat:types">- <xsd:element name="checkVat">- <xsd:complexType>- <xsd:sequence> <xsd:element name="countryCode" type="xsd:string" /> <xsd:element name="vatNumber" type="xsd:string" /> </xsd:sequence> </xsd:complexType> </xsd:element>- <xsd:element name="checkVatResponse">- <xsd:complexType>- <xsd:sequence> <xsd:element name="countryCode" type="xsd:string" /> <xsd:element name="vatNumber" type="xsd:string" /> <xsd:element name="requestDate" type="xsd:date" /> <xsd:element name="valid" type="xsd:boolean" /> <xsd:element maxOccurs="1" minOccurs="0" name="name" nillable="true" type="xsd:string" /> <xsd:element maxOccurs="1" minOccurs="0" name="address" nillable="true" type="xsd:string" /> </xsd:sequence> </xsd:complexType> </xsd:element>- <xsd:element name="checkVatApprox">- <xsd:complexType>- <xsd:sequence> <xsd:element name="countryCode" type="xsd:string" /> <xsd:element name="vatNumber" type="xsd:string" /> <xsd:element maxOccurs="1" minOccurs="0" name="traderName" type="xsd:string" /> <xsd:element maxOccurs="1" minOccurs="0" name="traderCompanyType" type="tns1:companyTypeCode" /> <xsd:element maxOccurs="1" minOccurs="0" name="traderStreet" type="xsd:string" /> <xsd:element maxOccurs="1" minOccurs="0" name="traderPostcode" type="xsd:string" /> <xsd:element maxOccurs="1" minOccurs="0" name="traderCity" type="xsd:string" /> <xsd:element maxOccurs="1" minOccurs="0" name="requesterCountryCode" type="xsd:string" /> <xsd:element maxOccurs="1" minOccurs="0" name="requesterVatNumber" type="xsd:string" /> </xsd:sequence> </xsd:complexType> </xsd:element>- <xsd:element name="checkVatApproxResponse">- <xsd:complexType>- <xsd:sequence> <xsd:element name="countryCode" type="xsd:string" /> <xsd:element name="vatNumber" type="xsd:string" /> <xsd:element name="requestDate" type="xsd:date" /> <xsd:element name="valid" type="xsd:boolean" /> <xsd:element maxOccurs="1" minOccurs="0" name="traderName" nillable="true" type="xsd:string" /> <xsd:element maxOccurs="1" minOccurs="0" name="traderCompanyType" nillable="true" type="tns1:companyTypeCode" /> <xsd:element maxOccurs="1" minOccurs="0" name="traderAddress" nillable="true" type="xsd:string" /> <xsd:element maxOccurs="1" minOccurs="0" name="traderStreet" nillable="true" type="xsd:string" /> <xsd:element maxOccurs="1" minOccurs="0" name="traderPostcode" nillable="true" type="xsd:string" /> <xsd:element maxOccurs="1" minOccurs="0" name="traderCity" type="xsd:string" /> <xsd:element maxOccurs="1" minOccurs="0" name="traderNameMatch" type="tns1:matchCode" /> <xsd:element maxOccurs="1" minOccurs="0" name="traderCompanyTypeMatch" type="tns1:matchCode" /> <xsd:element maxOccurs="1" minOccurs="0" name="traderStreetMatch" type="tns1:matchCode" /> <xsd:element maxOccurs="1" minOccurs="0" name="traderPostcodeMatch" type="tns1:matchCode" /> <xsd:element maxOccurs="1" minOccurs="0" name="traderCityMatch" type="tns1:matchCode" /> <xsd:element name="requestIdentifier" type="xsd:string" /> </xsd:sequence> </xsd:complexType> </xsd:element>- <xsd:simpleType name="companyTypeCode">- <xsd:restriction base="xsd:string"> <xsd:pattern value="[A-Z]\-[1-9][0-9]?" /> </xsd:restriction> </xsd:simpleType>- <xsd:simpleType name="matchCode">- <xsd:restriction base="xsd:string">- <xsd:enumeration value="1">- <xsd:annotation> <xsd:documentation>VALID</xsd:documentation> </xsd:annotation> </xsd:enumeration>- <xsd:enumeration value="2">- <xsd:annotation> <xsd:documentation>INVALID</xsd:documentation> </xsd:annotation> </xsd:enumeration> </xsd:restriction> </xsd:simpleType> </xsd:schema> </wsdl:types>- <wsdl:message name="checkVatRequest"> <wsdl:part name="parameters" element="tns1:checkVat" /> </wsdl:message>- <wsdl:message name="checkVatApproxResponse"> <wsdl:part name="parameters" element="tns1:checkVatApproxResponse" /> </wsdl:message>- <wsdl:message name="checkVatApproxRequest"> <wsdl:part name="parameters" element="tns1:checkVatApprox" /> </wsdl:message>- <wsdl:message name="checkVatResponse"> <wsdl:part name="parameters" element="tns1:checkVatResponse" /> </wsdl:message>- <wsdl:portType name="checkVatPortType">- <wsdl:operation name="checkVat"> <wsdl:input name="checkVatRequest" message="impl:checkVatRequest" /> <wsdl:output name="checkVatResponse" message="impl:checkVatResponse" /> </wsdl:operation>- <wsdl:operation name="checkVatApprox"> <wsdl:input name="checkVatApproxRequest" message="impl:checkVatApproxRequest" /> <wsdl:output name="checkVatApproxResponse" message="impl:checkVatApproxResponse" /> </wsdl:operation> </wsdl:portType>- <wsdl:service name="checkVatService">- <wsdl:port name="checkVatPort"> <wsdlsoap:address location="http://ec.europa.eu/taxation_customs/vies/services/checkVatService" /> </wsdl:port> </wsdl:service> </wsdl:definitions> }|http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl]

Former Member
0 Kudos

Hello all

Having similar error , when creating Proxy for service consumer. After following steps from Sri's findings ,deleting HTTP binding from WSDL doc , still get the same error . Appreciate any help on this

*Invalid Schema: unexpected node '#text' within node 'complexType'*

ECC Version

SAP_ABA 701 0003 SAPKA70103 Cross-Application Component

SAP_BASIS 701 0003 SAPKB70103 SAP Basis Component

Also attaching WSDL after deleting binding for reference

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

- <wsdl:definitions targetNamespace="urn:ec.europa.eu:taxud:vies:services:checkVat" xmlns:tns1="urn:ec.europa.eu:taxud:vies:services:checkVat:types" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:impl="urn:ec.europa.eu:taxud:vies:services:checkVat" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/">

- <wsdl:types>

- <xsd:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="urn:ec.europa.eu:taxud:vies:services:checkVat:types" xmlns="urn:ec.europa.eu:taxud:vies:services:checkVat:types">

- <xsd:element name="checkVat">

- <xsd:complexType>

- <xsd:sequence>

<xsd:element name="countryCode" type="xsd:string" />

<xsd:element name="vatNumber" type="xsd:string" />

</xsd:sequence>

</xsd:complexType>

</xsd:element>

- <xsd:element name="checkVatResponse">

- <xsd:complexType>

- <xsd:sequence>

<xsd:element name="countryCode" type="xsd:string" />

<xsd:element name="vatNumber" type="xsd:string" />

<xsd:element name="requestDate" type="xsd:date" />

<xsd:element name="valid" type="xsd:boolean" />

<xsd:element maxOccurs="1" minOccurs="0" name="name" nillable="true" type="xsd:string" />

<xsd:element maxOccurs="1" minOccurs="0" name="address" nillable="true" type="xsd:string" />

</xsd:sequence>

</xsd:complexType>

</xsd:element>

- <xsd:element name="checkVatApprox">

- <xsd:complexType>

- <xsd:sequence>

<xsd:element name="countryCode" type="xsd:string" />

<xsd:element name="vatNumber" type="xsd:string" />

<xsd:element maxOccurs="1" minOccurs="0" name="traderName" type="xsd:string" />

<xsd:element maxOccurs="1" minOccurs="0" name="traderCompanyType" type="tns1:companyTypeCode" />

<xsd:element maxOccurs="1" minOccurs="0" name="traderStreet" type="xsd:string" />

<xsd:element maxOccurs="1" minOccurs="0" name="traderPostcode" type="xsd:string" />

<xsd:element maxOccurs="1" minOccurs="0" name="traderCity" type="xsd:string" />

<xsd:element maxOccurs="1" minOccurs="0" name="requesterCountryCode" type="xsd:string" />

<xsd:element maxOccurs="1" minOccurs="0" name="requesterVatNumber" type="xsd:string" />

</xsd:sequence>

</xsd:complexType>

</xsd:element>

- <xsd:element name="checkVatApproxResponse">

- <xsd:complexType>

- <xsd:sequence>

<xsd:element name="countryCode" type="xsd:string" />

<xsd:element name="vatNumber" type="xsd:string" />

<xsd:element name="requestDate" type="xsd:date" />

<xsd:element name="valid" type="xsd:boolean" />

<xsd:element maxOccurs="1" minOccurs="0" name="traderName" nillable="true" type="xsd:string" />

<xsd:element maxOccurs="1" minOccurs="0" name="traderCompanyType" nillable="true" type="tns1:companyTypeCode" />

<xsd:element maxOccurs="1" minOccurs="0" name="traderAddress" nillable="true" type="xsd:string" />

<xsd:element maxOccurs="1" minOccurs="0" name="traderStreet" nillable="true" type="xsd:string" />

<xsd:element maxOccurs="1" minOccurs="0" name="traderPostcode" nillable="true" type="xsd:string" />

<xsd:element maxOccurs="1" minOccurs="0" name="traderCity" type="xsd:string" />

<xsd:element maxOccurs="1" minOccurs="0" name="traderNameMatch" type="tns1:matchCode" />

<xsd:element maxOccurs="1" minOccurs="0" name="traderCompanyTypeMatch" type="tns1:matchCode" />

<xsd:element maxOccurs="1" minOccurs="0" name="traderStreetMatch" type="tns1:matchCode" />

<xsd:element maxOccurs="1" minOccurs="0" name="traderPostcodeMatch" type="tns1:matchCode" />

<xsd:element maxOccurs="1" minOccurs="0" name="traderCityMatch" type="tns1:matchCode" />

<xsd:element name="requestIdentifier" type="xsd:string" />

</xsd:sequence>

</xsd:complexType>

</xsd:element>

- <xsd:simpleType name="companyTypeCode">

- <xsd:restriction base="xsd:string">

<xsd:pattern value="[A-Z]\-[1-9][0-9]?" />

</xsd:restriction>

</xsd:simpleType>

- <xsd:simpleType name="matchCode">

- <xsd:restriction base="xsd:string">

- <xsd:enumeration value="1">

- <xsd:annotation>

<xsd:documentation>VALID</xsd:documentation>

</xsd:annotation>

</xsd:enumeration>

- <xsd:enumeration value="2">

- <xsd:annotation>

<xsd:documentation>INVALID</xsd:documentation>

</xsd:annotation>

</xsd:enumeration>

</xsd:restriction>

</xsd:simpleType>

</xsd:schema>

</wsdl:types>

- <wsdl:message name="checkVatRequest">

<wsdl:part name="parameters" element="tns1:checkVat" />

</wsdl:message>

- <wsdl:message name="checkVatApproxResponse">

<wsdl:part name="parameters" element="tns1:checkVatApproxResponse" />

</wsdl:message>

- <wsdl:message name="checkVatApproxRequest">

<wsdl:part name="parameters" element="tns1:checkVatApprox" />

</wsdl:message>

- <wsdl:message name="checkVatResponse">

<wsdl:part name="parameters" element="tns1:checkVatResponse" />

</wsdl:message>

- <wsdl:portType name="checkVatPortType">

- <wsdl:operation name="checkVat">

<wsdl:input name="checkVatRequest" message="impl:checkVatRequest" />

<wsdl:output name="checkVatResponse" message="impl:checkVatResponse" />

</wsdl:operation>

- <wsdl:operation name="checkVatApprox">

<wsdl:input name="checkVatApproxRequest" message="impl:checkVatApproxRequest" />

<wsdl:output name="checkVatApproxResponse" message="impl:checkVatApproxResponse" />

</wsdl:operation>

</wsdl:portType>

- <wsdl:service name="checkVatService">

- <wsdl:port name="checkVatPort">

<wsdlsoap:address location="http://ec.europa.eu/taxation_customs/vies/services/checkVatService" />

</wsdl:port>

</wsdl:service>

</wsdl:definitions>

i827647
Product and Topic Expert
Product and Topic Expert
0 Kudos

Do you check if this WSDL is ok using other tools like XMPSpy or SOAPUI???

Regards,

Edson Thomaz

Former Member
0 Kudos

Yes I did. THere is no problem with that.

The problem was with the http bindings which ABAP cannot process.

I used Note 1403271 and removed all http bindings and it worked.

Thanks,

Sri

Edited by: Sri on Aug 27, 2010 9:41 PM

i827647
Product and Topic Expert
Product and Topic Expert
0 Kudos

Ok, this would be my suggestion. I had this problem with the webservices http://www.webservicex.net.

Congratulations.

Edson Thomaz

Edited by: Edson Thomaz on Aug 27, 2010 5:17 PM

i827647
Product and Topic Expert
Product and Topic Expert
0 Kudos

Ok, this would be my suggestion. I had this problem with the webservices http://www.webservicex.net.

Congratulations.

Edson Thomaz