cancel
Showing results for 
Search instead for 
Did you mean: 

web service code generation error - WSDL contains element with name: Return

Former Member
0 Kudos

Hi,

I have a big problem with the automatic code generation for a web service. I generate code for a Web Dynpro model.

The WSDL contains an element that is called "return"

WSDL-code:


<xsd:element name="Return" type="tns:Bapireturn1"/>

now the generated Java code looks something like this:


private com.mycompany.employee.model.p1.ComplexType_Bapireturn1 return;

Of course this generates an error while compiling the code.

But how can I solve the problem? Generating the WSDL in a different way?

The WSDL is generated at a mySAP ERP 2004 system. I generated a web service for an existing BAPI.

Any ideas?

Thanks a lot.

Henning

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Henning ,

Please rename the object in the backend->Regenerate the WSDL and reimport it in webDynpro.

Regards, Anilkumar

Former Member
0 Kudos

Hi Anilkumar,

sorry for the question. But how can I rename it. This is nothing I programmed or customized myself on the SAP backend side. Everything is direct from the out of the box SAP installation.

The used business object is: ADDRESSEMP

--> = EmployeePrivAddress

the whole WSDL if needed:


<wsdl:definitions targetNamespace="urn:sap-com:document:sap:soap:functions:mc-style">
&#8722;
	<wsdl:types>
&#8722;
	<xsd:schema targetNamespace="urn:sap-com:document:sap:rfc:functions" elementFormDefault="unqualified" attributeFormDefault="qualified">
&#8722;
	<xsd:simpleType name="char1">
&#8722;
	<xsd:restriction base="xsd:string">
<xsd:maxLength value="1"/>
</xsd:restriction>
</xsd:simpleType>
&#8722;
	<xsd:simpleType name="char10">
&#8722;
	<xsd:restriction base="xsd:string">
<xsd:maxLength value="10"/>
</xsd:restriction>
</xsd:simpleType>
&#8722;
	<xsd:simpleType name="char14">
&#8722;
	<xsd:restriction base="xsd:string">
<xsd:maxLength value="14"/>
</xsd:restriction>
</xsd:simpleType>
&#8722;
	<xsd:simpleType name="char15">
&#8722;
	<xsd:restriction base="xsd:string">
<xsd:maxLength value="15"/>
</xsd:restriction>
</xsd:simpleType>
&#8722;
	<xsd:simpleType name="char2">
&#8722;
	<xsd:restriction base="xsd:string">
<xsd:maxLength value="2"/>
</xsd:restriction>
</xsd:simpleType>
&#8722;
	<xsd:simpleType name="char20">
&#8722;
	<xsd:restriction base="xsd:string">
<xsd:maxLength value="20"/>
</xsd:restriction>
</xsd:simpleType>
&#8722;
	<xsd:simpleType name="char220">
&#8722;
	<xsd:restriction base="xsd:string">
<xsd:maxLength value="220"/>
</xsd:restriction>
</xsd:simpleType>
&#8722;
	<xsd:simpleType name="char3">
&#8722;
	<xsd:restriction base="xsd:string">
<xsd:maxLength value="3"/>
</xsd:restriction>
</xsd:simpleType>
&#8722;
	<xsd:simpleType name="char4">
&#8722;
	<xsd:restriction base="xsd:string">
<xsd:maxLength value="4"/>
</xsd:restriction>
</xsd:simpleType>
&#8722;
	<xsd:simpleType name="char40">
&#8722;
	<xsd:restriction base="xsd:string">
<xsd:maxLength value="40"/>
</xsd:restriction>
</xsd:simpleType>
&#8722;
	<xsd:simpleType name="char50">
&#8722;
	<xsd:restriction base="xsd:string">
<xsd:maxLength value="50"/>
</xsd:restriction>
</xsd:simpleType>
&#8722;
	<xsd:simpleType name="char60">
&#8722;
	<xsd:restriction base="xsd:string">
<xsd:maxLength value="60"/>
</xsd:restriction>
</xsd:simpleType>
&#8722;
	<xsd:simpleType name="date">
&#8722;
	<xsd:restriction base="xsd:string">
<xsd:maxLength value="10"/>
<xsd:pattern value="dddd-dd-dd"/>
</xsd:restriction>
</xsd:simpleType>
&#8722;
	<xsd:simpleType name="numeric3">
&#8722;
	<xsd:restriction base="xsd:string">
<xsd:maxLength value="3"/>
<xsd:pattern value="d*"/>
</xsd:restriction>
</xsd:simpleType>
&#8722;
	<xsd:simpleType name="numeric6">
&#8722;
	<xsd:restriction base="xsd:string">
<xsd:maxLength value="6"/>
<xsd:pattern value="d*"/>
</xsd:restriction>
</xsd:simpleType>
&#8722;
	<xsd:simpleType name="numeric8">
&#8722;
	<xsd:restriction base="xsd:string">
<xsd:maxLength value="8"/>
<xsd:pattern value="d*"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:schema>
&#8722;
	<xsd:schema targetNamespace="urn:sap-com:document:sap:soap:functions:mc-style" elementFormDefault="unqualified" attributeFormDefault="qualified">
