If not using CXF and you want webservices then what else webservice framework would you use?
You could use raw HTTP using camel-jetty
The decision as to which webservice framework to use has not been decided yet. That is part of the reason why I have been asked to come up with some different examples. I tried coming up with an example today that would use jetty like you suggested. While defining my server routes I was able to setup a from("jetty:http ... to create my server.
I want my soap message to go from the url to a method in a java class so that I can check for authentication. I found examples that implemented the class org.apache.camel.Processor to send incoming messages to the method public void process(Exchange exchange). I was able to get this to work however I am not sure how to take this exchange object and extract my original soap message. I do not think I can just get back my original javax.xml.soap.SOAPMessage object, however I did discover that I could get an org.apache.camel.component.http.HttpMessage object by using HttpMessage message = (HttpMessage)exchange.getIn().getBody(HttpMessage.class).
I did not have enough time to go through all of this today, but do you think using the HttpMessage object is the right way to be able to retrieve information from my original soap message, or do you know of some other method that may be better? Thanks.
Camel-Jetty is for raw http services. So it will contain the text that was sent to it from the webbrowser.
So the data type is like: String containing the raw http the web browser sends.
So if you want this String to be some sort of SOAP/XML object then you must parse it or use some sort of data formatter than can take the raw String and convert it to SOAP.
That is why most people will use some sort of webservice framework to let it handle at that.
Camel has XPath support so you can use it to get some stuff out of the raw data since its XML when its web service.
You can also get it as org.w3c.Document object in Camel using
Document doc = exchange.getIn().getBody(Document.class);
Camel has build in type converters that can do this.
There is a tutorial here how to use Axis 1.4 with Camel
Other webserivce frameworks that I know of
- Axis 2
- Spring Web Service
Thanks for the advice. I will have to take some time to go through the tutorial and try some other things, but I think this should be helpful.