[jboss-svn-commits] JBL Code SVN: r25358 - in labs/jbossesb/branches/JBESB_4_4_GA_FP/product: services/soap/src/main/java/org/jboss/soa/esb/actions/soap and 4 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Fri Feb 20 00:50:35 EST 2009


Author: beve
Date: 2009-02-20 00:50:35 -0500 (Fri, 20 Feb 2009)
New Revision: 25358

Added:
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/samples/quickstarts/webservice_consumer1/consumer1-wsdl-transform.xml
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/DenormalizedAttributeValueSerializer.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/AbstractWsdlContractPublisherUnitTest.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/wsdl-transform.expected-01.xml
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/wsdl-transform.expected-02.xml
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/wsdl-transform.expected-04.xml
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/wsdl-transform.xml
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/services/soap/src/test/resources/test-in.wsdl
Removed:
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/test-in.wsdl
Modified:
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/samples/quickstarts/webservice_consumer1/build.xml
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/samples/quickstarts/webservice_consumer1/jboss-esb.xml
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/AbstractWsdlContractPublisher.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/WsdlContractPublisher.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/WsdlEndpointTransformer.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/wise/WiseWsdlContractPublisher.java
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/services/soap/src/main/resources/org/jboss/soa/esb/actions/soap/wsdltrans.xml
   labs/jbossesb/branches/JBESB_4_4_GA_FP/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/JBossWSAdapterContractPublisherUnitTest.java
Log:
Work for https://jira.jboss.org/jira/browse/JBESB-2420 "Allow WSDL publisher to transform WSDL for proxied service"


Modified: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/samples/quickstarts/webservice_consumer1/build.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/samples/quickstarts/webservice_consumer1/build.xml	2009-02-20 03:26:16 UTC (rev 25357)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/samples/quickstarts/webservice_consumer1/build.xml	2009-02-20 05:50:35 UTC (rev 25358)
@@ -4,14 +4,16 @@
 		${ant.project.name}
 		${line.separator}
 	</description>
-			
-	<!-- Import the base Ant build script... -->
-		<import file="../conf/base-build.xml"/>
 
+    <property name="additional.deploys" value="consumer1-wsdl-transform.xml" />
+
+	<!-- Import the base Ant build script... -->
+    <import file="../conf/base-build.xml"/>
+
     <property name="war.build.dir" location="${build.dir}/war/classes"/>
 
     <target name="quickstart-specific-checks" depends="assert-ws-available"/>
-
+
     <target name="quickstart-specific-assemblies" depends="makewar"/>
 
     <target name="makewar" description="make war">
@@ -48,23 +50,23 @@
     <target name="undeploy-war" depends="dependencies">
         <delete verbose="true" quiet="true"
           file="${org.jboss.esb.server.deploy.dir}/${ant.project.name}.war"/>
-    </target>
-
-	<target name="sendjms" depends="compile">
-		<echo>Send ESB message that triggers webservice call</echo>
-                <java fork="yes" classname="org.jboss.soa.esb.samples.quickstart.webservice_consumer1.test.SendJMSMessage" failonerror="true">
-                        <arg value="Jimbo"/>
-                        <classpath refid="exec-classpath"/>
-                </java>
-
-	</target>
-	
-	 <target name="runtest" depends="compile">
-	     <echo>Send ESB message that triggers webservice call</echo>
-	     <java fork="yes" classname="org.jboss.soa.esb.samples.quickstart.webservice_consumer1.test.SendEsbMessage" failonerror="true">
-	     	<arg value="Jimbo"/>
-			<classpath refid="exec-classpath"/>
-	     </java>
-	  </target>  
+    </target>
+
+	<target name="sendjms" depends="compile">
+		<echo>Send ESB message that triggers webservice call</echo>
+                <java fork="yes" classname="org.jboss.soa.esb.samples.quickstart.webservice_consumer1.test.SendJMSMessage" failonerror="true">
+                        <arg value="Jimbo"/>
+                        <classpath refid="exec-classpath"/>
+                </java>
+
+	</target>
 	
+	 <target name="runtest" depends="compile">
+	     <echo>Send ESB message that triggers webservice call</echo>
+	     <java fork="yes" classname="org.jboss.soa.esb.samples.quickstart.webservice_consumer1.test.SendEsbMessage" failonerror="true">
+	     	<arg value="Jimbo"/>
+			<classpath refid="exec-classpath"/>
+	     </java>
+	  </target>  
+	
 </project>

Copied: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/samples/quickstarts/webservice_consumer1/consumer1-wsdl-transform.xml (from rev 25139, labs/jbossesb/trunk/product/samples/quickstarts/webservice_consumer1/consumer1-wsdl-transform.xml)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/samples/quickstarts/webservice_consumer1/consumer1-wsdl-transform.xml	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/samples/quickstarts/webservice_consumer1/consumer1-wsdl-transform.xml	2009-02-20 05:50:35 UTC (rev 25358)
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd"
+                      xmlns:g="http://www.milyn.org/xsd/smooks/groovy-1.1.xsd">
+
+    <g:groovy executeOnElement="message,portType">
+        <g:script>
+            DomUtils.removeElement(element, false);
+        </g:script>
+    </g:groovy>
+
+</smooks-resource-list>
\ No newline at end of file

Modified: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/samples/quickstarts/webservice_consumer1/jboss-esb.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/samples/quickstarts/webservice_consumer1/jboss-esb.xml	2009-02-20 03:26:16 UTC (rev 25357)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/samples/quickstarts/webservice_consumer1/jboss-esb.xml	2009-02-20 05:50:35 UTC (rev 25358)
@@ -39,9 +39,9 @@
 				</action>
 				<action name="soapui-client-action"
 					class="org.jboss.soa.esb.actions.soap.SOAPClient">
