4 Replies Latest reply on Mar 29, 2011 9:03 AM by Ben Clark

    Exposing a web service

    Ben Clark Newbie

      Hello,

       

      I know this is a common problem but i didn't find the solution on this problem..

       

      I have create a web service with axis2/tomcat on this address: http://localhost:8080/axis2/services/HelloService2?wsdl

       

      And I would like to expose it through my ESB (for a centralized exposition of all my services).

      So I have create a SA project, and a servicemix-cxf-bc. Into the BC directory I have put my WSDL and I configured my xbean like that :

       

      <beans xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0"

             xmlns:HelloService2="http://hello.registry.test">

       

            <cxfbc:consumer wsdl="classpath:HelloService2.wsdl"

                            targetService="HelloService2:HelloService2"

                            targetInterface="HelloService2:HelloService2PortType"/>

       

      </beans>

       

      I thought it was the good solution but when I'm trying to reach my tomcat address (http://localhost:8080), it's replaced by Apache CFX that list my "known services" which contains my HelloService2. Also when I'm trying to make a soap request on this service, it necessarily don't works.

       

      So ok, it's not the good solution, but do I have to write a cxfbc:provider tag on my xbean also ? I don't think so cause I just want to expose an external service, external in the sense of providing by an another system (Axis 2) but on the same machine.

       

      Need help !