-
1. Re: Simple Route Question
davsclaus Nov 3, 2011 12:14 PM (in response to gt6081a)You most likely need to use InOut MEP for the JBI endpoint if you want to do a request/reply.
So set the pattern to InOut
-
2. Re: Simple Route Question
gt6081a Nov 3, 2011 2:19 PM (in response to davsclaus)Makes sense. I changed the route to do that and redeployed it. Now when it hits the salesforce jbi point I get a org.apache.camel.InvalidPayloadException: No body available of type: java.lang.String...
I attached the tracer from the attempted run. Also for verbosity since there is a chance I am doing something blatantly wrong since this is all very new to me. I have also attached the route (camel-context.xml) and cxfbc endpoint (xbean.xml) along with the WSDL in case it helps.
Thanks for your help, the community has been invaluable in starting the process with all of this.
-
xbean.xml 1.4 KB
-
camel-context.xml 1.6 KB
-
sfdc.wsdl 473.9 KB
-
log.txt 11.3 KB
-
-
3. Re: Simple Route Question
davsclaus Nov 4, 2011 3:09 AM (in response to gt6081a)Add a before the JBI endpoint.
-
4. Re: Simple Route Question
davsclaus Nov 4, 2011 3:10 AM (in response to gt6081a)What version of ServiceMix or Fuse ESB are you using?
And is there a particular reason for using JBI? eg you are already using JBI etc?
-
5. Re: Simple Route Question
gt6081a Nov 4, 2011 9:49 AM (in response to davsclaus)There isn't really a reason I am using JBI other than I had a friend help me create the endpoint initially. Interactions with Salesforce just use SOAP of HTTP, so if there is a better way to set up the endpoint I'd love to hear it.
In all honesty endpoint creation has been the largest headache for me, I've been sticking to CXF-BC for their creation and deployment thus far because that is what was shown to me initially.
Is there a better way to hit web services exposed over http through servicemix / camel?
-
6. Re: Simple Route Question
gt6081a Nov 4, 2011 9:54 AM (in response to davsclaus)Unfortunately I got the same error. I think when it gets to the jbi endpoint it is formatted properly since the login through the endpoint's web service happens properly, just what comes out is the same as what went in to camel.
-
7. Re: Simple Route Question
gt6081a Nov 4, 2011 9:59 AM (in response to davsclaus)Perhaps something related to the error message farther down is the issue? Though that may just be a symptom of the data conversion not working with the InOut pattern.
Caused by: javax.xml.transform.TransformerException: org.xml.sax.SAXParseException: The prefix "xmlns" cannot be bound to any namespace explicitly; neither can the namespace for "xmlns" be bound to any prefix explicitly.
-
8. Re: Simple Route Question
davsclaus Nov 4, 2011 10:51 AM (in response to gt6081a)Yeah just use the camel-cxf component, and ditch JBI all together. JBI is legacy and not recommend to use for new projects.
-
9. Re: Simple Route Question
gt6081a Nov 4, 2011 11:03 AM (in response to davsclaus)Sounds good.
Does that then mean I only need to define the CXF endpoints within the camel-context.xml and no longer need to deploy cxf-bc bundles as their own endpoints, or so I keep the existing cxf-bc bundle as is and just change what is used on the camel route itself?
-
10. Re: Simple Route Question
davsclaus Nov 4, 2011 11:44 AM (in response to gt6081a)Yes you can have it all in one Camel XML file.
There is a CXF example at Apache. Albeit the documentation is a bit overloaded as there are multiple ways.
But in the XML basically its the <cxf:cxfEndpoint> you use
http://camel.apache.org/cxf-example.html
However if you use Blueprint XML then it may be good to check this source code
https://svn.apache.org/repos/asf/camel/trunk/examples/camel-example-cxf-blueprint/
And there is also webinars which covers using CXF and web servies with Camel and Fuse ESB at
-
11. Re: Simple Route Question
gt6081a Nov 4, 2011 12:14 PM (in response to davsclaus)Ok looking that over and checking in the Camel in Action book, the only thing I don't really understand is the serviceClass option. In the sfdc.wsdl I posted there are obviously a substantial number of operations, so is there a way to forgo the serviceClass and be able to leverage all of the operations contained in the wsdl?
-
12. Re: Simple Route Question
njiang Nov 6, 2011 8:09 PM (in response to gt6081a)The serviceClass is used to generated the data binding information for marshaling and ummarshaling even you already specify the WSDL operation.
If you are using MESSAGE or PAYLOAD dataformat, you don't need to specify the serviceClass option, because CXF doesn't need the serviceClass for marshaling and unmarshaling.
Willem