1 2 3 4 Previous Next 47 Replies Latest reply on Jan 8, 2008 10:04 AM by beve Go to original post
      • 15. Re: Webservice integration questions
        vikas_sm

         

        "tfennelly" wrote:


        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.



        Thanks tfennelly, yes i was bypassing the endpoints genereated by ESB.
        Now I am able to invoke the webservice as expected.
        However i am getting following errors:-

        1) There is no administratively defined queue with name:queue/GFITS_Request_esb_reply
        I have queue with name GFITS_Request_esb. Why is it searching for GFITS_Request_esb_reply?

        2) 14:06:36,735 ERROR [JBossRemotingGatewayListener] JBoss Remoting Gateway failed to synchronously deliver message to target service [GFITSServiceESB:GFITSSimpleListener].



          Note that the message(soap request) are put to configured Queue(EMS) using notifyqueues.
          Any idea what is going wrong here!

          Also can i just extract the message from soap request using smooks?

          Many Thanks for showing me the right direction.



          • 16. Re: Webservice integration questions
            burrsutter

            Tom will be able to give a better explanation that I can but he is hopefully getting ready for bed at this hour (or out drinking)! :-)

            A WS is typically synchronous - request/reply. And you can have synchronous services in the ESB. When this is the case you need to have a "reply" channel declared someplace. If you look at the jbpm-queue-service.xml files in several of the quickstarts you will see that they have the request queue declared and a reply queue as well. The reply queue follows the naming convention of "inbound_request_queue" + "_reply".

            Here is an example from quickstart webservice_producer:
            quickstart_webservice_producer_esb
            quickstart_webservice_producer_esb_reply

            You will also see this technique used in:
            -custom_action
            -exceptions_faults
            -groovy_gateway

            and others.

            Hopefully this helps somewhat.

            Burr

            • 17. Re: Webservice integration questions
              tfennelly

               

              "burrsutter" wrote:
              Tom will be able to give a better explanation that I can but he is hopefully getting ready for bed at this hour (or out drinking)! :-)


              lol... nah Burr, Christmas is over and it's back to normality... no drinking on school nights ;-)

              Your explanation was spot on!

              • 18. Re: Webservice integration questions
                vikas_sm

                Thanks Burr.
                I got it. I have rectified the same in my POC.

                I am still getting the second error with my poc. The same error is not shown in webservice_producer. It seems i have mess up with something:)

                I need to process the incoming request and forward it to EMS.
                When i tried to forward it to EMS, the message is delivered on EMS but its empty.

                I was trying to get the "message " from soap request and do some processing on it but Facing some issues with smooks and namespace. Is there any sample which demonstrates such kind of scenarios.


                Invoke Webservice and forward the message to any messaging service.

                I am sorry for frequent posts but we are evaluating the JBossESB and need to come up with POC to finalize the ESB provider and we have less time in hand.

                Are there any plans to supports Sun's JAXWS implementation for webservices?

                Thanks for quick responses.
                Regards/Vikas

                • 19. Re: Webservice integration questions
                  vikas_sm

                  I got the reason for empty message that was forwarded to EMS.
                  I was invoking method without response:)

                  So now when i invoke the method with response i get the entire soap xml.

                  Any thoughts or suggestion on how to parse this using smooks. I tried but i guess due to namespace its not getting the required xml node.

                  I am bit confused here. As i need the original soap request , i can return received message as response from webservice. But the same message will be put on reply queue( is this correct) which i don't want. AS my real reply (response)will be coming from EMS.

                  I hope i was able to put my concerns in right words.

                  any help will be appreciated.

                  • 20. Re: Webservice integration questions
                    tfennelly

                     

                    "vikas_sm" wrote:
                    on it but Facing some issues with smooks and namespace. Is there any sample which demonstrates such kind of scenarios.


                    "vikas_sm" wrote:
                    Any thoughts or suggestion on how to parse this using smooks. I tried but i guess due to namespace its not getting the required xml node.


                    I'm afraid you'll have to provide more info than that ;-)

                    • 21. Re: Webservice integration questions
                      vikas_sm

                      I am currently using the webservice_producer for web service related R&D work. I have modified the .esb to add smook transformer and Notifier.


                      <?xml version='1.0' encoding='UTF-8'?>
                      <smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.0.xsd">

                      <resource-config selector="env:Envelope" selector-namespace="http://schemas.xmlsoap.org/soap/envelope">

                      <resource>./try.xsl</resource>
                      <param name="is-xslt-templatelet">false</param>


                      </resource-config>

                      </smooks-resource-list>


                      My XSL is

                      <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
                      xmlns:ns2="http://webservice_producer/goodbyeworld"
                      >
                      <xsl:output method="xml" encoding="UTF-8"/>

                      <xsl:template match="env:Envelope">

                      <test><xsl:value-of select="/env:Envelope/env:Body/ns2:sayGoodbyeResponse/return"/></test>

                      </xsl:template>
                      </xsl:stylesheet>



                      The soap request coming is
                      [<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'><env:Header></env:Header><env:Body><ns2:sayGoodbyeRespon
                      se xmlns:ns2="http://webservice_producer/goodbyeworld">... Ah Goodbye then!!!! - dadasdasdasdasdas</ns2:sayGoodbyeResponse></env:Body></
                      env:Envelope>].


                      • 22. Re: Webservice integration questions
                        vikas_sm

                        kindly note that "return" tag is there but not shown in html .
                        use view source to see it:).

                        • 23. Re: Webservice integration questions
                          tfennelly

                           

                          <resource-config selector="env:Envelope" selector-namespace="http://schemas.xmlsoap.org/soap/envelope">


                          Try dropping the namespace prefix ("env:") from the selector. Smooks doesn't match against the prefix - only uses the element's localname and namespace url (where specified in the selector namespace).

                          Note that if it's the envelope you're applying the XSL to (i.e. the whole message/document), you can set the selector value to "$document".

                          • 24. Re: Webservice integration questions
                            vikas_sm

                             

                            "tfennelly" wrote:

                            Note that if it's the envelope you're applying the XSL to (i.e. the whole message/document), you can set the selector value to "$document".


                            Thanks Tom, I have tried this but it doesnt work too :(.

                            With the above change I even tried searching for '/' in XSL (<xsl:template match="/">) but it doesnt work. This was very simple scenario in xsl.

                            Plain xml transformation (without namespace) works fine for me.


                            Thanks/Vikas

                            • 25. Re: Webservice integration questions
                              tfennelly

                              Have you tried the following tutorial - http://milyn.codehaus.org/Smooks+Example+-+xslt-namespaces ??

                              If you can't get it to work from that, then you'll need to provide me with some specifics. Daniel Bevenius is actually better up on all that namesace cr*p re xslt.

                              • 26. Re: Webservice integration questions
                                vikas_sm

                                Yes, i did refer this tutorial. I started with simple transformation to replace the entire xml with just one node say test
                                here is my xsl

                                <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
                                xmlns:ns2="http://webservice_producer/goodbyeworld"
                                >
                                <xsl:output method="xml" encoding="UTF-8" omit-xml-declaration="yes" />

                                <xsl:template match="/">

                                <test>this is test message</test>

                                </xsl:template>
                                </xsl:stylesheet>


                                Once i get this working, i can apply my transformation.

                                Can Daniel help me on this. Really appreciate your help.

                                • 27. Re: Webservice integration questions
                                  tfennelly

                                  I'm sure he'll help if he sees this thread.

                                  If you turn on debug logging "org.milyn" you'll see whether or not the resource is getting applied to the appropriate fragment.

                                  This could be nothing, but I noticed above there that you specified the namespace without a trailing "/" character i.e. selector-namespace="http://schemas.xmlsoap.org/soap/envelope", whereas in the stylesheet you specify it as "http://schemas.xmlsoap.org/soap/envelope/"??

                                  • 28. Re: Webservice integration questions
                                    beve

                                    Hi Vikas,

                                    sorry, I just saw this thread...let me read through the thread and see if can set up a test locally.

                                    I'll post back as soon as I figure out what's going on.

                                    /Daniel

                                    • 29. Re: Webservice integration questions
                                      beve

                                      Ok, I've only tried modifying the xslt-namespaces tutorial and I get an error if I try to use something like this:

                                      <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
                                      xmlns:ns2="http://webservice_producer/goodbyeworld"
                                      >
                                      <xsl:output method="xml" encoding="UTF-8" omit-xml-declaration="yes" />
                                      
                                      <xsl:template match="/">
                                      
                                      this is test message
                                      
                                      </xsl:template>
                                      </xsl:stylesheet>
                                      

                                      The "this is test message" could be specified like
                                      <message>this is a test message</message>
                                      and that works for me.

                                      Note that I've not tried this with the example from webservice_producer. That is the example you are using right?
                                      But I'll try that next...

                                      /Daniel