Announcement Announcement Module
No announcement yet.
Need to create a SOAP WS based on CXF. Please suggest. Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Need to create a SOAP WS based on CXF. Please suggest.

    We have a roo application up & running. We need to create a SOAP WS using CXF stack. We plan to do the following:

    1. Create a service layer injected with Persistence entity manager.
    2. Create & implement the methods that need to be exposed as WS.
    3. Use cxf annotations and do the rest.

    Is this approach ok? We wish there was a services layer in roo like Appfuse that would make life easier in such a situation.


  • #2
    Yes your approach seems quite reasonable. The reason why Roo does not generate a service layer is that it would not know which exact functionalities you actually want to expose as WS. For example you may want to expose some of your finders, a create and a update method but not delete. Sometimes you may also want to aggregate requests across several entities, etc.

    So the purpose of a services layer is typically highly customized to your business requirements. All Roo could do is create a default scaffolded layer which would be nothing more than a dummy pass-through layer in fron to your entities and you would need to rewrite it mostly anyway. I think it is much cleaner if you write your own interface which defines the service contract as you envision it. Again, it is dead simple to do this in Spring and you have the @Service annotation to register it as a component and allow bean wiring.



    • #3
      Thanks for the reply. We are following the approach. We would like to create a roo addon for cxf. Can you point us to some demo/tut about roo addon generation.


      • #4
        Hi Irshad:

        We are interested about using CXF in Roo too. Do you decided what kind of orientation to use for it? I talk about contract first, contract last or contract in the middle.

        And another question. would you like a collaboration to develop this add-on together?



        • #5
          That seems a good idea, do you have any pointers to creating roo addons, as we have not done that stuff before. We prefer to do contract last approach.



          • #6
            Hi Irshad.

            Well, we've created a proof of concept. By now, it can add CXF dependency to the Roo project and generates config files. It is available by a shell command "cxf setup".

            If you agree, the first step would be to talk about the license. And the second one would be to create a project in a web site of open source forge.

            What do you think?



            • #7
              Ok, that sounds great. You mean you created an addon, can you share the script that is an addon to roo as I have no clue of creating an addon to roo.



              • #8
                First of all you can take a look to this links: