[jboss-svn-commits] JBL Code SVN: r29483 - in labs/jbossesb/workspace/dbevenius/saml_support: product and 23 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Mon Sep 28 05:19:02 EDT 2009
Author: beve
Date: 2009-09-28 05:19:01 -0400 (Mon, 28 Sep 2009)
New Revision: 29483
Added:
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/internal/soa/esb/util/Element.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/internal/soa/esb/util/IdentitySAXHandler.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/internal/soa/esb/util/Node.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/internal/soa/esb/util/Text.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_config_escaping.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_config_escaping.xml
Removed:
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/testutils/Element.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/testutils/IdentitySAXHandler.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/testutils/Node.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/testutils/Text.java
labs/jbossesb/workspace/dbevenius/saml_support/testlib/xmlunit-1.2.jar
Modified:
labs/jbossesb/workspace/dbevenius/saml_support/
labs/jbossesb/workspace/dbevenius/saml_support/product/.classpath
labs/jbossesb/workspace/dbevenius/saml_support/product/build-distr.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/build.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/install/build.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/ivy.xml
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/internal/soa/esb/listeners/war/Servlet.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/internal/soa/esb/listeners/war/templates/web.xml.ftl
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/internal/soa/esb/util/XMLHelper.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/internal/soa/esb/webservice/ESBContractGenerator.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/FtpListenerMapper.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/FtpListenerMapper.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers120/FtpListenerMapper.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/JBossRemotingGatewayListener.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/internal/soa/esb/listeners/war/WebDeploymentArchiveUnitTest.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/internal/soa/esb/util/XMLHelperUnitTest.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/actions/converters/ObjectToXStreamUnitTest.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/actions/transformation/xslt/XsltActionUnitTest.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/ScheduledListenerUnitTest.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/FtpListenerMapperUnitTest.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/FtpListenerMapperUnitTest.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/schedule/SchedulingUnitTest.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/testutils/StringUtils.java
labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/util/BindingsTransformUnitTest.java
labs/jbossesb/workspace/dbevenius/saml_support/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/proxy/SOAPProxy.java
labs/jbossesb/workspace/dbevenius/saml_support/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/AbstractWsdlContractPublisherUnitTest.java
labs/jbossesb/workspace/dbevenius/saml_support/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/JBossWSAdapterContractPublisherUnitTest.java
labs/jbossesb/workspace/dbevenius/saml_support/qa/junit/src/org/jboss/soa/esb/server/ebws/EBWSUnitTest.java
Log:
Merged revisions 29415,29427,29450,29457-29458,29460 via svnmerge from
https://svn.jboss.org/repos/labs/labs/jbossesb/trunk
.......
r29415 | tfennelly | 2009-09-21 14:26:22 +0200 (Mon, 21 Sep 2009) | 2 lines
https://jira.jboss.org/jira/browse/JBESB-2791
JBossRemotingMessageComposer assumes the payload is a String
.......
r29427 | kevin.conner at jboss.com | 2009-09-22 10:09:19 +0200 (Tue, 22 Sep 2009) | 1 line
Removed xmlunit from codebase: JBESB-2833
.......
r29450 | kevin.conner at jboss.com | 2009-09-24 12:59:11 +0200 (Thu, 24 Sep 2009) | 1 line
Fix FTP EPR creation: JBESB-2837
.......
r29457 | dward | 2009-09-24 18:51:26 +0200 (Thu, 24 Sep 2009) | 2 lines
Fix for https://jira.jboss.org/jira/browse/JBESB-2853
.......
r29458 | dward | 2009-09-24 19:02:50 +0200 (Thu, 24 Sep 2009) | 2 lines
Changes for: https://jira.jboss.org/jira/browse/JBESB-2854
.......
r29460 | kevin.conner at jboss.com | 2009-09-25 10:30:14 +0200 (Fri, 25 Sep 2009) | 1 line
Check in missing XMLUnit changes: JBESB-2833
.......
Property changes on: labs/jbossesb/workspace/dbevenius/saml_support
___________________________________________________________________
Name: svnmerge-integrated
- /labs/jbossesb/trunk:1-29393
+ /labs/jbossesb/trunk:1-29481
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/.classpath
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/.classpath 2009-09-28 08:56:09 UTC (rev 29482)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/.classpath 2009-09-28 09:19:01 UTC (rev 29483)
@@ -130,9 +130,6 @@
<classpathentry kind="lib" path="lib/ext/jboss-identity-fed-model-1.0.0.beta3.jar"/>
<classpathentry kind="lib" path="lib/ext/jboss-identity-web-1.0.0.beta3.jar"/>
<classpathentry kind="lib" path="lib/ext/jboss-identity-xmlsec-model-1.0.0.beta3.jar"/>
- <classpathentry kind="lib" path="/opt/jboss/esb/saml_support/testlib/junit-4.1.jar"/>
- <classpathentry kind="lib" path="/opt/jboss/esb/saml_support/testlib/mockejb.jar"/>
- <classpathentry kind="lib" path="/opt/jboss/esb/saml_support/testlib/xmlunit-1.2.jar"/>
<classpathentry kind="lib" path="build/lib/milyn-commons-1.2.3.jar"/>
<classpathentry kind="lib" path="build/lib/milyn-edisax-parser-1.2.3.jar"/>
<classpathentry kind="lib" path="build/lib/milyn-magger-1.2.3.jar"/>
@@ -159,5 +156,7 @@
<classpathentry kind="lib" path="build/jbossesb/lib/jbossesb-config-model-1.0.1.jar"/>
<classpathentry kind="lib" path="build/jbossesb/lib/jbossesb-config-model-1.1.0.jar"/>
<classpathentry kind="lib" path="build/jbossesb/lib/jbossesb-config-model-1.2.0.jar"/>
+ <classpathentry kind="var" path="ESB_ROOT/testlib/junit-4.1.jar"/>
+ <classpathentry kind="var" path="ESB_ROOT/testlib/mockejb.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/build-distr.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/build-distr.xml 2009-09-28 08:56:09 UTC (rev 29482)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/build-distr.xml 2009-09-28 09:19:01 UTC (rev 29483)
@@ -151,7 +151,6 @@
<fileset dir="${lib.dir}" includes="slf4j-*.jar"/>
<fileset dir="${lib.dir}" includes="freemarker-*.jar"/>
- <fileset dir="${lib.dir}" includes="xmlunit-*.jar"/>
<!-- smooks -->
<fileset dir="${lib.dir}" includes="milyn-*.jar,freemarker-*.jar,jackson-lgpl-*.jar,ognl-*.jar,stringtemplate-*.jar,xpp3_min-*.jar"/>
<fileset dir="${lib.ext.dir}" includes="opencsv-*.jar"/>
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/build.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/build.xml 2009-09-28 08:56:09 UTC (rev 29482)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/build.xml 2009-09-28 09:19:01 UTC (rev 29483)
@@ -257,7 +257,7 @@
<fileset dir="${org.jboss.esb.internal.dest}/lib" includes="xbean-*.jar jbossall-client*.jar hibernate*.jar log4j-*.jar milyn-*.jar commons-httpclient-*.jar mail*.jar"/>
<fileset dir="${org.jboss.esb.internal.dest}/lib" includes="jboss-metadata-*.jar activation-*.jar bsf-*.jar commons-io-*.jar dom4j-*.jar jboss-dependency-*.jar"/>
<fileset dir="${org.jboss.esb.internal.dest}/lib" includes="jboss-deployers-client-spi-*.jar jboss-deployers-spi-*.jar jboss-deployers-structure-spi-*.jar"/>
- <fileset dir="${org.jboss.esb.internal.dest}/lib" includes="jboss-kernel-*.jar jgroups-*.jar jboss-system-*.jar stringtemplate-*.jar xmlunit-*.jar"/>
+ <fileset dir="${org.jboss.esb.internal.dest}/lib" includes="jboss-kernel-*.jar jgroups-*.jar jboss-system-*.jar stringtemplate-*.jar"/>
<fileset dir="${org.jboss.esb.internal.dest}/lib" includes="xercesImpl-*.jar jboss-4*.jar jaxb-api-*.jar jboss-deployers-core-spi-*.jar"/>
<fileset dir="${org.jboss.esb.internal.dest}/lib" includes="stax-api*.jar jboss-vfs-*.jar jboss-deployers-vfs-spi-*.jar mvel-*.jar bsh-*.jar groovy-all-*.jar mina-core-*.jar"/>
<fileset dir="${org.jboss.esb.internal.dest}/lib" includes="javassist-*.jar jboss-cache-*.jar commons-codec-*.jar quartz-*.jar jsch-*.jar ognl-*.jar"/>
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/install/build.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/install/build.xml 2009-09-28 08:56:09 UTC (rev 29482)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/install/build.xml 2009-09-28 09:19:01 UTC (rev 29483)
@@ -238,7 +238,6 @@
<include name="stax-api-*.jar"/>
<include name="wstx-asl-*.jar"/>
<include name="xbean-*.jar"/>
- <include name="xmlunit*.jar"/>
<include name="xstream-*.jar"/>
</fileset>
<fileset dir="${org.jboss.esb.dist.lib}">
@@ -304,7 +303,6 @@
<exclude name="lib/stax-api-*.jar"/>
<exclude name="lib/wstx-asl-*.jar"/>
<exclude name="lib/xbean-*.jar"/>
- <exclude name="lib/xmlunit-*.jar"/>
<exclude name="lib/xstream-*.jar"/>
<exclude name="META-INF/jboss-service.xml"/>
<exclude name="actionArtifactMap.properties"/>
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/ivy.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/ivy.xml 2009-09-28 08:56:09 UTC (rev 29482)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/ivy.xml 2009-09-28 09:19:01 UTC (rev 29483)
@@ -102,9 +102,6 @@
<dependency org="sun-jaxws" name="jaxws-rt" rev="2.1.1"/>
<dependency org="sun-jaxb" name="jaxb-xjc" rev="2.1.4"/>
- <!-- xmlunit -->
- <dependency org="xmlunit" name="xmlunit" rev="1.2"/>
-
<!-- JBoss Microcontainer dependencies -->
<dependency org="org.jboss.deployers" name="jboss-deployers-vfs-spi" rev="2.0.7.GA">
<exclude org="jboss" module="jboss-vfs"/>
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/internal/soa/esb/listeners/war/Servlet.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/internal/soa/esb/listeners/war/Servlet.java 2009-09-28 08:56:09 UTC (rev 29482)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/internal/soa/esb/listeners/war/Servlet.java 2009-09-28 09:19:01 UTC (rev 29483)
@@ -33,11 +33,20 @@
private List<String> urlMappings = new ArrayList<String>();
private SecurityConstraints securityConstraints;
+ private Integer loadOnStartup = null;
public Servlet(String name, String runtimeClass, WebModel webModel) {
super(name, runtimeClass, webModel);
webModel.getServlets().add(this);
}
+
+ public Integer getLoadOnStartup() {
+ return loadOnStartup;
+ }
+
+ public void setLoadOnStartup(Integer loadOnStartup) {
+ this.loadOnStartup = loadOnStartup;
+ }
public List<String> getUrlMappings() {
return urlMappings;
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/internal/soa/esb/listeners/war/templates/web.xml.ftl
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/internal/soa/esb/listeners/war/templates/web.xml.ftl 2009-09-28 08:56:09 UTC (rev 29482)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/internal/soa/esb/listeners/war/templates/web.xml.ftl 2009-09-28 09:19:01 UTC (rev 29483)
@@ -39,6 +39,10 @@
<param-value>${param.value}</param-value>
</init-param>
</#list>
+
+ <#if servlet.loadOnStartup??>
+ <load-on-startup>${servlet.loadOnStartup}</load-on-startup>
+ </#if>
</servlet>
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/internal/soa/esb/util/Element.java (from rev 29460, labs/jbossesb/trunk/product/rosetta/src/org/jboss/internal/soa/esb/util/Element.java)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/internal/soa/esb/util/Element.java (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/internal/soa/esb/util/Element.java 2009-09-28 09:19:01 UTC (rev 29483)
@@ -0,0 +1,138 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY 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 along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.internal.soa.esb.util;
+
+import java.util.ArrayList;
+import java.util.Comparator;
+import java.util.List;
+import java.util.Map;
+import java.util.TreeMap;
+
+import javax.xml.namespace.QName;
+
+import org.xml.sax.Attributes;
+
+/**
+ * Simple class representing an element.
+ * This is used to compare XML documents.
+ *
+ * @author Kevin Conner
+ */
+public class Element implements Node
+{
+ /**
+ * The QName comparator.
+ */
+ private static final Comparator<QName> QNAME_COMPARATOR = new QNameComparator() ;
+
+ /**
+ * The name of the element.
+ */
+ private final QName name ;
+ /**
+ * Associated attributes.
+ */
+ private final Map<QName, String> attributes = new TreeMap<QName, String>(QNAME_COMPARATOR) ;
+ /**
+ * Children.
+ */
+ private final List<Node> children = new ArrayList<Node>() ;
+
+ /**
+ * Construct the element.
+ * @param namespaceURI The namespace for the element.
+ * @param localName The local name of the element.
+ * @param attributes The associated attributes.
+ */
+ Element(final String namespaceURI, final String localName, final Attributes attributes)
+ {
+ name = new QName(namespaceURI, localName) ;
+ final int numAttributes = attributes.getLength() ;
+ for(int count = 0 ; count < numAttributes ; count++)
+ {
+ final String attrNamespaceURI = attributes.getURI(count) ;
+ final String attrLocalName = attributes.getLocalName(count) ;
+ final String attrValue = attributes.getValue(count) ;
+
+ this.attributes.put(new QName(attrNamespaceURI, attrLocalName), attrValue) ;
+ }
+ }
+
+ /**
+ * Add a child node.
+ * @param child The child node.
+ */
+ void addChild(final Node child)
+ {
+ children.add(child) ;
+ }
+
+ /**
+ * Check for equality.
+ * @param obj the object to test against.
+ */
+ @Override
+ public boolean equals(final Object obj)
+ {
+ if (obj == null)
+ {
+ return false ;
+ }
+
+ if (obj == this)
+ {
+ return true ;
+ }
+
+ if (obj instanceof Element)
+ {
+ final Element rhs = (Element)obj ;
+ return (name.equals(rhs.name) && attributes.equals(rhs.attributes) &&
+ children.equals(rhs.children)) ;
+ }
+
+ return false ;
+ }
+
+ /**
+ * The QName comparator class.
+ * @author kevin
+ */
+ private static final class QNameComparator implements Comparator<QName>
+ {
+ /**
+ * Compare the QNames.
+ * @param name1 The first QName.
+ * @param name2 The second QName.
+ * @return
+ */
+ public int compare(final QName name1, final QName name2)
+ {
+ final int uriComparator = name1.getNamespaceURI().compareTo(name2.getNamespaceURI()) ;
+ if (uriComparator != 0)
+ {
+ return uriComparator ;
+ }
+ return name1.getLocalPart().compareTo(name2.getLocalPart());
+ }
+ }
+}
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/internal/soa/esb/util/IdentitySAXHandler.java (from rev 29460, labs/jbossesb/trunk/product/rosetta/src/org/jboss/internal/soa/esb/util/IdentitySAXHandler.java)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/internal/soa/esb/util/IdentitySAXHandler.java (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/internal/soa/esb/util/IdentitySAXHandler.java 2009-09-28 09:19:01 UTC (rev 29483)
@@ -0,0 +1,138 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY 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 along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.internal.soa.esb.util;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.xml.sax.Attributes;
+import org.xml.sax.SAXException;
+import org.xml.sax.helpers.DefaultHandler;
+
+/**
+ * Simple SAX parser creating an identity document for the incoming XML.
+ * Any leading and trailing whitespace is ignored in the document as are
+ * namespace prefixes.
+ *
+ * @author Kevin Conner
+ */
+public class IdentitySAXHandler extends DefaultHandler
+{
+ /**
+ * The root element.
+ */
+ private Element rootElement ;
+ /**
+ * The current element.
+ */
+ private Element currentElement ;
+ /**
+ * The stack of working elements.
+ */
+ private List<Element> stack = new ArrayList<Element>() ;
+ /**
+ * The current text value.
+ */
+ private StringBuilder currentText = new StringBuilder() ;
+
+ @Override
+ public void startElement(final String uri, final String localName,
+ final String name, final Attributes attributes)
+ throws SAXException
+ {
+ checkText() ;
+
+ final Element element = new Element(uri, localName, attributes) ;
+ if (rootElement == null)
+ {
+ rootElement = element ;
+ }
+
+ if (currentElement != null)
+ {
+ currentElement.addChild(element) ;
+ stack.add(currentElement) ;
+ }
+ currentElement = element ;
+ }
+
+ @Override
+ public void endElement(final String uri, final String localName,
+ final String name)
+ throws SAXException
+ {
+ checkText() ;
+
+ final int lastIndex = (stack.size() - 1) ;
+ if (lastIndex < 0)
+ {
+ currentElement = null ;
+ }
+ else
+ {
+ currentElement = stack.remove(lastIndex) ;
+ }
+ }
+
+ @Override
+ public void characters(final char[] ch, final int start, final int length)
+ throws SAXException
+ {
+ currentText.append(ch, start, length) ;
+ }
+
+ private void checkText()
+ {
+ final int textLength = currentText.length() ;
+ if (textLength > 0)
+ {
+ int start = 0 ;
+ while((start < textLength) && isXMLWhitespace(currentText.charAt(start)))
+ {
+ start++ ;
+ }
+
+ int end = textLength-1 ;
+ while((end >= start) && isXMLWhitespace(currentText.charAt(end)))
+ {
+ end-- ;
+ }
+
+ if (start <= end)
+ {
+ currentElement.addChild(new Text(currentText.substring(start, end+1))) ;
+ }
+ currentText.setLength(0) ;
+ currentText.trimToSize() ;
+ }
+ }
+
+ private boolean isXMLWhitespace(final char ch)
+ {
+ return ((ch == ' ') || (ch == '\t') || (ch == '\r') || (ch == '\n')) ;
+ }
+
+ public Element getRootElement()
+ {
+ return rootElement ;
+ }
+}
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/internal/soa/esb/util/Node.java (from rev 29460, labs/jbossesb/trunk/product/rosetta/src/org/jboss/internal/soa/esb/util/Node.java)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/internal/soa/esb/util/Node.java (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/internal/soa/esb/util/Node.java 2009-09-28 09:19:01 UTC (rev 29483)
@@ -0,0 +1,31 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY 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 along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.internal.soa.esb.util;
+
+/**
+ * Simple Node tagging XML nodes.
+ *
+ * @author Kevin Conner
+ */
+public interface Node
+{
+}
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/internal/soa/esb/util/Text.java (from rev 29460, labs/jbossesb/trunk/product/rosetta/src/org/jboss/internal/soa/esb/util/Text.java)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/internal/soa/esb/util/Text.java (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/internal/soa/esb/util/Text.java 2009-09-28 09:19:01 UTC (rev 29483)
@@ -0,0 +1,72 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY 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 along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.internal.soa.esb.util;
+
+
+/**
+ * Simple class representing a text element.
+ * This is used to compare XML documents.
+ *
+ * @author Kevin Conner
+ */
+public class Text implements Node
+{
+ /**
+ * The text content.
+ */
+ private final String text ;
+
+ /**
+ * Construct the text element.
+ * @param text The text value.
+ */
+ Text(final String text)
+ {
+ this.text = text ;
+ }
+
+ /**
+ * Check for equality.
+ * @param obj the object to test against.
+ */
+ @Override
+ public boolean equals(final Object obj)
+ {
+ if (obj == null)
+ {
+ return false ;
+ }
+
+ if (obj == this)
+ {
+ return true ;
+ }
+
+ if (obj instanceof Text)
+ {
+ final Text rhs = (Text)obj ;
+ return (text.equals(rhs.text)) ;
+ }
+
+ return false ;
+ }
+}
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/internal/soa/esb/util/XMLHelper.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/internal/soa/esb/util/XMLHelper.java 2009-09-28 08:56:09 UTC (rev 29482)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/internal/soa/esb/util/XMLHelper.java 2009-09-28 09:19:01 UTC (rev 29483)
@@ -33,6 +33,9 @@
import java.net.URL;
import javax.xml.namespace.QName;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
import javax.xml.stream.XMLInputFactory;
import javax.xml.stream.XMLOutputFactory;
import javax.xml.stream.XMLStreamException;
@@ -50,6 +53,7 @@
import org.jboss.soa.esb.util.ClassUtil;
import org.jboss.util.StringPropertyReplacer;
import org.w3c.dom.ls.LSResourceResolver;
+import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
/**
@@ -318,6 +322,77 @@
return false ;
}
+ /**
+ * Compare the specified contents as XML.
+ * @param content1 The first content.
+ * @param content2 The second content.
+ * @return true if equals, false otherwise.
+ * @throws ParserConfigurationException
+ * @throws SAXException
+ * @throws IOException
+ */
+ public static boolean compareXMLContent(final InputStream content1, final InputStream content2)
+ throws ParserConfigurationException, SAXException, IOException
+ {
+ return compareXMLContent(new InputSource(content1), new InputSource(content2)) ;
+ }
+
+ /**
+ * Compare the specified contents as XML.
+ * @param content1 The first content.
+ * @param content2 The second content.
+ * @return true if equals, false otherwise.
+ * @throws ParserConfigurationException
+ * @throws SAXException
+ * @throws IOException
+ */
+ public static boolean compareXMLContent(final String content1, final String content2)
+ throws ParserConfigurationException, SAXException, IOException
+ {
+ return compareXMLContent(new StringReader(content1), new StringReader(content2)) ;
+ }
+
+ /**
+ * Compare the specified contents as XML.
+ * @param content1 The first content.
+ * @param content2 The second content.
+ * @return true if equals, false otherwise.
+ * @throws ParserConfigurationException
+ * @throws SAXException
+ * @throws IOException
+ */
+ public static boolean compareXMLContent(final Reader content1, final Reader content2)
+ throws ParserConfigurationException, SAXException, IOException
+ {
+ return compareXMLContent(new InputSource(content1), new InputSource(content2)) ;
+ }
+
+ /**
+ * Compare the specified contents as XML.
+ * @param content1 The first content.
+ * @param content2 The second content.
+ * @return true if equals, false otherwise.
+ * @throws ParserConfigurationException
+ * @throws SAXException
+ * @throws IOException
+ */
+ public static boolean compareXMLContent(final InputSource content1, final InputSource content2)
+ throws ParserConfigurationException, SAXException, IOException
+ {
+ final SAXParserFactory parserFactory = SAXParserFactory.newInstance() ;
+ parserFactory.setNamespaceAware(true) ;
+
+ final SAXParser parser = parserFactory.newSAXParser() ;
+
+ final IdentitySAXHandler handler1 = new IdentitySAXHandler() ;
+ parser.parse(content1, handler1) ;
+
+ final IdentitySAXHandler handler2 = new IdentitySAXHandler() ;
+ parser.parse(content2, handler2) ;
+
+ return (handler1.getRootElement().equals(handler2.getRootElement())) ;
+ }
+
private static SchemaFactory newSchemaFactory()
{
return SchemaFactory.newInstance( "http://www.w3.org/2001/XMLSchema" );
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/internal/soa/esb/webservice/ESBContractGenerator.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/internal/soa/esb/webservice/ESBContractGenerator.java 2009-09-28 08:56:09 UTC (rev 29482)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/internal/soa/esb/webservice/ESBContractGenerator.java 2009-09-28 09:19:01 UTC (rev 29483)
@@ -54,6 +54,7 @@
import javax.wsdl.extensions.soap.SOAPOperation;
import javax.wsdl.factory.WSDLFactory;
import javax.xml.namespace.QName;
+import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.Result;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerException;
@@ -61,7 +62,7 @@
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
-import org.custommonkey.xmlunit.XMLUnit;
+import org.jboss.internal.soa.esb.util.XMLHelper;
import org.jboss.soa.esb.ConfigurationException;
import org.jboss.soa.esb.Service;
import org.jboss.soa.esb.dom.YADOMUtil;
@@ -177,7 +178,7 @@
return sw.toString();
}
- private static void addSchema(Types types, Element xsdElement, Set<String> schemasAdded) throws SAXException, IOException, TransformerException {
+ private static void addSchema(Types types, Element xsdElement, Set<String> schemasAdded) throws SAXException, IOException, TransformerException, ParserConfigurationException {
if (add(xsdElement, schemasAdded))
{
SchemaImpl schemaImpl = new SchemaImpl();
@@ -201,7 +202,7 @@
return ClassUtil.getResourceAsStream(resource, ESBContractGenerator.class);
}
- private static boolean add(final Element schemaElement, final Set<String> schemasAdded) throws SAXException, IOException, TransformerException
+ private static boolean add(final Element schemaElement, final Set<String> schemasAdded) throws SAXException, IOException, TransformerException, ParserConfigurationException
{
TransformerFactory factory = TransformerFactory.newInstance();
Transformer transformer = factory.newTransformer();
@@ -215,20 +216,25 @@
}
else
{
- XMLUnit.setIgnoreWhitespace(true);
+ boolean addSchema = true ;
for (String existingType : schemasAdded)
{
- if (!XMLUnit.compareXML(existingType, newType).identical())
+ if (XMLHelper.compareXMLContent(existingType, newType))
{
- return schemasAdded.add(newType);
+ addSchema = false ;
+ break ;
}
}
+ if (addSchema)
+ {
+ return schemasAdded.add(newType);
+ }
}
return false;
}
- private static Message addMessage(Definition def, Element element, String msgName, String partName, int nsSuffixCounter, Set<String> schemasAdded) throws SAXException, IOException, TransformerException {
+ private static Message addMessage(Definition def, Element element, String msgName, String partName, int nsSuffixCounter, Set<String> schemasAdded) throws SAXException, IOException, TransformerException, ParserConfigurationException {
String schemaNs = YADOMUtil
.getAttribute(element, "targetNamespace", "");
addSchema(def.getTypes(), element, schemasAdded);
@@ -251,7 +257,7 @@
private static void addFaultMessage(final List<Message> faultMessages,
Definition def, Element element, String msgName, String partName,
- int nsSuffixCounter, Set<String> schemasAdded) throws SAXException, IOException, TransformerException {
+ int nsSuffixCounter, Set<String> schemasAdded) throws SAXException, IOException, TransformerException, ParserConfigurationException {
String schemaNs = YADOMUtil
.getAttribute(element, "targetNamespace", "");
addSchema(def.getTypes(), element, schemasAdded);
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/FtpListenerMapper.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/FtpListenerMapper.java 2009-09-28 08:56:09 UTC (rev 29482)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/FtpListenerMapper.java 2009-09-28 09:19:01 UTC (rev 29483)
@@ -20,6 +20,9 @@
package org.jboss.soa.esb.listeners.config.mappers;
+import java.net.URI;
+import java.net.URISyntaxException;
+
import org.jboss.soa.esb.ConfigurationException;
import org.jboss.soa.esb.addressing.eprs.FTPEpr;
import org.jboss.soa.esb.addressing.eprs.FTPSEpr;
@@ -111,16 +114,56 @@
*/
private static final String FTP_SEPARATOR = "/";
- private static void mapFtpEprProperties(Element toElement, FtpProvider provider, FtpMessageFilter messageFilter)
+ private static void mapFtpEprProperties(Element toElement, FtpProvider provider, FtpMessageFilter messageFilter)
+ throws ConfigurationException
{
String inputDir = messageFilter.getDirectory();
if ( ! inputDir.startsWith( FTP_SEPARATOR ) )
inputDir = FTP_SEPARATOR + inputDir;
final String filterPassword = messageFilter.getPassword() ;
- final String urlPassword = (filterPassword == null ? "" : ":" + filterPassword) ;
- toElement.setAttribute(ListenerTagNames.URL_TAG, messageFilter.getProtocol() + "://" + messageFilter.getUsername()
- + urlPassword + "@" + provider.getHostname() + inputDir );
+ final String username = encodeUsername(messageFilter.getUsername()) ;
+ final String userInfo = (filterPassword == null ? username : username + ":" + filterPassword) ;
+ final String origHostname = provider.getHostname() ;
+ final int colonLocation = origHostname.indexOf(':') ;
+ final String hostname ;
+ final int port ;
+ if (colonLocation > -1)
+ {
+ hostname = origHostname.substring(0, colonLocation) ;
+ final int portLocation = colonLocation+1 ;
+ if (portLocation < origHostname.length())
+ {
+ try
+ {
+ port = Integer.parseInt(origHostname.substring(portLocation)) ;
+ }
+ catch (final NumberFormatException nfe)
+ {
+ throw new ConfigurationException("Failed to parse port value") ;
+ }
+ }
+ else
+ {
+ port = -1 ;
+ }
+ }
+ else
+ {
+ hostname = origHostname ;
+ port = -1 ;
+ }
+ final URI uri ;
+ try
+ {
+ uri = new URI(messageFilter.getProtocol().toString(),
+ userInfo, hostname, port, inputDir, null, null) ;
+ }
+ catch (final URISyntaxException urise)
+ {
+ throw new ConfigurationException("Unexpected exception creating FTP URI, " + urise.getMessage()) ;
+ }
+ toElement.setAttribute(ListenerTagNames.URL_TAG, uri.toASCIIString());
toElement.setAttribute(FTPEpr.INPUT_SUFFIX_TAG, messageFilter.getInputSuffix());
toElement.setAttribute(FTPEpr.WORK_SUFFIX_TAG, messageFilter.getWorkSuffix());
toElement.setAttribute(FTPEpr.POST_DEL_TAG, String.valueOf(messageFilter.getPostDelete()));
@@ -143,4 +186,30 @@
toElement.setAttribute(FTPSEpr.CERTIFICATE_NAME_TAG, messageFilter.getCertificateName());
}
}
+
+ private static String encodeUsername(final String username)
+ {
+ if (username != null)
+ {
+ int colonPosn = username.indexOf(':') ;
+ if (colonPosn > -1)
+ {
+ int currentIndex = 0 ;
+ final StringBuilder sb = new StringBuilder() ;
+ while(colonPosn > 0)
+ {
+ sb.append(username.substring(currentIndex, colonPosn)) ;
+ sb.append("%3A") ;
+ currentIndex = colonPosn+1 ;
+ colonPosn = username.indexOf(':', currentIndex) ;
+ }
+ if (currentIndex < username.length())
+ {
+ sb.append(username.substring(currentIndex)) ;
+ }
+ return sb.toString() ;
+ }
+ }
+ return username ;
+ }
}
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/FtpListenerMapper.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/FtpListenerMapper.java 2009-09-28 08:56:09 UTC (rev 29482)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers110/FtpListenerMapper.java 2009-09-28 09:19:01 UTC (rev 29483)
@@ -20,6 +20,9 @@
package org.jboss.soa.esb.listeners.config.mappers110;
+import java.net.URI;
+import java.net.URISyntaxException;
+
import org.jboss.soa.esb.ConfigurationException;
import org.jboss.soa.esb.addressing.eprs.FTPEpr;
import org.jboss.soa.esb.addressing.eprs.FTPSEpr;
@@ -111,16 +114,56 @@
*/
private static final String FTP_SEPARATOR = "/";
- private static void mapFtpEprProperties(Element toElement, FtpProvider provider, FtpMessageFilter messageFilter)
+ private static void mapFtpEprProperties(Element toElement, FtpProvider provider, FtpMessageFilter messageFilter)
+ throws ConfigurationException
{
String inputDir = messageFilter.getDirectory();
if ( ! inputDir.startsWith( FTP_SEPARATOR ) )
inputDir = FTP_SEPARATOR + inputDir;
final String filterPassword = messageFilter.getPassword() ;
- final String urlPassword = (filterPassword == null ? "" : ":" + filterPassword) ;
- toElement.setAttribute(ListenerTagNames.URL_TAG, messageFilter.getProtocol() + "://" + messageFilter.getUsername()
- + urlPassword + "@" + provider.getHostname() + inputDir );
+ final String username = encodeUsername(messageFilter.getUsername()) ;
+ final String userInfo = (filterPassword == null ? username : username + ":" + filterPassword) ;
+ final String origHostname = provider.getHostname() ;
+ final int colonLocation = origHostname.indexOf(':') ;
+ final String hostname ;
+ final int port ;
+ if (colonLocation > -1)
+ {
+ hostname = origHostname.substring(0, colonLocation) ;
+ final int portLocation = colonLocation+1 ;
+ if (portLocation < origHostname.length())
+ {
+ try
+ {
+ port = Integer.parseInt(origHostname.substring(portLocation)) ;
+ }
+ catch (final NumberFormatException nfe)
+ {
+ throw new ConfigurationException("Failed to parse port value") ;
+ }
+ }
+ else
+ {
+ port = -1 ;
+ }
+ }
+ else
+ {
+ hostname = origHostname ;
+ port = -1 ;
+ }
+ final URI uri ;
+ try
+ {
+ uri = new URI(messageFilter.getProtocol().toString(),
+ userInfo, hostname, port, inputDir, null, null) ;
+ }
+ catch (final URISyntaxException urise)
+ {
+ throw new ConfigurationException("Unexpected exception creating FTP URI, " + urise.getMessage()) ;
+ }
+ toElement.setAttribute(ListenerTagNames.URL_TAG, uri.toASCIIString());
toElement.setAttribute(FTPEpr.INPUT_SUFFIX_TAG, messageFilter.getInputSuffix());
toElement.setAttribute(FTPEpr.WORK_SUFFIX_TAG, messageFilter.getWorkSuffix());
toElement.setAttribute(FTPEpr.POST_DEL_TAG, String.valueOf(messageFilter.getPostDelete()));
@@ -145,4 +188,30 @@
toElement.setAttribute(FTPSEpr.CERTIFICATE_NAME_TAG, messageFilter.getCertificateName());
}
}
+
+ private static String encodeUsername(final String username)
+ {
+ if (username != null)
+ {
+ int colonPosn = username.indexOf(':') ;
+ if (colonPosn > -1)
+ {
+ int currentIndex = 0 ;
+ final StringBuilder sb = new StringBuilder() ;
+ while(colonPosn > 0)
+ {
+ sb.append(username.substring(currentIndex, colonPosn)) ;
+ sb.append("%3A") ;
+ currentIndex = colonPosn+1 ;
+ colonPosn = username.indexOf(':', currentIndex) ;
+ }
+ if (currentIndex < username.length())
+ {
+ sb.append(username.substring(currentIndex)) ;
+ }
+ return sb.toString() ;
+ }
+ }
+ return username ;
+ }
}
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers120/FtpListenerMapper.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers120/FtpListenerMapper.java 2009-09-28 08:56:09 UTC (rev 29482)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers120/FtpListenerMapper.java 2009-09-28 09:19:01 UTC (rev 29483)
@@ -20,6 +20,9 @@
package org.jboss.soa.esb.listeners.config.mappers120;
+import java.net.URI;
+import java.net.URISyntaxException;
+
import org.jboss.soa.esb.ConfigurationException;
import org.jboss.soa.esb.addressing.eprs.FTPEpr;
import org.jboss.soa.esb.addressing.eprs.FTPSEpr;
@@ -112,15 +115,55 @@
private static final String FTP_SEPARATOR = "/";
private static void mapFtpEprProperties(Element toElement, FtpProvider provider, FtpMessageFilter messageFilter)
+ throws ConfigurationException
{
String inputDir = messageFilter.getDirectory();
if ( ! inputDir.startsWith( FTP_SEPARATOR ) )
inputDir = FTP_SEPARATOR + inputDir;
final String filterPassword = messageFilter.getPassword() ;
- final String urlPassword = (filterPassword == null ? "" : ":" + filterPassword) ;
- toElement.setAttribute(ListenerTagNames.URL_TAG, messageFilter.getProtocol() + "://" + messageFilter.getUsername()
- + urlPassword + "@" + provider.getHostname() + inputDir );
+ final String username = encodeUsername(messageFilter.getUsername()) ;
+ final String userInfo = (filterPassword == null ? username : username + ":" + filterPassword) ;
+ final String origHostname = provider.getHostname() ;
+ final int colonLocation = origHostname.indexOf(':') ;
+ final String hostname ;
+ final int port ;
+ if (colonLocation > -1)
+ {
+ hostname = origHostname.substring(0, colonLocation) ;
+ final int portLocation = colonLocation+1 ;
+ if (portLocation < origHostname.length())
+ {
+ try
+ {
+ port = Integer.parseInt(origHostname.substring(portLocation)) ;
+ }
+ catch (final NumberFormatException nfe)
+ {
+ throw new ConfigurationException("Failed to parse port value") ;
+ }
+ }
+ else
+ {
+ port = -1 ;
+ }
+ }
+ else
+ {
+ hostname = origHostname ;
+ port = -1 ;
+ }
+ final URI uri ;
+ try
+ {
+ uri = new URI(messageFilter.getProtocol().toString(),
+ userInfo, hostname, port, inputDir, null, null) ;
+ }
+ catch (final URISyntaxException urise)
+ {
+ throw new ConfigurationException("Unexpected exception creating FTP URI, " + urise.getMessage()) ;
+ }
+ toElement.setAttribute(ListenerTagNames.URL_TAG, uri.toASCIIString());
toElement.setAttribute(FTPEpr.INPUT_SUFFIX_TAG, messageFilter.getInputSuffix());
toElement.setAttribute(FTPEpr.WORK_SUFFIX_TAG, messageFilter.getWorkSuffix());
toElement.setAttribute(FTPEpr.POST_DEL_TAG, String.valueOf(messageFilter.getPostDelete()));
@@ -145,4 +188,30 @@
toElement.setAttribute(FTPSEpr.CERTIFICATE_NAME_TAG, messageFilter.getCertificateName());
}
}
-}
\ No newline at end of file
+
+ private static String encodeUsername(final String username)
+ {
+ if (username != null)
+ {
+ int colonPosn = username.indexOf(':') ;
+ if (colonPosn > -1)
+ {
+ int currentIndex = 0 ;
+ final StringBuilder sb = new StringBuilder() ;
+ while(colonPosn > 0)
+ {
+ sb.append(username.substring(currentIndex, colonPosn)) ;
+ sb.append("%3A") ;
+ currentIndex = colonPosn+1 ;
+ colonPosn = username.indexOf(':', currentIndex) ;
+ }
+ if (currentIndex < username.length())
+ {
+ sb.append(username.substring(currentIndex)) ;
+ }
+ return sb.toString() ;
+ }
+ }
+ return username ;
+ }
+}
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/JBossRemotingGatewayListener.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/JBossRemotingGatewayListener.java 2009-09-28 08:56:09 UTC (rev 29482)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/JBossRemotingGatewayListener.java 2009-09-28 09:19:01 UTC (rev 29483)
@@ -593,8 +593,9 @@
AuthenticationRequest authRequest = jbrHttpSecurityExtractor.extractSecurityInfo(properties);
// Extract any ws security information that may exist
- if ( authRequest == null ) {
- authRequest = wsSecurityExtractor.extractSecurityInfo((String) invocationRequest.getParameter());
+ Object payload = invocationRequest.getParameter();
+ if ( authRequest == null && payload instanceof String) {
+ authRequest = wsSecurityExtractor.extractSecurityInfo((String) payload);
}
if ( authRequest != null ) {
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/internal/soa/esb/listeners/war/WebDeploymentArchiveUnitTest.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/internal/soa/esb/listeners/war/WebDeploymentArchiveUnitTest.java 2009-09-28 08:56:09 UTC (rev 29482)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/internal/soa/esb/listeners/war/WebDeploymentArchiveUnitTest.java 2009-09-28 09:19:01 UTC (rev 29483)
@@ -22,41 +22,35 @@
package org.jboss.internal.soa.esb.listeners.war;
import junit.framework.TestCase;
-import freemarker.template.TemplateException;
-import org.custommonkey.xmlunit.XMLUnit;
-import org.custommonkey.xmlunit.XMLAssert;
-import org.xml.sax.SAXException;
-import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.internal.soa.esb.util.StreamUtils;
+import org.jboss.internal.soa.esb.util.XMLHelper;
+import org.jboss.soa.esb.util.ClassUtil;
-import java.io.StringReader;
-import java.io.InputStreamReader;
-import java.io.IOException;
-
/**
* @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
*/
public class WebDeploymentArchiveUnitTest extends TestCase {
- public void test_empty() throws TemplateException, IOException, SAXException {
+ public void test_empty() throws Exception {
WebDeploymentArchive modelArch = new WebDeploymentArchive("testarch.esb");
String webXML = modelArch.getWebXML();
- XMLUnit.setIgnoreWhitespace(true);
- XMLAssert.assertXMLEqual(new InputStreamReader(getClass().getResourceAsStream("empty.xml")), new StringReader(webXML));
+ String expected = StreamUtils.readStreamString(ClassUtil.getResourceAsStream("empty.xml", getClass()), "UTF-8") ;
+ assertTrue("XML comparison", XMLHelper.compareXMLContent(expected, webXML)) ;
}
- public void test_plain_servlet() throws TemplateException, IOException, SAXException {
+ public void test_plain_servlet() throws Exception {
WebDeploymentArchive modelArch = new WebDeploymentArchive("testarch.esb");
Servlet servlet = new Servlet("servletX", "com.acme.XServlet", modelArch.getWebModel());
servlet.getUrlMappings().add("/x/*");
String webXML = modelArch.getWebXML();
- XMLUnit.setIgnoreWhitespace(true);
- XMLAssert.assertXMLEqual(new InputStreamReader(getClass().getResourceAsStream("plain_servlet.xml")), new StringReader(webXML));
+ String expected = StreamUtils.readStreamString(ClassUtil.getResourceAsStream("plain_servlet.xml", getClass()), "UTF-8") ;
+ assertTrue("XML comparison", XMLHelper.compareXMLContent(expected, webXML)) ;
}
- public void test_plain_servlet_and_filter() throws TemplateException, IOException, SAXException {
+ public void test_plain_servlet_and_filter() throws Exception{
WebDeploymentArchive modelArch = new WebDeploymentArchive("testarch.esb");
Servlet servlet = new Servlet("servletX", "com.acme.XServlet", modelArch.getWebModel());
@@ -66,12 +60,11 @@
new Filter("servletXFilter", "com.acme.XServletFilter", servlet);
String webXML = modelArch.getWebXML();
- //System.out.println(webXML);
- XMLUnit.setIgnoreWhitespace(true);
- XMLAssert.assertXMLEqual(new InputStreamReader(getClass().getResourceAsStream("plain_servlet_and_filter.xml")), new StringReader(webXML));
+ String expected = StreamUtils.readStreamString(ClassUtil.getResourceAsStream("plain_servlet_and_filter.xml", getClass()), "UTF-8") ;
+ assertTrue("XML comparison", XMLHelper.compareXMLContent(expected, webXML)) ;
}
- public void test_with_method_constraints_no_roles() throws TemplateException, IOException, SAXException {
+ public void test_with_method_constraints_no_roles() throws Exception {
WebDeploymentArchive modelArch = new WebDeploymentArchive("testarch.esb");
Servlet servlet = new Servlet("servletX", "com.acme.XServlet", modelArch.getWebModel());
SecurityConstraints securityConstraints = new SecurityConstraints(servlet);
@@ -83,12 +76,11 @@
securityConstraints.getProtectedMethods().add("DELETE");
String webXML = modelArch.getWebXML();
- //System.out.println(webXML);
- XMLUnit.setIgnoreWhitespace(true);
- XMLAssert.assertXMLEqual(new InputStreamReader(getClass().getResourceAsStream("with_method_constraints_no_roles.xml")), new StringReader(webXML));
+ String expected = StreamUtils.readStreamString(ClassUtil.getResourceAsStream("with_method_constraints_no_roles.xml", getClass()), "UTF-8") ;
+ assertTrue("XML comparison", XMLHelper.compareXMLContent(expected, webXML)) ;
}
- public void test_with_role_constraints_no_methods() throws TemplateException, IOException, SAXException {
+ public void test_with_role_constraints_no_methods() throws Exception {
WebDeploymentArchive modelArch = new WebDeploymentArchive("testarch.esb");
Servlet servlet = new Servlet("servletX", "com.acme.XServlet", modelArch.getWebModel());
SecurityConstraints securityConstraints = new SecurityConstraints(servlet);
@@ -99,12 +91,11 @@
securityConstraints.getAllowedRoles().add("accountant");
String webXML = modelArch.getWebXML();
- //System.out.println(webXML);
- XMLUnit.setIgnoreWhitespace(true);
- XMLAssert.assertXMLEqual(new InputStreamReader(getClass().getResourceAsStream("with_role_constraints_no_methods.xml")), new StringReader(webXML));
+ String expected = StreamUtils.readStreamString(ClassUtil.getResourceAsStream("with_role_constraints_no_methods.xml", getClass()), "UTF-8") ;
+ assertTrue("XML comparison", XMLHelper.compareXMLContent(expected, webXML)) ;
}
- public void test_with_role_constraints_no_methods_with_guarantee() throws TemplateException, IOException, SAXException {
+ public void test_with_role_constraints_no_methods_with_guarantee() throws Exception {
WebDeploymentArchive modelArch = new WebDeploymentArchive("testarch.esb");
Servlet servlet = new Servlet("servletX", "com.acme.XServlet", modelArch.getWebModel());
SecurityConstraints securityConstraints = new SecurityConstraints(servlet);
@@ -117,40 +108,35 @@
securityConstraints.setTransportGuarantee("INTEGRAL");
String webXML = modelArch.getWebXML();
- //System.out.println(webXML);
- XMLUnit.setIgnoreWhitespace(true);
- XMLAssert.assertXMLEqual(new InputStreamReader(getClass().getResourceAsStream("with_role_constraints_no_methods_with_guarantee.xml")), new StringReader(webXML));
+ String expected = StreamUtils.readStreamString(ClassUtil.getResourceAsStream("with_role_constraints_no_methods_with_guarantee.xml", getClass()), "UTF-8") ;
+ assertTrue("XML comparison", XMLHelper.compareXMLContent(expected, webXML)) ;
}
- public void test_with_authmethod() throws TemplateException, IOException, SAXException, ConfigurationException {
+ public void test_with_authmethod() throws Exception {
WebDeploymentArchive modelArch = new WebDeploymentArchive("testarch.esb");
modelArch.getWebModel().setAuthMethod("BASIC");
String webXML = modelArch.getWebXML();
- //System.out.println(webXML);
- XMLUnit.setIgnoreWhitespace(true);
- XMLAssert.assertXMLEqual(new InputStreamReader(getClass().getResourceAsStream("with_authmethod_webxml.xml")), new StringReader(webXML));
+ String webExpected = StreamUtils.readStreamString(ClassUtil.getResourceAsStream("with_authmethod_webxml.xml", getClass()), "UTF-8") ;
+ assertTrue("XML comparison", XMLHelper.compareXMLContent(webExpected, webXML)) ;
String jbossWebXML = modelArch.getJBossWebXML();
- //System.out.println(jbossWebXML);
- XMLUnit.setIgnoreWhitespace(true);
- XMLAssert.assertXMLEqual(new InputStreamReader(getClass().getResourceAsStream("with_authmethod_jbosswebxml.xml")), new StringReader(jbossWebXML));
+ String jbossWebExpected = StreamUtils.readStreamString(ClassUtil.getResourceAsStream("with_authmethod_jbosswebxml.xml", getClass()), "UTF-8") ;
+ assertTrue("XML comparison", XMLHelper.compareXMLContent(jbossWebExpected, jbossWebXML)) ;
}
- public void test_with_authdomain() throws TemplateException, IOException, SAXException, ConfigurationException {
+ public void test_with_authdomain() throws Exception {
WebDeploymentArchive modelArch = new WebDeploymentArchive("testarch.esb");
modelArch.getWebModel().setAuthDomain("java:/jaas/JBossWS");
String webXML = modelArch.getWebXML();
- //System.out.println(webXML);
- XMLUnit.setIgnoreWhitespace(true);
- XMLAssert.assertXMLEqual(new InputStreamReader(getClass().getResourceAsStream("with_authdomain_webxml.xml")), new StringReader(webXML));
+ String webExpected = StreamUtils.readStreamString(ClassUtil.getResourceAsStream("with_authdomain_webxml.xml", getClass()), "UTF-8") ;
+ assertTrue("XML comparison", XMLHelper.compareXMLContent(webExpected, webXML)) ;
String jbossWebXML = modelArch.getJBossWebXML();
- //System.out.println(jbossWebXML);
- XMLUnit.setIgnoreWhitespace(true);
- XMLAssert.assertXMLEqual(new InputStreamReader(getClass().getResourceAsStream("with_authdomain_jbosswebxml.xml")), new StringReader(jbossWebXML));
+ String jbossWebExpected = StreamUtils.readStreamString(ClassUtil.getResourceAsStream("with_authdomain_jbosswebxml.xml", getClass()), "UTF-8") ;
+ assertTrue("XML comparison", XMLHelper.compareXMLContent(jbossWebExpected, jbossWebXML)) ;
}
}
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/internal/soa/esb/util/XMLHelperUnitTest.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/internal/soa/esb/util/XMLHelperUnitTest.java 2009-09-28 08:56:09 UTC (rev 29482)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/internal/soa/esb/util/XMLHelperUnitTest.java 2009-09-28 09:19:01 UTC (rev 29483)
@@ -35,7 +35,6 @@
import junit.framework.JUnit4TestAdapter;
import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.testutils.StringUtils;
import org.junit.Test;
import org.xml.sax.SAXException;
@@ -71,7 +70,7 @@
final String expectedContents = StreamUtils.getResourceAsString("replaceSystemProperties_expected.xml", encoding) ;
- final boolean match = StringUtils.compareXMLContent(expectedContents, contents) ;
+ final boolean match = XMLHelper.compareXMLContent(expectedContents, contents) ;
assertTrue("System property replacement", match) ;
}
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/actions/converters/ObjectToXStreamUnitTest.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/actions/converters/ObjectToXStreamUnitTest.java 2009-09-28 08:56:09 UTC (rev 29482)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/actions/converters/ObjectToXStreamUnitTest.java 2009-09-28 09:19:01 UTC (rev 29483)
@@ -22,21 +22,17 @@
package org.jboss.soa.esb.actions.converters;
-import static org.custommonkey.xmlunit.XMLAssert.assertXMLEqual;
-
-import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import junit.framework.TestCase;
-import org.custommonkey.xmlunit.XMLUnit;
+import org.jboss.internal.soa.esb.util.XMLHelper;
import org.jboss.soa.esb.actions.ActionProcessingException;
import org.jboss.soa.esb.actions.TestBean;
import org.jboss.soa.esb.helpers.ConfigTree;
import org.jboss.soa.esb.message.Message;
import org.jboss.soa.esb.message.format.MessageFactory;
-import org.xml.sax.SAXException;
import com.thoughtworks.xstream.XStream;
import com.thoughtworks.xstream.io.xml.DomDriver;
@@ -128,7 +124,7 @@
assertTrue( xml.contains( "TomsClass xmlns=\"" + ns ));
}
- public void test_with_alias() throws ActionProcessingException, SAXException, IOException {
+ public void test_with_alias() throws Exception {
XStreamConfigBuilder builder = new XStreamConfigBuilder();
builder.alias("TomsClass", TestBean.class.getName());
ObjectToXStream objectToXStream = new ObjectToXStream(builder.build());
@@ -139,10 +135,10 @@
String expectedXml = "<TomsClass><name>Tom</name><phone>1234</phone></TomsClass>";
String actualXml = (String) message.getBody().get();
- assertXMLEqual(expectedXml, actualXml);
+ assertTrue("XML comparison", XMLHelper.compareXMLContent(expectedXml, actualXml));
}
- public void test_with_fieldAlias() throws ActionProcessingException, SAXException, IOException {
+ public void test_with_fieldAlias() throws Exception {
XStreamConfigBuilder builder = new XStreamConfigBuilder();
builder.alias("TomsClass", TestBean.class.getName());
builder.fieldAlias("firstName", TestBean.class, "name");
@@ -154,10 +150,10 @@
String expectedXml = "<TomsClass><firstName>Tom</firstName><phone>1234</phone></TomsClass>";
String actualXml = (String) message.getBody().get();
- assertXMLEqual(expectedXml, actualXml);
+ assertTrue("XML comparison", XMLHelper.compareXMLContent(expectedXml, actualXml));
}
- public void test_with_implicitCollection() throws ActionProcessingException, SAXException, IOException {
+ public void test_with_implicitCollection() throws Exception {
XStreamConfigBuilder builder = new XStreamConfigBuilder();
builder.classAlias("TomsClass");
builder.implicitCollection(TestBean.class.getName(), "addresses", "address", String.class.getName());
@@ -175,10 +171,10 @@
String expectedXml = "<TomsClass><name>Tom</name><phone>1234</phone><address>street1</address><address>street2</address></TomsClass>";
String actualXml = (String) message.getBody().get();
- assertXMLEqual(expectedXml, actualXml);
+ assertTrue("XML comparison", XMLHelper.compareXMLContent(expectedXml, actualXml));
}
- public void test_with_converter() throws ActionProcessingException, SAXException, IOException {
+ public void test_with_converter() throws Exception {
XStreamConfigBuilder builder = new XStreamConfigBuilder();
builder.classAlias("comments");
builder.incomingType(Comment.class.getName());
@@ -193,12 +189,6 @@
String expectedXml = "<comments><comment>some comment</comment></comments>";
String actualXml = (String) message.getBody().get();
- assertXMLEqual(expectedXml, actualXml);
+ assertTrue("XML comparison", XMLHelper.compareXMLContent(expectedXml, actualXml));
}
-
- public void setUp()
- {
- XMLUnit.setIgnoreWhitespace(true);
- }
-
}
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/actions/transformation/xslt/XsltActionUnitTest.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/actions/transformation/xslt/XsltActionUnitTest.java 2009-09-28 08:56:09 UTC (rev 29482)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/actions/transformation/xslt/XsltActionUnitTest.java 2009-09-28 09:19:01 UTC (rev 29483)
@@ -41,9 +41,8 @@
import junit.framework.JUnit4TestAdapter;
-import org.custommonkey.xmlunit.XMLAssert;
-import org.custommonkey.xmlunit.XMLUnit;
import org.jboss.internal.soa.esb.util.StreamUtils;
+import org.jboss.internal.soa.esb.util.XMLHelper;
import org.jboss.soa.esb.ConfigurationException;
import org.jboss.soa.esb.actions.ActionLifecycleException;
import org.jboss.soa.esb.actions.ActionProcessingException;
@@ -51,7 +50,6 @@
import org.jboss.soa.esb.helpers.ConfigTree;
import org.jboss.soa.esb.message.Message;
import org.jboss.soa.esb.message.format.MessageFactory;
-import org.junit.BeforeClass;
import org.junit.Test;
import org.xml.sax.SAXException;
@@ -66,18 +64,13 @@
private static final String TEST_XSL_1 = PACKAGE_PATH + "/test1.xsl";
private static final String TEST_XML_1 = PACKAGE_PATH + "/example1.xml";
- @BeforeClass public static void before()
- {
- XMLUnit.setIgnoreWhitespace(true);
- }
-
@Test (expected = ConfigurationException.class)
public void shouldThrowIfNoTemplateIsConfigured() throws ConfigurationException
{
new XsltAction(new ConfigTree("xslttest"));
}
- @Test public void processXsltString() throws ConfigurationException, ActionProcessingException, ActionLifecycleException, SAXException, IOException
+ @Test public void processXsltString() throws Exception
{
final XsltAction action = new XsltAction(new ConfigBuilder().templateFile(TEST_XSL_1).resultType(ResultType.STRING).build());
action.initialise();
@@ -88,7 +81,8 @@
message.getBody().add(xml);
Message processed = action.process(message);
- XMLAssert.assertXMLEqual("<xxx/>", (String) processed.getBody().get());
+
+ assertTrue("XML Comparison", XMLHelper.compareXMLContent("<xxx/>", (String) processed.getBody().get()));
}
@Test public void extractFeatures() throws ConfigurationException, ActionProcessingException, ActionLifecycleException, SAXException, IOException
@@ -140,7 +134,7 @@
assertEquals(MockUriResolver.class.getName(), resolver.getClass().getName());
}
- @Test public void processFileSource() throws ConfigurationException, ActionLifecycleException, ActionProcessingException, SAXException, IOException
+ @Test public void processFileSource() throws Exception
{
final XsltAction action = new XsltAction(new ConfigBuilder().resultType(ResultType.STRING).templateFile(TEST_XSL_1).build());
action.initialise();
@@ -151,10 +145,10 @@
message.getBody().add(xmlFile);
final Message processed = action.process(message);
- XMLAssert.assertXMLEqual("<xxx/>", (String) processed.getBody().get());
+ assertTrue("XML Comparison", XMLHelper.compareXMLContent("<xxx/>", (String) processed.getBody().get()));
}
- @Test public void processStringSource() throws ConfigurationException, ActionLifecycleException, ActionProcessingException, SAXException, IOException
+ @Test public void processStringSource() throws Exception
{
final XsltAction action = new XsltAction(new ConfigBuilder().resultType(ResultType.STRING).templateFile(TEST_XSL_1).build());
action.initialise();
@@ -164,10 +158,10 @@
message.getBody().add(xml);
final Message processed = action.process(message);
- XMLAssert.assertXMLEqual("<xxx/>", (String) processed.getBody().get());
+ assertTrue("XML Comparison", XMLHelper.compareXMLContent("<xxx/>", (String) processed.getBody().get()));
}
- @Test public void processInputStreamSource() throws ConfigurationException, ActionLifecycleException, ActionProcessingException, SAXException, IOException
+ @Test public void processInputStreamSource() throws Exception
{
final XsltAction action = new XsltAction(new ConfigBuilder().resultType(ResultType.STRING).templateFile(TEST_XSL_1).build());
action.initialise();
@@ -177,15 +171,15 @@
message.getBody().add(inputStream);
final Message processed = action.process(message);
- XMLAssert.assertXMLEqual("<xxx/>", (String) processed.getBody().get());
+ assertTrue("XML Comparison", XMLHelper.compareXMLContent("<xxx/>", (String) processed.getBody().get()));
}
- @Test public void processReaderSource() throws ConfigurationException, ActionLifecycleException, ActionProcessingException, SAXException, IOException
+ @Test public void processReaderSource() throws Exception
{
processOneReaderSource();
}
- @Test public void processMultipleReaderSource() throws ConfigurationException, ActionLifecycleException, ActionProcessingException, SAXException, IOException
+ @Test public void processMultipleReaderSource() throws Exception
{
for (int i = 0; i < 100; i++)
{
@@ -193,7 +187,7 @@
}
}
- private void processOneReaderSource() throws ConfigurationException, ActionLifecycleException, ActionProcessingException, SAXException, IOException
+ private void processOneReaderSource() throws Exception
{
final XsltAction action = new XsltAction(new ConfigBuilder().resultType(ResultType.STRING).templateFile(TEST_XSL_1).build());
action.initialise();
@@ -204,10 +198,10 @@
message.getBody().add(streamSource);
final Message processed = action.process(message);
- XMLAssert.assertXMLEqual("<xxx/>", (String) processed.getBody().get());
+ assertTrue("XML Comparison", XMLHelper.compareXMLContent("<xxx/>", (String) processed.getBody().get()));
}
- @Test public void processSourceResult() throws ConfigurationException, ActionLifecycleException, ActionProcessingException, SAXException, IOException
+ @Test public void processSourceResult() throws Exception
{
final XsltAction action = new XsltAction(new ConfigBuilder().resultType(ResultType.SOURCERESULT).templateFile(TEST_XSL_1).build());
action.initialise();
@@ -224,7 +218,7 @@
Object object = processed.getBody().get();
assertTrue(object instanceof StreamResult);
- XMLAssert.assertXMLEqual("<xxx/>", ((StreamResult) processed.getBody().get()).getWriter().toString());
+ assertTrue("XML Comparison", XMLHelper.compareXMLContent("<xxx/>", ((StreamResult) processed.getBody().get()).getWriter().toString()));
}
public static class MockUriResolver implements URIResolver
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/ScheduledListenerUnitTest.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/ScheduledListenerUnitTest.java 2009-09-28 08:56:09 UTC (rev 29482)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/ScheduledListenerUnitTest.java 2009-09-28 09:19:01 UTC (rev 29483)
@@ -29,13 +29,13 @@
import junit.framework.JUnit4TestAdapter;
import org.jboss.internal.soa.esb.util.StreamUtils;
+import org.jboss.internal.soa.esb.util.XMLHelper;
import org.jboss.soa.esb.ConfigurationException;
import org.jboss.soa.esb.helpers.ConfigTree;
import org.jboss.soa.esb.message.Message;
import org.jboss.soa.esb.schedule.MockScheduledEventMessageComposer;
import org.jboss.soa.esb.schedule.SchedulingException;
import org.jboss.soa.esb.testutils.ESBConfigUtil;
-import org.jboss.soa.esb.testutils.StringUtils;
import org.junit.Test;
import org.xml.sax.SAXException;
@@ -51,7 +51,7 @@
String actualListenerConfig = configUtil.getListenerConfig("simple-schedule-listener").toXml();
String expectedListenerConfig = StreamUtils.readStreamString(getClass().getResourceAsStream("scheduled-listener-config-configtree.xml"), "UTF-8");
- assertTrue("Service configuration", StringUtils.compareXMLContent(expectedListenerConfig, actualListenerConfig));
+ assertTrue("Service configuration", XMLHelper.compareXMLContent(expectedListenerConfig, actualListenerConfig));
}
@Test
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/FtpListenerMapperUnitTest.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/FtpListenerMapperUnitTest.java 2009-09-28 08:56:09 UTC (rev 29482)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/FtpListenerMapperUnitTest.java 2009-09-28 09:19:01 UTC (rev 29483)
@@ -27,12 +27,14 @@
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
+import java.net.URI;
import java.util.List;
import org.apache.log4j.Logger;
import org.apache.xmlbeans.XmlException;
import org.jboss.soa.esb.ConfigurationException;
import org.jboss.soa.esb.dom.YADOMUtil;
+import org.jboss.soa.esb.listeners.ListenerTagNames;
import org.jboss.soa.esb.listeners.config.xbeanmodel101.FtpListenerDocument;
import org.jboss.soa.esb.listeners.config.xbeanmodel101.Listener;
import org.jboss.soa.esb.listeners.config.xbeanmodel101.FtpBusDocument;
@@ -43,6 +45,7 @@
import org.w3c.dom.Element;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
/**
* Tests the class FtpListenerMapper
@@ -56,6 +59,7 @@
private Logger log = Logger.getLogger(FtpListenerMapperUnitTest.class);
private static final String ESB_CONFIG_READ_ONLY = "jbossesb_config_readonly.xml";
+ private static final String ESB_CONFIG_ESCAPING = "jbossesb_config_escaping.xml";
private static final String GATEWAY_CLASS_ATTRIBUTE = "gatewayClass";
@@ -84,9 +88,31 @@
assertEquals( ReadOnlyRemoteGatewayListener.class.getName(), gatewayClass.getNodeValue() );
}
+ @Test
+ public void testEscaping() throws Exception
+ {
+ final XMLBeansModel model = getXmlBeanModel( ESB_CONFIG_ESCAPING );
+ final GatewayGenerator gatewayGenerator = new GatewayGenerator(model);
+ final Document gatewayConfig = gatewayGenerator.generate();
+ final Element root = gatewayConfig.getDocumentElement() ;
+ final NodeList listenerList = root.getElementsByTagName("listener") ;
+ assertEquals("Listener count", 1, listenerList.getLength()) ;
+ final Node listener = listenerList.item(0) ;
+ final NamedNodeMap attributes = listener.getAttributes() ;
+ final Node urlNode = attributes.getNamedItem(ListenerTagNames.URL_TAG) ;
+ assertNotNull("URL node", urlNode) ;
+ final String urlValue = urlNode.getNodeValue() ;
+ assertNotNull("URL value", urlValue) ;
+ final URI uri = new URI(urlValue) ;
+ assertEquals("host", "localhost", uri.getHost()) ;
+ assertEquals("port", 21, uri.getPort()) ;
+ assertEquals("path", "/directory/####", uri.getPath()) ;
+ assertEquals("userInfo", "user%3A##user:password:##password", uri.getUserInfo()) ;
+ }
+
private XMLBeansModel getXmlBeanModel( String fileName ) throws ConfigurationException, IOException, XmlException
{
- InputStream inputStream = getClass().getResourceAsStream( ESB_CONFIG_READ_ONLY );
+ InputStream inputStream = getClass().getResourceAsStream( fileName );
final Reader reader = new InputStreamReader(inputStream);
XMLBeansModel model = new XMLBeansModel(Factory.parse(reader).getJbossesb());
return model;
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_config_escaping.xml (from rev 29460, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_config_escaping.xml)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_config_escaping.xml (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers/jbossesb_config_escaping.xml 2009-09-28 09:19:01 UTC (rev 29483)
@@ -0,0 +1,18 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd">
+ <providers>
+ <ftp-provider name="FTP" hostname="localhost:21">
+ <ftp-bus busid="FTPbus">
+ <ftp-message-filter directory="/directory/####" username="user:##user" password="password:##password"/>
+ </ftp-bus>
+ </ftp-provider>
+ </providers>
+
+ <services>
+ <service category="Test" name="FTPTest" description="FTP escaping Test">
+ <listeners>
+ <ftp-listener name="FtpMapperListener" busidref="FTPbus" is-gateway="true"/>
+ </listeners>
+ </service>
+ </services>
+</jbossesb>
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/FtpListenerMapperUnitTest.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/FtpListenerMapperUnitTest.java 2009-09-28 08:56:09 UTC (rev 29482)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/FtpListenerMapperUnitTest.java 2009-09-28 09:19:01 UTC (rev 29483)
@@ -27,12 +27,14 @@
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
+import java.net.URI;
import java.util.List;
import org.apache.log4j.Logger;
import org.apache.xmlbeans.XmlException;
import org.jboss.soa.esb.ConfigurationException;
import org.jboss.soa.esb.dom.YADOMUtil;
+import org.jboss.soa.esb.listeners.ListenerTagNames;
import org.jboss.soa.esb.listeners.config.xbeanmodel110.FtpListenerDocument;
import org.jboss.soa.esb.listeners.config.xbeanmodel110.Listener;
import org.jboss.soa.esb.listeners.config.xbeanmodel110.FtpBusDocument;
@@ -43,6 +45,7 @@
import org.w3c.dom.Element;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
/**
* Tests the class FtpListenerMapper
@@ -56,6 +59,7 @@
private Logger log = Logger.getLogger(FtpListenerMapperUnitTest.class);
private static final String ESB_CONFIG_READ_ONLY = "jbossesb_config_readonly.xml";
+ private static final String ESB_CONFIG_ESCAPING = "jbossesb_config_escaping.xml";
private static final String GATEWAY_CLASS_ATTRIBUTE = "gatewayClass";
@@ -84,9 +88,31 @@
assertEquals( ReadOnlyRemoteGatewayListener.class.getName(), gatewayClass.getNodeValue() );
}
+ @Test
+ public void testEscaping() throws Exception
+ {
+ final XMLBeansModel model = getXmlBeanModel( ESB_CONFIG_ESCAPING );
+ final GatewayGenerator gatewayGenerator = new GatewayGenerator(model);
+ final Document gatewayConfig = gatewayGenerator.generate();
+ final Element root = gatewayConfig.getDocumentElement() ;
+ final NodeList listenerList = root.getElementsByTagName("listener") ;
+ assertEquals("Listener count", 1, listenerList.getLength()) ;
+ final Node listener = listenerList.item(0) ;
+ final NamedNodeMap attributes = listener.getAttributes() ;
+ final Node urlNode = attributes.getNamedItem(ListenerTagNames.URL_TAG) ;
+ assertNotNull("URL node", urlNode) ;
+ final String urlValue = urlNode.getNodeValue() ;
+ assertNotNull("URL value", urlValue) ;
+ final URI uri = new URI(urlValue) ;
+ assertEquals("host", "localhost", uri.getHost()) ;
+ assertEquals("port", 21, uri.getPort()) ;
+ assertEquals("path", "/directory/####", uri.getPath()) ;
+ assertEquals("userInfo", "user%3A##user:password:##password", uri.getUserInfo()) ;
+ }
+
private XMLBeansModel getXmlBeanModel( String fileName ) throws ConfigurationException, IOException, XmlException
{
- InputStream inputStream = getClass().getResourceAsStream( ESB_CONFIG_READ_ONLY );
+ InputStream inputStream = getClass().getResourceAsStream( fileName );
final Reader reader = new InputStreamReader(inputStream);
XMLBeansModel model = new XMLBeansModel(Factory.parse(reader).getJbossesb());
return model;
Copied: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_config_escaping.xml (from rev 29460, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_config_escaping.xml)
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_config_escaping.xml (rev 0)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/mappers110/jbossesb_config_escaping.xml 2009-09-28 09:19:01 UTC (rev 29483)
@@ -0,0 +1,18 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.1.0.xsd">
+ <providers>
+ <ftp-provider name="FTP" hostname="localhost:21">
+ <ftp-bus busid="FTPbus">
+ <ftp-message-filter directory="/directory/####" username="user:##user" password="password:##password"/>
+ </ftp-bus>
+ </ftp-provider>
+ </providers>
+
+ <services>
+ <service category="Test" name="FTPTest" description="FTP escaping Test">
+ <listeners>
+ <ftp-listener name="FtpMapperListener" busidref="FTPbus" is-gateway="true"/>
+ </listeners>
+ </service>
+ </services>
+</jbossesb>
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/schedule/SchedulingUnitTest.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/schedule/SchedulingUnitTest.java 2009-09-28 08:56:09 UTC (rev 29482)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/schedule/SchedulingUnitTest.java 2009-09-28 09:19:01 UTC (rev 29483)
@@ -21,12 +21,12 @@
import junit.framework.TestCase;
import org.jboss.soa.esb.testutils.ESBConfigUtil;
-import org.jboss.soa.esb.testutils.StringUtils;
import org.jboss.soa.esb.parameters.ParamRepositoryException;
import org.jboss.soa.esb.ConfigurationException;
import org.jboss.soa.esb.mock.MockAction;
import org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleException;
import org.jboss.internal.soa.esb.util.StreamUtils;
+import org.jboss.internal.soa.esb.util.XMLHelper;
import org.xml.sax.SAXException;
import java.io.UnsupportedEncodingException;
@@ -52,7 +52,7 @@
ESBConfigUtil configUtil = new ESBConfigUtil(getClass().getResourceAsStream("config-01.xml"));
String expected = StreamUtils.readStreamString(getClass().getResourceAsStream("expected-config-01-listener.xml"), "UTF-8");
- assertTrue("Service Config", StringUtils.compareXMLContent(expected, configUtil.getListenerConfig("simple-schedule-listener").toString()));
+ assertTrue("Service Config", XMLHelper.compareXMLContent(expected, configUtil.getListenerConfig("simple-schedule-listener").toString()));
}
public void test_simple_schedule_01() throws UnsupportedEncodingException, ParamRepositoryException, ConfigurationException, ManagedLifecycleException, SAXException, InterruptedException {
Deleted: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/testutils/Element.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/testutils/Element.java 2009-09-28 08:56:09 UTC (rev 29482)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/testutils/Element.java 2009-09-28 09:19:01 UTC (rev 29483)
@@ -1,138 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY 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 along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.soa.esb.testutils;
-
-import java.util.ArrayList;
-import java.util.Comparator;
-import java.util.List;
-import java.util.Map;
-import java.util.TreeMap;
-
-import javax.xml.namespace.QName;
-
-import org.xml.sax.Attributes;
-
-/**
- * Simple class representing an element.
- * This is used to compare XML documents.
- *
- * @author Kevin Conner
- */
-public class Element implements Node
-{
- /**
- * The QName comparator.
- */
- private static final Comparator<QName> QNAME_COMPARATOR = new QNameComparator() ;
-
- /**
- * The name of the element.
- */
- private final QName name ;
- /**
- * Associated attributes.
- */
- private final Map<QName, String> attributes = new TreeMap<QName, String>(QNAME_COMPARATOR) ;
- /**
- * Children.
- */
- private final List<Node> children = new ArrayList<Node>() ;
-
- /**
- * Construct the element.
- * @param namespaceURI The namespace for the element.
- * @param localName The local name of the element.
- * @param attributes The associated attributes.
- */
- Element(final String namespaceURI, final String localName, final Attributes attributes)
- {
- name = new QName(namespaceURI, localName) ;
- final int numAttributes = attributes.getLength() ;
- for(int count = 0 ; count < numAttributes ; count++)
- {
- final String attrNamespaceURI = attributes.getURI(count) ;
- final String attrLocalName = attributes.getLocalName(count) ;
- final String attrValue = attributes.getValue(count) ;
-
- this.attributes.put(new QName(attrNamespaceURI, attrLocalName), attrValue) ;
- }
- }
-
- /**
- * Add a child node.
- * @param child The child node.
- */
- void addChild(final Node child)
- {
- children.add(child) ;
- }
-
- /**
- * Check for equality.
- * @param obj the object to test against.
- */
- @Override
- public boolean equals(final Object obj)
- {
- if (obj == null)
- {
- return false ;
- }
-
- if (obj == this)
- {
- return true ;
- }
-
- if (obj instanceof Element)
- {
- final Element rhs = (Element)obj ;
- return (name.equals(rhs.name) && attributes.equals(rhs.attributes) &&
- children.equals(rhs.children)) ;
- }
-
- return false ;
- }
-
- /**
- * The QName comparator class.
- * @author kevin
- */
- private static final class QNameComparator implements Comparator<QName>
- {
- /**
- * Compare the QNames.
- * @param name1 The first QName.
- * @param name2 The second QName.
- * @return
- */
- public int compare(final QName name1, final QName name2)
- {
- final int uriComparator = name1.getNamespaceURI().compareTo(name2.getNamespaceURI()) ;
- if (uriComparator != 0)
- {
- return uriComparator ;
- }
- return name1.getLocalPart().compareTo(name2.getLocalPart());
- }
- }
-}
Deleted: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/testutils/IdentitySAXHandler.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/testutils/IdentitySAXHandler.java 2009-09-28 08:56:09 UTC (rev 29482)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/testutils/IdentitySAXHandler.java 2009-09-28 09:19:01 UTC (rev 29483)
@@ -1,138 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY 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 along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.soa.esb.testutils;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.DefaultHandler;
-
-/**
- * Simple SAX parser creating an identity document for the incoming XML.
- * Any leading and trailing whitespace is ignored in the document as are
- * namespace prefixes.
- *
- * @author Kevin Conner
- */
-public class IdentitySAXHandler extends DefaultHandler
-{
- /**
- * The root element.
- */
- private Element rootElement ;
- /**
- * The current element.
- */
- private Element currentElement ;
- /**
- * The stack of working elements.
- */
- private List<Element> stack = new ArrayList<Element>() ;
- /**
- * The current text value.
- */
- private StringBuilder currentText = new StringBuilder() ;
-
- @Override
- public void startElement(final String uri, final String localName,
- final String name, final Attributes attributes)
- throws SAXException
- {
- checkText() ;
-
- final Element element = new Element(uri, localName, attributes) ;
- if (rootElement == null)
- {
- rootElement = element ;
- }
-
- if (currentElement != null)
- {
- currentElement.addChild(element) ;
- stack.add(currentElement) ;
- }
- currentElement = element ;
- }
-
- @Override
- public void endElement(final String uri, final String localName,
- final String name)
- throws SAXException
- {
- checkText() ;
-
- final int lastIndex = (stack.size() - 1) ;
- if (lastIndex < 0)
- {
- currentElement = null ;
- }
- else
- {
- currentElement = stack.remove(lastIndex) ;
- }
- }
-
- @Override
- public void characters(final char[] ch, final int start, final int length)
- throws SAXException
- {
- currentText.append(ch, start, length) ;
- }
-
- private void checkText()
- {
- final int textLength = currentText.length() ;
- if (textLength > 0)
- {
- int start = 0 ;
- while((start < textLength) && isXMLWhitespace(currentText.charAt(start)))
- {
- start++ ;
- }
-
- int end = textLength-1 ;
- while((end >= start) && isXMLWhitespace(currentText.charAt(end)))
- {
- end-- ;
- }
-
- if (start <= end)
- {
- currentElement.addChild(new Text(currentText.substring(start, end+1))) ;
- }
- currentText.setLength(0) ;
- currentText.trimToSize() ;
- }
- }
-
- private boolean isXMLWhitespace(final char ch)
- {
- return ((ch == ' ') || (ch == '\t') || (ch == '\r') || (ch == '\n')) ;
- }
-
- public Element getRootElement()
- {
- return rootElement ;
- }
-}
Deleted: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/testutils/Node.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/testutils/Node.java 2009-09-28 08:56:09 UTC (rev 29482)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/testutils/Node.java 2009-09-28 09:19:01 UTC (rev 29483)
@@ -1,31 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY 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 along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.soa.esb.testutils;
-
-/**
- * Simple Node tagging XML nodes.
- *
- * @author Kevin Conner
- */
-public interface Node
-{
-}
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/testutils/StringUtils.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/testutils/StringUtils.java 2009-09-28 08:56:09 UTC (rev 29482)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/testutils/StringUtils.java 2009-09-28 09:19:01 UTC (rev 29483)
@@ -21,16 +21,6 @@
*/
package org.jboss.soa.esb.testutils;
-import java.io.IOException;
-import java.io.StringReader;
-
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.parsers.SAXParser;
-import javax.xml.parsers.SAXParserFactory;
-
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-
/**
* Utility methods for string manipulation and testing.
* @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
@@ -77,47 +67,4 @@
return stringBuf.toString();
}
-
- /**
- * Compare the specified contents as XML.
- * @param content1 The first content.
- * @param content2 The second content.
- * @return true if equals, false otherwise.
- * @throws ParserConfigurationException
- * @throws SAXException
- * @throws IOException
- */
- public static boolean compareXMLContent(final String content1, final String content2)
- throws ParserConfigurationException, SAXException, IOException
- {
- try {
- final SAXParserFactory parserFactory = SAXParserFactory.newInstance() ;
- parserFactory.setNamespaceAware(true) ;
-
- final SAXParser parser = parserFactory.newSAXParser() ;
- final IdentitySAXHandler handler1;
- final IdentitySAXHandler handler2;
-
- try {
- handler1 = new IdentitySAXHandler() ;
- parser.parse(new InputSource(new StringReader(content1)), handler1) ;
- } catch(SAXException e) {
- System.out.println("Failed to parse content1 [" + content1 + "].");
- throw e;
- }
-
- try {
- handler2 = new IdentitySAXHandler() ;
- parser.parse(new InputSource(new StringReader(content2)), handler2) ;
- } catch(SAXException e) {
- System.out.println("Failed to parse content2 [" + content2 + "].");
- throw e;
- }
-
- return (handler1.getRootElement().equals(handler2.getRootElement())) ;
- } catch(IOException e) {
- e.printStackTrace();
- throw e;
- }
- }
}
Deleted: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/testutils/Text.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/testutils/Text.java 2009-09-28 08:56:09 UTC (rev 29482)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/testutils/Text.java 2009-09-28 09:19:01 UTC (rev 29483)
@@ -1,72 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY 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 along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.soa.esb.testutils;
-
-
-/**
- * Simple class representing a text element.
- * This is used to compare XML documents.
- *
- * @author Kevin Conner
- */
-public class Text implements Node
-{
- /**
- * The text content.
- */
- private final String text ;
-
- /**
- * Construct the text element.
- * @param text The text value.
- */
- Text(final String text)
- {
- this.text = text ;
- }
-
- /**
- * Check for equality.
- * @param obj the object to test against.
- */
- @Override
- public boolean equals(final Object obj)
- {
- if (obj == null)
- {
- return false ;
- }
-
- if (obj == this)
- {
- return true ;
- }
-
- if (obj instanceof Text)
- {
- final Text rhs = (Text)obj ;
- return (text.equals(rhs.text)) ;
- }
-
- return false ;
- }
-}
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/util/BindingsTransformUnitTest.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/util/BindingsTransformUnitTest.java 2009-09-28 08:56:09 UTC (rev 29482)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/rosetta/tests/src/org/jboss/soa/esb/util/BindingsTransformUnitTest.java 2009-09-28 09:19:01 UTC (rev 29483)
@@ -21,10 +21,8 @@
package org.jboss.soa.esb.util;
import java.io.ByteArrayInputStream;
-import java.io.IOException;
import javax.xml.transform.Source;
-import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
@@ -32,13 +30,11 @@
import junit.framework.JUnit4TestAdapter;
import org.apache.commons.io.output.ByteArrayOutputStream;
-import org.custommonkey.xmlunit.XMLAssert;
-import org.custommonkey.xmlunit.XMLUnit;
-import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.internal.soa.esb.util.XMLHelper;
+import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
/**
* Test for processing bindings-jboss-beans.xml for AS 5.1.0.GA.
@@ -58,7 +54,6 @@
@BeforeClass
public static void setup()
{
- XMLUnit.setIgnoreWhitespace(true);
transformerFactory = TransformerFactory.newInstance();
}
@@ -66,7 +61,7 @@
* Tests JBoss AS 5.1.0.GA ServiceBindingManager configuration
*/
@Test
- public void transform_AS_5_1_0_GA() throws ConfigurationException, TransformerException, SAXException, IOException
+ public void transform_AS_5_1_0_GA() throws Exception
{
final Source bindingsXml = new StreamSource(getClass().getResourceAsStream("bindings-jboss-beans-as-5-1-0-GA.xml"));
final Source bindinsXslt = new StreamSource(getClass().getResourceAsStream("bindings-jboss-beans-as-5-1-0-GA.xslt"));
@@ -79,7 +74,7 @@
final ByteArrayInputStream bin = new ByteArrayInputStream(((ByteArrayOutputStream)streamResult.getOutputStream()).toByteArray());
final InputSource transformResult = new InputSource(bin);
- XMLAssert.assertXMLEqual(bindingsValid, transformResult);
+ Assert.assertTrue("XML Comparison", XMLHelper.compareXMLContent(bindingsValid, transformResult));
}
public static junit.framework.Test suite()
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/proxy/SOAPProxy.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/proxy/SOAPProxy.java 2009-09-28 08:56:09 UTC (rev 29482)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/proxy/SOAPProxy.java 2009-09-28 09:19:01 UTC (rev 29483)
@@ -87,9 +87,9 @@
* <i>Example of a basic auth + ssl scenario:</i><br/>
* <pre>
* <action name="proxy" class="org.jboss.soa.esb.actions.soap.proxy.SOAPProxy">
- * <property name="wsdl" value="https://localhost:8443/Quickstart_webservice_proxy_security/HelloWorldWS?wsdl"/>
- * <property name="endpointUrl" value="https://localhost:8443/Quickstart_webservice_proxy_security/HelloWorldWS"/>
- * <property name="file" value="/META-INF/httpclient-jbossws-8443.properties"/>
+ * <property name="wsdl" value="https://localhost:8443/webservice_proxy_security/HelloWorldWS?wsdl"/>
+ * <property name="endpointUrl" value="https://localhost:8443/webservice_proxy_security/HelloWorldWS"/>
+ * <property name="file" value="/META-INF/httpclient-8443.properties"/>
* <property name="clientCredentialsRequired" value="true"/>
* </action>
* </pre>
@@ -267,11 +267,21 @@
InputSource is = null;
if (payload instanceof byte[])
{
- is = new InputSource( new ByteArrayInputStream((byte[])payload) );
+ byte[] byte_payload = (byte[])payload;
+ if (byte_payload.length == 0)
+ {
+ throw new ActionProcessingException("message contains zero-length byte[] payload");
+ }
+ is = new InputSource( new ByteArrayInputStream(byte_payload) );
}
else if (payload instanceof String)
{
- is = new InputSource( new StringReader((String)payload) );
+ String string_payload = (String)payload;
+ if (string_payload.length() == 0)
+ {
+ throw new ActionProcessingException("message contains zero-length String payload");
+ }
+ is = new InputSource( new StringReader(string_payload) );
}
else
{
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/AbstractWsdlContractPublisherUnitTest.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/AbstractWsdlContractPublisherUnitTest.java 2009-09-28 08:56:09 UTC (rev 29482)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/AbstractWsdlContractPublisherUnitTest.java 2009-09-28 09:19:01 UTC (rev 29483)
@@ -29,16 +29,14 @@
import java.net.MalformedURLException;
import java.net.URI;
import java.net.URL;
-import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.Method;
+import javax.xml.parsers.ParserConfigurationException;
+
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.jboss.internal.soa.esb.util.StreamUtils;
-import org.custommonkey.xmlunit.XMLUnit;
-import org.custommonkey.xmlunit.XMLAssert;
+import org.jboss.internal.soa.esb.util.XMLHelper;
import org.xml.sax.SAXException;
/**
@@ -46,7 +44,7 @@
*/
public class AbstractWsdlContractPublisherUnitTest extends TestCase {
- public void test_transform_01() throws ConfigurationException, IOException, SAXException {
+ public void test_transform_01() throws Exception {
Action actionConfig = new Action(null, null, null, new Properties());
actionConfig.getProperties().setProperty("rewrite-endpoint-url", "true");
@@ -54,7 +52,7 @@
execTransformTest(actionConfig, "wsdl-transform.expected-01.xml"); // Both transforms
}
- public void test_transform_02() throws ConfigurationException, IOException, SAXException {
+ public void test_transform_02() throws Exception {
Action actionConfig = new Action(null, null, null, new Properties());
actionConfig.getProperties().setProperty("rewrite-endpoint-url", "false");
@@ -62,27 +60,26 @@
execTransformTest(actionConfig, "wsdl-transform.expected-02.xml"); // Just the user defined transform
}
- public void test_transform_03() throws ConfigurationException, IOException, SAXException {
+ public void test_transform_03() throws Exception {
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 {
+ public void test_transform_04() throws Exception {
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 {
+ private void execTransformTest(Action actionConfig, String expected) throws ConfigurationException, SAXException, IOException, ParserConfigurationException {
TestWsdlContractPublisher publisher = new TestWsdlContractPublisher();
publisher.setActionConfig(actionConfig);
ContractInfo contractInfo = publisher.getContractInfo(new EPR(URI.create("http://x.y.x:8989/")));
- XMLUnit.setIgnoreWhitespace( true );
- XMLAssert.assertXMLEqual(new InputStreamReader(getClass().getResourceAsStream(expected)), new StringReader(contractInfo.getData()));
+ assertTrue("XML Comparison", XMLHelper.compareXMLContent(new InputStreamReader(getClass().getResourceAsStream(expected)), new StringReader(contractInfo.getData())));
}
private class TestWsdlContractPublisher extends AbstractWsdlContractPublisher {
Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/JBossWSAdapterContractPublisherUnitTest.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/JBossWSAdapterContractPublisherUnitTest.java 2009-09-28 08:56:09 UTC (rev 29482)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/JBossWSAdapterContractPublisherUnitTest.java 2009-09-28 09:19:01 UTC (rev 29483)
@@ -22,17 +22,10 @@
import junit.framework.TestCase;
import org.apache.log4j.Logger;
import org.jboss.internal.soa.esb.util.StreamUtils;
-import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.internal.soa.esb.util.XMLHelper;
import org.jboss.soa.esb.addressing.EPR;
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;
@@ -42,7 +35,7 @@
public class JBossWSAdapterContractPublisherUnitTest extends TestCase {
private Logger log = Logger .getLogger( JBossWSAdapterContractPublisherUnitTest.class );
- public void test() throws ConfigurationException, IOException, SAXException {
+ public void test() throws Exception {
JBossWSWebserviceContractPublisher publisher = new JBossWSWebserviceContractPublisher();
String wsdlIn = new String(StreamUtils.readStream(getClass().getResourceAsStream("/test-in.wsdl")));
String wsdlOutExpected = new String(StreamUtils.readStream(getClass().getResourceAsStream("test-out-expected.wsdl")));
@@ -53,11 +46,10 @@
String wsdlOut = publisher.updateWsdl(wsdlIn, epr, "myServiceCat", "myServiceName", "socket");
log.debug(wsdlOut);
- XMLUnit.setIgnoreWhitespace( true );
- XMLAssert.assertXMLEqual(new StringReader(wsdlOutExpected), new StringReader(wsdlOut));
+ assertTrue("XML Comparison", XMLHelper.compareXMLContent(wsdlOutExpected, wsdlOut));
}
- public void test_http_rewrite() throws ConfigurationException, IOException, SAXException {
+ public void test_http_rewrite() throws Exception {
JBossWSWebserviceContractPublisher publisher = new JBossWSWebserviceContractPublisher();
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")));
@@ -69,11 +61,10 @@
String wsdlOut = publisher.updateWsdl(wsdlIn, epr, "myServiceCat", "myServiceName", "http");
log.debug(wsdlOut);
- XMLUnit.setIgnoreWhitespace( true );
- XMLAssert.assertXMLEqual(new StringReader(wsdlOutExpected), new StringReader(wsdlOut));
+ assertTrue("XML Comparison", XMLHelper.compareXMLContent(wsdlOutExpected, wsdlOut));
}
- public void test_http_norewrite() throws ConfigurationException, IOException, SAXException {
+ public void test_http_norewrite() throws Exception {
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
@@ -84,8 +75,7 @@
publisher.initializeTransformer();
String wsdlOut = publisher.updateWsdl(wsdlIn, epr, "myServiceCat", "myServiceName", "http");
log.debug(wsdlOut);
- XMLUnit.setIgnoreWhitespace( true );
- XMLAssert.assertXMLEqual(new StringReader(wsdlOutExpected), new StringReader(wsdlOut));
+ assertTrue("XML Comparison", XMLHelper.compareXMLContent(wsdlOutExpected, wsdlOut));
}
private Action buildActionConfig(boolean rewriteUrls) {
Modified: labs/jbossesb/workspace/dbevenius/saml_support/qa/junit/src/org/jboss/soa/esb/server/ebws/EBWSUnitTest.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/qa/junit/src/org/jboss/soa/esb/server/ebws/EBWSUnitTest.java 2009-09-28 08:56:09 UTC (rev 29482)
+++ labs/jbossesb/workspace/dbevenius/saml_support/qa/junit/src/org/jboss/soa/esb/server/ebws/EBWSUnitTest.java 2009-09-28 09:19:01 UTC (rev 29483)
@@ -26,12 +26,12 @@
import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.methods.PostMethod;
import org.apache.commons.httpclient.methods.StringRequestEntity;
+import org.jboss.internal.soa.esb.util.XMLHelper;
import org.jboss.soa.esb.client.ServiceInvoker;
import org.jboss.soa.esb.couriers.FaultMessageException;
import org.jboss.soa.esb.listeners.message.MessageValidationException;
import org.jboss.soa.esb.message.Message;
import org.jboss.soa.esb.message.format.MessageFactory;
-import org.jboss.soa.esb.testutils.StringUtils;
import org.jboss.test.JBossTestCase;
/**
@@ -175,8 +175,8 @@
final String[] logs = waitForMessages(2) ;
assertNotNull("Log message", logs) ;
assertEquals("Log count", 2, logs.length) ;
- assertTrue("Request log message", StringUtils.compareXMLContent(EBWSUtil.VALID_REQUEST, logs[0])) ;
- assertTrue("Response log message", StringUtils.compareXMLContent(EBWSUtil.VALID_RESPONSE, logs[1])) ;
+ assertTrue("Request log message", XMLHelper.compareXMLContent(EBWSUtil.VALID_REQUEST, logs[0])) ;
+ assertTrue("Response log message", XMLHelper.compareXMLContent(EBWSUtil.VALID_RESPONSE, logs[1])) ;
}
private void runInvalidRequestTest(final String requestLocation, final String name)
@@ -233,8 +233,8 @@
final String[] logs = waitForMessages(2) ;
assertNotNull("Log message", logs) ;
assertEquals("Log count", 2, logs.length) ;
- assertTrue("Request log message", StringUtils.compareXMLContent(EBWSUtil.VALID_REQUEST, logs[0])) ;
- assertTrue("Response log message", StringUtils.compareXMLContent(EBWSUtil.INVALID_RESPONSE, logs[1])) ;
+ assertTrue("Request log message", XMLHelper.compareXMLContent(EBWSUtil.VALID_REQUEST, logs[0])) ;
+ assertTrue("Response log message", XMLHelper.compareXMLContent(EBWSUtil.INVALID_RESPONSE, logs[1])) ;
}
private void runSoapRequestTest(final String endpoint)
@@ -248,13 +248,13 @@
httpClient.executeMethod(postMethod) ;
final String response = postMethod.getResponseBodyAsString() ;
System.out.println("Response is " + response) ;
- assertTrue("XML response", StringUtils.compareXMLContent(EBWSUtil.SOAP_RESPONSE, response)) ;
+ assertTrue("XML response", XMLHelper.compareXMLContent(EBWSUtil.SOAP_RESPONSE, response)) ;
final String[] logs = waitForMessages(2) ;
assertNotNull("Log message", logs) ;
assertEquals("Log count", 2, logs.length) ;
- assertTrue("Request log message", StringUtils.compareXMLContent(EBWSUtil.VALID_REQUEST, logs[0])) ;
- assertTrue("Response log message", StringUtils.compareXMLContent(EBWSUtil.VALID_RESPONSE, logs[1])) ;
+ assertTrue("Request log message", XMLHelper.compareXMLContent(EBWSUtil.VALID_REQUEST, logs[0])) ;
+ assertTrue("Response log message", XMLHelper.compareXMLContent(EBWSUtil.VALID_RESPONSE, logs[1])) ;
}
private void runSoapAddressingRequestTest(final String endpoint)
@@ -274,11 +274,11 @@
final String[] logs = waitForMessages(5) ;
assertNotNull("Log message", logs) ;
assertEquals("Log count", 5, logs.length) ;
- assertTrue("Request log message", StringUtils.compareXMLContent(EBWSUtil.VALID_REQUEST, logs[0])) ;
+ assertTrue("Request log message", XMLHelper.compareXMLContent(EBWSUtil.VALID_REQUEST, logs[0])) ;
assertEquals("WS-A Message ID", "urn:esb:1234567", logs[1]) ;
assertEquals("WS-A relates TO", "[urn:esb:r1234, urn:esb:r5678]", logs[2]) ;
assertEquals("WS-A relationship Type", "[{http://www.w3.org/2005/08/addressing}Reply, {http://www.w3.org/2005/08/addressing}test]", logs[3]) ;
- assertTrue("Response log message", StringUtils.compareXMLContent(EBWSUtil.VALID_RESPONSE, logs[4])) ;
+ assertTrue("Response log message", XMLHelper.compareXMLContent(EBWSUtil.VALID_RESPONSE, logs[4])) ;
}
/**
Deleted: labs/jbossesb/workspace/dbevenius/saml_support/testlib/xmlunit-1.2.jar
===================================================================
(Binary files differ)
More information about the jboss-svn-commits
mailing list