Forum Home » Fuse Distributions » Fuse Services Framework

Thread: Unable to access CXF Web Services with IP address.

 

Permlink Replies: 12 - Last Post: Dec 14, 2010 7:26 AM Last Post By: mitul1411
mitul1411

Posts: 12
Registered: 02/01/10
Unable to access CXF Web Services with IP address.
Posted: Nov 10, 2010 12:21 PM
  Click to reply to this thread Reply
Hello All ,

I am unable to access the CXF webservice with an IP address.

For eg. When I use : http://localhost:8090/MyService?wsdl , it works well.
But when it accessed from :http://192.168.5.5:8090/MyService?wsdl which is the IP of my machine , the firefox browser is unable to connect.

It is all irrespective of JDK versions as well as Operating Systems.

Did any one face this problem and can any one help me out ?

Help will be much appreciated.

Thanks ,
Mitul

Edited by: mitul1411 on Nov 10, 2010 12:21 PM
ffang

Posts: 1,320
Registered: 12/24/07
Re: Unable to access CXF Web Services with IP address.
Posted: Nov 10, 2010 12:34 PM   in response to: mitul1411 in response to: mitul1411
  Click to reply to this thread Reply
Hi,

How you publish your webservice?
If you wanna the webservice bind all available network interface in your machine, you should publish your webservice with address http://0.0.0.0:port/servicename...

Freeman
mitul1411

Posts: 12
Registered: 02/01/10
Re: Unable to access CXF Web Services with IP address.
Posted: Nov 11, 2010 5:24 AM   in response to: ffang in response to: ffang
  Click to reply to this thread Reply
Hi ,

I am using cxf-se and cxf-bc with JBI inside FUSE ESB.
I could not find suitable document to publish the web service.
Can you please help me out with it ?
ffang

Posts: 1,320
Registered: 12/24/07
Re: Unable to access CXF Web Services with IP address.
Posted: Nov 11, 2010 5:39 AM   in response to: mitul1411 in response to: mitul1411
  Click to reply to this thread Reply
Hi,

You can specify it in wsdl, soap:address part,

or add locationURI attribute to cxf bc consumer endpoint configuration.

Freeman
mitul1411

Posts: 12
Registered: 02/01/10
Re: Unable to access CXF Web Services with IP address.
Posted: Nov 11, 2010 6:35 AM   in response to: ffang in response to: ffang
  Click to reply to this thread Reply
Yes . I did override using locationUri attribute in the CXF-BC Consumer.
I could access the url from the firefox browser with http://0.0.0.0:8090/myService?wsdl
But I still could not do so with http://192.168.5.5:8090/myService?wsdl.
ffang

Posts: 1,320
Registered: 12/24/07
Re: Unable to access CXF Web Services with IP address.
Posted: Nov 11, 2010 6:53 AM   in response to: mitul1411 in response to: mitul1411
  Click to reply to this thread Reply
Hi,

It should be locationURI but not locationUri.
And are you sure you can access from
http://0.0.0.0:8090/myService?wsdl ?

Could you also check the network configuration(like firewall, hosts) on your machine, could you access other network services on your machine with ip 192.168.5.5?

Freeman
mitul1411

Posts: 12
Registered: 02/01/10
Re: Unable to access CXF Web Services with IP address.
Posted: Nov 11, 2010 7:08 AM   in response to: ffang in response to: ffang
  Click to reply to this thread Reply
Hi ,

Ya , it is localtionURI. Sorry for the typo error.
I can access the tomcat from the http://192.168.5.5:8080.

Now I even tried specifying an address http://192.168.5.5:8090/myService in the locationURI . But does not work either.
mitul1411

Posts: 12
Registered: 02/01/10
Re: Unable to access CXF Web Services with IP address.
Posted: Nov 11, 2010 7:09 AM   in response to: mitul1411 in response to: mitul1411
  Click to reply to this thread Reply
I doubt whether it is a Jetty-related problem.
ffang

Posts: 1,320
Registered: 12/24/07
Re: Unable to access CXF Web Services with IP address.
Posted: Nov 11, 2010 7:17 AM   in response to: mitul1411 in response to: mitul1411
  Click to reply to this thread Reply
Hi,

What's the exact FUSE ESB version you're using?

Freeman
mitul1411

Posts: 12
Registered: 02/01/10
Re: Unable to access CXF Web Services with IP address.
Posted: Nov 11, 2010 7:20 AM   in response to: ffang in response to: ffang
  Click to reply to this thread Reply
Hi ,

I am using FUSE 4.2.0-02-00 .
The jetty version is : Apache ServiceMix Bundles: jetty-6.1.22 (6.1.22.1)
ffang

Posts: 1,320
Registered: 12/24/07
Re: Unable to access CXF Web Services with IP address.
Posted: Nov 11, 2010 7:28 AM   in response to: mitul1411 in response to: mitul1411
  Click to reply to this thread Reply
Hi,

Could you please test with latest released fuse esb 4.3.0-fuse-02-00?

Freeman
mitul1411

Posts: 12
Registered: 02/01/10
Re: Unable to access CXF Web Services with IP address.
Posted: Dec 14, 2010 7:00 AM   in response to: ffang in response to: ffang
  Click to reply to this thread Reply
Hi ,

I was not planning to migrate to this version , but now that I have , the same is the case.
Any other alternative or fix to the problem ?
mitul1411

Posts: 12
Registered: 02/01/10
Re: Unable to access CXF Web Services with IP address.
Posted: Dec 14, 2010 7:26 AM   in response to: ffang in response to: ffang
  Click to reply to this thread Reply
Hi ,

I got it working now.
The reason it was not working is :
I wrote "http://0.0.0.0:8090/myService?wsdl" in both address tag's location attribute as well as in the locationURI tag of cxf bc consumer as well.
Thanks for all your help.