WSDL 파일을 기반으로 특정 SOAP 요청 메시지를 작성해야합니다. SOAP UI를 사용하여 WSDL에서 SOAP 요청을 만듭니다.특정 SOAP 요청에 대해 WSDL을 생성하십시오.
SOAP 요청은 다음과 같아야합니다
이<?xml version="1.0"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
SOAP-ENV:encodingstyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Header>
<username>xxxx</username>
<password>xxxx</password>
<MaxOrders>1</MaxOrders>
<xmlVers>1</xmlVers>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<m:getNewOrders xmlns:m= "urn:https://xxx.yyy.co.uk/b2b/soap/soap:getNewOrders/">
</m:getNewOrders>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
나는 다음과 WSDL있다 : SOAP 요청 메시지가 보이는 난 그 WSDL을 가지고 SOAP의 UI에서 가져올 때
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<wsdl:definitions
xmlns:m="https://xxx.yyy.co.uk/b2b/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
name="xxxOrders"
targetNamespace="https://xxx.yyy.co.uk/b2b/">
<wsdl:types>
<xsd:schema targetNamespace="https://xxx.yyy.co.uk/b2b/">
<xsd:element name="Envelope">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Header"/>
<xsd:element name="Body"/>
</xsd:sequence>
<xsd:attribute name="encodingstyle" type="xsd:anyURI" form="qualified" use="required" />
</xsd:complexType>
</xsd:element>
<xsd:element name="Header">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="username" type="xsd:NCName" form="unqualified" />
<xsd:element name="password" type="xsd:integer" form="unqualified" />
<xsd:element name="MaxOrders" type="xsd:integer" form="unqualified" />
<xsd:element name="xmlVers" type="xsd:integer" form="unqualified" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="Body">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="m:getNewOrders" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="getNewOrders">
<xsd:complexType />
</xsd:element>
</xsd:schema>
</wsdl:types>
<wsdl:message name="getNewOrders">
<wsdl:part element="m:getNewOrders" name="parameters"/>
</wsdl:message>
<wsdl:portType name="xxxOrders">
<wsdl:operation name="getNewOrders">
<wsdl:input message="m:getNewOrders"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="xxxOrdersSOAP" type="m:xxxOrders">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="getNewOrders">
<soap:operation soapAction="urn:https://xxx.yyy.co.uk/b2b/soap/soap:getNewOrders/"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="xxxOrders">
<wsdl:port binding="m:xxxOrdersSOAP" name="xxxOrdersSOAP">
<soap:address location="https://xxx.yyy.co.uk/b2b/soap/soap_orders.asp"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
을하지만, 다른 내가 기대 :
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:b2b="https://xxx.yyy.co.uk/b2b/">
<soapenv:Header/>
<soapenv:Body>
<b2b:getNewOrders/>
</soapenv:Body>
</soapenv:Envelope>
내 Header
요소가 비어 f를 또는 예입니다. getNewOrders
나는 xmlns:b2b
에 바인딩되어 있으므로 괜찮다고 생각하므로 getNewOrders 요소에 네임 스페이스가 필요하지 않습니다. 나 맞아?
누군가 내가 WSDL에서 수정해야 할 사항을 지적 해주십시오. 나는 길을 잃었다.
'https : // b2bqa.shoprite.co.za/b2b /'가'https : // xxx.yyy.co.uk/b2b /'와 동일하다는 것을 의미합니까? –
@ 존 : 고마워. 예, 죄송합니다. 편집했습니다. – Peter