Hello There! Good Morning!
I'm with a problem here.
I have to send a XML through a WebService.
This XML must be compressed on a ZLib format, and then put on Base64 format.
Until here, everything is OK.
when I send this XML and the structure and the information is wrong I receive the a small return saying me what is wrong, and this is working fine.
My problem is when I send everything right and I should receive another XML that's contains important information for me, I receive just part of the XML.
But after some tests, I realized that when I receive the answer. I got only a part of it. The return XML is cut in a random place. Like if the communication was ended before have finished. I receive all time around 4-6ko. The size is not constant.
I thought about a network problem. I have tested in another network, is the same.
I add a timeout on my side but nothing change.
I really don't know what more to try.
Here go my codes:
public String envioWs(String msg){
try{
String urlWS = "URL";
Object[] params = {geraMsgComp(msg)};
Service service = new Service();
Call call = (Call) service.createCall();
call.setTargetEndpointAddress(urlWS);
call.setOperationName("OPERATION");
String ret = (String) call.invoke(params);
ret = geraString(ret.getBytes());
return ret;
}
catch(Exception ex){
ex.printStackTrace();
return null;
}
}
The method "geraMsgComp" just compressed the XML on a ZLib format, and then put on Base64 format, the method "geraString" does exactly the reversion.
any ideas???
Thanks for your future advises.