Author: richard.opalka(a)jboss.com
Date: 2008-04-16 13:09:47 -0400 (Wed, 16 Apr 2008)
New Revision: 6457
Added:
stack/cxf/trunk/src/test/resources/jaxws/samples/wsrm/WEB-INF/jbossws-cxf.xml
stack/cxf/trunk/src/test/resources/jaxws/samples/wsrm/wsrm-client-config.xml
Modified:
stack/cxf/trunk/ant-import-tests/build-samples-jaxws.xml
stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsrm/client/SimpleServiceTestCase.java
stack/cxf/trunk/src/test/resources/jaxws/samples/wsrm/WEB-INF/wsdl/SimpleService.wsdl
Log:
[JBWS-2097][JBWS-2138] finalizing WS-RM example for CXF based on prepared tutorial
Modified: stack/cxf/trunk/ant-import-tests/build-samples-jaxws.xml
===================================================================
--- stack/cxf/trunk/ant-import-tests/build-samples-jaxws.xml 2008-04-16 12:44:44 UTC (rev
6456)
+++ stack/cxf/trunk/ant-import-tests/build-samples-jaxws.xml 2008-04-16 17:09:47 UTC (rev
6457)
@@ -25,6 +25,9 @@
<classes dir="${tests.output.dir}/classes">
<include
name="org/jboss/test/ws/jaxws/samples/wsrm/service/**"/>
</classes>
+ <webinf
dir="${tests.output.dir}/resources/jaxws/samples/wsrm/WEB-INF">
+ <include name="jbossws-cxf.xml"/>
+ </webinf>
<zipfileset
dir="${tests.output.dir}/resources/jaxws/samples/wsrm/WEB-INF/wsdl"
prefix="WEB-INF/wsdl"/>
Modified:
stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsrm/client/SimpleServiceTestCase.java
===================================================================
---
stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsrm/client/SimpleServiceTestCase.java 2008-04-16
12:44:44 UTC (rev 6456)
+++
stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsrm/client/SimpleServiceTestCase.java 2008-04-16
17:09:47 UTC (rev 6457)
@@ -21,10 +21,14 @@
*/
package org.jboss.test.ws.jaxws.samples.wsrm.client;
+import java.io.File;
import java.net.URL;
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
import junit.framework.Test;
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.bus.spring.SpringBusFactory;
import org.jboss.wsf.test.JBossWSTest;
import org.jboss.wsf.test.JBossWSTestSetup;
import org.jboss.test.ws.jaxws.samples.wsrm.generated.SimpleService;
@@ -38,6 +42,7 @@
{
private final String serviceURL = "http://" + getServerHost() +
":8080/jaxws-samples-wsrm/SimpleService";
private SimpleService proxy;
+ private Bus bus;
public static Test suite()
{
@@ -49,11 +54,24 @@
{
super.setUp();
+ SpringBusFactory busFactory = new SpringBusFactory();
+ URL cxfConfig = new
File("resources/jaxws/samples/wsrm/wsrm-client-config.xml").toURL();
+ bus = busFactory.createBus(cxfConfig);
+ busFactory.setDefaultBus(bus);
+
QName serviceName = new
QName("http://www.jboss.org/jbossws/ws-extensions/wsrm",
"SimpleService");
URL wsdlURL = new URL(serviceURL + "?wsdl");
Service service = Service.create(wsdlURL, serviceName);
proxy = (SimpleService)service.getPort(SimpleService.class);
}
+
+ @Override
+ protected void tearDown() throws Exception
+ {
+ bus.shutdown(true);
+
+ super.tearDown();
+ }
public void test() throws Exception
{
Added: stack/cxf/trunk/src/test/resources/jaxws/samples/wsrm/WEB-INF/jbossws-cxf.xml
===================================================================
--- stack/cxf/trunk/src/test/resources/jaxws/samples/wsrm/WEB-INF/jbossws-cxf.xml
(rev 0)
+++
stack/cxf/trunk/src/test/resources/jaxws/samples/wsrm/WEB-INF/jbossws-cxf.xml 2008-04-16
17:09:47 UTC (rev 6457)
@@ -0,0 +1,36 @@
+<beans
+
xmlns='http://www.springframework.org/schema/beans'
+
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
+
xmlns:beans='http://www.springframework.org/schema/beans'
+
xmlns:jaxws='http://cxf.apache.org/jaxws'
+
xmlns:wsp='http://www.w3.org/2006/07/ws-policy'
+
xmlns:p='http://cxf.apache.org/policy'
+
xsi:schemaLocation='http://www.springframework.org/schema/beans
+
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+
http://cxf.apache.org/policy
+
http://cxf.apache.org/schemas/policy.xsd
+
http://www.w3.org/2006/07/ws-policy
+
http://www.w3.org/2006/11/ws-policy.xsd
+
http://cxf.apache.org/jaxws
+
http://cxf.apache.org/schemas/jaxws.xsd'>
+
+ <wsp:Policy wsu:Id="wsrm10policy"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-w...
+ <wswa:UsingAddressing
xmlns:wswa="http://www.w3.org/2006/05/addressing/wsdl"/>
+ <wsrmp:RMAssertion
xmlns:wsrmp="http://schemas.xmlsoap.org/ws/2005/02/rm/policy"/>
+ </wsp:Policy>
+
+ <jaxws:endpoint
+ id='SimpleServiceImpl'
+ address='http://@jboss.bind.address@:8080/jaxws-samples-wsrm'
+
implementor='org.jboss.test.ws.jaxws.samples.wsrm.service.SimpleServiceImpl'>
+ <jaxws:invoker>
+ <bean class='org.jboss.wsf.stack.cxf.InvokerJSE'/>
+ </jaxws:invoker>
+ <jaxws:features>
+ <p:policies
namespace="http://www.w3.org/2006/07/ws-policy">
+ <wsp:PolicyReference URI="#wsrm10policy"
xmlns:wsp="http://www.w3.org/2006/07/ws-policy"/>
+ </p:policies>
+ </jaxws:features>
+ </jaxws:endpoint>
+
+</beans>
Property changes on:
stack/cxf/trunk/src/test/resources/jaxws/samples/wsrm/WEB-INF/jbossws-cxf.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified:
stack/cxf/trunk/src/test/resources/jaxws/samples/wsrm/WEB-INF/wsdl/SimpleService.wsdl
===================================================================
---
stack/cxf/trunk/src/test/resources/jaxws/samples/wsrm/WEB-INF/wsdl/SimpleService.wsdl 2008-04-16
12:44:44 UTC (rev 6456)
+++
stack/cxf/trunk/src/test/resources/jaxws/samples/wsrm/WEB-INF/wsdl/SimpleService.wsdl 2008-04-16
17:09:47 UTC (rev 6457)
@@ -1,5 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
-<wsdl:definitions name="SimpleService"
targetNamespace="http://www.jboss.org/jbossws/ws-extensions/wsrm"
xmlns:tns="http://www.jboss.org/jbossws/ws-extensions/wsrm"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+<wsdl:definitions name="SimpleService"
targetNamespace="http://www.jboss.org/jbossws/ws-extensions/wsrm"
xmlns:tns="http://www.jboss.org/jbossws/ws-extensions/wsrm"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsp="http://www.w3.org/2006/07/ws-policy">
+
+ <wsp:UsingPolicy/>
+ <wsp:Policy wsu:Id="wsrm10policy"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-w...
+ <wswa:UsingAddressing
xmlns:wswa="http://www.w3.org/2006/05/addressing/wsdl"/>
+ <wsrmp:RMAssertion
xmlns:wsrmp="http://schemas.xmlsoap.org/ws/2005/02/rm/policy"/>
+ </wsp:Policy>
+
<wsdl:types>
<xsd:schema
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:tns="http://www.jboss.org/jbossws/ws-extensions/wsrm"
attributeFormDefault="unqualified" elementFormDefault="unqualified"
targetNamespace="http://www.jboss.org/jbossws/ws-extensions/wsrm&quo...
<xsd:element name="ping" type="tns:ping"/>
@@ -45,6 +52,7 @@
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="SimpleServiceSoapBinding"
type="tns:SimpleService">
+ <wsp:PolicyReference URI="#wsrm10policy"/>
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="ping">
<soap:operation soapAction="" style="document"/>
Added: stack/cxf/trunk/src/test/resources/jaxws/samples/wsrm/wsrm-client-config.xml
===================================================================
--- stack/cxf/trunk/src/test/resources/jaxws/samples/wsrm/wsrm-client-config.xml
(rev 0)
+++
stack/cxf/trunk/src/test/resources/jaxws/samples/wsrm/wsrm-client-config.xml 2008-04-16
17:09:47 UTC (rev 6457)
@@ -0,0 +1,37 @@
+<beans
+
xmlns="http://www.springframework.org/schema/beans"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xmlns:cxf="http://cxf.apache.org/core"
+
xmlns:wsa="http://cxf.apache.org/ws/addressing"
+
xmlns:http="http://cxf.apache.org/transports/http/configuration"
+
xmlns:wsrm-policy="http://schemas.xmlsoap.org/ws/2005/02/rm/policy&q...
+
xmlns:wsrm-mgr="http://cxf.apache.org/ws/rm/manager"
+ xsi:schemaLocation="
+
http://cxf.apache.org/core
+
http://cxf.apache.org/schemas/core.xsd
+
http://cxf.apache.org/transports/http/configuration
+
http://cxf.apache.org/schemas/configuration/http-conf.xsd
+
http://schemas.xmlsoap.org/ws/2005/02/rm/policy
+
http://schemas.xmlsoap.org/ws/2005/02/rm/wsrm-policy.xsd
+
http://cxf.apache.org/ws/rm/manager
+
http://cxf.apache.org/schemas/configuration/wsrm-manager.xsd
+
http://www.springframework.org/schema/beans
+
http://www.springframework.org/schema/beans/spring-beans.xsd">
+
+ <cxf:bus>
+ <cxf:features>
+ <cxf:logging/>
+ <wsa:addressing/>
+ <wsrm-mgr:reliableMessaging>
+ <wsrm-policy:RMAssertion>
+ <wsrm-policy:BaseRetransmissionInterval Milliseconds="4000"/>
+ <wsrm-policy:AcknowledgementInterval Milliseconds="2000"/>
+ </wsrm-policy:RMAssertion>
+ <wsrm-mgr:destinationPolicy>
+ <wsrm-mgr:acksPolicy intraMessageThreshold="0" />
+ </wsrm-mgr:destinationPolicy>
+ </wsrm-mgr:reliableMessaging>
+ </cxf:features>
+ </cxf:bus>
+
+</beans>
Property changes on:
stack/cxf/trunk/src/test/resources/jaxws/samples/wsrm/wsrm-client-config.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF