4 Replies Latest reply on Aug 24, 2010 9:58 PM by Freeman(Yue) Fang

    Utilizing an existing WebService

    aarong Newbie

      Maybe I am missing something (or I know I am)...when using 3.4, we simply had to create a cxfbc:provider bean, with the IP, WSDL location, etc. to allow a message to come from the bus to that particular Web Services.


             <cxfbc:provider wsdl="classpath:IngestService.wsdl"                  locationURI=""                  service="test:IngestService" endpoint="test:IngestServicePort"                 useJBIWrapper="false"/>


      In essence the cxfbc:provider was the proxy to that Web Service.


      How do I do the same thing in FUSE 4.2/4.3?  I don't own the Web Service, all I have is the IP of the machine & WSDL file. 


      Still trying to learn how to "migrate" to 4.x series.  Is it now just simply a camel component? Is it now a jaxws:client and I have to wsdl2java generate impl classes?

        • 1. Re: Utilizing an existing WebService
          Freeman(Yue) Fang Master



          For the cxf bc provider, it's should be same as you do in smx3.

          You can take a look at cxf-wsdl-first example shipped with smx4 kit, although it's cxf bc consumer--->cxf se endpoint, you still can get some idea how jbi packaged SA works with smx4.



          • 2. Re: Utilizing an existing WebService
            aarong Newbie

            I guess the better question would be...if I don't want to use JBI, how'd would I deploy in 4.x an equivalent cxfbc:provider, how is that done in 4.x?


            Say, I didn't have any SMX3 stuff written, and I only know about SMX4, how would I create a web service proxy that can take messages off the bus, and "forward" them to the Web Service?

            • 3. Re: Utilizing an existing WebService
              aarong Newbie

              I think I may have figured it out..however not 100% sure my thought process is correct.


              In SMX4 there are 2 ways to communicate between bundles:  normal OSGi "sync msgs" & NMR.


              If we use OSGi msgs, we do the normal OSGi way, and implement an interface, create events, etc...so, that is why, to deploy a code-1st or wsdl-1st bundle; and both require generating code. 


              There is another way which I have read about, which has do to with @Resource injection, and that allows at Runtime..but, still looking into that.


              Lastly, I see why "use the old" Service Unit route..where you in essence create a JBI cxf-bc and that talks to the NMR, which allows other OSGi bundles to talk via the NMR, to this cxf-bc.  Now, the question is how to get those OSGi bundles talking to the NMR "directly"?

              • 4. Re: Utilizing an existing WebService
                Freeman(Yue) Fang Master



                You may need take a look at nmr/client example shipped with kit, where you can find how to use client api to talk with NMR directly.