Forum Home » Enterprise Products » Fuse ESB Enterprise

Thread: Errors running the cxf-basic example, cannot connect or view WSDLs

 
This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 13 - Last Post: Jul 3, 2012 12:50 PM Last Post By: baleado
rawlingsj

Posts: 63
Registered: 05/12/12
Errors running the cxf-basic example, cannot connect or view WSDLs
Posted: May 12, 2012 6:41 PM
 
  Click to reply to this thread Reply
Attachment ClientException.rtf (9.3 KB)
Attachment fuseesb.rtf (4.4 KB)
Hi,

I'm having a few issues running the cxf-basic example on FuseESB Enterprise 7.

After getting the right example I successfully deployed and started the bundle.

Attached is the fuseesb.log suggesting bundle was started correctly.

I cannot view either WSDL
http://localhost:8181/cxf?wsdl
http://localhost:8181/cxf/PersonServiceCF?wsdl

The maven test client fails with a cannot connect exception. (full exception attached)

Is there a command I can run to check which port the bundle is being served up on and has the default port changed from 8181?

Many thanks.

Edited by: rawlingsj on May 12, 2012 6:42 PM
iocanel

Posts: 153
Registered: 03/16/10
Re: Errors running the cxf-basic example, cannot connect or view WSDLs
Posted: May 12, 2012 7:30 PM   in response to: rawlingsj in response to: rawlingsj
 
  Click to reply to this thread Reply
To answer your question, the port should be 8181.
Also there is a command "cxf:list-endpoints" which will list the endpoint that are successfully registered.

I also tried to reproduce your problem following the steps as described in the documentation http://fusesource.com/docs/esbent/7.0/esb_getting_started/Develop-CreateWS.html and everything run smoothly for me.

So I could only imagine that in your case an other port was used, or the service was bound to an address other than the localhost. Maybe you could try and see if using the local ip makes any difference.

rawlingsj

Posts: 63
Registered: 05/12/12
Re: Errors running the cxf-basic example, cannot connect or view WSDLs
Posted: May 13, 2012 4:37 AM   in response to: iocanel in response to: iocanel
 
  Click to reply to this thread Reply
Ok thanks, unfortunately this hasn't helped. Must admit I couldn't see the port in the cxf:list endpoints command though. I did find that the system.properties does set the default port to 8181.

org.osgi.service.http.port=8181

FuseESB:karaf@root> cxf:list-endpoints
Name State Address BusID
PersonImplPort Started [/PersonServiceCF ] cxf-basic-cxf1216033972

I will take a closer look as it must be something in my environment as you have the example running. I'm using a MAC but I'm sure that makes no difference. The logs aren't showing any errors and I managed to get this working using Fuse ESB 4.4.1.

Thanks again for your reply.
iocanel

Posts: 153
Registered: 03/16/10
Re: Errors running the cxf-basic example, cannot connect or view WSDLs
Posted: May 13, 2012 10:26 AM   in response to: rawlingsj in response to: rawlingsj
 
  Click to reply to this thread Reply
Have you tried using the local ip instead of just localhost? Since the service has been properly creating, my guess is that its just a binding issue.
rawlingsj

Posts: 63
Registered: 05/12/12
Re: Errors running the cxf-basic example, cannot connect or view WSDLs
Posted: May 14, 2012 6:54 PM   in response to: iocanel in response to: iocanel
 
  Click to reply to this thread Reply
Hi yes I did try that but no success.

I ran netstat and couldn't see jetty running and couldn't find the feature to install. I downloaded PAX Web - Jetty bundle, deployed and now the example works.

Not sure if what I've done is correct or why Jetty wasn't available as a feature but it all seems to work now.
baleado

Posts: 13
Registered: 02/20/12
Re: Errors running the cxf-basic example, cannot connect or view WSDLs
Posted: Jul 2, 2012 5:10 PM   in response to: rawlingsj in response to: rawlingsj
 
  Click to reply to this thread Reply
Same problem here.

Everything looks fine but I cannot find the wsdl endpoint.

Using features:list I can see that jetty is installed