-					<property name="wsdl"
-						value="http://127.0.0.1:8080/Quickstart_webservice_consumer1/HelloWorldWS?wsdl" />
-					<property name="responseAsOgnlMap" value="true" />	
+					<property name="wsdl" value="http://127.0.0.1:8080/Quickstart_webservice_consumer1/HelloWorldWS?wsdl" />
+                    <!--property name="wsdlTransform" value="/consumer1-wsdl-transform.xml" / -->
+                    <property name="responseAsOgnlMap" value="true" />
 					<property name="SOAPAction" value="sayHello"/>				
 				</action>
 				<action name="response-mapper"

Modified: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/AbstractWsdlContractPublisher.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/AbstractWsdlContractPublisher.java	2009-02-20 03:26:16 UTC (rev 25357)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/AbstractWsdlContractPublisher.java	2009-02-20 05:50:35 UTC (rev 25358)
@@ -27,7 +27,6 @@
 import org.jboss.soa.esb.ConfigurationException;
 import org.jboss.soa.esb.http.HttpClientFactory;
 import org.jboss.soa.esb.addressing.EPR;
-import org.jboss.wsf.spi.deployment.Endpoint;
 import org.xml.sax.SAXException;
 import org.milyn.container.ExecutionContext;
 import org.milyn.Smooks;
@@ -41,7 +40,6 @@
 import java.io.StringReader;
 import java.io.InputStream;
 import java.net.URI;
-import java.net.URL;
 import java.util.Properties;
 import java.lang.reflect.Proxy;
 import java.lang.reflect.InvocationHandler;
