Hi all,
I have generated source files by running wsdl2java, Axis2 version 0.95.
I log every incoming and outgoing soap message of my web service by
storing the messages in a database in a clob. At the moment I use the
following code snippet to get the message as a string:
msgContext.getEnvelope().toString();
This is not so good because the whole message is printed on one line,
which makes it very hard to read. Is there some method that formats the
message (i.e. inserts tabs and new lines)?
I have also problems adding soap headers to an AxisFault. I have tried
this with no success:
TransactionIdDocument transiddoc =
TransactionIdDocument.Factory.newInstance();
transiddoc.setTransactionId("1234");
OMElement elem = toOM(transiddoc, true);
SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();
SOAPHeader header = factory.createSOAPHeader();
header.addChild(elem);
AxisFault fault = new AxisFault("Error message.");
fault.addHeader(header);
throw fault;
The soap fault element returned is correct, but the soap header is not
part of the soap envelope. It seems that Axis just ignores it.
I'm very thankful for an answer.
-Peter
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]