axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From William Walsh <WWa...@curamsoftware.com>
Subject RE: Axis 1.x to Axis2 - intercepting all messages?
Date Tue, 10 Nov 2009 20:23:34 GMT
Amila,  Thanks very much for the article it is a great help.  I see you are the author of the
article and I had a question/comment about it.  It says:
"
Axis engine invokes in flow handlers for the given message, and at the end, it invokes the
message receiver. Here, it should be noted that it is up to the message receiver XML info
set is represented as an axiom object model and data binding (i.e converting xml info set
to java objects and converting java objects to xml info set) is taken place at the message
receiver. Finally, message receiver invokes service methods with Java objects.
"
Then the article a little later says:
"
As explained earlier axis2 data binding happens after message receiver and before the client
api.
"

Those two seem a little contradictory (at & after) and I was a little concerned about
that because our current Axis 1.4 implementation that extends RPCProvider doesn't handle the
SOAP message and just calls the underlying service.  So, I turned on Axis2 debug trace and
added some additional trace calls to better understand the flow and it looks, at least in
this case (below), that the order is: data binding (,837), MessageReceiver (,852), service
method (,915), and then the umarshalling on the out flow (,930).  Does that seem right to
you, or am I misunderstanding terminology, etc.?

This is the trace output, which I've edited to make it more succinct:
...
,649 axiom.soap.impl.builder.StAXSOAPModelBuilder  - Starting to process SOAP 1.2 message
,649 axiom.soap.impl.builder.StAXSOAPModelBuilder  - Build the OMElement Envelope by the StaxSOAPModelBuilder
,665 axiom.soap.impl.builder.StAXSOAPModelBuilder  - Build the OMElement Body by the StaxSOAPModelBuilder
,665 axis2.engine.Phase  - [MessageContext: logID=urn:uuid:23202C4F3879831BA71257461489695]
Checking pre-condition for Phase "Transport"
,665 axis2.engine.Phase  - [MessageContext: logID=urn:uuid:23202C4F3879831BA71257461489695]
Invoking phase "Transport"
,665 axis2.engine.Phase  - [MessageContext: logID=urn:uuid:23202C4F3879831BA71257461489695]
Invoking Handler 'RequestURIBasedDispatcher' in Phase 'Transport'
,665 axis2.dispatchers.RequestURIBasedServiceDispatcher  - [MessageContext: logID=urn:uuid:23202C4F3879831BA71257461489695]
Checking for Service using target endpoint address : http://localhost:8080/axis2/services/SampleService
...
,680 axis2.engine.AbstractDispatcher  - [MessageContext: logID=urn:uuid:23202C4F3879831BA71257461489695]
Found AxisService : SampleService
,680 axis2.engine.Phase  - [MessageContext: logID=urn:uuid:23202C4F3879831BA71257461489695]
Invoking Handler 'SOAPActionBasedDispatcher' in Phase 'Transport'
,680 axis2.dispatchers.ActionBasedOperationDispatcher  - [MessageContext: logID=urn:uuid:23202C4F3879831BA71257461489695]
Checking for Operation using Action : urn:multipleParameters
,680 axis2.description.AxisService  - getOperationBySOAPAction: Operation (org.apache.axis2.description.InOutAxisOperation@13785d3,multipleParameters)
for soapAction: urn:multipleParameters found in action map.
...
,680 axis2.engine.Phase  - [MessageContext: logID=urn:uuid:23202C4F3879831BA71257461489695]
Checking post-conditions for phase "Transport"
,680 axis2.engine.Phase  - [MessageContext: logID=urn:uuid:23202C4F3879831BA71257461489695]
Checking pre-condition for Phase "Addressing"
,680 axis2.engine.Phase  - [MessageContext: logID=urn:uuid:23202C4F3879831BA71257461489695]
Invoking phase "Addressing"
,680 axis2.engine.Phase  - [MessageContext: logID=urn:uuid:23202C4F3879831BA71257461489695]
Invoking Handler 'AddressingInHandler' in Phase 'Addressing'
,680 axis2.engine.Phase  - [MessageContext: logID=urn:uuid:23202C4F3879831BA71257461489695]
Invoking Handler 'AddressingBasedDispatcher' in Phase 'Addressing'
,680 axis2.engine.Phase  - [MessageContext: logID=urn:uuid:23202C4F3879831BA71257461489695]
Checking post-conditions for phase "Addressing"
,680 axis2.engine.Phase  - [MessageContext: logID=urn:uuid:23202C4F3879831BA71257461489695]
Checking pre-condition for Phase "Security"
,680 axis2.engine.Phase  - [MessageContext: logID=urn:uuid:23202C4F3879831BA71257461489695]
Invoking phase "Security"
,680 axis2.engine.Phase  - [MessageContext: logID=urn:uuid:23202C4F3879831BA71257461489695]
Checking post-conditions for phase "Security"
,680 axis2.engine.Phase  - [MessageContext: logID=urn:uuid:23202C4F3879831BA71257461489695]
Checking pre-condition for Phase "PreDispatch"
,680 axis2.engine.Phase  - [MessageContext: logID=urn:uuid:23202C4F3879831BA71257461489695]
Invoking phase "PreDispatch"
,680 axis2.engine.Phase  - [MessageContext: logID=urn:uuid:23202C4F3879831BA71257461489695]
Checking post-conditions for phase "PreDispatch"
,680 axis2.engine.Phase  - [MessageContext: logID=urn:uuid:23202C4F3879831BA71257461489695]
Checking pre-condition for Phase "Dispatch"
,680 axis2.engine.Phase  - [MessageContext: logID=urn:uuid:23202C4F3879831BA71257461489695]
Invoking phase "Dispatch"
,680 axis2.engine.Phase  - [MessageContext: logID=urn:uuid:23202C4F3879831BA71257461489695]
Invoking Handler 'RequestURIBasedDispatcher' in Phase 'Dispatch'
,680 axis2.engine.Phase  - [MessageContext: logID=urn:uuid:23202C4F3879831BA71257461489695]
Invoking Handler 'SOAPActionBasedDispatcher' in Phase 'Dispatch'
,680 axis2.engine.Phase  - [MessageContext: logID=urn:uuid:23202C4F3879831BA71257461489695]
Invoking Handler 'RequestURIOperationDispatcher' in Phase 'Dispatch'
,680 axis2.engine.Phase  - [MessageContext: logID=urn:uuid:23202C4F3879831BA71257461489695]
Invoking Handler 'SOAPMessageBodyBasedDispatcher' in Phase 'Dispatch'
,680 axis2.engine.Phase  - [MessageContext: logID=urn:uuid:23202C4F3879831BA71257461489695]
Invoking Handler 'AddressingValidationHandler' in Phase 'Dispatch'
,680 axis2.addressing.AddressingHelper  - getAddressingRequirementParemeterValue: value: 'null'
,680 axis2.addressing.AddressingHelper  - getInvocationPatternParameterValue: value: 'null'
,680 axis2.engine.Phase  - [MessageContext: logID=urn:uuid:23202C4F3879831BA71257461489695]
Invoking Handler 'HTTPLocationBasedDispatcher' in Phase 'Dispatch'
,680 axis2.engine.Phase  - [MessageContext: logID=urn:uuid:23202C4F3879831BA71257461489695]
Invoking Handler 'GenericProviderDispatcher' in Phase 'Dispatch'
,680 axis2.engine.Phase  - [MessageContext: logID=urn:uuid:23202C4F3879831BA71257461489695]
Invoking Handler 'MustUnderstandValidationDispatcher' in Phase 'Dispatch'
,680 axis2.jaxws.dispatchers.MustUnderstandValidationDispatcher  - JAXWS MustUnderstandValidationDispatcher.invoke
on AxisService SampleService; AxisOperation org.apache.axis2.description.InOutAxisOperation@13785d3
,680 axis2.engine.Phase  - [MessageContext: logID=urn:uuid:23202C4F3879831BA71257461489695]
Checking post-conditions for phase "Dispatch"
,680 axis2.addressing.AddressingHelper  - [MessageContext: logID=urn:uuid:23202C4F3879831BA71257461489695]
isReplyRedirected: ReplyTo is null. Returning false
,680 axis2.engine.Phase  - [MessageContext: logID=urn:uuid:23202C4F3879831BA71257461489695]
Checking pre-condition for Phase "RMPhase"
,680 axis2.engine.Phase  - [MessageContext: logID=urn:uuid:23202C4F3879831BA71257461489695]
Invoking phase "RMPhase"
,680 axis2.engine.Phase  - [MessageContext: logID=urn:uuid:23202C4F3879831BA71257461489695]
Checking post-conditions for phase "RMPhase"
,680 axis2.engine.Phase  - [MessageContext: logID=urn:uuid:23202C4F3879831BA71257461489695]
Checking pre-condition for Phase "OperationInPhase"
,680 axis2.engine.Phase  - [MessageContext: logID=urn:uuid:23202C4F3879831BA71257461489695]
Invoking phase "OperationInPhase"
,680 axis2.engine.Phase  - [MessageContext: logID=urn:uuid:23202C4F3879831BA71257461489695]
Invoking Handler 'MustUnderstandChecker' in Phase 'OperationInPhase'
,696 axis2.engine.Phase  - [MessageContext: logID=urn:uuid:23202C4F3879831BA71257461489695]
Checking post-conditions for phase "OperationInPhase"
,696 axiom.om.util.StAXUtils  - About to create XMLOutputFactory implementation with classloader=WebappClassLoader
...
,790 axiom.om.util.StAXUtils  - Size of XMLOutputFactory map =1
,805 axiom.om.util.StAXUtils  - XMLStreamWriter is com.ctc.wstx.sw.SimpleNsStreamWriter
,837 axiom.soap.impl.builder.StAXSOAPModelBuilder  - Build the OMElement multipleParameters
by the StaxSOAPModelBuilder
,837 axiom.soap.impl.builder.StAXSOAPModelBuilder  - Build the OMElement price by the StaxSOAPModelBuilder
,837 axiom.soap.impl.builder.StAXSOAPModelBuilder  - Build the OMElement itemId by the StaxSOAPModelBuilder
,837 axiom.soap.impl.builder.StAXSOAPModelBuilder  - Build the OMElement description by the
StaxSOAPModelBuilder
,837 axiom.soap.impl.builder.StAXSOAPModelBuilder  - Build the OMElement itemName by the StaxSOAPModelBuilder
,837 axiom.om.impl.MTOMXMLStreamWriter  - Calling MTOMXMLStreamWriter.flush
,852 axis2.context.ConfigurationContext  - messageID is null.
,852 axis2.rpc.receivers.RPCMessageReceiver  - In org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(MessageContext,
MessageContext) for  class sample.service.SampleService - SampleService
,915 ice.SampleService  - In SampleService.multipleParameters price=20.2 itemId=999 description=blah
blah, woof woof itemName=nothing
,930 axiom.om.util.StAXUtils  - XMLStreamWriter is com.ctc.wstx.sw.SimpleNsStreamWriter
,930 axiom.om.impl.MTOMXMLStreamWriter  - Calling MTOMXMLStreamWriter.flush
,930 axis2.engine.Phase  - [MessageContext: logID=urn:uuid:23202C4F3879831BA71257461489961]
Checking pre-condition for Phase "OperationOutPhase"
,930 axis2.engine.Phase  - [MessageContext: logID=urn:uuid:23202C4F3879831BA71257461489961]
Invoking phase "OperationOutPhase"
,930 axis2.engine.Phase  - [MessageContext: logID=urn:uuid:23202C4F3879831BA71257461489961]
Invoking Handler 'DispatchOperationHandler' in Phase 'OperationOutPhase'
,930 axis2.engine.Phase  - [MessageContext: logID=urn:uuid:23202C4F3879831BA71257461489961]
Checking post-conditions for phase "OperationOutPhase"
,930 axis2.engine.Phase  - [MessageContext: logID=urn:uuid:23202C4F3879831BA71257461489961]
Checking pre-condition for Phase "RMPhase"
,930 axis2.engine.Phase  - [MessageContext: logID=urn:uuid:23202C4F3879831BA71257461489961]
Invoking phase "RMPhase"
,930 axis2.engine.Phase  - [MessageContext: logID=urn:uuid:23202C4F3879831BA71257461489961]
Checking post-conditions for phase "RMPhase"
,930 axis2.engine.Phase  - [MessageContext: logID=urn:uuid:23202C4F3879831BA71257461489961]
Checking pre-condition for Phase "PolicyDetermination"
,930 axis2.engine.Phase  - [MessageContext: logID=urn:uuid:23202C4F3879831BA71257461489961]
Invoking phase "PolicyDetermination"
,930 axis2.engine.Phase  - [MessageContext: logID=urn:uuid:23202C4F3879831BA71257461489961]
Checking post-conditions for phase "PolicyDetermination"
,930 axis2.engine.Phase  - [MessageContext: logID=urn:uuid:23202C4F3879831BA71257461489961]
Checking pre-condition for Phase "MessageOut"
,930 axis2.engine.Phase  - [MessageContext: logID=urn:uuid:23202C4F3879831BA71257461489961]
Invoking phase "MessageOut"
,930 axis2.engine.Phase  - [MessageContext: logID=urn:uuid:23202C4F3879831BA71257461489961]
Invoking Handler 'AddressingOutHandler' in Phase 'MessageOut'
,930 axis2.engine.Phase  - [MessageContext: logID=urn:uuid:23202C4F3879831BA71257461489961]
Checking post-conditions for phase "MessageOut"
,930 axis2.engine.Phase  - [MessageContext: logID=urn:uuid:23202C4F3879831BA71257461489961]
Checking pre-condition for Phase "Security"
,930 axis2.engine.Phase  - [MessageContext: logID=urn:uuid:23202C4F3879831BA71257461489961]
Invoking phase "Security"
,930 axis2.engine.Phase  - [MessageContext: logID=urn:uuid:23202C4F3879831BA71257461489961]
Checking post-conditions for phase "Security"
,930 axiom.om.OMOutputFormat  - Start getContentType: OMOutputFormat [ mimeBoundary =null
rootContentId=null doOptimize=false doingSWA=false isSOAP11=false charSetEncoding=UTF-8 xmlVersion=null
contentType=null ignoreXmlDeclaration=false autoCloseWriter=true actionProperty=null optimizedThreshold=0]
,930 axiom.om.OMOutputFormat  - getContentType= {application/soap+xml}   OMOutputFormat [
mimeBoundary =null rootContentId=null doOptimize=false doingSWA=false isSOAP11=false charSetEncoding=UTF-8
xmlVersion=null contentType=application/soap+xml ignoreXmlDeclaration=false autoCloseWriter=true
actionProperty=null optimizedThreshold=0]
,930 axis2.transport.http.SOAPMessageFormatter  - contentType from the OMOutputFormat =application/soap+xml
,930 axis2.transport.http.SOAPMessageFormatter  - contentType returned =application/soap+xml;
charset=UTF-8; action="urn:multipleParametersResponse"
,930 axis2.transport.http.SOAPMessageFormatter  - start writeTo()
,930 axis2.transport.http.SOAPMessageFormatter  -   preserve=false
,930 axis2.transport.http.SOAPMessageFormatter  -   isOptimized=false
,930 axis2.transport.http.SOAPMessageFormatter  -   isDoingSWA=false
,930 axis2.util.Utils  - MTOM optimized Threshold value =0
,930 axiom.om.impl.MTOMXMLStreamWriter  - OutputStream =class java.io.BufferedOutputStream
,930 axiom.om.impl.MTOMXMLStreamWriter  - OMFormat = OMOutputFormat [ mimeBoundary =null rootContentId=null
doOptimize=false doingSWA=false isSOAP11=false charSetEncoding=UTF-8 xmlVersion=null contentType=application/soap+xml
ignoreXmlDeclaration=false autoCloseWriter=true actionProperty=null optimizedThreshold=0]
,930 axiom.om.util.StAXUtils  - XMLStreamWriter is com.ctc.wstx.sw.SimpleNsStreamWriter
,930 axiom.om.impl.MTOMXMLStreamWriter  - Calling MTOMXMLStreamWriter.flush
,930 axiom.om.impl.MTOMXMLStreamWriter  - close
,930 axis2.transport.http.SOAPMessageFormatter  - end writeTo()
,946 axis2.transport.TransportUtils  - Found RequestResponseTransport setting response written
Etc.

