xsd検証中に以下のエラーが発生します:
エラー:src-resolve.4.2:コンポーネント 'ns0:dachExceptionData'の解決中にエラーが発生しました。'ns0:dachExceptionData'が名前空間 ' http://com.dachser.edi.ext.api.ping.service.PingEdiExtService 'にあることが検出されましたが、この名前空間のコンポーネントはスキーマドキュメント 'file:/ Cから参照できません。 :/Users/anujkumar/Downloads/wsdl%20test/pingEdiExtService.wsdl '。これが正しくない名前空間である場合は、おそらく「ns0:dachExceptionData」のプレフィックスを変更する必要があります。これが正しい名前空間である場合は、適切な「import」タグを「file:/ C:/Users/anujkumar/Downloads/wsdl%20test/pingEdiExtService.wsdl」に追加する必要があります。行番号:2列番号:96リテラルシステムIDファイル:/ C:/Users/anujkumar/Downloads/wsdl%20test/pingEdiExtService.wsdl
WSDLは次のとおりです。
<wsdl:definitions name="PingEdiExtServiceSoapImplService" targetNamespace="http://com.dachser.edi.ext.api.ping.service.PingEdiExtService"><wsdl:types><xs:schema elementFormDefault="unqualified" targetNamespace="http://com.dachser.edi.ext.api.ping.service.PingEdiExtService" version="1.0"><xs:element name="ping" type="tns:ping"/><xs:element name="pingResponse" type="tns:pingResponse"/><xs:complexType name="ping"><xs:sequence/></xs:complexType><xs:complexType name="pingResponse"><xs:sequence><xs:element minOccurs="0" name="return" type="xs:string"/></xs:sequence></xs:complexType><xs:complexType name="dachExceptionData"><xs:sequence><xs:element minOccurs="0" name="cause" type="xs:string"/><xs:element name="expType" type="xs:int"/><xs:element minOccurs="0" name="message" type="xs:string"/></xs:sequence></xs:complexType></xs:schema><xsd:schema attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://exception.ws.dachser.com"><xsd:element name="DachUncheckedExceptionSoap" nillable="true" type="ns0:dachExceptionData"/></xsd:schema></wsdl:types><wsdl:message name="DachUncheckedExceptionSoap"><wsdl:part element="ns1:DachUncheckedExceptionSoap" name="DachUncheckedExceptionSoap">
</wsdl:part></wsdl:message><wsdl:message name="ping"><wsdl:part element="tns:ping" name="parameters">
</wsdl:part></wsdl:message><wsdl:message name="pingResponse"><wsdl:part element="tns:pingResponse" name="parameters">
</wsdl:part></wsdl:message><wsdl:portType name="PingEdiExtServiceSoapImpl"><wsdl:operation name="ping"><wsdl:input message="tns:ping" name="ping">
</wsdl:input><wsdl:output message="tns:pingResponse" name="pingResponse">
</wsdl:output><wsdl:fault message="tns:DachUncheckedExceptionSoap" name="DachUncheckedExceptionSoap">
</wsdl:fault></wsdl:operation></wsdl:portType><wsdl:binding name="PingEdiExtServiceSoapImplServiceSoapBinding" type="tns:PingEdiExtServiceSoapImpl"><soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/><wsdl:operation name="ping"><soap:operation soapAction="" style="document"/><wsdl:input name="ping"><soap:body use="literal"/></wsdl:input><wsdl:output name="pingResponse"><soap:body use="literal"/></wsdl:output><wsdl:fault name="DachUncheckedExceptionSoap"><soap:fault name="DachUncheckedExceptionSoap" use="literal"/></wsdl:fault></wsdl:operation></wsdl:binding><wsdl:service name="PingEdiExtServiceSoapImplService"><wsdl:port binding="tns:PingEdiExtServiceSoapImplServiceSoapBinding" name="PingEdiExtServiceSoapImplPort"><soap:address location="https://edi.dachser.com/soap/ext/pingEdiExtService"/></wsdl:port></wsdl:service></wsdl:definitions>
https://www.wsdl-analyzer.com/ でこの wsdl を検証できますが、
wsdlの何が問題になっていますか?
ありがとう
私が見る主な問題は、いくつかの名前空間が明確に定義されていないことです。それらを追加しました ( xmlns:tns="http://com.dachser.edi.ext.api.ping.service.PingEdiExtService" xmlns:ns0="http://exception.ws.dachser.com" xmlns:wsdl = "http://schemas.xmlsoap.org/wsdl/" xmlns:xs = "http://www.w3.org/2001/XMLSchema" xmlns:soap = "http://schemas.xmlsoap.org/wsdl / soap / ")を定義に追加します。
wsdl全体には次の定義があります。
<wsdl:definitions name="PingEdiExtServiceSoapImplService" targetNamespace="http://com.dachser.edi.ext.api.ping.service.PingEdiExtService"
xmlns:tns="http://com.dachser.edi.ext.api.ping.service.PingEdiExtService" xmlns:ns0="http://exception.ws.dachser.com"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<wsdl:types>
<xs:schema elementFormDefault="unqualified" targetNamespace="http://com.dachser.edi.ext.api.ping.service.PingEdiExtService"
xmlns:tns="http://com.dachser.edi.ext.api.ping.service.PingEdiExtService" version="1.0">
<xs:element name="ping" type="tns:ping"/>
<xs:element name="pingResponse" type="tns:pingResponse"/>
<xs:complexType name="ping">
<xs:sequence/>
</xs:complexType>
<xs:complexType name="pingResponse">
<xs:sequence>
<xs:element minOccurs="0" name="return" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://exception.ws.dachser.com"
xmlns:ns0="http://exception.ws.dachser.com">
<xs:element name="DachUncheckedExceptionSoap" nillable="true" type="ns0:dachExceptionData"/>
<xs:complexType name="dachExceptionData">
<xs:sequence>
<xs:element minOccurs="0" name="cause" type="xs:string"/>
<xs:element name="expType" type="xs:int"/>
<xs:element minOccurs="0" name="message" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
</wsdl:types>
<wsdl:message name="DachUncheckedExceptionSoap">
<wsdl:part name="DachUncheckedExceptionSoap" element="ns0:DachUncheckedExceptionSoap"/>
</wsdl:message>
<wsdl:message name="ping">
<wsdl:part element="tns:ping" name="parameters"/>
</wsdl:message>
<wsdl:message name="pingResponse">
<wsdl:part element="tns:pingResponse" name="parameters"/>
</wsdl:message>
<wsdl:portType name="PingEdiExtServiceSoapImpl">
<wsdl:operation name="ping">
<wsdl:input message="tns:ping" name="ping"/>
<wsdl:output message="tns:pingResponse" name="pingResponse"/>
<wsdl:fault message="tns:DachUncheckedExceptionSoap" name="DachUncheckedExceptionSoap"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="PingEdiExtServiceSoapImplServiceSoapBinding" type="tns:PingEdiExtServiceSoapImpl">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="ping">
<soap:operation soapAction="http://com.dachser.edi.ext.api.ping.service.PingEdiExtService" style="document"/>
<wsdl:input name="ping">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="pingResponse">
<soap:body use="literal"/>
</wsdl:output>
<wsdl:fault name="DachUncheckedExceptionSoap">
<soap:fault name="DachUncheckedExceptionSoap" use="literal"/>
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="PingEdiExtServiceSoapImplService">
<wsdl:port binding="tns:PingEdiExtServiceSoapImplServiceSoapBinding" name="PingEdiExtServiceSoapImplPort">
<soap:address location="https://edi.dachser.com/soap/ext/pingEdiExtService"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加