Thank you for your answer. I try to add the following properties to my xbean :useJBIWrapper="false" and useSOAPEnvelope="false" I get the following error: InvalidPropertyException: Invalid property 'useSOAPEnvelope' of bean class [org.apache.servicemix.cxfbc.CxfBcProvider]: No property 'useSOAPEnvelope' found So, I looked on the Internet and found that my cxf-bc was not up to date. Going on: http://people.apache.org/repo/m2-snapshot-repository/org/apache/servicemix/servicemix-cxf-bc/2009.02-SNAPSHOT/ to downoload the installer and try again... And then, deployment is fine :) Testing the application. I send: <ns0:hello xmlns:ns0="http://ode/bpel/unit-test.wsdl"> <TestPart>Hello</TestPart> </ns0:hello> and then I receive: STATUS: 200 <?xml version='1.0' encoding='UTF-8'?> <odens:helloResponse xmlns:odens="http://ode/bpel/unit-test.wsdl"> <TestPart xmlns:ns0="http://ode/bpel/unit-test.wsdl" xmlns:soap="http://www.w3.org/2003/05/soap-envelope">Held World</TestPart> </odens:helloResponse>
So my SU system is working ------------------------------------------------------------ I just need to do the transformation into the java class using the camel component. Here is the api: http://camel.apache.org/maven/camel-core/apidocs/ My first question is about camel. I just try using the process method in the RouteBuilder as follow: public void configure() { from("jbi:service:http://www.servicemix.org/example/my-service-camel") .process(new XMLProcessor()) .to("jbi:service:http://ode/bpel/unit-test.wsdl/helloWorld") .process(new SOAPProcessor()); } private class XMLProcessor implements Processor { public void process(Exchange exch) throws Exception { // Message inMessage = exch.getIn(); // Message outMessage = exch.getOut(); // exch.setIn(inMessage); // exch.setOut(outMessage); } } private class SOAPProcessor implements Processor { public void process(Exchange exch) throws Exception { } } The commented code generates an error in ServiceMix: STATUS: 500 <?xml version='1.0' encoding='UTF-8'?><error><![CDATA[java.lang.NullPointerException at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:418) at org.apache.servicemix.cxfbc.CxfBcProvider.convertMessageToInputStream(CxfBcProvider.java:691) at org.apache.servicemix.cxfbc.CxfBcProvider.process(CxfBcProvider.java:232) 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'm asking myself: 5a) why this piece of code doesn't work when uncommented? (I thought I changed nothing...) 5b) Is there a simpler way to transform message using java (without xslt). I thought of this solution: - generate classes with jaxb for input xml post (based on the xsd) - generate classes with java2wsdl for output soap message. - link the input and the output with java code for incoming messages (in the XMLProcessor) and for responses (in the SOAPProcessor) 5c) Is this conception should not be used? 5d) do you think of a better way to do this? Gert Vanthienen wrote: > > L.S., > > The CXF provider endpoint can receive the message in three different > formats. The default (that you are using now) is the JBI wrapper > format, which is a special JBI specific way to wrap a SOAP message. > You can disable this by adding useJBIWrapper="false" to your endpoint > definition. In that case, the endpoint expects the plain SOAP > envelope message. From the information in your previous mail, this > seems to be the configuration you need to use. > > And finally, if you specify both useJBIWrapper="false" and > useSOAPEnvelope="false, you tell the endpoint that you are going to > send only the actual message to be sent, without any wrappers. For > your use case, this would allow you to send the plain <ns0:hello > xmlns:ns0="http://ode/bpel/unit-test.wsdl">...</ns0:hello> message. > > Hope this helps your get over the final hurdle, > > Gert Vanthienen > ------------------------ > Open Source SOA: http://fusesource.com > Blog: http://gertvanthienen.blogspot.com/ > > > > 2009/5/29 Fly13DW <[email protected]>: >> >> 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) >> > -- View this message in context: http://www.nabble.com/components-to-use-for-an-XML-to-SOAP-request-tp23745527p23831456.html Sent from the ServiceMix - User mailing list archive at Nabble.com.
