You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Nico <ni...@gmail.com> on 2011/10/26 12:04:52 UTC
Re: Problems with camel comunication
Hi Guillaume,
I'm having the same issue commented on this thread, but I can't get any
solution.
Here it's my configuration:
<!-- HTTP Component -->
<http:endpoint service="example:ExampleSender"
endpoint="exampleSender"
targetService="example:camelReceiver"
targetEndpoint="camelReceiverEndoint"
role="consumer"
locationURI="http://0.0.0.0:8192/example/"
soap="true"
defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
/>
<--! Camel Context -->
<camelContext id="camel" trace="true"
xmlns="http://activemq.apache.org/camel/schema/spring">
<endpoint id="camelByPass"
uri="jbi:endpoint:http://example.com/camelReceiver/camelReceiverEndoint" />
<endpoint id="jsr181endpoint"
uri="jbi:endpoint:http://example.com/ExampleServiceName/ExampleServiceEndpoint?
mep=in-out" />
<route>
<from ref="camelByPass" />
<to uri="log:input" />
<to ref="jsr181endpoint" />
</route>
</camelContext>
I'm getting this on the console
DEBUG - HttpComponent - Retrieving proxied endpoint definition
DEBUG - CamelJbiComponent - Querying service description for
ServiceEndpoint[service=
{http://example.com}camelReceiver,endpoint=camelReceiverEndoint]
DEBUG - CamelJbiComponent - No description found for
{http://example.com}camelReceiver:camelReceiverEndoint
DEBUG - jetty - RESPONSE /example/ 404
DEBUG - JettyContextManager - Dispatching job:
SCEP@1304459265[d=true,io=1,w=true,b=false|false]
DEBUG - jetty - EOF
By the way, for reasons that escape from me I'm using ServiceMix 3.2.3 and Camel
1.4.0
Thanks in advanced.
Re: Problems with camel comunication
Posted by Nico <ni...@gmail.com>.
I tried to copy the WSDL file into the Http Component, but i'm still getting the
same error :(
Maybe my problem it's the http bc... I'm gonna change to a CXF-BC
Thanks for your help!
Re: Problems with camel comunication
Posted by Gert Vanthienen <ge...@gmail.com>.
L.S.,
OK, I guess the HTTP 404 is not from the actual SOAP request then, but
rather from SoapUI trying to get to the WSDL for the HTTP/SOAP endpoint.
The default behavior for the HTTP endpoint when you ask for a WSDL is to
look at the target endpoint's WSDL if nothing has been explicitly configured
on the http:endpoint itself.
Now, if you connect the http:endpoint directly to the JSR-181 endpoint,
looking up the abstract WSDL from the JSR-181 works fine and you get the
WSDL back in SoapUI.
When you put the Camel endpoint in between, the HTTP endpoint does the
lookup on the Camel endpoint instead but that one does not expose a WSDL
which results in the HTTP 404 (not found) status. Unfortunately, the Camel
endpoint does now allow adding a WSDL to it nor can it somehow figure out
what the target endpoint is to look up the WSDL, so the only solution that's
left is to explicitly configure the WSDL on the http:endpoint itself. You
can do that by adding the wsdlResource attribute (e.g.
wsdlResource="classpath:mywsdl.wsdl" if you add the WSDL document to the SU
itself)
Regards,
Gert Vanthienen
------------------------
FuseSource
Web: http://fusesource.com
Blog: http://gertvanthienen.blogspot.com/
On Wed, Oct 26, 2011 at 12:55 PM, Nico <ni...@gmail.com> wrote:
> Hi Gert, thanks for your reply.
>
> The definition of the namespace look like this:
>
> xmlns:example="http://example.com",
>
> so I think it's correct.
>
> The jsr181 endpoint works just fine if I connect it directly to the Http
> Component. In fact, I can get the WSDL and make some calls using SOAPUI.
>
> What I think the problem really is, is on the Htpp Component <-> Camel
> comunication. If I try this configuration on the Camel Context xml file
> description:
>
> <camelContext id="camel" trace="true"
> xmlns="http://activemq.apache.org/camel/schema/spring">
> <endpoint id="camelByPass"
> uri="jbi:endpoint:http://example.com/camelReceiver/camelReceiverEndoint"
> />
>
> <route>
> <from ref="camelByPass" />
> <to uri="log:INPUT" />
> </route>
>
> </camelContext>
>
> nothing its printed on the "INPUT" log.
>
> What am i doing wrong?
>
>
Re: Problems with camel comunication
Posted by Nico <ni...@gmail.com>.
Hi Gert, thanks for your reply.
The definition of the namespace look like this:
xmlns:example="http://example.com",
so I think it's correct.
The jsr181 endpoint works just fine if I connect it directly to the Http
Component. In fact, I can get the WSDL and make some calls using SOAPUI.
What I think the problem really is, is on the Htpp Component <-> Camel
comunication. If I try this configuration on the Camel Context xml file
description:
<camelContext id="camel" trace="true"
xmlns="http://activemq.apache.org/camel/schema/spring">
<endpoint id="camelByPass"
uri="jbi:endpoint:http://example.com/camelReceiver/camelReceiverEndoint" />
<route>
<from ref="camelByPass" />
<to uri="log:INPUT" />
</route>
</camelContext>
nothing its printed on the "INPUT" log.
What am i doing wrong?
Re: Problems with camel comunication
Posted by Gert Vanthienen <ge...@gmail.com>.
L.S.,
What does the namespace uri for xmlns:example look like? You have to make
sure it does not end with a trailing slash, otherwise it won't match the
endpoint URI in Camel (where the / after example.com is a separator).
Also (and I'm not entirely sure about this, but still...) I don't think the
'no description found' is the actual problem here. The Camel endpoint
probably doesn't have a WSDL describing it, so that's perfectly normal and
if the endpoint name is incorrect, I would expect to see errors when a
MessageExchange is being dispatched rather than the HTTP 404 you're seeing
now. It almost looks as if you're trying to access the wrong URL to me
(unless the HTTP component is clever enough to return 404 for an endpoint
that's not being found).
Regards,
Gert Vanthienen
------------------------
FuseSource
Web: http://fusesource.com
Blog: http://gertvanthienen.blogspot.com/
On Wed, Oct 26, 2011 at 12:04 PM, Nico <ni...@gmail.com> wrote:
> Hi Guillaume,
>
> I'm having the same issue commented on this thread, but I can't get any
> solution.
>
> Here it's my configuration:
>
> <!-- HTTP Component -->
> <http:endpoint service="example:ExampleSender"
> endpoint="exampleSender"
> targetService="example:camelReceiver"
> targetEndpoint="camelReceiverEndoint"
> role="consumer"
> locationURI="http://0.0.0.0:8192/example/"
> soap="true"
> defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
> />
>
>
> <--! Camel Context -->
> <camelContext id="camel" trace="true"
> xmlns="http://activemq.apache.org/camel/schema/spring">
> <endpoint id="camelByPass"
>
> uri="jbi:endpoint:http://example.com/camelReceiver/camelReceiverEndoint"
> />
> <endpoint id="jsr181endpoint"
>
> uri="jbi:endpoint:
> http://example.com/ExampleServiceName/ExampleServiceEndpoint?
> mep=in-out<http://example.com/ExampleServiceName/ExampleServiceEndpoint?mep=in-out>"
> />
>
> <route>
> <from ref="camelByPass" />
> <to uri="log:input" />
> <to ref="jsr181endpoint" />
> </route>
> </camelContext>
>
> I'm getting this on the console
>
> DEBUG - HttpComponent - Retrieving proxied endpoint
> definition
> DEBUG - CamelJbiComponent - Querying service description for
> ServiceEndpoint[service=
> {http://example.com}camelReceiver,endpoint=camelReceiverEndoint]
> DEBUG - CamelJbiComponent - No description found for
> {http://example.com}camelReceiver:camelReceiverEndoint
> DEBUG - jetty - RESPONSE /example/ 404
> DEBUG - JettyContextManager - Dispatching job:
> SCEP@1304459265[d=true,io=1,w=true,b=false|false]
> DEBUG - jetty - EOF
>
>
> By the way, for reasons that escape from me I'm using ServiceMix 3.2.3 and
> Camel
> 1.4.0
>
> Thanks in advanced.
>
>
>
>