Hi guys,
I want to use a MII-transaction via WSDLGen in the SAP PCo. I created an Input-XML-value with the help of a xsd-file. When I tested the transaction with SoapUI it works fine but when I want to load the project into the SAP PCo I get the error message “There are more root elements. Line 1, position 2.” Maybe you can find my mistake?!
XML-Input:
<?XML version="1.0" encoding="UTF-8" standalone="no"?>
<zelt:Row xmlns:zelt="zelt">
<Test/>
</zelt:Row>
XSD-file:
<xs:schema xmlns:xs=http://www.w3.org/2001/XMLSchema targetNamespace="zelt">
<xs:element name="Row">
<xs:complexType>
<xs:sequence>
<xs:element type="xs:string" name="Test"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
WSDL:
<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"xmlns:mii0="zelt" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:s0="http://www.sap.com/xMII" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" targetNamespace="http://www.sap.com/xMII">
<!--
Types
-->
<types>
<s:schema elementFormDefault="qualified" targetNamespace="http://www.sap.com/xMII">
<s:importnamespace="zelt" schemaLocation="http://<serverID>:<port>/XMII/WSDLGen/db/<url_to_xsd>/xmlInput.xsd"/>
<s:complexType name="InputParams">
<s:sequence id="InputSequence">
<s:element maxOccurs="1" minOccurs="0" name="xmlInput">
<s:complexType>
<s:sequence>
<s:elementref="mii0:Row"/>
</s:sequence>
</s:complexType>
</s:element>
</s:sequence>
</s:complexType>
<s:element name="XacuteRequest">
<s:complexType>
<s:sequence>
<s:elementmaxOccurs="1" minOccurs="0" name="LoginName" type="s:string" />
<s:elementmaxOccurs="1" minOccurs="0" name="LoginPassword" type="s:string" />
<s:elementmaxOccurs="1" minOccurs="0" name="InputParams" type="s0:InputParams" />
</s:sequence>
</s:complexType>
</s:element>
<s:complexType name="Rowset">
<s:sequence>
<s:elementmaxOccurs="unbounded" minOccurs="0" name="Row" type="s0:Row" />
</s:sequence>
<s:attributename="Message" type="s:string" />
</s:complexType>
<s:complexType name="Row">
<s:sequence id="RowSequence">
<s:anymaxOccurs="132" minOccurs="1" type="s:string" />
</s:sequence>
</s:complexType>
<s:element name="XacuteResponse">
<s:complexType>
<s:sequence>
<s:elementmaxOccurs="1" minOccurs="0" name="Rowset" type="s0:Rowset" />
</s:sequence>
</s:complexType>
</s:element>
</s:schema>
</types>
<!--
Messages
-->
<message name="XacuteSoapIn">
<partelement="s0:XacuteRequest" name="parameters" />
</message>
<message name="XacuteSoapOut">
<partelement="s0:XacuteResponse" name="parameters" />
</message>
<!--
Ports
-->
<portType name="XacuteWSSoap">
<operation name="Xacute">
<inputmessage="s0:XacuteSoapIn"/>
<outputmessage="s0:XacuteSoapOut"/>
</operation>
</portType>
<!--
Bindings
-->
<binding name="XacuteWSSoap" type="s0:XacuteWSSoap">
<soap:bindingstyle="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="Xacute">
<soap:operationsoapAction="http://www.sap.com/xMII" style="document" />
<input>
<soap:bodyuse="literal"/>
</input>
<output>
<soap:bodyuse="literal"/>
</output>
</operation>
</binding>
<!--
Service mapping
-->
<service name="XacuteWS">
<port binding="s0:XacuteWSSoap" name="XacuteWSSoap">
<soap:addresslocation="http://<serverID>:<port>/XMII/SOAPRunner/<url_to_transaction>/testTransaction"/>
</port>
</service>
</definitions>
Thanks,
Matthias