Hi Everyone,
I managed to find a solution for this. In case anyone is interested, here it
is:
org.apache.axis2.description.AxisOperation op =
msgContext.getOperationContext().getAxisOperation();
envelope = msgContext.getEnvelope()
Iterator<OMElement> iter =
envelope.getBody().getFirstElement().getChildElements();
while(iter.hasNext()) {
OMElement omElem = iter.next();
System.out.println(omElem.getText());
System.out.println(omElem.getQName().getLocalPart());
}
Same can be done for the response parameters, by getting the envelope as
such:
envelope = toEnvelope(getSOAPFactory(msgContext), <your_func_name>Response,
false);
From: Yoav Naveh [mailto:[email protected]]
Sent: Monday, February 02, 2009 9:55 AM
To: [email protected]
Subject: Getting all parameters of the request
Hello,
I would like to be able to log all the parameters given to my WS function.
To do so in the most generic way, I was wondering if there is any way to
iterate all input parameters from the MessageContext or anything similar.
For example, suppose my WS exposes a function called test that receives 3
String parameters as input,
I would like to print these variables and values to my log, without querying
for them in the function implementation.
Instead, I would like each exposed function's implementation call one
utility function to extract all the fields.
Does anyone know of a way to perform this?
In addition, I would like to do something similar with the response (save
all returned variables to a log file without function-specific
implementation)
Thanks!
Yoav