<xsd:import namespace="urn:sap-com:document:sap:rfc:functions"/>
&#8722;
	<xsd:complexType name="Bapip0006l">
&#8722;
	<xsd:sequence>
<xsd:element name="Employeeno" type="n0:numeric8"/>
<xsd:element name="Subtype" type="n0:char4"/>
<xsd:element name="Objectid" type="n0:char2"/>
<xsd:element name="Lockindic" type="n0:char1"/>
<xsd:element name="Validend" type="n0:date"/>
<xsd:element name="Validbegin" type="n0:date"/>
<xsd:element name="Recordnr" type="n0:numeric3"/>
<xsd:element name="Addresstype" type="n0:char4"/>
<xsd:element name="Nameofaddresstype" type="n0:char40"/>
<xsd:element name="Coname" type="n0:char40"/>
<xsd:element name="Streetandhouseno" type="n0:char60"/>
<xsd:element name="Scndaddressline" type="n0:char40"/>
<xsd:element name="City" type="n0:char40"/>
<xsd:element name="District" type="n0:char40"/>
<xsd:element name="Postalcodecity" type="n0:char10"/>
<xsd:element name="State" type="n0:char3"/>
<xsd:element name="Nameofstate" type="n0:char20"/>
<xsd:element name="Country" type="n0:char3"/>
<xsd:element name="Nameofcountry" type="n0:char15"/>
<xsd:element name="Telephonenumber" type="n0:char14"/>
</xsd:sequence>
</xsd:complexType>
&#8722;
	<xsd:complexType name="Bapireturn1">
&#8722;
	<xsd:sequence>
<xsd:element name="Type" type="n0:char1"/>
<xsd:element name="Id" type="n0:char20"/>
<xsd:element name="Number" type="n0:numeric3"/>
<xsd:element name="Message" type="n0:char220"/>
<xsd:element name="Logno" type="n0:char20"/>
<xsd:element name="Logmsgno" type="n0:numeric6"/>
<xsd:element name="Messagev1" type="n0:char50"/>
<xsd:element name="Messagev2" type="n0:char50"/>
<xsd:element name="Messagev3" type="n0:char50"/>
<xsd:element name="Messagev4" type="n0:char50"/>
</xsd:sequence>
</xsd:complexType>
&#8722;
	<xsd:complexType name="Bapipakey">
&#8722;
	<xsd:sequence>
<xsd:element name="Employeeno" type="n0:numeric8"/>
<xsd:element name="Subtype" type="n0:char4"/>
<xsd:element name="Objectid" type="n0:char2"/>
<xsd:element name="Lockindic" type="n0:char1"/>
<xsd:element name="Validend" type="n0:date"/>
<xsd:element name="Validbegin" type="n0:date"/>
<xsd:element name="Recordnr" type="n0:numeric3"/>
</xsd:sequence>
</xsd:complexType>
&#8722;
	<xsd:complexType name="TableOfbapip0006l">
&#8722;
	<xsd:sequence>
<xsd:element name="item" minOccurs="0" maxOccurs="unbounded" type="tns:Bapip0006l"/>
</xsd:sequence>
</xsd:complexType>
&#8722;
	<xsd:complexType name="TableOfbapipakey">
&#8722;
	<xsd:sequence>
<xsd:element name="item" minOccurs="0" maxOccurs="unbounded" type="tns:Bapipakey"/>
</xsd:sequence>
</xsd:complexType>
&#8722;
	<xsd:element name="EmployeePrivAddressGetdetailedlist">
&#8722;
	<xsd:complexType>
&#8722;
	<xsd:sequence>
<xsd:element name="Address" type="tns:TableOfbapip0006l"/>
<xsd:element name="Employeenumber" type="n0:numeric8"/>
<xsd:element name="Subtype" minOccurs="0" type="n0:char4"/>
<xsd:element name="Timeintervalhigh" minOccurs="0" type="n0:date"/>
<xsd:element name="Timeintervallow" minOccurs="0" type="n0:date"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
&#8722;
	<xsd:element name="EmployeePrivAddressGetdetailedlistRespon">
&#8722;
	<xsd:complexType>
&#8722;
	<xsd:sequence>
<xsd:element name="Address" type="tns:TableOfbapip0006l"/>
<xsd:element name="Return" type="tns:Bapireturn1"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
&#8722;
	<xsd:element name="EmployeePrivAddressGetdetail">
&#8722;
	<xsd:complexType>
&#8722;
	<xsd:sequence>
<xsd:element name="Employeenumber" type="n0:numeric8"/>
<xsd:element name="Lockindicator" type="n0:char1"/>
<xsd:element name="Objectid" type="n0:char2"/>
<xsd:element name="Recordnumber" type="n0:numeric3"/>
<xsd:element name="Subtype" type="n0:char4"/>
<xsd:element name="Validitybegin" type="n0:date"/>
<xsd:element name="Validityend" type="n0:date"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
&#8722;
	<xsd:element name="EmployeePrivAddressGetdetailResponse">
