Я использую модуль «мыло» Node.js для звонков в сервисы SOAP.Он отлично работает с некоторыми примерами сервисов, например: http://www.dneonline.com/calculator.asmx?wsdl
Однако я сталкиваюсь с этой ошибкой при вызове SOAP к моей клиентской службе, я не понимаю, почему, может быть, проблема несовместимости ?,другой парень уже задал подобный вопрос, но ответа нет ( Целевое пространство имен «undefined» уже используется другой схемой ):
Target-Namespace "undefined" already in use by another Schema!
/temp/soap/node_modules/soap/lib/wsdl.js:499
this.element = schema.elements[nsName.name];
^
TypeError: Cannot read property 'elements' of undefined
at subElement.MessageElement.postProcess (/temp/soap/node_modules/soap/lib/wsdl.js:499:26)
at subElement.OperationElement.postProcess (/temp/soap/node_modules/soap/lib/wsdl.js:669:13)
at subElement.PortTypeElement.postProcess (/temp/soap/node_modules/soap/lib/wsdl.js:689:11)
at subElement.BindingElement.postProcess (/temp/soap/node_modules/soap/lib/wsdl.js:703:14)
at subElement.ServiceElement.postProcess (/temp/soap/node_modules/soap/lib/wsdl.js:739:17)
at /temp/soap/node_modules/soap/lib/wsdl.js:1063:26
at /temp/soap/node_modules/soap/lib/wsdl.js:1218:7
at WSDL._processNextInclude (/temp/soap/node_modules/soap/lib/wsdl.js:1189:12)
at WSDL.callback (/temp/soap/node_modules/soap/lib/wsdl.js:1217:10)
at /temp/soap/node_modules/soap/lib/wsdl.js:1098:12
at WSDL._processNextInclude (/temp/soap/node_modules/soap/lib/wsdl.js:1189:12)
at WSDL.processIncludes (/temp/soap/node_modules/soap/lib/wsdl.js:1232:8)
at /temp/soap/node_modules/soap/lib/wsdl.js:1053:10
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
Конечная точка SOAP (доступна только по моему IP)в: http://103.226.108.150:7003/MobileOTM/Business/TruckingEvent?wsdl
Это конечная точка SOAP:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="OTMMobileProcess" targetNamespace="http://xmlns.oracle.com/SOAServerDev/OTMMobileApp/OTMMobileProcess" xmlns:client="http://xmlns.oracle.com/SOAServerDev/OTMMobileApp/OTMMobileProcess" xmlns:ns1="http://xmlns.oracle.com/OTMMobileApp/TruckingEvent" xmlns:ns2="http://xmlns.oracle.com/OTMMobileAppProcess" xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:documentation>http://snp-lph-otmdev-soa.localdomain:8001/soa-infra/services/SNP_DEV/OTMMobileApp!1.0/OTMMobileProcess.wsdl
</wsdl:documentation>
<plnk:partnerLinkType name="OTMMobileProcess">
<plnk:role name="OTMMobileProcessProvider" portType="client:OTMMobileProcess"/>
</plnk:partnerLinkType>
<wsdl:types>
<schema xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://xmlns.oracle.com/OTMMobileApp/TruckingEvent" schemaLocation="http://103.226.108.150:7003/MobileOTM/Business/TruckingEvent?SCHEMA%2FMobileOTM%2FResource%2Fxsd%2FTruckingEvent"/>
</schema>
<schema xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://xmlns.oracle.com/OTMMobileAppProcess" schemaLocation="http://103.226.108.150:7003/MobileOTM/Business/TruckingEvent?SCHEMA%2FMobileOTM%2FResource%2Fxsd%2FOTMMobileAppProcess"/>
</schema>
</wsdl:types>
<wsdl:message name="OTMMobileProcessRequestMessage">
<wsdl:part element="ns1:TruckingEvent" name="payload"/>
</wsdl:message>
<wsdl:message name="OTMMobileProcessResponseMessage">
<wsdl:part element="ns2:ProcessResponse" name="payload"/>
</wsdl:message>
<wsdl:portType name="OTMMobileProcess">
<wsdl:operation name="TruckingEvent">
<wsdl:input message="client:OTMMobileProcessRequestMessage"/>
<wsdl:output message="client:OTMMobileProcessResponseMessage"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="OTMMobileProcessBinding" type="client:OTMMobileProcess">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="TruckingEvent">
<soap:operation soapAction="TruckingEvent" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="otmmobileprocess_client_ep">
<wsdl:port binding="client:OTMMobileProcessBinding" name="OTMMobileProcess_pt">
<soap:address location="http://172.16.39.34:7003/MobileOTM/Business/TruckingEvent"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>