2014-02-20 2 views
1

Когда я пытаюсь импортировать следующий WSDL в SalesForce и классы APEX от него, я получаю сообщение об ошибке «Не удается найти элемент для {} http://tempuri.org/ счета»Невозможно создать Apex класса от импорта WSDL

<?xml version="1.0" encoding="UTF-8"?> 
<wsdl:definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:nspf1="http://tempuri.org/" xmlns:nspf2="http://tempuri.org/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="urn:ipostep_vP.0010000109.in_WCSX_com.sap.b1i.vplatform.runtime_INB_WS_CALL_SYNC_XPT_INB_WS_CALL_SYNC_XPT.ipo_proc" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="ipostep_vP.0010000109.in_WCSX_com.sap.b1i.vplatform.runtime_INB_WS_CALL_SYNC_XPT_INB_WS_CALL_SYNC_XPT.ipo_proc" targetNamespace="urn:ipostep_vP.0010000109.in_WCSX_com.sap.b1i.vplatform.runtime_INB_WS_CALL_SYNC_XPT_INB_WS_CALL_SYNC_XPT.ipo_proc"> 
<wsdl:types> 
<xs:schema xmlns:ns0="http://tempuri.org/" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://tempuri.org/" elementFormDefault="qualified" attributeFormDefault="unqualified"> 
<xs:element name="Account" type="ns0:AccountType"> 
<xs:annotation> 
<xs:documentation>Root element for the document</xs:documentation> 
</xs:annotation> 
</xs:element> 
<xs:complexType name="AccountType"> 
<xs:annotation> 
<xs:documentation>Automatically generated complex type comprising the whole document for the purpose of schema re-use</xs:documentation> 
</xs:annotation> 
<xs:sequence> 
<xs:element name="Name" type="xs:string" form="qualified"/> 
<xs:element name="SfIdcId" type="xs:string" form="qualified"/> 
<xs:element name="Phone" type="xs:string" form="qualified"/> 
<xs:element name="Fax" type="xs:string" form="qualified"/> 
<xs:element name="Website" type="xs:string" form="qualified"/> 
<xs:element name="Description" type="xs:string" form="qualified"/> 
<xs:element name="CurrencyIsoCode" type="xs:string" form="qualified"/> 
<xs:element name="Credit_Limit__c" type="xs:string" form="qualified"/> 
<xs:element name="SAP_Salesperson__c" type="xs:string" form="qualified"/> 
<xs:element name="External_Salesperson__c" type="xs:string" form="qualified"/> 
<xs:element name="Customer_Territory__c" type="xs:string" form="qualified"/> 
<xs:element name="BillingStreet" type="xs:string" form="qualified"/> 
<xs:element name="BillingCity" type="xs:string" form="qualified"/> 
<xs:element name="BillingState" type="xs:string" form="qualified"/> 
<xs:element name="BillingPostalCode" type="xs:string" form="qualified"/> 
<xs:element name="BillingCountry" type="xs:string" form="qualified"/> 
<xs:element name="ShippingStreet" type="xs:string" form="qualified"/> 
<xs:element name="ShippingCity" type="xs:string" form="qualified"/> 
<xs:element name="ShippingState" type="xs:string" form="qualified"/> 
<xs:element name="ShippingPostalCode" type="xs:string" form="qualified"/> 
<xs:element name="ShippingCountry" type="xs:string" form="qualified"/> 
<xs:element name="email" type="xs:string" form="qualified"/> 
<xs:element name="Industry" type="xs:string" form="qualified"/> 
<xs:element name="PriceList" type="xs:string" form="qualified"/> 
</xs:sequence> 
</xs:complexType> 
</xs:schema> 
<xs:schema xmlns:ns0="http://tempuri.org/" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://tempuri.org/" elementFormDefault="qualified" attributeFormDefault="unqualified"> 
<xs:element name="AccountResponse" type="ns0:AccountResponseType"> 
<xs:annotation> 
<xs:documentation>Root element for the document</xs:documentation> 
</xs:annotation> 
</xs:element> 
<xs:complexType name="AccountResponseType"> 
<xs:annotation> 
<xs:documentation>Automatically generated complex type comprising the whole document for the purpose of schema re-use</xs:documentation> 
</xs:annotation> 
<xs:sequence> 
<xs:element name="AccountResult" type="xs:string" form="qualified"/> 
</xs:sequence> 
</xs:complexType> 
</xs:schema> 
</wsdl:types> 
<wsdl:message name="Account"> 
<wsdl:part name="body" element="nspf1:Account"/> 
</wsdl:message> 
<wsdl:message name="AccountResponse"> 
<wsdl:part name="body" element="nspf2:AccountResponse"/> 
</wsdl:message> 
<wsdl:portType name="ipostep_vP.0010000109.in_WCSX_com.sap.b1i.vplatform.runtime_INB_WS_CALL_SYNC_XPT_INB_WS_CALL_SYNC_XPT.ipo_proc"> 
<wsdl:operation name="UA.sfdcIncoming"> 
<wsdl:input message="tns:Account"/> 
<wsdl:output message="tns:AccountResponse"/> 
</wsdl:operation> 
</wsdl:portType> 
<wsdl:binding name="ipostep_vP.0010000109.in_WCSX_com.sap.b1i.vplatform.runtime_INB_WS_CALL_SYNC_XPT_INB_WS_CALL_SYNC_XPT.ipo_proc_SoapBinding" type="tns:ipostep_vP.0010000109.in_WCSX_com.sap.b1i.vplatform.runtime_INB_WS_CALL_SYNC_XPT_INB_WS_CALL_SYNC_XPT.ipo_proc"> 
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> 
<wsdl:operation name="UA.sfdcIncoming"> 
<soap:operation soapAction=""/> 
<wsdl:input> 
<soap:body use="literal"/> 
</wsdl:input> 
<wsdl:output> 
<soap:body use="literal"/> 
</wsdl:output> 
</wsdl:operation> 
</wsdl:binding> 
<wsdl:service name="ipostep_vP.0010000109.in_WCSX_com.sap.b1i.vplatform.runtime_INB_WS_CALL_SYNC_XPT_INB_WS_CALL_SYNC_XPT.ipo_proc_Service"> 
<wsdl:port name="ipostep_vP.0010000109.in_WCSX_com.sap.b1i.vplatform.runtime_INB_WS_CALL_SYNC_XPT_INB_WS_CALL_SYNC_XPT.ipo_proc_SoapBinding_HTTP" binding="tns:ipostep_vP.0010000109.in_WCSX_com.sap.b1i.vplatform.runtime_INB_WS_CALL_SYNC_XPT_INB_WS_CALL_SYNC_XPT.ipo_proc_SoapBinding"> 
<soap:address location="http://xxx.xxx.com:9080/B1iXcellerator/exec/soap/vP.0010000109.in_WCSX/com.sap.b1i.vplatform.runtime/INB_WS_CALL_SYNC_XPT/INB_WS_CALL_SYNC_XPT.ipo/proc"/> 
</wsdl:port> 
<wsdl:port name="ipostep_vP.0010000109.in_WCSX_com.sap.b1i.vplatform.runtime_INB_WS_CALL_SYNC_XPT_INB_WS_CALL_SYNC_XPT.ipo_proc_SoapBinding_HTTPS" binding="tns:ipostep_vP.0010000109.in_WCSX_com.sap.b1i.vplatform.runtime_INB_WS_CALL_SYNC_XPT_INB_WS_CALL_SYNC_XPT.ipo_proc_SoapBinding"> 
<soap:address location="https://xxx.xxx.com:943/B1iXcellerator/exec/soap/vP.0010000109.in_WCSX/com.sap.b1i.vplatform.runtime/INB_WS_CALL_SYNC_XPT/INB_WS_CALL_SYNC_XPT.ipo/proc"/> 
</wsdl:port> 
</wsdl:service> 
</wsdl:definitions> 

Этот WSDL импортирует штраф в Visual Studio, когда я создаю ссылку на службу из него, и я могу запросить связанное с этим мыло просто отлично.

ответ

3

В Wsdl есть 2 схемы, и оба имеют одно и то же пространство имен TargetNamespace. Попробуйте прокомментировать разделение Схемы, и он будет работать ...

<!--</xs:schema> 
<xs:schema xmlns:ns0="http://tempuri.org/" xmlns:xs="http://www.w3.org/2001/XMLSchema"  targetNamespace="http://tempuri.org/" elementFormDefault="qualified" attributeFormDefault="unqualified">--> 
Смежные вопросы