Author: richard.opalka(a)jboss.com
Date: 2008-04-10 06:31:50 -0400 (Thu, 10 Apr 2008)
New Revision: 6323
Removed:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/Helper.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/oneway/
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/reqres/
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/services/
stack/native/trunk/src/test/resources/jaxws/wsrm/
Modified:
stack/native/trunk/ant-import-tests/build-jars-jaxws.xml
Log:
[JBWS-2097] refactoring - wsrm tests moved to framework
Modified: stack/native/trunk/ant-import-tests/build-jars-jaxws.xml
===================================================================
--- stack/native/trunk/ant-import-tests/build-jars-jaxws.xml 2008-04-10 10:28:06 UTC (rev
6322)
+++ stack/native/trunk/ant-import-tests/build-jars-jaxws.xml 2008-04-10 10:31:50 UTC (rev
6323)
@@ -440,87 +440,6 @@
</webinf>
</war>
- <!-- jaxws-wsrm -->
- <war warfile="${tests.output.dir}/libs/jaxws-wsrm.war"
-
webxml="${tests.output.dir}/resources/jaxws/wsrm/WEB-INF/unsecure/web.xml">
- <classes dir="${tests.output.dir}/classes">
- <include
name="org/jboss/test/ws/jaxws/wsrm/services/OneWayServiceIface.class"/>
- <include
name="org/jboss/test/ws/jaxws/wsrm/services/OneWayServiceImpl.class"/>
- <include
name="org/jboss/test/ws/jaxws/wsrm/services/ReqResServiceIface.class"/>
- <include
name="org/jboss/test/ws/jaxws/wsrm/services/ReqResServiceImpl.class"/>
- </classes>
- <webinf dir="${tests.output.dir}/resources/jaxws/wsrm/WEB-INF">
- <include name="wsrm-jaxws-endpoint-config.xml"/>
- </webinf>
- <zipfileset
- dir="${tests.output.dir}/resources/jaxws/wsrm/WEB-INF/unsecure/wsdl"
- prefix="WEB-INF/wsdl"/>
- <zipfileset
-
file="${tests.output.dir}/resources/jaxws/wsrm/WEB-INF/unsecure/standard-jaxws-endpoint-config.xml"
- prefix="META-INF"/>
- </war>
-
- <war warfile="${tests.output.dir}/libs/jaxws-secured-wsrm.war"
-
webxml="${tests.output.dir}/resources/jaxws/wsrm/WEB-INF/secure/web.xml">
- <classes dir="${tests.output.dir}/classes">
- <include
name="org/jboss/test/ws/jaxws/wsrm/services/SecuredOneWayServiceIface.class"/>
- <include
name="org/jboss/test/ws/jaxws/wsrm/services/SecuredOneWayServiceImpl.class"/>
- <include
name="org/jboss/test/ws/jaxws/wsrm/services/SecuredReqResServiceIface.class"/>
- <include
name="org/jboss/test/ws/jaxws/wsrm/services/SecuredReqResServiceImpl.class"/>
- </classes>
- <webinf dir="${tests.output.dir}/resources/jaxws/wsrm/WEB-INF">
- <include name="wsrm-jaxws-endpoint-config.xml"/>
- </webinf>
- <webinf
dir="${tests.output.dir}/resources/jaxws/wsrm/wssecurity/WEB-INF">
- <include name="jboss-wsse-server.xml"/>
- </webinf>
- <webinf dir="${tests.output.dir}/resources/jaxws/wsrm/wssecurity">
- <include name="wsse.keystore"/>
- <include name="wsse.truststore"/>
- </webinf>
- <zipfileset
- dir="${tests.output.dir}/resources/jaxws/wsrm/WEB-INF/secure/wsdl"
- prefix="WEB-INF/wsdl"/>
- <zipfileset
-
file="${tests.output.dir}/resources/jaxws/wsrm/WEB-INF/secure/standard-jaxws-endpoint-config.xml"
- prefix="META-INF"/>
- </war>
-
- <war warfile="${tests.output.dir}/libs/jaxws-wsrm-one-way-emulator.war"
-
webxml="${tests.output.dir}/resources/jaxws/wsrm/emulator/oneway/WEB-INF/web.xml">
- <classes dir="${tests.output.dir}/classes">
- <include
name="org/jboss/test/ws/jaxws/wsrm/emulator/**/*.class"/>
- </classes>
- <zipfileset
dir="${tests.output.dir}/resources/jaxws/wsrm/emulator/oneway/config"
prefix="config"/>
- <zipfileset
dir="${tests.output.dir}/resources/jaxws/wsrm/emulator/oneway/resources"
prefix="resources"/>
- <zipfileset
dir="${tests.output.dir}/resources/jaxws/wsrm/emulator/common/resources"
prefix="resources"/>
- </war>
-
- <war warfile="${tests.output.dir}/libs/jaxws-wsrm-req-res-emulator.war"
-
webxml="${tests.output.dir}/resources/jaxws/wsrm/emulator/reqres/WEB-INF/web.xml">
- <classes dir="${tests.output.dir}/classes">
- <include
name="org/jboss/test/ws/jaxws/wsrm/emulator/**/*.class"/>
- </classes>
- <zipfileset
dir="${tests.output.dir}/resources/jaxws/wsrm/emulator/reqres/config"
prefix="config"/>
- <zipfileset
dir="${tests.output.dir}/resources/jaxws/wsrm/emulator/reqres/resources"
prefix="resources"/>
- <zipfileset
dir="${tests.output.dir}/resources/jaxws/wsrm/emulator/common/resources"
prefix="resources"/>
- </war>
-
- <jar jarfile="${tests.output.dir}/libs/jaxws-wsrm-client.jar">
- <metainf dir="${tests.output.dir}/resources/jaxws/wsrm/META-INF">
- <include name="wsrm-jaxws-client-config.xml"/>
- </metainf>
- </jar>
-
- <jar
jarfile="${tests.output.dir}/libs/jaxws-secured-wsrm-client.jar">
- <metainf dir="${tests.output.dir}/resources/jaxws/wsrm/META-INF">
- <include name="wsrm-jaxws-client-config.xml"/>
- </metainf>
- <metainf
dir="${tests.output.dir}/resources/jaxws/wsrm/wssecurity/META-INF">
- <include name="jboss-wsse-client.xml"/>
- </metainf>
- </jar>
-
<!-- Please add alphabetically -->
</target>
Deleted: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/Helper.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/Helper.java 2008-04-10
10:28:06 UTC (rev 6322)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/Helper.java 2008-04-10
10:31:50 UTC (rev 6323)
@@ -1,99 +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.jaxws.wsrm;
-
-import java.lang.reflect.Method;
-import java.net.URI;
-import java.net.URISyntaxException;
-import javax.xml.ws.BindingProvider;
-import javax.xml.ws.addressing.AddressingBuilder;
-import javax.xml.ws.addressing.AddressingConstants;
-import javax.xml.ws.addressing.AddressingProperties;
-import javax.xml.ws.addressing.JAXWSAConstants;
-import org.jboss.wsf.common.utils.UUIDGenerator;
-
-/**
- * WS-RM Tests helper
- *
- * @author richard.opalka(a)jboss.com
- */
-public final class Helper
-{
-
- private static AddressingBuilder BUILDER;
- private static AddressingConstants CONSTANTS;
-
- static
- {
- BUILDER = AddressingBuilder.getAddressingBuilder();
- CONSTANTS = BUILDER.newAddressingConstants();
- }
-
- private Helper()
- {
- // no instances
- }
-
- /**
- * Setup addressing SOAP headers for specified proxy
- * @param proxy
- * @param wsaAction
- * @param serviceURL
- */
- public static void setAddrProps(Object proxy, String wsaAction, String serviceURL)
- {
- BindingProvider bp = (BindingProvider)proxy;
- AddressingProperties props = createAnonymousProps(wsaAction, serviceURL);
-
- bp.getRequestContext().put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND,
props);
- }
-
- public static AddressingProperties createAnonymousProps(String wsaAction, String
wsaTo)
- {
- try
- {
- AddressingProperties addrProps = BUILDER.newAddressingProperties();
- addrProps.setMessageID(BUILDER.newURI(new URI("urn:uuid:" +
UUIDGenerator.generateRandomUUIDString())));
- addrProps.setAction(BUILDER.newURI(wsaAction));
- addrProps.setTo(BUILDER.newURI(wsaTo));
- addrProps.setReplyTo(BUILDER.newEndpointReference(new
URI(CONSTANTS.getAnonymousURI())));
- return addrProps;
- }
- catch (URISyntaxException e)
- {
- throw new IllegalArgumentException(e.getMessage());
- }
- }
-
- /**
- * Invokes method using java reflection api
- * @throws Exception if some reflection related problem occurs
- */
- public static Object invokeMethodUsingReflection(String ifaceName, Object object,
String methodName, Class<?>[] parametersSignature, Object[] parameters)
- throws Exception
- {
- Object castedObject = Class.forName(ifaceName).cast(object);
- Method castedObjectMethod = castedObject.getClass().getMethod(methodName,
parametersSignature);
- return castedObjectMethod.invoke(castedObject, parameters);
- }
-
-}