Thanks,
William



From: Amila Suriarachchi [mailto:amilasuriarachchi@gmail.com]
Sent: Wednesday, November 04, 2009 12:10 AM
To: axis-user@ws.apache.org
Subject: Re: Axis 1.x to Axis2 - intercepting all messages?


On Wed, Nov 4, 2009 at 4:43 AM, William Walsh <WWalsh@curamsoftware.com<mailto:WWalsh@curamsoftware.com>>
wrote:

Currently we use Axis 1.4 for our application and via the server_config.wsdd file (provider="java:<classname>")
and extending org.apache.axis.providers.java.MsgProvider and org.apache.axis.providers.java.RPCProvider
we intercept all messages and do our own routing.



Obviously things are different in Axis2; but, from all the reading I've done it's not clear
if we can do equivalent processing via a messageReceiver or via a Handler? We don't do any
processing on the SOAP messages now, but get the method name, etc. from the MessageContext
to invoke our method via reflection.  If it's done via a Handler in Axis2 how do we specify
the phase settings in axis2.xml to specify the last Handler and does this have to be done
via a Module?  (Part of my confusion comes from not finding an explanation of what RMPhase
is.)  Again, if it's via a Handler (as this thread suggests: http://marc.info/?t=121988146900001&r=1&w=2),
I'm confused by what we would return from the Handler invoke method; that is, SUSPEND, ABORT,
or CONTINUE don't seem to specify what we need to achieve, which would be more along the lines
of DONE.

for your case better to use a message receiver rather than a handler.
this[1] may help as well.

thanks,
Amila.

[1] http://wso2.org/library/articles/extending-axis2



Thanks for any help available,

William


The information in this email is confidential and may be legally privileged.

It is intended solely for the addressee. Access to this email by anyone else

is unauthorized. If you are not the intended recipient, any disclosure,

copying, distribution or any action taken or omitted to be taken in reliance

on it, is prohibited and may be unlawful. If you are not the intended

addressee please contact the sender and dispose of this e-mail. Thank you.



--
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


The information in this email is confidential and may be legally privileged.
It is intended solely for the addressee. Access to this email by anyone else
is unauthorized. If you are not the intended recipient, any disclosure,
copying, distribution or any action taken or omitted to be taken in reliance
on it, is prohibited and may be unlawful. If you are not the intended
addressee please contact the sender and dispose of this e-mail. Thank you.

Mime
View raw message