Hmm, interesting :D
Ok, you can add DOMInHandler using annotations like:
@InHandlers(handlers={ "org.codehaus.xfire.util.dom.DOMInHandler" })
or using configuration file service.xml
<inHandlers>
<handler handlerClass="org.codehaus.xfire.util.dom.DOMInHandler" />
<inHandlers>
You can access DOM object from MessageContext property DOMInHandler.DOM_MESSAGE;
Document soap = (Document)ctx.getProperty(DOMInHandler.DOM_MESSAGE);
I guess you need to hold your service till app server service
response, so you need to create your own bean invoker :
http://docs.codehaus.org/display/XFIRE/Invokers
On 3/19/07, bob cruise <[EMAIL PROTECTED]> wrote:
:)
I am using the jsr181 component in servicemix. This component uses XFire to
deploy web services in servicemix.
I have 2 web services, one deployed on servicemix and the other in any
application server. Both have same operations but different schemas. The web
service deployed in servicemix will be exposed to the client. When a call is
made to this web service, it needs to pass the XML representation of the
message along with some other properties to the next component which will
build the XML message in the format required by the web service deployed on
app server. Then the SAAJ binding component in servicemix will be used to
create a SOAP message out of this and invoke the web service on app server.
Thanks,
Bob
----- Original Message ----
From: Tomek Sztelak <[EMAIL PROTECTED]>
To: [email protected]
Sent: Monday, March 19, 2007 1:55:46 PM
Subject: Re: [xfire-user] XFire 1.2.2 : how can I access the soap message
from inside the web service
Maybe lets start from other way :) What do you need soap message xml
representation for ? :)
On 3/19/07, bob cruise <[EMAIL PROTECTED]> wrote:
>
> Thanks Tomek for that.
>
> I am new to XFire. I have a couple of doubts on how to use this.
>
> I am planning to go ahead with the second way of getting the XML i.e.
> switch to DOM mode. The article says
>
> Service service = ... // retreive your service from the ServiceRegistry
>
>
>
> Where should I write this? How will I get the service from
ServiceRegistry?
>
>
>
>
>
> >> public void invoke(MessageContext context) {
> >> Document inputDoc =
> context.getInMessage().getProperty(DOMInHandler.DOM_MESSAGE):
> >> Document outputDoc =
> context.getOutMessage().getProperty(DOMOutHandler.DOM_MESSAGE):
> >> }
>
>
>
> Does this code mean, 'invoke' is one of the methods in web service?
>
>
>
> As I already mentioned, I have a WSDL and generating the server side
classes
> using 'org.codehaus.xfire.gen.WsGen', the methods are created by it
without
> any message context. Where can I get the MessageContext from?
>
>
>
> Thanks,
>
> Bob
>
>
>
> ----- Original Message ----
> From: Tomek Sztelak <[EMAIL PROTECTED]>
> To: [email protected]
> Sent: Monday, March 19, 2007 12:56:59 PM
> Subject: Re: [xfire-user] XFire 1.2.2 : how can I access the soap message
> from inside the web service
>
>
> XFire is based on Stax, so there is no such thing like soap XML
> representation, but you can tell XFire to create DOM representation
> which you can use later . Take a look at
> http://xfire.codehaus.org/MessageContext "Getting at the
> XML" part.
>
> On 3/19/07, bob cruise <[EMAIL PROTECTED]> wrote:
> >
> > Yes. I mean the xml representation of the message.
> >
> >
> > ----- Original Message ----
> > From: Tomek Sztelak <[EMAIL PROTECTED]>
> > To: [email protected]
> > Sent: Monday, March 19, 2007 12:11:16 PM
> > Subject: Re: [xfire-user] XFire 1.2.2 : how can I access the soap
message
> > from inside the web service
> >
> >
> > What do you mean by soap message ? message xml representation or
> > something else?
> >
> >
> > On 3/19/07, bob cruise <[EMAIL PROTECTED]> wrote:
> > >
> > > Hi,
> > >
> > > I am following the top-down approach for creating a web service in
xfire
> > > 1.2.2. i.e. I have a wsdl and generate the server side classes using
> > > org.codehaus.xfire.gen.WsGen.
> > >
> > > I want to access the SOAP message from inside my web service method.
How
> > can
> > > I do this?
> > >
> > > I have seen the MessageContext support in xfire user guide, but I feel
> > this
> > > may help only if I start building my web service from the java class.
> > >
> > > Any help in this regard is very useful.
> > > Thanks in advance,
> > > Bob
> > > ________________________________
> > > 8:00? 8:25? 8:40? Find a flick in no time
> > > with theYahoo! Search movie showtime shortcut.
> >
> >
> > --
> > -----
> > When one of our products stops working, we'll blame another vendor
> > within 24 hours.
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe from this list please visit:
> >
> > http://xircles.codehaus.org/manage_email
> >
> > ________________________________
> > Now that's room service! Choose from over 150,000 hotels
> > in 45,000 destinations on Yahoo! Travel to find your fit.
>
>
> --
> -----
> When one of our products stops working, we'll blame another vendor
> within 24 hours.
>
>
---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
> http://xircles.codehaus.org/manage_email
>
>
> ________________________________
> Be a PS3 game guru.
> Get your game face on with the latest PS3 news and previews at Yahoo!
Games.
--
-----
When one of our products stops working, we'll blame another vendor
within 24 hours.
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email
________________________________
TV dinner still cooling?
Check out "Tonight's Picks" on Yahoo! TV.
--
-----
When one of our products stops working, we'll blame another vendor
within 24 hours.
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email