0
다음 메시지를 받아들이도록 서비스를 구축 중입니다. InformationExchangePackage가 네임 스페이스 접두어를 갖지 않지만 기본 xmlns = "http://www.something.com/dir/1.0.9"를 사용하는 방법에 유의하십시오. WSDL에서이 동작을 만드는 방법을 알 수 없습니다.요소의 기본 네임 스페이스를 지정하십시오.
내가 서비스에 원하는 SOAP 요청 :
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<InformationExchangePackage xmlns:j="http://www.something.gov/dir/3.0.3" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns="http://www.something.com/dir/1.0.9">
<j:OtherInformation>Sometext</OtherInformation>
</InformationExchangePackage>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
는 다음 그녀는 soapUI 생성 SOAP 요청입니다. InformationExchangePackage에서 "loc"이라는 접두사를 유의하십시오 (원하는 것은 아닙니다).
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:loc="http://localhost/">
<soapenv:Header/>
<soapenv:Body>
<loc:process>
<loc:InformationExchangePackage>
<OtherInformation>?</OtherInformation>
</loc:InformationExchangePackage>
</loc:process>
</soapenv:Body>
</soapenv:Envelope>
나의 현재 WSDL : 나는 LOC 접두사 요청을 제출하는 경우
<?xml version="1.0" encoding="ISO-8859-1"?>
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://localhost/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:cs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://localhost/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<wsdl:types>
<xs:schema targetNamespace="http://localhost/">
<xs:element name="InformationExchangePackage">
<xs:complexType>
<xs:sequence>
<xs:element name="OtherInformation" type="xs:anyType"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="processResponseType">
<xs:complexType>
<xs:sequence>
<xs:element type="xs:string" name="aCode"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
</wsdl:types>
<wsdl:message name="processRequest">
<wsdl:part name="InformationExchangePackage" element="tns:InformationExchangePackage"/>
</wsdl:message>
<wsdl:message name="processResponse">
<wsdl:part name="processResponse" element="tns:processResponseType"/>
</wsdl:message>
<wsdl:portType name="CCHEndpoint">
<wsdl:operation name="process">
<wsdl:input message="tns:processRequest"/>
<wsdl:output message="tns:processResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="CCHBinding" type="tns:CCHEndpoint">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="process">
<soap:operation soapAction="urn:process" style="rpc"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="CCHEndpointService">
<wsdl:port name="OrderService" binding="tns:CCHBinding">
<!--<soap:address location="http://localhost:8080/wildcat"/>-->
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
, 그것은 작동합니다. loc 접두어없이 요청을 제출하면 다음과 같이 나타납니다.
org.apache.cxf.interceptor.Fault: Message part {http://www.something.com/dir/1.0.9}InformationExchangePackage was not recognized. (Does it exist in service WSDL?)
WSDL에서 매개 변수가 누락 된 것 같습니다. 어둠 속에서 다음 장면을 찍었습니다.
<xs:element name="InformationExchangePackage" xsi:schemaLocation="http://www.something.com/dir/1.0.9">
<xs:element name="InformationExchangePackage" xsi:noNamespaceSchemaLocation="http://www.something.com/dir/1.0.9">
제목을 편집했습니다. "[제목에"태그 "가 포함되어 있어야합니까?] (http://meta.stackexchange.com/questions/19190/)"합의가 "아니오, 그렇지 않아야합니다"로 표시되어야합니다. –