Good day,
I'm using Axis2 1.4 with tomcat5.5 and created both service and client from
a scratch with AXIOM via HTTP port.
And they worked together like charm, just before i'm beggining to put them
under some load. Even when there is just 3 simultaneous calls - one of my
client threads written with AXIOM begins to throw varied exceptions without
any stack trace, like:
org.apache.axiom.om.OMException
or
org.apache.axiom.om.OMException: javax.xml.stream.XMLStreamException:
ParseError at [row,col]:[1,1]
Message: An invalid XML character (Unicode: 0x0) was found in the comment.
or
com.sun.org.apache.xerces.internal.xni.XNIException: Scanner State 7 not
Recognized
or
org.apache.axiom.om.OMException: javax.xml.stream.XMLStreamException:
ParseError at [row,col]:[1,1]
Message: Open quote is expected for attribute "{1}" associated with an
element type "name".
or
... and this happens not always, but approx. 1/3 times of 3 simultaneus
threads starts.
Here is my code:
OMElement method = fac.createOMElement(new QName(chartName));
for(String key : keys){
OMElement value = fac.createOMElement(new QName(key));
String mapvalue = ((String[]) params.get(key))[0];
value.addChild(fac.createOMText(value, mapvalue));
method.addChild(value);
}
Options options = new Options();
options.setTo(ApplicationProperties.targetEPRFinance);
options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
OMElement result = fac.createOMElement(new
QName("EmptyResult"));
System.out.println("Payload for service: " +
method.toString());
try {
ServiceClient sender = new ServiceClient();
sender.setOptions(options);
result = sender.sendReceive(method);
} catch (AxisFault e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
System.out.println("Result from service: " +
result.toString());
I would be happy by any advices.
Bye,
Daniil Chipenko