&#8722;
	<xsd:complexType>
&#8722;
	<xsd:sequence>
<xsd:element name="Addresstype" type="n0:char4"/>
<xsd:element name="City" type="n0:char40"/>
<xsd:element name="Coname" type="n0:char40"/>
<xsd:element name="Country" type="n0:char3"/>
<xsd:element name="District" type="n0:char40"/>
<xsd:element name="NameOfAddresstype" type="n0:char40"/>
<xsd:element name="Nameofcountry" type="n0:char15"/>
<xsd:element name="Nameofstate" type="n0:char20"/>
<xsd:element name="Postalcodecity" type="n0:char10"/>
<xsd:element name="Return" type="tns:Bapireturn1"/>
<xsd:element name="Scndaddressline" type="n0:char40"/>
<xsd:element name="State" type="n0:char3"/>
<xsd:element name="Streetandhouseno" type="n0:char60"/>
<xsd:element name="Telephonenumber" type="n0:char14"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
&#8722;
	<xsd:element name="EmployeePrivAddressGetlist">
&#8722;
	<xsd:complexType>
&#8722;
	<xsd:sequence>
<xsd:element name="Addressempkey" type="tns:TableOfbapipakey"/>
<xsd:element name="Employeenumber" type="n0:numeric8"/>
<xsd:element name="Subtype" minOccurs="0" type="n0:char4"/>
<xsd:element name="Timeintervalhigh" minOccurs="0" type="n0:date"/>
<xsd:element name="Timeintervallow" minOccurs="0" type="n0:date"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
&#8722;
	<xsd:element name="EmployeePrivAddressGetlistResponse">
&#8722;
	<xsd:complexType>
&#8722;
	<xsd:sequence>
<xsd:element name="Addressempkey" type="tns:TableOfbapipakey"/>
<xsd:element name="Return" type="tns:Bapireturn1"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
</wsdl:types>
&#8722;
	<wsdl:message name="EmployeePrivAddressGetdetailedlist">
<wsdl:part name="parameters" element="tns:EmployeePrivAddressGetdetailedlist"/>
</wsdl:message>
&#8722;
	<wsdl:message name="EmployeePrivAddressGetdetailedlistRespon">
<wsdl:part name="parameters" element="tns:EmployeePrivAddressGetdetailedlistRespon"/>
</wsdl:message>
&#8722;
	<wsdl:message name="EmployeePrivAddressGetdetail">
<wsdl:part name="parameters" element="tns:EmployeePrivAddressGetdetail"/>
</wsdl:message>
&#8722;
	<wsdl:message name="EmployeePrivAddressGetdetailResponse">
<wsdl:part name="parameters" element="tns:EmployeePrivAddressGetdetailResponse"/>
</wsdl:message>
&#8722;
	<wsdl:message name="EmployeePrivAddressGetlist">
<wsdl:part name="parameters" element="tns:EmployeePrivAddressGetlist"/>
</wsdl:message>
&#8722;
	<wsdl:message name="EmployeePrivAddressGetlistResponse">
<wsdl:part name="parameters" element="tns:EmployeePrivAddressGetlistResponse"/>
</wsdl:message>
&#8722;
	<wsdl:portType name="Z_PA_Employee">
&#8722;
	<wsdl:operation name="EmployeePrivAddressGetdetailedlist">
<wsdl:input message="tns:EmployeePrivAddressGetdetailedlist"/>
<wsdl:output message="tns:EmployeePrivAddressGetdetailedlistRespon"/>
</wsdl:operation>
&#8722;
	<wsdl:operation name="EmployeePrivAddressGetdetail">
<wsdl:input message="tns:EmployeePrivAddressGetdetail"/>
<wsdl:output message="tns:EmployeePrivAddressGetdetailResponse"/>
</wsdl:operation>
&#8722;
	<wsdl:operation name="EmployeePrivAddressGetlist">
<wsdl:input message="tns:EmployeePrivAddressGetlist"/>
<wsdl:output message="tns:EmployeePrivAddressGetlistResponse"/>
</wsdl:operation>
</wsdl:portType>
&#8722;
	<wsdl:binding name="Z_PA_EmployeeSoapBinding" type="tns:Z_PA_Employee">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
&#8722;
	<wsdl:operation name="EmployeePrivAddressGetdetailedlist">
<soap:operation soapAction=""/>
&#8722;
	<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
&#8722;
	<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
&#8722;
	<wsdl:operation name="EmployeePrivAddressGetdetail">
<soap:operation soapAction=""/>
&#8722;
	<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
&#8722;
	<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
&#8722;
	<wsdl:operation name="EmployeePrivAddressGetlist">
<soap:operation soapAction=""/>
&#8722;
	<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
&#8722;
	<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
&#8722;
	<wsdl:service name="Z_PA_EmployeeService">
&#8722;
	<wsdl:port name="Z_PA_EmployeeSoapBinding" binding="tns:Z_PA_EmployeeSoapBinding">
<soap:address location="http://mycompany.net:8000/sap/bc/srt/rfc/sap/Z_PA_Employee?sap-client=800"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

Henning