Skip to Content
avatar image
Former Member

Error creating web reference in .NET (VS 2005, .NET 2.0)

We have been wrestling with this error for 2 weeks now and can't resolve the problem (and the other users who have posted this error have not been answered--does anyone know the answer?)

When creating a WSDL for BAPI_ACC_GL_POSTING_POST, the WSDL is successful and can actually communicate with the system using SOAP SONAR. When using the same WSDL in Visual Studio, the build succeeds, but the following binding errors occur:

Error 1 Custom tool error: Unable to import WebService/Schema. Unable to import binding 'MI_GLPost_OutBinding' from namespace 'http://sap.com/xi/SolArc'. Unable to import operation 'MI_GLPost_Out'. The element 'http://tempuri.org:BAPI_ACC_GL_POSTING_POST' is missing. C:\Documents and Settings\Administrator\My Documents\Visual Studio 2005\Projects\SolarcTest5\SolarcTest5\My Project\Settings.settings 1 1 SolarcTest5

Error 2 Custom tool error: Unable to import WebService/Schema. Unable to import binding 'MI_GLPost_OutBinding' from namespace 'http://sap.com/xi/SolArc'. Unable to import operation 'MI_GLPost_Out'. The element 'http://tempuri.org:BAPI_ACC_GL_POSTING_POST' is missing. C:\Documents and Settings\Administrator\My Documents\Visual Studio 2005\Projects\SolarcTest5\SolarcTest5\Web References\localhost\Reference.map 1 1 SolarcTest5

WDSL that is failing for GL Post

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

