[jboss-svn-commits] JBossWS SVN: r725 - in branches/tdiesler/trunk: . src/main/java/javax/xml/ws/spi src/main/java/org/jboss/ws/jaxws/client src/main/java/org/jboss/ws/jaxws/handler src/main/java/org/jboss/ws/soap src/main/java/org/jboss/ws/utils src/test src/test/ant src/test/java/org/jboss/test/ws/addressing src/test/java/org/jboss/test/ws/jbws871 src/test/java/org/jboss/test/ws/jbws944 src/test/java/org/jboss/test/ws/jsr181/oneway src/test/java/org/jboss/test/ws/jsr181/webmethod src/test/java/org/jboss/test/ws/samples/wsaddressing src/test/java/org/jboss/test/ws/util src/test/java/org/jboss/test/ws/wsse src/test/resources src/test/resources/jsr181/oneway/WEB-INF src/test/resources/jsr181/webmethod/WEB-INF
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Fri Aug 11 13:09:35 EDT 2006
Author: thomas.diesler at jboss.com
Date: 2006-08-11 13:08:57 -0400 (Fri, 11 Aug 2006)
New Revision: 725
Added:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jsr181/oneway/PingEndpointImpl.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jsr181/webmethod/TestEndpoint.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jsr181/webmethod/TestEndpointImpl.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/util/DOMWriterTestCase.java
Removed:
branches/tdiesler/trunk/.classpath
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jsr181/oneway/PingService.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jsr181/webmethod/MyWebService.java
branches/tdiesler/trunk/src/test/resources/jbws944/
Modified:
branches/tdiesler/trunk/.project
branches/tdiesler/trunk/src/main/java/javax/xml/ws/spi/ServiceDelegate.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/client/DispatchImpl.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/handler/HandlerChainExecutor.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/handler/HandlerDelegateJAXWS.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/soap/SOAPBodyImpl.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/soap/SOAPPartImpl.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/utils/IOUtils.java
branches/tdiesler/trunk/src/test/ant/build-jars.xml
branches/tdiesler/trunk/src/test/build.xml
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/addressing/EndpointReferenceTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/addressing/SOAPAddressingPropertiesTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jbws871/RpcArrayEndpointImpl.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jbws944/JBWS944TestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jsr181/oneway/JSR181OneWayTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jsr181/webmethod/JSR181WebMethodTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/samples/wsaddressing/AddressingStatefulTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/wsse/MicrosoftInteropTestCase.java
branches/tdiesler/trunk/src/test/resources/jsr181/oneway/WEB-INF/web.xml
branches/tdiesler/trunk/src/test/resources/jsr181/webmethod/WEB-INF/web.xml
branches/tdiesler/trunk/version.properties
Log:
merge from trunk
Deleted: branches/tdiesler/trunk/.classpath
===================================================================
--- branches/tdiesler/trunk/.classpath 2006-08-11 16:59:07 UTC (rev 724)
+++ branches/tdiesler/trunk/.classpath 2006-08-11 17:08:57 UTC (rev 725)
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src/main/java"/>
- <classpathentry excluding="org/jboss/test/ws/interop/" kind="src" path="src/test/java"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="lib" path="thirdparty/activation.jar"/>
- <classpathentry kind="lib" path="thirdparty/ant.jar"/>
- <classpathentry kind="lib" path="thirdparty/concurrent.jar"/>
- <classpathentry kind="lib" path="thirdparty/javassist.jar"/>
- <classpathentry kind="lib" path="thirdparty/jaxb-api.jar"/>
- <classpathentry kind="lib" path="thirdparty/jaxb-impl.jar"/>
- <classpathentry kind="lib" path="thirdparty/jaxb-xjc.jar"/>
- <classpathentry kind="lib" path="thirdparty/jboss-backport-concurrent.jar"/>
- <classpathentry kind="lib" path="thirdparty/jboss-common.jar"/>
- <classpathentry kind="lib" path="thirdparty/jboss-container.jar"/>
- <classpathentry kind="lib" path="thirdparty/jboss-dependency.jar"/>
- <classpathentry kind="lib" path="thirdparty/jboss-microcontainer.jar"/>
- <classpathentry kind="lib" path="thirdparty/jboss-remoting.jar"/>
- <classpathentry kind="lib" path="thirdparty/jbossretro.jar"/>
- <classpathentry kind="lib" path="thirdparty/jboss-xml-binding.jar"/>
- <classpathentry kind="lib" path="thirdparty/junit.jar"/>
- <classpathentry kind="lib" path="thirdparty/log4j.jar"/>
- <classpathentry kind="lib" path="thirdparty/mailapi.jar"/>
- <classpathentry kind="lib" path="thirdparty/policy-1.0.jar"/>
- <classpathentry kind="lib" path="thirdparty/qdox.jar"/>
- <classpathentry kind="lib" path="thirdparty/serializer.jar"/>
- <classpathentry kind="lib" path="thirdparty/servlet-api.jar"/>
- <classpathentry kind="lib" path="thirdparty/stax-api-1.0.jar"/>
- <classpathentry kind="lib" path="thirdparty/wsdl4j.jar"/>
- <classpathentry kind="lib" path="thirdparty/wstx-lgpl-2.0.6.jar"/>
- <classpathentry kind="lib" path="thirdparty/xalan.jar"/>
- <classpathentry kind="lib" path="thirdparty/xercesImpl.jar"/>
- <classpathentry kind="lib" path="thirdparty/xml-apis.jar"/>
- <classpathentry kind="lib" path="thirdparty/xmlsec.jar"/>
- <classpathentry kind="lib" path="thirdparty/xmlunit1.0.jar"/>
- <classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/jboss-5.0.x"/>
- <classpathentry kind="output" path="output-eclipse"/>
-</classpath>
Modified: branches/tdiesler/trunk/.project
===================================================================
--- branches/tdiesler/trunk/.project 2006-08-11 16:59:07 UTC (rev 724)
+++ branches/tdiesler/trunk/.project 2006-08-11 17:08:57 UTC (rev 725)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>trunk-tdiesler</name>
+ <name>trunk</name>
<comment></comment>
<projects>
</projects>
Modified: branches/tdiesler/trunk/src/main/java/javax/xml/ws/spi/ServiceDelegate.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/javax/xml/ws/spi/ServiceDelegate.java 2006-08-11 16:59:07 UTC (rev 724)
+++ branches/tdiesler/trunk/src/main/java/javax/xml/ws/spi/ServiceDelegate.java 2006-08-11 17:08:57 UTC (rev 725)
@@ -59,9 +59,17 @@
*/
public abstract void addPort(QName qname, String bindingId, String endpointAddress);
- public abstract <T> Dispatch<T> createDispatch(QName qname, Class<T> type, Service.Mode mode);
+ /**
+ * Creates a Dispatch instance for use with objects of the users choosing.
+ * @param type The class of object used to messages or message payloads.
+ * Implementations are required to support javax.xml.transform.Source and javax.xml.soap.SOAPMessage.
+ */
+ public abstract <T> Dispatch<T> createDispatch(QName portName, Class<T> type, Service.Mode mode);
- public abstract Dispatch<Object> createDispatch(QName qname, JAXBContext jaxbcontext, Service.Mode mode);
+ /**
+ * Creates a Dispatch instance for use with JAXB generated objects.
+ */
+ public abstract Dispatch<Object> createDispatch(QName portName, JAXBContext jaxbcontext, Service.Mode mode);
public abstract QName getServiceName();
@@ -71,7 +79,7 @@
public abstract HandlerResolver getHandlerResolver();
- public abstract void setHandlerResolver(HandlerResolver handlerresolver);
+ public abstract void setHandlerResolver(HandlerResolver handlerResolver);
public abstract Executor getExecutor();
Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/client/DispatchImpl.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/client/DispatchImpl.java 2006-08-11 16:59:07 UTC (rev 724)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/client/DispatchImpl.java 2006-08-11 17:08:57 UTC (rev 725)
@@ -72,7 +72,7 @@
private BindingProvider bindingProvider;
private EndpointMetaData epMetaData;
private JAXBContext jaxbContext;
- private Class<T> type;
+ private Class type;
private Mode mode;
public DispatchImpl(EndpointMetaData epMetaData, Class<T> type, Mode mode)
@@ -87,6 +87,7 @@
public DispatchImpl(EndpointMetaData epMetaData, JAXBContext jbc, Mode mode)
{
this.epMetaData = epMetaData;
+ this.type = Object.class;
this.jaxbContext = jbc;
this.mode = mode;
initDispatch();
@@ -104,7 +105,9 @@
}
catch (SOAPException ex)
{
- throw new WebServiceException("Cannot dispatch request message");
+ String msg = "Cannot dispatch request message";
+ log.error(msg, ex);
+ throw new WebServiceException(msg, ex);
}
}
@@ -128,7 +131,9 @@
}
catch (SOAPException ex)
{
- throw new WebServiceException("Cannot dispatch request message");
+ String msg = "Cannot dispatch request message one way";
+ log.error(msg, ex);
+ throw new WebServiceException(msg, ex);
}
}
@@ -149,11 +154,11 @@
private void initDispatch()
{
- if (type == SOAPMessage.class && mode == Mode.MESSAGE)
+ if (SOAPMessage.class.isAssignableFrom(type) && mode == Mode.MESSAGE)
{
// accepted
}
- else if (type == Source.class)
+ else if (Source.class.isAssignableFrom(type))
{
// accepted
}
@@ -163,7 +168,7 @@
}
else
{
- throw new WebServiceException("Unsupported type/mode: " + (type != null ? type.getName() : null) + "/" + mode);
+ throw new WebServiceException("Illegal argument combination [type=" + (type != null ? type.getName() : null) + ",mode=" + mode + "]");
}
}
@@ -173,11 +178,11 @@
try
{
MessageFactory factory = MessageFactory.newInstance();
- if (type == SOAPMessage.class)
+ if (SOAPMessage.class.isAssignableFrom(type))
{
reqMsg = (SOAPMessage)obj;
}
- else if (type == Source.class)
+ else if (Source.class.isAssignableFrom(type))
{
Source source = (Source)obj;
if (mode == Mode.PAYLOAD)
@@ -227,11 +232,11 @@
Object retObj = null;
try
{
- if (type == SOAPMessage.class)
+ if (SOAPMessage.class.isAssignableFrom(type))
{
retObj = resMsg;
}
- else if (type == Source.class)
+ else if (Source.class.isAssignableFrom(type))
{
if (mode == Mode.PAYLOAD)
{
Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/handler/HandlerChainExecutor.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/handler/HandlerChainExecutor.java 2006-08-11 16:59:07 UTC (rev 724)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/handler/HandlerChainExecutor.java 2006-08-11 17:08:57 UTC (rev 725)
@@ -21,7 +21,7 @@
*/
package org.jboss.ws.jaxws.handler;
-// $Id$
+// $Id:HandlerChainExecutor.java 710 2006-08-08 20:19:52Z thomas.diesler at jboss.com $
import java.util.ArrayList;
import java.util.List;
Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/handler/HandlerDelegateJAXWS.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/handler/HandlerDelegateJAXWS.java 2006-08-11 16:59:07 UTC (rev 724)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/jaxws/handler/HandlerDelegateJAXWS.java 2006-08-11 17:08:57 UTC (rev 725)
@@ -21,7 +21,7 @@
*/
package org.jboss.ws.jaxws.handler;
-// $Id$
+// $Id:HandlerDelegateJAXWS.java 710 2006-08-08 20:19:52Z thomas.diesler at jboss.com $
import java.util.ArrayList;
import java.util.List;
Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/soap/SOAPBodyImpl.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/soap/SOAPBodyImpl.java 2006-08-11 16:59:07 UTC (rev 724)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/soap/SOAPBodyImpl.java 2006-08-11 17:08:57 UTC (rev 725)
@@ -26,6 +26,7 @@
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
+import java.io.Reader;
import java.util.Iterator;
import java.util.Locale;
@@ -45,12 +46,14 @@
import org.jboss.util.xml.DOMWriter;
import org.jboss.ws.Constants;
import org.jboss.ws.WSException;
+import org.jboss.util.xml.DOMUtils;
import org.w3c.dom.DOMException;
import org.w3c.dom.Document;
import org.w3c.dom.DocumentFragment;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
+import org.xml.sax.InputSource;
/**
* An object that represents the contents of the SOAP body element in a SOAP message.
@@ -246,9 +249,19 @@
SOAPFactoryImpl soapFactory = new SOAPFactoryImpl();
if (payload instanceof StreamSource)
{
+ Element child = null;
StreamSource streamSource = (StreamSource)payload;
+
InputStream ins = streamSource.getInputStream();
- Element child = DOMUtils.parse(ins);
+ if (ins != null)
+ {
+ child = DOMUtils.parse(ins);
+ }
+ else
+ {
+ Reader reader = streamSource.getReader();
+ child = DOMUtils.parse(new InputSource(reader));
+ }
addChildElement(soapFactory.createElement(child, true));
// reset the excausted input stream
Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/soap/SOAPPartImpl.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/soap/SOAPPartImpl.java 2006-08-11 16:59:07 UTC (rev 724)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/soap/SOAPPartImpl.java 2006-08-11 17:08:57 UTC (rev 725)
@@ -331,7 +331,7 @@
public String getNodeName()
{
- throw new NotImplementedException();
+ return null;
}
public short getNodeType()
Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/utils/IOUtils.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/utils/IOUtils.java 2006-08-11 16:59:07 UTC (rev 724)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/utils/IOUtils.java 2006-08-11 17:08:57 UTC (rev 725)
@@ -1,32 +1,34 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, 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.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, 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.ws.utils;
+import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
+import java.io.Reader;
import java.io.Writer;
import org.jboss.logging.Logger;
@@ -62,4 +64,23 @@
r = ins.read(bytes);
}
}
+
+ /**
+ * Transform a Reader to an InputStream
+ * Background is that DocumentBuilder.parse() cannot take the Reader directly
+ */
+ public static InputStream transformReader(Reader reader) throws IOException
+ {
+ int capacity = 1024;
+ char[] charBuffer = new char[capacity];
+ StringBuffer strBuffer = new StringBuffer(capacity);
+
+ int len = reader.read(charBuffer, 0, capacity);
+ while (len > 0)
+ {
+ strBuffer.append(charBuffer, 0, len);
+ len = reader.read(charBuffer, 0, capacity);
+ }
+ return new ByteArrayInputStream(strBuffer.toString().getBytes());
+ }
}
Modified: branches/tdiesler/trunk/src/test/ant/build-jars.xml
===================================================================
--- branches/tdiesler/trunk/src/test/ant/build-jars.xml 2006-08-11 16:59:07 UTC (rev 724)
+++ branches/tdiesler/trunk/src/test/ant/build-jars.xml 2006-08-11 17:08:57 UTC (rev 725)
@@ -682,17 +682,6 @@
<include name="org/jboss/test/ws/jbws944/EJB3RemoteInterface.class"/>
</fileset>
</jar>
- <jar jarfile="${build.test.dir}/libs/jbossws-jbws944-client.jar">
- <fileset dir="${build.test.dir}/classes">
- <include name="org/jboss/test/ws/jbws944/EndpointInterface.class"/>
- </fileset>
- <metainf dir="${build.test.dir}/resources/jbws944/META-INF">
- <include name="application-client.xml"/>
- <include name="jboss-client.xml"/>
- <include name="jaxrpc-mapping.xml"/>
- <include name="wsdl/**"/>
- </metainf>
- </jar>
<!-- jbossws-jbws947 -->
<war warfile="${build.test.dir}/libs/jbossws-jbws947.war" webxml="${build.test.dir}/resources/jbws947/WEB-INF/web.xml">
@@ -754,7 +743,7 @@
<!-- jbossws-jsr181-oneway -->
<war warfile="${build.test.dir}/libs/jbossws-jsr181-oneway.war" webxml="${build.test.dir}/resources/jsr181/oneway/WEB-INF/web.xml">
<classes dir="${build.test.dir}/classes">
- <include name="org/jboss/test/ws/jsr181/oneway/PingService.class"/>
+ <include name="org/jboss/test/ws/jsr181/oneway/PingEndpointImpl.class"/>
</classes>
</war>
@@ -774,7 +763,7 @@
<!-- jbossws-jsr181-webmethod -->
<war warfile="${build.test.dir}/libs/jbossws-jsr181-webmethod.war" webxml="${build.test.dir}/resources/jsr181/webmethod/WEB-INF/web.xml">
<classes dir="${build.test.dir}/classes">
- <include name="org/jboss/test/ws/jsr181/webmethod/MyWebService.class"/>
+ <include name="org/jboss/test/ws/jsr181/webmethod/TestEndpointImpl.class"/>
</classes>
</war>
Modified: branches/tdiesler/trunk/src/test/build.xml
===================================================================
--- branches/tdiesler/trunk/src/test/build.xml 2006-08-11 16:59:07 UTC (rev 724)
+++ branches/tdiesler/trunk/src/test/build.xml 2006-08-11 17:08:57 UTC (rev 725)
@@ -120,12 +120,13 @@
<!-- The jbossws client classpath -->
<path id="jbossws.client.classpath">
- <!-- override jbossxb in jbossall-client.jar -->
- <pathelement location="${thirdparty.dir}/jboss-xml-binding.jar"/>
<pathelement location="${jboss.client}/activation.jar"/>
<pathelement location="${jboss.client}/commons-logging.jar"/>
<pathelement location="${jboss.client}/javassist.jar"/>
+ <pathelement location="${jboss.client}/jaxb-api.jar"/>
+ <pathelement location="${jboss.client}/jaxb-impl.jar"/>
<pathelement location="${jboss.client}/jboss-common.jar"/>
+ <pathelement location="${jboss.client}/jboss-xml-binding.jar"/>
<pathelement location="${jboss.client}/jbossall-client.jar"/>
<pathelement location="${jboss.client}/jbossretro-rt.jar"/>
<pathelement location="${jboss.client}/jboss-backport-concurrent.jar"/>
@@ -146,9 +147,11 @@
<pathelement location="${build.lib.dir}/jbossws-tomcat-integration.jar"/>
</path>
- <!-- The test client classpath -->
+ <!--
+ The test client classpath which does not include the library classpath
+ The idea is that we test agains the jar versions in the target container
+ -->
<path id="test.client.classpath">
- <path refid="library.classpath"/>
<path refid="jbossws.client.classpath"/>
<pathelement location="${build.lib.dir}/jbossws-jboss-integration.jar"/>
<pathelement location="${build.lib.dir}/jbossws-tomcat-integration.jar"/>
@@ -247,8 +250,7 @@
-->
<target name="generate-sources" depends="compile" description="Generate the deployment resources.">
<taskdef name="wstools" classname="org.jboss.ws.tools.ant.wstools">
- <classpath refid="library.classpath"/>
- <classpath refid="test.client.classpath"/>
+ <classpath refid="jbossws.client.classpath"/>
<classpath path="${build.test.dir}/classes"/>
</taskdef>
<mkdir dir="${build.test.dir}/wstools/java"/>
@@ -276,7 +278,6 @@
<wstools dest="${build.test.dir}/wstools/resources/samples/rpcstyle/WEB-INF" config="${test.resources.dir}/samples/rpcstyle/wstools-config.xml"/>
<wstools dest="${build.test.dir}/wstools/resources/samples/secureejb/META-INF" config="${test.resources.dir}/samples/secureejb/wstools-config.xml"/>
<!-- wstools dest="${build.test.dir}/wstools/resources/samples/swa/WEB-INF" config="${test.resources.dir}/samples/swa/wstools-config.xml"/-->
- <wstools dest="${build.test.dir}/wstools/resources/samples/wsaddressing/META-INF" config="${test.resources.dir}/samples/wsaddressing/wstools-config.xml"/>
<wstools dest="${build.test.dir}/wstools/resources/samples/wssecurity/WEB-INF" config="${test.resources.dir}/samples/wssecurity/wstools-config.xml"/>
</target>
Modified: branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/addressing/EndpointReferenceTestCase.java
===================================================================
--- branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/addressing/EndpointReferenceTestCase.java 2006-08-11 16:59:07 UTC (rev 724)
+++ branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/addressing/EndpointReferenceTestCase.java 2006-08-11 17:08:57 UTC (rev 725)
@@ -62,6 +62,8 @@
Element inElement = DOMUtils.parse(inStr);
EndpointReferenceImpl epr = new EndpointReferenceImpl(inElement);
Element outElement = epr.toElement();
- assertEquals(inElement, outElement);
+
+ System.out.println("FIXME: JBWS-1130");
+ //assertEquals(inElement, outElement);
}
}
Modified: branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/addressing/SOAPAddressingPropertiesTestCase.java
===================================================================
--- branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/addressing/SOAPAddressingPropertiesTestCase.java 2006-08-11 16:59:07 UTC (rev 724)
+++ branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/addressing/SOAPAddressingPropertiesTestCase.java 2006-08-11 17:08:57 UTC (rev 725)
@@ -102,7 +102,9 @@
SOAPMessage msgOut = factory.createMessage(null, new ByteArrayInputStream(reqEnvStr.getBytes()));
SOAPEnvelope expEnv = msgOut.getSOAPPart().getEnvelope();
- assertEquals(expEnv, wasEnv);
+
+ System.out.println("FIXME: JBWS-1130");
+ //assertEquals(expEnv, wasEnv);
}
public void testReplyToHeaders() throws Exception
@@ -119,6 +121,8 @@
SOAPMessage msgOut = factory.createMessage(null, new ByteArrayInputStream(resEnvStr.getBytes()));
SOAPEnvelope expEnv = msgOut.getSOAPPart().getEnvelope();
- assertEquals(expEnv, wasEnv);
+
+ System.out.println("FIXME: JBWS-1130");
+ //assertEquals(expEnv, wasEnv);
}
}
Modified: branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jbws871/RpcArrayEndpointImpl.java
===================================================================
--- branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jbws871/RpcArrayEndpointImpl.java 2006-08-11 16:59:07 UTC (rev 724)
+++ branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jbws871/RpcArrayEndpointImpl.java 2006-08-11 17:08:57 UTC (rev 725)
@@ -32,7 +32,7 @@
import org.jboss.ws.WSException;
@SOAPBinding(style = Style.RPC)
- at WebService(name = "RpcArrayEndpoint", serviceName = "RpcArrayEndpointService")
+ at WebService(name = "RpcArrayEndpoint")
public class RpcArrayEndpointImpl
{
// Provide logging
Modified: branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jbws944/JBWS944TestCase.java
===================================================================
--- branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jbws944/JBWS944TestCase.java 2006-08-11 16:59:07 UTC (rev 724)
+++ branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jbws944/JBWS944TestCase.java 2006-08-11 17:08:57 UTC (rev 725)
@@ -25,7 +25,8 @@
import java.net.URL;
import javax.naming.InitialContext;
-import javax.xml.rpc.Service;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
import junit.framework.Test;
@@ -49,7 +50,7 @@
public static Test suite()
{
- return JBossWSTestSetup.newTestSetup(JBWS944TestCase.class, "jbossws-jbws944.ejb3, jbossws-jbws944-client.jar");
+ return JBossWSTestSetup.newTestSetup(JBWS944TestCase.class, "jbossws-jbws944.ejb3");
}
protected void setUp() throws Exception
@@ -57,8 +58,9 @@
super.setUp();
if (port == null)
{
- InitialContext iniCtx = getInitialContext();
- Service service = (Service)iniCtx.lookup("java:comp/env/service/TestService");
+ URL wsdlURL = new URL (TARGET_ENDPOINT_ADDRESS + "?wsdl");
+ QName serviceName = new QName ("http://org.jboss.ws/samples/jsr181ejb", "TestService");
+ Service service = Service.create(wsdlURL, serviceName);
port = (EndpointInterface)service.getPort(EndpointInterface.class);
}
}
Modified: branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jsr181/oneway/JSR181OneWayTestCase.java
===================================================================
--- branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jsr181/oneway/JSR181OneWayTestCase.java 2006-08-11 16:59:07 UTC (rev 724)
+++ branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jsr181/oneway/JSR181OneWayTestCase.java 2006-08-11 17:08:57 UTC (rev 725)
@@ -21,19 +21,23 @@
*/
package org.jboss.test.ws.jsr181.oneway;
+import java.io.StringReader;
import java.net.URL;
import javax.xml.namespace.QName;
-import javax.xml.rpc.Call;
-import javax.xml.rpc.Service;
+import javax.xml.transform.stream.StreamSource;
+import javax.xml.ws.Dispatch;
+import javax.xml.ws.Service;
+import javax.xml.ws.Service.Mode;
import junit.framework.Test;
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.jaxrpc.CallImpl;
-import org.jboss.ws.jaxrpc.ServiceFactoryImpl;
-import org.jboss.ws.metadata.OperationMetaData;
+import org.jboss.util.xml.DOMUtils;
+import org.jboss.util.xml.DOMWriter;
+import org.w3c.dom.Element;
+import org.xml.sax.InputSource;
/**
* Test the JSR-181 annotation: javax.jws.Oneway
@@ -52,19 +56,19 @@
public void testWebService() throws Exception
{
- QName serviceName = new QName(targetNS, "PingServiceService");
- QName portName = new QName(targetNS, "PingServicePort");
-
URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jbossws-jsr181-oneway/TestService?wsdl");
+ QName serviceName = new QName(targetNS, "PingEndpointService");
+ QName portName = new QName(targetNS, "PingEndpointPort");
+ Service service = Service.create(wsdlURL, serviceName);
+ Dispatch dispatch = service.createDispatch(portName, StreamSource.class, Mode.PAYLOAD);
- ServiceFactoryImpl factory = new ServiceFactoryImpl();
- Service service = factory.createService(wsdlURL, serviceName);
- CallImpl call = (CallImpl)service.createCall(portName, "ping");
+ String payload = "<ns1:ping xmlns:ns1='http://oneway.jsr181.ws.test.jboss.org/jaws'/>";
+ dispatch.invokeOneWay(new StreamSource(new StringReader(payload)));
- OperationMetaData opMetaData = call.getOperationMetaData();
- assertTrue("Expected oneway operation", opMetaData.isOneWayOperation());
-
- Object retObj = call.invoke(null);
- assertNull("Expected null return", retObj);
+ payload = "<ns1:feedback xmlns:ns1='http://oneway.jsr181.ws.test.jboss.org/jaws'/>";
+ StreamSource retObj = (StreamSource)dispatch.invoke(new StreamSource(new StringReader(payload)));
+ Element retElement = DOMUtils.getFirstChildElement(DOMUtils.parse(new InputSource(retObj.getReader())));
+ String retPayload = DOMWriter.printNode(retElement, false);
+ assertEquals("<result>ok</result>", retPayload);
}
}
Copied: branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jsr181/oneway/PingEndpointImpl.java (from rev 724, trunk/src/test/java/org/jboss/test/ws/jsr181/oneway/PingEndpointImpl.java)
Deleted: branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jsr181/oneway/PingService.java
===================================================================
--- branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jsr181/oneway/PingService.java 2006-08-11 16:59:07 UTC (rev 724)
+++ branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jsr181/oneway/PingService.java 2006-08-11 17:08:57 UTC (rev 725)
@@ -1,50 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, 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.test.ws.jsr181.oneway;
-
-import javax.jws.WebMethod;
-import javax.jws.WebService;
-import javax.jws.Oneway;
-import javax.jws.soap.SOAPBinding;
-
-import org.jboss.logging.Logger;
-
-/**
- * Test the JSR-181 annotation: javax.jws.Oneway
- *
- * @author Thomas.Diesler at jboss.org
- * @since 07-Oct-2005
- */
- at WebService
- at SOAPBinding(style = SOAPBinding.Style.RPC)
-public class PingService
-{
- // Provide logging
- private static Logger log = Logger.getLogger(PingService.class);
-
- @WebMethod
- @Oneway
- public void ping()
- {
- log.info("ping");
- }
-}
Modified: branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jsr181/webmethod/JSR181WebMethodTestCase.java
===================================================================
--- branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jsr181/webmethod/JSR181WebMethodTestCase.java 2006-08-11 16:59:07 UTC (rev 724)
+++ branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jsr181/webmethod/JSR181WebMethodTestCase.java 2006-08-11 17:08:57 UTC (rev 725)
@@ -22,24 +22,30 @@
package org.jboss.test.ws.jsr181.webmethod;
import java.io.ByteArrayInputStream;
+import java.io.StringReader;
import java.net.URL;
import javax.xml.namespace.QName;
-import javax.xml.rpc.Service;
import javax.xml.soap.MessageFactory;
import javax.xml.soap.SOAPConnection;
import javax.xml.soap.SOAPConnectionFactory;
import javax.xml.soap.SOAPElement;
import javax.xml.soap.SOAPFault;
import javax.xml.soap.SOAPMessage;
+import javax.xml.transform.stream.StreamSource;
+import javax.xml.ws.Dispatch;
+import javax.xml.ws.Service;
+import javax.xml.ws.Service.Mode;
import junit.framework.Test;
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.jaxrpc.CallImpl;
-import org.jboss.ws.jaxrpc.ServiceFactoryImpl;
+import org.jboss.util.xml.DOMUtils;
import org.jboss.ws.soap.NameImpl;
+import org.jboss.util.xml.DOMUtils;
+import org.w3c.dom.Element;
+import org.xml.sax.InputSource;
/**
* Test the JSR-181 annotation: javax.jws.webmethod
@@ -59,15 +65,13 @@
public void testLegalAccess() throws Exception
{
- QName serviceName = new QName(targetNS, "MyWebServiceService");
- QName portName = new QName(targetNS, "MyWebServicePort");
URL wsdlURL = new URL(endpointURL + "?wsdl");
+ QName serviceName = new QName(targetNS, "TestEndpointService");
- ServiceFactoryImpl factory = new ServiceFactoryImpl();
- Service service = factory.createService(wsdlURL, serviceName);
- CallImpl call = (CallImpl)service.createCall(portName, "echoString");
+ Service service = Service.create(wsdlURL, serviceName);
+ TestEndpoint port = (TestEndpoint)service.getPort(TestEndpoint.class);
- Object retObj = call.invoke(new Object[]{"Hello"});
+ Object retObj = port.echoString("Hello");
assertEquals("Hello", retObj);
}
@@ -123,22 +127,25 @@
public void testIllegalCallAccess() throws Exception
{
- QName serviceName = new QName(targetNS, "MyWebServiceService");
- QName portName = new QName(targetNS, "MyWebServicePort");
URL wsdlURL = new URL(endpointURL + "?wsdl");
+ QName serviceName = new QName(targetNS, "TestEndpointService");
+ QName portName = new QName(targetNS, "TestEndpointPort");
- ServiceFactoryImpl factory = new ServiceFactoryImpl();
- Service service = factory.createService(wsdlURL, serviceName);
- CallImpl call = (CallImpl)service.createCall(portName, "noWebMethod");
- try
- {
- call.invoke(new Object[] { "Hello" });
- fail("Should not be able to make the call");
- }
- catch (RuntimeException ex)
- {
- String faultString = ex.getMessage();
- assertTrue(faultString, faultString.indexOf("noWebMethod") > 0);
- }
+ String reqPayload =
+ "<ns1:noWebMethod xmlns:ns1='" + targetNS + "'>" +
+ " <String_1>Hello</String_1>" +
+ "</ns1:noWebMethod>";
+
+ String expPayload =
+ "<env:Fault xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" +
+ " <faultcode>env:Client</faultcode>" +
+ " <faultstring>Endpoint {http://webmethod.jsr181.ws.test.jboss.org/jaws}TestEndpointPort does not contain operation meta data for: {http://webmethod.jsr181.ws.test.jboss.org/jaws}noWebMethod</faultstring>" +
+ "</env:Fault>";
+
+ Service service = Service.create(wsdlURL, serviceName);
+ Dispatch dispatch = service.createDispatch(portName, StreamSource.class, Mode.PAYLOAD);
+ StreamSource retObj = (StreamSource)dispatch.invoke(new StreamSource(new StringReader(reqPayload)));
+ Element retEl = DOMUtils.parse(new InputSource(retObj.getReader()));
+ assertEquals(DOMUtils.parse(expPayload), retEl);
}
}
Deleted: branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jsr181/webmethod/MyWebService.java
===================================================================
--- branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jsr181/webmethod/MyWebService.java 2006-08-11 16:59:07 UTC (rev 724)
+++ branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jsr181/webmethod/MyWebService.java 2006-08-11 17:08:57 UTC (rev 725)
@@ -1,54 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, 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.test.ws.jsr181.webmethod;
-
-import javax.jws.WebMethod;
-import javax.jws.WebService;
-import javax.jws.soap.SOAPBinding;
-
-import org.jboss.logging.Logger;
-
-/**
- * Test the JSR-181 annotation: javax.jws.WebMethod
- *
- * @author Thomas.Diesler at jboss.org
- * @since 12-Aug-2005
- */
- at WebService
- at SOAPBinding(style = SOAPBinding.Style.RPC)
-public class MyWebService
-{
- // Provide logging
- private static Logger log = Logger.getLogger(MyWebService.class);
-
- @WebMethod(operationName = "echoString", action = "urn:EchoString")
- public String echo(String input)
- {
- log.info("echo: " + input);
- return input;
- }
-
- public String noWebMethod(String input)
- {
- throw new RuntimeException("Not a @WebMethod");
- }
-}
Copied: branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jsr181/webmethod/TestEndpoint.java (from rev 724, trunk/src/test/java/org/jboss/test/ws/jsr181/webmethod/TestEndpoint.java)
Copied: branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jsr181/webmethod/TestEndpointImpl.java (from rev 724, trunk/src/test/java/org/jboss/test/ws/jsr181/webmethod/TestEndpointImpl.java)
Modified: branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/samples/wsaddressing/AddressingStatefulTestCase.java
===================================================================
--- branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/samples/wsaddressing/AddressingStatefulTestCase.java 2006-08-11 16:59:07 UTC (rev 724)
+++ branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/samples/wsaddressing/AddressingStatefulTestCase.java 2006-08-11 17:08:57 UTC (rev 725)
@@ -21,7 +21,8 @@
*/
package org.jboss.test.ws.samples.wsaddressing;
-import java.io.File;
+// $Id: $
+
import java.net.URL;
import java.util.List;
@@ -58,9 +59,8 @@
if (port1 == null || port2 == null)
{
- URL wsdlURL = new File("resources/samples/wsaddressing/META-INF/wsdl/TestService.wsdl").toURL();
+ URL wsdlURL = new URL(" http://" + getServerHost() + ":8080/jbossws-samples-wsaddressing/TestService?wsdl");
QName serviceName = new QName("http://org.jboss.ws/samples/wsaddressing", "TestService");
- QName portName = new QName("http://org.jboss.ws/samples/wsaddressing", "StatefulEndpointPort");
Service service1 = Service.create(wsdlURL, serviceName);
port1 = (StatefulEndpoint)service1.getPort(StatefulEndpoint.class);
Copied: branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/util/DOMWriterTestCase.java (from rev 724, trunk/src/test/java/org/jboss/test/ws/util/DOMWriterTestCase.java)
Modified: branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/wsse/MicrosoftInteropTestCase.java
===================================================================
--- branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/wsse/MicrosoftInteropTestCase.java 2006-08-11 16:59:07 UTC (rev 724)
+++ branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/wsse/MicrosoftInteropTestCase.java 2006-08-11 17:08:57 UTC (rev 725)
@@ -105,7 +105,8 @@
String decodedString = DOMWriter.printNode(doc, true);
log.debug("Decoded message:" + decodedString);
- assertEquals(DOMUtils.parse(envStr), doc.getDocumentElement());
+ System.out.println("FIXME: JBWS-1130");
+ // assertEquals(DOMUtils.parse(envStr), doc.getDocumentElement());
}
// WS-Security leaves wsu:id attributes arround on elements which are not cleaned
Modified: branches/tdiesler/trunk/src/test/resources/jsr181/oneway/WEB-INF/web.xml
===================================================================
--- branches/tdiesler/trunk/src/test/resources/jsr181/oneway/WEB-INF/web.xml 2006-08-11 16:59:07 UTC (rev 724)
+++ branches/tdiesler/trunk/src/test/resources/jsr181/oneway/WEB-INF/web.xml 2006-08-11 17:08:57 UTC (rev 725)
@@ -7,7 +7,7 @@
<servlet>
<servlet-name>TestService</servlet-name>
- <servlet-class>org.jboss.test.ws.jsr181.oneway.PingService</servlet-class>
+ <servlet-class>org.jboss.test.ws.jsr181.oneway.PingEndpointImpl</servlet-class>
</servlet>
<servlet-mapping>
Modified: branches/tdiesler/trunk/src/test/resources/jsr181/webmethod/WEB-INF/web.xml
===================================================================
--- branches/tdiesler/trunk/src/test/resources/jsr181/webmethod/WEB-INF/web.xml 2006-08-11 16:59:07 UTC (rev 724)
+++ branches/tdiesler/trunk/src/test/resources/jsr181/webmethod/WEB-INF/web.xml 2006-08-11 17:08:57 UTC (rev 725)
@@ -7,7 +7,7 @@
<servlet>
<servlet-name>TestService</servlet-name>
- <servlet-class>org.jboss.test.ws.jsr181.webmethod.MyWebService</servlet-class>
+ <servlet-class>org.jboss.test.ws.jsr181.webmethod.TestEndpointImpl</servlet-class>
</servlet>
<servlet-mapping>
Modified: branches/tdiesler/trunk/version.properties
===================================================================
--- branches/tdiesler/trunk/version.properties 2006-08-11 16:59:07 UTC (rev 724)
+++ branches/tdiesler/trunk/version.properties 2006-08-11 17:08:57 UTC (rev 725)
@@ -16,7 +16,7 @@
apache-xmlsec=1.3.0
ibm-wsdl4j=1.5.2jboss
javassist=3.2.0.CR2
-jboss-common=1.0.1
+jboss-common=1.0.2
jboss-jbossxb=1.0.0.CR6
jboss-microcontainer=snapshot
jboss-remoting=1.4.3.GA
More information about the jboss-svn-commits
mailing list