我提供了以下用于登出的WSDL请求..
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><Logout xmlns="http://tempuri.org/wsdl/"><vsSecurityKey>0</vsSecurityKey></Logout></soap:Body></soap:Envelope>
我收到以下回复:
faultcode:SOAP-ENV:服务器
faultstring:WSDLReader:Soap消息中请求的操作 使用soapAction http://tempuri.org/wsdl/Logout未定义 WSDL文件。这可能是因为它在错误的命名空间中或具有 不正确的情况
我不确定这里的命名空间是什么。任何想法..
以下是WSDL文件(我已经采取了与Logout相关的部分)
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated 04/04/06 by Microsoft SOAP Toolkit WSDL File Generator, Version 1.02.813.0 -->
<definitions name="nsi_soap" targetNamespace="http://tempuri.org/wsdl/" xmlns:wsdlns="http://tempuri.org/wsdl/" xmlns:typens="http://tempuri.org/type" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:stk="http://schemas.microsoft.com/soap-toolkit/wsdl-extension" xmlns="http://schemas.xmlsoap.org/wsdl/">
<types>
<schema targetNamespace="http://tempuri.org/type" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" elementFormDefault="qualified">
</schema>
</types>
<message name="SOAP_2.Logout">
<part name="vsSecurityKey" type="xsd:string"/>
</message>
<message name="SOAP_2.LogoutResponse">
</message>
<message name="SOAP_2.Login">
<part name="vsUserId" type="xsd:string"/>
<part name="vsPassword" type="xsd:string"/>
<part name="vlOrgId" type="xsd:int"/>
</message>
<message name="SOAP_2.LoginResponse">
<part name="Result" type="xsd:string"/>
</message>
<portType name="SOAP_2SoapPort">
<operation name="CreateMergeRequest" parameterOrder="vsSecurityKey vsNSN0 vsNSN1 vsNSN2 vsNSN3 vsNSN4 vsNSN5 vsNSN6 vsNSN7 vsNSN8 vsNSN9 vsUser">
<input message="wsdlns:SOAP_2.CreateMergeRequest"/>
<output message="wsdlns:SOAP_2.CreateMergeRequestResponse"/>
</operation>
<operation name="Update" parameterOrder="vsSessionKey vsNSN vsSurname vsForename1 vsForename2 vsForename3 vsDOB vsPreferredName vsNameDOBVerification vsResidentialStatus vsResidentialVerification vsGender vsUser vsAltSurname vsAltForename1 vsAltForename2 vsAltForename3 vsAltPreferredName vsAltNameDobVerification">
<input message="wsdlns:SOAP_2.Update"/>
<output message="wsdlns:SOAP_2.UpdateResponse"/>
</operation>
<operation name="Insert" parameterOrder="vsSecurityKey vsSurname vsForename1 vsForename2 vsForename3 vsDOB vsPreferredName vsNameDOBVerification vsResidentialStatus vsResidentialStatusVerification vsGender vsAlias_lastname vsAlias_forename1 vsAlias_forename2 vsAlias_forename3 vsAlias_prefered vsAlias_NameDOBVerification vsOverride vsUser">
<input message="wsdlns:SOAP_2.Insert"/>
<output message="wsdlns:SOAP_2.InsertResponse"/>
</operation>
<operation name="Search" parameterOrder="vsSecurityKey vsNSN vsName vsDOB vsGender vsResidentialStatus vsUser">
<input message="wsdlns:SOAP_2.Search"/>
<output message="wsdlns:SOAP_2.SearchResponse"/>
</operation>
<operation name="Logout" parameterOrder="vsSecurityKey">
<input message="wsdlns:SOAP_2.Logout"/>
<output message="wsdlns:SOAP_2.LogoutResponse"/>
</operation>
<operation name="Login" parameterOrder="vsUserId vsPassword vlOrgId">
<input message="wsdlns:SOAP_2.Login"/>
<output message="wsdlns:SOAP_2.LoginResponse"/>
</operation>
</portType>
<binding name="SOAP_2SoapBinding" type="wsdlns:SOAP_2SoapPort">
<stk:binding preferredEncoding="UTF-8"/>
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="Logout">
<soap:operation soapAction="http://tempuri.org/action/SOAP_2.Logout"/>
<input>
<soap:body use="encoded" namespace="http://tempuri.org/message/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</input>
<output>
<soap:body use="encoded" namespace="http://tempuri.org/message/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</output>
</operation>
<operation name="Login">
<soap:operation soapAction="http://tempuri.org/action/SOAP_2.Login"/>
<input>
<soap:body use="encoded" namespace="http://tempuri.org/message/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</input>
<output>
<soap:body use="encoded" namespace="http://tempuri.org/message/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</output>
</operation>
</binding>
<service name="nsi_soap">
<port name="SOAP_2SoapPort" binding="wsdlns:SOAP_2SoapBinding">
<soap:address location="https://nsicompl.nsi.govt.nz/interface/nsi_soap.wsdl"/>
</port>
</service>
</definitions>