Camel-CXF web services are not available

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Camel-CXF web services are not available

Sachin
Hi All,

I am using camel 2.9.1 with cxf 2.4.2 and spring 3.0.5 to expose some webservices with multiple operations using WSDL first approach and PAYLOAD mode.
At camel startup i can see it's starting my cxf routes without any error, and in CXF  web services' list (http://localhost:9081/bfi/ws/services/) it's displaying that there are 2 webservices available.
But while accessing from SOAP UI or any browser it's dsiplaying that there are No service found with below log.
 Can't find the the request for http://localhost:9081/bfi/ws/SwaptionCompactService's Observer .




[10/9/12 13:02:25:890 IST] 00000008 ReflectionSer I   Creating Service {http://dataservice.summit/genericdataservice}GenericDataService from WSDL: Systems/MeridianEndPoint/must/GenericDataWS/WsdlFiles/GenericDataService.wsdl

[10/9/12 13:02:26:499 IST] 00000008 ServerImpl    I   Setting the server's publish address to be genericdataservice/GenericDataService

[10/9/12 13:02:26:499 IST] 00000008 ReflectionSer I   Creating Service {http://dataservice.summit/genericdataservice}GenericDataService from WSDL: Systems/MeridianEndPoint/must/GenericDataWS/WsdlFiles/GenericDataService.wsdl

[10/9/12 13:02:26:546 IST] 00000008 PayLoadDataFo I org.apache.camel.component.cxf.feature.AbstractDataFormatFeature removeInterceptors removing the interceptor org.apache.cxf.interceptor.ClientFaultConverter@7b357b35

[10/9/12 13:02:26:609 IST] 00000008 SpringCamelCo I org.apache.camel.impl.DefaultCamelContext doStartOrResumeRouteConsumers Route: MeridianEndPoint.must.Service.SwaptionCompactWS started and consuming from: Endpoint[cxf://swaptioncompactservice/SwaptionCompactService?dataFormat=PAYLOAD&portName=%7Bhttp://mustservice.summit%7DSwaptionCompactService&serviceName=%7Bhttp://mustservice.summit%7DSwaptionCompactService&wsdlURL=Systems/MeridianEndPoint/must/SwaptionCompactWS/WsdlFiles/SwaptionCompactService.wsdl]

[10/9/12 13:02:26:656 IST] 00000008 SpringCamelCo I org.apache.camel.impl.DefaultCamelContext doStartOrResumeRouteConsumers Route: MeridianEndPoint.must.Service.GenericDataWS started and consuming from: Endpoint[cxf://genericdataservice/GenericDataService?dataFormat=PAYLOAD&portName=%7Bhttp://dataservice.summit/genericdataservice%7DGenericDataService&serviceName=%7Bhttp://dataservice.summit/genericdataservice%7DGenericDataService&wsdlURL=Systems/MeridianEndPoint/must/GenericDataWS/WsdlFiles/GenericDataService.wsdl]

[10/9/12 13:02:26:937 IST] 00000008 SpringCamelCo I org.apache.camel.impl.DefaultCamelContext start Total 2 routes, of which 2 is started.

Thanks in advance.
Reply | Threaded
Open this post in threaded view
|

Re: Camel-CXF web services are not available

Willem.Jiang
Administrator
Hi,

It looks like you are leverage the CXF servlet transport. It is important that cxf endpoint address is start with "/" to make sure the service is published rightly.
As the endpoint uri is start with "cxf://" the endpoint address is "swaptioncompactservice/SwaptionCompactService", you just need to add a "/" like this
> cxf:///swaptioncompactservice/SwaptionCompactService?dataFormat=PAYLOAD&portName=%7Bhttp://mustservice.summit%7DSwaptionCompactService&serviceName=%7Bhttp://mustservice.summit%7DSwaptionCompactService&wsdlURL=Systems/MeridianEndPoint/must/SwaptionCompactWS/WsdlFiles/SwaptionCompactService.wsdl]




--
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English)
          http://jnn.javaeye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang
Weibo: willemjiang





On Tuesday, October 9, 2012 at 7:56 PM, Sachin wrote:

> Hi All,
>
> I am using camel 2.9.1 with cxf 2.4.2 and spring 3.0.5 to expose some
> webservices with multiple operations using WSDL first approach and PAYLOAD
> mode.
> At camel startup i can see it's starting my cxf routes without any error,
> and in CXF web services' list (http://localhost:9081/bfi/ws/services/) it's
> displaying that there are 2 webservices available.
> But while accessing from SOAP UI or any browser it's dsiplaying that there
> are No service found with below log.
> Can't find the the request for
> http://localhost:9081/bfi/ws/SwaptionCompactService's Observer .
>
>
>
>
> [10/9/12 13:02:25:890 IST] 00000008 ReflectionSer I Creating Service
> {http://dataservice.summit/genericdataservice}GenericDataService from WSDL:
> Systems/MeridianEndPoint/must/GenericDataWS/WsdlFiles/GenericDataService.wsdl
>
> [10/9/12 13:02:26:499 IST] 00000008 ServerImpl I Setting the server's
> publish address to be genericdataservice/GenericDataService
>
> [10/9/12 13:02:26:499 IST] 00000008 ReflectionSer I Creating Service
> {http://dataservice.summit/genericdataservice}GenericDataService from WSDL:
> Systems/MeridianEndPoint/must/GenericDataWS/WsdlFiles/GenericDataService.wsdl
>
> [10/9/12 13:02:26:546 IST] 00000008 PayLoadDataFo I
> org.apache.camel.component.cxf.feature.AbstractDataFormatFeature
> removeInterceptors removing the interceptor
> org.apache.cxf.interceptor.ClientFaultConverter@7b357b35
>
> [10/9/12 13:02:26:609 IST] 00000008 SpringCamelCo I
> org.apache.camel.impl.DefaultCamelContext doStartOrResumeRouteConsumers
> Route: MeridianEndPoint.must.Service.SwaptionCompactWS started and consuming
> from:
> Endpoint[cxf://swaptioncompactservice/SwaptionCompactService?dataFormat=PAYLOAD&portName=%7Bhttp://mustservice.summit%7DSwaptionCompactService&serviceName=%7Bhttp://mustservice.summit%7DSwaptionCompactService&wsdlURL=Systems/MeridianEndPoint/must/SwaptionCompactWS/WsdlFiles/SwaptionCompactService.wsdl]
>
> [10/9/12 13:02:26:656 IST] 00000008 SpringCamelCo I
> org.apache.camel.impl.DefaultCamelContext doStartOrResumeRouteConsumers
> Route: MeridianEndPoint.must.Service.GenericDataWS started and consuming
> from:
> Endpoint[cxf://genericdataservice/GenericDataService?dataFormat=PAYLOAD&portName=%7Bhttp://dataservice.summit/genericdataservice%7DGenericDataService&serviceName=%7Bhttp://dataservice.summit/genericdataservice%7DGenericDataService&wsdlURL=Systems/MeridianEndPoint/must/GenericDataWS/WsdlFiles/GenericDataService.wsdl]
>
> [10/9/12 13:02:26:937 IST] 00000008 SpringCamelCo I
> org.apache.camel.impl.DefaultCamelContext start Total 2 routes, of which 2
> is started.
>
> Thanks in advance.
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-CXF-web-services-are-not-available-tp5720790.html
> Sent from the Camel - Users mailing list archive at Nabble.com (http://Nabble.com).



Reply | Threaded
Open this post in threaded view
|

Re: Camel-CXF web services are not available

Sachin
Hi Willem,

Thanks for your quick reply, i modified my endpoint to have cxf:/// in both the routes, but now at camel startup i am getting below error in infinite loop.

Caused by: java.lang.StackOverflowError
        at java.util.concurrent.ConcurrentHashMap$Segment.get(ConcurrentHashMap.java:350)
        at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:781)
        at org.apache.cxf.transport.DestinationFactoryManagerImpl.getDestinationFactory(DestinationFactoryManagerImpl.java:116)
        at org.apache.cxf.binding.soap.SoapTransportFactory.getDestination(SoapTransportFactory.java:130)
        at org.apache.cxf.binding.soap.SoapTransportFactory.getDestination(SoapTransportFactory.java:134)
at org.apache.cxf.binding.soap.SoapTransportFactory.getDestination(SoapTransportFactory.java:134)
        at org.apache.cxf.binding.soap.SoapTransportFactory.getDestination(SoapTransportFactory.java:134)
        at org.apache.cxf.binding.soap.SoapTransportFactory.getDestination(SoapTransportFactory.java:134)
        at org.apache.cxf.binding.soap.SoapTransportFactory.getDestination(SoapTransportFactory.java:134)
        at org.apache.cxf.binding.soap.SoapTransportFactory.getDestination(SoapTransportFactory.java:134)
        at org.apache.cxf.binding.soap.SoapTransportFactory.getDestination(SoapTransportFactory.java:134)
        at org.apache.cxf.binding.soap.SoapTransportFactory.getDestination(SoapTransportFactory.java:134)
        at org.apache.cxf.binding.soap.SoapTransportFactory.getDestination(SoapTransportFactory.java:134)
        at org.apache.cxf.binding.soap.SoapTransportFactory.getDestination(SoapTransportFactory.java:134)
        at org.apache.cxf.binding.soap.SoapTransportFactory.getDestination(SoapTransportFactory.java:134)
        at org.apache.cxf.binding.soap.SoapTransportFactory.getDestination(SoapTransportFactory.java:134)
        at org.apache.cxf.binding.soap.SoapTransportFactory.getDestination(SoapTransportFactory.java:134)
        at org.apache.cxf.binding.soap.SoapTransportFactory.getDestination(SoapTransportFactory.java:134)
        at org.apache.cxf.binding.soap.SoapTransportFactory.getDestination(SoapTransportFactory.java:134)
        at org.apache.cxf.binding.soap.SoapTransportFactory.getDestination(SoapTransportFactory.java:134)
        at org.apache.cxf.binding.soap.SoapTransportFactory.getDestination(SoapTransportFactory.java:134)
        at org.apache.cxf.binding.soap.SoapTransportFactory.getDestination(SoapTransportFactory.java:134)
        at org.apache.cxf.binding.soap.SoapTransportFactory.getDestination(SoapTransportFactory.java:134)
        at org.apache.cxf.binding.soap.SoapTransportFactory.getDestination(SoapTransportFactory.java:134)
        at org.apache.cxf.binding.soap.SoapTransportFactory.getDestination(SoapTransportFactory.java:134)
        at org.apache.cxf.binding.soap.SoapTransportFactory.getDestination(SoapTransportFactory.java:134)
Reply | Threaded
Open this post in threaded view
|

Re: Camel-CXF web services are not available

Willem.Jiang
Administrator
Can you try to use the more latest Camel version?
I think it could be better if you are trying to use CXF 2.5.x.


BTW, how did deploy your camel route?
--
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English)
          http://jnn.javaeye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang
Weibo: willemjiang





On Tuesday, October 9, 2012 at 9:27 PM, Sachin wrote:

> Hi Willem,
>
> Thanks for your quick reply, i modified my endpoint to have cxf:/// in both
> the routes, but now at camel startup i am getting below error in infinite
> loop.
>
> Caused by: java.lang.StackOverflowError
> at
> java.util.concurrent.ConcurrentHashMap$Segment.get(ConcurrentHashMap.java:350)
> at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:781)
> at
> org.apache.cxf.transport.DestinationFactoryManagerImpl.getDestinationFactory(DestinationFactoryManagerImpl.java:116)
> at
> org.apache.cxf.binding.soap.SoapTransportFactory.getDestination(SoapTransportFactory.java:130)
> at
> org.apache.cxf.binding.soap.SoapTransportFactory.getDestination(SoapTransportFactory.java:134)
> at
> org.apache.cxf.binding.soap.SoapTransportFactory.getDestination(SoapTransportFactory.java:134)
> at
> org.apache.cxf.binding.soap.SoapTransportFactory.getDestination(SoapTransportFactory.java:134)
> at
> org.apache.cxf.binding.soap.SoapTransportFactory.getDestination(SoapTransportFactory.java:134)
> at
> org.apache.cxf.binding.soap.SoapTransportFactory.getDestination(SoapTransportFactory.java:134)
> at
> org.apache.cxf.binding.soap.SoapTransportFactory.getDestination(SoapTransportFactory.java:134)
> at
> org.apache.cxf.binding.soap.SoapTransportFactory.getDestination(SoapTransportFactory.java:134)
> at
> org.apache.cxf.binding.soap.SoapTransportFactory.getDestination(SoapTransportFactory.java:134)
> at
> org.apache.cxf.binding.soap.SoapTransportFactory.getDestination(SoapTransportFactory.java:134)
> at
> org.apache.cxf.binding.soap.SoapTransportFactory.getDestination(SoapTransportFactory.java:134)
> at
> org.apache.cxf.binding.soap.SoapTransportFactory.getDestination(SoapTransportFactory.java:134)
> at
> org.apache.cxf.binding.soap.SoapTransportFactory.getDestination(SoapTransportFactory.java:134)
> at
> org.apache.cxf.binding.soap.SoapTransportFactory.getDestination(SoapTransportFactory.java:134)
> at
> org.apache.cxf.binding.soap.SoapTransportFactory.getDestination(SoapTransportFactory.java:134)
> at
> org.apache.cxf.binding.soap.SoapTransportFactory.getDestination(SoapTransportFactory.java:134)
> at
> org.apache.cxf.binding.soap.SoapTransportFactory.getDestination(SoapTransportFactory.java:134)
> at
> org.apache.cxf.binding.soap.SoapTransportFactory.getDestination(SoapTransportFactory.java:134)
> at
> org.apache.cxf.binding.soap.SoapTransportFactory.getDestination(SoapTransportFactory.java:134)
> at
> org.apache.cxf.binding.soap.SoapTransportFactory.getDestination(SoapTransportFactory.java:134)
> at
> org.apache.cxf.binding.soap.SoapTransportFactory.getDestination(SoapTransportFactory.java:134)
> at
> org.apache.cxf.binding.soap.SoapTransportFactory.getDestination(SoapTransportFactory.java:134)
> at
> org.apache.cxf.binding.soap.SoapTransportFactory.getDestination(SoapTransportFactory.java:134)
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-CXF-web-services-are-not-available-tp5720790p5720794.html
> Sent from the Camel - Users mailing list archive at Nabble.com (http://Nabble.com).



Reply | Threaded
Open this post in threaded view
|

Re: Camel-CXF web services are not available

Sachin
Thanks i will try that, but now i got it working with a workaround. It definitely looks an issue to me.

As CXF 2.4 ( SoapTransportFactory class) only supposrts below namespaces.

"http://schemas.xmlsoap.org/wsdl/soap/"
  "http://schemas.xmlsoap.org/wsdl/http"
    "http://schemas.xmlsoap.org/wsdl/soap/http"
     "http://schemas.xmlsoap.org/wsdl/soap/http/"
        "http://schemas.xmlsoap.org/wsdl/http/".

But i am getting http://schemas.xmlsoap.org/soap/http/ from camel endpoint defination, hence no match found, causing recursion.

I will try with cxf 2.5 and let you know.

Many thanks.
Reply | Threaded
Open this post in threaded view
|

Re: Camel-CXF web services are not available

Sachin
I have tried Camel 2.9.1 with cxf 2.5.4, still the StackOverflow persists. I checked the  SoapTransportFactory class) of  cxf-rt-bindings-soap-2.5.4-.jar, it also supports only below namespaces.

"http://schemas.xmlsoap.org/wsdl/soap/"
  "http://schemas.xmlsoap.org/wsdl/http"
    "http://schemas.xmlsoap.org/wsdl/soap/http"
     "http://schemas.xmlsoap.org/wsdl/soap/http/"
        "http://schemas.xmlsoap.org/wsdl/http/".

and not the http://schemas.xmlsoap.org/soap/http. Do you think i should try with upgraded camel? as it seems to be CXF issue.
BTW what is so special about these namespaces?  
Reply | Threaded
Open this post in threaded view
|

Re: Camel-CXF web services are not available

Willem.Jiang
Administrator
Hi

Can you change the transportID in you WSDL from
"http://schemas.xmlsoap.org/soap/http" to "http://schemas.xmlsoap.org/wsdl/soap/http"
to workaround this issue?

It looks current CXF SoapBindingFactory doesn't make a right mapping for it.


--
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English)
          http://jnn.javaeye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang
Weibo: willemjiang



On Wednesday, October 10, 2012 at 4:52 PM, Sachin wrote:

> I have tried Camel 2.9.1 with cxf 2.5.4, still the StackOverflow persists. I
> checked the SoapTransportFactory class) of
> cxf-rt-bindings-soap-2.5.4-.jar, it also supports only below namespaces.
>
> "http://schemas.xmlsoap.org/wsdl/soap/"
> "http://schemas.xmlsoap.org/wsdl/http"
> "http://schemas.xmlsoap.org/wsdl/soap/http"
> "http://schemas.xmlsoap.org/wsdl/soap/http/"
> "http://schemas.xmlsoap.org/wsdl/http/".
>
> and not the http://schemas.xmlsoap.org/soap/http. Do you think i should try
> with upgraded camel? as it seems to be CXF issue.
> BTW what is so special about these namespaces?
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-CXF-web-services-are-not-available-tp5720790p5720834.html
> Sent from the Camel - Users mailing list archive at Nabble.com (http://Nabble.com).



Reply | Threaded
Open this post in threaded view
|

Re: Camel-CXF web services are not available

Sachin
Yes Willem, i tried that and it works perfectly fine. But as you said it's workaround not a solution, since i have to change all my client's wsdl files.
I have posted same concern in cxf site, let's see.

Many thanks to confirm my workaround.
Reply | Threaded
Open this post in threaded view
|

Re: Camel-CXF web services are not available

Willem.Jiang
Administrator
I just checked the CXF code, there is an entry of "http://schemas.xmlsoap.org/soap/http"
You should use "http://schemas.xmlsoap.org/soap/http" instead of "http://schemas.xmlsoap.org/soap/http/"


--
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English)
          http://jnn.javaeye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang
Weibo: willemjiang





On Wednesday, October 10, 2012 at 6:17 PM, Sachin wrote:

> Yes Willem, i tried that and it works perfectly fine. But as you said it's
> workaround not a solution, since i have to change all my client's wsdl
> files.
> I have posted same concern in cxf site, let's see.
>
> Many thanks to confirm my workaround.
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-CXF-web-services-are-not-available-tp5720790p5720841.html
> Sent from the Camel - Users mailing list archive at Nabble.com (http://Nabble.com).



Reply | Threaded
Open this post in threaded view
|

Re: Camel-CXF web services are not available

Sachin
Yes Willem, it works with  "http://schemas.xmlsoap.org/soap/http"  and not the  "http://schemas.xmlsoap.org/soap/http/".
Should we raise JIRA in CXF?  
Reply | Threaded
Open this post in threaded view
|

Re: Camel-CXF web services are not available

Willem.Jiang
Administrator
We need to clean up the namespace of SoapTransportFactory, as the "http://schemas.xmlsoap.org/soap/http/" is not a validate namespace.
I just filled a JIRA[1] for it.

[1]https://issues.apache.org/jira/browse/CXF-4554 

--
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English)
          http://jnn.javaeye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang
Weibo: willemjiang





On Wednesday, October 10, 2012 at 8:42 PM, Sachin wrote:

> Yes Willem, it works with "http://schemas.xmlsoap.org/soap/http" and not
> the "http://schemas.xmlsoap.org/soap/http/".
> Should we raise JIRA in CXF?
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-CXF-web-services-are-not-available-tp5720790p5720845.html
> Sent from the Camel - Users mailing list archive at Nabble.com (http://Nabble.com).