<wsdl:definitions name="MI_GLPost_Out" targetNamespace="http://sap.com/xi/SolArc" xmlns:p2="http://tempuri.org" xmlns:p1="http://sap.com/xi/SolArc" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"><wsdl:types><xsd:schema targetNamespace="http://tempuri.org" xmlns="http://tempuri.org" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><xsd:element name="BAPI_ACC_GL_POSTING_POST.Response"><xsd:complexType><xsd:all><xsd:element name="OBJ_KEY" minOccurs="0"><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:maxLength value="20" /></xsd:restriction></xsd:simpleType></xsd:element><xsd:element name="OBJ_SYS" minOccurs="0"><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:maxLength value="10" /></xsd:restriction></xsd:simpleType></xsd:element><xsd:element name="OBJ_TYPE" minOccurs="0"><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:maxLength value="5" /></xsd:restriction></xsd:simpleType></xsd:element><xsd:element name="ACCOUNTGL"><xsd:complexType><xsd:sequence><xsd:element name="item" type="BAPIACGL08" minOccurs="0" maxOccurs="unbounded" xmlns:xsd="http://www.w3.org/2001/XMLSchema" /></xsd:sequence></xsd:complexType></xsd:element><xsd:element name="CURRENCYAMOUNT"><xsd:complexType><xsd:sequence><xsd:element name="item" type="BAPIACCR08" minOccurs="0" maxOccurs="unbounded" xmlns:xsd="http://www.w3.org/2001/XMLSchema" /></xsd:sequence></xsd:complexType></xsd:element><xsd:element name="EXTENSION1" minOccurs="0"><xsd:complexType><xsd:sequence><xsd:element name="item" type="BAPIEXTC" minOccurs="0" maxOccurs="unbounded" xmlns:xsd="http://www.w3.org/2001/XMLSchema" /></xsd:sequence></xsd:complexType></xsd:element><xsd:element name="RETURN"><xsd:complexType><xsd:sequence><xsd:element name="item" type="BAPIRET2" minOccurs="0" maxOccurs="unbounded" xmlns:xsd="http://www.w3.org/2001/XMLSchema" /></xsd:sequence></xsd:complexType></xsd:element></xsd:all></xsd:complexType></xsd:element><xsd:element name="BAPI_ACC_GL_POSTING_POST"><xsd:complexType><xsd:all><xsd:element name="DOCUMENTHEADER" type="BAPIACHE08" /><xsd:element name="ACCOUNTGL"><xsd:complexType><xsd:sequence><xsd:element name="item" type="BAPIACGL08" minOccurs="0" maxOccurs="unbounded" xmlns:xsd="http://www.w3.org/2001/XMLSchema" /></xsd:sequence></xsd:complexType></xsd:element><xsd:element name="CURRENCYAMOUNT"><xsd:complexType><xsd:sequence><xsd:element name="item" type="BAPIACCR08" minOccurs="0" maxOccurs="unbounded" xmlns:xsd="http://www.w3.org/2001/XMLSchema" /></xsd:sequence></xsd:complexType></xsd:element><xsd:element name="EXTENSION1" minOccurs="0"><xsd:complexType><xsd:sequence><xsd:element name="item" type="BAPIEXTC" minOccurs="0" maxOccurs="unbounded" xmlns:xsd="http://www.w3.org/2001/XMLSchema" /></xsd:sequence></xsd:complexType></xsd:element><xsd:element name="RETURN"><xsd:complexType><xsd:sequence><xsd:element name="item" type="BAPIRET2" minOccurs="0" maxOccurs="unbounded" xmlns:xsd="http://www.w3.org/2001/XMLSchema" /></xsd:sequence></xsd:complexType></xsd:element></xsd:all></xsd:complexType></xsd:element><xsd:complexType name="BAPIACGL08"><xsd:sequence><xsd:element name="ITEMNO_ACC" minOccurs="0"><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:maxLength value="10" /><xsd:pattern value="\d" /></xsd:restriction></xsd:simpleType></xsd:element><xsd:element name="GL_ACCOUNT" minOccurs="0"><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:maxLength value="10" /></xsd:restriction></xsd:simpleType></xsd:element><xsd:element name="COMP_CODE" minOccurs="0"><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:maxLength value="4" /></xsd:restriction></xsd:simpleType></xsd:element><xsd:element name="PSTNG_DATE" minOccurs="0" /><xsd:element name="DOC_TYPE" minOccurs="0"><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:maxLength value="2" /></xsd:restriction></xsd:simpleType></xsd:element><xsd:element name="AC_DOC_NO" minOccurs="0"><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:maxLength value="10" /></xsd:restriction></xsd:simpleType></xsd:element><xsd:element name="FISC_YEAR" minOccurs="0"><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:maxLength value="4" /><xsd:pattern value="\d" /></xsd:restriction></xsd:simpleType></xsd:element><xsd:element name="FIS_PERIOD" minOccurs="0"><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:maxLength value="2" /><xsd:pattern value="\d" /></xsd:restriction></xsd:simpleType></xsd:element><xsd:element name="STAT_CON" minOccurs="0"><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:maxLength value="1" /></xsd:restriction></xsd:simpleType></xsd:element><xsd:element name="REF_KEY_1" minOccurs="0"><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:maxLength value="12" /></xsd:restriction></xsd:simpleType></xsd:element><xsd:element name="REF_KEY_2" minOccurs="0"><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:maxLength value="12" /></xsd:restriction></xsd:simpleType></xsd:element><xsd:element name="REF_KEY_3" minOccurs="0"><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:maxLength value="20" /></xsd:restriction></xsd:simpleType></xsd:element><xsd:element name="CUSTOMER" minOccurs="0"><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:maxLength value="10" /></xsd:restriction></xsd:simpleType></xsd:element><xsd:element name="VENDOR_NO" minOccurs="0"><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:maxLength value="10" /></xsd:restriction></xsd:simpleType></xsd:element><xsd:element name="ALLOC_NMBR" minOccurs="0"><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:maxLength value="18" /></xsd:restriction></xsd:simpleType></xsd:element><xsd:element name="ITEM_TEXT" minOccurs="0"><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:maxLength value="50" /></xsd:restriction></xsd:simpleType></xsd:element><xsd:element name="BUS_AREA" minOccurs="0"><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:maxLength value="4" /></xsd:restriction></xsd:simpleType></xsd:element><xsd:element name="COSTCENTER" minOccurs="0"><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:maxLength value="10" /></xsd:restriction></xsd:simpleType></xsd:element><xsd:element name="ACTTYPE" minOccurs="0"><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:maxLength value="6" /></xsd:restriction></xsd:simpleType></xsd:element><xsd:element name="ORDERID" minOccurs="0"><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:maxLength value="12" /></xsd:restriction></xsd:simpleType></xsd:element><xsd:element name="ORIG_GROUP" minOccurs="0"><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:maxLength value="4" /></xsd:restriction></xsd:simpleType></xsd:element><xsd:element name="COST_OBJ" minOccurs="0"><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:maxLength value="12" /></xsd:restriction></xsd:simpleType></xsd:element><xsd:element name="PROFIT_CTR" minOccurs="0"><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:maxLength value="10" /></xsd:restriction></xsd:simpleType></xsd:element><xsd:element name="PART_PRCTR" minOccurs="0"><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:maxLength value="10" /></xsd:restriction></xsd:simpleType></xsd:element><xsd:element name="WBS_ELEMENT" minOccurs="0"><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:maxLength value="24" /></xsd:restriction></xsd:simpleType></xsd:element><xsd:element name="NETWORK" minOccurs="0"><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:maxLength value="12" /></xsd:restriction></xsd:simpleType></xsd:element><xsd:element name="ROUTING_NO" minOccurs="0"><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:maxLength value="10" /><xsd:pattern value="\d" /></xsd:restriction></xsd:simpleType></xsd:element><xsd:element name="ORDER_ITNO" minOccurs="0"><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:maxLength value="4" /><xsd:pattern value="\d" /></xsd:restriction></xsd:simpleType></xsd:element></xsd:sequence></xsd:complexType><xsd:complexType name="BAPIRET2"><xsd:sequence><xsd:element name="TYPE" minOccurs="0"><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:maxLength value="1" /></xsd:restriction></xsd:simpleType></xsd:element><xsd:element name="ID" minOccurs="0"><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:maxLength value="20" /></xsd:restriction></xsd:simpleType></xsd:element><xsd:element name="NUMBER" minOccurs="0"><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:maxLength value="3" /><xsd:pattern value="\d" /></xsd:restriction></xsd:simpleType></xsd:element><xsd:element name="MESSAGE" minOccurs="0"><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:maxLength value="220" /></xsd:restriction></xsd:simpleType></xsd:element><xsd:element name="LOG_NO" minOccurs="0"><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:maxLength value="20" /></xsd:restriction></xsd:simpleType></xsd:element><xsd:element name="LOG_MSG_NO" minOccurs="0"><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:maxLength value="6" /><xsd:pattern value="\d" /></xsd:restriction></xsd:simpleType></xsd:element><xsd:element name="MESSAGE_V1" minOccurs="0"><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:maxLength value="50" /></xsd:restriction></xsd:simpleType></xsd:element><xsd:element name="MESSAGE_V2" minOccurs="0"><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:maxLength value="50" /></xsd:restriction></xsd:simpleType></xsd:element><xsd:element name="MESSAGE_V3" minOccurs="0"><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:maxLength value="50" /></xsd:restriction></xsd:simpleType></xsd:element><xsd:element name="MESSAGE_V4" minOccurs="0"><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:maxLength value="50" /></xsd:restriction></xsd:simpleType></xsd:element><xsd:element name="PARAMETER" minOccurs="0"><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:maxLength value="32" /></xsd:restriction></xsd:simpleType></xsd:element><xsd:element name="ROW" type="xsd:integer" minOccurs="0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" /><xsd:element name="FIELD" minOccurs="0"><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:maxLength value="30" /></xsd:restriction></xsd:simpleType></xsd:element><xsd:element name="SYSTEM" minOccurs="0"><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:maxLength value="10" /></xsd:restriction></xsd:simpleType></xsd:element></xsd:sequence></xsd:complexType><xsd:complexType name="BAPIACCR08"><xsd:sequence><xsd:element name="ITEMNO_ACC" minOccurs="0"><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:maxLength value="10" /><xsd:pattern value="\d" /></xsd:restriction></xsd:simpleType></xsd:element><xsd:element name="CURR_TYPE" minOccurs="0"><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:maxLength value="2" /></xsd:restriction></xsd:simpleType></xsd:element><xsd:element name="CURRENCY" minOccurs="0"><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:maxLength value="5" /></xsd:restriction></xsd:simpleType></xsd:element><xsd:element name="CURRENCY_ISO" minOccurs="0"><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:maxLength value="3" /></xsd:restriction></xsd:simpleType></xsd:element><xsd:element name="AMT_DOCCUR" minOccurs="0"><xsd:simpleType><xsd:restriction base="xsd:decimal"><xsd:totalDigits value="23" /><xsd:fractionDigits value="4" /></xsd:restriction></xsd:simpleType></xsd:element><xsd:element name="EXCH_RATE" minOccurs="0"><xsd:simpleType><xsd:restriction base="xsd:decimal"><xsd:totalDigits value="9" /><xsd:fractionDigits value="5" /></xsd:restriction></xsd:simpleType></xsd:element><xsd:element name="EXCH_RATE_V" minOccurs="0"><xsd:simpleType><xsd:restriction base="xsd:decimal"><xsd:totalDigits value="9" /><xsd:fractionDigits value="5" /></xsd:restriction></xsd:simpleType></xsd:element></xsd:sequence></xsd:complexType><xsd:complexType name="BAPIACHE08"><xsd:sequence><xsd:element name="OBJ_TYPE" minOccurs="0"><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:maxLength value="5" /></xsd:restriction></xsd:simpleType></xsd:element><xsd:element name="OBJ_KEY" minOccurs="0"><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:maxLength value="20" /></xsd:restriction></xsd:simpleType></xsd:element><xsd:element name="OBJ_SYS" minOccurs="0"><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:maxLength value="10" /></xsd:restriction></xsd:simpleType></xsd:element><xsd:element name="USERNAME" minOccurs="0"><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:maxLength value="12" /></xsd:restriction></xsd:simpleType></xsd:element><xsd:element name="HEADER_TXT" minOccurs="0"><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:maxLength value="25" /></xsd:restriction></xsd:simpleType></xsd:element><xsd:element name="OBJ_KEY_R" minOccurs="0"><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:maxLength value="20" /></xsd:restriction></xsd:simpleType></xsd:element><xsd:element name="COMP_CODE" minOccurs="0"><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:maxLength value="4" /></xsd:restriction></xsd:simpleType></xsd:element><xsd:element name="AC_DOC_NO" minOccurs="0"><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:maxLength value="10" /></xsd:restriction></xsd:simpleType></xsd:element><xsd:element name="FISC_YEAR" minOccurs="0"><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:maxLength value="4" /><xsd:pattern value="\d" /></xsd:restriction></xsd:simpleType></xsd:element><xsd:element name="DOC_DATE" minOccurs="0" /><xsd:element name="PSTNG_DATE" minOccurs="0" /><xsd:element name="TRANS_DATE" minOccurs="0" /><xsd:element name="FIS_PERIOD" minOccurs="0"><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:maxLength value="2" /><xsd:pattern value="\d" /></xsd:restriction></xsd:simpleType></xsd:element><xsd:element name="DOC_TYPE" minOccurs="0"><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:maxLength value="2" /></xsd:restriction></xsd:simpleType></xsd:element><xsd:element name="REF_DOC_NO" minOccurs="0"><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:maxLength value="16" /></xsd:restriction></xsd:simpleType></xsd:element><xsd:element name="COMPO_ACC" minOccurs="0"><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:maxLength value="4" /></xsd:restriction></xsd:simpleType></xsd:element><xsd:element name="REASON_REV" minOccurs="0"><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:maxLength value="2" /></xsd:restriction></xsd:simpleType></xsd:element></xsd:sequence></xsd:complexType><xsd:complexType name="BAPIEXTC"><xsd:sequence><xsd:element name="FIELD1" minOccurs="0"><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:maxLength value="250" /></xsd:restriction></xsd:simpleType></xsd:element><xsd:element name="FIELD2" minOccurs="0"><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:maxLength value="250" /></xsd:restriction></xsd:simpleType></xsd:element><xsd:element name="FIELD3" minOccurs="0"><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:maxLength value="250" /></xsd:restriction></xsd:simpleType></xsd:element><xsd:element name="FIELD4" minOccurs="0"><xsd:simpleType><xsd:restriction base="xsd:string"><xsd:maxLength value="250" /></xsd:restriction></xsd:simpleType></xsd:element></xsd:sequence></xsd:complexType></xsd:schema></wsdl:types><wsdl:message name="p2.BAPI_ACC_GL_POSTING_POST"><wsdl:part name="BAPI_ACC_GL_POSTING_POST" element="p2:BAPI_ACC_GL_POSTING_POST" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" /></wsdl:message><wsdl:message name="p2.BAPI_ACC_GL_POSTING_POST.Response"><wsdl:part name="BAPI_ACC_GL_POSTING_POST.Response" element="p2:BAPI_ACC_GL_POSTING_POST.Response" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" /></wsdl:message><wsdl:portType name="MI_GLPost_Out"><wsdl:operation name="MI_GLPost_Out"><wsdl:input message="p1:p2.BAPI_ACC_GL_POSTING_POST" /><wsdl:output message="p1:p2.BAPI_ACC_GL_POSTING_POST.Response" /></wsdl:operation></wsdl:portType><wsdl:binding name="MI_GLPost_OutBinding" type="p1:MI_GLPost_Out" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"><soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" /><wsdl:operation name="MI_GLPost_Out"><soap:operation soapAction="http://sap.com/xi/WebService/soap1.1" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" /><wsdl:input><soap:body use="literal" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" /></wsdl:input><wsdl:output><soap:body use="literal" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" /></wsdl:output></wsdl:operation></wsdl:binding><wsdl:service name="MI_GLPost_OutService"><wsdl:port name="MI_GLPost_OutPort" binding="p1:MI_GLPost_OutBinding" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"><soap:address location="http://&lt;server&gt;:&lt;port&gt;/XISOAPAdapter/MessageServlet?channel=:&lt;BS_TestSolArc&gt;:&lt;CC_SoapSender&gt;&amp;version=3.0&amp;Sender.Service=&amp;Interface=%5E*" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" />

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Oct 05, 2007 at 01:38 PM

    Has anyone figured this out yet? We are experiencing the same issue trying to use a WSDL created by XI in VS 2005, .NET 2.0

    We are able to successfully use the same WSDL with VS 2003, .NET 1.1

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi There,

      VS2005 had a bug where it expects all the namespaces to be defined at the root level. So move the namespaces up to the root level and it should work fine in VS2005.

      cheers,

      Naveen

  • avatar image
    Former Member
    Oct 10, 2007 at 05:52 AM

    hi rob,

    even i faced the same problem.

    but when i copied ur WSDL and pasted in VS2005 its working fine.

    am validating my WSDL with one you provided

    Add comment
    10|10000 characters needed characters exceeded