2 Replies Latest reply on Jun 24, 2011 3:44 AM by wueth_ ria

    How to transform am SOAP proxy

    wueth_ ria Newbie

      We have a soap proxy action which routes an external Webservice trough the ESB.  A smooks action transforms the soap response to a string.  Now we would like to add the string from smooks transformation to our soap proxy service so that the string is returned inside the soap response.


      We tried to add the string as additional element via the "wsdlTransform" property inside the soap proxy which does not really function so far.


      The first problem we have is to just add the additional field to the wsd with the following smooks-file as wsdlTransform property:


      <?xml version="1.0"?>





          <g:groovy executeOnElement="element">



                  use(DOMCategory) {

                  if (element.'@name' == 'username') {

                          DomUtils.insertBefore("testelement", "username");









      The wsdl can't be loeaded inside the browser anymore:


      Failed to load WSDL contract information from address 'http://localhost:8080/testwebservice?wsdl': Unable to filter InputStream for target profile [org.milyn.profile.Profile#default_profile].


      We don't really see, where the problem is.. do we have to transform the soap request?

        • 1. Re: How to transform am SOAP proxy
          Tom Cunningham Master

          Can you post your jboss-esb.xml?

          • 2. Re: How to transform am SOAP proxy
            wueth_ ria Newbie

            We managed now to simply add a additional tag to the soap message (request an answer). We also were able to remove an xml-element from the wsdl: when we call the endpoint url (http://......./testwebservice?wsdl), the tag is not visible anymore. What we still aren't able to do ist to ADD an xml-element to the transformed wsdl. To which we would like to write the string from the smooks transformation to the added element (this smooks transformation ist not included in the jboss-esb.xml yet).


            Here the jboss-esb.xml:


            <?xml version="1.0"?>

            <jbossesb parameterReloadSecs="5"






                    <http-provider name="HTTP-PROVIDER">

                        <http-bus busid="HTTP-BUS" />




                    <service category="pariswebservice" description="ZupazuCSV" invmScope="GLOBAL"



                            <http-gateway busidref="HTTP-BUS" name="MySoapProxyServiceGwListener2"

                              urlPattern="/testwebservice" />


                        <actions mep="RequestResponse">

                            <action class="org.jboss.soa.esb.actions.SystemPrintln" name="println: Incoming Request">

                                <property name="message" value="Incoming Request" />


                            <action class="org.jboss.soa.esb.smooks.SmooksAction" name="testTransformation">

                                <!-- Add an xml element to the soap request -->

                                <property name="smooksConfig" value="/SoapRequestTransform.xml" />


                            <action class="org.jboss.soa.esb.actions.SystemPrintln" name="println: Outgoing Request">

                                <property name="message" value="Outgoing Reques" />


                            <action class="org.jboss.soa.esb.actions.soap.proxy.SOAPProxy" name="proxy">

                                <property name="wsdl" value="http://externalWebservice?wsdl" />

                                <property name="wsdlTransform" value="/WsdlTransform.xml" />


                            <action class="org.jboss.soa.esb.actions.SystemPrintln" name="println: Incoming Response">

                                <property name="message" value="Incoming Response" />


                            <action class="org.jboss.soa.esb.smooks.SmooksAction" name="transform">

                                <!-- Add an xml element to the soap response -->

                                <property name="smooksConfig" value="/SoapResponseTransform.xml" />

                                <property name="resultType" value="STRING" />


                            <action class="org.jboss.soa.esb.actions.SystemPrintln" name="println: Outgoing Response">

                                <property name="message" value="Outgoing Response" />