Author: heiko.braun(a)jboss.com
Date: 2007-12-21 05:13:24 -0500 (Fri, 21 Dec 2007)
New Revision: 5384
Added:
stack/metro/branches/hbraun/src/test/etc/log4j.xml
stack/metro/branches/hbraun/src/test/java/org/jboss/test/ws/wsit/rm/CalculatorWSImpl.java
stack/metro/branches/hbraun/src/test/resources/wsit/rm/WEB-INF/wsdl/Calc.wsdl
stack/metro/branches/hbraun/src/test/resources/wsit/rm/WEB-INF/wsdl/xsd1.xsd
Removed:
stack/metro/branches/hbraun/src/test/java/org/jboss/test/ws/wsit/rm/CalcIF.java
stack/metro/branches/hbraun/src/test/java/org/jboss/test/ws/wsit/rm/CalculatorWS.java
Modified:
stack/metro/branches/hbraun/Metro-Branch.ipr
stack/metro/branches/hbraun/ant-import-tests/build-jars-jaxws.xml
stack/metro/branches/hbraun/ant-import-tests/build-testsuite.xml
stack/metro/branches/hbraun/ant-import/build-testsuite.xml
stack/metro/branches/hbraun/ant-import/macros-deploy-sunri.xml
stack/metro/branches/hbraun/ant-import/metro-build-adapter.xml
stack/metro/branches/hbraun/build.xml
stack/metro/branches/hbraun/src/test/java/org/jboss/test/ws/wsit/rm/RMTestCase.java
stack/metro/branches/hbraun/src/test/resources/wsit/rm/WEB-INF/web.xml
Log:
Use wsimport generted stubs
Modified: stack/metro/branches/hbraun/Metro-Branch.ipr
===================================================================
--- stack/metro/branches/hbraun/Metro-Branch.ipr 2007-12-20 20:13:24 UTC (rev 5383)
+++ stack/metro/branches/hbraun/Metro-Branch.ipr 2007-12-21 10:13:24 UTC (rev 5384)
@@ -254,6 +254,8 @@
<modules>
<module fileurl="file://$PROJECT_DIR$/Metro-Branch.iml"
filepath="$PROJECT_DIR$/Metro-Branch.iml" />
<module fileurl="file://$PROJECT_DIR$/cvs/cvs-metro.iml"
filepath="$PROJECT_DIR$/cvs/cvs-metro.iml" />
+ <module fileurl="file://$PROJECT_DIR$/jaxws-2.1.2/jaxws-2.1.2.iml"
filepath="$PROJECT_DIR$/jaxws-2.1.2/jaxws-2.1.2.iml" />
+ <module
fileurl="file://$PROJECT_DIR$/jaxws-tools-2.1.2/jaxws-tools-2.1.2.iml"
filepath="$PROJECT_DIR$/jaxws-tools-2.1.2/jaxws-tools-2.1.2.iml" />
</modules>
</component>
<component name="ProjectRootManager" version="2"
assert-keyword="true" jdk-15="true" project-jdk-name="1.5"
project-jdk-type="JavaSDK">
Modified: stack/metro/branches/hbraun/ant-import/build-testsuite.xml
===================================================================
--- stack/metro/branches/hbraun/ant-import/build-testsuite.xml 2007-12-20 20:13:24 UTC
(rev 5383)
+++ stack/metro/branches/hbraun/ant-import/build-testsuite.xml 2007-12-21 10:13:24 UTC
(rev 5384)
@@ -47,8 +47,7 @@
<path id="tests.extra.classpath">
<pathelement
location="${int.sunri.dir}/output/lib/jbossws-sunri-client.jar"/>
- <pathelement
location="${int.sunri.dir}/thirdparty/jbossws-framework.jar"/>
- <pathelement location="${int.sunri.dir}/thirdparty/jaxws-tools.jar"/>
+ <pathelement
location="${int.sunri.dir}/thirdparty/jbossws-framework.jar"/>
</path>
</target>
Modified: stack/metro/branches/hbraun/ant-import/macros-deploy-sunri.xml
===================================================================
--- stack/metro/branches/hbraun/ant-import/macros-deploy-sunri.xml 2007-12-20 20:13:24 UTC
(rev 5383)
+++ stack/metro/branches/hbraun/ant-import/macros-deploy-sunri.xml 2007-12-21 10:13:24 UTC
(rev 5384)
@@ -102,7 +102,8 @@
<include name="jsr181-api.jar"/>
<include name="saaj-api.jar"/>
<include name="saaj-impl.jar"/>
- </fileset>
+ <include name="jboss-wsit-tools.jar"/>
+ </fileset>
</copy>
<copy todir="${jboss423.home}/lib" overwrite="true">
<fileset dir="@{thirdpartylibs}">
@@ -134,7 +135,8 @@
<include name="saaj-api.jar"/>
<include name="saaj-impl.jar"/>
<include name="jbossws-sunri-client.jar"/>
- </fileset>
+ <include name="jboss-wsit-tools.jar"/>
+ </fileset>
</delete>
<delete
dir="${jboss423.home}/server/${jboss.server.instance}/deploy/jbossws-sunri.sar"/>
<delete
dir="${jboss423.home}/server/${jboss.server.instance}/deploy/juddi-service.sar"/>
Modified: stack/metro/branches/hbraun/ant-import/metro-build-adapter.xml
===================================================================
--- stack/metro/branches/hbraun/ant-import/metro-build-adapter.xml 2007-12-20 20:13:24 UTC
(rev 5383)
+++ stack/metro/branches/hbraun/ant-import/metro-build-adapter.xml 2007-12-21 10:13:24 UTC
(rev 5384)
@@ -5,8 +5,9 @@
<import file="properties.xml"/>
<import file="build.xml"/>
- <property name="thirdparty.gen"
value="../../../../thirdparty-gen"/>
-
+ <property name="thirdparty.gen"
value="../../../thirdparty-gen"/>
+ <property name="thirdparty" value="../../../thirdparty"/>
+
<target name="adapter.init">
<!-- Directory for metro generated jars that are not distributed through
'repository.jboss.com' -->
<mkdir dir="${thirdparty.gen}"/>
@@ -17,29 +18,53 @@
-->
<target name="-metro.runtime.jar" depends="WSIT.main">
<ant dir="." target="create-wsit-runtime-jar"/>
+ <mkdir dir="${rt.dir}/build/jboss-tmp"/>
+ <unzip src="${rt.dir}/build/wsit-rt.jar"
dest="${rt.dir}/build/jboss-tmp/"/>
+ <rename src="${rt.dir}/build/jboss-tmp/WEB-INF"
dest="${rt.dir}/build/jboss-tmp/wsdl"/>
+ <zip destfile="${rt.dir}/build/jboss-wsit-rt.jar"
basedir="${rt.dir}/build/jboss-tmp/"/>
</target>
+ <!-- build the metro tools extension -->
+ <target name="-metro.tools.jar">
+ <ant dir="tools" target="wsit-jars-tools">
+ <property name="tools.dir" value="."/>
+ </ant>
+
+ <mkdir dir="${tools.dir}/build/jboss-tmp"/>
+
+ <copy todir="${tools.dir}/build/jboss-tmp/META-INF/services"
overwrite="true" verbose="true">
+ <fileset dir="./etc/META-INF/services">
+ <include name="*.TWSDLExtensionHandler"/>
+ </fileset>
+ </copy>
+
+ <unzip src="${tools.dir}/build/wsit-tools.jar"
dest="${tools.dir}/build/jboss-tmp/"/>
+
+ <zip destfile="${tools.dir}/build/jboss-wsit-tools.jar"
basedir="${tools.dir}/build/jboss-tmp/"/>
+ </target>
+
+
<target name="metro.jars" description="Creates the metro standalone
jars" depends="init">
<antcall target="-metro.runtime.jar"/>
+ <antcall target="-metro.tools.jar"/>
</target>
<target name="copy-binaries"
description="Builds the metro jars and copies them to
thirdparty-gen"
depends="metro.jars">
-
- <mkdir dir="${rt.dir}/build/jboss-tmp"/>
- <unzip src="${rt.dir}/build/wsit-rt.jar"
dest="${rt.dir}/build/jboss-tmp/"/>
- <rename src="${rt.dir}/build/jboss-tmp/WEB-INF"
dest="${rt.dir}/build/jboss-tmp/wsdl"/>
- <zip destfile="${rt.dir}/build/jboss-wsit-rt.jar"
basedir="${rt.dir}/build/jboss-tmp/"/>
-
<copy todir="${thirdparty.gen}" verbose="true">
- <!-- Generated jars -->
+ <!-- runtime jars -->
<fileset dir="${rt.dir}/build/">
<include name="jboss-wsit-rt.jar"/>
</fileset>
+ <!-- tools jars -->
+ <fileset dir="${tools.dir}/build/">
+ <include name="jboss-wsit-tools.jar"/>
+ </fileset>
+
<!-- Metro 3rd party thats not available through
repo.jboss.com -->
<fileset dir="${lib.runtime.dir}">
Modified: stack/metro/branches/hbraun/ant-import-tests/build-jars-jaxws.xml
===================================================================
--- stack/metro/branches/hbraun/ant-import-tests/build-jars-jaxws.xml 2007-12-20 20:13:24
UTC (rev 5383)
+++ stack/metro/branches/hbraun/ant-import-tests/build-jars-jaxws.xml 2007-12-21 10:13:24
UTC (rev 5384)
@@ -9,27 +9,29 @@
<!-- $Id$ -->
<project>
-
- <description>JBossWS test archive builder</description>
-
- <!-- ================================================================== -->
- <!-- Building -->
- <!-- ================================================================== -->
-
- <target name="build-jars-jaxws" description="Build the
deployments.">
-
- <mkdir dir="${tests.output.dir}/libs"/>
-
- <!-- wsit-rm -->
- <war warfile="${tests.output.dir}/libs/wsit-rm.war"
webxml="${tests.output.dir}/resources/wsit/rm/WEB-INF/web.xml">
- <classes dir="${tests.output.dir}/classes">
- <include name="org/jboss/test/ws/wsit/rm/**/*.class"/>
- </classes>
- <webinf dir="${tests.output.dir}/resources/wsit/rm/WEB-INF">
- <include name="*/**"/>
- </webinf>
- </war>
-
- </target>
+ <description>JBossWS test archive builder</description>
+
+ <!-- ================================================================== -->
+ <!-- Building -->
+ <!-- ================================================================== -->
+
+ <target name="build-jars-jaxws" description="Build the
deployments.">
+
+ <mkdir dir="${tests.output.dir}/libs"/>
+
+ <!-- wsit-rm -->
+ <war warfile="${tests.output.dir}/libs/wsit-rm.war"
webxml="${tests.output.dir}/resources/wsit/rm/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/classes">
+ <include name="org/jboss/test/ws/wsit/rm/**/*.class"/>
+ </classes>
+ <webinf dir="${tests.output.dir}/resources/wsit/rm/WEB-INF">
+ <include name="sun-web.xml"/>
+ <include name="web.xml"/>
+ <include
name="wsit-org.jboss.test.ws.wsit.rm.CalculatorWS.xml"/>
+ </webinf>
+ </war>
+
+
+ </target>
</project>
Modified: stack/metro/branches/hbraun/ant-import-tests/build-testsuite.xml
===================================================================
--- stack/metro/branches/hbraun/ant-import-tests/build-testsuite.xml 2007-12-20 20:13:24
UTC (rev 5383)
+++ stack/metro/branches/hbraun/ant-import-tests/build-testsuite.xml 2007-12-21 10:13:24
UTC (rev 5384)
@@ -26,19 +26,22 @@
Init the various classpaths
-->
<target name="tests-init"
depends="thirdparty-classpath,tests-classpath">
-
+
<path id="ws.stack.classpath">
<pathelement
location="${int.sunri.dir}/thirdparty/jbossws-common.jar"/>
<pathelement
location="${int.sunri.dir}/thirdparty/jbossws-spi.jar"/>
<pathelement
location="${int.sunri.dir}/thirdparty/FastInfoset.jar"/>
<pathelement location="${int.sunri.dir}/thirdparty/http.jar"/>
- <pathelement
location="${int.sunri.dir}/thirdparty/jaxrpc-api.jar"/>
<pathelement
location="${int.sunri.dir}/thirdparty/jaxws-api.jar"/>
<pathelement
location="${int.sunri.dir}/thirdparty/jaxws-rt.jar"/>
+
<pathelement
location="${int.sunri.dir}/thirdparty/jaxws-tools.jar"/>
- <pathelement
location="${int.sunri.dir}/thirdparty/jsr173_api.jar"/>
+ <pathelement
location="${int.sunri.dir}/thirdparty-gen/jboss-wsit-tools.jar"/>
+ <pathelement
location="${int.sunri.dir}/thirdparty-gen/jboss-wsit-rt.jar"/>
+
+ <!--pathelement
location="${int.sunri.dir}/thirdparty/jsr173_api.jar"/>
<pathelement
location="${int.sunri.dir}/thirdparty/jsr181-api.jar"/>
- <pathelement
location="${int.sunri.dir}/thirdparty/jsr250-api.jar"/>
+ <pathelement
location="${int.sunri.dir}/thirdparty/jsr250-api.jar"/-->
<pathelement
location="${int.sunri.dir}/thirdparty/resolver.jar"/>
<pathelement
location="${int.sunri.dir}/thirdparty/saaj-api.jar"/>
<pathelement
location="${int.sunri.dir}/thirdparty/saaj-impl.jar"/>
@@ -47,15 +50,19 @@
<pathelement
location="${int.sunri.dir}/thirdparty/streambuffer.jar"/>
<pathelement location="${int.sunri.dir}/thirdparty/wstx.jar"/>
<pathelement
location="${int.sunri.dir}/thirdparty/wsdl4j.jar"/>
+
+ <pathelement
location="${int.sunri.dir}/thirdparty-gen/xws-security.jar"/>
</path>
<path id="tests.extra.classpath">
<pathelement
location="${int.sunri.dir}/output/lib/jbossws-sunri-client.jar"/>
- <pathelement
location="${int.sunri.dir}/thirdparty/jbossws-framework.jar"/>
- <pathelement
location="${int.sunri.dir}/thirdparty/jaxws-tools.jar"/>
+ <pathelement
location="${int.sunri.dir}/thirdparty/jbossws-framework.jar"/>
</path>
-
+ <taskdef name="wsimport"
classname="com.sun.tools.ws.ant.WsImport">
+ <classpath refid="ws.stack.classpath"/>
+ </taskdef>
+
</target>
<!-- ================================================================== -->
@@ -64,7 +71,16 @@
<target name="wsimport" depends="tests-init"
description="Consume JAX-WS contracts">
- <!-- placeholder for jaxws tools extensions -->
+ <mkdir dir="${tests.output.dir}/wsimport"/>
+
+ <wsimport
+ wsdl="${tests.resources.dir}/wsit/rm/WEB-INF/wsdl/Calc.wsdl"
+ destdir="${tests.output.dir}/wsimport"
+ sourcedestdir="${tests.output.dir}/wsimport"
+ keep="true"
+ verbose="false"
+ package="org.jboss.test.ws.wsit.rm"/>
+
</target>
<!--
@@ -85,6 +101,7 @@
<!-- ================================================================== -->
<target name="tests-compile" depends="wsimport,tests-classpath"
description="Compile sources">
+ <macro-compile-classes srcdir="${tests.output.dir}/wsimport"
excludesfile="${excludesfile}"/>
<macro-compile-classes srcdir="${sunri.dir}/src/test-framework/java"
excludesfile="${excludesfile}"/>
<macro-compile-classes srcdir="${sunri.dir}/src/test/java"
excludesfile="${excludesfile}"/>
</target>
Modified: stack/metro/branches/hbraun/build.xml
===================================================================
--- stack/metro/branches/hbraun/build.xml 2007-12-20 20:13:24 UTC (rev 5383)
+++ stack/metro/branches/hbraun/build.xml 2007-12-21 10:13:24 UTC (rev 5384)
@@ -223,16 +223,16 @@
<fileset dir="${thirdparty.dir}">
<include name="FastInfoset.jar"/>
<include name="http.jar"/>
+ <include name="jboss-wsit-tools.jar"/>
<include name="jaxb-api.jar"/>
<include name="jaxb-impl.jar"/>
<include name="jaxrpc-api.jar"/>
<include name="jaxws-api.jar"/>
<include name="jaxws-rt.jar"/>
<include name="jaxws-tools.jar"/>
+ <include name="jsr181-api.jar"/>
<include name="jsr173_api.jar"/>
- <include name="jsr181-api.jar"/>
<include name="jsr250-api.jar"/>
-
<include name="saaj-api.jar"/>
<include name="saaj-impl.jar"/>
<include name="sjsxp.jar"/>
Added: stack/metro/branches/hbraun/src/test/etc/log4j.xml
===================================================================
--- stack/metro/branches/hbraun/src/test/etc/log4j.xml (rev 0)
+++ stack/metro/branches/hbraun/src/test/etc/log4j.xml 2007-12-21 10:13:24 UTC (rev 5384)
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<!-- ===================================================================== -->
+<!-- -->
+<!-- Log4j Configuration -->
+<!-- -->
+<!-- ===================================================================== -->
+
+<!-- $Id$ -->
+
+<!--
+| For more configuration infromation and examples see the Jakarta Log4j
+| owebsite:
http://jakarta.apache.org/log4j
+-->
+
+<log4j:configuration
xmlns:log4j="http://jakarta.apache.org/log4j/"
debug="false">
+
+ <!-- ================================= -->
+ <!-- Preserve messages in a local file -->
+ <!-- ================================= -->
+
+ <!-- A time/date based rolling appender -->
+ <appender name="FILE"
class="org.jboss.logging.appender.DailyRollingFileAppender">
+ <param name="File" value="${build.testlog}/test.log"/>
+ <param name="Append" value="false"/>
+
+ <!-- Rollover at midnight each day -->
+ <param name="DatePattern" value="'.'yyyy-MM-dd"/>
+
+ <layout class="org.apache.log4j.PatternLayout">
+ <!-- The default pattern: Date Priority [Category] Message\n -->
+ <param name="ConversionPattern" value="%d %-5p [%c:%L]
%m%n"/>
+ </layout>
+ </appender>
+
+ <!-- ============================== -->
+ <!-- Append messages to the console -->
+ <!-- ============================== -->
+
+ <appender name="CONSOLE"
class="org.apache.log4j.ConsoleAppender">
+ <param name="Threshold" value="INFO"/>
+ <param name="Target" value="System.out"/>
+
+ <layout class="org.apache.log4j.PatternLayout">
+ <!-- The default pattern: Date Priority [Category] Message\n -->
+ <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}]
%m%n"/>
+ </layout>
+ </appender>
+
+ <!-- ================ -->
+ <!-- Limit categories -->
+ <!-- ================ -->
+
+ <category name="org.jboss.ws">
+ <priority value="DEBUG"/>
+ </category>
+
+ <category name="org.jboss.ws.core.MessageTrace">
+ <priority value="TRACE" class="org.jboss.logging.XLevel"/>
+ </category>
+
+ <category name="org.jboss.remoting">
+ <priority value="INFO"/>
+ </category>
+
+ <!-- Apache security is verbose -->
+ <category name="org.apache.xml.security">
+ <priority value="INFO"/>
+ </category>
+
+ <!--
+ <category name="org.jboss.xb">
+ <priority value="TRACE" class="org.jboss.logging.XLevel"/>
+ </category>
+ -->
+
+ <!-- ======================= -->
+ <!-- Setup the Root category -->
+ <!-- ======================= -->
+
+ <root>
+<!--
+ <appender-ref ref="CONSOLE"/>
+-->
+ <appender-ref ref="FILE"/>
+ </root>
+
+</log4j:configuration>
Property changes on: stack/metro/branches/hbraun/src/test/etc/log4j.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Deleted: stack/metro/branches/hbraun/src/test/java/org/jboss/test/ws/wsit/rm/CalcIF.java
===================================================================
---
stack/metro/branches/hbraun/src/test/java/org/jboss/test/ws/wsit/rm/CalcIF.java 2007-12-20
20:13:24 UTC (rev 5383)
+++
stack/metro/branches/hbraun/src/test/java/org/jboss/test/ws/wsit/rm/CalcIF.java 2007-12-21
10:13:24 UTC (rev 5384)
@@ -1,12 +0,0 @@
-package org.jboss.test.ws.wsit.rm;
-
-import javax.jws.WebMethod;
-import javax.jws.WebParam;
-import javax.jws.WebService;
-
-@WebService(targetNamespace = "http://calculator.me.org/", portName =
"CalculatorWS")
-public interface CalcIF
-{
- @WebMethod(operationName = "add")
- public int add(@WebParam(name = "i") int i, @WebParam(name = "j")
int j);
-}
Deleted:
stack/metro/branches/hbraun/src/test/java/org/jboss/test/ws/wsit/rm/CalculatorWS.java
===================================================================
---
stack/metro/branches/hbraun/src/test/java/org/jboss/test/ws/wsit/rm/CalculatorWS.java 2007-12-20
20:13:24 UTC (rev 5383)
+++
stack/metro/branches/hbraun/src/test/java/org/jboss/test/ws/wsit/rm/CalculatorWS.java 2007-12-21
10:13:24 UTC (rev 5384)
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 2007, Sun Microsystems, Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * * Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- *
- * * Neither the name of Sun Microsystems, Inc. nor the names of its contributors
- * may be used to endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-package org.jboss.test.ws.wsit.rm;
-
-import javax.jws.WebMethod;
-import javax.jws.WebParam;
-import javax.jws.WebService;
-
-/**
- *
- * @author User
- */
-@WebService(targetNamespace = "http://calculator.me.org/")
-public class CalculatorWS implements CalcIF
-{
-
- /**
- * Web service operation
- */
- @WebMethod(operationName = "add")
- public int add(@WebParam(name = "i") int i, @WebParam(name = "j")
int j) {
- return i + j;
- }
-
-}
Copied:
stack/metro/branches/hbraun/src/test/java/org/jboss/test/ws/wsit/rm/CalculatorWSImpl.java
(from rev 5371,
stack/metro/branches/hbraun/src/test/java/org/jboss/test/ws/wsit/rm/CalculatorWS.java)
===================================================================
---
stack/metro/branches/hbraun/src/test/java/org/jboss/test/ws/wsit/rm/CalculatorWSImpl.java
(rev 0)
+++
stack/metro/branches/hbraun/src/test/java/org/jboss/test/ws/wsit/rm/CalculatorWSImpl.java 2007-12-21
10:13:24 UTC (rev 5384)
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2007, Sun Microsystems, Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * * Neither the name of Sun Microsystems, Inc. nor the names of its contributors
+ * may be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.jboss.test.ws.wsit.rm;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebService;
+
+/**
+ *
+ * @author User
+ */
+@WebService(
+ targetNamespace = "http://calculator.me.org/",
+ portName = "CalculatorWSPort",
+ serviceName = "CalculatorWSService"
+)
+public class CalculatorWSImpl implements CalculatorWS
+{
+
+ /**
+ * Web service operation
+ */
+ @WebMethod(operationName = "add")
+ public int add(@WebParam(name = "i") int i, @WebParam(name = "j")
int j)
+ {
+
+ int result = i + j;
+ System.out.println("*** WSIT-RM ***");
+ System.out.println("Result is: " + result);
+ return result;
+ }
+
+}
Property changes on:
stack/metro/branches/hbraun/src/test/java/org/jboss/test/ws/wsit/rm/CalculatorWSImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified:
stack/metro/branches/hbraun/src/test/java/org/jboss/test/ws/wsit/rm/RMTestCase.java
===================================================================
---
stack/metro/branches/hbraun/src/test/java/org/jboss/test/ws/wsit/rm/RMTestCase.java 2007-12-20
20:13:24 UTC (rev 5383)
+++
stack/metro/branches/hbraun/src/test/java/org/jboss/test/ws/wsit/rm/RMTestCase.java 2007-12-21
10:13:24 UTC (rev 5384)
@@ -4,11 +4,12 @@
import org.jboss.wsf.test.JBossWSTest;
import org.jboss.wsf.test.JBossWSTestSetup;
-import javax.xml.ws.Service;
import javax.xml.namespace.QName;
import java.net.URL;
+import com.sun.xml.ws.Closeable;
+
public class RMTestCase extends JBossWSTest
{
public static Test suite()
@@ -17,19 +18,20 @@
}
public void testRMExchange() throws Exception
- {
- Service service = Service.create(
- new URL("http://"+getServerHost()+":8080/wsit-rm?wsdl"),
- new
QName("http://calculator.me.org/","CalculatorWSService")
- );
+ {
+ URL url = new URL("http://" + getServerHost() +
":8080/wsit-rm?wsdl");
+ QName qName = new
QName("http://calculator.me.org/",
"CalculatorWSService");
+
+ CalculatorWSService service = new CalculatorWSService(url,qName);
+ CalculatorWS port = service.getCalculatorWSPort();
- CalcIF port = service.getPort(new
QName("http://calculator.me.org/","CalculatorWSPort"), CalcIF.class);
-
int i = 10;
int j = 20;
int result = port.add(i, j);
assertTrue(result == 30);
+
+ ((Closeable)port).close();
}
}
Modified: stack/metro/branches/hbraun/src/test/resources/wsit/rm/WEB-INF/web.xml
===================================================================
--- stack/metro/branches/hbraun/src/test/resources/wsit/rm/WEB-INF/web.xml 2007-12-20
20:13:24 UTC (rev 5383)
+++ stack/metro/branches/hbraun/src/test/resources/wsit/rm/WEB-INF/web.xml 2007-12-21
10:13:24 UTC (rev 5384)
@@ -5,7 +5,7 @@
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<servlet>
<servlet-name>Calculator</servlet-name>
-
<servlet-class>org.jboss.test.ws.wsit.rm.CalculatorWS</servlet-class>
+
<servlet-class>org.jboss.test.ws.wsit.rm.CalculatorWSImpl</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Calculator</servlet-name>
Added: stack/metro/branches/hbraun/src/test/resources/wsit/rm/WEB-INF/wsdl/Calc.wsdl
===================================================================
--- stack/metro/branches/hbraun/src/test/resources/wsit/rm/WEB-INF/wsdl/Calc.wsdl
(rev 0)
+++
stack/metro/branches/hbraun/src/test/resources/wsit/rm/WEB-INF/wsdl/Calc.wsdl 2007-12-21
10:13:24 UTC (rev 5384)
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Published by JAX-WS RI at
http://jax-ws.dev.java.net. RI's version is JAX-WS
RI 2.1.2_01-hudson-189-. -->
+<!-- Generated by JAX-WS RI at
http://jax-ws.dev.java.net. RI's version is JAX-WS
RI 2.1.2_01-hudson-189-. -->
+<definitions
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-w...
+
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
+
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+
xmlns:tns="http://calculator.me.org/"
+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+
xmlns="http://schemas.xmlsoap.org/wsdl/"
+
targetNamespace="http://calculator.me.org/"
+ name="CalculatorWSService">
+
+ <wsp:UsingPolicy></wsp:UsingPolicy>
+ <wsp:Policy wsu:Id="CalculatorWSPortBindingPolicy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <ns1:RMAssertion
xmlns:ns1="http://schemas.xmlsoap.org/ws/2005/02/rm/policy">...
+ <ns2:UsingAddressing
xmlns:ns2="http://www.w3.org/2006/05/addressing/wsdl"></n...
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+ <types>
+ <xsd:schema>
+ <!--
http://calculator.me.org/ -->
+ <xsd:import
namespace="http://calculator.me.org/"
schemaLocation="xsd1.xsd"></xsd:import>
+ </xsd:schema>
+
+ </types>
+ <message name="add">
+ <part name="parameters" element="tns:add"></part>
+ </message>
+ <message name="addResponse">
+ <part name="parameters"
element="tns:addResponse"></part>
+ </message>
+ <portType name="CalculatorWS">
+ <operation name="add">
+ <input message="tns:add"></input>
+ <output message="tns:addResponse"></output>
+ </operation>
+ </portType>
+ <binding name="CalculatorWSPortBinding"
type="tns:CalculatorWS">
+ <wsp:PolicyReference
URI="#CalculatorWSPortBindingPolicy"></wsp:PolicyReference>
+ <soap:binding
transport="http://schemas.xmlsoap.org/soap/http"
style="document"></soap:binding>
+ <operation name="add">
+
+ <soap:operation soapAction=""></soap:operation>
+ <input>
+ <soap:body use="literal"></soap:body>
+ </input>
+ <output>
+ <soap:body use="literal"></soap:body>
+ </output>
+ </operation>
+ </binding>
+ <service name="CalculatorWSService">
+ <port name="CalculatorWSPort"
binding="tns:CalculatorWSPortBinding">
+ <soap:address
location="http://127.0.0.1:8080/wsit-rm"></soap:address>
+ </port>
+ </service>
+</definitions>
\ No newline at end of file
Property changes on:
stack/metro/branches/hbraun/src/test/resources/wsit/rm/WEB-INF/wsdl/Calc.wsdl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/metro/branches/hbraun/src/test/resources/wsit/rm/WEB-INF/wsdl/xsd1.xsd
===================================================================
--- stack/metro/branches/hbraun/src/test/resources/wsit/rm/WEB-INF/wsdl/xsd1.xsd
(rev 0)
+++
stack/metro/branches/hbraun/src/test/resources/wsit/rm/WEB-INF/wsdl/xsd1.xsd 2007-12-21
10:13:24 UTC (rev 5384)
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Published by JAX-WS RI at
http://jax-ws.dev.java.net. RI's version is JAX-WS
RI 2.1.2_01-hudson-189-. -->
+<xs:schema
xmlns:tns="http://calculator.me.org/"
+
xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ version="1.0"
+
targetNamespace="http://calculator.me.org/">
+
+ <xs:element name="add" type="tns:add"></xs:element>
+
+ <xs:element name="addResponse"
type="tns:addResponse"></xs:element>
+
+ <xs:complexType name="add">
+ <xs:sequence>
+ <xs:element name="i"
type="xs:int"></xs:element>
+ <xs:element name="j"
type="xs:int"></xs:element>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="addResponse">
+ <xs:sequence>
+ <xs:element name="return"
type="xs:int"></xs:element>
+ </xs:sequence>
+
+ </xs:complexType>
+</xs:schema>
\ No newline at end of file
Property changes on:
stack/metro/branches/hbraun/src/test/resources/wsit/rm/WEB-INF/wsdl/xsd1.xsd
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF