reficio / soap-ws

Java library, based on Spring-WS, that enables handling SOAP on a purely XML level
297 stars 145 forks source link

Add Apache Camel support #11

Open tombujok opened 11 years ago

pjagielski commented 11 years ago

Do you mean exposing soap-ws endpoint via Camel bus? Something similar to spring-ws

from("direct:example")
.to("soap-ws:http://foo.com/bar?soapAction=http://foo.com")

Maybe also integrating SoapBuilder for message building?

tombujok commented 11 years ago

Yes exactly! I guess it would have to be analyzed thoroughly to propose something that is better than the current soap bindings, but that is the rough idea. Would you be willing to contribute and gain some community kudos ;) ?

pjagielski commented 11 years ago

I'll take a look and stay in touch. Can't promise but try to do my best ;)

pjagielski commented 11 years ago

I looked at the camel-extras today and I think that we could provide both producer and consumer based on soap-ws. The key advantage over spring-ws that I can see for now is to inject SoapServer and SoapClient instances to avoid boilerplate configuration in the endpoint definition. Another one is to user SoapBuilder within the route to build basic request/response messages that can be modified later.

So the sample route could be something like this:

from("soap-ws:currencyServer")
... // request processing
    .setHeader("body").method("currencyBuilder", "buildResponse")
    .setBody().simple("${header.body}");

from("direct:request")
     .setHeader("body").method("currencyBuilder", "buildRequest")
     .setBody().simple("${header.body}")
     .to("soap-ws:currencyClient");

(I used Camel some months ago so this code could not actually work, but just to show the concept ;)

In terms of maven modules I think of adding soap-camel at the top level and then camel submodule in the soap-examples.

What do you think?

tombujok commented 11 years ago

That's looking really nice! I created a Wiki page, where we could prepare the first draft of the api / builders. We could also gather all the knowledge related to this ticket there. The first thing would be to gather the links about the spring-ws and cxf camel integration plugins (any others?)- pros and cons, etc. Then we could propose a solution for soap-ws. Here's the link to the wiki page: https://github.com/reficio/soap-ws/wiki/Apache-Camel-Integration-Concept

pjagielski commented 11 years ago

I've written some draft, but personally, I prefer discussing on code ;) So maybe I'll try to contribute something and then we should discuss it on pull request and update the wiki page?

tombujok commented 11 years ago

Sorry for the late reply, was kind of extremly busy lately. Definitely, I am also a code-oriented guy :) I will commit a camel module, where you could push pull requests, ok?

pjagielski commented 11 years ago

Ok, sounds good - I will have some time this week.

tombujok commented 11 years ago

I did not manage to create the module. Please fell free to fork the code and do it yourself. I will be back in mid June. On Jun 3, 2013 4:44 PM, "Piotr Jagielski" notifications@github.com wrote:

Ok, sounds good - I will have some time this week.

— Reply to this email directly or view it on GitHubhttps://github.com/reficio/soap-ws/issues/11#issuecomment-18845874 .