11 Replies Latest reply on Jun 25, 2008 9:08 AM by mvecera

    Regarding JBoss ESB

    ambicasona

      Hi, I am very new to JBoss. I want to implement JBoss ESB in my project.
      My requirement is i will get an XML file with soap conents and comes through ESB. First it has to remove that soap contentens and follow the other steps with out soap data. i wrote one smooks-res.xml but it is not giving output as i expected. There are no errors but no out put with out soap. I am sending my smooks-res.xml file.

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

      <resource-config selector="$document">

      <![CDATA[ <xsl:stylesheet version="1.0"

      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"

      xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">

      <xsl:output method="xml"/>

      <xsl:template match="/">
      <xsl:apply-templates select="soapenv:Envelope/soapenv:Body/node()"/>
      </xsl:template>

      <xsl:template match="*"> <!--synthesize element with the input name-->

      <xsl:element name="{name(.)}" namespace="{namespace-uri(.)}">

      <xsl:copy-of select="@*"/>

      <xsl:apply-templates/>

      </xsl:element>

      </xsl:template>

      </xsl:stylesheet>]]>

      </resource-config>

      </smooks-resource-list>

      The same XSLT file is working fine with other ESBs. Can u help me in solving the issue. Thank you in advance and waiting for the reply..

      AmbicaSona.D

        • 1. Re: Regarding JBoss ESB
          tfennelly

          Sorry for missing this earlier!! Which version of the ESB are you using?

          • 2. Re: Regarding JBoss ESB
            tfennelly

            Also... can you show us you're ESB config please?

            • 3. Re: Regarding JBoss ESB
              ambicasona

              I got the solution for this. I was using AppServer(4.2) and ESB combination(4.3) and now i am using ESB server 4.3 and its working fine. Now i have an other issue. After all the transformations i need to send the req to a server and i need to get the res back. I am using org.jboss.soa.esb.actions.routing.http.HttpRouter class and code in my config file





              with this it is touching app server but its not taking that req. For this do we need to write any properties file and use like

              <http-client-property name="file" value="/localhost-https-18443.properties" />

              and what this properties file should contain? or do we need to write any class? and one more thing based on one field in the request the url to send will change. How do we write for this requirement?
              Please send the reply ASAP. Thank You..........

              • 4. Re: Regarding JBoss ESB
                ambicasona

                Can anybody help me in sloving the problem ASAP. If i dont mention properties file in my config file i am getting the app servers index page code as Response. And if i use that property file inside my config i am getting error by saying
                ERROR [STDERR] javax.net.ssl.SSLHandshakeException: Remote host clo
                sed connection during handshake
                [STDERR] at com.sun.net.ssl.internal.ssl.SSLSocketImpl.re
                adRecord(SSLSocketImpl.java:801)
                .................................
                I strucked there and not finding any solution. Trying to run the sample https_2way_ssl, which came with download is also not working.
                Highly thankful work quick responses.

                • 5. Re: Regarding JBoss ESB
                  ambicasona

                  I got the solution for this too.... :)

                  • 6. Re: Regarding JBoss ESB
                    kconner

                    So what was the problem?

                    • 7. Re: Regarding JBoss ESB
                      ambicasona

                      That was a small mistake.
                      i did not write any property file and i just used POST method and its working. I successfully finished applying ESB to my project. But still that https_2way_ssl sample is not working. Is the problem from my side or its thr every where? and my doubt is how can we mention the URL for this .esb files? Like if somebody wants to post data to my esb thn what could be the URL. I just tried running the esb from command prompt as i got the flow from guides. and for getting quick responses is thr any other forum?????

                      • 8. Re: Regarding JBoss ESB
                        ambicasona

                        Plz i need urgent help regarding this.
                        I have successfully finished creating ESB. But i am not understanding how we can integrate ESB from a JSP or HTML? How can we invoke an ESB from JSP?????????
                        As we have predefined method for HTTP Tranformmer in Mule dont we have such methods in JBoss ESB? I dont want to expose it as a web service. That is not my requirement. I just need a URL so that my clients can post data to my ESB and get the response back....
                        Thanks in advance for ur responses.

                        • 9. Re: Regarding JBoss ESB
                          kconner

                          Sorry, but I don't know where we are with this at the moment :)

                          Could you send me a log file showing the error you are currently getting?

                          • 10. Re: Regarding JBoss ESB
                            ambicasona

                            oh....may b my explanation was poor...:)
                            I have not started integrating the ESB with the JSP. actually mine is a web application and accepts only one type of request format. But i have 4 clients and the formats of their request is diifrent from mine. So i am using ESB and changing their format to my application understandable format and sending the response back after receiving the response from my application server by changing in to their specific format.
                            This i have successfully finished with out any errors and my response is also exactly same as what i wanted. But for this i have followed the guide of JBOSS ESB and i created in a way which will run through command prompt.
                            Is there any direct class (like in Mule, "org.mule.components.simple.BridgeComponent") through which we can assign a url for this ESB or we have to write a JSP class compulsory? and how i can call ESB from my doPost()/doGet() method of my JSP/Servlet...??????????
                            i have gone through native_client sample which is exposed as a web service.. i dont want to expose my ESB as a web service.. I just want to make my ESB as a web so that i can call that through a URL...
                            Any help is highly appreciable..

                            • 11. Re: Regarding JBoss ESB
                              mvecera

                              Regarding calling ESB services, there is class ServiceInvoker which does that. Try to find it in source code or documentation to see how it is used, but in general it is as follows:

                              Message esbMessage = MessageFactory.getInstance().getMessage();
                              Call call = new Call();
                              call.setMessageID(new URI(UUID.randomUUID().toString()));
                              esbMessage.getHeader().setCall(call);
                              esbMessage.getBody().add(text);
                              new ServiceInvoker(category, name).deliverAsync(esbMessage);