在调用SOAP Web服务时获取错误AxisFault faultCode:90010001

时间:2014-06-24 11:55:23

标签: web-services soap wsdl soap-client webservice-client

我已经从WSDL / WSDL URL创建了SOAP Web服务客户端,并尝试调用服务。 我收到此错误(错误跟踪)

AxisFault
 faultCode: 90010001
 faultSubcode: 
 faultString: Mandatory field is not set in EAI_SOAPINPUT; Element -> Environment.eaiCommon.BTID, Environment.eaiCommon.Header.ChannelID, Environment.eaiCommon.Header.RequestUUID, Environment.eaiCommon.Header.ServiceRequestId, Environment.eaiCommon.Header.ServiceRequestVersion
 faultActor: 
 faultNode: 
 faultDetail: 
    {http://xml.apache.org/axis/}stackTrace:Mandatory field is not set in EAI_SOAPINPUT; Element -> Environment.eaiCommon.BTID, Environment.eaiCommon.Header.ChannelID, Environment.eaiCommon.Header.RequestUUID, Environment.eaiCommon.Header.ServiceRequestId, Environment.eaiCommon.Header.ServiceRequestVersion
    at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
    at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
    at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
    at javax.xml.parsers.SAXParser.parse(Unknown Source)
    at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
    at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
    at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
    at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
    at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
    at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
    at org.apache.axis.client.Call.invoke(Call.java:2767)
    at org.apache.axis.client.Call.invoke(Call.java:2443)
    at org.apache.axis.client.Call.invoke(Call.java:2366)
    at org.apache.axis.client.Call.invoke(Call.java:1812)
    at uk.co.mclsoftware.www.HunterII.WebServices.MatchingSoapStub.match(MatchingSoapStub.java:116)
    at uk.co.mclsoftware.www.HunterII.WebServices.MatchingSoapProxy.match(MatchingSoapProxy.java:50)
    at com.huntermatching.test.TestClient.main(TestClient.java:14)

它要求我提供必填字段。 这是什么错误?

来自wsdl的

消息部分:

<wsdl:message name="subHeader">
        <wsdl:part element="xsd:subHeader" name="subHeader" />
    </wsdl:message>
    <wsdl:message name="MatchSoapIn">
        <wsdl:part element="tns:Match" name="parameters" />
    </wsdl:message>
    <wsdl:message name="MatchSoapOut">
        <wsdl:part element="tns:MatchResponse" name="parameters" />
    </wsdl:message>
    <wsdl:portType name="MatchingSoap">
        <wsdl:operation name="Match">
            <wsdl:input message="tns:MatchSoapIn" />
            <wsdl:output message="tns:MatchSoapOut" />
        </wsdl:operation>
    </wsdl:portType>

我的客户端java类是

public class TestMatchClient {

    public static void main(String[] args) {

        try {
            MatchingSoapProxy matchObj = new MatchingSoapProxy();

            String  controlXml="TestXmlString",batchXml="TestBatchXmlString",uName ="MyUserName",pass = "MyPass";

            matchObj.match(controlXml, batchXml, uName, pass);

        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

}

0 个答案:

没有答案