Author: richard.opalka(a)jboss.com
Date: 2008-04-14 14:43:20 -0400 (Mon, 14 Apr 2008)
New Revision: 6429
Added:
stack/native/trunk/src/test/resources/jaxws/samples/wsrm/META-INF/
stack/native/trunk/src/test/resources/jaxws/samples/wsrm/META-INF/wsrm-jaxws-client-config.xml
stack/native/trunk/src/test/resources/jaxws/samples/wsrm/WEB-INF/wsrm-jaxws-endpoint-config.xml
Modified:
stack/native/trunk/ant-import-tests/build-jars-jaxws.xml
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsrm/client/SimpleServiceTestCase.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsrm/service/SimpleServiceImpl.java
stack/native/trunk/src/test/resources/jaxws/samples/wsrm/WEB-INF/wsdl/SimpleService.wsdl
Log:
[JBWS-2097][JBWS-2138] finalizing WS-RM example for native based on prepared tutorial
Modified: stack/native/trunk/ant-import-tests/build-jars-jaxws.xml
===================================================================
--- stack/native/trunk/ant-import-tests/build-jars-jaxws.xml 2008-04-14 17:38:18 UTC (rev
6428)
+++ stack/native/trunk/ant-import-tests/build-jars-jaxws.xml 2008-04-14 18:43:20 UTC (rev
6429)
@@ -504,8 +504,17 @@
<zipfileset
dir="${tests.output.dir}/resources/jaxws/samples/wsrm/WEB-INF/wsdl"
prefix="WEB-INF/wsdl"/>
+ <zipfileset
+
file="${tests.output.dir}/resources/jaxws/samples/wsrm/WEB-INF/wsrm-jaxws-endpoint-config.xml"
+ prefix="META-INF"/>
</war>
+ <jar
jarfile="${tests.output.dir}/libs/jaxws-samples-wsrm-client.jar">
+ <metainf
dir="${tests.output.dir}/resources/jaxws/samples/wsrm/META-INF">
+ <include name="wsrm-jaxws-client-config.xml"/>
+ </metainf>
+ </jar>
+
<!-- Please add alphabetically -->
</target>
Modified:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsrm/client/SimpleServiceTestCase.java
===================================================================
---
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsrm/client/SimpleServiceTestCase.java 2008-04-14
17:38:18 UTC (rev 6428)
+++
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsrm/client/SimpleServiceTestCase.java 2008-04-14
18:43:20 UTC (rev 6429)
@@ -21,13 +21,14 @@
*/
package org.jboss.test.ws.jaxws.samples.wsrm.client;
-import java.lang.reflect.Method;
import java.net.URL;
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
import junit.framework.Test;
+import org.jboss.ws.core.StubExt;
+import org.jboss.ws.extensions.wsrm.api.RMProvider;
import org.jboss.wsf.test.JBossWSTest;
import org.jboss.wsf.test.JBossWSTestSetup;
import org.jboss.test.ws.jaxws.samples.wsrm.generated.SimpleService;
@@ -44,7 +45,7 @@
public static Test suite()
{
- return new JBossWSTestSetup(SimpleServiceTestCase.class,
"jaxws-samples-wsrm.war");
+ return new JBossWSTestSetup(SimpleServiceTestCase.class,
"jaxws-samples-wsrm.war, jaxws-samples-wsrm-client.jar");
}
@Override
@@ -56,12 +57,14 @@
URL wsdlURL = new URL(serviceURL + "?wsdl");
Service service = Service.create(wsdlURL, serviceName);
proxy = (SimpleService)service.getPort(SimpleService.class);
+ ((StubExt)proxy).setConfigName("Standard Anonymous WSRM Client",
"META-INF/wsrm-jaxws-client-config.xml");
}
public void test() throws Exception
{
proxy.ping(); // one way call
assertEquals("Hello World!", proxy.echo("Hello World!")); //
request responce call
+ ((RMProvider)proxy).closeSequence();
}
}
Modified:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsrm/service/SimpleServiceImpl.java
===================================================================
---
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsrm/service/SimpleServiceImpl.java 2008-04-14
17:38:18 UTC (rev 6428)
+++
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsrm/service/SimpleServiceImpl.java 2008-04-14
18:43:20 UTC (rev 6429)
@@ -25,6 +25,8 @@
import javax.jws.WebMethod;
import javax.jws.WebService;
+import org.jboss.ws.annotation.EndpointConfig;
+
@WebService
(
name = "SimpleService",
@@ -32,6 +34,11 @@
wsdlLocation = "WEB-INF/wsdl/SimpleService.wsdl",
targetNamespace = "http://www.jboss.org/jbossws/ws-extensions/wsrm"
)
+@EndpointConfig
+(
+ configFile = "META-INF/wsrm-jaxws-endpoint-config.xml",
+ configName = "Standard WSRM Endpoint"
+)
public class SimpleServiceImpl
{
@Oneway
Added:
stack/native/trunk/src/test/resources/jaxws/samples/wsrm/META-INF/wsrm-jaxws-client-config.xml
===================================================================
---
stack/native/trunk/src/test/resources/jaxws/samples/wsrm/META-INF/wsrm-jaxws-client-config.xml
(rev 0)
+++
stack/native/trunk/src/test/resources/jaxws/samples/wsrm/META-INF/wsrm-jaxws-client-config.xml 2008-04-14
18:43:20 UTC (rev 6429)
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<jaxws-config
+ xmlns="urn:jboss:jaxws-config:2.0"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xmlns:javaee="http://java.sun.com/xml/ns/javaee"
+ xsi:schemaLocation="urn:jboss:jaxws-config:2.0 jaxws-config_2_0.xsd">
+
+ <client-config>
+ <config-name>Standard Anonymous WSRM Client</config-name>
+ <reliable-messaging>
+ <message-retransmission attempts="50" interval="10"
timeout="10"/>
+ </reliable-messaging>
+ <post-handler-chains>
+ <javaee:handler-chain>
+ <javaee:protocol-bindings>##SOAP11_HTTP</javaee:protocol-bindings>
+ <javaee:handler>
+ <javaee:handler-name>WSAddressing Handler</javaee:handler-name>
+
<javaee:handler-class>org.jboss.ws.extensions.addressing.jaxws.WSAddressingClientHandler</javaee:handler-class>
+ </javaee:handler>
+ <javaee:handler>
+ <javaee:handler-name>WSRM Handler</javaee:handler-name>
+
<javaee:handler-class>org.jboss.ws.extensions.wsrm.jaxws.RMClientHandler</javaee:handler-class>
+ </javaee:handler>
+ </javaee:handler-chain>
+ </post-handler-chains>
+ </client-config>
+
+ <client-config>
+ <config-name>Standard Addressable WSRM Client</config-name>
+ <reliable-messaging>
+ <backports-server port="7777"/>
+ <message-retransmission attempts="50" interval="10"
timeout="10"/>
+ </reliable-messaging>
+ <post-handler-chains>
+ <javaee:handler-chain>
+ <javaee:protocol-bindings>##SOAP11_HTTP</javaee:protocol-bindings>
+ <javaee:handler>
+ <javaee:handler-name>WSAddressing Handler</javaee:handler-name>
+
<javaee:handler-class>org.jboss.ws.extensions.addressing.jaxws.WSAddressingClientHandler</javaee:handler-class>
+ </javaee:handler>
+ <javaee:handler>
+ <javaee:handler-name>WSRM Handler</javaee:handler-name>
+
<javaee:handler-class>org.jboss.ws.extensions.wsrm.jaxws.RMClientHandler</javaee:handler-class>
+ </javaee:handler>
+ </javaee:handler-chain>
+ </post-handler-chains>
+ </client-config>
+
+ <client-config>
+ <config-name>Secured Anonymous WSRM Client</config-name>
+ <reliable-messaging>
+ <message-retransmission attempts="50" interval="10"
timeout="10"/>
+ </reliable-messaging>
+ <post-handler-chains>
+ <javaee:handler-chain>
+ <javaee:protocol-bindings>##SOAP11_HTTP</javaee:protocol-bindings>
+ <javaee:handler>
+ <javaee:handler-name>WSAddressing Handler</javaee:handler-name>
+
<javaee:handler-class>org.jboss.ws.extensions.addressing.jaxws.WSAddressingClientHandler</javaee:handler-class>
+ </javaee:handler>
+ <javaee:handler>
+ <javaee:handler-name>WSRM Handler</javaee:handler-name>
+
<javaee:handler-class>org.jboss.ws.extensions.wsrm.jaxws.RMClientHandler</javaee:handler-class>
+ </javaee:handler>
+ <javaee:handler>
+ <javaee:handler-name>WSSecurity Handler</javaee:handler-name>
+
<javaee:handler-class>org.jboss.ws.extensions.security.jaxws.WSSecurityHandlerClient</javaee:handler-class>
+ </javaee:handler>
+ </javaee:handler-chain>
+ </post-handler-chains>
+ </client-config>
+
+ <client-config>
+ <config-name>Secured Addressable WSRM Client</config-name>
+ <reliable-messaging>
+ <backports-server port="7777"/>
+ <message-retransmission attempts="50" interval="10"
timeout="10"/>
+ </reliable-messaging>
+ <post-handler-chains>
+ <javaee:handler-chain>
+ <javaee:protocol-bindings>##SOAP11_HTTP</javaee:protocol-bindings>
+ <javaee:handler>
+ <javaee:handler-name>WSAddressing Handler</javaee:handler-name>
+
<javaee:handler-class>org.jboss.ws.extensions.addressing.jaxws.WSAddressingClientHandler</javaee:handler-class>
+ </javaee:handler>
+ <javaee:handler>
+ <javaee:handler-name>WSRM Handler</javaee:handler-name>
+
<javaee:handler-class>org.jboss.ws.extensions.wsrm.jaxws.RMClientHandler</javaee:handler-class>
+ </javaee:handler>
+ <javaee:handler>
+ <javaee:handler-name>WSSecurity Handler</javaee:handler-name>
+
<javaee:handler-class>org.jboss.ws.extensions.security.jaxws.WSSecurityHandlerClient</javaee:handler-class>
+ </javaee:handler>
+ </javaee:handler-chain>
+ </post-handler-chains>
+ </client-config>
+
+</jaxws-config>
Property changes on:
stack/native/trunk/src/test/resources/jaxws/samples/wsrm/META-INF/wsrm-jaxws-client-config.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified:
stack/native/trunk/src/test/resources/jaxws/samples/wsrm/WEB-INF/wsdl/SimpleService.wsdl
===================================================================
---
stack/native/trunk/src/test/resources/jaxws/samples/wsrm/WEB-INF/wsdl/SimpleService.wsdl 2008-04-14
17:38:18 UTC (rev 6428)
+++
stack/native/trunk/src/test/resources/jaxws/samples/wsrm/WEB-INF/wsdl/SimpleService.wsdl 2008-04-14
18:43:20 UTC (rev 6429)
@@ -1,5 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
-<definitions name='SimpleService'
targetNamespace='http://www.jboss.org/jbossws/ws-extensions/wsrm'
xmlns='http://schemas.xmlsoap.org/wsdl/'
xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/'
xmlns:tns='http://www.jboss.org/jbossws/ws-extensions/wsrm'
xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
+<definitions name='SimpleService'
targetNamespace='http://www.jboss.org/jbossws/ws-extensions/wsrm'
xmlns='http://schemas.xmlsoap.org/wsdl/'
xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/'
xmlns:tns='http://www.jboss.org/jbossws/ws-extensions/wsrm'
xmlns:xsd='http://www.w3.org/2001/XMLSchema'
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <wsp:UsingPolicy/>
+ <wsp:Policy
+ wsu:Id="wsrm11policy"
+
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-w...
+ <wsp:All>
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <ns1:RMAssertion
xmlns:ns1="http://docs.oasis-open.org/ws-rx/wsrmp/200702"/>
+ <ns2:UsingAddressing
xmlns:ns2="http://www.w3.org/2006/05/addressing/wsdl"/>
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:All>
+ </wsp:Policy>
<types>
<xs:schema
targetNamespace='http://www.jboss.org/jbossws/ws-extensions/wsrm'
version='1.0'
xmlns:tns='http://www.jboss.org/jbossws/ws-extensions/wsrm'
xmlns:xs='http://www.w3.org/2001/XMLSchema'>
<xs:element name='echo' type='tns:echo'/>
@@ -39,6 +52,7 @@
</operation>
</portType>
<binding name='SimpleServiceBinding' type='tns:SimpleService'>
+ <wsp:PolicyReference URI="#wsrm11policy"/>
<soap:binding style='document'
transport='http://schemas.xmlsoap.org/soap/http'/>
<operation name='echo'>
<soap:operation soapAction=''/>
@@ -61,4 +75,4 @@
<soap:address location='REPLACE_WITH_ACTUAL_URL'/>
</port>
</service>
-</definitions>
\ No newline at end of file
+</definitions>
Added:
stack/native/trunk/src/test/resources/jaxws/samples/wsrm/WEB-INF/wsrm-jaxws-endpoint-config.xml
===================================================================
---
stack/native/trunk/src/test/resources/jaxws/samples/wsrm/WEB-INF/wsrm-jaxws-endpoint-config.xml
(rev 0)
+++
stack/native/trunk/src/test/resources/jaxws/samples/wsrm/WEB-INF/wsrm-jaxws-endpoint-config.xml 2008-04-14
18:43:20 UTC (rev 6429)
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<jaxws-config
+ xmlns="urn:jboss:jaxws-config:2.0"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xmlns:javaee="http://java.sun.com/xml/ns/javaee"
+ xsi:schemaLocation="urn:jboss:jaxws-config:2.0 jaxws-config_2_0.xsd">
+
+ <endpoint-config>
+ <config-name>Standard WSRM Endpoint</config-name>
+ <post-handler-chains>
+ <javaee:handler-chain>
+ <javaee:protocol-bindings>##SOAP11_HTTP</javaee:protocol-bindings>
+ <javaee:handler>
+ <javaee:handler-name>WSAddressing Handler</javaee:handler-name>
+
<javaee:handler-class>org.jboss.ws.extensions.addressing.jaxws.WSAddressingServerHandler</javaee:handler-class>
+ </javaee:handler>
+ <javaee:handler>
+ <javaee:handler-name>WSRM Handler</javaee:handler-name>
+
<javaee:handler-class>org.jboss.ws.extensions.wsrm.jaxws.RMServerHandler</javaee:handler-class>
+ </javaee:handler>
+ </javaee:handler-chain>
+ </post-handler-chains>
+ </endpoint-config>
+
+ <endpoint-config>
+ <config-name>Secured WSRM Endpoint</config-name>
+ <post-handler-chains>
+ <javaee:handler-chain>
+ <javaee:protocol-bindings>##SOAP11_HTTP</javaee:protocol-bindings>
+ <javaee:handler>
+ <javaee:handler-name>WSAddressing Handler</javaee:handler-name>
+
<javaee:handler-class>org.jboss.ws.extensions.addressing.jaxws.WSAddressingServerHandler</javaee:handler-class>
+ </javaee:handler>
+ <javaee:handler>
+ <javaee:handler-name>WSRM Handler</javaee:handler-name>
+
<javaee:handler-class>org.jboss.ws.extensions.wsrm.jaxws.RMServerHandler</javaee:handler-class>
+ </javaee:handler>
+ <javaee:handler>
+ <javaee:handler-name>WSSecurity Handler</javaee:handler-name>
+
<javaee:handler-class>org.jboss.ws.extensions.security.jaxws.WSSecurityHandlerServer</javaee:handler-class>
+ </javaee:handler>
+ </javaee:handler-chain>
+ </post-handler-chains>
+ </endpoint-config>
+
+</jaxws-config>
Property changes on:
stack/native/trunk/src/test/resources/jaxws/samples/wsrm/WEB-INF/wsrm-jaxws-endpoint-config.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF