0

我得到了这个例外:

服务器无法处理请求。---> 值不能为空。参数名称:输入

我怎样才能找到参数:input?而且,我该如何解决根本问题?我正在从 Java 客户端调用 ASP.net 中的 Web 方法。

这是代码:

public org.tempuri.UpdateInsuredDetails_Output recieveMDMDataInsuredDetails(
        org.tempuri.UpdateInsuredDetails_Input l_input)
        throws java.rmi.RemoteException {
    if (super.cachedEndpoint() == null) {
        throw new org.apache.axis.NoEndPointException();
    }
    org.apache.axis.client.Call _call = createCall();
    _call.setOperation(_operations[2]);
    _call.setUseSOAPAction(true);
    _call.setSOAPActionURI("http://tempuri.org/RecieveMDMDataInsuredDetails");
    _call.setEncodingStyle(null);
    _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR,
            Boolean.FALSE);
    _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS,
            Boolean.FALSE);
    _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
    _call.setOperationName(new javax.xml.namespace.QName(
            "http://tempuri.org/", "RecieveMDMDataInsuredDetails"));
    setRequestHeaders(_call);

    setAttachments(_call);
    try {
        logger.info("this is where i get the error:");
        java.lang.Object _resp = _call
                .invoke(new java.lang.Object[] { l_input });
        if (_resp instanceof java.rmi.RemoteException) {
            throw (java.rmi.RemoteException) _resp;
        } else {
            extractAttachments(_call);
            try {
                return (org.tempuri.UpdateInsuredDetails_Output) _resp;
            } catch (java.lang.Exception _exception) {
                return (org.tempuri.UpdateInsuredDetails_Output) org.apache.axis.utils.JavaUtils
                        .convert(
                                _resp,
                                org.tempuri.UpdateInsuredDetails_Output.class);
            }
        }
    } catch (org.apache.axis.AxisFault axisFaultException) {
        throw axisFaultException;
    }
}

这就是我调用recieveMDMDataInsuredDetails方法的方式:

InsuredDetailsLocator MDP_locator =new InsuredDetailsLocator(); 
            MDP_locator.setInsuredDetailsSoapEndpointAddress("http://mgnt184:8056/MDP_InsuredDetails_WS/InsuredDetails.asmx?wsdl");
            InsuredDetailsSoapStub service= (InsuredDetailsSoapStub)MDP_locator.getInsuredDetailsSoap(); 
            UpdateInsuredDetails_Input request_MDP =new UpdateInsuredDetails_Input();
            request_MDP.setSystemName(urlProps.getProperty("xxx"));
            request_MDP.setSystemPassword(urlProps.getProperty("xxxx"));

            request_MDP.setMS_ZIHUY(insuree.getMsZihuy());
            request_MDP.setKOD_CHEVRA(insuree.getKodChevra());
            request_MDP.setFAMILY_NAME(insuree.getFamilyName());
            request_MDP.setFIRST_NAME(insuree.getFirstName());
            request_MDP.setKOD_MIN(insuree.getKodMin());
//calling the method:   
UpdateInsuredDetails_Output response_MDP= service.recieveMDMDataInsuredDetails(request_MDP);

也许它input提到的是 xml 文件中的那个:

<wsdl:portType name="InsuredDetailsSoap">
<wsdl:operation name="GetInsuredDetails">
<wsdl:input message="tns:GetInsuredDetailsSoapIn" />
<wsdl:output message="tns:GetInsuredDetailsSoapOut" />
</wsdl:operation>
<wsdl:operation name="UpdateInsuredDetails">
<wsdl:input message="tns:UpdateInsuredDetailsSoapIn" />
<wsdl:output message="tns:UpdateInsuredDetailsSoapOut" />
</wsdl:operation>
<wsdl:operation name="RecieveMDMDataInsuredDetails">
<wsdl:input message="tns:RecieveMDMDataInsuredDetailsSoapIn" />
<wsdl:output message="tns:RecieveMDMDataInsuredDetailsSoapOut" />
</wsdl:operation>
</wsdl:portType>
4

1 回答 1

0

似乎是在说l_input……null而且不应该是。

但是l_inputrecieveMDMDataInsuredDetails方法的参数。

因此,据此,我得出结论,方法是使用无效参数调用的。看看(你的?)代码在哪里调用方法,等等。


如果这没有帮助,请将异常的完整堆栈跟踪以及调用recieveMDMDataInsuredDetails.

(请修复代码中的拼写错误。它让我的大脑受伤!“recieve”->“receive”!!!)

于 2013-03-12T12:38:43.360 回答