camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen" ...@silverbullet.dk>
Subject RE: Problem having Camel CXF component detect wsdl:service
Date Thu, 22 May 2008 04:46:56 GMT
Hi

Maybe a issue to be added to the Camel FAQ?

Med venlig hilsen
 
Claus Ibsen
......................................
Silverbullet
Skovsgårdsvænget 21
8362 Hørning
Tlf. +45 2962 7576
Web: www.silverbullet.dk

-----Original Message-----
From: Willem Jiang [mailto:willem.jiang@gmail.com] 
Sent: 18. maj 2008 17:52
To: camel-user@activemq.apache.org
Subject: Re: Problem having Camel CXF component detect wsdl:service

Hi Glen,

The service name and port name should be a QName which includes the name 
space.
eg.

serviceName={http://www.example.org/DoubleIt}DoubleItService


Willem
 
Glen Mazza wrote:
Hello,

I'm trying to use Camel's CXF component and I cannot get it the wsdl:service
"DoubleItService" from my WSDL.  Here is the error stack I am getting:

[INFO] [exec:java]
[mpany.camel.CamelSample.main()] BusApplicationContext          INFO 
Refreshing org.apache.cxf.bus.spring.BusApplicationContext@1af328: display
name [org.apache.cxf.bus.spring.BusApplicationContext@1af328]; startup date
[Sun May 18 01:19:47 EDT 2008]; root of context hierarchy
[mpany.camel.CamelSample.main()] BusApplicationContext          INFO  Bean
factory for application context
[org.apache.cxf.bus.spring.BusApplicationContext@1af328]:
org.springframework.beans.factory.support.DefaultListableBeanFactory@a64a92
2008/05/18 1:19:50
org.apache.cxf.service.factory.ReflectionServiceFactoryBean
buildServiceFromWSDL
INFO: Creating Service DoubleItService from WSDL:
http://localhost:8080/doubleit/services/doubleit?wsdl
org.apache.cxf.service.factory.ServiceConstructionException: Could not find
definition for service DoubleItService.
        at
org.apache.cxf.wsdl11.WSDLServiceFactory.create(WSDLServiceFactory.java:114)
        at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromWSDL(ReflectionServiceFactoryBean.java:270)
        at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:360)
        at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:156)
        at
org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:74)
        at
org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:51)
        at
org.apache.camel.component.cxf.CxfProducer.createClientFormClientFactoryBean(CxfProducer.java:165)
        at
org.apache.camel.component.cxf.CxfProducer.<init>(CxfProducer.java:66)
.....

Here is my construction of CXF_URI:

public class CamelSample {
   private static final String JAXWS_SERVER_ADDRESS =
"http://localhost:8080/doubleit/services/doubleit";
   private static final String CXF_URI = "cxf://" + JAXWS_SERVER_ADDRESS
     + "?wsdlURL=http://localhost:8080/doubleit/services/doubleit?wsdl"
     + "&portName=DoubleItPort&serviceName=DoubleItService";
   
The URI: http://localhost:8080/doubleit/services/doubleit?wsdl is indeed
accessible from my machine and it looks identical to here: 
http://www.jroller.com/gmazza/date/20080417#WFstep5

My route is as follows:

      context.addRoutes(new RouteBuilder() {
         public void configure() {

            from("test-jms:queue:test.queue").process(new Processor() {
               public void process(Exchange e) {
                   System.out.println("This was called - Body: " +
e.getIn().getBody(String.class));
                  
e.getIn().setHeader(CxfConstants.OPERATION_NAME,"DoubleIt");
                   final List<String> params = new ArrayList<String>();
                   params.add(e.getIn().getBody(String.class));
                   e.getOut().setBody(params);
                 }
           }).to(CXF_URI).to("file://testfile").process(new Processor() {
              public void process(Exchange e) {
                 System.out.println("In process"); //  +
e.getIn().getBody(String.class));
                 List<String> abc = e.getIn().getBody(ArrayList.class);
                 System.out.println("This was called - in File list: " +
abc.get(0));
                }
               });
           }

Can anyone see why Camel can't detect the wsdl:service DoubleItService?

Thanks,
Glen




Mime
View raw message