Deal of the Day

Home » Main » Manning Forums » 2007 » Open Source ESBs in Action

Thread: CXF and Mule example - help

Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 7 - Pages: 1 - Last Post: Aug 16, 2008 9:30 AM by: tijs.rademakers
codecraig

Posts: 3
Registered: 9/24/04
CXF and Mule example - help
Posted: Jun 26, 2008 7:52 AM
  Click to reply to this thread Reply

I am new to CXF, Mule, etc. I have so far done the following:

Setup JBoss application server, created a simple web service using CXF, created a flex GUI to call the web service.

I am learning about Mule and I'd like to try and incorporate it into my working example. I was thinking of doing something trivial just to use Mule. For example, I'd like Mule to be configured so that when a request is made to my webservice something on the bus hears it and can dump that request (SOAP xml) to a file (similar to the FilePoller example except the input would be a request made to my service). Can I do this? Can someone help me in the right direction?

Thanks.

tijs.rademakers

Posts: 494
From: Netherlands
Registered: 6/6/06
Re: CXF and Mule example - help
Posted: Jun 26, 2008 8:10 AM   in response to: codecraig in response to: codecraig
  Click to reply to this thread Reply

Hi,

The functionality you describe is pretty trivial, but the implementation in Mule is not that trivial. What you can do to use Mule in your example is to host the web service within the Mule container instead of using JBoss to do that. With Mule you can easily expose a component as a CXF web service that can be invoked from your flex gui. Maybe that's a good starting point. Let me know your thoughts.

Best regards,

Tijs

codecraig

Posts: 3
Registered: 9/24/04
Re: CXF and Mule example - help
Posted: Jun 26, 2008 9:29 AM   in response to: tijs.rademakers in response to: tijs.rademakers
  Click to reply to this thread Reply

Hmm...I guess I could try that to start.

actually it seems simpler to deploy ServiceMix to JBoss (just download the "Web Application" from servicemix site and drop in the "deploy" directory under jboss).

ServiceMix is in. Now I am trying to deploy the "filebinding-sm.xml" (http://servicemix.apache.org/jboss-deployer.html) but when I do that I get this output in the JBoss console:

--- Packages waiting for a deployer ---
org.jboss.deployment.DeploymentInfo@e23e04fa { url=file:/C:/dev/jboss-4.2.2.GA/server/default/deploy/filebinding-sm.xml }
deployer: null
status: null
state: INIT_WAITING_DEPLOYER
watch: file:/C:/dev/jboss-4.2.2.GA/server/default/deploy/filebinding-sm.xml
altDD: null
lastDeployed: 1214490607878
lastModified: 1214490607863
mbeans:

org.jboss.deployment.DeploymentInfo@e3228084 { url=file:/C:/dev/jboss-4.2.2.GA/server/default/deploy/inbox/a-pdf.pdf }
deployer: null
status: null
state: INIT_WAITING_DEPLOYER
watch: file:/C:/dev/jboss-4.2.2.GA/server/default/deploy/inbox/a-pdf.pdf
altDD: null
lastDeployed: 1214490607894
lastModified: 1214490607878
mbeans:

--- Incompletely deployed packages ---
org.jboss.deployment.DeploymentInfo@e23e04fa { url=file:/C:/dev/jboss-4.2.2.GA/server/default/deploy/filebinding-sm.xml }
deployer: null
status: null
state: INIT_WAITING_DEPLOYER
watch: file:/C:/dev/jboss-4.2.2.GA/server/default/deploy/filebinding-sm.xml
altDD: null
lastDeployed: 1214490607878
lastModified: 1214490607863
mbeans:

org.jboss.deployment.DeploymentInfo@e3228084 { url=file:/C:/dev/jboss-4.2.2.GA/server/default/deploy/inbox/a-pdf.pdf }
deployer: null
status: null
state: INIT_WAITING_DEPLOYER
watch: file:/C:/dev/jboss-4.2.2.GA/server/default/deploy/inbox/a-pdf.pdf
altDD: null
lastDeployed: 1214490607894
lastModified: 1214490607878
mbeans:


any ideas why it has a problem?

tijs.rademakers

Posts: 494
From: Netherlands
Registered: 6/6/06
Re: CXF and Mule example - help
Posted: Jun 26, 2008 2:52 PM   in response to: codecraig in response to: codecraig
  Click to reply to this thread Reply

I think I'm a bit lost here, you didn't mention ServiceMix in your first post. Are you using ServiceMix on JBoss with the cxf binding component? Why do you want to run ServiceMix on JBoss? Are you using any functionality that justifies this? To start it's a bit simpler to just run ServiceMix standalon.
Another question, why do you want to use ServiceMix AND Mule?

Best regards,

Tijs

codecraig

Posts: 3
Registered: 9/24/04
Re: CXF and Mule example - help
Posted: Jun 27, 2008 9:27 AM   in response to: tijs.rademakers in response to: tijs.rademakers
  Click to reply to this thread Reply

i am just learning these technologies and trying to build a simple example and add pieces as i go...it might not make sense to use an ESB in my case. I am just trying to have one in my own little demo.

jos.dirksen

Posts: 9
Registered: 6/6/06
Re: CXF and Mule example - help
Posted: Jun 29, 2008 10:48 AM   in response to: codecraig in response to: codecraig
  Click to reply to this thread Reply

What exactly have you deployed to JBoss. Just servicemix or also the JBoss deployer: http://servicemix.apache.org/jboss-deployer.html

You'll need this last one if you want to deploy directly from the default JBoss deploy directory.

Jos

mahanare

Posts: 2
From: Hyderabad,India
Registered: 8/14/08
Re: CXF and Mule example - help
Posted: Aug 14, 2008 12:30 AM   in response to: jos.dirksen in response to: jos.dirksen
  Click to reply to this thread Reply

is there any simple example configuration for consuming webservice in mule?

say i ll give the WSDL path and method name and parameters what is the best way to consume a webservice in mule. i thought it is cxf.

tijs.rademakers

Posts: 494
From: Netherlands
Registered: 6/6/06
Re: CXF and Mule example - help
Posted: Aug 16, 2008 9:30 AM   in response to: mahanare in response to: mahanare
  Click to reply to this thread Reply

Hi,

I replied to your first post on the forum about this, so that should provide enough info to answer your question.
CXF is definitely the default choice when you want to consume a webservice with Mule. An alternative is to use the Axis transport, but the CXF transport provides more functionality.

Best regards,

Tijs

Legend
Gold: 300 + pts
Silver: 100 - 299 pts
Bronze: 25 - 99 pts
Manning Author
Manning Staff
Manning Developmental Editor