1 2 3 4 Previous Next 47 Replies Latest reply on Jan 8, 2008 10:04 AM by beve

    Webservice integration questions

    vikas_sm

      Hi All,
      Happy New Year !

      I am working to integrate web service with ESB.

      Currently, the client sends request by putting message on JBossMessaging Queue . This message is tranformed into required format using smooks and is further sent to Tibco EMS.

      I want similar functionality with web service. In other words i mean
      Application invokes Web Service (WSDL/SOAP), on receiving the request, ESB transforms to JMS message(JBoss messaging) and routes to JMS recipient(EMS).


      Also I would like to know efforts to configure the ESB to work with Metro stack (Sun?s RI implementation of JAX-WS).



      Thanks/Vikas

        • 1. Re: Webservice integration questions
          vikas_sm

          I can provide the implementation to put the message on JbossQueue inside my webservice and which will be further processed by jms listeners.

          But I am wondering if there is any outofobox support for this?
          Example by using NotifyQueues on receiving any web service request.

          We are evaluating servicemix and jbossesb. The servicemix does provide support to consume soap request, which can be forwarded to any service.

          I am not finding similar thing in JBossESB or might be i am not getting it.

          Has anyone achieved this earlier?

          • 2. Re: Webservice integration questions
            tfennelly

            Have you read the Wiki page on the SOAPProcessor action (I just added a "WSDLs" section)? Have you tried the related quickstarts?

            • 3. Re: Webservice integration questions
              haagenhasle

              Can I use the SoapProcessor to expose a method that has two parameters? If so, where do the parameters end up, how do I get them? (They can't both end up in the default_location...)

              I have code that looks like this:

              @WebService(serviceName = "FooServiceV2")
              @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)
              public class FooServiceImpl implements FooService {
              
               @WebMethod
               public FooBar doThis(Foo foo, Bar bar) {
               //....
               }


              (I don't mean to hijack someone elses thread, so if this message feels out of place, I apologize. I thought it seemed fairly related.)

              Regards, Haagen

              • 4. Re: Webservice integration questions
                tfennelly

                 

                "haagenhasle" wrote:
                Can I use the SoapProcessor to expose a method that has two parameters? If so, where do the parameters end up, how do I get them? (They can't both end up in the default_location...)

                I have code that looks like this:
                @WebService(serviceName = "FooServiceV2")
                @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)
                public class FooServiceImpl implements FooService {
                
                 @WebMethod
                 public FooBar doThis(Foo foo, Bar bar) {
                 //....
                 }


                (I don't mean to hijack someone elses thread, so if this message feels out of place, I apologize. I thought it seemed fairly related.)

                Regards, Haagen


                You could create a composite of some sort, and store that in the message in one location (e.g. the default). This could be a Map, List or some specialised type.

                • 5. Re: Webservice integration questions
                  haagenhasle

                  Yes, I understand that creating some kind of FooAndBarWrapper-class, that holds the Foo and the Bar parameters, would solve the problem. But I don't really want to do that, I was hoping it was some other way? (Without having to recode my service-interfaces..)

                  Is it impossible to configure the SoapProcessor to handle two parameters?

                  Regards, Haagen

                  • 6. Re: Webservice integration questions
                    tfennelly

                     

                    "haagenhasle" wrote:
                    Yes, I understand that creating some kind of FooAndBarWrapper-class, that holds the Foo and the Bar parameters, would solve the problem. But I don't really want to do that, I was hoping it was some other way? (Without having to recode my service-interfaces..)

                    Is it impossible to configure the SoapProcessor to handle two parameters?


                    It's not possible at present.

                    So what exactly do you mean by "configure the SoapProcessor to handle two parameters" and why would that be a good idea?

                    • 7. Re: Webservice integration questions
                      tfennelly

                      I guess I shouldn't have said it's not possible before hearing your answer to that question. Sorry :-)

                      • 8. Re: Webservice integration questions
                        haagenhasle

                        I just want to be able to configure the Soap Processor to create a webservice out of my "public FooBar doThis(Foo foo, Bar bar)" in a way that makes the WSDL contain two input-types.

                        A map or list won't do it, and I would like to avoid having to create a FooAndBarWrapper, because that would make me have to re-code all my service-interfaces just to make JBossWS happy.. (I have a set of interfaces that are meant to be WS-unaware, and put all the annotations in the implementation-classes.)

                        I hope I make myself understood? I can try to explain more if necessary.

                        I was hoping there was some way I could use the "set-payload-location" configuration properties to achieve this...


                        Regards, Haagen

                        • 9. Re: Webservice integration questions
                          tfennelly

                          Sorry, I thought you were talking about using a WS impl to capture the unmarshalled SOAP request parameters and put those parameters onto the message for processing on a downstream action.

                          So are you telling me that if you create a Webservice Impl that contains an operation with multiple parameters, you can't invoke that operation by putting an appropriate SOAP message onto the bus and processing it via the SOAPProcessor? If this is what you're saying, this this is a bug (a major one :-( ).

                          • 10. Re: Webservice integration questions
                            haagenhasle

                            I'm sorry if what I write is confusing, but I find it kind of hard to understand all of this.. :)

                            In my understanding, I can use the SoapProcessor to automagically have JBossESB create and expose a webservice for me, without me having to create a war with the webservice or do anything else that annotate the class I want to expose and configure jboss-esb.xml. If this is wrong, please correct me.

                            I have a class FooServiceImpl with a method public FooBar doThis(Foo foo, Bar bar) that I want to expose as a webservice. I'm not sure if I understand you correctly, but I don't think i want to invoke this webservice by putting a SOAP message onto the bus, it's my clients (someone else) that's supposed to invoke this webservice, and they are ignorant of the fact that I'm using JBoss ESB. They just want to see my WSDL.

                            I guess what I want to do is the first thing you say - capture the SOAP request and put the parameters into the message. The problem is that because there are two parameters I can't use the default_location. (I think..)

                            Was this clearer?

                            Regards, Haagen

                            • 11. Re: Webservice integration questions
                              vikas_sm

                              Thanks, Yes, I have gone thru the wiki and tried the samples.

                              When i execute the web service externally (using soap ui), only the web service is executed. I want to call execute some of the action on receiving web request something similar to jms listeners.

                              any thoughts or suggestions.

                              • 12. Re: Webservice integration questions
                                haagenhasle

                                tfennely - I have created a new thread:
                                http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4116751#4116751

                                Vikas_sm - I'm sorry for hijacking your thread, good luck with your questions.

                                Regards, Haagen

                                • 13. Re: Webservice integration questions
                                  tfennelly

                                   

                                  "vikas_sm" wrote:
                                  Thanks, Yes, I have gone thru the wiki and tried the samples.

                                  When i execute the web service externally (using soap ui), only the web service is executed. I want to call execute some of the action on receiving web request something similar to jms listeners.

                                  any thoughts or suggestions.


                                  OK... sounds like you've completely bypassed the endpoints exposed by the ESB and gone directly to the WS via the JBossWS container. After deploying the WS, use your browser and go to http://<host:port>/contract. The contract/wsdl URLs listed on this page are the wsdl endpoints you should be using to invoke the WS endpoint via the ESB.

                                  • 14. Re: Webservice integration questions
                                    tfennelly

                                     

                                    "haagenhasle" wrote:
                                    In my understanding, I can use the SoapProcessor to automagically have JBossESB create and expose a webservice for me, without me having to create a war with the webservice or do anything else that annotate the class I want to expose and configure jboss-esb.xml. If this is wrong, please correct me.


                                    This is not the case as of v4.2.x of the ESB (we do plan on automating much of this at some point). You need to define a all the normal WS artifacts manually at present (not many for a jsr181). Check out the wsproducer quickstarts.

                                    1 2 3 4 Previous Next