Home > Back-end >  Axis call. Invoke transfer parameter value error when the parameter value is too large
Axis call. Invoke transfer parameter value error when the parameter value is too large

Time:12-04

 public static Map ParamsName sendWebservice (String methodName, Object [], the Object [] paramsValue) {
Org. Apache. Axis. The client. The Service Service=new org. Apache. Axis. The client. The Service ();
String ret="";
Map The map=new HashMap (a);
Try {

The service Call Call=(Call). CreateCall ();

Call. SetTargetEndpointAddress (hotline_webserviceUrl);

Call. SetOperationName (new QName (hotline_webserviceAction, methodName));//set which method to invoke

for (int i=0; I & lt; ParamsName. Length; I++) {
//set to pass the parameter name
Call addParameter (new QName (hotline_webserviceAction, (String) paramsName [I]),
Org. Apache. Axis. Encoding. XMLType. XSD_STRING,
Javax.mail. XML. RPC. ParameterMode. IN);
}
Call setReturnType (. Org. Apache axis. Encoding. XMLType. XSD_STRING);//(standard type)
Call. SetUseSOAPAction (true);
Call. SetSOAPActionURI (hotline_webserviceAction + methodName);

Ret.=(String) call invoke (paramsValue);//call the method and pass the parameter value
String requestXml=call. GetMessageContext (.) getRequestMessage () getSOAPPartAsString ();
String responseXml=ret;
Logger. The info (" the method name: "+ methodName);
Logger. The info (" sending XML: "+ requestXml);
Logger. The info (" returned XML: "+ responseXml);
Map. The put (" requestXml requestXml);
The map. The put (" responseXml, "responseXml);

//System. Out. Println (map);
{} the catch (Exception ex)
ex.printStackTrace();
Logger. The error (" call interface error, "the ex);
}
Return the map;

}

ParamsValue is an XML String, when there is attachment is the base64 String transcoding when the attachment is a problem when the attachment is more than 3 m ret.=(String) call invoke (paramsValue) this line error error message for
 call interface error 
AxisFault
FaultCode: {http://schemas.xmlsoap.org/soap/envelope/} for Server userException
FaultSubcode:
FaultString: java.net.SocketException: Software under caused connection abort: recv failed
FaultActor:
FaultNode:
FaultDetail:
{http://xml.apache.org/axis/} stackTrace:java.net.SocketException: Software under caused connection abort: recv failed
The at java.net.SocketInputStream.socketRead0 (Native Method)
The at java.net.SocketInputStream.read (Unknown Source)
The at java.net.SocketInputStream.read (Unknown Source)
The at Java. IO. BufferedInputStream. The fill (Unknown Source)
The at Java. IO. BufferedInputStream. Read (Unknown Source)
The at org. Apache. Axis. Transport. HTTP. In the HTTPSender. ReadHeadersFromSocket (583) in the HTTPSender. Java:
The at org. Apache. Axis. Transport. HTTP. In the HTTPSender. Invoke (143) in the HTTPSender. Java:
The at org. Apache. Axis. Strategies. InvocationStrategy. Visit (InvocationStrategy. Java: 32)
The at org. Apache. Axis. SimpleChain. DoVisiting (SimpleChain. Java: 118)
The at org. Apache. Axis. SimpleChain. Invoke (SimpleChain. Java: 83)
At org. Apache. Axis. Client. AxisClient. Invoke (AxisClient. Java: 165)
At org. Apache. Axis. Client. Call. InvokeEngine (2784) Call. Java:
At org. Apache. Axis. Client. Call. Invoke (2767) Call. Java:
At org. Apache. Axis. Client. Call. Invoke (2443) Call. Java:
At org. Apache. Axis. Client. Call. Invoke (2366) Call. Java:
At org. Apache. Axis. Client. Call. Invoke (1812) Call. Java:
At com. Rexianban. Service. SoapWebService. SendWebservice (SoapWebService. Java: 105)

  • Related