我得到了这个例外:
服务器无法处理请求。---> 值不能为空。参数名称:输入
我怎样才能找到参数: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>