Franz Garsombke wrote:
I was actually thinking of blogging on this whole experience but
adding it to the website would be even better. All of 2 people
probably read my 'once every 6 months blog' :).
Thank you for the excellent suggestion of writing my own transport. I
think I made it much harder than I had to. Basically I had one pass
through service which had a custom invoker. In the custom invoker
constructor I would pass the Object graph and then just use this as
the return value for the invoke method. XFire would create the correct
SOAP request with one 'extra' document wrapper. I would then remove
that and have a SOAP request with the correct SOAP body. Kludgy? Yes.
Does it work? Yes.
:-D
I will create a custom transport and let you know how that goes. I
should be able to add my results (code, explanation, etc.) on the
website in the next day or two. We are using this solution on a very
large integration project with WebLogic as our application server and
Tibco EMS as our message bus. Our preferred messaging wrapper is SOAP.
Cool! Also, if you think your Transport is something that can be reused
let us know and we can get it integrated into XFire.
How is the website edited?
Click on the edit link on the bottom right. You will need to create an
account, but it should be pretty straightforward from there. The main
website is a cached version of the wiki, so if you want to see the
uncached version just append "?nocache".
Take care.
Franz
*/Dan Diephouse <[EMAIL PROTECTED]>/* wrote:
Heres what I would probably do:
1. Create a service interface for my outbound request:
public interface Sender {
public void send(MyDataType data);
}
2. Create a client
Service service = new XmlBeansServiceFactory().create(Sender.class)
XFireProxyFactory xpf = new XFireProxyFactory();
Sender sender = (Sender) xpf.create(service, "jms://Queue")
3. Send the data:
sender.send(myData);
Now, if you don't use want to use the XFire JMS transport you can
quickly write your own. Really its probably as simple as extending
AbstractTransport and creating your send method. (Also don't
forget to
do SoapTransportHelper.createSoapTransport(this) in the
constructor. It
adds helper handlers for SOAP to the transport).
You can tell your client about the transport:
Sender sender = (Sender) xpf.create(service, new MyJMSTransport(),
"jms://Queue")
That help?
Also, if you were motivated enough to write up your experiences on
how
to do this, I'm sure there are many around who would appreciate
it! The
website can be easily edited and this would make a really cool
addition
to the user manual IMO.
- Dan
Franz Garsombke wrote:
> Thank you Dan. Using the channel mechanism with XMLBeans binding
works
> perfectly for us.
>
> We can now consume SOAP messages (just a String) off of a JMS Queue
> and then have XFire parse the SOAP, marshall the payload (using the
> XSD schema provided to XMLBeans) and call the appropriate
service and
> operation. There are no webservices involved.
>
> Any suggestions on going the other way? Taking an object graph and
> creating a SOAP request? We would then take that SOAP request
and put
> it on an outbound JMS Queue.
>
> I have a solution for this using XFire but would like to hear your
> recommendation.
>
> Thanks in advance and thank you for such a nice and open
architecture.
>
> Franz
>
> */Dan Diephouse /* wrote:
>
> Hi Franz,
> I think you can just use XFire's local transport. Check out how the
> AbstractXFireTest works here:
>
>
http://svn.xfire.codehaus.org/viewrep/xfire/trunk/xfire/xfire-core/src/main/org/codehaus/xfire/test/AbstractXFireTest.java?r=1200#l102
>
> Shouldn't be too hard to put together!
>
> - Dan
>
> Franz Garsombke wrote:
> > I probably should not have used the term JMS since it just
confuses
> > things.
> >
> > Our scenario is pretty simple. We have a listener that pulls SOAP
> > requests off of a queue. So now we have a String which is the SOAP
> > request. We would like to use XFire to parse this request and
> marshall
> > the envelope objects for us.
> >
> > Let's say we just pulled this String from a queue (we do not own
> the
> > JMS Topic...we can just listen to it)
> >
> >
> >
> >
> >
> > 49506
> >
> >
> >
> >
> > We would like to leverage XFire to parse this SOAP as well as
> marshall
> > out GetWeatherByZipCode into Java objects...
> >
> > Thoughts?
> >
> > Thanks in advance.
> >
> > Franz
> >
> >
> > */Dan Diephouse /* wrote:
> >
> > Franz Garsombke wrote:
> > > We want to put SOAP messages on our JMS Queue. After
receiving the
> > > message from the queue we will have a SOAP request.
> > >
> > > My question is how can I leverage the XFire framework to
parse the
> > > SOAP body and then using a XSD Schema create the marshalled Java
> > > Objects from the SOAP body? We basically want to bypass the
> > 'service
> > > invocation' framework and use XFire to parse the SOAP and use
> > > something like JAXB to marshall the SOAP body.
> > >
> > >
> > > Thank you in advance.
> > Have you looked at the jms transport yet?
> >
> > http://xfire.codehaus.org/JMS+Transport
> >
> > I'm confused about your wanting to bypass the "service invocation
> > framework"? Do you not want to define operations? Just define
> > something
> > like this?
> >
> > public void receive(Object jaxbSoapBody);
> >
> > - Dan
> >
> > --
> > Dan Diephouse
> > Envoi Solutions LLC
> > http://envoisolutions.com
> > http://netzooid.com/blog
> >
> >
> >
>
------------------------------------------------------------------------
> > Yahoo! Mail
> > Bring photos to life! New PhotoMail
> >
> > makes sharing a breeze.
>
>
> --
> Dan Diephouse
> Envoi Solutions LLC
> http://envoisolutions.com
> http://netzooid.com/blog
>
>
>
------------------------------------------------------------------------
> Yahoo! Travel
> Find great deals
>
> to the top 10 hottest destinations!
--
Dan Diephouse
Envoi Solutions
http://envoisolutions.com
http://netzooid.com/blog
------------------------------------------------------------------------
Yahoo! Travel
Find great deals
<http://us.lrd.yahoo.com/_ylc=X3oDMTFscDlocTFiBF9TAzMyOTc1MDIEX3MDMjcxOTQ4MQRwb3MDMgRzZWMDbWFpbC1mb290ZXIEc2xrA3l0LXR0/SIG=12hqieud9/**http%3a//leisure.travelocity.com/Promotions/0,,YHOE%7c1381%7cvacs_main,00.html>
to the top 10 hottest destinations!
--
Dan Diephouse
Envoi Solutions
http://envoisolutions.com
http://netzooid.com/blog