Using cxf:list-endpoints I see endpoint configured with:
name=PersonImplPort
State=started
Address=/PersonServiceCF

On jetty.xml the default port is set to 8181.

I tested with the follow Url's:
http://localhost:8181/cxf?wsdl
http://localhost:8181/cxf/PersonServiceCF?wsdl

jetty response with: Error 404 Not Found

Any tip?

Thanks
davsclaus

Posts: 1,893
Registered: 10/14/08
Re: Errors running the cxf-basic example, cannot connect or view WSDLs
Posted: Jul 3, 2012 6:19 AM   in response to: baleado in response to: baleado
 
  Click to reply to this thread Reply
And you have not re configured the default cxf context path? eg do you have a configuration file in the etc directory thats named org.apache.cxf.osgi.cfg. In that file you can reconfigure the default context path.

And can you check the log in data/log/fuseesb.log to see if there is any exceptions or the likes about this.
baleado

Posts: 13
Registered: 02/20/12
Re: Errors running the cxf-basic example, cannot connect or view WSDLs
Posted: Jul 3, 2012 9:09 AM   in response to: davsclaus in response to: davsclaus
 
  Click to reply to this thread Reply
Thanks you for your reply,

I don't have that configuration file in etc directory. I tried to add with the follow content:

org.apache.cxf.servlet.context=/cxf

But with the same result.

Checking my fuseesb.log everything looks fine:

