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 <[EMAIL PROTECTED]>/* 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 <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

Reply via email to