@@ -53,11 +51,12 @@
  * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
  */
 public abstract class AbstractWsdlContractPublisher implements ActionContractPublisher, ServletContractPublisher {
-
+   
     private static Logger logger = Logger.getLogger(AbstractWsdlContractPublisher.class);
 
     public static final String REWRITE_ENDPOINT_URL = "rewrite-endpoint-url";
 
+    private Properties actionProperties;
     private boolean rewriteEndpointUrl = true;
     private Smooks transformer;
 
@@ -67,17 +66,25 @@
      * @throws ConfigurationException Bad config.
      */
     public void setActionConfig(Action actionConfig) throws ConfigurationException {
-        final Properties properties = actionConfig.getProperties();
+        actionProperties = actionConfig.getProperties();
 
-        final String rewriteEndpointUrlVal = properties.getProperty(AbstractWsdlContractPublisher.REWRITE_ENDPOINT_URL);
+        final String rewriteEndpointUrlVal = actionProperties.getProperty(AbstractWsdlContractPublisher.REWRITE_ENDPOINT_URL);
         if (rewriteEndpointUrlVal != null) {
             rewriteEndpointUrl = !rewriteEndpointUrlVal.equals("false");
         }
 
-        initializeEndpointRewriteTransformer();
+        initializeTransformer();
     }
 
     /**
+     * Get the action properties.
+     * @return The action properties.
+     */
+    public Properties getActionProperties() {
+        return actionProperties;
+    }
+
+    /**
      * Get the WSDL Address.
      * @return The WSDL address.
      */
@@ -149,7 +156,7 @@
         try {
             Properties httpClientProperties = getHttpClientProperties();
 
-            httpClientProperties = (Properties) httpClientProperties.clone();            
+            httpClientProperties = (Properties) httpClientProperties.clone();
             if(!httpClientProperties.containsKey(HttpClientFactory.TARGET_HOST_URL)) {
                 httpClientProperties.setProperty(HttpClientFactory.TARGET_HOST_URL, wsdlAddress);
             }
@@ -178,7 +185,7 @@
      * @param targetProtocol @return The updated WSDL.
      */
     protected String updateWsdl(String wsdl, EPR epr, String targetServiceCat, String targetServiceName, String targetProtocol) throws SAXException, IOException, ConfigurationException {
-        wsdl = rewriteEndpointAddresses(wsdl, epr, targetServiceCat, targetServiceName, targetProtocol);
+        wsdl = applyTransformer(wsdl, epr, targetServiceCat, targetServiceName, targetProtocol);
 
         return wsdl.trim();
     }
@@ -187,13 +194,26 @@
      * Initialize the endpoint rewriting transformer.
      * @throws ConfigurationException Failed to initialize transformer.
      */
-    protected void initializeEndpointRewriteTransformer() throws ConfigurationException {
+    protected void initializeTransformer() throws ConfigurationException {
         try {
+            // Initialise the transformer with the rewriting resource configs...
             transformer = new Smooks("/org/jboss/soa/esb/actions/soap/wsdltrans.xml");
+
+            // And add the user defined config, if there is one.... 
+            String wsdlTransformConfig = actionProperties.getProperty("wsdlTransform");
+            if(wsdlTransformConfig != null) {
+                try {
+                    transformer.addConfigurations(wsdlTransformConfig);
+                } catch (IOException e) {
+                    throw new ConfigurationException("Failed to read the User Defined WSDL Transformation config '" + wsdlTransformConfig + "'.", e);
+                } catch (SAXException e) {
+                    throw new ConfigurationException("Failed to read the User Defined WSDL Transformation config '" + wsdlTransformConfig + "'.", e);
+                }
+            }
         } catch (IOException e) {
-            throw new ConfigurationException("Failed to read the Smooks Transformation config for WSDL.", e);
+            throw new ConfigurationException("Failed to read the Endpoint Transformation config for WSDL.", e);
         } catch (SAXException e) {
-            throw new ConfigurationException("Failed to read the Smooks Transformation config for WSDL.", e);
+            throw new ConfigurationException("Failed to read the Endpoint Transformation config for WSDL.", e);
         }
     }
 
@@ -206,26 +226,23 @@
      * @param targetProtocol The target protocol.
      * @return The rewritten WSDL.
      */
-    private String rewriteEndpointAddresses(String wsdl, EPR epr, String targetServiceCat, String targetServiceName, String targetProtocol) {
-        if(!rewriteEndpointUrl && targetProtocol.startsWith("http")) {
-            // return the wsdl unchanged...
-            return wsdl;
-        }
-
+    private String applyTransformer(String wsdl, EPR epr, String targetServiceCat, String targetServiceName, String targetProtocol) {
         URI endpointURI = URI.create(epr.getAddr().getAddress());
         StringWriter writer = new StringWriter();
         ExecutionContext execContext = transformer.createExecutionContext();
 
+        execContext.setAttribute(WsdlEndpointTransformer.REWRITE_ENDPOINT_URL, rewriteEndpointUrl);
         execContext.setAttribute(WsdlEndpointTransformer.ENDPOINT_URI, endpointURI);
-        execContext.setAttribute(WsdlEndpointTransformer.TARGET_CAT, targetServiceCat);
-        execContext.setAttribute(WsdlEndpointTransformer.TARGET_NAME, targetServiceName);
-        execContext.setAttribute(WsdlEndpointTransformer.TARGET_PROTOCOL, targetProtocol);
+        execContext.setAttribute(WsdlEndpointTransformer.TARGET_CAT, (targetServiceCat != null?targetServiceCat:""));
+        execContext.setAttribute(WsdlEndpointTransformer.TARGET_NAME, (targetServiceName != null?targetServiceName:""));
+        execContext.setAttribute(WsdlEndpointTransformer.TARGET_PROTOCOL, (targetProtocol != null?targetProtocol:""));
         transformer.filter(new StreamSource(new StringReader(wsdl)), new StreamResult(writer), execContext);
 
         return writer.toString().trim();
     }
 
     private class HttpServletRequestHandler implements InvocationHandler {
+
         public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
             if(method.getName().equals("getRequestURL")) {
                 return new StringBuffer("http://www.jboss.org");

Added: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/DenormalizedAttributeValueSerializer.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/DenormalizedAttributeValueSerializer.java	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/DenormalizedAttributeValueSerializer.java	2009-02-20 05:50:35 UTC (rev 25358)
@@ -0,0 +1,91 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2005-2008, JBoss Inc.
+ */
+package org.jboss.soa.esb.actions.soap;
+
+import org.milyn.delivery.dom.serialize.DefaultSerializationUnit;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Attr;
+
+import java.io.Writer;
+import java.io.IOException;
+
+/**
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class DenormalizedAttributeValueSerializer extends DefaultSerializationUnit {
+
+    private StringBuilder denormalizeBuffer = new StringBuilder();
+
+    /**
+     * Write the element attributes.
+     * @param attributes The element attibutes.
+     * @param writer The writer to be written to.
+     * @throws IOException Exception writing output.
+     */
+    protected void writeAttributes(NamedNodeMap attributes, Writer writer) throws IOException {
+        int attribCount = attributes.getLength();
+
+        for(int i = 0; i < attribCount; i++) {
+            Attr attribute = (Attr)attributes.item(i);
+            String attribValue = attribute.getValue();
+            int enclosingChar = (int)'"';
+
+            writer.write((int)' ');
+            writer.write(attribute.getName());
+            writer.write((int)'=');
+            if(attribValue.indexOf((int)'"') != -1) {
+                enclosingChar = (int)'\'';
+            }
+            writer.write(enclosingChar);
+            writer.write(denormalize(attribValue));
+            writer.write(enclosingChar);
+        }
+    }
+
+    private String denormalize(String attribValue) {
+        denormalizeBuffer.setLength(0);
+
+        //
+        // Reversing the normalization work done on the attribute values by the
+        // parser (http://www.w3.org/TR/2006/REC-xml-20060816/#AVNormalize). Assumption
+        // here is that there's no entity/char values in the attribute!!
+        //
+
+        for(int i = 0; i < attribValue.length(); i++) {
+            char character = attribValue.charAt(i);
+
+            if(character == '<') {
+                denormalizeBuffer.append("&lt;");
+            } else if(character == '>') {
+                denormalizeBuffer.append("&gt;");
+            } else if(character == '&') {
+                denormalizeBuffer.append("&amp;");
+            } else if(character == '\'') {
+                denormalizeBuffer.append("&apos;");
+            } else if(character == '"') {
+                denormalizeBuffer.append("&quot;");
+            } else {
+                denormalizeBuffer.append(character);
+            }
+        }
+
+        return denormalizeBuffer.toString();
+    }
+}

Modified: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/WsdlContractPublisher.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/WsdlContractPublisher.java	2009-02-20 03:26:16 UTC (rev 25357)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/WsdlContractPublisher.java	2009-02-20 05:50:35 UTC (rev 25358)
@@ -30,24 +30,16 @@
  * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
  */
 public class WsdlContractPublisher extends AbstractWsdlContractPublisher {
-    
-    private Properties properties;
 
     public void setActionConfig(Action actionConfig) throws ConfigurationException {
         super.setActionConfig(actionConfig);
-
-        properties = actionConfig.getProperties();
     }
 
     public String getWsdlAddress() {
-        return properties.getProperty("wsdl");
+        return getActionProperties().getProperty("wsdl");
     }
 
-    public Properties getProperties() {
-        return properties;
-    }
-
     public Properties getHttpClientProperties() {
-        return properties;
+        return getActionProperties();
     }
 }

Modified: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/WsdlEndpointTransformer.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/WsdlEndpointTransformer.java	2009-02-20 03:26:16 UTC (rev 25357)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/WsdlEndpointTransformer.java	2009-02-20 05:50:35 UTC (rev 25358)
@@ -19,12 +19,10 @@
  */
 package org.jboss.soa.esb.actions.soap;
 
-import org.milyn.delivery.dom.DOMElementVisitor;
+import org.milyn.delivery.dom.DOMVisitAfter;
 import org.milyn.container.ExecutionContext;
 import org.milyn.SmooksException;
 import org.milyn.xml.DomUtils;
-import org.milyn.cdr.SmooksResourceConfiguration;
-import org.milyn.cdr.SmooksConfigurationException;
 import org.w3c.dom.Element;
 import org.apache.log4j.Logger;
 
@@ -36,24 +34,26 @@
  *
  * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
  */
-public class WsdlEndpointTransformer implements DOMElementVisitor {
+public class WsdlEndpointTransformer implements DOMVisitAfter {
 
     private static Logger logger = Logger.getLogger(WsdlEndpointTransformer.class);
 
+    public static final String REWRITE_ENDPOINT_URL = "rewriteEndpointUrl";
     public static final String ENDPOINT_URI = "endpointURI";
     public static final String TARGET_CAT = "targetServiceCat";
     public static final String TARGET_NAME = "targetServiceName";
     public static final String TARGET_PROTOCOL = "targetProtocol";
 
-    public void setConfiguration(SmooksResourceConfiguration smooksResourceConfiguration) throws SmooksConfigurationException {
-    }
-
-    public void visitBefore(Element element, ExecutionContext executionContext) throws SmooksException {
-    }
-
     public void visitAfter(Element element, ExecutionContext executionContext) throws SmooksException {
         String elementName = DomUtils.getName(element);
+        boolean rewriteEndpointUrl = (Boolean) executionContext.getAttribute(WsdlEndpointTransformer.REWRITE_ENDPOINT_URL);
+        URI endpointURI = (URI) executionContext.getAttribute(ENDPOINT_URI);
 
+        if(!rewriteEndpointUrl && endpointURI.getScheme().startsWith("http")) {
+            // Don't perform any rewriting ops...
+            return;
+        }
+
         if(elementName.equals("import")) {
             transformImport(element, executionContext);
         } else if(elementName.equals("binding")) {
@@ -75,9 +75,9 @@
                 String addParams = "serviceCat=" + targetServiceCat + "&serviceName=" + targetServiceName + "&protocol=" + targetProtocol;
 
                 if(locationURI.getQuery() != null) {
-                    element.setAttribute("location", (locationURI.toString() + "&" + addParams).replace("&", "&amp;"));
+                    element.setAttribute("location", (locationURI.toString() + "&" + addParams));
                 } else {
-                    element.setAttribute("location", (locationURI.toString() + "?" + addParams).replace("&", "&amp;"));
+                    element.setAttribute("location", (locationURI.toString() + "?" + addParams));
                 }
             } catch (URISyntaxException e) {
                 logger.info("Not processing WSDL import '" + location + "'.  Invalid URI.");

Modified: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/wise/WiseWsdlContractPublisher.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/wise/WiseWsdlContractPublisher.java	2009-02-20 03:26:16 UTC (rev 25357)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/wise/WiseWsdlContractPublisher.java	2009-02-20 05:50:35 UTC (rev 25358)
@@ -19,9 +19,6 @@
  */
 package org.jboss.soa.esb.actions.soap.wise;
 
-import org.jboss.soa.esb.listeners.config.Action;
-import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.actions.soap.AbstractWsdlContractPublisher;
 import org.jboss.soa.esb.actions.soap.WsdlContractPublisher;
 
 import java.util.Properties;
@@ -32,9 +29,10 @@
  * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
  */
 public class WiseWsdlContractPublisher extends WsdlContractPublisher {
+    private Properties properties;
 
     public Properties getHttpClientProperties() {
-        Properties httpClientProperties = (Properties) getProperties().clone();
+        Properties httpClientProperties = (Properties) getActionProperties().clone();
         String configurators = httpClientProperties.getProperty("configurators");
 
         // Handle potential Http BASIC Auth....
@@ -58,4 +56,8 @@
 
         return httpClientProperties;
     }
+
+    public Properties getActionProperties() {
+        return properties;
+    }
 }
\ No newline at end of file

Modified: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/services/soap/src/main/resources/org/jboss/soa/esb/actions/soap/wsdltrans.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/services/soap/src/main/resources/org/jboss/soa/esb/actions/soap/wsdltrans.xml	2009-02-20 03:26:16 UTC (rev 25357)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/services/soap/src/main/resources/org/jboss/soa/esb/actions/soap/wsdltrans.xml	2009-02-20 05:50:35 UTC (rev 25358)
@@ -17,8 +17,8 @@
         We explicitly want to close empty elements.  They're left open by default.
     -->
     <resource-config selector="*">
-        <resource>org.milyn.delivery.dom.serialize.DefaultSerializationUnit</resource>
+		<resource>org.jboss.soa.esb.actions.soap.DenormalizedAttributeValueSerializer</resource>
         <param name="closeEmptyElements">true</param>
     </resource-config>
 
-</smooks-resource-list>
\ No newline at end of file
+</smooks-resource-list>

Copied: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/AbstractWsdlContractPublisherUnitTest.java (from rev 25139, labs/jbossesb/trunk/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/AbstractWsdlContractPublisherUnitTest.java)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/AbstractWsdlContractPublisherUnitTest.java	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/AbstractWsdlContractPublisherUnitTest.java	2009-02-20 05:50:35 UTC (rev 25358)
@@ -0,0 +1,106 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2005-2008, JBoss Inc.
+ */
+package org.jboss.soa.esb.actions.soap;
+
+import junit.framework.TestCase;
+
+import java.util.Properties;
+import java.io.File;
+import java.io.StringReader;
+import java.io.InputStreamReader;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URI;
+import java.net.URL;
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Method;
+
+import org.jboss.soa.esb.listeners.config.Action;
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.addressing.EPR;
+import org.jboss.internal.soa.esb.publish.ContractInfo;
+import org.custommonkey.xmlunit.XMLUnit;
+import org.custommonkey.xmlunit.XMLAssert;
+import org.xml.sax.SAXException;
+
+/**
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class AbstractWsdlContractPublisherUnitTest extends TestCase {
+
+    public void test_transform_01() throws ConfigurationException, IOException, SAXException {
+        Action actionConfig = new Action(null, null, null, new Properties());
+
+        actionConfig.getProperties().setProperty("rewrite-endpoint-url", "true");
+        actionConfig.getProperties().setProperty("wsdlTransform", "/org/jboss/soa/esb/actions/soap/wsdl-transform.xml");
+        execTransformTest(actionConfig, "wsdl-transform.expected-01.xml"); // Both transforms
+    }
+
+    public void test_transform_02() throws ConfigurationException, IOException, SAXException {
+        Action actionConfig = new Action(null, null, null, new Properties());
+
+        actionConfig.getProperties().setProperty("rewrite-endpoint-url", "false");
+        actionConfig.getProperties().setProperty("wsdlTransform", "/org/jboss/soa/esb/actions/soap/wsdl-transform.xml");
+        execTransformTest(actionConfig, "wsdl-transform.expected-02.xml"); // Just the user defined transform
+    }
+
+    public void test_transform_03() throws ConfigurationException, IOException, SAXException {
+        Action actionConfig = new Action(null, null, null, new Properties());
+
+        actionConfig.getProperties().setProperty("rewrite-endpoint-url", "false");
+        execTransformTest(actionConfig, "/test-in.wsdl"); // Neither transforms - should be unchanged from the in-wsdl
+    }
+
+    public void test_transform_04() throws ConfigurationException, IOException, SAXException {
+        Action actionConfig = new Action(null, null, null, new Properties());
+
+        actionConfig.getProperties().setProperty("rewrite-endpoint-url", "true");
+        execTransformTest(actionConfig, "wsdl-transform.expected-04.xml"); // Just the url rewriting transform
+    }
+
+    private void execTransformTest(Action actionConfig, String expected) throws ConfigurationException, SAXException, IOException {
+        TestWsdlContractPublisher publisher = new TestWsdlContractPublisher();
+        publisher.setActionConfig(actionConfig);
+        ContractInfo contractInfo = publisher.getContractInfo(new EPR(URI.create("http://x.y.x:8989/")));
+
+        //System.out.println(contractInfo.getData());
+        XMLUnit.setIgnoreWhitespace( true );
+        XMLAssert.assertXMLEqual(new InputStreamReader(getClass().getResourceAsStream(expected)), new StringReader(contractInfo.getData()));
+    }
+
+    private class TestWsdlContractPublisher extends AbstractWsdlContractPublisher {
+
+        public String getWsdlAddress() {
+			URL resource = getClass().getResource("/test-in.wsdl");
+            File testFile = new File(resource.getFile());
+
+            try {
+                return testFile.toURL().toString();
+            } catch (MalformedURLException e) {
+                fail("Failed to create URL object from file path: " + e.getMessage());
+                return null;
+            }
+        }
+
+        public Properties getHttpClientProperties() {
+            return getActionProperties();
+        }
+    }
+}

Modified: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/JBossWSAdapterContractPublisherUnitTest.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/JBossWSAdapterContractPublisherUnitTest.java	2009-02-20 03:26:16 UTC (rev 25357)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/JBossWSAdapterContractPublisherUnitTest.java	2009-02-20 05:50:35 UTC (rev 25358)
@@ -27,8 +27,12 @@
 import org.jboss.soa.esb.listeners.config.Action;
 import org.jboss.soa.esb.testutils.StringUtils;
 import org.xml.sax.SAXException;
+import org.custommonkey.xmlunit.XMLUnit;
+import org.custommonkey.xmlunit.XMLAssert;
 
 import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.StringReader;
 import java.net.URI;
 import java.util.Properties;
 
@@ -40,42 +44,48 @@
 	
     public void test() throws ConfigurationException, IOException, SAXException {
         JBossWSWebserviceContractPublisher publisher = new JBossWSWebserviceContractPublisher();
-        String wsdlIn = new String(StreamUtils.readStream(getClass().getResourceAsStream("test-in.wsdl")));
+        String wsdlIn = new String(StreamUtils.readStream(getClass().getResourceAsStream("/test-in.wsdl")));
         String wsdlOutExpected = new String(StreamUtils.readStream(getClass().getResourceAsStream("test-out-expected.wsdl")));
         EPR epr = new EPR(URI.create("socket://x.y.x:8989/"));
 
-        publisher.initializeEndpointRewriteTransformer();
+        publisher.setActionConfig(buildActionConfig(true));
+        publisher.initializeTransformer();
         String wsdlOut = publisher.updateWsdl(wsdlIn, epr, "myServiceCat", "myServiceName", "socket");
         log.debug(wsdlOut);
-        assertTrue("WSDL Update failed.  \n\n*** Expected:\n\n" + wsdlOutExpected + "\n\n*** Got:\n\n" + wsdlOut, StringUtils.equalsIgnoreLinebreaks(wsdlOutExpected, wsdlOut, false));
+
+        XMLUnit.setIgnoreWhitespace( true );
+        XMLAssert.assertXMLEqual(new StringReader(wsdlOutExpected), new StringReader(wsdlOut));
     }
 
     public void test_http_rewrite() throws ConfigurationException, IOException, SAXException {
         JBossWSWebserviceContractPublisher publisher = new JBossWSWebserviceContractPublisher();
-        String wsdlIn = new String(StreamUtils.readStream(getClass().getResourceAsStream("test-in.wsdl")));
+        String wsdlIn = new String(StreamUtils.readStream(getClass().getResourceAsStream("/test-in.wsdl")));
         String wsdlOutExpected = new String(StreamUtils.readStream(getClass().getResourceAsStream("test-out-expected-http-rewrite.wsdl")));
         EPR epr = new EPR(URI.create("http://x.y.x:8989/"));
 
         publisher.setActionConfig(buildActionConfig(true));
 
-        publisher.initializeEndpointRewriteTransformer();
+        publisher.initializeTransformer();
         String wsdlOut = publisher.updateWsdl(wsdlIn, epr, "myServiceCat", "myServiceName", "http");
         log.debug(wsdlOut);
-        assertTrue("WSDL Update failed.  \n\n*** Expected:\n\n" + wsdlOutExpected + "\n\n*** Got:\n\n" + wsdlOut, StringUtils.equalsIgnoreLinebreaks(wsdlOutExpected, wsdlOut, false));
+
+        XMLUnit.setIgnoreWhitespace( true );
+        XMLAssert.assertXMLEqual(new StringReader(wsdlOutExpected), new StringReader(wsdlOut));
     }
 
     public void test_http_norewrite() throws ConfigurationException, IOException, SAXException {
         JBossWSWebserviceContractPublisher publisher = new JBossWSWebserviceContractPublisher();
-        String wsdlIn = new String(StreamUtils.readStream(getClass().getResourceAsStream("test-in.wsdl")));
-        String wsdlOutExpected = new String(StreamUtils.readStream(getClass().getResourceAsStream("test-in.wsdl"))); // expected same as input wsdl
+        String wsdlIn = new String(StreamUtils.readStream(getClass().getResourceAsStream("/test-in.wsdl")));
+        String wsdlOutExpected = new String(StreamUtils.readStream(getClass().getResourceAsStream("/test-in.wsdl"))); // expected same as input wsdl
         EPR epr = new EPR(URI.create("http://x.y.x:8989/"));
 
         publisher.setActionConfig(buildActionConfig(false));
         
-        publisher.initializeEndpointRewriteTransformer();
+        publisher.initializeTransformer();
         String wsdlOut = publisher.updateWsdl(wsdlIn, epr, "myServiceCat", "myServiceName", "http");
         log.debug(wsdlOut);
-        assertTrue("WSDL Update failed.  \n\n*** Expected:\n\n" + wsdlOutExpected + "\n\n*** Got:\n\n" + wsdlOut, StringUtils.equalsIgnoreLinebreaks(wsdlOutExpected, wsdlOut, false));
+        XMLUnit.setIgnoreWhitespace( true );
+        XMLAssert.assertXMLEqual(new StringReader(wsdlOutExpected), new StringReader(wsdlOut));
     }
 
     private Action buildActionConfig(boolean rewriteUrls) {

Deleted: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/test-in.wsdl
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/test-in.wsdl	2009-02-20 03:26:16 UTC (rev 25357)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/test-in.wsdl	2009-02-20 05:50:35 UTC (rev 25358)
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://webservice_war1/goodbyeworld" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="GoodbyeWorldWSService" targetNamespace="http://webservice_war1/goodbyeworld">
-    <import location="http://127.0.0.1:8080/contract/contract.jsp?wsdl&amp;resource=MTOMEndpoint_PortType61314.wsdl" namespace="http://org.jboss.ws/xop/doclit"/>
-    <types/>
-    <message name="GoodbyeWorldWS_sayGoodbyeWithoutResponse">
-        <part name="String_1" type="xsd:string"/>
-
-    </message>
-    <message name="GoodbyeWorldWS_sayGoodbye">
-        <part name="String_1" type="xsd:string"/>
-    </message>
-    <message name="GoodbyeWorldWS_sayGoodbyeWithoutResponseResponse"/>
-    <message name="GoodbyeWorldWS_sayGoodbyeResponse">
-        <part name="result" type="xsd:string"/>
-    </message>
-    <portType name="ReptilesNotifyWS">
-
-        <operation name="sayGoodbye" parameterOrder="String_1">
-            <input message="tns:GoodbyeWorldWS_sayGoodbye"/>
-            <output message="tns:GoodbyeWorldWS_sayGoodbyeResponse"/>
-        </operation>
-        <operation name="sayGoodbyeWithoutResponse" parameterOrder="String_1">
-            <input message="tns:GoodbyeWorldWS_sayGoodbyeWithoutResponse"/>
-            <output message="tns:GoodbyeWorldWS_sayGoodbyeWithoutResponseResponse"/>
-        </operation>
-    </portType>
-
-    <binding name="GoodbyeWorldWSBinding" type="tns:ReptilesNotifyWS">
-        <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
-        <operation name="sayGoodbye">
-            <soap:operation soapAction=""/>
-            <input>
-                <soap:body namespace="http://webservice_war1/goodbyeworld" use="literal"/>
-            </input>
-            <output>
-                <soap:body namespace="http://webservice_war1/goodbyeworld" use="literal"/>
-
-            </output>
-        </operation>
-        <operation name="sayGoodbyeWithoutResponse">
-            <soap:operation soapAction=""/>
-            <input>
-                <soap:body namespace="http://webservice_war1/goodbyeworld" use="literal"/>
-            </input>
-            <output>
-                <soap:body namespace="http://webservice_war1/goodbyeworld" use="literal"/>
-
-            </output>
-        </operation>
-    </binding>
-    <service name="GoodbyeWorldWSService">
-        <port binding="tns:GoodbyeWorldWSBinding" name="GoodbyeWorldWSPort">
-            <soap:address location="http://tfennelly:8080/Quickstart_webservice_jbossws_adapter_01/GoodbyeWorldWS"/>
-        </port>
-    </service>
-</definitions>
\ No newline at end of file

Copied: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/wsdl-transform.expected-01.xml (from rev 25139, labs/jbossesb/trunk/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/wsdl-transform.expected-01.xml)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/wsdl-transform.expected-01.xml	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/wsdl-transform.expected-01.xml	2009-02-20 05:50:35 UTC (rev 25358)
@@ -0,0 +1,38 @@
+<definitions name="GoodbyeWorldWSService" targetNamespace="http://webservice_war1/goodbyeworld" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://webservice_war1/goodbyeworld" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+    <import location="http://127.0.0.1:8080/contract/contract.jsp?wsdl&amp;resource=MTOMEndpoint_PortType61314.wsdl&amp;serviceCat=&amp;serviceName=&amp;protocol=" namespace="http://org.jboss.ws/xop/doclit"/>
+    <types/>
+
+
+
+
+
+
+    <binding name="GoodbyeWorldWSBinding" type="tns:ReptilesNotifyWS">
+        <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
+        <operation name="sayGoodbye">
+            <soap:operation soapAction=""/>
+            <input>
+                <soap:body namespace="http://webservice_war1/goodbyeworld" use="literal"/>
+            </input>
+            <output>
+                <soap:body namespace="http://webservice_war1/goodbyeworld" use="literal"/>
+
+            </output>
+        </operation>
+        <operation name="sayGoodbyeWithoutResponse">
+            <soap:operation soapAction=""/>
+            <input>
+                <soap:body namespace="http://webservice_war1/goodbyeworld" use="literal"/>
+            </input>
+            <output>
+                <soap:body namespace="http://webservice_war1/goodbyeworld" use="literal"/>
+
+            </output>
+        </operation>
+    </binding>
+    <service name="GoodbyeWorldWSService">
+        <port binding="tns:GoodbyeWorldWSBinding" name="GoodbyeWorldWSPort">
+            <soap:address location="http://x.y.x:8989/"/>
+        </port>
+    </service>
+</definitions>
\ No newline at end of file

Copied: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/wsdl-transform.expected-02.xml (from rev 25139, labs/jbossesb/trunk/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/wsdl-transform.expected-02.xml)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/wsdl-transform.expected-02.xml	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/wsdl-transform.expected-02.xml	2009-02-20 05:50:35 UTC (rev 25358)
@@ -0,0 +1,38 @@
+<definitions name="GoodbyeWorldWSService" targetNamespace="http://webservice_war1/goodbyeworld" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://webservice_war1/goodbyeworld" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+    <import location="http://127.0.0.1:8080/contract/contract.jsp?wsdl&amp;resource=MTOMEndpoint_PortType61314.wsdl" namespace="http://org.jboss.ws/xop/doclit"/>
+    <types/>
+
+
+
+
+
+
+    <binding name="GoodbyeWorldWSBinding" type="tns:ReptilesNotifyWS">
+        <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
+        <operation name="sayGoodbye">
+            <soap:operation soapAction=""/>
+            <input>
+                <soap:body namespace="http://webservice_war1/goodbyeworld" use="literal"/>
+            </input>
+            <output>
+                <soap:body namespace="http://webservice_war1/goodbyeworld" use="literal"/>
+
+            </output>
+        </operation>
+        <operation name="sayGoodbyeWithoutResponse">
+            <soap:operation soapAction=""/>
+            <input>
+                <soap:body namespace="http://webservice_war1/goodbyeworld" use="literal"/>
+            </input>
+            <output>
+                <soap:body namespace="http://webservice_war1/goodbyeworld" use="literal"/>
+
+            </output>
+        </operation>
+    </binding>
+    <service name="GoodbyeWorldWSService">
+        <port binding="tns:GoodbyeWorldWSBinding" name="GoodbyeWorldWSPort">
+            <soap:address location="http://tfennelly:8080/Quickstart_webservice_jbossws_adapter_01/GoodbyeWorldWS"/>
+        </port>
+    </service>
+</definitions>
\ No newline at end of file

Copied: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/wsdl-transform.expected-04.xml (from rev 25139, labs/jbossesb/trunk/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/wsdl-transform.expected-04.xml)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/wsdl-transform.expected-04.xml	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/wsdl-transform.expected-04.xml	2009-02-20 05:50:35 UTC (rev 25358)
@@ -0,0 +1,55 @@
+<definitions name="GoodbyeWorldWSService" targetNamespace="http://webservice_war1/goodbyeworld" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://webservice_war1/goodbyeworld" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+    <import location="http://127.0.0.1:8080/contract/contract.jsp?wsdl&amp;resource=MTOMEndpoint_PortType61314.wsdl&amp;serviceCat=&amp;serviceName=&amp;protocol=" namespace="http://org.jboss.ws/xop/doclit"/>
+    <types/>
+    <message name="GoodbyeWorldWS_sayGoodbyeWithoutResponse">
+        <part name="String_1" type="xsd:string"/>
+
+    </message>
+    <message name="GoodbyeWorldWS_sayGoodbye">
+        <part name="String_1" type="xsd:string"/>
+    </message>
+    <message name="GoodbyeWorldWS_sayGoodbyeWithoutResponseResponse"/>
+    <message name="GoodbyeWorldWS_sayGoodbyeResponse">
+        <part name="result" type="xsd:string"/>
+    </message>
+    <portType name="ReptilesNotifyWS">
+
+        <operation name="sayGoodbye" parameterOrder="String_1">
+            <input message="tns:GoodbyeWorldWS_sayGoodbye"/>
+            <output message="tns:GoodbyeWorldWS_sayGoodbyeResponse"/>
+        </operation>
+        <operation name="sayGoodbyeWithoutResponse" parameterOrder="String_1">
+            <input message="tns:GoodbyeWorldWS_sayGoodbyeWithoutResponse"/>
+            <output message="tns:GoodbyeWorldWS_sayGoodbyeWithoutResponseResponse"/>
+        </operation>
+    </portType>
+
+    <binding name="GoodbyeWorldWSBinding" type="tns:ReptilesNotifyWS">
+        <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
+        <operation name="sayGoodbye">
+            <soap:operation soapAction=""/>
+            <input>
+                <soap:body namespace="http://webservice_war1/goodbyeworld" use="literal"/>
+            </input>
+            <output>
+                <soap:body namespace="http://webservice_war1/goodbyeworld" use="literal"/>
+
+            </output>
+        </operation>
+        <operation name="sayGoodbyeWithoutResponse">
+            <soap:operation soapAction=""/>
+            <input>
+                <soap:body namespace="http://webservice_war1/goodbyeworld" use="literal"/>
+            </input>
+            <output>
+                <soap:body namespace="http://webservice_war1/goodbyeworld" use="literal"/>
+
+            </output>
+        </operation>
+    </binding>
+    <service name="GoodbyeWorldWSService">
+        <port binding="tns:GoodbyeWorldWSBinding" name="GoodbyeWorldWSPort">
+            <soap:address location="http://x.y.x:8989/"/>
+        </port>
+    </service>
+</definitions>
\ No newline at end of file

Copied: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/wsdl-transform.xml (from rev 25139, labs/jbossesb/trunk/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/wsdl-transform.xml)
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/wsdl-transform.xml	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/wsdl-transform.xml	2009-02-20 05:50:35 UTC (rev 25358)
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd"
+                      xmlns:g="http://www.milyn.org/xsd/smooks/groovy-1.1.xsd">
+
+    <g:groovy executeOnElement="message,portType">
+        <g:script>
+            DomUtils.removeElement(element, false);
+        </g:script>
+    </g:groovy>
+
+</smooks-resource-list>
\ No newline at end of file

Added: labs/jbossesb/branches/JBESB_4_4_GA_FP/product/services/soap/src/test/resources/test-in.wsdl
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_FP/product/services/soap/src/test/resources/test-in.wsdl	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_4_GA_FP/product/services/soap/src/test/resources/test-in.wsdl	2009-02-20 05:50:35 UTC (rev 25358)
@@ -0,0 +1,55 @@
+<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://webservice_war1/goodbyeworld" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="GoodbyeWorldWSService" targetNamespace="http://webservice_war1/goodbyeworld">
+    <import location="http://127.0.0.1:8080/contract/contract.jsp?wsdl&amp;resource=MTOMEndpoint_PortType61314.wsdl" namespace="http://org.jboss.ws/xop/doclit"/>
+    <types/>
+    <message name="GoodbyeWorldWS_sayGoodbyeWithoutResponse">
+        <part name="String_1" type="xsd:string"/>
+
+    </message>
+    <message name="GoodbyeWorldWS_sayGoodbye">
+        <part name="String_1" type="xsd:string"/>
+    </message>
+    <message name="GoodbyeWorldWS_sayGoodbyeWithoutResponseResponse"/>
+    <message name="GoodbyeWorldWS_sayGoodbyeResponse">
+        <part name="result" type="xsd:string"/>
+    </message>
+    <portType name="ReptilesNotifyWS">
+
+        <operation name="sayGoodbye" parameterOrder="String_1">
+            <input message="tns:GoodbyeWorldWS_sayGoodbye"/>
+            <output message="tns:GoodbyeWorldWS_sayGoodbyeResponse"/>
+        </operation>
+        <operation name="sayGoodbyeWithoutResponse" parameterOrder="String_1">
+            <input message="tns:GoodbyeWorldWS_sayGoodbyeWithoutResponse"/>
+            <output message="tns:GoodbyeWorldWS_sayGoodbyeWithoutResponseResponse"/>
+        </operation>
+    </portType>
+
+    <binding name="GoodbyeWorldWSBinding" type="tns:ReptilesNotifyWS">
+        <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
+        <operation name="sayGoodbye">
+            <soap:operation soapAction=""/>
+            <input>
+                <soap:body namespace="http://webservice_war1/goodbyeworld" use="literal"/>
+            </input>
+            <output>
+                <soap:body namespace="http://webservice_war1/goodbyeworld" use="literal"/>
+
+            </output>
+        </operation>
+        <operation name="sayGoodbyeWithoutResponse">
+            <soap:operation soapAction=""/>
+            <input>
+                <soap:body namespace="http://webservice_war1/goodbyeworld" use="literal"/>
+            </input>
+            <output>
+                <soap:body namespace="http://webservice_war1/goodbyeworld" use="literal"/>
+
+            </output>
+        </operation>
+    </binding>
+    <service name="GoodbyeWorldWSService">
+        <port binding="tns:GoodbyeWorldWSBinding" name="GoodbyeWorldWSPort">
+            <soap:address location="http://tfennelly:8080/Quickstart_webservice_jbossws_adapter_01/GoodbyeWorldWS"/>
+        </port>
+    </service>
+</definitions>
\ No newline at end of file




More information about the jboss-svn-commits mailing list