Hello,
I just wanted to remember what I am trying to do:
-------------- ---------------
-------------
XML Message >>>>>> | BC : HTTP SU | >>>>>> | SE : CAMEL SU | >>>>>> | BC :
CXF SU | >>>>>> WebService
-------------- ---------------
-------------
http://localhost:8192/example my-service-camel helloWorld
http://localhost:8080/ode/processes/helloWorld
(copy/paste in notepad for a better view)
I'm back with a new problem. Here is what I have done since now :
I will descibe my errors as it can help people:
4) manage the CXF component
4a) pom.xml : I change the name of the component
4b) I had the SU to the SA pom:
<dependency>
<groupId>org.apache.servicemix.test3</groupId>
<artifactId>out-cxf-bc</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
4c) I change the xbean.xml so that it is configured as a provider:
<cxfbc:provider wsdl="helloWorld.wsdl"
locationURI="http://localhost:8080/ode/processes/helloWorld"
service="helloService"
endpoint="helloEndpoint"/>
I use a local Web service called HelloWorld (I guess you know what it does
;) ) and I have downloaded the wsdl file into the src/main/resources folder
of the out-cxf-bc component.
4d) I change the java file from the camel-su:
from("jbi:service:http://www.servicemix.org/example/my-service-camel").to("jbi:service:helloService");
I'll configure the transformation later.
------------------------------------------------------------
I build the application. OK. I deploy
I get the following error:
javax.jbi.management.DeploymentException: java.io.FileNotFoundException:
helloWorld.wsdl (Le fichier spÚcifiÚ est introuvable)
(sorry, I'm french ;) )
the correction is in the wsdl attribute... (can easily be found) :
wsdl="classpath:helloWorld.wsdl" instead of wsdl="helloWorld.wsdl"
------------------------------------------------------------
I build the application. OK. I deploy
I get the following error: javax.jbi.management.DeploymentException:
org.apache.cxf.service.factory.ServiceConstructionException: Could not find
definition for service
{http://www.springframework.org/schema/beans}helloService.
hmm, seems like I didn't describe this all right... got a look at the
cxf-wsdl-first (hopefully, there's a lot of examples :) )
The service does not look good: first, I add the nms and then the true
service name I want to access (sounds stupid but I didn't asked myself a lot
of questions...)
in my wsdl I have :
xmlns:tns="http://ode/bpel/unit-test.wsdl" in the wsdl definition
and
<wsdl:service name="helloWorld">
I try to add xmlns:hello="http://ode/bpel/unit-test.wsdl"
and to set service="hello:helloWorld"
------------------------------------------------------------
I build the application. OK. I deploy
I get the following error:
javax.jbi.management.DeploymentException:
org.apache.cxf.endpoint.EndpointException
I should have guess this : an error with each attribute ;)
I have : <wsdl:port name="helloWorldHttpport"
binding="tns:helloWorldHttpBinding"> in the wsdl.
so I try endpoint="helloWorldHttpport" (the port name)
did not work, but there was a low level error since the beginning:
Caused by: org.apache.cxf.BusException: No binding factory for namespace
http://schemas.xmlsoap.org/wsdl/http/ registered.
hmm, this is only present in the wsdl
here are services in the wsdl:
<wsdl:service name="helloWorld">
<wsdl:port name="helloWorldSOAP11port_http"
binding="tns:helloWorldSOAP11Binding">
<soap:address
location="http://localhost:8080/ode/processes/helloWorld"/>
</wsdl:port>
<wsdl:port name="helloWorldSOAP12port_http"
binding="tns:helloWorldSOAP12Binding">
<soap12:address
location="http://localhost:8080/ode/processes/helloWorld"/>
</wsdl:port>
<wsdl:port name="helloWorldHttpport"
binding="tns:helloWorldHttpBinding">
<http:address
location="http://localhost:8080/ode/processes/helloWorld"/>
</wsdl:port>
</wsdl:service>
and the binding are:
<wsdl:binding name="helloWorldSOAP11Binding"
type="tns:helloWorldPortType">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"
style="document"/>
<wsdl:operation name="hello">
<soap:operation soapAction="" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="helloWorldSOAP12Binding"
type="tns:helloWorldPortType">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http"
style="document"/>
<wsdl:operation name="hello">
<soap12:operation soapAction="" style="document"/>
<wsdl:input>
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap12:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="helloWorldHttpBinding" type="tns:helloWorldPortType">
<http:binding verb="POST"/>
<wsdl:operation name="hello">
<http:operation location="helloWorld/hello"/>
<wsdl:input>
<mime:content type="text/xml" part="hello"/>
</wsdl:input>
<wsdl:output>
<mime:content type="text/xml" part="hello"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
and the definition tag is:
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:tns="http://ode/bpel/unit-test.wsdl"
xmlns:ns0="http://ode/bpel/unit-test.wsdl"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
targetNamespace="http://ode/bpel/unit-test.wsdl">
I try to add xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" in the
xbean. not working.
I try to removes these xmlns:http.
I have the following error : javax.jbi.management.DeploymentException:
org.apache.servicemix.soap.api.Fault: org.xml.sax.SAXParseException: The
prefix "http" for element "http:binding" is not bound.
this refers to the tag in the wsdl:binding name="helloWorldHttpBinding".
I'll just try another port... with endpoint="helloWorldSOAP11port_http"
((Same previous error as I didn't save the file >_< )) => mvn install once
again
NO DEPLOYMENT ERROR!!! (sorry to yell, I'm too excited :) )
------------------------------------------------------------
I send: <message>toto</message>
and I get the error response:
STATUS: 500
<?xml version='1.0'
encoding='UTF-8'?><error><![CDATA[java.lang.IllegalArgumentException: Bad
syntax: expected [part0][sep][part1]
at
org.apache.servicemix.common.util.URIResolver.split2(URIResolver.java:184)
at
org.apache.servicemix.common.util.URIResolver.configureExchange(URIResolver.java:141)
at
org.apache.servicemix.camel.CamelConsumerEndpoint.process(CamelConsumerEndpoint.java:85)
at
org.apache.servicemix.camel.JbiEndpoint$JbiProducer.process(JbiEndpoint.java:91)
at
org.apache.camel.processor.SendProcessor.process(SendProcessor.java:75)
at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:57)
at
org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:155)
at
org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:91)
at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:57)
at
org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:39)
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:41)
at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:66)
at
org.apache.servicemix.camel.CamelProviderEndpoint.handleActiveProviderExchange(CamelProviderEndpoint.java:115)
at
org.apache.servicemix.camel.CamelProviderEndpoint.process(CamelProviderEndpoint.java:73)
at
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:600)
at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:554)
at
org.apache.servicemix.common.AsyncBaseLifeCycle.onMessageExchange(AsyncBaseLifeCycle.java:510)
at
org.apache.servicemix.common.SyncLifeCycleWrapper.onMessageExchange(SyncLifeCycleWrapper.java:60)
at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:620)
at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:172)
at
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:168)
at
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
]]></error>
I try the other available service. Deploy is OK but I got the same error.
And then I thought : maybe the destination route is wrong. So I try the
to("jbi:service:http://ode/bpel/unit-test.wsdl/helloWorld"); in the java
file.
------------------------------------------------------------
New error:
org.apache.cxf.interceptor.Fault: Message wrapper element is '{}message' but
expected '{http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper}message'
at
org.apache.servicemix.cxfbc.interceptors.JbiOutWsdl1Interceptor.handleMessage(JbiOutWsdl1Interceptor.java:97)
at
org.apache.servicemix.cxfbc.interceptors.JbiOutWsdl1Interceptor.handleMessage(JbiOutWsdl1Interceptor.java:56)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:220)
at
org.apache.servicemix.cxfbc.CxfBcProvider.process(CxfBcProvider.java:221)
at
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:600)
at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:554)
at
org.apache.servicemix.common.AsyncBaseLifeCycle.onMessageExchange(AsyncBaseLifeCycle.java:510)
at
org.apache.servicemix.common.SyncLifeCycleWrapper.onMessageExchange(SyncLifeCycleWrapper.java:60)
at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:620)
at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:172)
at
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:168)
at
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
This time, this is the message that is wrong! Guess I'm gonna need to send a
soap as entry to test the communication.
Here is the new data I send:
<soapenv:Envelope xmlns:ns0="http://ode/bpel/unit-test.wsdl"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<ns0:hello xmlns:ns0="http://ode/bpel/unit-test.wsdl">
<TestPart>ttttttttttttttttttttttttttt</TestPart>
</ns0:hello>
</soapenv:Body>
</soapenv:Envelope>
And the error message I receive:
Message wrapper element is
'{http://schemas.xmlsoap.org/soap/envelope/}Envelope' but expected
'{http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper}message'
I try:
<soapenv:message xmlns:ns0="http://ode/bpel/unit-test.wsdl"
xmlns:soapenv="http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<ns0:hello xmlns:ns0="http://ode/bpel/unit-test.wsdl">
<TestPart>ttttttttttttttttttttttttttt</TestPart>
</ns0:hello>
</soapenv:Body>
</soapenv:message>
(message instead of envelope)
And I have : Unexpected part wrapper element
'{http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper}message' expected
'{http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper}part'
Here, I don't understand anymore. There is no trace in Tomcat so the WS is
not called.
Does someone has a clue?
Gert Vanthienen wrote:
>
> L.S.,
>
> Good to see you got this working! One clarification on your doubts
> with the service/endpoint. A service can have multiple endpoints and
> an endpoint is only unique when specified together with a service, so
> that's why you always have to specify a targetService together with a
> targetEndpoint. On the Camel side, the matching URI that specifies the
> endpoint is
> jbi:endpoint:http://www.servicemix.org/example/my-service-camel/endpoint.
>
> Don't hestitate to contact us again if you run into any more problems...
>
> Regards,
>
> Gert Vanthienen
> ------------------------
> Open Source SOA: http://fusesource.com
> Blog: http://gertvanthienen.blogspot.com/
>
>
>
> 2009/5/28 Fly13DW <[email protected]>:
>>
>>
>> This is working. Here are the changes I've made:
>>
>> For the java file :
>> from("jbi:service:http://www.servicemix.org/example/my-service-camel").to("log:tutorial");
>> -- You shall not use the endpoint otherwise there will be an error about
>> the
>> service that is unused (see previous post)
>>
>> for the http-su xbean :
>> <beans xmlns:http="http://servicemix.apache.org/http/1.0"
>> xmlns:myService="http://www.servicemix.org/example">
>> <http:consumer service="myService:my-service-http"
>> endpoint="endpoint"
>> targetService="myService:my-service-camel"
>> locationURI="http://0.0.0.0:8192/example"
>> defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
>> />
>> </beans>
>> -- No need to define the targetEndpoint, otherwise there will be a
>> warning
>> in servicemix (telling that:Target service
>> ({http://www.servicemix.org/example}my-service-camel) and endpoint
>> (endpoint) specified, but no matching endpoint found. Only the service
>> will
>> be used for routing.)
>>
>> and there it is : the adress shall be like jbi:service:${targetService}
>>
>> To test the application, I am using the html page provided in the
>> wsdl-first
>> example, pointing to "http://localhost:8192/example"
>> Hoping I'm not posting too much...
>>
>> Again, thank you for the help you provided :)
>>
>> I have cxf left to do. I'll let you know and post my code.
>>
>> Regards,
>> Cedric
>>
>>
>> Fly13DW wrote:
>>>
>>> After some tries it seems to me that the servicemix-http consumer
>>> requires
>>> a targetService. But I don't know how to define the service for the
>>> camel
>>> component (can't find it in the xsd definition...).
>>>
>>> -- I say that because I have an error when I don't precise the
>>> targetService for the servicemix-http
>>> (javax.jbi.management.DeploymentException: targetInterface,
>>> targetService
>>> or targetUri should be specified).
>>>
>>>
>>>
>>> Fly13DW wrote:
>>>>
>>>> Thank you for your help. It is not exactly right but it helped me to
>>>> see
>>>> where was my mistake.
>>>> from("jbi:myService/my-service-http-endpoint").to("log:in_message");
>>>> isn't working.
>>>>
>>>> I just mess up when I post the content of the xbean.xml from in-http-bc
>>>> (1b). My file is:
>>>> <beans xmlns:http="http://servicemix.apache.org/http/1.0"
>>>> xmlns:myService="http://www.servicemix.org/example">
>>>> <http:consumer service="myService:my-service-http"
>>>> endpoint="myService:my-service-http-endpoint"
>>>> targetService="myService/my-service-camel"
>>>> targetEndpoint="camel-in"
>>>> locationURI="http://0.0.0.0:8192/example"
>>>> defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
>>>> />
>>>> </beans>
>>>>
>>>> Here is something I don't understand: if I want to create a jbi route
>>>> from the consumer.
>>>> <My_supposition>
>>>> To me, the message is coming from the external world to
>>>> "http://0.0.0.0:8192/example", using the endpoint
>>>> "myService:my-service-http-endpoint" and the service
>>>> "myService:my-service-http".
>>>> Then, once received by HTTP SU, it is send to the targetService
>>>> "myService/my-service-camel" throught the endpoint "camel-in".
>>>> So camel-in should be the name of the endpoint used for camel SU entry,
>>>> and myService/my-service-camel his service.
>>>> </My_supposition>
>>>> Is this supposition right?
>>>>
>>>> it seems to work when I put :
>>>> from("jbi:service:myService/my-service-http").to("log:tutorial");
>>>> but an error is traced in servicemix console :
>>>> WARN - HttpComponent - Target service
>>>> (myService/my-service-camel) and endpoint (camel-in) specified, but no
>>>> matching endpoint found. Only the service will be used for routing.
>>>> WARN - DefaultBroker - ServiceName
>>>> (myService/my-service-camel) specified for routing, but can't find it
>>>> registered
>>>>
>>>> Can you help me understanding what is the comportment of this http
>>>> consumer?
>>>>
>>>>
>>>>
>>>> Jean-Baptiste Onofré wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> Answer in line:
>>>>>
>>>>>> 1) the http su:
>>>>>> I used this tutorial
>>>>>> (http://cwiki.apache.org/SM/704-intermediate-configuring-the-http-consumer-su.html)
>>>>>> 1a) I change the name in the pom.xml to "Wsdl distant :: IN HTTP SU"
>>>>>> and add
>>>>>> the dependency:
>>>>>> <dependency>
>>>>>> <groupId>org.apache.servicemix</groupId>
>>>>>> <artifactId>servicemix-core</artifactId>
>>>>>> <version>${servicemix-version}</version>
>>>>>> </dependency>
>>>>>
>>>>> Be careful, if you want to use the HTTP component, you need to add the
>>>>> servicemix-http dependency in your pom.xml like this:
>>>>> <dependency>
>>>>> <groupId>org.apache.servicemix</groupId>
>>>>> <artifactId>servicemix-http</artifactId>
>>>>> <version>2009.01</version>
>>>>> </dependency>
>>>>>
>>>>> Basicly, you don't need the servicemix-core dependency in your SU.
>>>>>
>>>>>>
>>>>>> 1b) And then I set the xbean.xml to:
>>>>>> <beans xmlns:http="http://servicemix.apache.org/http/1.0"
>>>>>> xmlns:ex="http://www.servicemix.org/example">
>>>>>>
>>>>>> <http:endpoint service="myService:my-service-http"
>>>>>> endpoint="myService:my-service-http-endpoint"
>>>>>> targetService="myService:my-service-camel"
>>>>>> targetEndpoint="camel-in"
>>>>>> locationURI="http://0.0.0.0:8181/myService" />
>>>>>>
>>>>>> </beans>
>>>>>>
>>>>>> by the way, I have a question in my mind :
>>>>>> 1c) what is the difference between http:endpoint and http:consumer ?
>>>>>> (I
>>>>>> tried to use http:endpoint but it wasn't working)
>>>>>
>>>>> The HTTP component supports two kinds of endpoint: the old fashion and
>>>>> the new one.
>>>>>
>>>>> The old fashion uses the http:endpoint notation and the component role
>>>>> is defined using the role attribute (consumer or provider). You can
>>>>> find
>>>>> the old fashion documentation here:
>>>>> http://servicemix.apache.org/servicemix-http.html.
>>>>> This usage should be deprecated soon.
>>>>>
>>>>> On the other hand, the new fashion uses http:consumer and
>>>>> http:provider
>>>>> notation and define the component role.
>>>>> You can find the new fashion documentation here:
>>>>> http://servicemix.apache.org/servicemix-http-new-endpoints.html.
>>>>>
>>>>> In your case, I think that the usage of the http:endpoint is not
>>>>> correct
>>>>> as you haven't define the role attribute.
>>>>>
>>>>>>
>>>>>> ------------------------------------------------------------
>>>>>>
>>>>>> 2) the camel se:
>>>>>> I used this tutorial
>>>>>> (http://servicemix.apache.org/32-using-the-camel-java-dsl-for-the-first-time.html)
>>>>>> 2a) I change the name in the pom.xml to "Wsdl distant :: CAMEL SE SU"
>>>>>> 2b) I change the camel-context.xml with :
>>>>>> <camelContext id="camel"
>>>>>> xmlns="http://activemq.apache.org/camel/schema/spring">
>>>>>> <package>org.apache.servicemix.test3</package>
>>>>>> </camelContext>
>>>>>> 2c) I change the org.apache.servicemix.test3.MyRouteBuilder.java
>>>>>> I add the line from("ex:httphandler").to("log:tutorial"); in the
>>>>>> configure
>>>>>> method (just to test the two components)
>>>>>>
>>>>>> ------------------------------------------------------------
>>>>>>
>>>>>> 3a) I create the Service assembly
>>>>>> TestWsdlDistant3> mvn archetype:create
>>>>>> -DarchetypeArtifactId=servicemix-service-assembly
>>>>>> -DarchetypeGroupId=org.apache.servicemix.tooling
>>>>>> -DartifactId=wsdl-distant-sa
>>>>>> 3b) I add the http and camel SU dependencies in the pom.xml file
>>>>>> <dependency>
>>>>>> <groupId>org.apache.servicemix.test3</groupId>
>>>>>> <artifactId>in-http-bc</artifactId>
>>>>>> <version>1.0-SNAPSHOT</version>
>>>>>> </dependency>
>>>>>> <dependency>
>>>>>> <groupId>org.apache.servicemix.test3</groupId>
>>>>>> <artifactId>camel-su</artifactId>
>>>>>> <version>1.0-SNAPSHOT</version>
>>>>>> </dependency>
>>>>>>
>>>>> Be careful, in the camel se doesn't need to have your http SU in
>>>>> dependency. The routing between the Camel SE and the HTTP BC will be
>>>>> made by the container (SMX) using JBI routing.
>>>>>
>>>>>> ------------------------------------------------------------
>>>>>>
>>>>>> I run mvn install and I try to deploy the application
>>>>>>
>>>>>> I had the following error at deployment:
>>>>>> org.apache.camel.NoSuchEndpointException: No endpoint could be found
>>>>>> for:
>>>>>> ex:httphandler
>>>>>>
>>>>>> So I tryed to add
>>>>>> xmlns:ex="http://www.servicemix.org/example"
>>>>>> in the camel-context (2b) either in the bean and the camelContext
>>>>>> elements
>>>>>> but it didn't work.
>>>>>> Then, reading some topics, I tried to add the HTTP dependency into
>>>>>> the
>>>>>> camel
>>>>>> pom.xml (2a). didn't work neither.
>>>>>>
>>>>>> I saw that you were talking about classpath definition but I just
>>>>>> can't
>>>>>> figure out:
>>>>>> How (meaning when) can I indicate the "ex:httphandler" import for
>>>>>> camel
>>>>>> SU?
>>>>>>
>>>>>> I hope I was clear... Thank you for you help
>>>>>
>>>>> In your case, you have defined a http endpoint (consumer)
>>>>> myService:my-service-http-endpoint.
>>>>> This endpoint is deployed into SMX as a JBI endpoint.
>>>>>
>>>>> Your Camel route should wait for message coming from this endpoint. So
>>>>> it should look like:
>>>>> from("jbi:myService/my-service-http-endpoint").to("log:in_message");
>>>>>
>>>>> This route listens message coming from your HTTP endpoint (deployed
>>>>> into
>>>>> SMX as a JBI endpoint) and put this message into the in_message log.
>>>>>
>>>>> I hope it's clear :)
>>>>>
>>>>> Regards
>>>>> JB
>>>>>
>>>>>>
>>>>>>
>>>>>> the complete stackTrace is :
>>>>>> <loc-message>Could not deploy xbean service unit</loc-message>
>>>>>> </msg-loc-info>
>>>>>> </task-status-msg>
>>>>>> <exception-info>
>>>>>> <nesting-level>1</nesting-level>
>>>>>> <msg-loc-info>
>>>>>> <loc-token/>
>>>>>> <loc-message>No endpoint
>>>>>> could
>>>>>> be
>>>>>> found for: ex:httphandler</loc-message>
>>>>>>
>>>>>> <stack-trace><![CDATA[org.apache.camel.NoSuchEndpointException: No
>>>>>> endpoint
>>>>>> could be found for: ex:httphandler
>>>>>> at
>>>>>> org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:54)
>>>>>> at
>>>>>> org.apache.camel.model.RouteType.resolveEndpoint(RouteType.java:100)
>>>>>> at
>>>>>> org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:102)
>>>>>> at
>>>>>> org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:108)
>>>>>> at
>>>>>> org.apache.camel.model.FromType.resolveEndpoint(FromType.java:73)
>>>>>> at
>>>>>> org.apache.camel.impl.DefaultRouteContext.getEndpoint(DefaultRouteContext.java:77)
>>>>>> at
>>>>>> org.apache.camel.model.RouteType.addRoutes(RouteType.java:214)
>>>>>> at
>>>>>> org.apache.camel.model.RouteType.addRoutes(RouteType.java:90)
>>>>>> at
>>>>>> org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:537)
>>>>>> at
>>>>>> org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:529)
>>>>>> at
>>>>>> org.apache.camel.spring.SpringCamelContext.doStart(SpringCamelContext.java:149)
>>>>>> at
>>>>>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:47)
>>>>>> at
>>>>>> org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:103)
>>>>>> at
>>>>>> org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:78)
>>>>>> at
>>>>>> org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
>>>>>> at
>>>>>> org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:76)
>>>>>> at
>>>>>> org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:275)
>>>>>> at
>>>>>> org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:737)
>>>>>> at
>>>>>> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:384)
>>>>>> at
>>>>>> org.apache.servicemix.common.xbean.AbstractXBeanDeployer.deploy(AbstractXBeanDeployer.java:86)
>>>>>> at
>>>>>> org.apache.servicemix.camel.CamelSpringDeployer.deploy(CamelSpringDeployer.java:71)
>>>>>> at
>>>>>> org.apache.servicemix.common.BaseServiceUnitManager.doDeploy(BaseServiceUnitManager.java:88)
>>>>>> at
>>>>>> org.apache.servicemix.common.BaseServiceUnitManager.deploy(BaseServiceUnitManager.java:69)
>>>>>> at
>>>>>> org.apache.servicemix.jbi.framework.DeploymentService.deployServiceAssembly(DeploymentService.java:508)
>>>>>> at
>>>>>> org.apache.servicemix.jbi.framework.AutoDeploymentService.updateServiceAssembly(AutoDeploymentService.java:353)
>>>>>> at
>>>>>> org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(AutoDeploymentService.java:256)
>>>>>> at
>>>>>> org.apache.servicemix.jbi.framework.AutoDeploymentService.monitorDirectory(AutoDeploymentService.java:667)
>>>>>> at
>>>>>> org.apache.servicemix.jbi.framework.AutoDeploymentService.access$800(AutoDeploymentService.java:62)
>>>>>> at
>>>>>> org.apache.servicemix.jbi.framework.AutoDeploymentService$1.run(AutoDeploymentService.java:631)
>>>>>> at java.util.TimerThread.mainLoop(Timer.java:512)
>>>>>> at java.util.TimerThread.run(Timer.java:462)
>>>>>> ]]></stack-trace>
>>>>>> </msg-loc-info>
>>>>>> </exception-info>
>>>>>> </task-result-details>
>>>>>> </component-task-result-details>
>>>>>> </component-task-result>
>>>>>> </jbi-task-result>
>>>>>> </jbi-task>
>>>>>>
>>>>>> at
>>>>>> org.apache.servicemix.jbi.framework.ManagementSupport.failure(ManagementSupport.java:125)
>>>>>> at
>>>>>> org.apache.servicemix.jbi.framework.ManagementSupport.failure(ManagementSupport.java:111)
>>>>>> at
>>>>>> org.apache.servicemix.jbi.framework.DeploymentService.deployServiceAssembly(DeploymentService.java:543)
>>>>>> at
>>>>>> org.apache.servicemix.jbi.framework.AutoDeploymentService.updateServiceAssembly(AutoDeploymentService.java:353)
>>>>>> ... 6 more
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> Fly13DW wrote:
>>>>>>> Thank you for your answer.
>>>>>>>
>>>>>>> I create the project as said in the tutorial:
>>>>>>>> mvn archetype:create
>>>>>>>> -DarchetypeGroupId=org.apache.servicemix.tooling
>>>>>>>> -DarchetypeArtifactId=servicemix-project-root
>>>>>>>> -DgroupId=org.apache.servicemix.test3 -DartifactId=TestWsdlDistant3
>>>>>>> ------------------------------------------------------------
>>>>>>>
>>>>>>> Then I create a HTTP SU consumer into the new created folder:
>>>>>>> TestWsdlDistant3> mvn archetype:create
>>>>>>> -DarchetypeGroupId=org.apache.servicemix.tooling
>>>>>>> -DarchetypeArtifactId=servicemix-http-consumer-service-unit
>>>>>>> -DgroupId=org.apache.servicemix.test3 -DartifactId=in-http-bc
>>>>>>> the Camel SU (the SE, I think?):
>>>>>>> TestWsdlDistant3> mvn archetype:create
>>>>>>> -DarchetypeGroupId=org.apache.servicemix.tooling
>>>>>>> -DarchetypeArtifactId=servicemix-camel-service-unit
>>>>>>> -DgroupId=org.apache.servicemix.test3 -DartifactId=camel-su
>>>>>>> and finally the CXF SU provider:
>>>>>>> TestWsdlDistant3> mvn archetype:create
>>>>>>> -DarchetypeGroupId=org.apache.servicemix.tooling
>>>>>>> -DarchetypeArtifactId=servicemix-cxf-bc-service-unit
>>>>>>> -DgroupId=org.apache.servicemix.test3 -DartifactId=out-cxf-bc
>>>>>>>
>>>>>>> ------------------------------------------------------------
>>>>>>>
>>>>>>> I try mvn install (just to see if everything is ok)
>>>>>>>
>>>>>>> I have a Build failed and these error messages :
>>>>>>> error: error reading
>>>>>>> D:\Users\itmaster\.m2\repository\org\springframework\spring-support\2.0.6\spring-support-2.0.6.jar;
>>>>>>> error in opening zip file
>>>>>>> error: error reading
>>>>>>> D:\Users\itmaster\.m2\repository\xerces\xerces\2.0.2\xerces-2.0.2.jar;
>>>>>>> error in opening zip file
>>>>>>>
>>>>>>> so I just try to delete these files and build again and I have the
>>>>>>> same
>>>>>>> error with another one:
>>>>>>> [INFO] Unable to find resource 'xerces:xerces:jar:2.0.2' in
>>>>>>> repository
>>>>>>> apache (http://people.apache.org/repo/m2-ibiblio-rsync-repository)
>>>>>>> Downloading:
>>>>>>> http://servicemix.org/m2-repo/xerces/xerces/2.0.2/xerces-2.0.2.jar
>>>>>>> 1K downloaded (spring-support-2.0.6.jar)
>>>>>>> 1K downloaded (xerces-2.0.2.jar)
>>>>>>> [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local =
>>>>>>> '000fe85014f41d2570499c0f861c6e98665499ec'; remote = '<!--
>>>>>>>
>>>>>>> top.location="http://servicemix.org/?fp=kXHnDH0xDZIfzlzX%2BEMg2aI8qPN9TqlzHEvrAIivMgIVV8vmkUBX4h5fLLjpt9HdKiETENFLeq7LkY2rrQCF2FHRwxbQ0JOI5XstHCqgtkjkneSsbkG9g5TREzkc6g28z%2B3I&cifr=1";
>>>>>>> /*
>>>>>>> -->
>>>>>>> <script' - RETRYING
>>>>>>> Downloading:
>>>>>>> http://servicemix.org/m2-repo/org/springframework/spring-support/2.0.6/spring-support-2.0.6.jar
>>>>>>> [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local =
>>>>>>> 'd8139c47cb24b298407e36191473fa0a5ab8bbdd'; remote = '<!--
>>>>>>>
>>>>>>> top.location="http://servicemix.org/?fp=kXHnDH0xDZIfzlzX%2BEMg2aI8qPN9TqlzHEvrAIivMgG0LVtTK53YbqdD8EHCEuJyd%2BkjnjI2WBtsvlBX76VzTsAnUF%2FzL%2BaLUNTBFrTXZaMDt3sXM13kSMp4Y56EJ3DCJUDA&cifr=1";
>>>>>>> /*
>>>>>>> -->
>>>>>>> <script' - RETRYING
>>>>>>> Downloading:
>>>>>>> http://servicemix.org/m2-repo/xerces/xerces/2.0.2/xerces-2.0.2.jar
>>>>>>> 1K downloaded (spring-support-2.0.6.jar)
>>>>>>> 1K downloaded (xerces-2.0.2.jar)
>>>>>>> [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local =
>>>>>>> 'f080208aea8ead70f558a477b75823eb2edf0528'; remote = '<!--
>>>>>>>
>>>>>>> top.location="http://servicemix.org/?fp=kXHnDH0xDZIfzlzX%2BEMg2aI8qPN9TqlzHEvrAIivMgV6gYeVlYjq3NS%2BzAEK8w9wFtV%2FHPf%2BrPQZdHtrGqJHtifNu99Ejea0M8k2UkVu6zZn%2FCpaMZLYESTRe7Gfw%2FqxB90c&cifr=1";
>>>>>>> /*
>>>>>>> -->
>>>>>>> <script' - IGNORING
>>>>>>> [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local =
>>>>>>> '6bdc54056ba8980e25701c351629116897ace8ee'; remote = '<!--
>>>>>>>
>>>>>>> top.location="http://servicemix.org/?fp=kXHnDH0xDZIfzlzX%2BEMg2aI8qPN9TqlzHEvrAIivMgRsfuksEv7MO3Rr1LS8rmxCcpQDTTFBgZnvXuESeWVrUW%2BLbGYnJsDy3WYHVnKIan6zcl7W08M%2Bmm6a3rJd0s20huUO&cifr=1";
>>>>>>> /*
>>>>>>> -->
>>>>>>> <script' - IGNORING
>>>>>>>
>>>>>>> (and the same for spring-support).
>>>>>>> I think this means that the source is not available.
>>>>>>> Do I have to modify some configuration (resource server)?
>>>>>>> Does someone have a hint?
>>>>>>>
>>>>>>> Regards,
>>>>>>> Cedric
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Gert Vanthienen wrote:
>>>>>>>> L.S.,
>>>>>>>>
>>>>>>>> First of all, welcome to ServiceMix! ;)
>>>>>>>>
>>>>>>>> If you want to receive the non-soap XML message using a HTTP POST,
>>>>>>>> an
>>>>>>>> HTTP consumer endpoint would be the ideal solution there. For
>>>>>>>> invoking the external endpoint, you could use an HTTP provider
>>>>>>>> endpoint but we would generally recommend using the
>>>>>>>> servicemix-cxfbc,
>>>>>>>> because it is specifically geared towards dealing with web
>>>>>>>> services.
>>>>>>>>
>>>>>>>> Once you have these two set up, you could actually choose any
>>>>>>>> component that best suits your needs : servicemix-bean if you want
>>>>>>>> to
>>>>>>>> use a POJO, servicemix-saxon if you are going for XSL, ... My
>>>>>>>> personal favorite/recommendation would be to use Camel inbetween
>>>>>>>> the
>>>>>>>> two endpoints: it has excellent EIP and POJO support and there are
>>>>>>>> components available for XSL, EL, ... to help you build the
>>>>>>>> transformations.
>>>>>>>>
>>>>>>>> So in a nutshell, I think the best solution for you would be:
>>>>>>>> HTTP consumer -> Camel route -> CXF provider
>>>>>>>>
>>>>>>>> Regards,
>>>>>>>>
>>>>>>>> Gert Vanthienen
>>>>>>>> ------------------------
>>>>>>>> Open Source SOA: http://fusesource.com
>>>>>>>> Blog: http://gertvanthienen.blogspot.com/
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> 2009/5/27 Fly13DW <[email protected]>:
>>>>>>>>> Hello,
>>>>>>>>>
>>>>>>>>> I'm new with Apache ServiceMix, and I'm asking questions
>>>>>>>>> concerning
>>>>>>>>> the>
>>>>>>>>> architecture I should use.
>>>>>>>>> 1) I have a XML message as entry (no-SOAP)
>>>>>>>>> <message>msg</message>
>>>>>>>>> 2) This message has to be converted to be passed to an external
>>>>>>>>> Web
>>>>>>>>> Service,
>>>>>>>>> using SOAP.
>>>>>>>>> 3) The Web Service returns a SOAP message that has to be converted
>>>>>>>>> back
>>>>>>>>> to
>>>>>>>>> XML
>>>>>>>>>
>>>>>>>>> I thought I use the servicemix-http for the Binding Component (1),
>>>>>>>>> and
>>>>>>>>> maybe
>>>>>>>>> the servicemix-jsr181 (2).
>>>>>>>>> My questions are :
>>>>>>>>> - do you think there is a better Binding Component (1) to do this
>>>>>>>>> job?
>>>>>>>>> - my servicemix-jsr181 will use a java pojo. Do I have to do a
>>>>>>>>> call
>>>>>>>>> to
>>>>>>>>> the
>>>>>>>>> Web Service in this implemented class, or should I use another
>>>>>>>>> architecture?
>>>>>>>>>
>>>>>>>>> thank you for your answers
>>>>>>>>> --
>>>>>>>>> View this message in context:
>>>>>>>>> http://www.nabble.com/components-to-use-for-an-XML-to-SOAP-request-tp23745527p23745527.html
>>>>>>>>> Sent from the ServiceMix - User mailing list archive at
>>>>>>>>> Nabble.com.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>> -----
>>>>>>>> ---
>>>>>>>> Gert Vanthienen
>>>>>>>> http://gertvanthienen.blogspot.com
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/components-to-use-for-an-XML-to-SOAP-request-tp23745527p23765726.html
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
>
>
> -----
> ---
> Gert Vanthienen
> http://gertvanthienen.blogspot.com
>
--
View this message in context:
http://www.nabble.com/components-to-use-for-an-XML-to-SOAP-request-tp23745527p23778231.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.