Skip to Content
0
Former Member
Aug 31, 2010 at 08:36 AM

Using Web service with complex data types

206 Views

Hi All,

I have to access a SAP web service consuming a complex data type. Iu2019m using VBA in MS-Office.

Calling a web service with a simple type like String or long is not a problem. But I have to send a NodeList (MSXML2.IXMLDOMNodeList) to the service.

Here are the relevant parts out of the wsdl file:

<xsd:element name="SEARCH"><xsd:complexType><xsd:sequence>
<xsd:element name="CT_EQART_RANGE" type="tns:ZS_EQART_RANGE" minOccurs="0"></xsd:element>
</xsd:sequence>
...
<xsd:complexType name="ZS_EQART_RANGE">
	<xsd:sequence>
	  <xsd:element name="item" type="tns:ZS_EQART_RANGE_LINE" minOccurs="0" maxOccurs="unbounded"></xsd:element>
</xsd:sequence>
...
<xsd:complexType name="ZS_EQART_RANGE_LINE">
	<xsd:sequence>
		<xsd:element name="SIGN" type="tns:char1"></xsd:element>
		<xsd:element name="OPTION" type="tns:char2"></xsd:element>
</xsd:sequence>

Therefore I build a nodelist with one node containing following:

<CT_EQART_RANGE><item><SIGN>F</SIGN><OPTION>TT</OPTION></item></CT_EQART_RANGE>

When I call the service with this parameter I receive following error:

Client:Fehler bei der Typumwandlung für Element "CT_EQART_RANGE"

Translation: Type conversion error for element "CT_EQART_RANGE"

Please Help

Ron