09:53:26,664 | INFO | ExtenderThread-2 | ReflectionServiceFactoryBean | 175 - org.apache.cxf.bundle - 2.5.0.fuse-7-061 | Creating Service {http://cxf_basic.example.fusesource.org/}PersonService from class org.fusesource.example.cxf_basic.Person
09:53:27,532 | INFO | ExtenderThread-2 | ServerImpl | 175 - org.apache.cxf.bundle - 2.5.0.fuse-7-061 | Setting the server's publish address to be /PersonServiceCF
09:53:27,533 | INFO | ExtenderThread-2 | InstrumentationManagerImpl | 175 - org.apache.cxf.bundle - 2.5.0.fuse-7-061 | registering MBean org.apache.cxf:bus.id=cxf-basic-cxf33231621,type=Bus.Service.Endpoint,service="{http://cxf_basic.example.fusesource.org/}PersonService",port="PersonImplPort": org.apache.cxf.endpoint.ManagedEndpoint@13579e0
09:53:27,536 | INFO | ExtenderThread-2 | InstrumentationManagerImpl | 175 - org.apache.cxf.bundle - 2.5.0.fuse-7-061 | registering MBean org.apache.cxf:bus.id=cxf-basic-cxf33231621,type=Bus.Service.Endpoint,service="{http://cxf_basic.example.fusesource.org/}PersonService",port="PersonImplPort": javax.management.modelmbean.RequiredModelMBean@1c332b8
09:53:27,545 | INFO | ExtenderThread-2 | OsgiBundleXmlApplicationContext | 102 - org.springframework.context - 3.0.7.RELEASE | Publishing application context as OSGi service with properties {org.springframework.context.service.name=cxf-basic, Bundle-SymbolicName=cxf-basic, Bundle-Version=0.0.1.SNAPSHOT}
ffang

Posts: 1,320
Registered: 12/24/07
Re: Errors running the cxf-basic example, cannot connect or view WSDLs
Posted: Jul 3, 2012 9:28 AM   in response to: baleado in response to: baleado
 
  Click to reply to this thread Reply
Hi,

Not really sure what happened.

Any chance to append a testcase which we can build and reproduce this issue?

Freeman
baleado

Posts: 13
Registered: 02/20/12
Re: Errors running the cxf-basic example, cannot connect or view WSDLs
Posted: Jul 3, 2012 10:48 AM   in response to: ffang in response to: ffang
 
  Click to reply to this thread Reply
Attachment cxf-basic.zip (25.8 KB)
I will try to explain what I did from the beginning:

My environment:
  • JDK 1.6.0 u22
  • Apache Maven 3.0.3
  • Eclipse Indigo
  • Windows 7 Enterprise 64-bits
  • I am behind a proxy to access to Internet
  • Maven download artifacts through Nexus server.

Fuse Installation:
1-Download fuse-esb-full-7.0.0.fuse-061.zip package
2-Unzip to C:\Instalacao\fuse-esb-7.0.0.fuse-061
3-Configure org.ops4j.pax.url.mvn.cfg to point to my Nexus server:
org.ops4j.pax.url.mvn.repositories=http://localhost:8081/nexus/content/groups/public
#org.ops4j.pax.url.mvn.repositories= \
#http://repo1.maven.org/maven2, \
#http://repo.fusesource.com/nexus/content/repositories/releases, \
#http://repo.fusesource.com/nexus/content/groups/ea, \
#http://svn.apache.org/repos/asf/servicemix/m2-repo, \
#http://repository.springsource.com/maven/bundles/release, \
#http://repository.springsource.com/maven/bundles/external, \
#http://scala-tools.org/repo-releases

Creation of cxf-basic sample project:
1-Create new Maven Project in Indigo
2-Select Archetype:
Group Id = org.apache.servicemix.tooling
Artifact Id=servicemix-cxf-code-first-osgi-bundle
Version = 2012.01.0.fuse-7-061
3-Fill maven project settings:
Group Id = org.fusesource.example
Artifact Id= cxf-basic
Version = 0.0.1-SNAPSHOT
4-Build project with: clean install

Installation of bundle in Fuse ESB:
1-C:\Instalacao\fuse-esb-7.0.0.fuse-061\bin\fuseesb.bat
2-install mvn:org.fusesource.example/cxf-basic/0.0.1-SNAPSHOT
3-start <id>

Tested with follow URL's
http://localhost:8181/cxf?wsdl
http://localhost:8181/cxf/PersonServiceCF?wsdl

Maven project attached.

Edited by: baleado on Jul 3, 2012 10:48 AM
ffang

Posts: 1,320
Registered: 12/24/07
Re: Errors running the cxf-basic example, cannot connect or view WSDLs
Posted: Jul 3, 2012 11:14 AM   in response to: baleado in response to: baleado
 
  Click to reply to this thread Reply
Hi,

Did a quick run for your testcase.
It works on my machine.

I have internet access and not use nexus, but use nexus should definitely work.

Could you post the result of
osgi:list -t 0

so that I can see if you have all necessary bundles installed and started?

Also you can try
http://127.0.0.1:8181/cxf/PersonServiceCF?wsdl
or
http://your_machine_real_ip:8181/cxf/PersonServiceCF?wsdl
to see if it works? Just in case your localhost bind some wired hostname so that the default localhost just doesn't work.

Freeman
baleado

Posts: 13
Registered: 02/20/12
Re: Errors running the cxf-basic example, cannot connect or view WSDLs
Posted: Jul 3, 2012 11:35 AM   in response to: ffang in response to: ffang
 
  Click to reply to this thread Reply
Attachment log_osgi_list.txt (20.6 KB)
Result attached.

I tried your tips and got the same result :(
ffang

Posts: 1,320
Registered: 12/24/07
Re: Errors running the cxf-basic example, cannot connect or view WSDLs
Posted: Jul 3, 2012 12:28 PM   in response to: baleado in response to: baleado
 
  Click to reply to this thread Reply
Hi,

There are several bundles status is "Installed" or "Resolved", which is unexpected, the correct status should be "Active", so this indicate something wrong when you start FUSE ESB. I'd like to see the log which will tell us more.

So please
1. remove $FUSE_ESB/data folder
2. restart FUSE ESB
3. append $FUSE_ESB/data/log/fuseesb.log and the output of "osgi:list -t 0"

Freeman
baleado

Posts: 13
Registered: 02/20/12
Re: Errors running the cxf-basic example, cannot connect or view WSDLs
Posted: Jul 3, 2012 12:50 PM   in response to: ffang in response to: ffang
 
  Click to reply to this thread Reply
Attachment fuseesb.log (196.6 KB)
Attachment log_osgi_list.txt (19.6 KB)
The cleaning of the data folder solved the problem.

Thank's Freeman for your perseverance.

Anyway I have attached the files that you asked.