1 2 Previous Next 28 Replies Latest reply on Aug 26, 2010 1:59 AM by sukhdesi Go to original post
      • 15. Re: Wise based soap client for esb
        jeffdelong

        In the case of web services transactions, the JBoss Transaction XTS component has a context handler, com.arjuna.mw.wst.client.JaxWSHeaderContextProcessor, so there is nothing for me to write. On the other hand, if I use Smooks, it is not so obvious how to define the smooks-handler. I want to add something like the following:

        <wscoor:CoordinationContextType xmlns:wscoor="http://schemas.xmlsoap.org/ws/2004/10/wscoor">
        <wscoor:Identifier>urn:7f000001:cfcd:483f0ffb:2e20</wscoor:Identifier>
        <wscoor:CoordinationType>http://schemas.xmlsoap.org/ws/2004/10/wsba/AtomicOutcome</wscoor:CoordinationType>
        <wscoor:RegistrationService>
        <wsa:Address xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://localhost:8080/xts/soap/RegistrationCoordinator</wsa:Address>
        <wsa:ReferenceParameters xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">
        <wsarj:InstanceIdentifier xmlns:wsarj="http://schemas.arjuna.com/ws/2005/10/wsarj">7f000001:cfcd:483f0ffb:2e20</wsarj:InstanceIdentifier>
        </wsa:ReferenceParameters>
        </wscoor:RegistrationService>
        </wscoor:CoordinationContextType>

        where the content is dynamic (and can be found in the ESB Message).

        • 16. Re: Wise based soap client for esb
          maeste

           

          "jeffdelong" wrote:
          In the case of web services transactions, the JBoss Transaction XTS component has a context handler, com.arjuna.mw.wst.client.JaxWSHeaderContextProcessor, so there is nothing for me to write.

          Ok, "nothing to write" perfectly fit in wise philosophy :)
          I'll add support for this (and for chain of handler) asap....as said don't expect nothing by me before 10 days or so, too busy at the moment, sorry.

          • 17. Re: Wise based soap client for esb
            maeste

             

            "jeffdelong" wrote:
            As for the problems with the wise.properties, the issues seems to be with re-deployment. If I change wise.properties, or in another case, I changed smooks-handler.xml, ant then do ant undeploy, ant deploy, ant runtest, I still see the same results,


            Just take a quick look...it seems to me a problem with quickstart build...if you just change wise-core.properties without clean it doesn't rebuild the esb file. Target undeploy just remove it from server directory, and if nothing is changed in code "deploy" doesn't rebuild the package and so leave unchanged wise-code.properties.
            Maybe it's an error in how I include the properties in esb package using generic quickstart build...anyway, it doesn't seems an integration problem between wise and esb, but of course I look deeper to make quickstart samples more solid.
            Thanks for the feedbacks and interests.


            • 18. Re: Wise based soap client for esb
              jeffdelong

              Thanks, I will look for your updates in a couple weeks.

              • 19. Re: Wise based soap client for esb
                maeste

                 

                "jeffdelong" wrote:
                Thanks, I will look for your updates in a couple weeks.

                Hi Jeff,
                finally I fond an hour to put my hand on my workspace code to add support fot custom JAXWS handlers.
                I just committed changes and a new quickstart sample demonstrating ho to use it (webservice_consumer_wise4).
                In a nutshell you can add your own JAXWS handler adding (more than one) this property to org.jboss.soa.esb.actions.soap.wise.SOAPClient action in jboss-esb.xml
                <property name="custom-handlers" value="cutomClass1;CusomClass2" />
                
                


                At the moment custom handlers are supposed to have default constructor and WISE Action instantiate them using reflection. Other solutions cold be evaluated in future (like have an handler object somewhere in the message for example).

                If you have chance, give it a run and let me know what do you think about.

                Thanks

                • 20. Re: Wise based soap client for esb
                  jeffdelong

                  I am having a bit of a problem getting my quickstart to run. My problem is in the parameter mapping. It is not clear to me what the WISE SOAP Client expects. There appears to be an expectation that there will be a params map (as with the standard version of SOAPClient action). When is a SmooksRequestMapper required? Looking at the code it appears it defaults to null if you don't have one, But when I don't configure one I get IllegalArgumentExceptions wrong number of parameters.

                  Thanks,

                  Jeff

                  • 21. Re: Wise based soap client for esb
                    maeste

                    Hi jeff,

                    In a nutshell a smooks mapper is required when your input objects is different from JAX-WS expected one. I know there is a lack in development cycle, wise action would need a configurations generator utility. I hope I could work on it soon.
                    Waiting for that, would you mind to commit your quickstart on my workspace? I could take a look and give you a better explanation of the error and what wise expect in this case.

                    Thanks

                    • 22. Re: Wise based soap client for esb
                      tfennelly

                       

                      "maeste" wrote:
                      I know there is a lack in development cycle, wise action would need a configurations generator utility. I hope I could work on it soon.


                      A config generator already exists. If there's an issue with this, please provide feedback and we'll get it sorted (Vs creating a new one).

                      • 23. Re: Wise based soap client for esb
                        maeste

                        I know there is a config generator for smooks. Probably wise need just to use it passing runtime generated classes. I haven't yet found time to put my mind on this, but as soon as I can I'll provide feedback on it.
                        For sure I will avoid to create a new one.

                        • 24. Re: Wise based soap client for esb
                          kconner

                          Can we look at integrating your current code into the trunk for the upcoming release? Is there anything that you need to tidy up as it currently stands?

                          • 25. Re: Wise based soap client for esb
                            jeffdelong

                            I have committed my quickstart webservice_wstransaction_ba to your workspace. It has a custom action "RequestMapper", that puts the parameters for the ws invocation into a map. After I committed it I realized my error. With the original soapclient, it used OGNL, and my mapper specified:

                             requestMap.put("bookSeats.how_many", reservation.getRestaurantSeats());
                            


                            Using wise soapclient, the following worked:

                             requestMap.put("how_many", reservation.getRestaurantSeats());
                            


                            The WISE soapclient is very nice. I was able to add transaction context to the web service invocation with a single line in the jbossesb.xml:

                            <property name="custom-handlers" value="com.arjuna.mw.wst.client.JaxWSHeaderContextProcessor" />
                            


                            • 26. Re: Wise based soap client for esb
                              maeste

                               

                              "jeffdelong" wrote:

                              Using wise soapclient, the following worked:

                               requestMap.put("how_many", reservation.getRestaurantSeats());
                              



                              Yep, it's the easiest way having just one parameter. With more complex objects you could use smooks, which is usable also for this simple case, but it would like kill a mosquito with a cruise missile :)
                              "jeffdelong" wrote:

                              The WISE soapclient is very nice.

                              Nice to read :) Thank you.

                              • 27. Re: Wise based soap client for esb

                                I have a requirement to add SOAP header as shown below, while making a SOAP call using SOAPClient action. My problem is all the information I need to build the header is located in the jboss-esb.properties file and in the parameter map. Parameter map object for building the SOAP Body doesn't contain this information. My question is how I should make this happen using SOAPClient action. I looked at the given examples and it looks like there is a provision for smooksHandler config to create SOAP Headers but not getting any clue.

                                 

                                <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
                                  <soap:Header>
                                    <UserAuthInfo xmlns="http://realpage.com/webservices">
                                      <UserName>string</UserName>
                                      <Password>string</Password>
                                      <SiteID>xxxxx</SiteID>
                                      <PmcID>xxxxx</PmcID>
                                    </UserAuthInfo>
                                  </soap:Header>

                                • 28. Re: Wise based soap client for esb
                                  sukhdesi

                                  I am also using SOAPClient. I dont want hardcoded parameters in jboss-esb.xml. I need to update header (like SOAPAction) programatically.

                                   

                                  Did you solve this problem?

                                   

                                  Regards

                                  Sukhdev

                                  1 2 Previous Next