Web services Webservice调用正在返回faultString“;找不到命名空间/soapAction的分派方法;

Web services Webservice调用正在返回faultString“;找不到命名空间/soapAction的分派方法;,web-services,soap,soap-client,Web Services,Soap,Soap Client,我从客户机进行的Webservice调用工作正常,直到我为身份验证添加了SOAP头,现在客户机出现以下错误 <faultcode>S:Client</faultcode><faultstring>Cannot find dispatch method for {http://com.analysis.num/}doNumAnalysis</faultstring> S:client找不到分派方法 为了{http://com.analysis.

我从客户机进行的Webservice调用工作正常,直到我为身份验证添加了SOAP头,现在客户机出现以下错误

 <faultcode>S:Client</faultcode><faultstring>Cannot find dispatch method
 for {http://com.analysis.num/}doNumAnalysis</faultstring>
S:client找不到分派方法
为了{http://com.analysis.num/}多诺分析
下面是WSDL,其中包括最近为在SOAP头中添加身份验证信息所做的更改,这里有什么明显的遗漏吗

<?xml version='1.0' encoding='UTF-8'?>
<definitions xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://com.analysis.num/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://com.analysis.num/" name="NumericAnalysisService">
<types>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1.0"
        targetNamespace="http://com.analysis.num/">
        <xs:element name="doNumAnalysis" type="tns:doNumAnalysis" />
        <xs:element name="doNumAnalysisResponse" type="tns:doNumAnalysisResponse" />
        <xs:complexType name="doNumAnalysis">
            <xs:sequence>
                <xs:element name="numRequest" type="tns:numRequest" minOccurs="0" />
            </xs:sequence>
        </xs:complexType>
        <xs:complexType name="numRequest">
            <xs:sequence>
                <xs:element name="Analysis_Type" type="xs:string" />
                <xs:element name="Analysis_Id" type="xs:string" />
                <xs:element name="Customer_Id" type="xs:string" />
                <xs:element name="Source_Request_Id" type="xs:string" />
                <xs:element name="Destination_Request_Id" type="xs:string" />
                <xs:element name="Target_Customer_Id" minOccurs="0" type="xs:string" />
                <xs:element name="AnalysisFile" minOccurs="0" type="xs:string" />
            </xs:sequence>
        </xs:complexType>
        <xs:complexType name="doNumAnalysisResponse">
            <xs:sequence />
        </xs:complexType>
       <xs:element name="AuthenticationInfo" type="tns:AuthenticationInfo"/>
       <xs:complexType name="AuthenticationInfo">
        <xs:sequence>
         <xs:element name="userName" type="xsd:string"/>
         <xs:element name="password" type="xsd:string"/>
         <xs:element minOccurs="0" name="authentication" type="xsd:string"/>
         <xs:element minOccurs="0" name="locale" type="xsd:string"/>
         <xs:element minOccurs="0" name="timeZone" type="xsd:string"/>
        </xs:sequence>
       </xs:complexType>
    </xs:schema>
</types>
<message name="doNumAnalysis">
    <part name="parameters" element="tns:doNumAnalysis" />
</message>
<message name="doNumAnalysisResponse">
    <part name="parameters" element="tns:doNumAnalysisResponse" />
</message>
<message name="ARAuthenticate">
    <part element="tns:AuthenticationInfo" name="parameters">
    </part>
</message>
<portType name="NumericAnalysisService">
    <operation name="doNumAnalysis">
        <input wsam:Action="http://com.analysis.num/NumericAnalysisService/doNumAnalysisRequest" message="tns:doNumAnalysis" />
        <output wsam:Action="http://com.analysis.num/NumericAnalysisService/doNumAnalysisResponse" message="tns:doNumAnalysisResponse" />
    </operation>
</portType>
<binding name="NumericAnalysisServicePortBinding" type="tns:NumericAnalysisService">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
    <operation name="doNumAnalysis">
        <soap:operation soapAction="" />
        <input>
            <soap:header message="tns:ARAuthenticate" part="parameters" use="literal">
            </soap:header>
            <soap:body use="literal" />
        </input>
        <output>
            <soap:body use="literal" />
        </output>
    </operation>
</binding>
<service name="NumericAnalysisService">
    <port name="NumericAnalysisServicePort" binding="tns:NumericAnalysisServicePortBinding">
        <soap:address location="https://testserver/bmcems/NumericAnalysisService" />
    </port>
</service>
</definitions>

找到了上述问题的答案,问题是SOAP头的新消息部分使用了已在使用的名称
参数
,将其重命名为
authParameters
解决了此问题

上述WSDL中的以下更改修复了此问题: