JBossWS SVN: r1996 - in trunk: jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client and 8 other directories.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-01-18 08:59:21 -0500 (Thu, 18 Jan 2007)
New Revision: 1996
Added:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/ServiceRefOverridesTestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/TestEndpointClientOne.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/TestEndpointClientTwo.java
trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/META-INF-…
[View More]override/
trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/META-INF-override/application-client.xml
trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/META-INF-override/jboss-client.xml
trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/WEB-INF-client/
trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/WEB-INF-client/web.xml
Removed:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/ServiceRefParserTestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/TestEndpointClient.java
trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/servlet-client/
Modified:
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceObjectFactory.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/UnifiedServiceRef.java
trunk/jbossws-tests/ant-import/build-jars-jaxws.xml
trunk/jbossws-tests/build.xml
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefClientTestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefServletTestCase.java
trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/META-INF-secure/application-client.xml
trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/META-INF/jboss-client.xml
Log:
Expand, enable webserviceref tests
Modified: trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceObjectFactory.java
===================================================================
--- trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceObjectFactory.java 2007-01-18 13:58:21 UTC (rev 1995)
+++ trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceObjectFactory.java 2007-01-18 13:59:21 UTC (rev 1996)
@@ -91,6 +91,7 @@
String serviceClassName = (String)ref.get(ServiceReferenceable.SERVICE_CLASS_NAME).getContent();
String targetClassName = (String)ref.get(ServiceReferenceable.TARGET_CLASS_NAME).getContent();
UnifiedServiceRef usRef = unmarshallServiceRef(ref);
+ String serviceRefName = usRef.getServiceRefName();
ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
Class serviceClass = ctxLoader.loadClass(serviceClassName);
@@ -99,8 +100,10 @@
if (Service.class.isAssignableFrom(serviceClass) == false)
throw new IllegalArgumentException("WebServiceRef type '" + serviceClass + "' is not assignable to javax.xml.ws.Service");
+ // Receives either a javax.xml.ws.Service or a JAXWS dynamic proxy
Object target;
+ // Get the URL to the wsdl
URL wsdlURL = getWsdlLocationURL(targetClass != null ? targetClass : serviceClass, usRef);
// Generic javax.xml.ws.Service
@@ -112,7 +115,7 @@
}
else
{
- throw new IllegalArgumentException("Cannot create generic javax.xml.ws.Service without wsdlLocation");
+ throw new IllegalArgumentException("Cannot create generic javax.xml.ws.Service without wsdlLocation: " + serviceRefName);
}
}
// Generated javax.xml.ws.Service subclass
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/UnifiedServiceRef.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/UnifiedServiceRef.java 2007-01-18 13:58:21 UTC (rev 1995)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/UnifiedServiceRef.java 2007-01-18 13:59:21 UTC (rev 1996)
@@ -28,17 +28,17 @@
import org.jboss.ws.core.server.UnifiedVirtualFile;
/**
- * Represents a <service-ref> element of the jboss.xml, jboss-web.xml, jboss-client.xml deployment descriptor
- * for the 5.0 schema
+ * Represents a <service-ref> element of the jboss.xml, jboss-web.xml, jboss-client.xml
*
* @author Thomas.Diesler(a)jboss.com
+ * @since 16-Dec-2006
*/
public class UnifiedServiceRef implements Serializable
{
private static final long serialVersionUID = -5518998734737147195L;
private UnifiedVirtualFile vfsRoot;
- private String encName;
+ private String serviceRefName;
private String wsdlLocation;
private String configName;
private String configFile;
@@ -46,7 +46,7 @@
public UnifiedServiceRef(UnifiedVirtualFile vfsRoot, String name)
{
this.vfsRoot = vfsRoot;
- this.encName = name;
+ this.serviceRefName = name;
}
public UnifiedVirtualFile getRootFile()
@@ -54,9 +54,9 @@
return vfsRoot;
}
- public String getEncName()
+ public String getServiceRefName()
{
- return encName;
+ return serviceRefName;
}
public String getWsdlLocation()
@@ -93,7 +93,7 @@
{
StringBuilder sb = new StringBuilder();
sb.append("[");
- sb.append("name=").append(encName);
+ sb.append("name=").append(serviceRefName);
sb.append(",config-name=").append(configName);
sb.append(",config-file=").append(configFile);
sb.append(",wsdl=").append(wsdlLocation);
Modified: trunk/jbossws-tests/ant-import/build-jars-jaxws.xml
===================================================================
--- trunk/jbossws-tests/ant-import/build-jars-jaxws.xml 2007-01-18 13:58:21 UTC (rev 1995)
+++ trunk/jbossws-tests/ant-import/build-jars-jaxws.xml 2007-01-18 13:59:21 UTC (rev 1996)
@@ -533,7 +533,7 @@
</war>
<jar destfile="${tests.output.dir}/libs/jaxws-webserviceref-client.jar">
<fileset dir="${tests.output.dir}/classes">
- <include name="org/jboss/test/ws/jaxws/webserviceref/TestEndpointClient.class"/>
+ <include name="org/jboss/test/ws/jaxws/webserviceref/TestEndpointClientOne.class"/>
<include name="org/jboss/test/ws/jaxws/webserviceref/TestEndpointService.class"/>
<include name="org/jboss/test/ws/jaxws/webserviceref/TestEndpoint.class"/>
</fileset>
@@ -543,10 +543,10 @@
<include name="wsdl/**"/>
</metainf>
<manifest>
- <attribute name="main-class" value="org.jboss.test.ws.jaxws.webserviceref.TestEndpointClient"/>
+ <attribute name="main-class" value="org.jboss.test.ws.jaxws.webserviceref.TestEndpointClientOne"/>
</manifest>
</jar>
- <war destfile="${tests.output.dir}/libs/jaxws-webserviceref-servlet-client.war" webxml="${tests.output.dir}/resources/jaxws/webserviceref/servlet-client/WEB-INF/web.xml">
+ <war destfile="${tests.output.dir}/libs/jaxws-webserviceref-servlet-client.war" webxml="${tests.output.dir}/resources/jaxws/webserviceref/WEB-INF-client/web.xml">
<classes dir="${tests.output.dir}/classes">
<include name="org/jboss/test/ws/jaxws/webserviceref/ServletClient.class"/>
<include name="org/jboss/test/ws/jaxws/webserviceref/TestEndpointService.class"/>
@@ -592,6 +592,23 @@
<attribute name="main-class" value="org.jboss.test.ws.jaxws.webserviceref.SecureEndpointClient"/>
</manifest>
</jar>
+ <jar destfile="${tests.output.dir}/libs/jaxws-webserviceref-override-client.jar">
+ <fileset dir="${tests.output.dir}/classes">
+ <include name="org/jboss/test/ws/jaxws/webserviceref/TestEndpointClientTwo.class"/>
+ <include name="org/jboss/test/ws/jaxws/webserviceref/TestEndpointService.class"/>
+ <include name="org/jboss/test/ws/jaxws/webserviceref/TestEndpoint.class"/>
+ </fileset>
+ <metainf dir="${tests.output.dir}/resources/jaxws/webserviceref/META-INF-override">
+ <include name="application-client.xml"/>
+ <include name="jboss-client.xml"/>
+ </metainf>
+ <metainf dir="${tests.output.dir}/resources/jaxws/webserviceref/META-INF">
+ <include name="wsdl/**"/>
+ </metainf>
+ <manifest>
+ <attribute name="main-class" value="org.jboss.test.ws.jaxws.webserviceref.TestEndpointClientTwo"/>
+ </manifest>
+ </jar>
<!-- jaxws-wrapped-accessor -->
<war warfile="${tests.output.dir}/libs/jaxws-wrapped-accessor.war" webxml="${tests.output.dir}/resources/jaxws/wrapped/accessor/WEB-INF/web.xml">
Modified: trunk/jbossws-tests/build.xml
===================================================================
--- trunk/jbossws-tests/build.xml 2007-01-18 13:58:21 UTC (rev 1995)
+++ trunk/jbossws-tests/build.xml 2007-01-18 13:59:21 UTC (rev 1996)
@@ -172,7 +172,6 @@
<pathelement location="${thirdparty.dir}/stax-api.jar"/>
<pathelement location="${thirdparty.dir}/xmlunit1.0.jar"/>
<pathelement location="${jboss.client}/jboss-ejb3-client.jar"/>
- <pathelement location="${jboss.server.lib}/jboss.jar"/>
</path>
<!-- The test client classpath -->
Added: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/ServiceRefOverridesTestCase.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/ServiceRefOverridesTestCase.java (rev 0)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/ServiceRefOverridesTestCase.java 2007-01-18 13:59:21 UTC (rev 1996)
@@ -0,0 +1,100 @@
+/*
+ * 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.webserviceref;
+
+import junit.framework.Test;
+
+import org.jboss.ejb3.client.ClientLauncher;
+import org.jboss.test.ws.JBossWSTest;
+import org.jboss.test.ws.JBossWSTestSetup;
+
+/**
+ * Test @WebServiceRef overrides in jboss-client.xml
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 18-Jan-2007
+ */
+public class ServiceRefOverridesTestCase extends JBossWSTest
+{
+ public final String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() + ":8080/jaxws-webserviceref";
+
+ public static Test suite()
+ {
+ return JBossWSTestSetup.newTestSetup(ServiceRefOverridesTestCase.class, "jaxws-webserviceref.war, jaxws-webserviceref-override-client.jar");
+ }
+
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+
+ if (TestEndpointClientTwo.iniCtx == null)
+ TestEndpointClientTwo.iniCtx = getInitialContext();
+ }
+
+ public void testService1() throws Throwable
+ {
+ String resStr = invokeTest(getName());
+ assertEquals(getName(), resStr);
+ }
+
+ public void testService2() throws Throwable
+ {
+ String resStr = invokeTest(getName());
+ assertEquals(getName(), resStr);
+ }
+
+ public void testService3() throws Throwable
+ {
+ String resStr = invokeTest(getName());
+ assertEquals(getName() + getName(), resStr);
+ }
+
+ public void testService4() throws Throwable
+ {
+ String resStr = invokeTest(getName());
+ assertEquals(getName() + getName(), resStr);
+ }
+
+ public void testPort1() throws Throwable
+ {
+ String resStr = invokeTest(getName());
+ assertEquals(getName(), resStr);
+ }
+
+ public void testPort2() throws Throwable
+ {
+ String resStr = invokeTest(getName());
+ assertEquals(getName() + getName(), resStr);
+ }
+
+ public void testPort3() throws Throwable
+ {
+ String resStr = invokeTest(getName());
+ assertEquals(getName() + getName(), resStr);
+ }
+
+ private String invokeTest(String reqStr) throws Throwable
+ {
+ new ClientLauncher().launch(TestEndpointClientTwo.class.getName(), "jbossws-client", new String[] { reqStr });
+ return TestEndpointClientTwo.testResult.get(reqStr);
+ }
+}
Property changes on: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/ServiceRefOverridesTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Deleted: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/ServiceRefParserTestCase.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/ServiceRefParserTestCase.java 2007-01-18 13:58:21 UTC (rev 1995)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/ServiceRefParserTestCase.java 2007-01-18 13:59:21 UTC (rev 1996)
@@ -1,44 +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.webserviceref;
-
-import java.io.File;
-
-import org.jboss.ejb3.metamodel.JBossClientDDObjectFactory;
-import org.jboss.test.ws.JBossWSTest;
-
-/**
- * Test the JAXWS annotation: javax.xml.ws.WebServiceRef
- *
- * @author Thomas.Diesler(a)jboss.com
- * @since 23-Oct-2005
- */
-public class ServiceRefParserTestCase extends JBossWSTest
-{
- public void testServiceRefParser() throws Exception
- {
- File ddFile = new File("resources/jaxws/webserviceref/META-INF-secure/jboss-client.xml");
- assertTrue (ddFile.exists());
-
- JBossClientDDObjectFactory.parse(ddFile.toURL(), null);
- }
-}
Deleted: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/TestEndpointClient.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/TestEndpointClient.java 2007-01-18 13:58:21 UTC (rev 1995)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/TestEndpointClient.java 2007-01-18 13:59:21 UTC (rev 1996)
@@ -1,132 +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.webserviceref;
-
-import java.util.ArrayList;
-
-import javax.naming.InitialContext;
-import javax.xml.ws.WebServiceException;
-import javax.xml.ws.WebServiceRef;
-import javax.xml.ws.WebServiceRefs;
-
-import org.jboss.logging.Logger;
-
-//Test on type with wsdlLocation
-@WebServiceRef(name = "service1", value = TestEndpointService.class, wsdlLocation = "META-INF/wsdl/TestEndpoint.wsdl")
-
-// Test multiple on type
-@WebServiceRefs( {
- @WebServiceRef(name = "service2", value = TestEndpointService.class),
- @WebServiceRef(name = "port1", value = TestEndpointService.class, type = TestEndpoint.class) })
-public class TestEndpointClient
-{
- // Provide logging
- private static Logger log = Logger.getLogger(TestEndpointClient.class);
-
- // Test on field with name
- @WebServiceRef(name = "TestEndpointService3")
- public static TestEndpointService service3;
-
- // Test on field without name
- @WebServiceRef
- public static TestEndpointService service4;
-
- // Test on method with value
- @WebServiceRef(name = "TestEndpointService5")
- public static void setServiceSetter5(TestEndpointService service)
- {
- TestEndpointClient.service5 = service;
- }
-
- private static TestEndpointService service5;
-
- // Test on method without name
- @WebServiceRef
- public static void setServiceSetter6(TestEndpointService service)
- {
- TestEndpointClient.service6 = service;
- }
-
- private static TestEndpointService service6;
-
- // Test on field with name and value
- @WebServiceRef(name = "Port2", value = TestEndpointService.class)
- public static TestEndpoint port2;
-
- // Test on field with value
- @WebServiceRef(value = TestEndpointService.class)
- public static TestEndpoint port3;
-
- // Test on field
- @WebServiceRef
- public static TestEndpoint port4;
-
- // Test on field with name
- @WebServiceRef (name = "Port5")
- public static TestEndpoint port5;
-
- public static InitialContext iniCtx;
- public static String retStr;
-
- public static void main(String[] args)
- {
- String inStr = args[0];
- log.info("echo: " + inStr);
-
- ArrayList<TestEndpoint> ports = new ArrayList<TestEndpoint>();
- try
- {
- System.out.println("FIXME: [EJBTHREE-760] - @WebServiceRef not bound to java:comp/env");
- //ports.add(((TestEndpointService)iniCtx.lookup("java:comp/env/service1")).getTestEndpointPort());
- //ports.add(((TestEndpointService)iniCtx.lookup("java:comp/env/service2")).getTestEndpointPort());
- ports.add((TestEndpoint)service3.getPort(TestEndpoint.class));
- //ports.add(((TestEndpointService)iniCtx.lookup("java:comp/env/TestEndpointService3")).getTestEndpointPort());
- ports.add((TestEndpoint)service4.getPort(TestEndpoint.class));
- //ports.add(((TestEndpointService)iniCtx.lookup("java:comp/env/" + ApplicationClient.class.getName() + "/service4")).getTestEndpointPort());
- ports.add((TestEndpoint)service5.getPort(TestEndpoint.class));
- //ports.add(((TestEndpointService)iniCtx.lookup("java:comp/env/TestEndpointService5")).getTestEndpointPort());
- ports.add((TestEndpoint)service6.getPort(TestEndpoint.class));
- //ports.add(((TestEndpointService)iniCtx.lookup("java:comp/env/" + ApplicationClient.class.getName() + "/serviceSetter6")).getTestEndpointPort());
- //ports.add((TestEndpoint)iniCtx.lookup("java:comp/env/port1"));
- ports.add(port2);
- //ports.add((TestEndpoint)iniCtx.lookup("java:comp/env/Port2"));
- ports.add(port3);
- //ports.add((TestEndpoint)iniCtx.lookup("java:comp/env/" + ApplicationClient.class.getName() + "/port3"));
- ports.add(port4);
- ports.add(port5);
- }
- catch (Exception ex)
- {
- log.error("Cannot add port", ex);
- throw new WebServiceException(ex);
- }
-
- for (TestEndpoint port : ports)
- {
- String outStr = port.echo(inStr);
- if (inStr.equals(outStr) == false)
- throw new WebServiceException("Invalid echo return: " + inStr);
- }
-
- retStr = inStr;
- }
-}
Copied: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/TestEndpointClientOne.java (from rev 1991, trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/TestEndpointClient.java)
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/TestEndpointClientOne.java (rev 0)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/TestEndpointClientOne.java 2007-01-18 13:59:21 UTC (rev 1996)
@@ -0,0 +1,130 @@
+/*
+ * 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.webserviceref;
+
+import java.util.ArrayList;
+
+import javax.naming.InitialContext;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebServiceException;
+import javax.xml.ws.WebServiceRef;
+import javax.xml.ws.WebServiceRefs;
+
+import org.jboss.logging.Logger;
+
+//Test on type with wsdlLocation
+@WebServiceRef(name = "service1", value = TestEndpointService.class, wsdlLocation = "META-INF/wsdl/TestEndpoint.wsdl")
+
+// Test multiple on type
+@WebServiceRefs( {
+ @WebServiceRef(name = "service2", value = TestEndpointService.class),
+ @WebServiceRef(name = "port1", value = TestEndpointService.class, type = TestEndpoint.class) })
+public class TestEndpointClientOne
+{
+ // Provide logging
+ private static Logger log = Logger.getLogger(TestEndpointClientOne.class);
+
+ // Test on field with name
+ @WebServiceRef(name = "TestEndpointService3")
+ public static TestEndpointService service3;
+
+ // Test on field without name
+ @WebServiceRef
+ public static TestEndpointService service4;
+
+ // Test on method with name
+ @WebServiceRef(name = "TestEndpointService5")
+ public static void setServiceSetter5(TestEndpointService service)
+ {
+ TestEndpointClientOne.service5 = service;
+ }
+ private static TestEndpointService service5;
+
+ // Test on method without name
+ @WebServiceRef
+ public static void setServiceSetter6(TestEndpointService service)
+ {
+ TestEndpointClientOne.service6 = service;
+ }
+ private static TestEndpointService service6;
+
+ // Test on field with name and value
+ @WebServiceRef(name = "Port2", value = TestEndpointService.class)
+ public static TestEndpoint port2;
+
+ // Test on field with value
+ @WebServiceRef(value = TestEndpointService.class)
+ public static TestEndpoint port3;
+
+ // Test on field
+ @WebServiceRef
+ public static TestEndpoint port4;
+
+ // Test on field with name
+ @WebServiceRef (name = "Port5")
+ public static TestEndpoint port5;
+
+ public static InitialContext iniCtx;
+ public static String retStr;
+
+ public static void main(String[] args)
+ {
+ String inStr = args[0];
+ log.info("echo: " + inStr);
+
+ ArrayList<TestEndpoint> ports = new ArrayList<TestEndpoint>();
+ try
+ {
+ ports.add(((TestEndpointService)iniCtx.lookup("java:comp/env/service1")).getTestEndpointPort());
+ ports.add(((TestEndpointService)iniCtx.lookup("java:comp/env/service2")).getTestEndpointPort());
+ ports.add((TestEndpoint)service3.getPort(TestEndpoint.class));
+ ports.add(((TestEndpointService)iniCtx.lookup("java:comp/env/TestEndpointService3")).getTestEndpointPort());
+ ports.add((TestEndpoint)service4.getPort(TestEndpoint.class));
+ ports.add(((TestEndpointService)iniCtx.lookup("java:comp/env/" + TestEndpointClientOne.class.getName() + "/service4")).getTestEndpointPort());
+ ports.add((TestEndpoint)service5.getPort(TestEndpoint.class));
+ ports.add(((TestEndpointService)iniCtx.lookup("java:comp/env/TestEndpointService5")).getTestEndpointPort());
+ ports.add((TestEndpoint)service6.getPort(TestEndpoint.class));
+ ports.add(((TestEndpointService)iniCtx.lookup("java:comp/env/" + TestEndpointClientOne.class.getName() + "/serviceSetter6")).getTestEndpointPort());
+ ports.add((TestEndpoint)iniCtx.lookup("java:comp/env/port1"));
+ ports.add(port2);
+ ports.add((TestEndpoint)iniCtx.lookup("java:comp/env/Port2"));
+ ports.add(port3);
+ ports.add((TestEndpoint)iniCtx.lookup("java:comp/env/" + TestEndpointClientOne.class.getName() + "/port3"));
+ ports.add(port4);
+ ports.add(port5);
+ }
+ catch (Exception ex)
+ {
+ log.error("Cannot add port", ex);
+ throw new WebServiceException(ex);
+ }
+
+ for (TestEndpoint port : ports)
+ {
+ String outStr = port.echo(inStr);
+ if (inStr.equals(outStr) == false)
+ throw new WebServiceException("Invalid echo return: " + inStr);
+ }
+
+ retStr = inStr;
+ }
+}
Added: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/TestEndpointClientTwo.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/TestEndpointClientTwo.java (rev 0)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/TestEndpointClientTwo.java 2007-01-18 13:59:21 UTC (rev 1996)
@@ -0,0 +1,137 @@
+/*
+ * 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.webserviceref;
+
+import java.lang.reflect.Method;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.naming.InitialContext;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebServiceRef;
+import javax.xml.ws.WebServiceRefs;
+
+//Test on type
+@WebServiceRef(name = "Service1")
+// Test multiple on type
+@WebServiceRefs( { @WebServiceRef(name = "Service2"), @WebServiceRef(name = "Port1", type = TestEndpoint.class) })
+public class TestEndpointClientTwo
+{
+ // Test on field
+ @WebServiceRef(name = "Service3")
+ public static Service service3;
+
+ // Test on field
+ @WebServiceRef(name = "Service4")
+ public static TestEndpointService service4;
+
+ // Test on field
+ @WebServiceRef(name = "Port2")
+ public static TestEndpoint port2;
+
+ // Test on field
+ @WebServiceRef(name = "Port3")
+ public static TestEndpoint port3;
+
+ public static InitialContext iniCtx;
+ public static Map<String, String> testResult = new HashMap<String, String>();
+
+ public static void main(String[] args) throws Exception
+ {
+ String testName = args[0];
+ TestEndpointClientTwo client = new TestEndpointClientTwo();
+ Method method = TestEndpointClientTwo.class.getMethod(testName, new Class[] { String.class });
+ try
+ {
+ String retStr = (String)method.invoke(client, testName);
+ testResult.put(testName, retStr);
+ }
+ catch (Exception ex)
+ {
+ testResult.put(testName, ex.toString());
+ }
+ }
+
+ public String testService1(String reqStr) throws Exception
+ {
+ Service service = (Service)iniCtx.lookup("java:comp/env/Service1");
+ TestEndpoint port = service.getPort(TestEndpoint.class);
+ return port.echo(reqStr);
+ }
+
+ public String testService2(String reqStr) throws Exception
+ {
+ Service service = (Service)iniCtx.lookup("java:comp/env/Service2");
+ TestEndpoint port = service.getPort(TestEndpoint.class);
+ return port.echo(reqStr);
+ }
+
+ public String testService3(String reqStr) throws Exception
+ {
+ TestEndpoint port = service3.getPort(TestEndpoint.class);
+ String resStr1 = port.echo(reqStr);
+
+ Service service = (Service)iniCtx.lookup("java:comp/env/Service3");
+ port = service.getPort(TestEndpoint.class);
+ String resStr2 = port.echo(reqStr);
+
+ return resStr1 + resStr2;
+ }
+
+ public String testService4(String reqStr) throws Exception
+ {
+ TestEndpoint port = service4.getPort(TestEndpoint.class);
+ String resStr1 = port.echo(reqStr);
+
+ Service service = (Service)iniCtx.lookup("java:comp/env/Service4");
+ port = service.getPort(TestEndpoint.class);
+ String resStr2 = port.echo(reqStr);
+
+ return resStr1 + resStr2;
+ }
+
+ public String testPort1(String reqStr) throws Exception
+ {
+ TestEndpoint port = (TestEndpoint)iniCtx.lookup("java:comp/env/Port1");
+ return port.echo(reqStr);
+ }
+
+ public String testPort2(String reqStr) throws Exception
+ {
+ String resStr1 = port2.echo(reqStr);
+
+ TestEndpoint port = (TestEndpoint)iniCtx.lookup("java:comp/env/Port2");
+ String resStr2 = port.echo(reqStr);
+
+ return resStr1 + resStr2;
+ }
+
+ public String testPort3(String reqStr) throws Exception
+ {
+ String resStr1 = port3.echo(reqStr);
+
+ TestEndpoint port = (TestEndpoint)iniCtx.lookup("java:comp/env/Port3");
+ String resStr2 = port.echo(reqStr);
+
+ return resStr1 + resStr2;
+ }
+}
Property changes on: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/TestEndpointClientTwo.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefClientTestCase.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefClientTestCase.java 2007-01-18 13:58:21 UTC (rev 1995)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefClientTestCase.java 2007-01-18 13:59:21 UTC (rev 1996)
@@ -73,9 +73,9 @@
public void testApplicationClient() throws Throwable
{
String helloWorld = "Hello World!";
- TestEndpointClient.iniCtx = getInitialContext();
+ TestEndpointClientOne.iniCtx = getInitialContext();
- new ClientLauncher().launch(TestEndpointClient.class.getName(), "jbossws-client", new String[]{helloWorld});
- assertEquals(helloWorld, TestEndpointClient.retStr);
+ new ClientLauncher().launch(TestEndpointClientOne.class.getName(), "jbossws-client", new String[]{helloWorld});
+ assertEquals(helloWorld, TestEndpointClientOne.retStr);
}
}
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefServletTestCase.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefServletTestCase.java 2007-01-18 13:58:21 UTC (rev 1995)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefServletTestCase.java 2007-01-18 13:59:21 UTC (rev 1996)
@@ -73,19 +73,13 @@
public void testServletClient() throws Exception
{
- if (isTargetJBoss50())
- {
- System.out.println("FIXME: [JBAS-3824] Fix ENC for EJB2.1 and Servlets");
- return;
- }
-
if (isTargetJBoss50() == false)
{
System.out.println("FIXME: [JBWS-1438] Implement @WebServiceRef injection for JBossAS-4.2");
return;
}
- deploy("jaxws-webserviceref-servlet-client.jar");
+ deploy("jaxws-webserviceref-servlet-client.war");
try
{
URL url = new URL(TARGET_ENDPOINT_ADDRESS + "-servlet-client?echo=HelloWorld");
@@ -95,7 +89,7 @@
}
finally
{
- undeploy("jaxws-webserviceref-servlet-client.jar");
+ undeploy("jaxws-webserviceref-servlet-client.war");
}
}
}
Modified: trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/META-INF/jboss-client.xml
===================================================================
--- trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/META-INF/jboss-client.xml 2007-01-18 13:58:21 UTC (rev 1995)
+++ trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/META-INF/jboss-client.xml 2007-01-18 13:59:21 UTC (rev 1996)
@@ -33,7 +33,7 @@
@WebServiceRef
-->
<service-ref>
- <service-ref-name>org.jboss.test.ws.jaxws.webserviceref.TestEndpointClient/service4</service-ref-name>
+ <service-ref-name>org.jboss.test.ws.jaxws.webserviceref.TestEndpointClientOne/service4</service-ref-name>
<wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
</service-ref>
@@ -49,7 +49,7 @@
@WebServiceRef
-->
<service-ref>
- <service-ref-name>org.jboss.test.ws.jaxws.webserviceref.TestEndpointClient/serviceSetter6</service-ref-name>
+ <service-ref-name>org.jboss.test.ws.jaxws.webserviceref.TestEndpointClientOne/serviceSetter6</service-ref-name>
<wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
</service-ref>
@@ -73,7 +73,7 @@
@WebServiceRef(value = TestEndpointService.class)
-->
<service-ref>
- <service-ref-name>org.jboss.test.ws.jaxws.webserviceref.TestEndpointClient/port3</service-ref-name>
+ <service-ref-name>org.jboss.test.ws.jaxws.webserviceref.TestEndpointClientOne/port3</service-ref-name>
<wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
</service-ref>
@@ -81,7 +81,7 @@
@WebServiceRef
-->
<service-ref>
- <service-ref-name>org.jboss.test.ws.jaxws.webserviceref.TestEndpointClient/port4</service-ref-name>
+ <service-ref-name>org.jboss.test.ws.jaxws.webserviceref.TestEndpointClientOne/port4</service-ref-name>
<wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
</service-ref>
Added: trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/META-INF-override/application-client.xml
===================================================================
--- trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/META-INF-override/application-client.xml (rev 0)
+++ trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/META-INF-override/application-client.xml 2007-01-18 13:59:21 UTC (rev 1996)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<application-client version="5" xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application-client_5.xsd">
+
+ <display-name>TestEndpointService</display-name>
+
+</application-client>
Property changes on: trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/META-INF-override/application-client.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/META-INF-override/jboss-client.xml
===================================================================
--- trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/META-INF-override/jboss-client.xml (rev 0)
+++ trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/META-INF-override/jboss-client.xml 2007-01-18 13:59:21 UTC (rev 1996)
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE jboss-client PUBLIC "-//JBoss//DTD Application Client 5.0//EN" "http://www.jboss.org/j2ee/dtd/jboss-client_5_0.dtd">
+
+<jboss-client>
+ <jndi-name>jbossws-client</jndi-name>
+
+
+ <!--
+ @WebServiceRef(name = "Service1")
+ -->
+ <service-ref>
+ <service-ref-name>Service1</service-ref-name>
+ <wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
+ </service-ref>
+
+ <!--
+ @WebServiceRef(name = "Service2")
+ -->
+ <service-ref>
+ <service-ref-name>Service2</service-ref-name>
+ <wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
+ </service-ref>
+
+ <!--
+ @WebServiceRef(name = "Service3")
+ -->
+ <service-ref>
+ <service-ref-name>Service3</service-ref-name>
+ <wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
+ </service-ref>
+
+ <!--
+ @WebServiceRef(name = "Service4")
+ -->
+ <service-ref>
+ <service-ref-name>Service4</service-ref-name>
+ <wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
+ </service-ref>
+
+ <!--
+ @WebServiceRef(name = "Port1", type = TestEndpoint.class)
+ -->
+ <service-ref>
+ <service-ref-name>Port1</service-ref-name>
+ <wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
+ </service-ref>
+
+ <!--
+ @WebServiceRef(name = "Port2")
+ -->
+ <service-ref>
+ <service-ref-name>Port2</service-ref-name>
+ <wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
+ </service-ref>
+
+ <!--
+ @WebServiceRef(name = "Port3")
+ -->
+ <service-ref>
+ <service-ref-name>Port3</service-ref-name>
+ <wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
+ </service-ref>
+
+</jboss-client>
\ No newline at end of file
Property changes on: trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/META-INF-override/jboss-client.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/META-INF-secure/application-client.xml
===================================================================
--- trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/META-INF-secure/application-client.xml 2007-01-18 13:58:21 UTC (rev 1995)
+++ trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/META-INF-secure/application-client.xml 2007-01-18 13:59:21 UTC (rev 1996)
@@ -3,6 +3,6 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application-client_5.xsd">
- <display-name>TestEndpointService</display-name>
+ <display-name>SecureEndpointService</display-name>
</application-client>
Added: trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/WEB-INF-client/web.xml
===================================================================
--- trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/WEB-INF-client/web.xml (rev 0)
+++ trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/WEB-INF-client/web.xml 2007-01-18 13:59:21 UTC (rev 1996)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+
+ <servlet>
+ <servlet-name>ServletClient</servlet-name>
+ <servlet-class>org.jboss.test.ws.jaxws.webserviceref.ServletClient</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>ServletClient</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+</web-app>
\ No newline at end of file
Property changes on: trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/WEB-INF-client/web.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
[View Less]
18 years
JBossWS SVN: r1995 - in trunk: jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws and 4 other directories.
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2007-01-18 08:58:21 -0500 (Thu, 18 Jan 2007)
New Revision: 1995
Added:
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/AbstractEventSourceEndpoint.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/AbstractSubscriptionManagerEndpoint.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/wseventing/CustomSubscriptionManager.java
trunk/jbossws-tests/src/main/resources/jaxws/wseventing/WEB-…
[View More]INF/wsdl/windreport.wsdl
trunk/jbossws-tests/src/main/resources/jaxws/wseventing/WEB-INF/wsdl/ws-addr.xsd
trunk/jbossws-tests/src/main/resources/jaxws/wseventing/WEB-INF/wsdl/ws-eventing.wsdl
trunk/jbossws-tests/src/main/resources/jaxws/wseventing/WEB-INF/wsdl/ws-eventing.xsd
Removed:
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/EventSourceEndpointImpl.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/SubscriptionManagerEndpointImpl.java
trunk/jbossws-tests/src/main/resources/jaxws/wseventing/WEB-INF/wsdl/eventing.wsdl
trunk/jbossws-tests/src/main/resources/jaxws/wseventing/WEB-INF/wsdl/eventing.xsd
trunk/jbossws-tests/src/main/resources/jaxws/wseventing/WEB-INF/wsdl/wind.wsdl
trunk/jbossws-tests/src/main/resources/jaxws/wseventing/WEB-INF/wsdl/wsaddr.xsd
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/EventSourceEndpointImpl.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/EventSourceEndpoint.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/SubscriptionManagerEndpoint.java
trunk/jbossws-core/src/main/resources/schema/ws-addr.xsd
trunk/jbossws-core/src/main/resources/schema/ws-eventing.xsd
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/wseventing/CustomEventSource.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/wseventing/EventingSupport.java
trunk/jbossws-tests/src/main/resources/jaxws/wseventing/WEB-INF/web.xml
Log:
Eventing endpoints have now become an abstract impl.
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/EventSourceEndpointImpl.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/EventSourceEndpointImpl.java 2007-01-18 12:54:34 UTC (rev 1994)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/EventSourceEndpointImpl.java 2007-01-18 13:58:21 UTC (rev 1995)
@@ -26,17 +26,13 @@
import java.rmi.RemoteException;
import javax.xml.rpc.soap.SOAPFaultException;
-import javax.xml.ws.addressing.AddressingProperties;
-import javax.xml.ws.addressing.AttributedURI;
import org.jboss.logging.Logger;
-import org.jboss.ws.extensions.eventing.jaxrpc.element.EndpointReference;
import org.jboss.ws.extensions.eventing.jaxrpc.element.SubscribeRequest;
import org.jboss.ws.extensions.eventing.jaxrpc.element.SubscribeResponse;
import org.jboss.ws.extensions.eventing.jaxrpc.element.SubscriptionEndRequest;
import org.jboss.ws.extensions.eventing.common.EventingEndpointBase;
import org.jboss.ws.extensions.eventing.jaxrpc.EventSourceEndpoint;
-import org.jboss.ws.extensions.eventing.mgmt.*;
import org.jboss.ws.extensions.eventing.EventingConstants;
/**
Copied: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/AbstractEventSourceEndpoint.java (from rev 1994, trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/EventSourceEndpointImpl.java)
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/AbstractEventSourceEndpoint.java (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/AbstractEventSourceEndpoint.java 2007-01-18 13:58:21 UTC (rev 1995)
@@ -0,0 +1,130 @@
+/*
+ * 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.extensions.eventing.jaxws;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.WSException;
+import org.jboss.ws.annotation.EndpointConfig;
+import org.jboss.ws.extensions.eventing.EventingConstants;
+import org.jboss.ws.extensions.eventing.common.EventingEndpointBase;
+import org.jboss.ws.extensions.eventing.mgmt.Filter;
+import org.jboss.ws.extensions.eventing.mgmt.SubscriptionError;
+import org.jboss.ws.extensions.eventing.mgmt.SubscriptionManagerMBean;
+import org.jboss.ws.extensions.eventing.mgmt.SubscriptionTicket;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.xml.rpc.soap.SOAPFaultException;
+import javax.xml.ws.addressing.AddressingProperties;
+import javax.xml.ws.addressing.AttributedURI;
+import javax.xml.ws.addressing.Action;
+import java.net.URI;
+import java.net.URISyntaxException;
+
+/**
+ * @author Heiko.Braun(a)jboss.org
+ * @version $Id$
+ * @since 16.01.2007
+ */
+@WebService(
+ name = "EventSource",
+ portName = "EventSourcePort",
+ targetNamespace = "http://schemas.xmlsoap.org/ws/2004/08/eventing",
+ wsdlLocation = "/WEB-INF/wsdl/wind.wsdl")
+@EndpointConfig(configName = "Standard WSAddressing Endpoint")
+public abstract class AbstractEventSourceEndpoint extends EventingEndpointBase implements EventSourceEndpoint {
+
+ @WebMethod(operationName = "SubscribeOp")
+ @WebResult(name = "SubscribeResponse", targetNamespace = "http://schemas.xmlsoap.org/ws/2004/08/eventing", partName = "body")
+ @Action(
+ input = "http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe",
+ output = "http://schemas.xmlsoap.org/ws/2004/08/eventing/SubscribeResponse"
+ )
+ public SubscribeResponse subscribeOp(@WebParam(name = "Subscribe", targetNamespace = "http://schemas.xmlsoap.org/ws/2004/08/eventing", partName = "body") Subscribe request) {
+ try
+ {
+ // retrieve addressing headers
+ AddressingProperties inProps = getAddrProperties();
+ AttributedURI eventSourceURI = inProps.getTo();
+ getLogger().debug("Subscribe request for event source: " + eventSourceURI.getURI());
+
+ assertSubscriberEndpoints(request);
+ EndpointReferenceType notifyTo = request.getDelivery().getNotifyTo();
+ EndpointReferenceType endTo = request.getEndTo();
+
+ // adapt filter elements
+ Filter filter = null;
+ if (request.getFilter() != null)
+ {
+ try {
+ filter = new Filter(
+ new URI(request.getFilter().getDialect()),
+ (String)request.getFilter().getContent().get(0));
+ } catch (URISyntaxException e) {
+ throw new WSException(e);
+ }
+ }
+
+ // invoke subscription manager
+ SubscriptionManagerMBean subscriptionManager = getSubscriptionManager();
+ SubscriptionTicket ticket = subscriptionManager.subscribe(
+ eventSourceURI.getURI(),
+ notifyTo, endTo,
+ request.getExpires(),
+ filter
+ );
+
+ // create the response element
+ SubscribeResponse res = new SubscribeResponse();
+ res.setExpires(ticket.getExpires());
+ res.setSubscriptionManager(ticket.getSubscriptionManager());
+
+ return res;
+
+ }
+ catch (SubscriptionError e)
+ {
+ throw new SOAPFaultException(buildFaultQName(e.getSubcode()), e.getReason(), null, null);
+ }
+ }
+
+ /**
+ * Ensure that the subscriber endpoint information is supplied in request.
+ * Namely NotifyTo and EndTo need to be set.
+ * @param request
+ */
+ private void assertSubscriberEndpoints(Subscribe request) {
+ if(null == request.getDelivery().getNotifyTo() || null == request.getEndTo() )
+ throw new SOAPFaultException( buildFaultQName(EventingConstants.CODE_INVALID_MESSAGE) ,
+ "Subcriber endpoint information missing from request",
+ null, null
+ );
+ }
+
+ /**
+ * Subsclasses need to provide a logger for this endpoint
+ * @return a custom {@link org.jboss.logging.Logger} instance
+ */
+ protected abstract Logger getLogger();
+}
Copied: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/AbstractSubscriptionManagerEndpoint.java (from rev 1994, trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/SubscriptionManagerEndpointImpl.java)
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/AbstractSubscriptionManagerEndpoint.java (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/AbstractSubscriptionManagerEndpoint.java 2007-01-18 13:58:21 UTC (rev 1995)
@@ -0,0 +1,202 @@
+/*
+ * 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.extensions.eventing.jaxws;
+
+import org.jboss.ws.Constants;
+import org.jboss.ws.annotation.EndpointConfig;
+import org.jboss.ws.core.CommonMessageContext;
+import org.jboss.ws.core.soap.MessageContextAssociation;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.jboss.ws.extensions.eventing.EventingConstants;
+import org.jboss.ws.extensions.eventing.common.EventingEndpointBase;
+import org.jboss.ws.extensions.eventing.mgmt.SubscriptionError;
+import org.jboss.logging.Logger;
+import org.w3c.dom.Element;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.xml.namespace.QName;
+import javax.xml.rpc.soap.SOAPFaultException;
+import javax.xml.ws.addressing.AddressingProperties;
+import javax.xml.ws.addressing.JAXWSAConstants;
+import javax.xml.ws.addressing.ReferenceParameters;
+import javax.xml.ws.addressing.Action;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.Date;
+
+/**
+ * @author Heiko.Braun(a)jboss.org
+ * @version $Id$
+ * @since 16.01.2007
+ */
+@WebService(
+ name = "SubscriptionManager",
+ portName = "SubscriptionManagerPort",
+ targetNamespace = "http://schemas.xmlsoap.org/ws/2004/08/eventing",
+ wsdlLocation = "/WEB-INF/wsdl/wind.wsdl")
+@EndpointConfig(configName = "Standard WSAddressing Endpoint")
+public abstract class AbstractSubscriptionManagerEndpoint extends EventingEndpointBase implements SubscriptionManagerEndpoint {
+
+ public static final QName IDQN = new QName("http://schemas.xmlsoap.org/ws/2004/08/eventing", "Identifier", "ns1");
+
+ @WebMethod(operationName = "GetStatusOp")
+ @WebResult(name = "GetStatusResponse", targetNamespace = "http://schemas.xmlsoap.org/ws/2004/08/eventing", partName = "body")
+ @Action(
+ input = "http://schemas.xmlsoap.org/ws/2004/08/eventing/GetStatus",
+ output = "http://schemas.xmlsoap.org/ws/2004/08/eventing/GetStatusResponse"
+ )
+ public GetStatusResponse getStatusOp(@WebParam(name = "GetStatus", targetNamespace = "http://schemas.xmlsoap.org/ws/2004/08/eventing", partName = "body") GetStatus body) {
+
+ URI identifier = retrieveSubscriptionId();
+
+ getLogger().debug("GetStatus request for subscriptionID: " + identifier);
+
+ try
+ {
+ Date leaseTime = getSubscriptionManager().getStatus(identifier);
+ GetStatusResponse response = new GetStatusResponse();
+ response.setExpires(leaseTime);
+
+ return response;
+ }
+ catch (SubscriptionError e)
+ {
+ throw new SOAPFaultException(buildFaultQName(e.getSubcode()), e.getReason(), null, null);
+ }
+ }
+
+ @WebMethod(operationName = "RenewOp")
+ @WebResult(name = "RenewResponse", targetNamespace = "http://schemas.xmlsoap.org/ws/2004/08/eventing", partName = "body")
+ @Action(
+ input = "http://schemas.xmlsoap.org/ws/2004/08/eventing/Renew",
+ output = "http://schemas.xmlsoap.org/ws/2004/08/eventing/RenewResponse"
+ )
+ public RenewResponse renewOp(@WebParam(name = "Renew", targetNamespace = "http://schemas.xmlsoap.org/ws/2004/08/eventing", partName = "body") Renew request) {
+
+ URI identifier = retrieveSubscriptionId();
+
+ getLogger().debug("Renew request for subscriptionID: " + identifier);
+
+ try
+ {
+ Date newLeaseTime = getSubscriptionManager().renew(identifier, request.getExpires());
+ RenewResponse response = new RenewResponse();
+ response.setExpires(newLeaseTime);
+
+ return response;
+ }
+ catch (SubscriptionError e)
+ {
+ throw new SOAPFaultException(buildFaultQName(e.getSubcode()), e.getReason(), null, null);
+ }
+ }
+
+ @WebMethod(operationName = "UnsubscribeOp")
+ @Action(
+ input = "http://schemas.xmlsoap.org/ws/2004/08/eventing/Unsubscribe",
+ output = "http://schemas.xmlsoap.org/ws/2004/08/eventing/UnsubscribeResponse"
+ )
+ public void unsubscribeOp(@WebParam(name = "Unsubscribe", targetNamespace = "http://schemas.xmlsoap.org/ws/2004/08/eventing", partName = "body") Unsubscribe body) {
+
+ URI identifier = retrieveSubscriptionId();
+
+ getLogger().debug("Unsubscribe request for subscriptionID: " + identifier);
+
+ try
+ {
+ getSubscriptionManager().unsubscribe(identifier);
+ }
+ catch (SubscriptionError e)
+ {
+ throw new SOAPFaultException(buildFaultQName(e.getSubcode()), e.getReason(), null, null);
+ }
+
+ }
+
+ private URI retrieveSubscriptionId()
+ {
+ URI subscriptionId = null;
+ CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
+ AddressingProperties addrProps = (AddressingProperties)msgContext.getProperty(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
+
+ if (null == addrProps)
+ {
+ throw new SOAPFaultException(
+ Constants.SOAP11_FAULT_CODE_CLIENT,
+ "The message is not valid and cannot be processed: " +
+ "Cannot obtain addressing properties.",
+ null, null
+ );
+ }
+
+ ReferenceParameters refParams = addrProps.getReferenceParameters();
+ if (refParams != null)
+ {
+ for (Object obj : refParams.getElements())
+ {
+ if (obj instanceof Element)
+ {
+ Element el = (Element)obj;
+ QName qname = DOMUtils.getElementQName(el);
+ if (qname.equals(IDQN))
+ {
+ try
+ {
+ subscriptionId = new URI(DOMUtils.getTextContent(el));
+ break;
+ }
+ catch (URISyntaxException e)
+ {
+ throw new SOAPFaultException(
+ Constants.SOAP11_FAULT_CODE_CLIENT,
+ "The message is not valid and cannot be processed: " +
+ "Invalid subscription id.",
+ null, null
+ );
+ }
+ }
+ }
+ }
+ }
+
+ if (null == subscriptionId)
+ {
+ throw new SOAPFaultException(
+ buildFaultQName(EventingConstants.CODE_INVALID_MESSAGE),
+ "The message is not valid and cannot be processed: "
+ + "Cannot obtain subscription id.",
+ null, null
+ );
+ }
+
+ return subscriptionId;
+ }
+
+ /**
+ * Subsclasses need to provide a logger for this endpoint
+ * @return a custom {@link org.jboss.logging.Logger} instance
+ */
+ protected abstract Logger getLogger();
+}
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/EventSourceEndpoint.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/EventSourceEndpoint.java 2007-01-18 12:54:34 UTC (rev 1994)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/EventSourceEndpoint.java 2007-01-18 13:58:21 UTC (rev 1995)
@@ -37,7 +37,7 @@
*
*/
@WebService(name = "EventSource", targetNamespace = "http://schemas.xmlsoap.org/ws/2004/08/eventing")
-@SOAPBinding(parameterStyle = ParameterStyle.WRAPPED)
+@SOAPBinding(parameterStyle = ParameterStyle.BARE)
public interface EventSourceEndpoint {
Deleted: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/EventSourceEndpointImpl.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/EventSourceEndpointImpl.java 2007-01-18 12:54:34 UTC (rev 1994)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/EventSourceEndpointImpl.java 2007-01-18 13:58:21 UTC (rev 1995)
@@ -1,126 +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.ws.extensions.eventing.jaxws;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.WSException;
-import org.jboss.ws.annotation.EndpointConfig;
-import org.jboss.ws.extensions.eventing.EventingConstants;
-import org.jboss.ws.extensions.eventing.common.EventingEndpointBase;
-import org.jboss.ws.extensions.eventing.mgmt.Filter;
-import org.jboss.ws.extensions.eventing.mgmt.SubscriptionError;
-import org.jboss.ws.extensions.eventing.mgmt.SubscriptionManagerMBean;
-import org.jboss.ws.extensions.eventing.mgmt.SubscriptionTicket;
-
-import javax.jws.WebMethod;
-import javax.jws.WebParam;
-import javax.jws.WebResult;
-import javax.jws.WebService;
-import javax.xml.rpc.soap.SOAPFaultException;
-import javax.xml.ws.addressing.AddressingProperties;
-import javax.xml.ws.addressing.AttributedURI;
-import javax.xml.ws.addressing.Action;
-import java.net.URI;
-import java.net.URISyntaxException;
-
-/**
- * @author Heiko.Braun(a)jboss.org
- * @version $Id$
- * @since 16.01.2007
- */
-@WebService(
- name = "EventSource",
- portName = "EventSourcePort",
- targetNamespace = "http://schemas.xmlsoap.org/ws/2004/08/eventing",
- wsdlLocation = "/WEB-INF/wsdl/wind.wsdl")
-@EndpointConfig(configName = "Standard WSAddressing Endpoint")
-public class EventSourceEndpointImpl extends EventingEndpointBase implements EventSourceEndpoint {
-
- private static Logger log = Logger.getLogger(EventSourceEndpointImpl.class);
-
- @WebMethod(operationName = "SubscribeOp")
- @WebResult(name = "SubscribeResponse", targetNamespace = "http://schemas.xmlsoap.org/ws/2004/08/eventing", partName = "body")
- @Action(
- input = "http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe",
- output = "http://schemas.xmlsoap.org/ws/2004/08/eventing/SubscribeResponse"
- )
- public SubscribeResponse subscribeOp(@WebParam(name = "Subscribe", targetNamespace = "http://schemas.xmlsoap.org/ws/2004/08/eventing", partName = "body") Subscribe request) {
- try
- {
- // retrieve addressing headers
- AddressingProperties inProps = getAddrProperties();
- AttributedURI eventSourceURI = inProps.getTo();
- log.debug("Subscribe request for event source: " + eventSourceURI.getURI());
-
- assertSubscriberEndpoints(request);
- EndpointReferenceType notifyTo = request.getDelivery().getNotifyTo();
- EndpointReferenceType endTo = request.getEndTo();
-
- // adapt filter elements
- Filter filter = null;
- if (request.getFilter() != null)
- {
- try {
- filter = new Filter(
- new URI(request.getFilter().getDialect()),
- (String)request.getFilter().getContent().get(0));
- } catch (URISyntaxException e) {
- throw new WSException(e);
- }
- }
-
- // invoke subscription manager
- SubscriptionManagerMBean subscriptionManager = getSubscriptionManager();
- SubscriptionTicket ticket = subscriptionManager.subscribe(
- eventSourceURI.getURI(),
- notifyTo, endTo,
- request.getExpires(),
- filter
- );
-
- // create the response element
- SubscribeResponse res = new SubscribeResponse();
- res.setExpires(ticket.getExpires());
- res.setSubscriptionManager(ticket.getSubscriptionManager());
-
- return res;
-
- }
- catch (SubscriptionError e)
- {
- throw new SOAPFaultException(buildFaultQName(e.getSubcode()), e.getReason(), null, null);
- }
- }
-
- /**
- * Ensure that the subscriber endpoint information is supplied in request.
- * Namely NotifyTo and EndTo need to be set.
- * @param request
- */
- private void assertSubscriberEndpoints(Subscribe request) {
- if(null == request.getDelivery().getNotifyTo() || null == request.getEndTo() )
- throw new SOAPFaultException( buildFaultQName(EventingConstants.CODE_INVALID_MESSAGE) ,
- "Subcriber endpoint information missing from request",
- null, null
- );
- }
-}
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/SubscriptionManagerEndpoint.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/SubscriptionManagerEndpoint.java 2007-01-18 12:54:34 UTC (rev 1994)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/SubscriptionManagerEndpoint.java 2007-01-18 13:58:21 UTC (rev 1995)
@@ -36,7 +36,7 @@
*
*/
@WebService(name = "SubscriptionManager", targetNamespace = "http://schemas.xmlsoap.org/ws/2004/08/eventing")
-@SOAPBinding(parameterStyle = ParameterStyle.WRAPPED)
+@SOAPBinding(parameterStyle = ParameterStyle.BARE)
public interface SubscriptionManagerEndpoint {
Deleted: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/SubscriptionManagerEndpointImpl.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/SubscriptionManagerEndpointImpl.java 2007-01-18 12:54:34 UTC (rev 1994)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/SubscriptionManagerEndpointImpl.java 2007-01-18 13:58:21 UTC (rev 1995)
@@ -1,188 +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.ws.extensions.eventing.jaxws;
-
-import org.jboss.ws.Constants;
-import org.jboss.ws.annotation.EndpointConfig;
-import org.jboss.ws.core.CommonMessageContext;
-import org.jboss.ws.core.soap.MessageContextAssociation;
-import org.jboss.ws.core.utils.DOMUtils;
-import org.jboss.ws.extensions.eventing.EventingConstants;
-import org.jboss.ws.extensions.eventing.common.EventingEndpointBase;
-import org.jboss.ws.extensions.eventing.mgmt.SubscriptionError;
-import org.w3c.dom.Element;
-
-import javax.jws.WebMethod;
-import javax.jws.WebParam;
-import javax.jws.WebResult;
-import javax.jws.WebService;
-import javax.xml.namespace.QName;
-import javax.xml.rpc.soap.SOAPFaultException;
-import javax.xml.ws.addressing.AddressingProperties;
-import javax.xml.ws.addressing.JAXWSAConstants;
-import javax.xml.ws.addressing.ReferenceParameters;
-import javax.xml.ws.addressing.Action;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.Date;
-
-/**
- * @author Heiko.Braun(a)jboss.org
- * @version $Id$
- * @since 16.01.2007
- */
-@WebService(
- name = "SubscriptionManager",
- portName = "SubscriptionManagerPort",
- targetNamespace = "http://schemas.xmlsoap.org/ws/2004/08/eventing",
- wsdlLocation = "/WEB-INF/wsdl/wind.wsdl")
-@EndpointConfig(configName = "Standard WSAddressing Endpoint")
-public class SubscriptionManagerEndpointImpl extends EventingEndpointBase implements SubscriptionManagerEndpoint {
-
- public static final QName IDQN = new QName("http://schemas.xmlsoap.org/ws/2004/08/eventing", "Identifier", "ns1");
-
- @WebMethod(operationName = "GetStatusOp")
- @WebResult(name = "GetStatusResponse", targetNamespace = "http://schemas.xmlsoap.org/ws/2004/08/eventing", partName = "body")
- @Action(
- input = "http://schemas.xmlsoap.org/ws/2004/08/eventing/GetStatus",
- output = "http://schemas.xmlsoap.org/ws/2004/08/eventing/GetStatusResponse"
- )
- public GetStatusResponse getStatusOp(@WebParam(name = "GetStatus", targetNamespace = "http://schemas.xmlsoap.org/ws/2004/08/eventing", partName = "body") GetStatus body) {
- URI identifier = retrieveSubscriptionId();
-
- try
- {
- Date leaseTime = getSubscriptionManager().getStatus(identifier);
- GetStatusResponse response = new GetStatusResponse();
- response.setExpires(leaseTime);
-
- return response;
- }
- catch (SubscriptionError e)
- {
- throw new SOAPFaultException(buildFaultQName(e.getSubcode()), e.getReason(), null, null);
- }
- }
-
- @WebMethod(operationName = "RenewOp")
- @WebResult(name = "RenewResponse", targetNamespace = "http://schemas.xmlsoap.org/ws/2004/08/eventing", partName = "body")
- @Action(
- input = "http://schemas.xmlsoap.org/ws/2004/08/eventing/Renew",
- output = "http://schemas.xmlsoap.org/ws/2004/08/eventing/RenewResponse"
- )
- public RenewResponse renewOp(@WebParam(name = "Renew", targetNamespace = "http://schemas.xmlsoap.org/ws/2004/08/eventing", partName = "body") Renew request) {
-
- URI identifier = retrieveSubscriptionId();
-
- try
- {
- Date newLeaseTime = getSubscriptionManager().renew(identifier, request.getExpires());
- RenewResponse response = new RenewResponse();
- response.setExpires(newLeaseTime);
-
- return response;
- }
- catch (SubscriptionError e)
- {
- throw new SOAPFaultException(buildFaultQName(e.getSubcode()), e.getReason(), null, null);
- }
- }
-
- @WebMethod(operationName = "UnsubscribeOp")
- @Action(
- input = "http://schemas.xmlsoap.org/ws/2004/08/eventing/Unsubscribe",
- output = "http://schemas.xmlsoap.org/ws/2004/08/eventing/UnsubscribeResponse"
- )
- public void unsubscribeOp(@WebParam(name = "Unsubscribe", targetNamespace = "http://schemas.xmlsoap.org/ws/2004/08/eventing", partName = "body") Unsubscribe body) {
-
- URI identifier = retrieveSubscriptionId();
-
- try
- {
- getSubscriptionManager().unsubscribe(identifier);
- }
- catch (SubscriptionError e)
- {
- throw new SOAPFaultException(buildFaultQName(e.getSubcode()), e.getReason(), null, null);
- }
-
- }
-
- private URI retrieveSubscriptionId()
- {
- URI subscriptionId = null;
- CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
- AddressingProperties addrProps = (AddressingProperties)msgContext.getProperty(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
-
- if (null == addrProps)
- {
- throw new SOAPFaultException(
- Constants.SOAP11_FAULT_CODE_CLIENT,
- "The message is not valid and cannot be processed: " +
- "Cannot obtain addressing properties.",
- null, null
- );
- }
-
- ReferenceParameters refParams = addrProps.getReferenceParameters();
- if (refParams != null)
- {
- for (Object obj : refParams.getElements())
- {
- if (obj instanceof Element)
- {
- Element el = (Element)obj;
- QName qname = DOMUtils.getElementQName(el);
- if (qname.equals(IDQN))
- {
- try
- {
- subscriptionId = new URI(DOMUtils.getTextContent(el));
- break;
- }
- catch (URISyntaxException e)
- {
- throw new SOAPFaultException(
- Constants.SOAP11_FAULT_CODE_CLIENT,
- "The message is not valid and cannot be processed: " +
- "Invalid subscription id.",
- null, null
- );
- }
- }
- }
- }
- }
-
- if (null == subscriptionId)
- {
- throw new SOAPFaultException(
- buildFaultQName(EventingConstants.CODE_INVALID_MESSAGE),
- "The message is not valid and cannot be processed: "
- + "Cannot obtain subscription id.",
- null, null
- );
- }
-
- return subscriptionId;
- }
-}
Modified: trunk/jbossws-core/src/main/resources/schema/ws-addr.xsd
===================================================================
--- trunk/jbossws-core/src/main/resources/schema/ws-addr.xsd 2007-01-18 12:54:34 UTC (rev 1994)
+++ trunk/jbossws-core/src/main/resources/schema/ws-addr.xsd 2007-01-18 13:58:21 UTC (rev 1995)
@@ -1,156 +1,151 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE xs:schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN"
- "http://www.w3.org/2001/XMLSchema.dtd">
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE xs:schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "http://www.w3.org/2001/XMLSchema.dtd">
<!--
W3C XML Schema defined in the Web Services Addressing 1.0 specification
http://www.w3.org/TR/ws-addr-core
- Copyright © 2005 World Wide Web Consortium,
+ Copyright © 2005 World Wide Web Consortium,
(Massachusetts Institute of Technology, European Research Consortium for
Informatics and Mathematics, Keio University). All Rights Reserved. This
- work is distributed under the W3C® Software License [1] in the hope that
+ work is distributed under the W3C® Software License [1] 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.
[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+
+ $Id$
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:tns="http://www.w3.org/2005/08/addressing"
targetNamespace="http://www.w3.org/2005/08/addressing"
- blockDefault="#all" elementFormDefault="qualified"
- finalDefault="" attributeFormDefault="unqualified">
+ blockDefault="#all"
+ elementFormDefault="qualified"
+ finalDefault=""
+ attributeFormDefault="unqualified">
- <!-- Constructs from the WS-Addressing Core -->
+ <!-- Constructs from the WS-Addressing Core -->
- <xs:element name="EndpointReference" type="tns:EndpointReferenceType"/>
- <xs:complexType name="EndpointReferenceType" mixed="false">
- <xs:sequence>
- <xs:element name="Address" type="xs:anyURI"/>
+ <xs:element name="EndpointReference" type="tns:EndpointReferenceType"/>
+ <xs:complexType name="EndpointReferenceType" mixed="false">
+ <xs:sequence>
+ <xs:element name="Address" type="tns:AttributedURIType"/>
+ <xs:element name="ReferenceParameters" type="tns:ReferenceParametersType" minOccurs="0"/>
+ <xs:element ref="tns:Metadata" minOccurs="0"/>
+ <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
- <!-- [hb] was not working
- xs:element name="Address" type="tns:AttributedURIType"/-->
- <xs:element name="ReferenceParameters" type="tns:ReferenceParametersType" minOccurs="0"/>
- <xs:element ref="tns:Metadata" minOccurs="0"/>
- <!--xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/-->
- </xs:sequence>
- <!--xs:anyAttribute namespace="##other" processContents="lax"/-->
- </xs:complexType>
+ <xs:complexType name="ReferenceParametersType" mixed="false">
+ <xs:sequence>
+ <xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
- <xs:complexType name="ReferenceParametersType" mixed="false">
- <xs:sequence>
- <!--xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/-->
- <!--
- [hb] workaround for missing wilcard support
- -->
- <xs:element name="Identifier" type="xs:anyURI" minOccurs="0"/>
- </xs:sequence>
- <!--xs:anyAttribute namespace="##other" processContents="lax"/-->
- </xs:complexType>
+ <xs:element name="Metadata" type="tns:MetadataType"/>
+ <xs:complexType name="MetadataType" mixed="false">
+ <xs:sequence>
+ <xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
- <xs:element name="Metadata" type="tns:MetadataType"/>
- <xs:complexType name="MetadataType" mixed="false">
- <xs:sequence>
- <!--xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/-->
- </xs:sequence>
- <!--xs:anyAttribute namespace="##other" processContents="lax"/-->
- </xs:complexType>
+ <xs:element name="MessageID" type="tns:AttributedURIType"/>
+ <xs:element name="RelatesTo" type="tns:RelatesToType"/>
+ <xs:complexType name="RelatesToType" mixed="false">
+ <xs:simpleContent>
+ <xs:extension base="xs:anyURI">
+ <xs:attribute name="RelationshipType" type="tns:RelationshipTypeOpenEnum" use="optional" default="http://www.w3.org/2005/08/addressing/reply"/>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
- <xs:element name="MessageID" type="tns:AttributedURIType"/>
- <xs:element name="RelatesTo" type="tns:RelatesToType"/>
- <xs:complexType name="RelatesToType" mixed="false">
- <xs:simpleContent>
- <xs:extension base="xs:anyURI">
- <xs:attribute name="RelationshipType" type="tns:RelationshipTypeOpenEnum" use="optional"
- default="http://www.w3.org/2005/08/addressing/reply"/>
- <!--xs:anyAttribute namespace="##other" processContents="lax"/-->
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
+ <xs:simpleType name="RelationshipTypeOpenEnum">
+ <xs:union memberTypes="tns:RelationshipType xs:anyURI"/>
+ </xs:simpleType>
- <xs:simpleType name="RelationshipTypeOpenEnum">
- <xs:union memberTypes="tns:RelationshipType xs:anyURI"/>
- </xs:simpleType>
+ <xs:simpleType name="RelationshipType">
+ <xs:restriction base="xs:anyURI">
+ <xs:enumeration value="http://www.w3.org/2005/08/addressing/reply"/>
+ </xs:restriction>
+ </xs:simpleType>
- <xs:simpleType name="RelationshipType">
- <xs:restriction base="xs:anyURI">
- <xs:enumeration value="http://www.w3.org/2005/08/addressing/reply"/>
- </xs:restriction>
- </xs:simpleType>
+ <xs:element name="ReplyTo" type="tns:EndpointReferenceType"/>
+ <xs:element name="From" type="tns:EndpointReferenceType"/>
+ <xs:element name="FaultTo" type="tns:EndpointReferenceType"/>
+ <xs:element name="To" type="tns:AttributedURIType"/>
+ <xs:element name="Action" type="tns:AttributedURIType"/>
- <xs:element name="ReplyTo" type="tns:EndpointReferenceType"/>
- <xs:element name="From" type="tns:EndpointReferenceType"/>
- <xs:element name="FaultTo" type="tns:EndpointReferenceType"/>
- <xs:element name="To" type="tns:AttributedURIType"/>
- <xs:element name="Action" type="tns:AttributedURIType"/>
+ <xs:complexType name="AttributedURIType" mixed="false">
+ <xs:simpleContent>
+ <xs:extension base="xs:anyURI">
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
- <xs:complexType name="AttributedURIType" mixed="false">
- <xs:simpleContent>
- <xs:extension base="xs:anyURI">
- <!--xs:anyAttribute namespace="##other" processContents="lax"/-->
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
+ <!-- Constructs from the WS-Addressing SOAP binding -->
- <!-- Constructs from the WS-Addressing SOAP binding -->
+ <xs:attribute name="IsReferenceParameter" type="xs:boolean"/>
- <xs:attribute name="IsReferenceParameter" type="xs:boolean"/>
+ <xs:simpleType name="FaultCodesOpenEnumType">
+ <xs:union memberTypes="tns:FaultCodesType xs:QName"/>
+ </xs:simpleType>
- <xs:simpleType name="FaultCodesOpenEnumType">
- <xs:union memberTypes="tns:FaultCodesType xs:QName"/>
- </xs:simpleType>
+ <xs:simpleType name="FaultCodesType">
+ <xs:restriction base="xs:QName">
+ <xs:enumeration value="tns:InvalidAddressingHeader"/>
+ <xs:enumeration value="tns:InvalidAddress"/>
+ <xs:enumeration value="tns:InvalidEPR"/>
+ <xs:enumeration value="tns:InvalidCardinality"/>
+ <xs:enumeration value="tns:MissingAddressInEPR"/>
+ <xs:enumeration value="tns:DuplicateMessageID"/>
+ <xs:enumeration value="tns:ActionMismatch"/>
+ <xs:enumeration value="tns:MessageAddressingHeaderRequired"/>
+ <xs:enumeration value="tns:DestinationUnreachable"/>
+ <xs:enumeration value="tns:ActionNotSupported"/>
+ <xs:enumeration value="tns:EndpointUnavailable"/>
+ </xs:restriction>
+ </xs:simpleType>
- <xs:simpleType name="FaultCodesType">
- <xs:restriction base="xs:QName">
- <xs:enumeration value="tns:InvalidAddressingHeader"/>
- <xs:enumeration value="tns:InvalidAddress"/>
- <xs:enumeration value="tns:InvalidEPR"/>
- <xs:enumeration value="tns:InvalidCardinality"/>
- <xs:enumeration value="tns:MissingAddressInEPR"/>
- <xs:enumeration value="tns:DuplicateMessageID"/>
- <xs:enumeration value="tns:ActionMismatch"/>
- <xs:enumeration value="tns:MessageAddressingHeaderRequired"/>
- <xs:enumeration value="tns:DestinationUnreachable"/>
- <xs:enumeration value="tns:ActionNotSupported"/>
- <xs:enumeration value="tns:EndpointUnavailable"/>
- </xs:restriction>
- </xs:simpleType>
+ <xs:element name="RetryAfter" type="tns:AttributedUnsignedLongType"/>
+ <xs:complexType name="AttributedUnsignedLongType" mixed="false">
+ <xs:simpleContent>
+ <xs:extension base="xs:unsignedLong">
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
- <xs:element name="RetryAfter" type="tns:AttributedUnsignedLongType"/>
- <xs:complexType name="AttributedUnsignedLongType" mixed="false">
- <xs:simpleContent>
- <xs:extension base="xs:unsignedLong">
- <!--xs:anyAttribute namespace="##other" processContents="lax"/-->
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
+ <xs:element name="ProblemHeaderQName" type="tns:AttributedQNameType"/>
+ <xs:complexType name="AttributedQNameType" mixed="false">
+ <xs:simpleContent>
+ <xs:extension base="xs:QName">
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
- <xs:element name="ProblemHeaderQName" type="tns:AttributedQNameType"/>
- <xs:complexType name="AttributedQNameType" mixed="false">
- <xs:simpleContent>
- <xs:extension base="xs:QName">
- <!--xs:anyAttribute namespace="##other" processContents="lax"/-->
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
+ <xs:element name="ProblemHeader" type="tns:AttributedAnyType"/>
+ <xs:complexType name="AttributedAnyType" mixed="false">
+ <xs:sequence>
+ <xs:any namespace="##any" processContents="lax" minOccurs="1" maxOccurs="1"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
- <xs:element name="ProblemHeader" type="tns:AttributedAnyType"/>
- <xs:complexType name="AttributedAnyType" mixed="false">
- <xs:sequence>
- <!--xs:any namespace="##any" processContents="lax" minOccurs="1" maxOccurs="1"/-->
- </xs:sequence>
- <!--xs:anyAttribute namespace="##other" processContents="lax"/-->
- </xs:complexType>
+ <xs:element name="ProblemIRI" type="tns:AttributedURIType"/>
- <xs:element name="ProblemIRI" type="tns:AttributedURIType"/>
+ <xs:element name="ProblemAction" type="tns:ProblemActionType"/>
+ <xs:complexType name="ProblemActionType" mixed="false">
+ <xs:sequence>
+ <xs:element ref="tns:Action" minOccurs="0"/>
+ <xs:element name="SoapAction" minOccurs="0" type="xs:anyURI"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
- <xs:element name="ProblemAction" type="tns:ProblemActionType"/>
- <xs:complexType name="ProblemActionType" mixed="false">
- <xs:sequence>
- <xs:element ref="tns:Action" minOccurs="0"/>
- <xs:element name="SoapAction" minOccurs="0" type="xs:anyURI"/>
- </xs:sequence>
- <!--xs:anyAttribute namespace="##other" processContents="lax"/-->
- </xs:complexType>
-
-</xs:schema>
+</xs:schema>
\ No newline at end of file
Modified: trunk/jbossws-core/src/main/resources/schema/ws-eventing.xsd
===================================================================
--- trunk/jbossws-core/src/main/resources/schema/ws-eventing.xsd 2007-01-18 12:54:34 UTC (rev 1994)
+++ trunk/jbossws-core/src/main/resources/schema/ws-eventing.xsd 2007-01-18 13:58:21 UTC (rev 1995)
@@ -1,189 +1,186 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!--
+(c) 2004 BEA Systems Inc., Computer Associates International, Inc., International Business Machines Corporation, Microsoft Corporation, Inc, Sun Microsystems, Inc., and TIBCO Software Inc. All rights reserved.
-<xs:schema
- targetNamespace="http://schemas.xmlsoap.org/ws/2004/08/eventing"
- xmlns:tns="http://schemas.xmlsoap.org/ws/2004/08/eventing"
- xmlns:wsa="http://www.w3.org/2005/08/addressing"
- xmlns:xs="http://www.w3.org/2001/XMLSchema"
- elementFormDefault="qualified"
- attributeFormDefault="unqualified"
- blockDefault="#all">
+BEA Systems Inc., Computer Associates International, Inc., International Business Machines Corporation, Microsoft Corporation, Inc, Sun Microsystems, Inc, and TIBCO Software Inc (collectively, the "Authors") hereby grant you permission to copy and display the WS-Eventing Specification (the "Specification", which includes WSDL and schema documents), in any medium without fee or royalty, provided that you include the following on ALL copies of the Specification, that you make:
- <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>
+1. A link or URL to the WS-Eventing Specification at one of the Authors' websites
+2. The copyright notice as shown in the WS-Eventing Specification.
- <xs:import namespace="http://www.w3.org/2005/08/addressing" schemaLocation="http://www.w3.org/2005/08/addressing/ws-addr.xsd"/>
+BEA, CA, IBM, Microsoft, Sun and TIBCO (collectively, the "Authors") each agree to grant you a license, under royalty-free and otherwise reasonable, non-discriminatory terms and conditions, to their respective essential patent claims that they deem necessary to implement the Specification.
- <!-- Types and global elements -->
- <xs:complexType name="DeliveryType" mixed="true">
- <xs:sequence>
- <!--xs:any namespace="##any" processContents="lax"
- minOccurs="0" maxOccurs="unbounded" /-->
- <xs:element name="NotifyTo" type="wsa:EndpointReferenceType" minOccurs="0" maxOccurs="1"/>
- </xs:sequence>
- <xs:attribute name="Mode" type="xs:anyURI" use="optional"/>
- <!--xs:anyAttribute namespace="##other" processContents="lax" /-->
- </xs:complexType>
+THE SPECIFICATION IS PROVIDED "AS IS," AND THE AUTHORS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF THE SPECIFICATION ARE SUITABLE FOR ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF SUCH CONTENTS WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
- <!--xs:element name="NotifyTo" type="wsa:EndpointReferenceType" /-->
+THE AUTHORS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATING TO ANY USE OR DISTRIBUTION OF THE SPECIFICATION.
- <xs:simpleType name="NonNegativeDurationType">
- <xs:restriction base="xs:duration">
- <xs:minInclusive value="P0Y0M0DT0H0M0S"/>
- </xs:restriction>
- </xs:simpleType>
+The name and trademarks of the Authors may NOT be used in any manner, including advertising or publicity pertaining to the Specification or its contents without specific, written prior permission. Title to copyright in the Specification will at all times remain with the Authors.
- <xs:simpleType name="ExpirationType">
- <xs:union memberTypes="xs:dateTime tns:NonNegativeDurationType"/>
- </xs:simpleType>
+No other rights are granted by implication, estoppel or otherwise.
+-->
+<xs:schema targetNamespace="http://schemas.xmlsoap.org/ws/2004/08/eventing"
+ xmlns:tns="http://schemas.xmlsoap.org/ws/2004/08/eventing"
+ xmlns:wsa="http://www.w3.org/2005/08/addressing"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ elementFormDefault="qualified"
+ blockDefault="#all">
- <xs:complexType name="FilterType" mixed="true">
- <!--xs:sequence>
- <xs:any namespace="##other" processContents="lax"
- minOccurs="0" maxOccurs="unbounded" />
- </xs:sequence-->
- <xs:simpleContent>
- <xs:extension base="xs:string">
- <xs:attribute name="Dialect" type="xs:anyURI" use="optional"/>
- </xs:extension>
- </xs:simpleContent>
+ <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>
- <!--xs:anyAttribute namespace="##other" processContents="lax" /-->
- </xs:complexType>
+ <!--xs:import namespace="http://www.w3.org/2005/08/addressing" schemaLocation="wsaddr.xsd"/-->
+ <xs:import namespace="http://www.w3.org/2005/08/addressing"/>
- <xs:complexType name="LanguageSpecificStringType">
- <xs:simpleContent>
- <xs:extension base="xs:string">
- <xs:attribute ref="xml:lang" />
- <!--xs:anyAttribute namespace="##other" processContents="lax" /-->
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
+ <!-- Types and global elements -->
+ <xs:complexType name="DeliveryType" mixed="true">
+ <xs:sequence>
+ <xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:attribute name="Mode" type="xs:anyURI" use="optional"/>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
- <xs:element name="Subscribe">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="EndTo" type="wsa:EndpointReferenceType"
- minOccurs="0"/>
- <xs:element name="Delivery" type="tns:DeliveryType"/>
- <xs:element name="Expires" type="xs:dateTime" minOccurs="0"/>
- <xs:element name="Filter" type="tns:FilterType" minOccurs="0"/>
- <!--xs:any namespace="##other" processContents="lax"
- minOccurs="0" maxOccurs="unbounded" /-->
- </xs:sequence>
- <!--xs:anyAttribute namespace="##other" processContents="lax" /-->
- </xs:complexType>
- </xs:element>
+ <xs:element name="NotifyTo" type="wsa:EndpointReferenceType"/>
- <xs:element name="Identifier" type="xs:anyURI"/>
+ <xs:simpleType name="NonNegativeDurationType">
+ <xs:restriction base="xs:duration">
+ <xs:minInclusive value="P0Y0M0DT0H0M0S"/>
+ </xs:restriction>
+ </xs:simpleType>
- <xs:element name="SubscribeResponse">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="SubscriptionManager"
- type="wsa:EndpointReferenceType"/>
- <xs:element name="Expires" type="xs:dateTime"/>
+ <xs:simpleType name="ExpirationType">
+ <xs:union memberTypes="xs:dateTime tns:NonNegativeDurationType"/>
+ </xs:simpleType>
- <!--xs:element name="Expires" type="tns:ExpirationType" /-->
- <!--xs:any namespace="##other" processContents="lax"
- minOccurs="0" maxOccurs="unbounded" /-->
- </xs:sequence>
- <!--xs:anyAttribute namespace="##other" processContents="lax" /-->
- </xs:complexType>
- </xs:element>
+ <xs:complexType name="FilterType" mixed="true">
+ <xs:sequence>
+ <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:attribute name="Dialect" type="xs:anyURI" use="optional"/>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
- <!-- Used in a fault if there's an unsupported dialect -->
- <xs:element name="SupportedDialect" type="xs:anyURI"/>
+ <xs:complexType name="LanguageSpecificStringType">
+ <xs:simpleContent>
+ <xs:extension base="xs:string">
+ <xs:attribute ref="xml:lang"/>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
- <!-- Used in a fault if there's an unsupported delivery mode -->
- <xs:element name="SupportedDeliveryMode" type="xs:anyURI"/>
+ <!-- Subscribe request -->
+ <xs:element name="Subscribe">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="EndTo" type="wsa:EndpointReferenceType" minOccurs="0"/>
+ <xs:element name="Delivery" type="tns:DeliveryType"/>
+ <xs:element name="Expires" type="tns:ExpirationType" minOccurs="0"/>
+ <xs:element name="Filter" type="tns:FilterType" minOccurs="0"/>
+ <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
+ </xs:element>
- <!-- Renew request -->
- <xs:element name="Renew">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="Expires" type="xs:dateTime" minOccurs="0"/>
- <!--xs:any namespace="##other" processContents="lax"
- minOccurs="0" maxOccurs="unbounded" /-->
- </xs:sequence>
- <!--xs:anyAttribute namespace="##other" processContents="lax" /-->
- </xs:complexType>
- </xs:element>
+ <xs:element name="Identifier" type="xs:anyURI"/>
- <!-- Renew response -->
- <xs:element name="RenewResponse">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="Expires" type="xs:dateTime" minOccurs="0"/>
- <!--xs:any namespace="##other" processContents="lax"
- minOccurs="0" maxOccurs="unbounded" /-->
- </xs:sequence>
- <!--xs:anyAttribute namespace="##other" processContents="lax" /-->
- </xs:complexType>
- </xs:element>
+ <!-- Subscribe response -->
+ <xs:element name="SubscribeResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="SubscriptionManager" type="wsa:EndpointReferenceType"/>
+ <xs:element name="Expires" type="tns:ExpirationType"/>
+ <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
+ </xs:element>
- <!-- GetStatus request -->
- <xs:element name="GetStatus">
- <xs:complexType>
- <xs:sequence>
- <xs:any namespace="##other" processContents="lax"
- minOccurs="0" maxOccurs="unbounded" />
- </xs:sequence>
- <!--xs:anyAttribute namespace="##other" processContents="lax" /-->
- </xs:complexType>
- </xs:element>
+ <!-- Used in a fault if there's an unsupported dialect -->
+ <xs:element name="SupportedDialect" type="xs:anyURI"/>
- <!-- GetStatus response -->
- <xs:element name="GetStatusResponse">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="Expires" type="xs:dateTime" minOccurs="0"/>
- <!--xs:any namespace="##other" processContents="lax"
- minOccurs="0" maxOccurs="unbounded" /-->
- </xs:sequence>
- <!--xs:anyAttribute namespace="##other" processContents="lax" /-->
- </xs:complexType>
- </xs:element>
+ <!-- Used in a fault if there's an unsupported delivery mode -->
+ <xs:element name="SupportedDeliveryMode" type="xs:anyURI"/>
- <!-- Unsubscribe request -->
- <xs:element name="Unsubscribe">
- <xs:complexType>
- <xs:sequence>
- <xs:any namespace="##other" processContents="lax"
- minOccurs="0" maxOccurs="unbounded" />
- </xs:sequence>
- <!--xs:anyAttribute namespace="##other" processContents="lax" /-->
- </xs:complexType>
- </xs:element>
+ <!-- Renew request -->
+ <xs:element name="Renew">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Expires" type="tns:ExpirationType" minOccurs="0"/>
+ <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
+ </xs:element>
- <!-- count(/s:Envelope/s:Body/*) = 0 for Unsubscribe response -->
- <!-- SubscriptionEnd message -->
- <xs:element name="SubscriptionEnd">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="SubscriptionManager"
- type="wsa:EndpointReferenceType"/>
- <xs:element name="Code" type="tns:OpenSubscriptionEndCodeType"/>
- <xs:element name="Reason" type="tns:LanguageSpecificStringType"
- minOccurs="0" maxOccurs="unbounded"/>
- <!--xs:any namespace="##other" processContents="lax"
- minOccurs="0" maxOccurs="unbounded" /-->
- </xs:sequence>
- <!--xs:anyAttribute namespace="##other" processContents="lax" /-->
- </xs:complexType>
- </xs:element>
+ <!-- Renew response -->
+ <xs:element name="RenewResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Expires" type="tns:ExpirationType" minOccurs="0"/>
+ <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
+ </xs:element>
- <xs:simpleType name="SubscriptionEndCodeType">
- <xs:restriction base="xs:QName">
- <xs:enumeration value="tns:DeliveryFailure"/>
- <xs:enumeration value="tns:SourceShuttingDown"/>
- <xs:enumeration value="tns:SourceCancelling"/>
- </xs:restriction>
- </xs:simpleType>
+ <!-- GetStatus request -->
+ <xs:element name="GetStatus">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
+ </xs:element>
- <xs:simpleType name="OpenSubscriptionEndCodeType">
- <xs:union memberTypes="tns:SubscriptionEndCodeType xs:QName"/>
- </xs:simpleType>
+ <!-- GetStatus response -->
+ <xs:element name="GetStatusResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Expires" type="tns:ExpirationType" minOccurs="0"/>
+ <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
+ </xs:element>
- <xs:attribute name="EventSource" type="xs:boolean"/>
+ <!-- Unsubscribe request -->
+ <xs:element name="Unsubscribe">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
+ </xs:element>
-</xs:schema>
+ <!-- count(/s:Envelope/s:Body/*) = 0 for Unsubscribe response -->
+
+ <!-- SubscriptionEnd message -->
+ <xs:element name="SubscriptionEnd">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="SubscriptionManager" type="wsa:EndpointReferenceType"/>
+ <xs:element name="Code" type="tns:OpenSubscriptionEndCodeType"/>
+ <xs:element name="Reason" type="tns:LanguageSpecificStringType" minOccurs="0" maxOccurs="unbounded"/>
+ <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:simpleType name="SubscriptionEndCodeType">
+ <xs:restriction base="xs:QName">
+ <xs:enumeration value="tns:DeliveryFailure"/>
+ <xs:enumeration value="tns:SourceShuttingDown"/>
+ <xs:enumeration value="tns:SourceCancelling"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="OpenSubscriptionEndCodeType">
+ <xs:union memberTypes="tns:SubscriptionEndCodeType xs:QName"/>
+ </xs:simpleType>
+
+ <xs:attribute name="EventSource" type="xs:boolean"/>
+
+</xs:schema>
\ No newline at end of file
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/wseventing/CustomEventSource.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/wseventing/CustomEventSource.java 2007-01-18 12:54:34 UTC (rev 1994)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/wseventing/CustomEventSource.java 2007-01-18 13:58:21 UTC (rev 1995)
@@ -21,11 +21,32 @@
*/
package org.jboss.test.ws.jaxws.wseventing;
+import org.jboss.ws.extensions.eventing.jaxws.AbstractEventSourceEndpoint;
+import org.jboss.ws.annotation.EndpointConfig;
+import org.jboss.logging.Logger;
+
+import javax.jws.WebService;
+
/**
* @author Heiko.Braun(a)jboss.org
* @version $Id$
* @since 16.01.2007
*/
-public class CustomEventSource {
+@WebService(
+ name = "EventSource",
+ portName = "EventSourcePort",
+ targetNamespace = "http://schemas.xmlsoap.org/ws/2004/08/eventing",
+ wsdlLocation = "/WEB-INF/wsdl/windreport.wsdl",
+ endpointInterface = "org.jboss.ws.extensions.eventing.jaxws.EventSourceEndpoint")
+@EndpointConfig(configName = "Standard WSAddressing Endpoint")
+public class CustomEventSource extends AbstractEventSourceEndpoint {
+ private static final Logger log = Logger.getLogger(CustomEventSource.class);
+
+ protected Logger getLogger()
+ {
+ return log;
+ }
+
+
}
Added: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/wseventing/CustomSubscriptionManager.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/wseventing/CustomSubscriptionManager.java (rev 0)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/wseventing/CustomSubscriptionManager.java 2007-01-18 13:58:21 UTC (rev 1995)
@@ -0,0 +1,49 @@
+/*
+ * 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.wseventing;
+
+import org.jboss.ws.extensions.eventing.jaxws.AbstractSubscriptionManagerEndpoint;
+import org.jboss.ws.annotation.EndpointConfig;
+import org.jboss.logging.Logger;
+
+import javax.jws.WebService;
+
+/**
+ * @author Heiko.Braun(a)jboss.org
+ * @version $Id$
+ * @since 18.01.2007
+ */
+@WebService(
+ name = "SubscriptionManager",
+ portName = "SubscriptionManagerPort",
+ targetNamespace = "http://schemas.xmlsoap.org/ws/2004/08/eventing",
+ wsdlLocation = "/WEB-INF/wsdl/windreport.wsdl",
+ endpointInterface = "org.jboss.ws.extensions.eventing.jaxws.SubscriptionManagerEndpoint")
+@EndpointConfig(configName = "Standard WSAddressing Endpoint")
+public class CustomSubscriptionManager extends AbstractSubscriptionManagerEndpoint {
+
+ private static final Logger log = Logger.getLogger(CustomSubscriptionManager.class);
+
+ protected Logger getLogger() {
+ return log;
+ }
+}
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/wseventing/EventingSupport.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/wseventing/EventingSupport.java 2007-01-18 12:54:34 UTC (rev 1994)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/wseventing/EventingSupport.java 2007-01-18 13:58:21 UTC (rev 1995)
@@ -80,11 +80,14 @@
protected static AddressingBuilder addrBuilder = AddressingBuilder.getAddressingBuilder();
+ // an event source name is build from the TNS+PortType name
+ private static final String EVENT_SOURCE_NAME = "http://www.jboss.org/wind/Warnings";
+
protected void setUp() throws Exception
{
super.setUp();
- eventSourceURI = new URI("http://schemas.xmlsoap.org/ws/2004/08/eventing/Warnings");
+ eventSourceURI = new URI(EVENT_SOURCE_NAME);
wsdlLocation = new URL("http://" + getServerHost() + ":8080/jaxws-wseventing/subscribe?wsdl");
if (eventSourcePort == null)
Modified: trunk/jbossws-tests/src/main/resources/jaxws/wseventing/WEB-INF/web.xml
===================================================================
--- trunk/jbossws-tests/src/main/resources/jaxws/wseventing/WEB-INF/web.xml 2007-01-18 12:54:34 UTC (rev 1994)
+++ trunk/jbossws-tests/src/main/resources/jaxws/wseventing/WEB-INF/web.xml 2007-01-18 13:58:21 UTC (rev 1995)
@@ -17,7 +17,7 @@
<servlet>
<servlet-name>EventSource</servlet-name>
- <servlet-class>org.jboss.ws.extensions.eventing.jaxws.EventSourceEndpointImpl</servlet-class>
+ <servlet-class>org.jboss.test.ws.jaxws.wseventing.CustomEventSource</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>EventSource</servlet-name>
@@ -26,7 +26,7 @@
<servlet>
<servlet-name>SubscriptionManager</servlet-name>
- <servlet-class>org.jboss.ws.extensions.eventing.jaxws.SubscriptionManagerEndpointImpl</servlet-class>
+ <servlet-class>org.jboss.test.ws.jaxws.wseventing.CustomSubscriptionManager</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>SubscriptionManager</servlet-name>
Deleted: trunk/jbossws-tests/src/main/resources/jaxws/wseventing/WEB-INF/wsdl/eventing.wsdl
===================================================================
--- trunk/jbossws-tests/src/main/resources/jaxws/wseventing/WEB-INF/wsdl/eventing.wsdl 2007-01-18 12:54:34 UTC (rev 1994)
+++ trunk/jbossws-tests/src/main/resources/jaxws/wseventing/WEB-INF/wsdl/eventing.wsdl 2007-01-18 13:58:21 UTC (rev 1995)
@@ -1,133 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<wsdl:definitions
- targetNamespace='http://schemas.xmlsoap.org/ws/2004/08/eventing'
- xmlns:wse='http://schemas.xmlsoap.org/ws/2004/08/eventing'
- xmlns:wsa10='http://www.w3.org/2005/08/addressing'
- xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/'
- xmlns:xs='http://www.w3.org/2001/XMLSchema'
- xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
-
- <wsdl:types>
- <xs:schema targetNamespace='http://schemas.xmlsoap.org/ws/2004/08/eventing'>
- <xs:include schemaLocation='eventing.xsd'/>
- </xs:schema>
- </wsdl:types>
-
- <wsdl:message name='SubscribeMsg'>
- <wsdl:part name='body' element='wse:Subscribe'/>
- </wsdl:message>
- <wsdl:message name='SubscribeResponseMsg'>
- <wsdl:part name='body' element='wse:SubscribeResponse'/>
- </wsdl:message>
-
- <wsdl:message name='RenewMsg'>
- <wsdl:part name='body' element='wse:Renew'/>
- </wsdl:message>
- <wsdl:message name='RenewResponseMsg'>
- <wsdl:part name='body' element='wse:RenewResponse'/>
- </wsdl:message>
-
- <wsdl:message name='GetStatusMsg'>
- <wsdl:part name='body' element='wse:GetStatus'/>
- </wsdl:message>
- <wsdl:message name='GetStatusResponseMsg'>
- <wsdl:part name='body' element='wse:GetStatusResponse'/>
- </wsdl:message>
-
- <wsdl:message name='UnsubscribeMsg'>
- <wsdl:part name='body' element='wse:Unsubscribe'/>
- </wsdl:message>
- <wsdl:message name='UnsubscribeResponseMsg'/>
-
- <wsdl:message name='SubscriptionEnd'>
- <wsdl:part name='body' element='wse:SubscriptionEnd'/>
- </wsdl:message>
-
- <wsdl:portType name='EventSource'>
- <wsdl:operation name='SubscribeOp'>
- <wsdl:input message='wse:SubscribeMsg' wsa10:Action='http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe'/>
- <wsdl:output message='wse:SubscribeResponseMsg' wsa10:Action='http://schemas.xmlsoap.org/ws/2004/08/eventing/SubscribeResponse'/>
- </wsdl:operation>
- <!--wsdl:operation name='SubscriptionEnd'>
- <wsdl:output message='wse:SubscriptionEnd'/>
- </wsdl:operation-->
- </wsdl:portType>
-
- <wsdl:portType name='SubscriptionManager'>
- <wsdl:operation name='RenewOp'>
- <wsdl:input message='wse:RenewMsg' wsa10:Action='http://schemas.xmlsoap.org/ws/2004/08/eventing/Renew'/>
- <wsdl:output message='wse:RenewResponseMsg' wsa10:Action='http://schemas.xmlsoap.org/ws/2004/08/eventing/RenewResponse'/>
- </wsdl:operation>
- <wsdl:operation name='GetStatusOp'>
- <wsdl:input message='wse:GetStatusMsg' wsa10:Action='http://schemas.xmlsoap.org/ws/2004/08/eventing/GetStatus'/>
- <wsdl:output message='wse:GetStatusResponseMsg' wsa10:Action='http://schemas.xmlsoap.org/ws/2004/08/eventing/GetStatusResponse'/>
- </wsdl:operation>
- <wsdl:operation name='UnsubscribeOp'>
- <wsdl:input message='wse:UnsubscribeMsg' wsa10:Action='http://schemas.xmlsoap.org/ws/2004/08/eventing/Unsubscribe'/>
- <wsdl:output message='wse:UnsubscribeResponseMsg' wsa10:Action='http://schemas.xmlsoap.org/ws/2004/08/eventing/UnsubscribeResponse'/>
- </wsdl:operation>
- </wsdl:portType>
-
- <wsdl:binding name="EventSourceBinding" type="wse:EventSource">
- <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
- <wsdl:operation name="SubscribeOp">
- <soap:operation soapAction=""/>
- <wsdl:input>
- <soap:body use="literal"/>
- </wsdl:input>
- <wsdl:output>
- <soap:body use="literal"/>
- </wsdl:output>
- </wsdl:operation>
- <!--wsdl:operation name="SubscriptionEnd">
- <soap:operation soapAction=""/>
- <wsdl:output>
- <soap:body use="literal"/>
- </wsdl:output>
- </wsdl:operation-->
- </wsdl:binding>
-
- <wsdl:binding name="SubscriptionManagerBinding" type="wse:SubscriptionManager">
- <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
- <wsdl:operation name="GetStatusOp">
- <soap:operation soapAction=""/>
- <wsdl:input>
- <soap:body use="literal"/>
- </wsdl:input>
- <wsdl:output>
- <soap:body use="literal"/>
- </wsdl:output>
- </wsdl:operation>
-
- <wsdl:operation name="RenewOp">
- <soap:operation soapAction=""/>
- <wsdl:input>
- <soap:body use="literal"/>
- </wsdl:input>
- <wsdl:output>
- <soap:body use="literal"/>
- </wsdl:output>
- </wsdl:operation>
-
- <wsdl:operation name="UnsubscribeOp">
- <soap:operation soapAction=""/>
- <wsdl:input>
- <soap:body use="literal"/>
- </wsdl:input>
- <wsdl:output>
- <soap:body use="literal"/>
- </wsdl:output>
- </wsdl:operation>
- </wsdl:binding>
-
- <wsdl:service name="EventingService">
- <wsdl:port name="EventSourcePort" binding="wse:EventSourceBinding">
- <soap:address location="http://@jbosstest.host.name@:8080/jaxrpc-wseventing/ws4ee/EventSourcePortType"/>
- </wsdl:port>
- <wsdl:port name="SubscriptionManagerPort" binding="wse:SubscriptionManagerBinding">
- <soap:address location="http://@jbosstest.host.name@:8080/jaxrpc-wseventing/ws4ee/SubscriptionManagerPortType"/>
- </wsdl:port>
- </wsdl:service>
-
-</wsdl:definitions>
Deleted: trunk/jbossws-tests/src/main/resources/jaxws/wseventing/WEB-INF/wsdl/eventing.xsd
===================================================================
--- trunk/jbossws-tests/src/main/resources/jaxws/wseventing/WEB-INF/wsdl/eventing.xsd 2007-01-18 12:54:34 UTC (rev 1994)
+++ trunk/jbossws-tests/src/main/resources/jaxws/wseventing/WEB-INF/wsdl/eventing.xsd 2007-01-18 13:58:21 UTC (rev 1995)
@@ -1,185 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-(c) 2004 BEA Systems Inc., Computer Associates International, Inc., International Business Machines Corporation, Microsoft Corporation, Inc, Sun Microsystems, Inc., and TIBCO Software Inc. All rights reserved.
-
-BEA Systems Inc., Computer Associates International, Inc., International Business Machines Corporation, Microsoft Corporation, Inc, Sun Microsystems, Inc, and TIBCO Software Inc (collectively, the "Authors") hereby grant you permission to copy and display the WS-Eventing Specification (the "Specification", which includes WSDL and schema documents), in any medium without fee or royalty, provided that you include the following on ALL copies of the Specification, that you make:
-
-1. A link or URL to the WS-Eventing Specification at one of the Authors' websites
-2. The copyright notice as shown in the WS-Eventing Specification.
-
-BEA, CA, IBM, Microsoft, Sun and TIBCO (collectively, the "Authors") each agree to grant you a license, under royalty-free and otherwise reasonable, non-discriminatory terms and conditions, to their respective essential patent claims that they deem necessary to implement the Specification.
-
-THE SPECIFICATION IS PROVIDED "AS IS," AND THE AUTHORS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF THE SPECIFICATION ARE SUITABLE FOR ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF SUCH CONTENTS WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
-
-THE AUTHORS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATING TO ANY USE OR DISTRIBUTION OF THE SPECIFICATION.
-
-The name and trademarks of the Authors may NOT be used in any manner, including advertising or publicity pertaining to the Specification or its contents without specific, written prior permission. Title to copyright in the Specification will at all times remain with the Authors.
-
-No other rights are granted by implication, estoppel or otherwise.
--->
-<xs:schema targetNamespace="http://schemas.xmlsoap.org/ws/2004/08/eventing"
- xmlns:tns="http://schemas.xmlsoap.org/ws/2004/08/eventing"
- xmlns:wsa="http://www.w3.org/2005/08/addressing"
- xmlns:xs="http://www.w3.org/2001/XMLSchema"
- elementFormDefault="qualified"
- blockDefault="#all">
-
- <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>
-
- <xs:import namespace="http://www.w3.org/2005/08/addressing" schemaLocation="wsaddr.xsd"/>
-
- <!-- Types and global elements -->
- <xs:complexType name="DeliveryType" mixed="true">
- <xs:sequence>
- <xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
- </xs:sequence>
- <xs:attribute name="Mode" type="xs:anyURI" use="optional"/>
- <xs:anyAttribute namespace="##other" processContents="lax"/>
- </xs:complexType>
-
- <xs:element name="NotifyTo" type="wsa:EndpointReferenceType"/>
-
- <xs:simpleType name="NonNegativeDurationType">
- <xs:restriction base="xs:duration">
- <xs:minInclusive value="P0Y0M0DT0H0M0S"/>
- </xs:restriction>
- </xs:simpleType>
-
- <xs:simpleType name="ExpirationType">
- <xs:union memberTypes="xs:dateTime tns:NonNegativeDurationType"/>
- </xs:simpleType>
-
- <xs:complexType name="FilterType" mixed="true">
- <xs:sequence>
- <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
- </xs:sequence>
- <xs:attribute name="Dialect" type="xs:anyURI" use="optional"/>
- <xs:anyAttribute namespace="##other" processContents="lax"/>
- </xs:complexType>
-
- <xs:complexType name="LanguageSpecificStringType">
- <xs:simpleContent>
- <xs:extension base="xs:string">
- <xs:attribute ref="xml:lang"/>
- <xs:anyAttribute namespace="##other" processContents="lax"/>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <!-- Subscribe request -->
- <xs:element name="Subscribe">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="EndTo" type="wsa:EndpointReferenceType" minOccurs="0"/>
- <xs:element name="Delivery" type="tns:DeliveryType"/>
- <xs:element name="Expires" type="tns:ExpirationType" minOccurs="0"/>
- <xs:element name="Filter" type="tns:FilterType" minOccurs="0"/>
- <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
- </xs:sequence>
- <xs:anyAttribute namespace="##other" processContents="lax"/>
- </xs:complexType>
- </xs:element>
-
- <xs:element name="Identifier" type="xs:anyURI"/>
-
- <!-- Subscribe response -->
- <xs:element name="SubscribeResponse">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="SubscriptionManager" type="wsa:EndpointReferenceType"/>
- <xs:element name="Expires" type="tns:ExpirationType"/>
- <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
- </xs:sequence>
- <xs:anyAttribute namespace="##other" processContents="lax"/>
- </xs:complexType>
- </xs:element>
-
- <!-- Used in a fault if there's an unsupported dialect -->
- <xs:element name="SupportedDialect" type="xs:anyURI"/>
-
- <!-- Used in a fault if there's an unsupported delivery mode -->
- <xs:element name="SupportedDeliveryMode" type="xs:anyURI"/>
-
- <!-- Renew request -->
- <xs:element name="Renew">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="Expires" type="tns:ExpirationType" minOccurs="0"/>
- <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
- </xs:sequence>
- <xs:anyAttribute namespace="##other" processContents="lax"/>
- </xs:complexType>
- </xs:element>
-
- <!-- Renew response -->
- <xs:element name="RenewResponse">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="Expires" type="tns:ExpirationType" minOccurs="0"/>
- <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
- </xs:sequence>
- <xs:anyAttribute namespace="##other" processContents="lax"/>
- </xs:complexType>
- </xs:element>
-
- <!-- GetStatus request -->
- <xs:element name="GetStatus">
- <xs:complexType>
- <xs:sequence>
- <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
- </xs:sequence>
- <xs:anyAttribute namespace="##other" processContents="lax"/>
- </xs:complexType>
- </xs:element>
-
- <!-- GetStatus response -->
- <xs:element name="GetStatusResponse">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="Expires" type="tns:ExpirationType" minOccurs="0"/>
- <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
- </xs:sequence>
- <xs:anyAttribute namespace="##other" processContents="lax"/>
- </xs:complexType>
- </xs:element>
-
- <!-- Unsubscribe request -->
- <xs:element name="Unsubscribe">
- <xs:complexType>
- <xs:sequence>
- <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
- </xs:sequence>
- <xs:anyAttribute namespace="##other" processContents="lax"/>
- </xs:complexType>
- </xs:element>
-
- <!-- count(/s:Envelope/s:Body/*) = 0 for Unsubscribe response -->
-
- <!-- SubscriptionEnd message -->
- <xs:element name="SubscriptionEnd">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="SubscriptionManager" type="wsa:EndpointReferenceType"/>
- <xs:element name="Code" type="tns:OpenSubscriptionEndCodeType"/>
- <xs:element name="Reason" type="tns:LanguageSpecificStringType" minOccurs="0" maxOccurs="unbounded"/>
- <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
- </xs:sequence>
- <xs:anyAttribute namespace="##other" processContents="lax"/>
- </xs:complexType>
- </xs:element>
-
- <xs:simpleType name="SubscriptionEndCodeType">
- <xs:restriction base="xs:QName">
- <xs:enumeration value="tns:DeliveryFailure"/>
- <xs:enumeration value="tns:SourceShuttingDown"/>
- <xs:enumeration value="tns:SourceCancelling"/>
- </xs:restriction>
- </xs:simpleType>
-
- <xs:simpleType name="OpenSubscriptionEndCodeType">
- <xs:union memberTypes="tns:SubscriptionEndCodeType xs:QName"/>
- </xs:simpleType>
-
- <xs:attribute name="EventSource" type="xs:boolean"/>
-
-</xs:schema>
\ No newline at end of file
Deleted: trunk/jbossws-tests/src/main/resources/jaxws/wseventing/WEB-INF/wsdl/wind.wsdl
===================================================================
--- trunk/jbossws-tests/src/main/resources/jaxws/wseventing/WEB-INF/wsdl/wind.wsdl 2007-01-18 12:54:34 UTC (rev 1994)
+++ trunk/jbossws-tests/src/main/resources/jaxws/wseventing/WEB-INF/wsdl/wind.wsdl 2007-01-18 13:58:21 UTC (rev 1995)
@@ -1,174 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<wsdl:definitions
- targetNamespace="http://schemas.xmlsoap.org/ws/2004/08/eventing"
- xmlns:tns="http://schemas.xmlsoap.org/ws/2004/08/eventing"
- xmlns:wse='http://schemas.xmlsoap.org/ws/2004/08/eventing'
- xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/'
- xmlns:wsa10='http://www.w3.org/2005/08/addressing'
- xmlns:xs='http://www.w3.org/2001/XMLSchema'
- xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
-
- <wsdl:types>
-
- <xs:schema targetNamespace='http://schemas.xmlsoap.org/ws/2004/08/eventing'>
-
- <xs:include schemaLocation='eventing.xsd'/>
-
- <xs:element name="WindReport">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="Date" type="xs:string"/>
- <xs:element name="Time" type="xs:string"/>
- <xs:element name="Speed" type="xs:string"/>
- <xs:element name="Location" type="xs:string"/>
- <xs:element name="County" type="xs:string"/>
- <xs:element name="State" type="xs:string"/>
- <xs:element name="Lat" type="xs:string"/>
- <xs:element name="Long" type="xs:string"/>
- <xs:element name="Comments" type="xs:string"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
-
- </xs:schema>
-
- </wsdl:types>
-
- <wsdl:message name='SubscribeMsg'>
- <wsdl:part name='body' element='wse:Subscribe'/>
- </wsdl:message>
- <wsdl:message name='SubscribeResponseMsg'>
- <wsdl:part name='body' element='wse:SubscribeResponse'/>
- </wsdl:message>
-
- <wsdl:message name='RenewMsg'>
- <wsdl:part name='body' element='wse:Renew'/>
- </wsdl:message>
- <wsdl:message name='RenewResponseMsg'>
- <wsdl:part name='body' element='wse:RenewResponse'/>
- </wsdl:message>
-
- <wsdl:message name='GetStatusMsg'>
- <wsdl:part name='body' element='wse:GetStatus'/>
- </wsdl:message>
- <wsdl:message name='GetStatusResponseMsg'>
- <wsdl:part name='body' element='wse:GetStatusResponse'/>
- </wsdl:message>
-
- <wsdl:message name='UnsubscribeMsg'>
- <wsdl:part name='body' element='wse:Unsubscribe'/>
- </wsdl:message>
- <wsdl:message name='UnsubscribeResponseMsg'/>
-
- <wsdl:message name='SubscriptionEnd'>
- <wsdl:part name='body' element='wse:SubscriptionEnd'/>
- </wsdl:message>
-
- <wsdl:message name='WindMsg'>
- <wsdl:part name='body' element='tns:WindReport'/>
- </wsdl:message>
-
- <wsdl:portType name='EventSource'>
- <wsdl:operation name='SubscribeOp'>
- <wsdl:input message='wse:SubscribeMsg' wsa10:Action='http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe'/>
- <wsdl:output message='wse:SubscribeResponseMsg' wsa10:Action='http://schemas.xmlsoap.org/ws/2004/08/eventing/SubscribeResponse'/>
- </wsdl:operation>
- <!--wsdl:operation name='SubscriptionEnd'>
- <wsdl:output message='wse:SubscriptionEnd'/>
- </wsdl:operation-->
- </wsdl:portType>
-
- <wsdl:portType name='SubscriptionManager'>
- <wsdl:operation name='RenewOp'>
- <wsdl:input message='wse:RenewMsg' wsa10:Action='http://schemas.xmlsoap.org/ws/2004/08/eventing/Renew'/>
- <wsdl:output message='wse:RenewResponseMsg' wsa10:Action='http://schemas.xmlsoap.org/ws/2004/08/eventing/RenewResponse'/>
- </wsdl:operation>
- <wsdl:operation name='GetStatusOp'>
- <wsdl:input message='wse:GetStatusMsg' wsa10:Action='http://schemas.xmlsoap.org/ws/2004/08/eventing/GetStatus'/>
- <wsdl:output message='wse:GetStatusResponseMsg' wsa10:Action='http://schemas.xmlsoap.org/ws/2004/08/eventing/GetStatusResponse'/>
- </wsdl:operation>
- <wsdl:operation name='UnsubscribeOp'>
- <wsdl:input message='wse:UnsubscribeMsg' wsa10:Action='http://schemas.xmlsoap.org/ws/2004/08/eventing/Unsubscribe'/>
- <wsdl:output message='wse:UnsubscribeResponseMsg' wsa10:Action='http://schemas.xmlsoap.org/ws/2004/08/eventing/UnsubscribeResponse'/>
- </wsdl:operation>
- </wsdl:portType>
-
- <wsdl:portType name='Warnings' wse:EventSource='true'>
- <wsdl:operation name='WindOp'>
- <wsdl:output message='tns:WindMsg'/>
- </wsdl:operation>
- </wsdl:portType>
-
- <wsdl:binding name="WarningsBinding" type="tns:Warnings">
- <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
- <wsdl:operation name="WindOp">
- <soap:operation soapAction=""/>
- <wsdl:output>
- <soap:body use="literal"/>
- </wsdl:output>
- </wsdl:operation>
- </wsdl:binding>
-
- <wsdl:binding name="EventSourceBinding" type="wse:EventSource">
- <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
- <wsdl:operation name="SubscribeOp">
- <soap:operation soapAction=""/>
- <wsdl:input>
- <soap:body use="literal"/>
- </wsdl:input>
- <wsdl:output>
- <soap:body use="literal"/>
- </wsdl:output>
- </wsdl:operation>
- <!--wsdl:operation name="SubscriptionEnd">
- <soap:operation soapAction=""/>
- <wsdl:output>
- <soap:body use="literal"/>
- </wsdl:output>
- </wsdl:operation-->
- </wsdl:binding>
-
- <wsdl:binding name="SubscriptionManagerBinding" type="wse:SubscriptionManager">
- <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
- <wsdl:operation name="GetStatusOp">
- <soap:operation soapAction=""/>
- <wsdl:input>
- <soap:body use="literal"/>
- </wsdl:input>
- <wsdl:output>
- <soap:body use="literal"/>
- </wsdl:output>
- </wsdl:operation>
-
- <wsdl:operation name="RenewOp">
- <soap:operation soapAction=""/>
- <wsdl:input>
- <soap:body use="literal"/>
- </wsdl:input>
- <wsdl:output>
- <soap:body use="literal"/>
- </wsdl:output>
- </wsdl:operation>
-
- <wsdl:operation name="UnsubscribeOp">
- <soap:operation soapAction=""/>
- <wsdl:input>
- <soap:body use="literal"/>
- </wsdl:input>
- <wsdl:output>
- <soap:body use="literal"/>
- </wsdl:output>
- </wsdl:operation>
- </wsdl:binding>
-
- <wsdl:service name="EventingService">
- <wsdl:port name="EventSourcePort" binding="wse:EventSourceBinding">
- <soap:address location="http://@jbosstest.host.name@:8080/jaxrpc-wseventing/ws4ee/EventSourcePortType"/>
- </wsdl:port>
- <wsdl:port name="SubscriptionManagerPort" binding="wse:SubscriptionManagerBinding">
- <soap:address location="http://@jbosstest.host.name@:8080/jaxrpc-wseventing/ws4ee/SubscriptionManagerPortType"/>
- </wsdl:port>
- </wsdl:service>
-
-</wsdl:definitions>
Added: trunk/jbossws-tests/src/main/resources/jaxws/wseventing/WEB-INF/wsdl/windreport.wsdl
===================================================================
--- trunk/jbossws-tests/src/main/resources/jaxws/wseventing/WEB-INF/wsdl/windreport.wsdl (rev 0)
+++ trunk/jbossws-tests/src/main/resources/jaxws/wseventing/WEB-INF/wsdl/windreport.wsdl 2007-01-18 13:58:21 UTC (rev 1995)
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<wsdl:definitions
+ targetNamespace="http://www.jboss.org/wind"
+ xmlns:tns="http://www.jboss.org/wind"
+ xmlns:wse='http://schemas.xmlsoap.org/ws/2004/08/eventing'
+ xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/'
+ xmlns:wsa10='http://www.w3.org/2005/08/addressing'
+ xmlns:xs='http://www.w3.org/2001/XMLSchema'
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
+
+ <wsdl:import
+ namespace='http://schemas.xmlsoap.org/ws/2004/08/eventing'
+ location='ws-eventing.wsdl' />
+ <wsdl:types>
+
+ <xs:schema targetNamespace='http://schemas.xmlsoap.org/ws/2004/08/eventing'>
+ <xs:include schemaLocation='ws-eventing.xsd'/>
+ </xs:schema>
+
+ <xs:schema
+ targetNamespace="http://www.jboss.org/wind"
+ elementFormDefault="qualified"
+ blockDefault="#all">
+
+ <xs:element name="WindReport">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Date" type="xs:string"/>
+ <xs:element name="Time" type="xs:string"/>
+ <xs:element name="Speed" type="xs:string"/>
+ <xs:element name="Location" type="xs:string"/>
+ <xs:element name="County" type="xs:string"/>
+ <xs:element name="State" type="xs:string"/>
+ <xs:element name="Lat" type="xs:string"/>
+ <xs:element name="Long" type="xs:string"/>
+ <xs:element name="Comments" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+
+ </xs:schema>
+
+ </wsdl:types>
+
+ <wsdl:message name='WindMsg'>
+ <wsdl:part name='body' element='tns:WindReport'/>
+ </wsdl:message>
+
+ <wsdl:portType name='Warnings' wse:EventSource='true'>
+ <wsdl:operation name='WindOp'>
+ <wsdl:output message='tns:WindMsg'/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="WarningsBinding" type="tns:Warnings">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="WindOp">
+ <soap:operation soapAction=""/>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+
+</wsdl:definitions>
\ No newline at end of file
Copied: trunk/jbossws-tests/src/main/resources/jaxws/wseventing/WEB-INF/wsdl/ws-addr.xsd (from rev 1994, trunk/jbossws-tests/src/main/resources/jaxws/wseventing/WEB-INF/wsdl/wsaddr.xsd)
===================================================================
--- trunk/jbossws-tests/src/main/resources/jaxws/wseventing/WEB-INF/wsdl/ws-addr.xsd (rev 0)
+++ trunk/jbossws-tests/src/main/resources/jaxws/wseventing/WEB-INF/wsdl/ws-addr.xsd 2007-01-18 13:58:21 UTC (rev 1995)
@@ -0,0 +1,151 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE xs:schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "http://www.w3.org/2001/XMLSchema.dtd">
+<!--
+ W3C XML Schema defined in the Web Services Addressing 1.0 specification
+ http://www.w3.org/TR/ws-addr-core
+
+ Copyright © 2005 World Wide Web Consortium,
+
+ (Massachusetts Institute of Technology, European Research Consortium for
+ Informatics and Mathematics, Keio University). All Rights Reserved. This
+ work is distributed under the W3C® Software License [1] 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.
+
+ [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+
+ $Id: ws-addr.xsd,v 1.3 2005/08/09 13:17:35 hugo Exp $
+-->
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:tns="http://www.w3.org/2005/08/addressing"
+ targetNamespace="http://www.w3.org/2005/08/addressing"
+ blockDefault="#all"
+ elementFormDefault="qualified"
+ finalDefault=""
+ attributeFormDefault="unqualified">
+
+ <!-- Constructs from the WS-Addressing Core -->
+
+ <xs:element name="EndpointReference" type="tns:EndpointReferenceType"/>
+ <xs:complexType name="EndpointReferenceType" mixed="false">
+ <xs:sequence>
+ <xs:element name="Address" type="tns:AttributedURIType"/>
+ <xs:element name="ReferenceParameters" type="tns:ReferenceParametersType" minOccurs="0"/>
+ <xs:element ref="tns:Metadata" minOccurs="0"/>
+ <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
+
+ <xs:complexType name="ReferenceParametersType" mixed="false">
+ <xs:sequence>
+ <xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
+
+ <xs:element name="Metadata" type="tns:MetadataType"/>
+ <xs:complexType name="MetadataType" mixed="false">
+ <xs:sequence>
+ <xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
+
+ <xs:element name="MessageID" type="tns:AttributedURIType"/>
+ <xs:element name="RelatesTo" type="tns:RelatesToType"/>
+ <xs:complexType name="RelatesToType" mixed="false">
+ <xs:simpleContent>
+ <xs:extension base="xs:anyURI">
+ <xs:attribute name="RelationshipType" type="tns:RelationshipTypeOpenEnum" use="optional" default="http://www.w3.org/2005/08/addressing/reply"/>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:simpleType name="RelationshipTypeOpenEnum">
+ <xs:union memberTypes="tns:RelationshipType xs:anyURI"/>
+ </xs:simpleType>
+
+ <xs:simpleType name="RelationshipType">
+ <xs:restriction base="xs:anyURI">
+ <xs:enumeration value="http://www.w3.org/2005/08/addressing/reply"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:element name="ReplyTo" type="tns:EndpointReferenceType"/>
+ <xs:element name="From" type="tns:EndpointReferenceType"/>
+ <xs:element name="FaultTo" type="tns:EndpointReferenceType"/>
+ <xs:element name="To" type="tns:AttributedURIType"/>
+ <xs:element name="Action" type="tns:AttributedURIType"/>
+
+ <xs:complexType name="AttributedURIType" mixed="false">
+ <xs:simpleContent>
+ <xs:extension base="xs:anyURI">
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <!-- Constructs from the WS-Addressing SOAP binding -->
+
+ <xs:attribute name="IsReferenceParameter" type="xs:boolean"/>
+
+ <xs:simpleType name="FaultCodesOpenEnumType">
+ <xs:union memberTypes="tns:FaultCodesType xs:QName"/>
+ </xs:simpleType>
+
+ <xs:simpleType name="FaultCodesType">
+ <xs:restriction base="xs:QName">
+ <xs:enumeration value="tns:InvalidAddressingHeader"/>
+ <xs:enumeration value="tns:InvalidAddress"/>
+ <xs:enumeration value="tns:InvalidEPR"/>
+ <xs:enumeration value="tns:InvalidCardinality"/>
+ <xs:enumeration value="tns:MissingAddressInEPR"/>
+ <xs:enumeration value="tns:DuplicateMessageID"/>
+ <xs:enumeration value="tns:ActionMismatch"/>
+ <xs:enumeration value="tns:MessageAddressingHeaderRequired"/>
+ <xs:enumeration value="tns:DestinationUnreachable"/>
+ <xs:enumeration value="tns:ActionNotSupported"/>
+ <xs:enumeration value="tns:EndpointUnavailable"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:element name="RetryAfter" type="tns:AttributedUnsignedLongType"/>
+ <xs:complexType name="AttributedUnsignedLongType" mixed="false">
+ <xs:simpleContent>
+ <xs:extension base="xs:unsignedLong">
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="ProblemHeaderQName" type="tns:AttributedQNameType"/>
+ <xs:complexType name="AttributedQNameType" mixed="false">
+ <xs:simpleContent>
+ <xs:extension base="xs:QName">
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="ProblemHeader" type="tns:AttributedAnyType"/>
+ <xs:complexType name="AttributedAnyType" mixed="false">
+ <xs:sequence>
+ <xs:any namespace="##any" processContents="lax" minOccurs="1" maxOccurs="1"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
+
+ <xs:element name="ProblemIRI" type="tns:AttributedURIType"/>
+
+ <xs:element name="ProblemAction" type="tns:ProblemActionType"/>
+ <xs:complexType name="ProblemActionType" mixed="false">
+ <xs:sequence>
+ <xs:element ref="tns:Action" minOccurs="0"/>
+ <xs:element name="SoapAction" minOccurs="0" type="xs:anyURI"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
Added: trunk/jbossws-tests/src/main/resources/jaxws/wseventing/WEB-INF/wsdl/ws-eventing.wsdl
===================================================================
--- trunk/jbossws-tests/src/main/resources/jaxws/wseventing/WEB-INF/wsdl/ws-eventing.wsdl (rev 0)
+++ trunk/jbossws-tests/src/main/resources/jaxws/wseventing/WEB-INF/wsdl/ws-eventing.wsdl 2007-01-18 13:58:21 UTC (rev 1995)
@@ -0,0 +1,132 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<wsdl:definitions
+ targetNamespace='http://schemas.xmlsoap.org/ws/2004/08/eventing'
+ xmlns:wse='http://schemas.xmlsoap.org/ws/2004/08/eventing'
+ xmlns:wsa10='http://www.w3.org/2005/08/addressing'
+ xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/'
+ xmlns:xs='http://www.w3.org/2001/XMLSchema'
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
+
+ <wsdl:types>
+ <xs:import namespace="http://schemas.xmlsoap.org/ws/2004/08/eventing" schemaLocation="http://schemas.xmlsoap.org/ws/2004/08/eventing/eventing.xsd"/>
+ </wsdl:types>
+
+ <wsdl:message name='SubscribeMsg'>
+ <wsdl:part name='body' element='wse:Subscribe'/>
+ </wsdl:message>
+ <wsdl:message name='SubscribeResponseMsg'>
+ <wsdl:part name='body' element='wse:SubscribeResponse'/>
+ </wsdl:message>
+
+ <wsdl:message name='RenewMsg'>
+ <wsdl:part name='body' element='wse:Renew'/>
+ </wsdl:message>
+ <wsdl:message name='RenewResponseMsg'>
+ <wsdl:part name='body' element='wse:RenewResponse'/>
+ </wsdl:message>
+
+ <wsdl:message name='GetStatusMsg'>
+ <wsdl:part name='body' element='wse:GetStatus'/>
+ </wsdl:message>
+ <wsdl:message name='GetStatusResponseMsg'>
+ <wsdl:part name='body' element='wse:GetStatusResponse'/>
+ </wsdl:message>
+
+ <wsdl:message name='UnsubscribeMsg'>
+ <wsdl:part name='body' element='wse:Unsubscribe'/>
+ </wsdl:message>
+ <wsdl:message name='UnsubscribeResponseMsg'/>
+
+ <wsdl:message name='SubscriptionEnd'>
+ <wsdl:part name='body' element='wse:SubscriptionEnd'/>
+ </wsdl:message>
+
+ <wsdl:portType name='EventSource'>
+ <wsdl:operation name='SubscribeOp'>
+ <wsdl:input message='wse:SubscribeMsg' wsa10:Action='http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe'/>
+ <wsdl:output message='wse:SubscribeResponseMsg' wsa10:Action='http://schemas.xmlsoap.org/ws/2004/08/eventing/SubscribeResponse'/>
+ </wsdl:operation>
+ <wsdl:operation name='SubscriptionEnd'>
+ <wsdl:output message='wse:SubscriptionEnd'/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:portType name='SubscriptionManager'>
+ <wsdl:operation name='RenewOp'>
+ <wsdl:input message='wse:RenewMsg' wsa10:Action='http://schemas.xmlsoap.org/ws/2004/08/eventing/Renew'/>
+ <wsdl:output message='wse:RenewResponseMsg' wsa10:Action='http://schemas.xmlsoap.org/ws/2004/08/eventing/RenewResponse'/>
+ </wsdl:operation>
+ <wsdl:operation name='GetStatusOp'>
+ <wsdl:input message='wse:GetStatusMsg' wsa10:Action='http://schemas.xmlsoap.org/ws/2004/08/eventing/GetStatus'/>
+ <wsdl:output message='wse:GetStatusResponseMsg' wsa10:Action='http://schemas.xmlsoap.org/ws/2004/08/eventing/GetStatusResponse'/>
+ </wsdl:operation>
+ <wsdl:operation name='UnsubscribeOp'>
+ <wsdl:input message='wse:UnsubscribeMsg' wsa10:Action='http://schemas.xmlsoap.org/ws/2004/08/eventing/Unsubscribe'/>
+ <wsdl:output message='wse:UnsubscribeResponseMsg' wsa10:Action='http://schemas.xmlsoap.org/ws/2004/08/eventing/UnsubscribeResponse'/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="EventSourceBinding" type="wse:EventSource">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="SubscribeOp">
+ <soap:operation soapAction=""/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="SubscriptionEnd">
+ <soap:operation soapAction=""/>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <wsdl:binding name="SubscriptionManagerBinding" type="wse:SubscriptionManager">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="GetStatusOp">
+ <soap:operation soapAction=""/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+
+ <wsdl:operation name="RenewOp">
+ <soap:operation soapAction=""/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+
+ <wsdl:operation name="UnsubscribeOp">
+ <soap:operation soapAction=""/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <wsdl:service name="EventingService">
+ <wsdl:port name="EventSourcePort" binding="wse:EventSourceBinding">
+ <soap:address location="http://@jbosstest.host.name@:8080/jaxrpc-samples-wseventing/subscribe"/>
+ </wsdl:port>
+ <wsdl:port name="SubscriptionManagerPort" binding="wse:SubscriptionManagerBinding">
+ <soap:address location="http://@jbosstest.host.name@:8080/jaxrpc-samples-wseventing/manage"/>
+ </wsdl:port>
+ </wsdl:service>
+
+
+</wsdl:definitions>
\ No newline at end of file
Copied: trunk/jbossws-tests/src/main/resources/jaxws/wseventing/WEB-INF/wsdl/ws-eventing.xsd (from rev 1994, trunk/jbossws-tests/src/main/resources/jaxws/wseventing/WEB-INF/wsdl/eventing.xsd)
===================================================================
--- trunk/jbossws-tests/src/main/resources/jaxws/wseventing/WEB-INF/wsdl/ws-eventing.xsd (rev 0)
+++ trunk/jbossws-tests/src/main/resources/jaxws/wseventing/WEB-INF/wsdl/ws-eventing.xsd 2007-01-18 13:58:21 UTC (rev 1995)
@@ -0,0 +1,185 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+(c) 2004 BEA Systems Inc., Computer Associates International, Inc., International Business Machines Corporation, Microsoft Corporation, Inc, Sun Microsystems, Inc., and TIBCO Software Inc. All rights reserved.
+
+BEA Systems Inc., Computer Associates International, Inc., International Business Machines Corporation, Microsoft Corporation, Inc, Sun Microsystems, Inc, and TIBCO Software Inc (collectively, the "Authors") hereby grant you permission to copy and display the WS-Eventing Specification (the "Specification", which includes WSDL and schema documents), in any medium without fee or royalty, provided that you include the following on ALL copies of the Specification, that you make:
+
+1. A link or URL to the WS-Eventing Specification at one of the Authors' websites
+2. The copyright notice as shown in the WS-Eventing Specification.
+
+BEA, CA, IBM, Microsoft, Sun and TIBCO (collectively, the "Authors") each agree to grant you a license, under royalty-free and otherwise reasonable, non-discriminatory terms and conditions, to their respective essential patent claims that they deem necessary to implement the Specification.
+
+THE SPECIFICATION IS PROVIDED "AS IS," AND THE AUTHORS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF THE SPECIFICATION ARE SUITABLE FOR ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF SUCH CONTENTS WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
+
+THE AUTHORS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATING TO ANY USE OR DISTRIBUTION OF THE SPECIFICATION.
+
+The name and trademarks of the Authors may NOT be used in any manner, including advertising or publicity pertaining to the Specification or its contents without specific, written prior permission. Title to copyright in the Specification will at all times remain with the Authors.
+
+No other rights are granted by implication, estoppel or otherwise.
+-->
+<xs:schema targetNamespace="http://schemas.xmlsoap.org/ws/2004/08/eventing"
+ xmlns:tns="http://schemas.xmlsoap.org/ws/2004/08/eventing"
+ xmlns:wsa="http://www.w3.org/2005/08/addressing"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ elementFormDefault="qualified"
+ blockDefault="#all">
+
+ <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>
+
+ <xs:import namespace="http://www.w3.org/2005/08/addressing" schemaLocation="ws-addr.xsd"/>
+
+ <!-- Types and global elements -->
+ <xs:complexType name="DeliveryType" mixed="true">
+ <xs:sequence>
+ <xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:attribute name="Mode" type="xs:anyURI" use="optional"/>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
+
+ <xs:element name="NotifyTo" type="wsa:EndpointReferenceType"/>
+
+ <xs:simpleType name="NonNegativeDurationType">
+ <xs:restriction base="xs:duration">
+ <xs:minInclusive value="P0Y0M0DT0H0M0S"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="ExpirationType">
+ <xs:union memberTypes="xs:dateTime tns:NonNegativeDurationType"/>
+ </xs:simpleType>
+
+ <xs:complexType name="FilterType" mixed="true">
+ <xs:sequence>
+ <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:attribute name="Dialect" type="xs:anyURI" use="optional"/>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
+
+ <xs:complexType name="LanguageSpecificStringType">
+ <xs:simpleContent>
+ <xs:extension base="xs:string">
+ <xs:attribute ref="xml:lang"/>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <!-- Subscribe request -->
+ <xs:element name="Subscribe">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="EndTo" type="wsa:EndpointReferenceType" minOccurs="0"/>
+ <xs:element name="Delivery" type="tns:DeliveryType"/>
+ <xs:element name="Expires" type="tns:ExpirationType" minOccurs="0"/>
+ <xs:element name="Filter" type="tns:FilterType" minOccurs="0"/>
+ <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="Identifier" type="xs:anyURI"/>
+
+ <!-- Subscribe response -->
+ <xs:element name="SubscribeResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="SubscriptionManager" type="wsa:EndpointReferenceType"/>
+ <xs:element name="Expires" type="tns:ExpirationType"/>
+ <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
+ </xs:element>
+
+ <!-- Used in a fault if there's an unsupported dialect -->
+ <xs:element name="SupportedDialect" type="xs:anyURI"/>
+
+ <!-- Used in a fault if there's an unsupported delivery mode -->
+ <xs:element name="SupportedDeliveryMode" type="xs:anyURI"/>
+
+ <!-- Renew request -->
+ <xs:element name="Renew">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Expires" type="tns:ExpirationType" minOccurs="0"/>
+ <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
+ </xs:element>
+
+ <!-- Renew response -->
+ <xs:element name="RenewResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Expires" type="tns:ExpirationType" minOccurs="0"/>
+ <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
+ </xs:element>
+
+ <!-- GetStatus request -->
+ <xs:element name="GetStatus">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
+ </xs:element>
+
+ <!-- GetStatus response -->
+ <xs:element name="GetStatusResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Expires" type="tns:ExpirationType" minOccurs="0"/>
+ <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
+ </xs:element>
+
+ <!-- Unsubscribe request -->
+ <xs:element name="Unsubscribe">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
+ </xs:element>
+
+ <!-- count(/s:Envelope/s:Body/*) = 0 for Unsubscribe response -->
+
+ <!-- SubscriptionEnd message -->
+ <xs:element name="SubscriptionEnd">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="SubscriptionManager" type="wsa:EndpointReferenceType"/>
+ <xs:element name="Code" type="tns:OpenSubscriptionEndCodeType"/>
+ <xs:element name="Reason" type="tns:LanguageSpecificStringType" minOccurs="0" maxOccurs="unbounded"/>
+ <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:simpleType name="SubscriptionEndCodeType">
+ <xs:restriction base="xs:QName">
+ <xs:enumeration value="tns:DeliveryFailure"/>
+ <xs:enumeration value="tns:SourceShuttingDown"/>
+ <xs:enumeration value="tns:SourceCancelling"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="OpenSubscriptionEndCodeType">
+ <xs:union memberTypes="tns:SubscriptionEndCodeType xs:QName"/>
+ </xs:simpleType>
+
+ <xs:attribute name="EventSource" type="xs:boolean"/>
+
+</xs:schema>
\ No newline at end of file
Deleted: trunk/jbossws-tests/src/main/resources/jaxws/wseventing/WEB-INF/wsdl/wsaddr.xsd
===================================================================
--- trunk/jbossws-tests/src/main/resources/jaxws/wseventing/WEB-INF/wsdl/wsaddr.xsd 2007-01-18 12:54:34 UTC (rev 1994)
+++ trunk/jbossws-tests/src/main/resources/jaxws/wseventing/WEB-INF/wsdl/wsaddr.xsd 2007-01-18 13:58:21 UTC (rev 1995)
@@ -1,151 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE xs:schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "http://www.w3.org/2001/XMLSchema.dtd">
-<!--
- W3C XML Schema defined in the Web Services Addressing 1.0 specification
- http://www.w3.org/TR/ws-addr-core
-
- Copyright © 2005 World Wide Web Consortium,
-
- (Massachusetts Institute of Technology, European Research Consortium for
- Informatics and Mathematics, Keio University). All Rights Reserved. This
- work is distributed under the W3C® Software License [1] 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.
-
- [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
-
- $Id: ws-addr.xsd,v 1.3 2005/08/09 13:17:35 hugo Exp $
--->
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
- xmlns:tns="http://www.w3.org/2005/08/addressing"
- targetNamespace="http://www.w3.org/2005/08/addressing"
- blockDefault="#all"
- elementFormDefault="qualified"
- finalDefault=""
- attributeFormDefault="unqualified">
-
- <!-- Constructs from the WS-Addressing Core -->
-
- <xs:element name="EndpointReference" type="tns:EndpointReferenceType"/>
- <xs:complexType name="EndpointReferenceType" mixed="false">
- <xs:sequence>
- <xs:element name="Address" type="tns:AttributedURIType"/>
- <xs:element name="ReferenceParameters" type="tns:ReferenceParametersType" minOccurs="0"/>
- <xs:element ref="tns:Metadata" minOccurs="0"/>
- <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
- </xs:sequence>
- <xs:anyAttribute namespace="##other" processContents="lax"/>
- </xs:complexType>
-
- <xs:complexType name="ReferenceParametersType" mixed="false">
- <xs:sequence>
- <xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
- </xs:sequence>
- <xs:anyAttribute namespace="##other" processContents="lax"/>
- </xs:complexType>
-
- <xs:element name="Metadata" type="tns:MetadataType"/>
- <xs:complexType name="MetadataType" mixed="false">
- <xs:sequence>
- <xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
- </xs:sequence>
- <xs:anyAttribute namespace="##other" processContents="lax"/>
- </xs:complexType>
-
- <xs:element name="MessageID" type="tns:AttributedURIType"/>
- <xs:element name="RelatesTo" type="tns:RelatesToType"/>
- <xs:complexType name="RelatesToType" mixed="false">
- <xs:simpleContent>
- <xs:extension base="xs:anyURI">
- <xs:attribute name="RelationshipType" type="tns:RelationshipTypeOpenEnum" use="optional" default="http://www.w3.org/2005/08/addressing/reply"/>
- <xs:anyAttribute namespace="##other" processContents="lax"/>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:simpleType name="RelationshipTypeOpenEnum">
- <xs:union memberTypes="tns:RelationshipType xs:anyURI"/>
- </xs:simpleType>
-
- <xs:simpleType name="RelationshipType">
- <xs:restriction base="xs:anyURI">
- <xs:enumeration value="http://www.w3.org/2005/08/addressing/reply"/>
- </xs:restriction>
- </xs:simpleType>
-
- <xs:element name="ReplyTo" type="tns:EndpointReferenceType"/>
- <xs:element name="From" type="tns:EndpointReferenceType"/>
- <xs:element name="FaultTo" type="tns:EndpointReferenceType"/>
- <xs:element name="To" type="tns:AttributedURIType"/>
- <xs:element name="Action" type="tns:AttributedURIType"/>
-
- <xs:complexType name="AttributedURIType" mixed="false">
- <xs:simpleContent>
- <xs:extension base="xs:anyURI">
- <xs:anyAttribute namespace="##other" processContents="lax"/>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <!-- Constructs from the WS-Addressing SOAP binding -->
-
- <xs:attribute name="IsReferenceParameter" type="xs:boolean"/>
-
- <xs:simpleType name="FaultCodesOpenEnumType">
- <xs:union memberTypes="tns:FaultCodesType xs:QName"/>
- </xs:simpleType>
-
- <xs:simpleType name="FaultCodesType">
- <xs:restriction base="xs:QName">
- <xs:enumeration value="tns:InvalidAddressingHeader"/>
- <xs:enumeration value="tns:InvalidAddress"/>
- <xs:enumeration value="tns:InvalidEPR"/>
- <xs:enumeration value="tns:InvalidCardinality"/>
- <xs:enumeration value="tns:MissingAddressInEPR"/>
- <xs:enumeration value="tns:DuplicateMessageID"/>
- <xs:enumeration value="tns:ActionMismatch"/>
- <xs:enumeration value="tns:MessageAddressingHeaderRequired"/>
- <xs:enumeration value="tns:DestinationUnreachable"/>
- <xs:enumeration value="tns:ActionNotSupported"/>
- <xs:enumeration value="tns:EndpointUnavailable"/>
- </xs:restriction>
- </xs:simpleType>
-
- <xs:element name="RetryAfter" type="tns:AttributedUnsignedLongType"/>
- <xs:complexType name="AttributedUnsignedLongType" mixed="false">
- <xs:simpleContent>
- <xs:extension base="xs:unsignedLong">
- <xs:anyAttribute namespace="##other" processContents="lax"/>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="ProblemHeaderQName" type="tns:AttributedQNameType"/>
- <xs:complexType name="AttributedQNameType" mixed="false">
- <xs:simpleContent>
- <xs:extension base="xs:QName">
- <xs:anyAttribute namespace="##other" processContents="lax"/>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="ProblemHeader" type="tns:AttributedAnyType"/>
- <xs:complexType name="AttributedAnyType" mixed="false">
- <xs:sequence>
- <xs:any namespace="##any" processContents="lax" minOccurs="1" maxOccurs="1"/>
- </xs:sequence>
- <xs:anyAttribute namespace="##other" processContents="lax"/>
- </xs:complexType>
-
- <xs:element name="ProblemIRI" type="tns:AttributedURIType"/>
-
- <xs:element name="ProblemAction" type="tns:ProblemActionType"/>
- <xs:complexType name="ProblemActionType" mixed="false">
- <xs:sequence>
- <xs:element ref="tns:Action" minOccurs="0"/>
- <xs:element name="SoapAction" minOccurs="0" type="xs:anyURI"/>
- </xs:sequence>
- <xs:anyAttribute namespace="##other" processContents="lax"/>
- </xs:complexType>
-
-</xs:schema>
\ No newline at end of file
[View Less]
18 years
JBossWS SVN: r1994 - in trunk: jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc and 35 other directories.
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2007-01-18 07:54:34 -0500 (Thu, 18 Jan 2007)
New Revision: 1994
Added:
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/ServiceDecorator.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/common/
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/common/EventingEndpointBase.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/
trunk/jbossws-core/src/main/java/org/jboss/ws/…
[View More]extensions/eventing/jaxrpc/EventSourceEndpoint.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/EventSourceEndpointImpl.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/EventingService.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/SubscriptionManagerEndpoint.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/SubscriptionManagerEndpointImpl.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/DeliveryType.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/EndpointReference.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/FilterType.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/MetaData.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/ReferenceParameters.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/RenewRequest.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/RenewResponse.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/StatusRequest.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/StatusResponse.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/SubscribeRequest.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/SubscribeResponse.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/SubscriptionEndRequest.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/UnsubscribeRequest.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/AttributedAnyType.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/AttributedQNameType.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/AttributedURIType.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/AttributedUnsignedLongType.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/DeliveryType.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/EndpointReferenceType.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/EventSourceEndpoint.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/EventSourceEndpointImpl.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/EventingService.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/FilterType.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/GetStatus.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/GetStatusResponse.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/LanguageSpecificStringType.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/MetadataType.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/ObjectFactory.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/ProblemActionType.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/ReferenceParametersType.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/RelatesToType.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/Renew.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/RenewResponse.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/Subscribe.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/SubscribeResponse.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/SubscriptionEnd.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/SubscriptionManagerEndpoint.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/SubscriptionManagerEndpointImpl.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/Unsubscribe.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/package-info.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/mgmt/DispatchException.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/mgmt/NotificationFailure.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/wseventing/
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/wseventing/CustomEventSource.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/wseventing/EventSinkServlet.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/wseventing/EventingSupport.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/wseventing/EventingTestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/wseventing/NotificationTestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/wseventing/SubscriptionManagerTestCase.java
trunk/jbossws-tests/src/main/resources/jaxws/wseventing/
trunk/jbossws-tests/src/main/resources/jaxws/wseventing/META-INF/
trunk/jbossws-tests/src/main/resources/jaxws/wseventing/META-INF/application-client.xml
trunk/jbossws-tests/src/main/resources/jaxws/wseventing/META-INF/jboss-client.xml
trunk/jbossws-tests/src/main/resources/jaxws/wseventing/WEB-INF/
trunk/jbossws-tests/src/main/resources/jaxws/wseventing/WEB-INF/jboss-web.xml
trunk/jbossws-tests/src/main/resources/jaxws/wseventing/WEB-INF/web.xml
trunk/jbossws-tests/src/main/resources/jaxws/wseventing/WEB-INF/wsdl/
trunk/jbossws-tests/src/main/resources/jaxws/wseventing/WEB-INF/wsdl/eventing.wsdl
trunk/jbossws-tests/src/main/resources/jaxws/wseventing/WEB-INF/wsdl/eventing.xsd
trunk/jbossws-tests/src/main/resources/jaxws/wseventing/WEB-INF/wsdl/wind.wsdl
trunk/jbossws-tests/src/main/resources/jaxws/wseventing/WEB-INF/wsdl/wsaddr.xsd
Removed:
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/DispatchException.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/EventSourceEndpoint.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/EventSourceEndpointImpl.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/EventingEndpointBase.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/EventingService.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/SubscriptionManagerEndpoint.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/SubscriptionManagerEndpointImpl.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/element/
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/DeliveryType.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/EndpointReference.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/FilterType.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/MetaData.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/NotificationFailure.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/ReferenceParameters.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/RenewRequest.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/RenewResponse.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/StatusRequest.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/StatusResponse.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/SubscribeRequest.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/SubscribeResponse.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/SubscriptionEndRequest.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/UnsubscribeRequest.java
Modified:
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceObjectFactory.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/CallImpl.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerResolverImpl.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/WSDLRequestHandler.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/addressing/jaxws/WSAddressingServerHandler.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/deployment/EventingEndpoint.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/deployment/EventingEndpointDI.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/mgmt/DispatcherFactory.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/mgmt/Filter.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/mgmt/Subscription.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/mgmt/SubscriptionManager.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/mgmt/SubscriptionManagerMBean.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/mgmt/SubscriptionTicket.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCMetaDataBuilder.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/config/Configurable.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/config/ConfigurationProvider.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java
trunk/jbossws-tests/ant-import/build-jars-jaxrpc.xml
trunk/jbossws-tests/ant-import/build-jars-jaxws.xml
trunk/jbossws-tests/build.xml
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/wseventing/SysmonTestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/wseventing/SysmonUtil.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/wseventing/DIIClientTestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/wseventing/EventingSupport.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/wseventing/EventingTestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/wseventing/NotificationTestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/wseventing/SubscriptionManagerTestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/client/ServiceDelegateTestCase.java
trunk/jbossws-tests/src/main/resources/jaxrpc/samples/wseventing/META-INF/application-client.xml
trunk/jbossws-tests/src/main/resources/jaxrpc/samples/wseventing/WEB-INF/jaxrpc-mapping.xml
trunk/jbossws-tests/src/main/resources/jaxrpc/samples/wseventing/WEB-INF/web.xml
trunk/jbossws-tests/src/main/resources/jaxrpc/samples/wseventing/WEB-INF/webservices.xml
trunk/jbossws-tests/src/main/resources/jaxrpc/wseventing/META-INF/application-client.xml
trunk/jbossws-tests/src/main/resources/jaxrpc/wseventing/WEB-INF/jaxrpc-mapping.xml
trunk/jbossws-tests/src/main/resources/jaxrpc/wseventing/WEB-INF/web.xml
trunk/jbossws-tests/src/main/resources/jaxrpc/wseventing/WEB-INF/webservices.xml
trunk/jbossws-tests/src/main/resources/jaxws/jsr181/handlerchain/jaxws-handlers.xml
Log:
Eventing JAXWS, first cut. Added Support for client side reconfiguration
Modified: trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceObjectFactory.java
===================================================================
--- trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceObjectFactory.java 2007-01-18 12:00:15 UTC (rev 1993)
+++ trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceObjectFactory.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -137,7 +137,7 @@
cp.setConfigFile(usRef.getConfigFile());
if (usRef.getConfigName() != null)
cp.setConfigName(usRef.getConfigName());
-
+
}
if (targetClassName != null && targetClassName.equals(serviceClassName) == false)
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/CallImpl.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/CallImpl.java 2007-01-18 12:00:15 UTC (rev 1993)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/CallImpl.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -621,6 +621,7 @@
epMetaData.setConfigName(configName);
// Reinitialize the client handler chain
+ // TODO: is this necessary?
jaxrpcService.setupHandlerChain(epMetaData);
}
}
Added: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/ServiceDecorator.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/ServiceDecorator.java (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/ServiceDecorator.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -0,0 +1,121 @@
+/*
+ * 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.core.jaxws;
+
+import org.jboss.ws.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.core.StubExt;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.EndpointReference;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebServiceFeature;
+import javax.xml.ws.spi.ServiceDelegate;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Acts as a wrapper between clients and the JAX-WS API.
+ * Allows additional, propriatary API to be injected and core API calls
+ * to be decorated.
+ *
+ * @author Heiko.Braun(a)jboss.org
+ * @version $Id$
+ * @since 21.12.2006
+ */
+public class ServiceDecorator extends Service {
+
+ public final static String CLIENT_CONF_NAME = "org.jboss.ws.jaxws.client.configName";
+ public final static String CLIENT_CONF_FILE = "org.jboss.ws.jaxws.client.configFile";
+
+ private Map<String, Object> props = new HashMap<String, Object>();
+
+ private ServiceDelegate serviceDelegate;
+
+ private Map getProps()
+ {
+ return props;
+ }
+
+ public void setProperty(String key, Object value)
+ {
+ props.put(key, value);
+ }
+
+ public Object getProperty(String key)
+ {
+ return props.get(key);
+ }
+
+ public static ServiceDecorator newInstance(URL wsdlDocumentLocation, QName serviceName)
+ {
+ return new ServiceDecorator(wsdlDocumentLocation, serviceName);
+ }
+
+ // ----------------------------------------------------------------------------
+ // intercepted javax.xml.ws.Service invocations
+
+ protected ServiceDecorator(URL wsdlDocumentLocation, QName serviceName) {
+ super(wsdlDocumentLocation, serviceName);
+ }
+
+ public <T> T getPort(Class<T> serviceEndpointInterface) {
+ T port = super.getPort(serviceEndpointInterface);
+ decorateConfig((StubExt)port);
+ return port;
+ }
+
+ public <T> T getPort(QName portName, Class<T> serviceEndpointInterface) {
+ T port = super.getPort(portName, serviceEndpointInterface);
+ decorateConfig((StubExt)port);
+ return port;
+ }
+
+ public <T> T getPort(QName portName, Class<T> serviceEndpointInterface, WebServiceFeature... features) {
+ T port = super.getPort(portName, serviceEndpointInterface, features);
+ decorateConfig((StubExt)port);
+ return port;
+ }
+
+ public <T> T getPort(Class<T> serviceEndpointInterface, WebServiceFeature... features) {
+ T port = super.getPort(serviceEndpointInterface, features);
+ decorateConfig((StubExt)port);
+ return port;
+ }
+
+ public <T> T getPort(EndpointReference endpointReference, Class<T> serviceEndpointInterface, WebServiceFeature... features) {
+ T port = super.getPort(endpointReference, serviceEndpointInterface, features);
+ decorateConfig((StubExt)port);
+ return port;
+ }
+
+ private void decorateConfig(StubExt stub) {
+
+ EndpointMetaData epMetaData = stub.getEndpointMetaData();
+
+ if(props.containsKey(CLIENT_CONF_NAME))
+ epMetaData.setConfigName((String)props.get(CLIENT_CONF_NAME));
+ if(props.containsKey(CLIENT_CONF_FILE))
+ epMetaData.setConfigFile((String)props.get(CLIENT_CONF_FILE));
+
+ }
+}
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java 2007-01-18 12:00:15 UTC (rev 1993)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -23,9 +23,20 @@
// $Id$
-import java.rmi.RemoteException;
-import java.util.List;
-import java.util.Map;
+import org.jboss.logging.Logger;
+import org.jboss.util.NotImplementedException;
+import org.jboss.ws.core.CommonBindingProvider;
+import org.jboss.ws.core.CommonClient;
+import org.jboss.ws.core.CommonMessageContext;
+import org.jboss.ws.core.jaxws.binding.BindingExt;
+import org.jboss.ws.core.jaxws.binding.BindingProviderImpl;
+import org.jboss.ws.core.jaxws.handler.*;
+import org.jboss.ws.core.soap.MessageContextAssociation;
+import org.jboss.ws.metadata.config.Configurable;
+import org.jboss.ws.metadata.config.ConfigurationProvider;
+import org.jboss.ws.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.metadata.umdm.HandlerMetaData.HandlerType;
+import org.jboss.ws.metadata.umdm.OperationMetaData;
import javax.xml.namespace.QName;
import javax.xml.ws.Binding;
@@ -39,50 +50,60 @@
import javax.xml.ws.http.HTTPException;
import javax.xml.ws.soap.SOAPBinding;
import javax.xml.ws.soap.SOAPFaultException;
+import java.rmi.RemoteException;
+import java.util.List;
+import java.util.Map;
+import java.util.Observable;
-import org.jboss.logging.Logger;
-import org.jboss.util.NotImplementedException;
-import org.jboss.ws.core.CommonBindingProvider;
-import org.jboss.ws.core.CommonClient;
-import org.jboss.ws.core.CommonMessageContext;
-import org.jboss.ws.core.StubExt;
-import org.jboss.ws.core.jaxws.binding.BindingExt;
-import org.jboss.ws.core.jaxws.binding.BindingProviderImpl;
-import org.jboss.ws.core.jaxws.handler.HandlerChainExecutor;
-import org.jboss.ws.core.jaxws.handler.MessageContextJAXWS;
-import org.jboss.ws.core.jaxws.handler.PortInfoImpl;
-import org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS;
-import org.jboss.ws.core.soap.MessageContextAssociation;
-import org.jboss.ws.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.metadata.umdm.OperationMetaData;
-import org.jboss.ws.metadata.umdm.HandlerMetaData.HandlerType;
-
-/**
+/**
* Provides support for the dynamic invocation of a service endpoint.
*
* @author Thomas.Diesler(a)jboss.org
* @since 04-Jul-2006
*/
-public class ClientImpl extends CommonClient implements BindingProvider
+public class ClientImpl extends CommonClient implements BindingProvider, Configurable
{
// provide logging
private static Logger log = Logger.getLogger(ClientImpl.class);
-
+
+ private final EndpointMetaData epMetaData;
+ private final HandlerResolver handlerResolver;
+
public ClientImpl(EndpointMetaData epMetaData, HandlerResolver handlerResolver)
{
super(epMetaData);
setTargetEndpointAddress(epMetaData.getEndpointAddress());
- initBindingHandlerChain(epMetaData, handlerResolver);
+
+ this.epMetaData = epMetaData;
+ this.handlerResolver = handlerResolver;
+
+ resetCreateBindingHandlerChain();
+
+ // The config may change at some later point in time
+ // when applications utilize the ServiceDecorator API
+ // When clients change the config-name, we need reset the handlerchain
+ ((ConfigurationProvider)epMetaData).registerConfigObserver(this);
}
- // Init the cilent handler chain in the binding
- private void initBindingHandlerChain(EndpointMetaData epMetaData, HandlerResolver handlerResolver)
+ /**
+ * Reset or create the client handler chain in the binding.<br>
+ */
+ private void resetCreateBindingHandlerChain()
{
+ if (handlerResolver instanceof HandlerResolverImpl)
+ {
+ HandlerResolverImpl impl = (HandlerResolverImpl)handlerResolver;
+ impl.initHandlerChain(epMetaData, HandlerType.PRE);
+ impl.initHandlerChain(epMetaData, HandlerType.ENDPOINT);
+ impl.initHandlerChain(epMetaData, HandlerType.POST);
+ }
+
Binding binding = getBindingProvider().getBinding();
if (handlerResolver != null)
{
PortInfoImpl portInfo = new PortInfoImpl(epMetaData);
List<Handler> handlerChain = binding.getHandlerChain();
+ handlerChain.clear();
for (Handler handler : handlerResolver.getHandlerChain(portInfo))
{
handlerChain.add(handler);
@@ -90,6 +111,21 @@
}
}
+ /**
+ * Callback when the config-name or config-file changes.
+ * @param observable
+ * @param object
+ */
+ public void update(Observable observable, Object object) {
+ log.debug("Configuration change event received. Reconfigure handler chain: "+object);
+
+ // reconfigure endpoint meta data handler information from config
+ ((ConfigurationProvider)epMetaData).configure(epMetaData);
+
+ // re-populate the binding handler chain
+ resetCreateBindingHandlerChain();
+ }
+
@Override
protected boolean callRequestHandlerChain(QName portName, HandlerType type)
{
@@ -123,14 +159,14 @@
CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
msgContext.setProperty(MessageContextJAXWS.MESSAGE_OUTBOUND_PROPERTY, new Boolean(true));
}
-
+
// Invoked by the proxy invokation handler
public Object invoke(QName opName, Object[] args, Map<String, Object> resContext) throws RemoteException
{
// Associate a message context with the current thread
SOAPMessageContextJAXWS msgContext = new SOAPMessageContextJAXWS();
MessageContextAssociation.pushMessageContext(msgContext);
-
+
// The contents of the request context are used to initialize the message context (see section 9.4.1)
// prior to invoking any handlers (see chapter 9) for the outbound message. Each property within the
// request context is copied to the message context with a scope of HANDLER.
@@ -174,7 +210,7 @@
// associate new context
MessageContextAssociation.pushMessageContext(responseContext);
-
+
return responseContext;
}
@@ -195,7 +231,7 @@
}
/**
- * 4.2.4 Conformance (Remote Exceptions): If an error occurs during a remote operation invocation, an implemention
+ * 4.2.4 Conformance (Remote Exceptions): If an error occurs during a remote operation invocation, an implemention
* MUST throw a service specific exception if possible. If the error cannot be mapped to a service
* specific exception, an implementation MUST throw a ProtocolException or one of its subclasses, as
* appropriate for the binding in use. See section 6.4.1 for more details.
@@ -246,7 +282,7 @@
}
return bindingProvider;
}
-
+
public Map<String, Object> getRequestContext()
{
return getBindingProvider().getRequestContext();
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerResolverImpl.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerResolverImpl.java 2007-01-18 12:00:15 UTC (rev 1993)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerResolverImpl.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -131,6 +131,10 @@
public void initHandlerChain(EndpointMetaData epMetaData, HandlerType type)
{
log.debug("initHandlerChain: " + type);
+
+ // clear all exisisting handler to avoid double registration
+ log.debug("Clear handler map: " +handlerMap);
+
for (HandlerMetaData handlerMetaData : epMetaData.getHandlerMetaData(type))
{
HandlerMetaDataJAXWS jaxwsMetaData = (HandlerMetaDataJAXWS)handlerMetaData;
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java 2007-01-18 12:00:15 UTC (rev 1993)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -23,27 +23,6 @@
// $Id$
-import java.lang.reflect.Proxy;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.concurrent.Executor;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-
-import javax.jws.WebService;
-import javax.xml.bind.JAXBContext;
-import javax.xml.namespace.QName;
-import javax.xml.ws.BindingProvider;
-import javax.xml.ws.Dispatch;
-import javax.xml.ws.EndpointReference;
-import javax.xml.ws.WebServiceException;
-import javax.xml.ws.WebServiceFeature;
-import javax.xml.ws.Service.Mode;
-import javax.xml.ws.handler.HandlerResolver;
-import javax.xml.ws.spi.ServiceDelegate;
-
import org.jboss.logging.Logger;
import org.jboss.util.NotImplementedException;
import org.jboss.ws.core.StubExt;
@@ -54,11 +33,26 @@
import org.jboss.ws.metadata.builder.jaxws.JAXWSClientMetaDataBuilder;
import org.jboss.ws.metadata.umdm.ClientEndpointMetaData;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.metadata.umdm.EndpointMetaData.Type;
import org.jboss.ws.metadata.umdm.ServiceMetaData;
import org.jboss.ws.metadata.umdm.UnifiedMetaData;
-import org.jboss.ws.metadata.umdm.EndpointMetaData.Type;
-import org.jboss.ws.metadata.umdm.HandlerMetaData.HandlerType;
+import javax.jws.WebService;
+import javax.xml.bind.JAXBContext;
+import javax.xml.namespace.QName;
+import javax.xml.ws.*;
+import javax.xml.ws.Service.Mode;
+import javax.xml.ws.handler.HandlerResolver;
+import javax.xml.ws.spi.ServiceDelegate;
+import java.lang.reflect.Proxy;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.concurrent.Executor;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+
/**
* Service delegates are used internally by Service objects to allow pluggability of JAX-WS implementations.
*
@@ -299,15 +293,7 @@
private <T> T createProxy(Class<T> seiClass, EndpointMetaData epMetaData) throws WebServiceException
{
try
- {
- if (handlerResolver instanceof HandlerResolverImpl)
- {
- HandlerResolverImpl impl = ((HandlerResolverImpl)handlerResolver);
- impl.initHandlerChain(epMetaData, HandlerType.PRE);
- impl.initHandlerChain(epMetaData, HandlerType.ENDPOINT);
- impl.initHandlerChain(epMetaData, HandlerType.POST);
- }
-
+ {
ExecutorService executor = (ExecutorService)getExecutor();
ClientProxy handler = new ClientProxy(executor, new ClientImpl(epMetaData, handlerResolver));
ClassLoader cl = epMetaData.getClassLoader();
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/WSDLRequestHandler.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/WSDLRequestHandler.java 2007-01-18 12:00:15 UTC (rev 1993)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/WSDLRequestHandler.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -143,7 +143,7 @@
String newLocation = completeHost + reqPath + "?wsdl&resource=" + newResourcePath;
locationAttr.setNodeValue(newLocation);
- log.debug("Mapping import from '" + orgLocation + "' to '" + newLocation + "'");
+ log.trace("Mapping import from '" + orgLocation + "' to '" + newLocation + "'");
}
}
}
@@ -174,7 +174,7 @@
String newLocation = completeHost + locPath;
locationAttr.setNodeValue(newLocation);
- log.debug("Mapping address from '" + orgLocation + "' to '" + newLocation + "'");
+ log.trace("Mapping address from '" + orgLocation + "' to '" + newLocation + "'");
}
}
}
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/addressing/jaxws/WSAddressingServerHandler.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/addressing/jaxws/WSAddressingServerHandler.java 2007-01-18 12:00:15 UTC (rev 1993)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/addressing/jaxws/WSAddressingServerHandler.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -120,7 +120,7 @@
if (!isFault && !opMetaData.isOneWay())
{
- AddressingOpMetaExt addrExt = (AddressingOpMetaExt)opMetaData.getExtension(ADDR_CONSTANTS.getNamespaceURI());
+ AddressingOpMetaExt addrExt = (AddressingOpMetaExt)opMetaData.getExtension(ADDR_CONSTANTS.getNamespaceURI());
if (addrExt != null)
{
outProps.setAction(ADDR_BUILDER.newURI(addrExt.getOutboundAction()));
Deleted: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/DispatchException.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/DispatchException.java 2007-01-18 12:00:15 UTC (rev 1993)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/DispatchException.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -1,36 +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.ws.extensions.eventing;
-
-
-import org.jboss.ws.WSException;
-
-public class DispatchException extends WSException {
-
- public DispatchException() {
- super();
- }
-
- public DispatchException(String message) {
- super(message);
- }
-}
\ No newline at end of file
Deleted: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/EventSourceEndpoint.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/EventSourceEndpoint.java 2007-01-18 12:00:15 UTC (rev 1993)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/EventSourceEndpoint.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -1,45 +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.ws.extensions.eventing;
-
-// $Id$
-
-import java.rmi.Remote;
-import java.rmi.RemoteException;
-
-import org.jboss.ws.extensions.eventing.element.SubscribeRequest;
-import org.jboss.ws.extensions.eventing.element.SubscribeResponse;
-import org.jboss.ws.extensions.eventing.element.SubscriptionEndRequest;
-
-/**
- * Event source endpoint interface.
- *
- * @author Heiko Braun, <heiko(a)openj.net>
- * @since 24-Nov-2005
- */
-public interface EventSourceEndpoint extends Remote
-{
-
- SubscribeResponse subscribe(SubscribeRequest subscribeRequest) throws RemoteException;
-
- SubscriptionEndRequest subscriptionEnd() throws RemoteException;
-}
Deleted: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/EventSourceEndpointImpl.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/EventSourceEndpointImpl.java 2007-01-18 12:00:15 UTC (rev 1993)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/EventSourceEndpointImpl.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -1,109 +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.ws.extensions.eventing;
-
-// $Id$
-
-import java.rmi.RemoteException;
-
-import javax.xml.rpc.soap.SOAPFaultException;
-import javax.xml.ws.addressing.AddressingProperties;
-import javax.xml.ws.addressing.AttributedURI;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.extensions.eventing.element.EndpointReference;
-import org.jboss.ws.extensions.eventing.element.SubscribeRequest;
-import org.jboss.ws.extensions.eventing.element.SubscribeResponse;
-import org.jboss.ws.extensions.eventing.element.SubscriptionEndRequest;
-import org.jboss.ws.extensions.eventing.mgmt.Filter;
-import org.jboss.ws.extensions.eventing.mgmt.SubscriptionError;
-import org.jboss.ws.extensions.eventing.mgmt.SubscriptionManagerMBean;
-import org.jboss.ws.extensions.eventing.mgmt.SubscriptionTicket;
-
-/**
- * Event source endpoint implementation.<br>
- * Delegates to {@link org.jboss.ws.extensions.eventing.mgmt.SubscriptionManager}
- *
- * @author Heiko Braun, <heiko(a)openj.net>
- * @since 25-Nov-2005
- */
-public class EventSourceEndpointImpl extends EventingEndpointBase
- implements EventSourceEndpoint
-{
- private static Logger log = Logger.getLogger(EventSourceEndpointImpl.class);
-
- public SubscribeResponse subscribe(SubscribeRequest request) throws RemoteException
- {
- try
- {
- // retrieve addressing headers
- AddressingProperties inProps = getAddrProperties();
- AttributedURI eventSourceURI = inProps.getTo();
- log.debug("Subscribe request for event source: " + eventSourceURI.getURI());
-
- assertSubscriberEndpoints(request);
- EndpointReference notifyTo = request.getDelivery().getNotifyTo();
- EndpointReference endTo = request.getEndTo();
-
- // adapt filter elements
- Filter filter = null;
- if (request.getFilter() != null)
- {
- filter = new Filter(request.getFilter().getDialect(), request.getFilter().get_value());
- }
-
- // invoke subscription manager
- SubscriptionManagerMBean subscriptionManager = getSubscriptionManager();
- SubscriptionTicket ticket = subscriptionManager.subscribe(eventSourceURI.getURI(), notifyTo, endTo, request.getExpires(), filter);
-
- // create the response element
- SubscribeResponse res = new SubscribeResponse();
- res.setExpires(ticket.getExpires());
- res.setSubscriptionManager(ticket.getSubscriptionManager());
-
- return res;
-
- }
- catch (SubscriptionError e)
- {
- throw new SOAPFaultException(buildFaultQName(e.getSubcode()), e.getReason(), null, null);
- }
- }
-
- public SubscriptionEndRequest subscriptionEnd() throws RemoteException
- {
- return new SubscriptionEndRequest();
- }
-
- /**
- * Ensure that the subscriber endpoint information is supplied in request.
- * Namely NotifyTo and EndTo need to be set.
- * @param request
- */
- private void assertSubscriberEndpoints(SubscribeRequest request) {
- if(null == request.getDelivery().getNotifyTo() || null == request.getEndTo() )
- throw new SOAPFaultException( buildFaultQName(EventingConstants.CODE_INVALID_MESSAGE) ,
- "Subcriber endpoint information missing from request",
- null, null
- );
- }
-}
Deleted: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/EventingEndpointBase.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/EventingEndpointBase.java 2007-01-18 12:00:15 UTC (rev 1993)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/EventingEndpointBase.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -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.ws.extensions.eventing;
-
-
-// $Id$
-
-import java.net.URI;
-
-import javax.xml.namespace.QName;
-import javax.xml.rpc.soap.SOAPFaultException;
-import javax.xml.ws.addressing.AddressingBuilder;
-import javax.xml.ws.addressing.AddressingProperties;
-import javax.xml.ws.addressing.JAXWSAConstants;
-
-import org.jboss.ws.Constants;
-import org.jboss.ws.core.CommonMessageContext;
-import org.jboss.ws.core.soap.MessageContextAssociation;
-import org.jboss.ws.extensions.eventing.mgmt.SubscriptionManagerFactory;
-import org.jboss.ws.extensions.eventing.mgmt.SubscriptionManagerMBean;
-
-/**
- * @author Heiko Braun, <heiko(a)openj.net>
- * @since 13-Jan-2006
- */
-public abstract class EventingEndpointBase
-{
-
- private AddressingBuilder addrBuilder;
-
- /**
- * Retrieve the addressing properties associated with the request
- * and verify them.
- */
- protected static AddressingProperties getAddrProperties()
- {
- CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
- AddressingProperties inProps = (AddressingProperties)msgContext.getProperty(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
- assertAddrProperties(inProps);
- return inProps;
- }
-
- protected void setReplyAction(URI replyAction)
- {
-
- }
-
- /**
- * Access local subscription manager service.
- */
- protected SubscriptionManagerMBean getSubscriptionManager()
- {
- SubscriptionManagerFactory factory = SubscriptionManagerFactory.getInstance();
- SubscriptionManagerMBean subscriptionManager = factory.getSubscriptionManager();
- return subscriptionManager;
- }
-
- protected AddressingBuilder getAddrBuilder()
- {
- if (null == addrBuilder)
- addrBuilder = AddressingBuilder.getAddressingBuilder();
- return addrBuilder;
- }
-
- /**
- * Ensure that all required inbound properties are supplied in request.
- * @param inProps
- * @throws javax.xml.rpc.soap.SOAPFaultException
- */
- protected static void assertAddrProperties(AddressingProperties inProps) throws SOAPFaultException
- {
- if (null == inProps)
- throw new SOAPFaultException(Constants.SOAP11_FAULT_CODE_CLIENT, "Addressing headers missing from request", "wse:InvalidMessage", null);
- }
-
- public QName buildFaultQName(String elementName)
- {
- return new QName(EventingConstants.NS_EVENTING, elementName, EventingConstants.PREFIX_EVENTING);
- }
-}
Deleted: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/EventingService.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/EventingService.java 2007-01-18 12:00:15 UTC (rev 1993)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/EventingService.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -1,34 +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.ws.extensions.eventing;
-
-// $Id$
-
-import javax.xml.rpc.Service;
-
-/**
- * @author Heiko Braun, <heiko(a)openj.net>
- * @since 24-Nov-2005
- */
-public interface EventingService extends Service
-{
-}
Deleted: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/SubscriptionManagerEndpoint.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/SubscriptionManagerEndpoint.java 2007-01-18 12:00:15 UTC (rev 1993)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/SubscriptionManagerEndpoint.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -1,49 +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.ws.extensions.eventing;
-
-// $Id$
-
-import java.rmi.Remote;
-import java.rmi.RemoteException;
-
-import org.jboss.ws.extensions.eventing.element.RenewRequest;
-import org.jboss.ws.extensions.eventing.element.RenewResponse;
-import org.jboss.ws.extensions.eventing.element.StatusRequest;
-import org.jboss.ws.extensions.eventing.element.StatusResponse;
-import org.jboss.ws.extensions.eventing.element.UnsubscribeRequest;
-
-/**
- * Subscription manager endpoint interface.
- *
- * @author Heiko Braun, <heiko(a)openj.net>
- * @since 16-Dec-2005
- */
-public interface SubscriptionManagerEndpoint extends Remote
-{
-
- StatusResponse getStatus(StatusRequest request) throws RemoteException;
-
- RenewResponse renew(RenewRequest request) throws RemoteException;
-
- void unsubscribe(UnsubscribeRequest request) throws RemoteException;
-}
Deleted: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/SubscriptionManagerEndpointImpl.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/SubscriptionManagerEndpointImpl.java 2007-01-18 12:00:15 UTC (rev 1993)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/SubscriptionManagerEndpointImpl.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -1,194 +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.ws.extensions.eventing;
-
-// $Id$
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.rmi.RemoteException;
-import java.util.Date;
-
-import javax.xml.namespace.QName;
-import javax.xml.rpc.soap.SOAPFaultException;
-import javax.xml.ws.addressing.AddressingProperties;
-import javax.xml.ws.addressing.JAXWSAConstants;
-import javax.xml.ws.addressing.ReferenceParameters;
-
-import org.jboss.ws.Constants;
-import org.jboss.ws.core.CommonMessageContext;
-import org.jboss.ws.core.soap.MessageContextAssociation;
-import org.jboss.ws.core.utils.DOMUtils;
-import org.jboss.ws.extensions.eventing.element.RenewRequest;
-import org.jboss.ws.extensions.eventing.element.RenewResponse;
-import org.jboss.ws.extensions.eventing.element.StatusRequest;
-import org.jboss.ws.extensions.eventing.element.StatusResponse;
-import org.jboss.ws.extensions.eventing.element.UnsubscribeRequest;
-import org.jboss.ws.extensions.eventing.mgmt.SubscriptionError;
-import org.w3c.dom.Element;
-
-/**
- * SubscriptionManager endpoint implementation.<br>
- * Delegates to {@link org.jboss.ws.extensions.eventing.mgmt.SubscriptionManager}
- *
- * @author Heiko Braun, <heiko(a)openj.net>
- * @since 16-Dec-2005
- */
-public class SubscriptionManagerEndpointImpl extends EventingEndpointBase
- implements SubscriptionManagerEndpoint
-{
-
- public static final QName IDQN = new QName("http://schemas.xmlsoap.org/ws/2004/08/eventing", "Identifier", "ns1");
-
- /**
- * Get the status of a subscription.
- *
- * @param request
- * @return response including the lease time.
- * @throws RemoteException
- */
- public StatusResponse getStatus(StatusRequest request) throws RemoteException
- {
- URI identifier = retrieveSubscriptionId();
-
- try
- {
- Date leaseTime = getSubscriptionManager().getStatus(identifier);
- StatusResponse response = new StatusResponse();
- response.setExpires(leaseTime);
-
- return response;
- }
- catch (SubscriptionError e)
- {
- throw new SOAPFaultException(buildFaultQName(e.getSubcode()), e.getReason(), null, null);
- }
- }
-
- /**
- * Update the expiration for a subscription.
- *
- * @param request
- * @return response inclduing the new lease time.
- * @throws RemoteException
- */
- public RenewResponse renew(RenewRequest request) throws RemoteException
- {
- setReplyAction(EventingConstants.buildURI(EventingConstants.RENEW_RESPONSE_ACTION));
- URI identifier = retrieveSubscriptionId();
-
- try
- {
- Date newLeaseTime = getSubscriptionManager().renew(identifier, request.getExpires());
- RenewResponse response = new RenewResponse();
- response.setExpires(newLeaseTime);
-
- return response;
- }
- catch (SubscriptionError e)
- {
- throw new SOAPFaultException(buildFaultQName(e.getSubcode()), e.getReason(), null, null);
- }
-
- }
-
- /**
- * Explicitly delete a subscription.
- *
- * @param request
- * @throws RemoteException
- */
- public void unsubscribe(UnsubscribeRequest request) throws RemoteException
- {
- setReplyAction(EventingConstants.buildURI(EventingConstants.UNSUBSCRIBE_RESPONSE_ACTION));
- URI identifier = retrieveSubscriptionId();
-
- try
- {
- getSubscriptionManager().unsubscribe(identifier);
- }
- catch (SubscriptionError e)
- {
- throw new SOAPFaultException(buildFaultQName(e.getSubcode()), e.getReason(), null, null);
- }
-
- }
-
- private URI retrieveSubscriptionId()
- {
- URI subscriptionId = null;
- CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
- AddressingProperties addrProps = (AddressingProperties)msgContext.getProperty(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
-
- if (null == addrProps)
- {
- throw new SOAPFaultException(
- Constants.SOAP11_FAULT_CODE_CLIENT,
- "The message is not valid and cannot be processed:" +
- "Cannot obtain addressing properties.",
- null, null
- );
- }
-
- ReferenceParameters refParams = addrProps.getReferenceParameters();
- if (refParams != null)
- {
- for (Object obj : refParams.getElements())
- {
- if (obj instanceof Element)
- {
- Element el = (Element)obj;
- QName qname = DOMUtils.getElementQName(el);
- if (qname.equals(IDQN))
- {
- try
- {
- subscriptionId = new URI(DOMUtils.getTextContent(el));
- break;
- }
- catch (URISyntaxException e)
- {
- throw new SOAPFaultException(
- Constants.SOAP11_FAULT_CODE_CLIENT,
- "The message is not valid and cannot be processed:" +
- "Invalid subscription id.",
- null, null
- );
- }
- }
- }
- }
- }
-
- if (null == subscriptionId)
- {
- throw new SOAPFaultException(
- buildFaultQName(EventingConstants.CODE_INVALID_MESSAGE),
- "The message is not valid and cannot be processed."
- + "Cannot obtain subscription id.",
- null, null
- );
- }
-
- return subscriptionId;
- }
-}
Copied: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/common/EventingEndpointBase.java (from rev 1983, trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/EventingEndpointBase.java)
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/common/EventingEndpointBase.java (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/common/EventingEndpointBase.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -0,0 +1,95 @@
+/*
+ * 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.extensions.eventing.common;
+
+
+// $Id$
+
+import java.net.URI;
+
+import javax.xml.namespace.QName;
+import javax.xml.rpc.soap.SOAPFaultException;
+import javax.xml.ws.addressing.AddressingBuilder;
+import javax.xml.ws.addressing.AddressingProperties;
+import javax.xml.ws.addressing.JAXWSAConstants;
+
+import org.jboss.ws.Constants;
+import org.jboss.ws.core.CommonMessageContext;
+import org.jboss.ws.core.soap.MessageContextAssociation;
+import org.jboss.ws.extensions.eventing.mgmt.SubscriptionManagerFactory;
+import org.jboss.ws.extensions.eventing.mgmt.SubscriptionManagerMBean;
+import org.jboss.ws.extensions.eventing.EventingConstants;
+
+/**
+ * @author Heiko Braun, <heiko(a)openj.net>
+ * @since 13-Jan-2006
+ */
+public abstract class EventingEndpointBase
+{
+
+ private AddressingBuilder addrBuilder;
+
+ /**
+ * Retrieve the addressing properties associated with the request
+ * and verify them.
+ */
+ protected static AddressingProperties getAddrProperties()
+ {
+ CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
+ AddressingProperties inProps = (AddressingProperties)msgContext.getProperty(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
+ assertAddrProperties(inProps);
+ return inProps;
+ }
+
+ /**
+ * Access local subscription manager service.
+ */
+ protected SubscriptionManagerMBean getSubscriptionManager()
+ {
+ SubscriptionManagerFactory factory = SubscriptionManagerFactory.getInstance();
+ SubscriptionManagerMBean subscriptionManager = factory.getSubscriptionManager();
+ return subscriptionManager;
+ }
+
+ protected AddressingBuilder getAddrBuilder()
+ {
+ if (null == addrBuilder)
+ addrBuilder = AddressingBuilder.getAddressingBuilder();
+ return addrBuilder;
+ }
+
+ /**
+ * Ensure that all required inbound properties are supplied in request.
+ * @param inProps
+ * @throws javax.xml.rpc.soap.SOAPFaultException
+ */
+ protected static void assertAddrProperties(AddressingProperties inProps) throws SOAPFaultException
+ {
+ if (null == inProps)
+ throw new SOAPFaultException(Constants.SOAP11_FAULT_CODE_CLIENT, "Addressing headers missing from request", "wse:InvalidMessage", null);
+ }
+
+ public QName buildFaultQName(String elementName)
+ {
+ return new QName(EventingConstants.NS_EVENTING, elementName, EventingConstants.PREFIX_EVENTING);
+ }
+}
Property changes on: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/common/EventingEndpointBase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/deployment/EventingEndpoint.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/deployment/EventingEndpoint.java 2007-01-18 12:00:15 UTC (rev 1993)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/deployment/EventingEndpoint.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -46,7 +46,7 @@
// create pending incomplete event source
EventingEndpointDI desc = new EventingEndpointDI(ext.getEventSourceNS(), ext.getNotificationSchema(), ext.getNotificationRootElementNS());
desc.setEndpointAddress(epMetaData.getEndpointAddress());
- desc.setPortName(epMetaData.getPortComponentName());
+ desc.setPortName(epMetaData.getPortName());
SubscriptionManagerMBean manager = factory.getSubscriptionManager();
manager.registerEventSource(desc);
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/deployment/EventingEndpointDI.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/deployment/EventingEndpointDI.java 2007-01-18 12:00:15 UTC (rev 1993)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/deployment/EventingEndpointDI.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -1,5 +1,7 @@
package org.jboss.ws.extensions.eventing.deployment;
+import javax.xml.namespace.QName;
+
/**
* Eventsource endpoint deployment info.
*
@@ -11,7 +13,7 @@
/* event source URI */
private String name;
- private String portName;
+ private QName portName;
// event source endpoint address
private String endpointAddress;
@@ -27,11 +29,11 @@
this.notificationRootElementNS = notificationRootElementNS;
}
- public String getPortName() {
+ public QName getPortName() {
return portName;
}
- public void setPortName(String portName) {
+ public void setPortName(QName portName) {
this.portName = portName;
}
Copied: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/EventSourceEndpoint.java (from rev 1983, trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/EventSourceEndpoint.java)
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/EventSourceEndpoint.java (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/EventSourceEndpoint.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -0,0 +1,45 @@
+/*
+ * 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.extensions.eventing.jaxrpc;
+
+// $Id$
+
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+
+import org.jboss.ws.extensions.eventing.jaxrpc.element.SubscribeRequest;
+import org.jboss.ws.extensions.eventing.jaxrpc.element.SubscribeResponse;
+import org.jboss.ws.extensions.eventing.jaxrpc.element.SubscriptionEndRequest;
+
+/**
+ * Event source endpoint interface.
+ *
+ * @author Heiko Braun, <heiko(a)openj.net>
+ * @since 24-Nov-2005
+ */
+public interface EventSourceEndpoint extends Remote
+{
+
+ SubscribeResponse subscribe(SubscribeRequest subscribeRequest) throws RemoteException;
+
+ SubscriptionEndRequest subscriptionEnd() throws RemoteException;
+}
Property changes on: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/EventSourceEndpoint.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Copied: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/EventSourceEndpointImpl.java (from rev 1983, trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/EventSourceEndpointImpl.java)
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/EventSourceEndpointImpl.java (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/EventSourceEndpointImpl.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -0,0 +1,111 @@
+/*
+ * 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.extensions.eventing.jaxrpc;
+
+// $Id$
+
+import java.rmi.RemoteException;
+
+import javax.xml.rpc.soap.SOAPFaultException;
+import javax.xml.ws.addressing.AddressingProperties;
+import javax.xml.ws.addressing.AttributedURI;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.extensions.eventing.jaxrpc.element.EndpointReference;
+import org.jboss.ws.extensions.eventing.jaxrpc.element.SubscribeRequest;
+import org.jboss.ws.extensions.eventing.jaxrpc.element.SubscribeResponse;
+import org.jboss.ws.extensions.eventing.jaxrpc.element.SubscriptionEndRequest;
+import org.jboss.ws.extensions.eventing.common.EventingEndpointBase;
+import org.jboss.ws.extensions.eventing.jaxrpc.EventSourceEndpoint;
+import org.jboss.ws.extensions.eventing.mgmt.*;
+import org.jboss.ws.extensions.eventing.EventingConstants;
+
+/**
+ * Event source endpoint implementation.<br>
+ * Delegates to {@link org.jboss.ws.extensions.eventing.mgmt.SubscriptionManager}
+ *
+ * @author Heiko Braun, <heiko(a)openj.net>
+ * @since 25-Nov-2005
+ */
+public class EventSourceEndpointImpl extends EventingEndpointBase
+ implements EventSourceEndpoint
+{
+ private static Logger log = Logger.getLogger(EventSourceEndpointImpl.class);
+
+ public SubscribeResponse subscribe(SubscribeRequest request) throws RemoteException
+ {
+ /*try
+ {
+ // retrieve addressing headers
+ AddressingProperties inProps = getAddrProperties();
+ AttributedURI eventSourceURI = inProps.getTo();
+ log.debug("Subscribe request for event source: " + eventSourceURI.getURI());
+
+ assertSubscriberEndpoints(request);
+ EndpointReference notifyTo = request.getDelivery().getNotifyTo();
+ EndpointReference endTo = request.getEndTo();
+
+ // adapt filter elements
+ Filter filter = null;
+ if (request.getFilter() != null)
+ {
+ filter = new Filter(request.getFilter().getDialect(), request.getFilter().get_value());
+ }
+
+ // invoke subscription manager
+ SubscriptionManagerMBean subscriptionManager = getSubscriptionManager();
+ SubscriptionTicket ticket = subscriptionManager.subscribe(eventSourceURI.getURI(), notifyTo, endTo, request.getExpires(), filter);
+
+ // create the response element
+ SubscribeResponse res = new SubscribeResponse();
+ res.setExpires(ticket.getExpires());
+ res.setSubscriptionManager(ticket.getSubscriptionManager());
+
+ return res;
+
+ }
+ catch (SubscriptionError e)
+ {
+ throw new SOAPFaultException(buildFaultQName(e.getSubcode()), e.getReason(), null, null);
+ } */
+
+ return null;
+ }
+
+ public SubscriptionEndRequest subscriptionEnd() throws RemoteException
+ {
+ return new SubscriptionEndRequest();
+ }
+
+ /**
+ * Ensure that the subscriber endpoint information is supplied in request.
+ * Namely NotifyTo and EndTo need to be set.
+ * @param request
+ */
+ private void assertSubscriberEndpoints(SubscribeRequest request) {
+ if(null == request.getDelivery().getNotifyTo() || null == request.getEndTo() )
+ throw new SOAPFaultException( buildFaultQName(EventingConstants.CODE_INVALID_MESSAGE) ,
+ "Subcriber endpoint information missing from request",
+ null, null
+ );
+ }
+}
Property changes on: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/EventSourceEndpointImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Copied: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/EventingService.java (from rev 1983, trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/EventingService.java)
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/EventingService.java (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/EventingService.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -0,0 +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.
+ */
+package org.jboss.ws.extensions.eventing.jaxrpc;
+
+// $Id$
+
+import javax.xml.rpc.Service;
+
+/**
+ * @author Heiko Braun, <heiko(a)openj.net>
+ * @since 24-Nov-2005
+ */
+public interface EventingService extends Service
+{
+}
Property changes on: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/EventingService.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Copied: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/SubscriptionManagerEndpoint.java (from rev 1983, trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/SubscriptionManagerEndpoint.java)
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/SubscriptionManagerEndpoint.java (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/SubscriptionManagerEndpoint.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -0,0 +1,49 @@
+/*
+ * 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.extensions.eventing.jaxrpc;
+
+// $Id$
+
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+
+import org.jboss.ws.extensions.eventing.jaxrpc.element.RenewRequest;
+import org.jboss.ws.extensions.eventing.jaxrpc.element.RenewResponse;
+import org.jboss.ws.extensions.eventing.jaxrpc.element.StatusRequest;
+import org.jboss.ws.extensions.eventing.jaxrpc.element.StatusResponse;
+import org.jboss.ws.extensions.eventing.jaxrpc.element.UnsubscribeRequest;
+
+/**
+ * Subscription manager endpoint interface.
+ *
+ * @author Heiko Braun, <heiko(a)openj.net>
+ * @since 16-Dec-2005
+ */
+public interface SubscriptionManagerEndpoint extends Remote
+{
+
+ StatusResponse getStatus(StatusRequest request) throws RemoteException;
+
+ RenewResponse renew(RenewRequest request) throws RemoteException;
+
+ void unsubscribe(UnsubscribeRequest request) throws RemoteException;
+}
Property changes on: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/SubscriptionManagerEndpoint.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Copied: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/SubscriptionManagerEndpointImpl.java (from rev 1983, trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/SubscriptionManagerEndpointImpl.java)
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/SubscriptionManagerEndpointImpl.java (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/SubscriptionManagerEndpointImpl.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -0,0 +1,195 @@
+/*
+ * 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.extensions.eventing.jaxrpc;
+
+// $Id$
+
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.rmi.RemoteException;
+import java.util.Date;
+
+import javax.xml.namespace.QName;
+import javax.xml.rpc.soap.SOAPFaultException;
+import javax.xml.ws.addressing.AddressingProperties;
+import javax.xml.ws.addressing.JAXWSAConstants;
+import javax.xml.ws.addressing.ReferenceParameters;
+
+import org.jboss.ws.Constants;
+import org.jboss.ws.core.CommonMessageContext;
+import org.jboss.ws.core.soap.MessageContextAssociation;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.jboss.ws.extensions.eventing.jaxrpc.element.RenewRequest;
+import org.jboss.ws.extensions.eventing.jaxrpc.element.RenewResponse;
+import org.jboss.ws.extensions.eventing.jaxrpc.element.StatusRequest;
+import org.jboss.ws.extensions.eventing.jaxrpc.element.StatusResponse;
+import org.jboss.ws.extensions.eventing.jaxrpc.element.UnsubscribeRequest;
+import org.jboss.ws.extensions.eventing.common.EventingEndpointBase;
+import org.jboss.ws.extensions.eventing.jaxrpc.SubscriptionManagerEndpoint;
+import org.jboss.ws.extensions.eventing.mgmt.SubscriptionError;
+import org.jboss.ws.extensions.eventing.EventingConstants;
+import org.w3c.dom.Element;
+
+/**
+ * SubscriptionManagerEndpoint endpoint implementation.<br>
+ * Delegates to {@link org.jboss.ws.extensions.eventing.mgmt.SubscriptionManager}
+ *
+ * @author Heiko Braun, <heiko(a)openj.net>
+ * @since 16-Dec-2005
+ */
+public class SubscriptionManagerEndpointImpl extends EventingEndpointBase
+ implements SubscriptionManagerEndpoint
+{
+
+ public static final QName IDQN = new QName("http://schemas.xmlsoap.org/ws/2004/08/eventing", "Identifier", "ns1");
+
+ /**
+ * Get the status of a subscription.
+ *
+ * @param request
+ * @return response including the lease time.
+ * @throws RemoteException
+ */
+ public StatusResponse getStatus(StatusRequest request) throws RemoteException
+ {
+ URI identifier = retrieveSubscriptionId();
+
+ try
+ {
+ Date leaseTime = getSubscriptionManager().getStatus(identifier);
+ StatusResponse response = new StatusResponse();
+ response.setExpires(leaseTime);
+
+ return response;
+ }
+ catch (SubscriptionError e)
+ {
+ throw new SOAPFaultException(buildFaultQName(e.getSubcode()), e.getReason(), null, null);
+ }
+ }
+
+ /**
+ * Update the expiration for a subscription.
+ *
+ * @param request
+ * @return response inclduing the new lease time.
+ * @throws RemoteException
+ */
+ public RenewResponse renew(RenewRequest request) throws RemoteException
+ {
+ URI identifier = retrieveSubscriptionId();
+
+ try
+ {
+ Date newLeaseTime = getSubscriptionManager().renew(identifier, request.getExpires());
+ RenewResponse response = new RenewResponse();
+ response.setExpires(newLeaseTime);
+
+ return response;
+ }
+ catch (SubscriptionError e)
+ {
+ throw new SOAPFaultException(buildFaultQName(e.getSubcode()), e.getReason(), null, null);
+ }
+
+ }
+
+ /**
+ * Explicitly delete a subscription.
+ *
+ * @param request
+ * @throws RemoteException
+ */
+ public void unsubscribe(UnsubscribeRequest request) throws RemoteException
+ {
+ URI identifier = retrieveSubscriptionId();
+
+ try
+ {
+ getSubscriptionManager().unsubscribe(identifier);
+ }
+ catch (SubscriptionError e)
+ {
+ throw new SOAPFaultException(buildFaultQName(e.getSubcode()), e.getReason(), null, null);
+ }
+
+ }
+
+ private URI retrieveSubscriptionId()
+ {
+ URI subscriptionId = null;
+ CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
+ AddressingProperties addrProps = (AddressingProperties)msgContext.getProperty(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
+
+ if (null == addrProps)
+ {
+ throw new SOAPFaultException(
+ Constants.SOAP11_FAULT_CODE_CLIENT,
+ "The message is not valid and cannot be processed:" +
+ "Cannot obtain addressing properties.",
+ null, null
+ );
+ }
+
+ ReferenceParameters refParams = addrProps.getReferenceParameters();
+ if (refParams != null)
+ {
+ for (Object obj : refParams.getElements())
+ {
+ if (obj instanceof Element)
+ {
+ Element el = (Element)obj;
+ QName qname = DOMUtils.getElementQName(el);
+ if (qname.equals(IDQN))
+ {
+ try
+ {
+ subscriptionId = new URI(DOMUtils.getTextContent(el));
+ break;
+ }
+ catch (URISyntaxException e)
+ {
+ throw new SOAPFaultException(
+ Constants.SOAP11_FAULT_CODE_CLIENT,
+ "The message is not valid and cannot be processed:" +
+ "Invalid subscription id.",
+ null, null
+ );
+ }
+ }
+ }
+ }
+ }
+
+ if (null == subscriptionId)
+ {
+ throw new SOAPFaultException(
+ buildFaultQName(EventingConstants.CODE_INVALID_MESSAGE),
+ "The message is not valid and cannot be processed."
+ + "Cannot obtain subscription id.",
+ null, null
+ );
+ }
+
+ return subscriptionId;
+ }
+}
Property changes on: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/SubscriptionManagerEndpointImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Copied: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element (from rev 1983, trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/element)
Deleted: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/DeliveryType.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/element/DeliveryType.java 2007-01-16 14:29:43 UTC (rev 1983)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/DeliveryType.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -1,101 +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.ws.extensions.eventing.element;
-
-// $Id$
-
-import java.net.URI;
-
-import javax.xml.soap.SOAPElement;
-
-/**
- * A delivery element states where and how to send notifications.
- * It can contain an EPR where the notifications should be delivered to:
- * <p/>
- * <pre>
- * <wse:Delivery>
- * <wse:NotifyTo>
- * <wsa:Address>
- * http://www.other.example.com/OnStormWarning
- * </wsa:Address>
- * <wsa:ReferenceParameters>
- * <ew:MySubscription>2597</ew:MySubscription>
- * </wsa:ReferenceParameters>
- * </wse:NotifyTo>
- * </wse:Delivery>
- * </pre>
- * <p/>
- * NOTE: In case the NotifyTo is missing, the subscribers EPR should be used
- * (denoted by soap:Header/wsa:ReplyTo).<p>
- * <p/>
- * The specification defines single delivery mode,
- * Push Mode, which is simple asynchronous messaging.
- *
- * @author Heiko Braun, <heiko(a)openj.net>
- * @since 24-Nov-2005
- */
-public class DeliveryType
-{
- private URI mode;
- private SOAPElement[] _any;
- public String _value;
- private EndpointReference notifyTo;
-
- public URI getMode()
- {
- return mode;
- }
-
- public void setMode(URI mode)
- {
- this.mode = mode;
- }
-
- public SOAPElement[] get_any()
- {
- return _any;
- }
-
- public void set_any(SOAPElement[] _any)
- {
- this._any = _any;
- }
-
- public EndpointReference getNotifyTo()
- {
- return notifyTo;
- }
-
- public void setNotifyTo(EndpointReference notifyTo)
- {
- this.notifyTo = notifyTo;
- }
- public String get_value()
- {
- return _value;
- }
-
- public void set_value(String _value)
- {
- this._value = _value;
- }
-}
Copied: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/DeliveryType.java (from rev 1993, trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/element/DeliveryType.java)
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/DeliveryType.java (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/DeliveryType.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -0,0 +1,101 @@
+/*
+ * 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.extensions.eventing.jaxrpc.element;
+
+// $Id$
+
+import java.net.URI;
+
+import javax.xml.soap.SOAPElement;
+
+/**
+ * A delivery element states where and how to send notifications.
+ * It can contain an EPR where the notifications should be delivered to:
+ * <p/>
+ * <pre>
+ * <wse:Delivery>
+ * <wse:NotifyTo>
+ * <wsa:Address>
+ * http://www.other.example.com/OnStormWarning
+ * </wsa:Address>
+ * <wsa:ReferenceParameters>
+ * <ew:MySubscription>2597</ew:MySubscription>
+ * </wsa:ReferenceParameters>
+ * </wse:NotifyTo>
+ * </wse:Delivery>
+ * </pre>
+ * <p/>
+ * NOTE: In case the NotifyTo is missing, the subscribers EPR should be used
+ * (denoted by soap:Header/wsa:ReplyTo).<p>
+ * <p/>
+ * The specification defines single delivery mode,
+ * Push Mode, which is simple asynchronous messaging.
+ *
+ * @author Heiko Braun, <heiko(a)openj.net>
+ * @since 24-Nov-2005
+ */
+public class DeliveryType
+{
+ private URI mode;
+ private SOAPElement[] _any;
+ public String _value;
+ private EndpointReference notifyTo;
+
+ public URI getMode()
+ {
+ return mode;
+ }
+
+ public void setMode(URI mode)
+ {
+ this.mode = mode;
+ }
+
+ public SOAPElement[] get_any()
+ {
+ return _any;
+ }
+
+ public void set_any(SOAPElement[] _any)
+ {
+ this._any = _any;
+ }
+
+ public EndpointReference getNotifyTo()
+ {
+ return notifyTo;
+ }
+
+ public void setNotifyTo(EndpointReference notifyTo)
+ {
+ this.notifyTo = notifyTo;
+ }
+ public String get_value()
+ {
+ return _value;
+ }
+
+ public void set_value(String _value)
+ {
+ this._value = _value;
+ }
+}
Deleted: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/EndpointReference.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/element/EndpointReference.java 2007-01-16 14:29:43 UTC (rev 1983)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/EndpointReference.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -1,98 +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.ws.extensions.eventing.element;
-
-// $Id$
-
-import java.net.URI;
-
-import javax.xml.soap.SOAPElement;
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPFactory;
-
-import org.jboss.ws.core.soap.SOAPFactoryImpl;
-import org.jboss.ws.extensions.addressing.EndpointReferenceImpl;
-import org.jboss.ws.extensions.eventing.EventingConstants;
-
-/**
- * Simplified endpoint representation.
- *
- * @author Heiko Braun, <heiko(a)openj.net>
- * @since 29-Nov-2005
- */
-public class EndpointReference
-{
- private URI address;
- private ReferenceParameters referenceParams;
- private MetaData metadata;
-
- public EndpointReference()
- {
- }
-
- public URI getAddress()
- {
- return address;
- }
-
- public void setAddress(URI address)
- {
- this.address = address;
- }
-
- public ReferenceParameters getReferenceParams()
- {
- return referenceParams;
- }
-
- public void setReferenceParams(ReferenceParameters referenceParams)
- {
- this.referenceParams = referenceParams;
- }
-
- public MetaData getMetadata()
- {
- return metadata;
- }
-
- public void setMetadata(MetaData metadata)
- {
- this.metadata = metadata;
- }
-
- public EndpointReferenceImpl toWsaEndpointReference() {
-
- try
- {
- EndpointReferenceImpl epr = new EndpointReferenceImpl(this.address);
- SOAPFactoryImpl factory = (SOAPFactoryImpl) SOAPFactory.newInstance();
- SOAPElement idEl = factory.createElement("Identifier", "wse", EventingConstants.NS_EVENTING);
- idEl.setValue(this.referenceParams.getIdentifier().toString());
- epr.getReferenceParameters().addElement(idEl);
- return epr;
- }
- catch (SOAPException e)
- {
- throw new RuntimeException(e);
- }
- }
-}
Added: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/EndpointReference.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/EndpointReference.java (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/EndpointReference.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -0,0 +1,99 @@
+/*
+ * 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.extensions.eventing.jaxrpc.element;
+
+// $Id: EndpointReference.java 1757 2006-12-22 15:40:24Z thomas.diesler(a)jboss.com $
+
+import java.net.URI;
+
+import javax.xml.soap.SOAPElement;
+import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPFactory;
+
+import org.jboss.ws.core.soap.SOAPFactoryImpl;
+import org.jboss.ws.extensions.addressing.EndpointReferenceImpl;
+import org.jboss.ws.extensions.eventing.EventingConstants;
+import org.jboss.ws.extensions.eventing.jaxrpc.element.MetaData;
+
+/**
+ * Simplified endpoint representation.
+ *
+ * @author Heiko Braun, <heiko(a)openj.net>
+ * @since 29-Nov-2005
+ */
+public class EndpointReference
+{
+ private URI address;
+ private ReferenceParameters referenceParams;
+ private MetaData metadata;
+
+ public EndpointReference()
+ {
+ }
+
+ public URI getAddress()
+ {
+ return address;
+ }
+
+ public void setAddress(URI address)
+ {
+ this.address = address;
+ }
+
+ public ReferenceParameters getReferenceParams()
+ {
+ return referenceParams;
+ }
+
+ public void setReferenceParams(ReferenceParameters referenceParams)
+ {
+ this.referenceParams = referenceParams;
+ }
+
+ public MetaData getMetadata()
+ {
+ return metadata;
+ }
+
+ public void setMetadata(MetaData metadata)
+ {
+ this.metadata = metadata;
+ }
+
+ public EndpointReferenceImpl toWsaEndpointReference() {
+
+ try
+ {
+ EndpointReferenceImpl epr = new EndpointReferenceImpl(this.address);
+ SOAPFactoryImpl factory = (SOAPFactoryImpl) SOAPFactory.newInstance();
+ SOAPElement idEl = factory.createElement("Identifier", "wse", EventingConstants.NS_EVENTING);
+ idEl.setValue(this.referenceParams.getIdentifier().toString());
+ epr.getReferenceParameters().addElement(idEl);
+ return epr;
+ }
+ catch (SOAPException e)
+ {
+ throw new RuntimeException(e);
+ }
+ }
+}
Deleted: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/FilterType.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/element/FilterType.java 2007-01-16 14:29:43 UTC (rev 1983)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/FilterType.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -1,80 +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.ws.extensions.eventing.element;
-
-// $Id$
-
-import java.net.URI;
-
-import javax.xml.soap.SOAPElement;
-
-/**
- * A Boolean expression in some dialect,
- * either as a string or as an XML fragment. If the expression evaluates to false
- * for a notification, the notification MUST NOT be sent to the event sink.
- * <p/>
- * The value must be a XPath predicate expression (PredicateExpr).
- * <p/>
- * <br>
- * For further information see <code>http://www.w3.org/TR/xpath#predicates</code>.
- *
- * @see org.jboss.ws.extensions.eventing.mgmt.Filter
- *
- * @author Heiko Braun, <heiko(a)openj.net>
- * @since 24-Nov-2005
- */
-public class FilterType
-{
- private URI dialect;
- private SOAPElement[] _any;
- public String _value;
-
- public URI getDialect()
- {
- return dialect;
- }
-
- public void setDialect(URI dialect)
- {
- this.dialect = dialect;
- }
-
- public SOAPElement[] get_any()
- {
- return _any;
- }
-
- public void set_any(SOAPElement[] _any)
- {
- this._any = _any;
- }
-
- public String get_value()
- {
- return _value;
- }
-
- public void set_value(String _value)
- {
- this._value = _value;
- }
-}
Copied: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/FilterType.java (from rev 1993, trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/element/FilterType.java)
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/FilterType.java (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/FilterType.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -0,0 +1,80 @@
+/*
+ * 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.extensions.eventing.jaxrpc.element;
+
+// $Id$
+
+import java.net.URI;
+
+import javax.xml.soap.SOAPElement;
+
+/**
+ * A Boolean expression in some dialect,
+ * either as a string or as an XML fragment. If the expression evaluates to false
+ * for a notification, the notification MUST NOT be sent to the event sink.
+ * <p/>
+ * The value must be a XPath predicate expression (PredicateExpr).
+ * <p/>
+ * <br>
+ * For further information see <code>http://www.w3.org/TR/xpath#predicates</code>.
+ *
+ * @see org.jboss.ws.extensions.eventing.mgmt.Filter
+ *
+ * @author Heiko Braun, <heiko(a)openj.net>
+ * @since 24-Nov-2005
+ */
+public class FilterType
+{
+ private URI dialect;
+ private SOAPElement[] _any;
+ public String _value;
+
+ public URI getDialect()
+ {
+ return dialect;
+ }
+
+ public void setDialect(URI dialect)
+ {
+ this.dialect = dialect;
+ }
+
+ public SOAPElement[] get_any()
+ {
+ return _any;
+ }
+
+ public void set_any(SOAPElement[] _any)
+ {
+ this._any = _any;
+ }
+
+ public String get_value()
+ {
+ return _value;
+ }
+
+ public void set_value(String _value)
+ {
+ this._value = _value;
+ }
+}
Deleted: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/MetaData.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/element/MetaData.java 2007-01-16 14:29:43 UTC (rev 1983)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/MetaData.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -1,47 +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.ws.extensions.eventing.element;
-
-// $Id$
-
-import javax.xml.soap.SOAPElement;
-
-/**
- * Endpoint meta data.
- *
- * @author Heiko Braun, <heiko(a)openj.net>
- * @since 29-Nov-2005
- */
-public class MetaData
-{
- private SOAPElement[] _any;
-
- public SOAPElement[] get_any()
- {
- return _any;
- }
-
- public void set_any(SOAPElement[] _any)
- {
- this._any = _any;
- }
-}
Copied: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/MetaData.java (from rev 1993, trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/element/MetaData.java)
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/MetaData.java (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/MetaData.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -0,0 +1,47 @@
+/*
+ * 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.extensions.eventing.jaxrpc.element;
+
+// $Id$
+
+import javax.xml.soap.SOAPElement;
+
+/**
+ * Endpoint meta data.
+ *
+ * @author Heiko Braun, <heiko(a)openj.net>
+ * @since 29-Nov-2005
+ */
+public class MetaData
+{
+ private SOAPElement[] _any;
+
+ public SOAPElement[] get_any()
+ {
+ return _any;
+ }
+
+ public void set_any(SOAPElement[] _any)
+ {
+ this._any = _any;
+ }
+}
Deleted: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/NotificationFailure.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/element/NotificationFailure.java 2007-01-16 14:29:43 UTC (rev 1983)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/NotificationFailure.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -1,86 +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.ws.extensions.eventing.element;
-
-import java.net.URI;
-
-import org.jboss.ws.core.utils.DOMWriter;
-import org.w3c.dom.Element;
-
-/**
- * Represent an error during notification.
- *
- * @author Stefano Maestri <stefano.maestri(a)javalinux.it>, Alessio Soldano <alessio.soldano(a)javalinux.it>
- * @since 26/11/2006
- */
-
-public class NotificationFailure
-{
- private URI endTo;
- private Element event;
- private Exception exception;
-
- public NotificationFailure(URI endTo, Element event, Exception exception)
- {
- super();
- this.endTo = endTo;
- this.event = event;
- this.exception = exception;
- }
- public URI getEndTo()
- {
- return endTo;
- }
- public void setEndTo(URI endTo)
- {
- this.endTo = endTo;
- }
- public Element getEvent()
- {
- return event;
- }
- public void setEvent(Element event)
- {
- this.event = event;
- }
- public Exception getException()
- {
- return exception;
- }
- public void setException(Exception exception)
- {
- this.exception = exception;
- }
-
- public String toString() {
- StringBuffer sb = new StringBuffer();
- sb.append("endTo: ");
- sb.append(endTo);
- sb.append("\n\nevent: ");
- sb.append(DOMWriter.printNode(event, false));
- sb.append("\n\nexception: ");
- sb.append(exception);
- sb.append("\n*******************\n");
- return sb.toString();
- }
-
-}
Deleted: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/ReferenceParameters.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/element/ReferenceParameters.java 2007-01-16 14:29:43 UTC (rev 1983)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/ReferenceParameters.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -1,56 +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.ws.extensions.eventing.element;
-
-// $Id$
-
-import java.net.URI;
-
-/**
- * A hack that makes eventing work without support for xml wildcards.
- *
- * @author Heiko Braun, <heiko(a)openj.net>
- * @since 16-Dec-2005
- */
-public class ReferenceParameters
-{
- private URI identifier;
-
- public ReferenceParameters()
- {
- }
-
- public ReferenceParameters(URI identifier)
- {
- this.identifier = identifier;
- }
-
- public URI getIdentifier()
- {
- return identifier;
- }
-
- public void setIdentifier(URI identifier)
- {
- this.identifier = identifier;
- }
-}
Added: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/ReferenceParameters.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/ReferenceParameters.java (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/ReferenceParameters.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -0,0 +1,56 @@
+/*
+ * 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.extensions.eventing.jaxrpc.element;
+
+// $Id: ReferenceParameters.java 1757 2006-12-22 15:40:24Z thomas.diesler(a)jboss.com $
+
+import java.net.URI;
+
+/**
+ * A hack that makes eventing work without support for xml wildcards.
+ *
+ * @author Heiko Braun, <heiko(a)openj.net>
+ * @since 16-Dec-2005
+ */
+public class ReferenceParameters
+{
+ private URI identifier;
+
+ public ReferenceParameters()
+ {
+ }
+
+ public ReferenceParameters(URI identifier)
+ {
+ this.identifier = identifier;
+ }
+
+ public URI getIdentifier()
+ {
+ return identifier;
+ }
+
+ public void setIdentifier(URI identifier)
+ {
+ this.identifier = identifier;
+ }
+}
Deleted: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/RenewRequest.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/element/RenewRequest.java 2007-01-16 14:29:43 UTC (rev 1983)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/RenewRequest.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -1,45 +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.ws.extensions.eventing.element;
-
-// $Id$
-
-import java.util.Date;
-
-/**
- * @author Heiko Braun, <heiko(a)openj.net>
- * @since 02-Dec-2005
- */
-public class RenewRequest
-{
- private Date expires;
-
- public Date getExpires()
- {
- return expires;
- }
-
- public void setExpires(Date expires)
- {
- this.expires = expires;
- }
-}
Copied: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/RenewRequest.java (from rev 1993, trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/element/RenewRequest.java)
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/RenewRequest.java (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/RenewRequest.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -0,0 +1,45 @@
+/*
+ * 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.extensions.eventing.jaxrpc.element;
+
+// $Id$
+
+import java.util.Date;
+
+/**
+ * @author Heiko Braun, <heiko(a)openj.net>
+ * @since 02-Dec-2005
+ */
+public class RenewRequest
+{
+ private Date expires;
+
+ public Date getExpires()
+ {
+ return expires;
+ }
+
+ public void setExpires(Date expires)
+ {
+ this.expires = expires;
+ }
+}
Deleted: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/RenewResponse.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/element/RenewResponse.java 2007-01-16 14:29:43 UTC (rev 1983)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/RenewResponse.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -1,45 +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.ws.extensions.eventing.element;
-
-// $Id$
-
-import java.util.Date;
-
-/**
- * @author Heiko Braun, <heiko(a)openj.net>
- * @since 19-Dec-2005
- */
-public class RenewResponse
-{
- private Date expires;
-
- public Date getExpires()
- {
- return expires;
- }
-
- public void setExpires(Date expires)
- {
- this.expires = expires;
- }
-}
Copied: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/RenewResponse.java (from rev 1993, trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/element/RenewResponse.java)
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/RenewResponse.java (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/RenewResponse.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -0,0 +1,45 @@
+/*
+ * 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.extensions.eventing.jaxrpc.element;
+
+// $Id$
+
+import java.util.Date;
+
+/**
+ * @author Heiko Braun, <heiko(a)openj.net>
+ * @since 19-Dec-2005
+ */
+public class RenewResponse
+{
+ private Date expires;
+
+ public Date getExpires()
+ {
+ return expires;
+ }
+
+ public void setExpires(Date expires)
+ {
+ this.expires = expires;
+ }
+}
Deleted: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/StatusRequest.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/element/StatusRequest.java 2007-01-16 14:29:43 UTC (rev 1983)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/StatusRequest.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -1,41 +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.ws.extensions.eventing.element;
-
-import javax.xml.soap.SOAPElement;
-
-/**
- * @author Heiko Braun, <heiko(a)openj.net>
- * @since 19-Dec-2005
- */
-public class StatusRequest
-{
- private SOAPElement _any;
-
- public SOAPElement get_any() {
- return _any;
- }
-
- public void set_any(SOAPElement _any) {
- this._any = _any;
- }
-}
Copied: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/StatusRequest.java (from rev 1993, trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/element/StatusRequest.java)
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/StatusRequest.java (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/StatusRequest.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -0,0 +1,41 @@
+/*
+ * 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.extensions.eventing.jaxrpc.element;
+
+import javax.xml.soap.SOAPElement;
+
+/**
+ * @author Heiko Braun, <heiko(a)openj.net>
+ * @since 19-Dec-2005
+ */
+public class StatusRequest
+{
+ private SOAPElement _any;
+
+ public SOAPElement get_any() {
+ return _any;
+ }
+
+ public void set_any(SOAPElement _any) {
+ this._any = _any;
+ }
+}
Deleted: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/StatusResponse.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/element/StatusResponse.java 2007-01-16 14:29:43 UTC (rev 1983)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/StatusResponse.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -1,45 +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.ws.extensions.eventing.element;
-
-// $Id$
-
-import java.util.Date;
-
-/**
- * @author Heiko Braun, <heiko(a)openj.net>
- * @since 19-Dec-2005
- */
-public class StatusResponse
-{
- private Date expires;
-
- public Date getExpires()
- {
- return expires;
- }
-
- public void setExpires(Date expires)
- {
- this.expires = expires;
- }
-}
Copied: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/StatusResponse.java (from rev 1993, trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/element/StatusResponse.java)
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/StatusResponse.java (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/StatusResponse.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -0,0 +1,45 @@
+/*
+ * 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.extensions.eventing.jaxrpc.element;
+
+// $Id$
+
+import java.util.Date;
+
+/**
+ * @author Heiko Braun, <heiko(a)openj.net>
+ * @since 19-Dec-2005
+ */
+public class StatusResponse
+{
+ private Date expires;
+
+ public Date getExpires()
+ {
+ return expires;
+ }
+
+ public void setExpires(Date expires)
+ {
+ this.expires = expires;
+ }
+}
Deleted: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/SubscribeRequest.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/element/SubscribeRequest.java 2007-01-16 14:29:43 UTC (rev 1983)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/SubscribeRequest.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -1,97 +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.ws.extensions.eventing.element;
-
-// $Id$
-
-import java.util.Date;
-
-import javax.xml.soap.SOAPElement;
-
-/**
- * @author Heiko Braun, <heiko(a)openj.net>
- * @since 24-Nov-2005
- */
-public class SubscribeRequest
-{
- private EndpointReference endTo;
- private DeliveryType delivery;
- private Date expires;
- private FilterType filter;
-
- private SOAPElement[] _any;
-
- public EndpointReference getEndTo()
- {
- return endTo;
- }
-
- public void setEndTo(EndpointReference endTo)
- {
- this.endTo = endTo;
- }
-
- public org.jboss.ws.extensions.eventing.element.DeliveryType getDelivery()
- {
- return delivery;
- }
-
- public void setDelivery(DeliveryType delivery)
- {
- this.delivery = delivery;
- }
-
- public Date getExpires()
- {
- return expires;
- }
-
- public void setExpires(Date expires)
- {
- this.expires = expires;
- }
-
- public FilterType getFilter()
- {
- return filter;
- }
-
- public void setFilter(FilterType filter)
- {
- this.filter = filter;
- }
-
- public SOAPElement[] get_any()
- {
- return _any;
- }
-
- public void set_any(SOAPElement[] _any)
- {
- this._any = _any;
- }
-
- public String toString()
- {
- return "SubscribeRequest{" + "delivery=" + getDelivery() + "}";
- }
-}
Copied: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/SubscribeRequest.java (from rev 1993, trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/element/SubscribeRequest.java)
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/SubscribeRequest.java (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/SubscribeRequest.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -0,0 +1,97 @@
+/*
+ * 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.extensions.eventing.jaxrpc.element;
+
+// $Id$
+
+import java.util.Date;
+
+import javax.xml.soap.SOAPElement;
+
+/**
+ * @author Heiko Braun, <heiko(a)openj.net>
+ * @since 24-Nov-2005
+ */
+public class SubscribeRequest
+{
+ private EndpointReference endTo;
+ private DeliveryType delivery;
+ private Date expires;
+ private FilterType filter;
+
+ private SOAPElement[] _any;
+
+ public EndpointReference getEndTo()
+ {
+ return endTo;
+ }
+
+ public void setEndTo(EndpointReference endTo)
+ {
+ this.endTo = endTo;
+ }
+
+ public org.jboss.ws.extensions.eventing.jaxrpc.element.DeliveryType getDelivery()
+ {
+ return delivery;
+ }
+
+ public void setDelivery(DeliveryType delivery)
+ {
+ this.delivery = delivery;
+ }
+
+ public Date getExpires()
+ {
+ return expires;
+ }
+
+ public void setExpires(Date expires)
+ {
+ this.expires = expires;
+ }
+
+ public FilterType getFilter()
+ {
+ return filter;
+ }
+
+ public void setFilter(FilterType filter)
+ {
+ this.filter = filter;
+ }
+
+ public SOAPElement[] get_any()
+ {
+ return _any;
+ }
+
+ public void set_any(SOAPElement[] _any)
+ {
+ this._any = _any;
+ }
+
+ public String toString()
+ {
+ return "SubscribeRequest{" + "delivery=" + getDelivery() + "}";
+ }
+}
Deleted: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/SubscribeResponse.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/element/SubscribeResponse.java 2007-01-16 14:29:43 UTC (rev 1983)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/SubscribeResponse.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -1,57 +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.ws.extensions.eventing.element;
-
-// $Id$
-
-import java.util.Date;
-
-/**
- * @author Heiko Braun, <heiko(a)openj.net>
- * @since 24-Nov-2005
- */
-public class SubscribeResponse
-{
- private org.jboss.ws.extensions.eventing.element.EndpointReference subscriptionManager;
- private Date expires;
-
- public EndpointReference getSubscriptionManager()
- {
- return subscriptionManager;
- }
-
- public void setSubscriptionManager(EndpointReference subscriptionManager)
- {
- this.subscriptionManager = subscriptionManager;
- }
-
- public Date getExpires()
- {
- return expires;
- }
-
- public void setExpires(Date expires)
- {
- this.expires = expires;
- }
-
-}
Copied: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/SubscribeResponse.java (from rev 1993, trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/element/SubscribeResponse.java)
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/SubscribeResponse.java (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/SubscribeResponse.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -0,0 +1,57 @@
+/*
+ * 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.extensions.eventing.jaxrpc.element;
+
+// $Id$
+
+import java.util.Date;
+
+/**
+ * @author Heiko Braun, <heiko(a)openj.net>
+ * @since 24-Nov-2005
+ */
+public class SubscribeResponse
+{
+ private org.jboss.ws.extensions.eventing.jaxrpc.element.EndpointReference subscriptionManager;
+ private Date expires;
+
+ public EndpointReference getSubscriptionManager()
+ {
+ return subscriptionManager;
+ }
+
+ public void setSubscriptionManager(EndpointReference subscriptionManager)
+ {
+ this.subscriptionManager = subscriptionManager;
+ }
+
+ public Date getExpires()
+ {
+ return expires;
+ }
+
+ public void setExpires(Date expires)
+ {
+ this.expires = expires;
+ }
+
+}
Deleted: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/SubscriptionEndRequest.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/element/SubscriptionEndRequest.java 2007-01-16 14:29:43 UTC (rev 1983)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/SubscriptionEndRequest.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -1,74 +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.ws.extensions.eventing.element;
-
-// $Id$
-
-import java.net.URI;
-
-import org.jboss.ws.extensions.addressing.EndpointReferenceImpl;
-
-/**
- * @author Heiko Braun, <heiko(a)openj.net>
- * @since 25-Nov-2005
- */
-public class SubscriptionEndRequest
-{
- EndpointReferenceImpl subscriptionManager;
- URI code;
- String reason;
-
- public EndpointReferenceImpl getSubscriptionManager()
- {
- return subscriptionManager;
- }
-
- /**
- * todo: remove, since this is one-way op
- *
- * @param subscriptionManager
- */
- public void setSubscriptionManager(EndpointReferenceImpl subscriptionManager)
- {
- this.subscriptionManager = subscriptionManager;
- }
-
- public URI getCode()
- {
- return code;
- }
-
- public void setCode(URI code)
- {
- this.code = code;
- }
-
- public String getReason()
- {
- return reason;
- }
-
- public void setReason(String reason)
- {
- this.reason = reason;
- }
-}
Copied: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/SubscriptionEndRequest.java (from rev 1993, trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/element/SubscriptionEndRequest.java)
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/SubscriptionEndRequest.java (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/SubscriptionEndRequest.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -0,0 +1,74 @@
+/*
+ * 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.extensions.eventing.jaxrpc.element;
+
+// $Id$
+
+import java.net.URI;
+
+import org.jboss.ws.extensions.addressing.EndpointReferenceImpl;
+
+/**
+ * @author Heiko Braun, <heiko(a)openj.net>
+ * @since 25-Nov-2005
+ */
+public class SubscriptionEndRequest
+{
+ EndpointReferenceImpl subscriptionManager;
+ URI code;
+ String reason;
+
+ public EndpointReferenceImpl getSubscriptionManager()
+ {
+ return subscriptionManager;
+ }
+
+ /**
+ * todo: remove, since this is one-way op
+ *
+ * @param subscriptionManager
+ */
+ public void setSubscriptionManager(EndpointReferenceImpl subscriptionManager)
+ {
+ this.subscriptionManager = subscriptionManager;
+ }
+
+ public URI getCode()
+ {
+ return code;
+ }
+
+ public void setCode(URI code)
+ {
+ this.code = code;
+ }
+
+ public String getReason()
+ {
+ return reason;
+ }
+
+ public void setReason(String reason)
+ {
+ this.reason = reason;
+ }
+}
Deleted: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/UnsubscribeRequest.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/element/UnsubscribeRequest.java 2007-01-16 14:29:43 UTC (rev 1983)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/UnsubscribeRequest.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -1,61 +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.ws.extensions.eventing.element;
-
-// $Id$
-
-import java.net.URI;
-
-import javax.xml.soap.SOAPElement;
-
-/**
- * @author Heiko Braun, <heiko(a)openj.net>
- * @since 19-Dec-2005
- */
-public class UnsubscribeRequest
-{
- private URI identifier;
- private SOAPElement _any;
-
- public UnsubscribeRequest() {
- }
-
- public UnsubscribeRequest(URI identifier) {
- this.identifier = identifier;
- }
- public URI getIdentifier()
- {
- return identifier;
- }
-
- public void setIdentifier(URI identifier)
- {
- this.identifier = identifier;
- }
- public SOAPElement get_any() {
- return _any;
- }
-
- public void set_any(SOAPElement _any) {
- this._any = _any;
- }
-}
Copied: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/UnsubscribeRequest.java (from rev 1993, trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/element/UnsubscribeRequest.java)
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/UnsubscribeRequest.java (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxrpc/element/UnsubscribeRequest.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -0,0 +1,61 @@
+/*
+ * 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.extensions.eventing.jaxrpc.element;
+
+// $Id$
+
+import java.net.URI;
+
+import javax.xml.soap.SOAPElement;
+
+/**
+ * @author Heiko Braun, <heiko(a)openj.net>
+ * @since 19-Dec-2005
+ */
+public class UnsubscribeRequest
+{
+ private URI identifier;
+ private SOAPElement _any;
+
+ public UnsubscribeRequest() {
+ }
+
+ public UnsubscribeRequest(URI identifier) {
+ this.identifier = identifier;
+ }
+ public URI getIdentifier()
+ {
+ return identifier;
+ }
+
+ public void setIdentifier(URI identifier)
+ {
+ this.identifier = identifier;
+ }
+ public SOAPElement get_any() {
+ return _any;
+ }
+
+ public void set_any(SOAPElement _any) {
+ this._any = _any;
+ }
+}
Added: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/AttributedAnyType.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/AttributedAnyType.java (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/AttributedAnyType.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -0,0 +1,106 @@
+/*
+ * 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.extensions.eventing.jaxws;
+
+import org.w3c.dom.Element;
+
+import javax.xml.bind.annotation.*;
+import javax.xml.namespace.QName;
+import java.util.HashMap;
+import java.util.Map;
+
+
+/**
+ * <p>Java class for AttributedAnyType complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="AttributedAnyType">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <any/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "AttributedAnyType", namespace = "http://www.w3.org/2005/08/addressing", propOrder = {
+ "any"
+})
+public class AttributedAnyType {
+
+ @XmlAnyElement(lax = true)
+ protected Object any;
+ @XmlAnyAttribute
+ private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+
+ /**
+ * Gets the value of the any property.
+ *
+ * @return
+ * possible object is
+ * {@link Element }
+ * {@link Object }
+ *
+ */
+ public Object getAny() {
+ return any;
+ }
+
+ /**
+ * Sets the value of the any property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Element }
+ * {@link Object }
+ *
+ */
+ public void setAny(Object value) {
+ this.any = value;
+ }
+
+ /**
+ * Gets a map that contains attributes that aren't bound to any typed property on this class.
+ *
+ * <p>
+ * the map is keyed by the name of the attribute and
+ * the value is the string value of the attribute.
+ *
+ * the map returned by this method is live, and you can add new attribute
+ * by updating the map directly. Because of this design, there's no setter.
+ *
+ *
+ * @return
+ * always non-null
+ */
+ public Map<QName, String> getOtherAttributes() {
+ return otherAttributes;
+ }
+
+}
Added: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/AttributedQNameType.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/AttributedQNameType.java (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/AttributedQNameType.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -0,0 +1,99 @@
+/*
+ * 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.extensions.eventing.jaxws;
+
+import javax.xml.bind.annotation.*;
+import javax.xml.namespace.QName;
+import java.util.HashMap;
+import java.util.Map;
+
+
+/**
+ * <p>Java class for AttributedQNameType complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="AttributedQNameType">
+ * <simpleContent>
+ * <extension base="<http://www.w3.org/2001/XMLSchema>QName">
+ * </extension>
+ * </simpleContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "AttributedQNameType", namespace = "http://www.w3.org/2005/08/addressing", propOrder = {
+ "value"
+})
+public class AttributedQNameType {
+
+ @XmlValue
+ protected QName value;
+ @XmlAnyAttribute
+ private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+
+ /**
+ * Gets the value of the value property.
+ *
+ * @return
+ * possible object is
+ * {@link QName }
+ *
+ */
+ public QName getValue() {
+ return value;
+ }
+
+ /**
+ * Sets the value of the value property.
+ *
+ * @param value
+ * allowed object is
+ * {@link QName }
+ *
+ */
+ public void setValue(QName value) {
+ this.value = value;
+ }
+
+ /**
+ * Gets a map that contains attributes that aren't bound to any typed property on this class.
+ *
+ * <p>
+ * the map is keyed by the name of the attribute and
+ * the value is the string value of the attribute.
+ *
+ * the map returned by this method is live, and you can add new attribute
+ * by updating the map directly. Because of this design, there's no setter.
+ *
+ *
+ * @return
+ * always non-null
+ */
+ public Map<QName, String> getOtherAttributes() {
+ return otherAttributes;
+ }
+
+}
Added: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/AttributedURIType.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/AttributedURIType.java (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/AttributedURIType.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -0,0 +1,100 @@
+/*
+ * 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.extensions.eventing.jaxws;
+
+
+import javax.xml.bind.annotation.*;
+import javax.xml.namespace.QName;
+import java.util.HashMap;
+import java.util.Map;
+
+
+/**
+ * <p>Java class for AttributedURIType complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="AttributedURIType">
+ * <simpleContent>
+ * <extension base="<http://www.w3.org/2001/XMLSchema>anyURI">
+ * </extension>
+ * </simpleContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "AttributedURIType", namespace = "http://www.w3.org/2005/08/addressing", propOrder = {
+ "value"
+})
+public class AttributedURIType {
+
+ @XmlValue
+ protected String value;
+ @XmlAnyAttribute
+ private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+
+ /**
+ * Gets the value of the value property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getValue() {
+ return value;
+ }
+
+ /**
+ * Sets the value of the value property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+ /**
+ * Gets a map that contains attributes that aren't bound to any typed property on this class.
+ *
+ * <p>
+ * the map is keyed by the name of the attribute and
+ * the value is the string value of the attribute.
+ *
+ * the map returned by this method is live, and you can add new attribute
+ * by updating the map directly. Because of this design, there's no setter.
+ *
+ *
+ * @return
+ * always non-null
+ */
+ public Map<QName, String> getOtherAttributes() {
+ return otherAttributes;
+ }
+
+}
Added: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/AttributedUnsignedLongType.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/AttributedUnsignedLongType.java (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/AttributedUnsignedLongType.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -0,0 +1,101 @@
+/*
+ * 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.extensions.eventing.jaxws;
+
+
+import javax.xml.bind.annotation.*;
+import javax.xml.namespace.QName;
+import java.math.BigInteger;
+import java.util.HashMap;
+import java.util.Map;
+
+
+/**
+ * <p>Java class for AttributedUnsignedLongType complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="AttributedUnsignedLongType">
+ * <simpleContent>
+ * <extension base="<http://www.w3.org/2001/XMLSchema>unsignedLong">
+ * </extension>
+ * </simpleContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "AttributedUnsignedLongType", namespace = "http://www.w3.org/2005/08/addressing", propOrder = {
+ "value"
+})
+public class AttributedUnsignedLongType {
+
+ @XmlValue
+ protected BigInteger value;
+ @XmlAnyAttribute
+ private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+
+ /**
+ * Gets the value of the value property.
+ *
+ * @return
+ * possible object is
+ * {@link BigInteger }
+ *
+ */
+ public BigInteger getValue() {
+ return value;
+ }
+
+ /**
+ * Sets the value of the value property.
+ *
+ * @param value
+ * allowed object is
+ * {@link BigInteger }
+ *
+ */
+ public void setValue(BigInteger value) {
+ this.value = value;
+ }
+
+ /**
+ * Gets a map that contains attributes that aren't bound to any typed property on this class.
+ *
+ * <p>
+ * the map is keyed by the name of the attribute and
+ * the value is the string value of the attribute.
+ *
+ * the map returned by this method is live, and you can add new attribute
+ * by updating the map directly. Because of this design, there's no setter.
+ *
+ *
+ * @return
+ * always non-null
+ */
+ public Map<QName, String> getOtherAttributes() {
+ return otherAttributes;
+ }
+
+}
Added: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/DeliveryType.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/DeliveryType.java (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/DeliveryType.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -0,0 +1,160 @@
+/*
+ * 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.extensions.eventing.jaxws;
+
+import org.w3c.dom.Element;
+
+import javax.xml.bind.annotation.*;
+import javax.xml.bind.JAXBElement;
+import javax.xml.namespace.QName;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * <p>Java class for DeliveryType complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="DeliveryType">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <any/>
+ * </sequence>
+ * <attribute name="Mode" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "DeliveryType", propOrder = {
+ "content"
+})
+public class DeliveryType {
+
+ @XmlMixed
+ @XmlAnyElement(lax = true)
+ protected List<Object> content;
+ @XmlAttribute(name = "Mode")
+ protected String mode;
+ @XmlAnyAttribute
+ private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+
+ /**
+ * Gets the value of the content property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the content property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getContent().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link Element }
+ * {@link String }
+ * {@link Object }
+ *
+ *
+ */
+ public List<Object> getContent() {
+ if (content == null) {
+ content = new ArrayList<Object>();
+ }
+ return this.content;
+ }
+
+ /**
+ * Gets the value of the mode property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getMode() {
+ return mode;
+ }
+
+ /**
+ * Sets the value of the mode property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setMode(String value) {
+ this.mode = value;
+ }
+
+ /**
+ * Gets a map that contains attributes that aren't bound to any typed property on this class.
+ *
+ * <p>
+ * the map is keyed by the name of the attribute and
+ * the value is the string value of the attribute.
+ *
+ * the map returned by this method is live, and you can add new attribute
+ * by updating the map directly. Because of this design, there's no setter.
+ *
+ *
+ * @return
+ * always non-null
+ */
+ public Map<QName, String> getOtherAttributes() {
+ return otherAttributes;
+ }
+
+ public void setNotifyTo(EndpointReferenceType o)
+ {
+ getContent().add(
+ new JAXBElement(
+ new QName("http://schemas.xmlsoap.org/ws/2004/08/eventing", "NotifyTo"),
+ EndpointReferenceType.class, o
+ )
+ );
+ }
+
+ public EndpointReferenceType getNotifyTo()
+ {
+ if(getContent().isEmpty())
+ return null;
+
+ JAXBElement<EndpointReferenceType> jaxbElement = (JAXBElement<EndpointReferenceType>) this.content.get(0);
+ return jaxbElement.getValue();
+ }
+}
Added: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/EndpointReferenceType.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/EndpointReferenceType.java (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/EndpointReferenceType.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -0,0 +1,196 @@
+/*
+ * 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.extensions.eventing.jaxws;
+
+import org.w3c.dom.Element;
+
+import javax.xml.bind.annotation.*;
+import javax.xml.namespace.QName;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * <p>Java class for EndpointReferenceType complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="EndpointReferenceType">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="Address" type="{http://www.w3.org/2005/08/addressing}AttributedURIType"/>
+ * <element name="ReferenceParameters" type="{http://www.w3.org/2005/08/addressing}ReferenceParametersType" minOccurs="0"/>
+ * <element ref="{http://www.w3.org/2005/08/addressing}Metadata" minOccurs="0"/>
+ * <any/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "EndpointReferenceType", namespace = "http://www.w3.org/2005/08/addressing", propOrder = {
+ "address",
+ "referenceParameters",
+ "metadata",
+ "any"
+})
+public class EndpointReferenceType {
+
+ @XmlElement(name = "Address", namespace = "http://www.w3.org/2005/08/addressing")
+ protected AttributedURIType address;
+ @XmlElement(name = "ReferenceParameters", namespace = "http://www.w3.org/2005/08/addressing")
+ protected ReferenceParametersType referenceParameters;
+ @XmlElement(name = "Metadata", namespace = "http://www.w3.org/2005/08/addressing")
+ protected MetadataType metadata;
+ @XmlAnyElement(lax = true)
+ protected List<Object> any;
+ @XmlAnyAttribute
+ private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+
+ /**
+ * Gets the value of the address property.
+ *
+ * @return
+ * possible object is
+ * {@link AttributedURIType }
+ *
+ */
+ public AttributedURIType getAddress() {
+ return address;
+ }
+
+ /**
+ * Sets the value of the address property.
+ *
+ * @param value
+ * allowed object is
+ * {@link AttributedURIType }
+ *
+ */
+ public void setAddress(AttributedURIType value) {
+ this.address = value;
+ }
+
+ /**
+ * Gets the value of the referenceParameters property.
+ *
+ * @return
+ * possible object is
+ * {@link ReferenceParametersType }
+ *
+ */
+ public ReferenceParametersType getReferenceParameters() {
+ return referenceParameters;
+ }
+
+ /**
+ * Sets the value of the referenceParameters property.
+ *
+ * @param value
+ * allowed object is
+ * {@link ReferenceParametersType }
+ *
+ */
+ public void setReferenceParameters(ReferenceParametersType value) {
+ this.referenceParameters = value;
+ }
+
+ /**
+ * Gets the value of the metadata property.
+ *
+ * @return
+ * possible object is
+ * {@link MetadataType }
+ *
+ */
+ public MetadataType getMetadata() {
+ return metadata;
+ }
+
+ /**
+ * Sets the value of the metadata property.
+ *
+ * @param value
+ * allowed object is
+ * {@link MetadataType }
+ *
+ */
+ public void setMetadata(MetadataType value) {
+ this.metadata = value;
+ }
+
+ /**
+ * Gets the value of the any property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the any property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getAny().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link Element }
+ * {@link Object }
+ *
+ *
+ */
+ public List<Object> getAny() {
+ if (any == null) {
+ any = new ArrayList<Object>();
+ }
+ return this.any;
+ }
+
+ /**
+ * Gets a map that contains attributes that aren't bound to any typed property on this class.
+ *
+ * <p>
+ * the map is keyed by the name of the attribute and
+ * the value is the string value of the attribute.
+ *
+ * the map returned by this method is live, and you can add new attribute
+ * by updating the map directly. Because of this design, there's no setter.
+ *
+ *
+ * @return
+ * always non-null
+ */
+ public Map<QName, String> getOtherAttributes() {
+ return otherAttributes;
+ }
+
+}
Added: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/EventSourceEndpoint.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/EventSourceEndpoint.java (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/EventSourceEndpoint.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -0,0 +1,60 @@
+/*
+ * 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.extensions.eventing.jaxws;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import javax.jws.soap.SOAPBinding.ParameterStyle;
+import javax.xml.ws.addressing.Action;
+
+
+/**
+ * This class was generated by the JAXWS SI.
+ * JAX-WS RI 2.0-b26-ea3
+ * Generated source version: 2.0
+ *
+ */
+@WebService(name = "EventSource", targetNamespace = "http://schemas.xmlsoap.org/ws/2004/08/eventing")
+@SOAPBinding(parameterStyle = ParameterStyle.WRAPPED)
+public interface EventSourceEndpoint {
+
+
+ /**
+ *
+ * @param body
+ * @return
+ * returns org.jboss.ws.extensions.eventing.jaxws.SubscribeResponse
+ */
+ @WebMethod(operationName = "SubscribeOp")
+ @WebResult(name = "SubscribeResponse", targetNamespace = "http://schemas.xmlsoap.org/ws/2004/08/eventing", partName = "body")
+ @Action(
+ input = "http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe",
+ output = "http://schemas.xmlsoap.org/ws/2004/08/eventing/SubscribeResponse"
+ )
+ public SubscribeResponse subscribeOp(
+ @WebParam(name = "Subscribe", targetNamespace = "http://schemas.xmlsoap.org/ws/2004/08/eventing", partName = "body")
+ Subscribe body);
+
+}
Added: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/EventSourceEndpointImpl.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/EventSourceEndpointImpl.java (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/EventSourceEndpointImpl.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -0,0 +1,126 @@
+/*
+ * 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.extensions.eventing.jaxws;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.WSException;
+import org.jboss.ws.annotation.EndpointConfig;
+import org.jboss.ws.extensions.eventing.EventingConstants;
+import org.jboss.ws.extensions.eventing.common.EventingEndpointBase;
+import org.jboss.ws.extensions.eventing.mgmt.Filter;
+import org.jboss.ws.extensions.eventing.mgmt.SubscriptionError;
+import org.jboss.ws.extensions.eventing.mgmt.SubscriptionManagerMBean;
+import org.jboss.ws.extensions.eventing.mgmt.SubscriptionTicket;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.xml.rpc.soap.SOAPFaultException;
+import javax.xml.ws.addressing.AddressingProperties;
+import javax.xml.ws.addressing.AttributedURI;
+import javax.xml.ws.addressing.Action;
+import java.net.URI;
+import java.net.URISyntaxException;
+
+/**
+ * @author Heiko.Braun(a)jboss.org
+ * @version $Id$
+ * @since 16.01.2007
+ */
+@WebService(
+ name = "EventSource",
+ portName = "EventSourcePort",
+ targetNamespace = "http://schemas.xmlsoap.org/ws/2004/08/eventing",
+ wsdlLocation = "/WEB-INF/wsdl/wind.wsdl")
+@EndpointConfig(configName = "Standard WSAddressing Endpoint")
+public class EventSourceEndpointImpl extends EventingEndpointBase implements EventSourceEndpoint {
+
+ private static Logger log = Logger.getLogger(EventSourceEndpointImpl.class);
+
+ @WebMethod(operationName = "SubscribeOp")
+ @WebResult(name = "SubscribeResponse", targetNamespace = "http://schemas.xmlsoap.org/ws/2004/08/eventing", partName = "body")
+ @Action(
+ input = "http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe",
+ output = "http://schemas.xmlsoap.org/ws/2004/08/eventing/SubscribeResponse"
+ )
+ public SubscribeResponse subscribeOp(@WebParam(name = "Subscribe", targetNamespace = "http://schemas.xmlsoap.org/ws/2004/08/eventing", partName = "body") Subscribe request) {
+ try
+ {
+ // retrieve addressing headers
+ AddressingProperties inProps = getAddrProperties();
+ AttributedURI eventSourceURI = inProps.getTo();
+ log.debug("Subscribe request for event source: " + eventSourceURI.getURI());
+
+ assertSubscriberEndpoints(request);
+ EndpointReferenceType notifyTo = request.getDelivery().getNotifyTo();
+ EndpointReferenceType endTo = request.getEndTo();
+
+ // adapt filter elements
+ Filter filter = null;
+ if (request.getFilter() != null)
+ {
+ try {
+ filter = new Filter(
+ new URI(request.getFilter().getDialect()),
+ (String)request.getFilter().getContent().get(0));
+ } catch (URISyntaxException e) {
+ throw new WSException(e);
+ }
+ }
+
+ // invoke subscription manager
+ SubscriptionManagerMBean subscriptionManager = getSubscriptionManager();
+ SubscriptionTicket ticket = subscriptionManager.subscribe(
+ eventSourceURI.getURI(),
+ notifyTo, endTo,
+ request.getExpires(),
+ filter
+ );
+
+ // create the response element
+ SubscribeResponse res = new SubscribeResponse();
+ res.setExpires(ticket.getExpires());
+ res.setSubscriptionManager(ticket.getSubscriptionManager());
+
+ return res;
+
+ }
+ catch (SubscriptionError e)
+ {
+ throw new SOAPFaultException(buildFaultQName(e.getSubcode()), e.getReason(), null, null);
+ }
+ }
+
+ /**
+ * Ensure that the subscriber endpoint information is supplied in request.
+ * Namely NotifyTo and EndTo need to be set.
+ * @param request
+ */
+ private void assertSubscriberEndpoints(Subscribe request) {
+ if(null == request.getDelivery().getNotifyTo() || null == request.getEndTo() )
+ throw new SOAPFaultException( buildFaultQName(EventingConstants.CODE_INVALID_MESSAGE) ,
+ "Subcriber endpoint information missing from request",
+ null, null
+ );
+ }
+}
Added: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/EventingService.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/EventingService.java (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/EventingService.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -0,0 +1,86 @@
+/*
+ * 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.extensions.eventing.jaxws;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebEndpoint;
+import javax.xml.ws.WebServiceClient;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+
+/**
+ * This class was generated by the JAXWS SI.
+ * JAX-WS RI 2.0-b26-ea3
+ * Generated source version: 2.0
+ *
+ */
+@WebServiceClient(name = "EventingService", targetNamespace = "http://schemas.xmlsoap.org/ws/2004/08/eventing", wsdlLocation = "wind.wsdl")
+public class EventingService
+ extends Service
+{
+
+ private final static URL WSDL_LOCATION;
+ private final static QName EVENTINGSERVICE = new QName("http://schemas.xmlsoap.org/ws/2004/08/eventing", "EventingService");
+ private final static QName EVENTSOURCEPORT = new QName("http://schemas.xmlsoap.org/ws/2004/08/eventing", "EventSourcePort");
+ private final static QName SUBSCRIPTIONMANAGERPORT = new QName("http://schemas.xmlsoap.org/ws/2004/08/eventing", "SubscriptionManagerPort");
+
+ static {
+ URL url = null;
+ try {
+ url = new URL("file:/home/hbraun/dev/prj/jbossws/trunk/jbossws-tests/src/main/resources/jaxws/wseventing/WEB-INF/wsdl/wind.wsdl");
+ } catch (MalformedURLException e) {
+ e.printStackTrace();
+ }
+ WSDL_LOCATION = url;
+ }
+
+ public EventingService(URL wsdlLocation, QName serviceName) {
+ super(wsdlLocation, serviceName);
+ }
+
+ public EventingService() {
+ super(WSDL_LOCATION, EVENTINGSERVICE);
+ }
+
+ /**
+ *
+ * @return
+ * returns EventSource
+ */
+ @WebEndpoint(name = "EventSourcePort")
+ public EventSourceEndpoint getEventSourcePort() {
+ return (EventSourceEndpoint)super.getPort(EVENTSOURCEPORT, EventSourceEndpoint.class);
+ }
+
+ /**
+ *
+ * @return
+ * returns SubscriptionManagerEndpoint
+ */
+ @WebEndpoint(name = "SubscriptionManagerPort")
+ public SubscriptionManagerEndpoint getSubscriptionManagerPort() {
+ return (SubscriptionManagerEndpoint)super.getPort(SUBSCRIPTIONMANAGERPORT, SubscriptionManagerEndpoint.class);
+ }
+
+}
Added: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/FilterType.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/FilterType.java (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/FilterType.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -0,0 +1,141 @@
+/*
+ * 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.extensions.eventing.jaxws;
+
+import org.w3c.dom.Element;
+
+import javax.xml.bind.annotation.*;
+import javax.xml.namespace.QName;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * <p>Java class for FilterType complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="FilterType">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <any/>
+ * </sequence>
+ * <attribute name="Dialect" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "FilterType", propOrder = {
+ "content"
+})
+public class FilterType {
+
+ @XmlMixed
+ @XmlAnyElement(lax = true)
+ protected List<Object> content;
+ @XmlAttribute(name = "Dialect")
+ protected String dialect;
+ @XmlAnyAttribute
+ private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+
+ /**
+ * Gets the value of the content property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the content property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getContent().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link Element }
+ * {@link String }
+ * {@link Object }
+ *
+ *
+ */
+ public List<Object> getContent() {
+ if (content == null) {
+ content = new ArrayList<Object>();
+ }
+ return this.content;
+ }
+
+ /**
+ * Gets the value of the dialect property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getDialect() {
+ return dialect;
+ }
+
+ /**
+ * Sets the value of the dialect property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setDialect(String value) {
+ this.dialect = value;
+ }
+
+ /**
+ * Gets a map that contains attributes that aren't bound to any typed property on this class.
+ *
+ * <p>
+ * the map is keyed by the name of the attribute and
+ * the value is the string value of the attribute.
+ *
+ * the map returned by this method is live, and you can add new attribute
+ * by updating the map directly. Because of this design, there's no setter.
+ *
+ *
+ * @return
+ * always non-null
+ */
+ public Map<QName, String> getOtherAttributes() {
+ return otherAttributes;
+ }
+
+}
Added: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/GetStatus.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/GetStatus.java (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/GetStatus.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -0,0 +1,115 @@
+/*
+ * 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.extensions.eventing.jaxws;
+
+import org.w3c.dom.Element;
+
+import javax.xml.bind.annotation.*;
+import javax.xml.namespace.QName;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * <p>Java class for GetStatus element declaration.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <element name="GetStatus">
+ * <complexType>
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <any/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </element>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "any"
+})
+@XmlRootElement(name = "GetStatus")
+public class GetStatus {
+
+ @XmlAnyElement(lax = true)
+ protected List<Object> any;
+ @XmlAnyAttribute
+ private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+
+ /**
+ * Gets the value of the any property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the any property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getAny().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link Element }
+ * {@link Object }
+ *
+ *
+ */
+ public List<Object> getAny() {
+ if (any == null) {
+ any = new ArrayList<Object>();
+ }
+ return this.any;
+ }
+
+ /**
+ * Gets a map that contains attributes that aren't bound to any typed property on this class.
+ *
+ * <p>
+ * the map is keyed by the name of the attribute and
+ * the value is the string value of the attribute.
+ *
+ * the map returned by this method is live, and you can add new attribute
+ * by updating the map directly. Because of this design, there's no setter.
+ *
+ *
+ * @return
+ * always non-null
+ */
+ public Map<QName, String> getOtherAttributes() {
+ return otherAttributes;
+ }
+
+}
Added: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/GetStatusResponse.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/GetStatusResponse.java (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/GetStatusResponse.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -0,0 +1,121 @@
+
+package org.jboss.ws.extensions.eventing.jaxws;
+
+
+import org.w3c.dom.Element;
+
+import javax.xml.bind.annotation.*;
+import javax.xml.namespace.QName;
+import java.util.*;
+
+
+/**
+ * <p>Java class for GetStatusResponse element declaration.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <element name="GetStatusResponse">
+ * <complexType>
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="Expires" type="{http://schemas.xmlsoap.org/ws/2004/08/eventing}ExpirationType" minOccurs="0"/>
+ * <any/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </element>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "expires",
+ "any"
+})
+@XmlRootElement(name = "GetStatusResponse")
+public class GetStatusResponse {
+
+ @XmlElement(name = "Expires", namespace = "http://schemas.xmlsoap.org/ws/2004/08/eventing")
+ protected Date expires;
+ @XmlAnyElement(lax = true)
+ protected List<Object> any;
+ @XmlAnyAttribute
+ private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+
+ /**
+ * Gets the value of the expires property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public Date getExpires() {
+ return expires;
+ }
+
+ /**
+ * Sets the value of the expires property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setExpires(Date value) {
+ this.expires = value;
+ }
+
+ /**
+ * Gets the value of the any property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the any property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getAny().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link Element }
+ * {@link Object }
+ *
+ *
+ */
+ public List<Object> getAny() {
+ if (any == null) {
+ any = new ArrayList<Object>();
+ }
+ return this.any;
+ }
+
+ /**
+ * Gets a map that contains attributes that aren't bound to any typed property on this class.
+ *
+ * <p>
+ * the map is keyed by the name of the attribute and
+ * the value is the string value of the attribute.
+ *
+ * the map returned by this method is live, and you can add new attribute
+ * by updating the map directly. Because of this design, there's no setter.
+ *
+ *
+ * @return
+ * always non-null
+ */
+ public Map<QName, String> getOtherAttributes() {
+ return otherAttributes;
+ }
+
+}
Added: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/LanguageSpecificStringType.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/LanguageSpecificStringType.java (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/LanguageSpecificStringType.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -0,0 +1,126 @@
+/*
+ * 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.extensions.eventing.jaxws;
+
+import javax.xml.bind.annotation.*;
+import javax.xml.namespace.QName;
+import java.util.HashMap;
+import java.util.Map;
+
+
+/**
+ * <p>Java class for LanguageSpecificStringType complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="LanguageSpecificStringType">
+ * <simpleContent>
+ * <extension base="<http://www.w3.org/2001/XMLSchema>string">
+ * <attribute ref="{http://www.w3.org/XML/1998/namespace}lang"/>
+ * </extension>
+ * </simpleContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "LanguageSpecificStringType", propOrder = {
+ "value"
+})
+public class LanguageSpecificStringType {
+
+ @XmlValue
+ protected String value;
+ @XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace")
+ protected String lang;
+ @XmlAnyAttribute
+ private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+
+ /**
+ * Gets the value of the value property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getValue() {
+ return value;
+ }
+
+ /**
+ * Sets the value of the value property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+ /**
+ * Gets the value of the lang property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getLang() {
+ return lang;
+ }
+
+ /**
+ * Sets the value of the lang property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setLang(String value) {
+ this.lang = value;
+ }
+
+ /**
+ * Gets a map that contains attributes that aren't bound to any typed property on this class.
+ *
+ * <p>
+ * the map is keyed by the name of the attribute and
+ * the value is the string value of the attribute.
+ *
+ * the map returned by this method is live, and you can add new attribute
+ * by updating the map directly. Because of this design, there's no setter.
+ *
+ *
+ * @return
+ * always non-null
+ */
+ public Map<QName, String> getOtherAttributes() {
+ return otherAttributes;
+ }
+
+}
Added: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/MetadataType.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/MetadataType.java (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/MetadataType.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -0,0 +1,93 @@
+
+package org.jboss.ws.extensions.eventing.jaxws;
+
+
+import org.w3c.dom.Element;
+
+import javax.xml.bind.annotation.*;
+import javax.xml.namespace.QName;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * <p>Java class for MetadataType complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="MetadataType">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <any/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "MetadataType", namespace = "http://www.w3.org/2005/08/addressing", propOrder = {
+ "any"
+})
+public class MetadataType {
+
+ @XmlAnyElement(lax = true)
+ protected List<Object> any;
+ @XmlAnyAttribute
+ private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+
+ /**
+ * Gets the value of the any property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the any property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getAny().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link Element }
+ * {@link Object }
+ *
+ *
+ */
+ public List<Object> getAny() {
+ if (any == null) {
+ any = new ArrayList<Object>();
+ }
+ return this.any;
+ }
+
+ /**
+ * Gets a map that contains attributes that aren't bound to any typed property on this class.
+ *
+ * <p>
+ * the map is keyed by the name of the attribute and
+ * the value is the string value of the attribute.
+ *
+ * the map returned by this method is live, and you can add new attribute
+ * by updating the map directly. Because of this design, there's no setter.
+ *
+ *
+ * @return
+ * always non-null
+ */
+ public Map<QName, String> getOtherAttributes() {
+ return otherAttributes;
+ }
+
+}
Added: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/ObjectFactory.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/ObjectFactory.java (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/ObjectFactory.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -0,0 +1,395 @@
+/*
+ * 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.extensions.eventing.jaxws;
+
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.annotation.XmlElementDecl;
+import javax.xml.bind.annotation.XmlRegistry;
+import javax.xml.namespace.QName;
+
+
+/**
+ * This object contains factory methods for each
+ * Java content interface and Java element interface
+ * generated in the org.jboss.ws.extensions.eventing package.
+ * <p>An ObjectFactory allows you to programatically
+ * construct new instances of the Java representation
+ * for XML content. The Java representation of XML
+ * content can consist of schema derived interfaces
+ * and classes representing the binding of schema
+ * type definitions, element declarations and model
+ * groups. Factory methods for each of these are
+ * provided in this class.
+ *
+ */
+@XmlRegistry
+public class ObjectFactory {
+
+ private final static QName _Metadata_QNAME = new QName("http://www.w3.org/2005/08/addressing", "Metadata");
+ private final static QName _ProblemHeader_QNAME = new QName("http://www.w3.org/2005/08/addressing", "ProblemHeader");
+ private final static QName _EndpointReference_QNAME = new QName("http://www.w3.org/2005/08/addressing", "EndpointReference");
+ private final static QName _ProblemIRI_QNAME = new QName("http://www.w3.org/2005/08/addressing", "ProblemIRI");
+ private final static QName _FaultTo_QNAME = new QName("http://www.w3.org/2005/08/addressing", "FaultTo");
+ private final static QName _Identifier_QNAME = new QName("http://schemas.xmlsoap.org/ws/2004/08/eventing", "Identifier");
+ private final static QName _SupportedDialect_QNAME = new QName("http://schemas.xmlsoap.org/ws/2004/08/eventing", "SupportedDialect");
+ private final static QName _MessageID_QNAME = new QName("http://www.w3.org/2005/08/addressing", "MessageID");
+ private final static QName _RetryAfter_QNAME = new QName("http://www.w3.org/2005/08/addressing", "RetryAfter");
+ private final static QName _RelatesTo_QNAME = new QName("http://www.w3.org/2005/08/addressing", "RelatesTo");
+ private final static QName _ReplyTo_QNAME = new QName("http://www.w3.org/2005/08/addressing", "ReplyTo");
+ private final static QName _SupportedDeliveryMode_QNAME = new QName("http://schemas.xmlsoap.org/ws/2004/08/eventing", "SupportedDeliveryMode");
+ private final static QName _Action_QNAME = new QName("http://www.w3.org/2005/08/addressing", "Action");
+ private final static QName _ProblemHeaderQName_QNAME = new QName("http://www.w3.org/2005/08/addressing", "ProblemHeaderQName");
+ private final static QName _To_QNAME = new QName("http://www.w3.org/2005/08/addressing", "To");
+ private final static QName _NotifyTo_QNAME = new QName("http://schemas.xmlsoap.org/ws/2004/08/eventing", "NotifyTo");
+ private final static QName _ProblemAction_QNAME = new QName("http://www.w3.org/2005/08/addressing", "ProblemAction");
+ private final static QName _From_QNAME = new QName("http://www.w3.org/2005/08/addressing", "From");
+
+ /**
+ * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.jboss.ws.extensions.eventing
+ *
+ */
+ public ObjectFactory() {
+ }
+
+ /**
+ * Create an instance of {@link ReferenceParametersType }
+ *
+ */
+ public ReferenceParametersType createReferenceParametersType() {
+ return new ReferenceParametersType();
+ }
+
+ /**
+ * Create an instance of {@link AttributedURIType }
+ *
+ */
+ public AttributedURIType createAttributedURIType() {
+ return new AttributedURIType();
+ }
+
+ /**
+ * Create an instance of {@link SubscribeResponse }
+ *
+ */
+ public SubscribeResponse createSubscribeResponse() {
+ return new SubscribeResponse();
+ }
+
+ /**
+ * Create an instance of {@link SubscriptionEnd }
+ *
+ */
+ public SubscriptionEnd createSubscriptionEnd() {
+ return new SubscriptionEnd();
+ }
+
+ /**
+ * Create an instance of {@link RelatesToType }
+ *
+ */
+ public RelatesToType createRelatesToType() {
+ return new RelatesToType();
+ }
+
+ /**
+ * Create an instance of {@link ProblemActionType }
+ *
+ */
+ public ProblemActionType createProblemActionType() {
+ return new ProblemActionType();
+ }
+
+ /**
+ * Create an instance of {@link Renew }
+ *
+ */
+ public Renew createRenew() {
+ return new Renew();
+ }
+
+ /**
+ * Create an instance of {@link LanguageSpecificStringType }
+ *
+ */
+ public LanguageSpecificStringType createLanguageSpecificStringType() {
+ return new LanguageSpecificStringType();
+ }
+
+ /**
+ * Create an instance of {@link GetStatus }
+ *
+ */
+ public GetStatus createGetStatus() {
+ return new GetStatus();
+ }
+
+ /**
+ * Create an instance of {@link AttributedUnsignedLongType }
+ *
+ */
+ public AttributedUnsignedLongType createAttributedUnsignedLongType() {
+ return new AttributedUnsignedLongType();
+ }
+
+ /**
+ * Create an instance of {@link AttributedAnyType }
+ *
+ */
+ public AttributedAnyType createAttributedAnyType() {
+ return new AttributedAnyType();
+ }
+
+ /**
+ * Create an instance of {@link Subscribe }
+ *
+ */
+ public Subscribe createSubscribe() {
+ return new Subscribe();
+ }
+
+ /**
+ * Create an instance of {@link EndpointReferenceType }
+ *
+ */
+ public EndpointReferenceType createEndpointReferenceType() {
+ return new EndpointReferenceType();
+ }
+
+ /**
+ * Create an instance of {@link FilterType }
+ *
+ */
+ public FilterType createFilterType() {
+ return new FilterType();
+ }
+
+ /**
+ * Create an instance of {@link MetadataType }
+ *
+ */
+ public MetadataType createMetadataType() {
+ return new MetadataType();
+ }
+
+ /**
+ * Create an instance of {@link AttributedQNameType }
+ *
+ */
+ public AttributedQNameType createAttributedQNameType() {
+ return new AttributedQNameType();
+ }
+
+ /**
+ * Create an instance of {@link DeliveryType }
+ *
+ */
+ public DeliveryType createDeliveryType() {
+ return new DeliveryType();
+ }
+
+ /**
+ * Create an instance of {@link RenewResponse }
+ *
+ */
+ public RenewResponse createRenewResponse() {
+ return new RenewResponse();
+ }
+
+ /**
+ * Create an instance of {@link Unsubscribe }
+ *
+ */
+ public Unsubscribe createUnsubscribe() {
+ return new Unsubscribe();
+ }
+
+ /**
+ * Create an instance of {@link GetStatusResponse }
+ *
+ */
+ public GetStatusResponse createGetStatusResponse() {
+ return new GetStatusResponse();
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link MetadataType }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://www.w3.org/2005/08/addressing", name = "Metadata")
+ public JAXBElement<MetadataType> createMetadata(MetadataType value) {
+ return new JAXBElement<MetadataType>(_Metadata_QNAME, MetadataType.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link AttributedAnyType }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://www.w3.org/2005/08/addressing", name = "ProblemHeader")
+ public JAXBElement<AttributedAnyType> createProblemHeader(AttributedAnyType value) {
+ return new JAXBElement<AttributedAnyType>(_ProblemHeader_QNAME, AttributedAnyType.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link EndpointReferenceType }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://www.w3.org/2005/08/addressing", name = "EndpointReference")
+ public JAXBElement<EndpointReferenceType> createEndpointReference(EndpointReferenceType value) {
+ return new JAXBElement<EndpointReferenceType>(_EndpointReference_QNAME, EndpointReferenceType.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link AttributedURIType }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://www.w3.org/2005/08/addressing", name = "ProblemIRI")
+ public JAXBElement<AttributedURIType> createProblemIRI(AttributedURIType value) {
+ return new JAXBElement<AttributedURIType>(_ProblemIRI_QNAME, AttributedURIType.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link EndpointReferenceType }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://www.w3.org/2005/08/addressing", name = "FaultTo")
+ public JAXBElement<EndpointReferenceType> createFaultTo(EndpointReferenceType value) {
+ return new JAXBElement<EndpointReferenceType>(_FaultTo_QNAME, EndpointReferenceType.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://schemas.xmlsoap.org/ws/2004/08/eventing", name = "Identifier")
+ public JAXBElement<String> createIdentifier(String value) {
+ return new JAXBElement<String>(_Identifier_QNAME, String.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://schemas.xmlsoap.org/ws/2004/08/eventing", name = "SupportedDialect")
+ public JAXBElement<String> createSupportedDialect(String value) {
+ return new JAXBElement<String>(_SupportedDialect_QNAME, String.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link AttributedURIType }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://www.w3.org/2005/08/addressing", name = "MessageID")
+ public JAXBElement<AttributedURIType> createMessageID(AttributedURIType value) {
+ return new JAXBElement<AttributedURIType>(_MessageID_QNAME, AttributedURIType.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link AttributedUnsignedLongType }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://www.w3.org/2005/08/addressing", name = "RetryAfter")
+ public JAXBElement<AttributedUnsignedLongType> createRetryAfter(AttributedUnsignedLongType value) {
+ return new JAXBElement<AttributedUnsignedLongType>(_RetryAfter_QNAME, AttributedUnsignedLongType.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link RelatesToType }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://www.w3.org/2005/08/addressing", name = "RelatesTo")
+ public JAXBElement<RelatesToType> createRelatesTo(RelatesToType value) {
+ return new JAXBElement<RelatesToType>(_RelatesTo_QNAME, RelatesToType.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link EndpointReferenceType }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://www.w3.org/2005/08/addressing", name = "ReplyTo")
+ public JAXBElement<EndpointReferenceType> createReplyTo(EndpointReferenceType value) {
+ return new JAXBElement<EndpointReferenceType>(_ReplyTo_QNAME, EndpointReferenceType.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://schemas.xmlsoap.org/ws/2004/08/eventing", name = "SupportedDeliveryMode")
+ public JAXBElement<String> createSupportedDeliveryMode(String value) {
+ return new JAXBElement<String>(_SupportedDeliveryMode_QNAME, String.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link AttributedURIType }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://www.w3.org/2005/08/addressing", name = "Action")
+ public JAXBElement<AttributedURIType> createAction(AttributedURIType value) {
+ return new JAXBElement<AttributedURIType>(_Action_QNAME, AttributedURIType.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link AttributedQNameType }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://www.w3.org/2005/08/addressing", name = "ProblemHeaderQName")
+ public JAXBElement<AttributedQNameType> createProblemHeaderQName(AttributedQNameType value) {
+ return new JAXBElement<AttributedQNameType>(_ProblemHeaderQName_QNAME, AttributedQNameType.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link AttributedURIType }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://www.w3.org/2005/08/addressing", name = "To")
+ public JAXBElement<AttributedURIType> createTo(AttributedURIType value) {
+ return new JAXBElement<AttributedURIType>(_To_QNAME, AttributedURIType.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link EndpointReferenceType }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://schemas.xmlsoap.org/ws/2004/08/eventing", name = "NotifyTo")
+ public JAXBElement<EndpointReferenceType> createNotifyTo(EndpointReferenceType value) {
+ return new JAXBElement<EndpointReferenceType>(_NotifyTo_QNAME, EndpointReferenceType.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link ProblemActionType }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://www.w3.org/2005/08/addressing", name = "ProblemAction")
+ public JAXBElement<ProblemActionType> createProblemAction(ProblemActionType value) {
+ return new JAXBElement<ProblemActionType>(_ProblemAction_QNAME, ProblemActionType.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link EndpointReferenceType }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://www.w3.org/2005/08/addressing", name = "From")
+ public JAXBElement<EndpointReferenceType> createFrom(EndpointReferenceType value) {
+ return new JAXBElement<EndpointReferenceType>(_From_QNAME, EndpointReferenceType.class, null, value);
+ }
+
+}
Added: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/ProblemActionType.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/ProblemActionType.java (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/ProblemActionType.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -0,0 +1,130 @@
+/*
+ * 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.extensions.eventing.jaxws;
+
+import javax.xml.bind.annotation.*;
+import javax.xml.namespace.QName;
+import java.util.HashMap;
+import java.util.Map;
+
+
+/**
+ * <p>Java class for ProblemActionType complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="ProblemActionType">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element ref="{http://www.w3.org/2005/08/addressing}Action" minOccurs="0"/>
+ * <element name="SoapAction" type="{http://www.w3.org/2001/XMLSchema}anyURI" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "ProblemActionType", namespace = "http://www.w3.org/2005/08/addressing", propOrder = {
+ "action",
+ "soapAction"
+})
+public class ProblemActionType {
+
+ @XmlElement(name = "Action", namespace = "http://www.w3.org/2005/08/addressing")
+ protected AttributedURIType action;
+ @XmlElement(name = "SoapAction", namespace = "http://www.w3.org/2005/08/addressing")
+ protected String soapAction;
+ @XmlAnyAttribute
+ private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+
+ /**
+ * Gets the value of the action property.
+ *
+ * @return
+ * possible object is
+ * {@link AttributedURIType }
+ *
+ */
+ public AttributedURIType getAction() {
+ return action;
+ }
+
+ /**
+ * Sets the value of the action property.
+ *
+ * @param value
+ * allowed object is
+ * {@link AttributedURIType }
+ *
+ */
+ public void setAction(AttributedURIType value) {
+ this.action = value;
+ }
+
+ /**
+ * Gets the value of the soapAction property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getSoapAction() {
+ return soapAction;
+ }
+
+ /**
+ * Sets the value of the soapAction property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setSoapAction(String value) {
+ this.soapAction = value;
+ }
+
+ /**
+ * Gets a map that contains attributes that aren't bound to any typed property on this class.
+ *
+ * <p>
+ * the map is keyed by the name of the attribute and
+ * the value is the string value of the attribute.
+ *
+ * the map returned by this method is live, and you can add new attribute
+ * by updating the map directly. Because of this design, there's no setter.
+ *
+ *
+ * @return
+ * always non-null
+ */
+ public Map<QName, String> getOtherAttributes() {
+ return otherAttributes;
+ }
+
+}
Added: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/ReferenceParametersType.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/ReferenceParametersType.java (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/ReferenceParametersType.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -0,0 +1,132 @@
+/*
+ * 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.extensions.eventing.jaxws;
+/*
+ * 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.
+ */
+import org.w3c.dom.Element;
+
+import javax.xml.bind.annotation.*;
+import javax.xml.namespace.QName;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * <p>Java class for ReferenceParametersType complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="ReferenceParametersType">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <any/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "ReferenceParametersType", namespace = "http://www.w3.org/2005/08/addressing", propOrder = {
+ "any"
+})
+public class ReferenceParametersType {
+
+ @XmlAnyElement(lax = true)
+ protected List<Object> any;
+ @XmlAnyAttribute
+ private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+
+ /**
+ * Gets the value of the any property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the any property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getAny().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link Element }
+ * {@link Object }
+ *
+ *
+ */
+ public List<Object> getAny() {
+ if (any == null) {
+ any = new ArrayList<Object>();
+ }
+ return this.any;
+ }
+
+ /**
+ * Gets a map that contains attributes that aren't bound to any typed property on this class.
+ *
+ * <p>
+ * the map is keyed by the name of the attribute and
+ * the value is the string value of the attribute.
+ *
+ * the map returned by this method is live, and you can add new attribute
+ * by updating the map directly. Because of this design, there's no setter.
+ *
+ *
+ * @return
+ * always non-null
+ */
+ public Map<QName, String> getOtherAttributes() {
+ return otherAttributes;
+ }
+
+}
Added: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/RelatesToType.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/RelatesToType.java (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/RelatesToType.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -0,0 +1,130 @@
+/*
+ * 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.extensions.eventing.jaxws;
+
+import javax.xml.bind.annotation.*;
+import javax.xml.namespace.QName;
+import java.util.HashMap;
+import java.util.Map;
+
+
+/**
+ * <p>Java class for RelatesToType complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="RelatesToType">
+ * <simpleContent>
+ * <extension base="<http://www.w3.org/2001/XMLSchema>anyURI">
+ * <attribute name="RelationshipType" type="{http://www.w3.org/2005/08/addressing}RelationshipTypeOpenEnum" default="http://www.w3.org/2005/08/addressing/reply" />
+ * </extension>
+ * </simpleContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "RelatesToType", namespace = "http://www.w3.org/2005/08/addressing", propOrder = {
+ "value"
+})
+public class RelatesToType {
+
+ @XmlValue
+ protected String value;
+ @XmlAttribute(name = "RelationshipType")
+ protected String relationshipType;
+ @XmlAnyAttribute
+ private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+
+ /**
+ * Gets the value of the value property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getValue() {
+ return value;
+ }
+
+ /**
+ * Sets the value of the value property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+ /**
+ * Gets the value of the relationshipType property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getRelationshipType() {
+ if (relationshipType == null) {
+ return "http://www.w3.org/2005/08/addressing/reply";
+ } else {
+ return relationshipType;
+ }
+ }
+
+ /**
+ * Sets the value of the relationshipType property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setRelationshipType(String value) {
+ this.relationshipType = value;
+ }
+
+ /**
+ * Gets a map that contains attributes that aren't bound to any typed property on this class.
+ *
+ * <p>
+ * the map is keyed by the name of the attribute and
+ * the value is the string value of the attribute.
+ *
+ * the map returned by this method is live, and you can add new attribute
+ * by updating the map directly. Because of this design, there's no setter.
+ *
+ *
+ * @return
+ * always non-null
+ */
+ public Map<QName, String> getOtherAttributes() {
+ return otherAttributes;
+ }
+
+}
Added: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/Renew.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/Renew.java (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/Renew.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -0,0 +1,121 @@
+
+package org.jboss.ws.extensions.eventing.jaxws;
+
+
+import org.w3c.dom.Element;
+
+import javax.xml.bind.annotation.*;
+import javax.xml.namespace.QName;
+import java.util.*;
+
+
+/**
+ * <p>Java class for Renew element declaration.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <element name="Renew">
+ * <complexType>
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="Expires" type="{http://schemas.xmlsoap.org/ws/2004/08/eventing}ExpirationType" minOccurs="0"/>
+ * <any/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </element>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "expires",
+ "any"
+})
+@XmlRootElement(name = "Renew")
+public class Renew {
+
+ @XmlElement(name = "Expires", namespace = "http://schemas.xmlsoap.org/ws/2004/08/eventing")
+ protected Date expires;
+ @XmlAnyElement(lax = true)
+ protected List<Object> any;
+ @XmlAnyAttribute
+ private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+
+ /**
+ * Gets the value of the expires property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public Date getExpires() {
+ return expires;
+ }
+
+ /**
+ * Sets the value of the expires property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setExpires(Date value) {
+ this.expires = value;
+ }
+
+ /**
+ * Gets the value of the any property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the any property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getAny().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link Element }
+ * {@link Object }
+ *
+ *
+ */
+ public List<Object> getAny() {
+ if (any == null) {
+ any = new ArrayList<Object>();
+ }
+ return this.any;
+ }
+
+ /**
+ * Gets a map that contains attributes that aren't bound to any typed property on this class.
+ *
+ * <p>
+ * the map is keyed by the name of the attribute and
+ * the value is the string value of the attribute.
+ *
+ * the map returned by this method is live, and you can add new attribute
+ * by updating the map directly. Because of this design, there's no setter.
+ *
+ *
+ * @return
+ * always non-null
+ */
+ public Map<QName, String> getOtherAttributes() {
+ return otherAttributes;
+ }
+
+}
Added: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/RenewResponse.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/RenewResponse.java (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/RenewResponse.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -0,0 +1,140 @@
+/*
+ * 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.extensions.eventing.jaxws;
+
+import org.w3c.dom.Element;
+
+import javax.xml.bind.annotation.*;
+import javax.xml.namespace.QName;
+import java.util.*;
+
+
+/**
+ * <p>Java class for RenewResponse element declaration.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <element name="RenewResponse">
+ * <complexType>
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="Expires" type="{http://schemas.xmlsoap.org/ws/2004/08/eventing}ExpirationType" minOccurs="0"/>
+ * <any/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </element>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "expires",
+ "any"
+})
+@XmlRootElement(name = "RenewResponse")
+public class RenewResponse {
+
+ @XmlElement(name = "Expires", namespace = "http://schemas.xmlsoap.org/ws/2004/08/eventing")
+ protected Date expires;
+ @XmlAnyElement(lax = true)
+ protected List<Object> any;
+ @XmlAnyAttribute
+ private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+
+ /**
+ * Gets the value of the expires property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public Date getExpires() {
+ return expires;
+ }
+
+ /**
+ * Sets the value of the expires property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setExpires(Date value) {
+ this.expires = value;
+ }
+
+ /**
+ * Gets the value of the any property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the any property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getAny().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link Element }
+ * {@link Object }
+ *
+ *
+ */
+ public List<Object> getAny() {
+ if (any == null) {
+ any = new ArrayList<Object>();
+ }
+ return this.any;
+ }
+
+ /**
+ * Gets a map that contains attributes that aren't bound to any typed property on this class.
+ *
+ * <p>
+ * the map is keyed by the name of the attribute and
+ * the value is the string value of the attribute.
+ *
+ * the map returned by this method is live, and you can add new attribute
+ * by updating the map directly. Because of this design, there's no setter.
+ *
+ *
+ * @return
+ * always non-null
+ */
+ public Map<QName, String> getOtherAttributes() {
+ return otherAttributes;
+ }
+
+}
Added: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/Subscribe.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/Subscribe.java (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/Subscribe.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -0,0 +1,224 @@
+/*
+ * 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.extensions.eventing.jaxws;
+
+import org.w3c.dom.Element;
+
+import javax.xml.bind.annotation.*;
+import javax.xml.namespace.QName;
+import java.util.*;
+
+
+/**
+ * <p>Java class for Subscribe element declaration.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <element name="Subscribe">
+ * <complexType>
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="EndTo" type="{http://www.w3.org/2005/08/addressing}EndpointReferenceType" minOccurs="0"/>
+ * <element name="Delivery" type="{http://schemas.xmlsoap.org/ws/2004/08/eventing}DeliveryType"/>
+ * <element name="Expires" type="{http://schemas.xmlsoap.org/ws/2004/08/eventing}ExpirationType" minOccurs="0"/>
+ * <element name="Filter" type="{http://schemas.xmlsoap.org/ws/2004/08/eventing}FilterType" minOccurs="0"/>
+ * <any/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </element>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "endTo",
+ "delivery",
+ "expires",
+ "filter",
+ "any"
+})
+@XmlRootElement(name = "Subscribe")
+public class Subscribe {
+
+ @XmlElement(name = "EndTo", namespace = "http://schemas.xmlsoap.org/ws/2004/08/eventing")
+ protected EndpointReferenceType endTo;
+ @XmlElement(name = "Delivery", namespace = "http://schemas.xmlsoap.org/ws/2004/08/eventing")
+ protected DeliveryType delivery;
+ @XmlElement(name = "Expires", namespace = "http://schemas.xmlsoap.org/ws/2004/08/eventing")
+ protected Date expires;
+ @XmlElement(name = "Filter", namespace = "http://schemas.xmlsoap.org/ws/2004/08/eventing")
+ protected FilterType filter;
+ @XmlAnyElement(lax = true)
+ protected List<Object> any;
+ @XmlAnyAttribute
+ private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+
+ /**
+ * Gets the value of the endTo property.
+ *
+ * @return
+ * possible object is
+ * {@link EndpointReferenceType }
+ *
+ */
+ public EndpointReferenceType getEndTo() {
+ return endTo;
+ }
+
+ /**
+ * Sets the value of the endTo property.
+ *
+ * @param value
+ * allowed object is
+ * {@link EndpointReferenceType }
+ *
+ */
+ public void setEndTo(EndpointReferenceType value) {
+ this.endTo = value;
+ }
+
+ /**
+ * Gets the value of the delivery property.
+ *
+ * @return
+ * possible object is
+ * {@link DeliveryType }
+ *
+ */
+ public DeliveryType getDelivery() {
+ return delivery;
+ }
+
+ /**
+ * Sets the value of the delivery property.
+ *
+ * @param value
+ * allowed object is
+ * {@link DeliveryType }
+ *
+ */
+ public void setDelivery(DeliveryType value) {
+ this.delivery = value;
+ }
+
+ /**
+ * Gets the value of the expires property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public Date getExpires() {
+ return expires;
+ }
+
+ /**
+ * Sets the value of the expires property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setExpires(Date value) {
+ this.expires = value;
+ }
+
+ /**
+ * Gets the value of the filter property.
+ *
+ * @return
+ * possible object is
+ * {@link FilterType }
+ *
+ */
+ public FilterType getFilter() {
+ return filter;
+ }
+
+ /**
+ * Sets the value of the filter property.
+ *
+ * @param value
+ * allowed object is
+ * {@link FilterType }
+ *
+ */
+ public void setFilter(FilterType value) {
+ this.filter = value;
+ }
+
+ /**
+ * Gets the value of the any property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the any property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getAny().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link Element }
+ * {@link Object }
+ *
+ *
+ */
+ public List<Object> getAny() {
+ if (any == null) {
+ any = new ArrayList<Object>();
+ }
+ return this.any;
+ }
+
+ /**
+ * Gets a map that contains attributes that aren't bound to any typed property on this class.
+ *
+ * <p>
+ * the map is keyed by the name of the attribute and
+ * the value is the string value of the attribute.
+ *
+ * the map returned by this method is live, and you can add new attribute
+ * by updating the map directly. Because of this design, there's no setter.
+ *
+ *
+ * @return
+ * always non-null
+ */
+ public Map<QName, String> getOtherAttributes() {
+ return otherAttributes;
+ }
+
+}
Added: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/SubscribeResponse.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/SubscribeResponse.java (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/SubscribeResponse.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -0,0 +1,175 @@
+/*
+ * 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.extensions.eventing.jaxws;
+
+import org.w3c.dom.Element;
+
+import javax.xml.bind.annotation.*;
+import javax.xml.bind.JAXBElement;
+import javax.xml.namespace.QName;
+import java.util.*;
+
+
+/**
+ * <p>Java class for SubscribeResponse element declaration.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <element name="SubscribeResponse">
+ * <complexType>
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="SubscriptionManagerEndpoint" type="{http://www.w3.org/2005/08/addressing}EndpointReferenceType"/>
+ * <element name="Expires" type="{http://schemas.xmlsoap.org/ws/2004/08/eventing}ExpirationType"/>
+ * <any/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </element>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "subscriptionManager",
+ "expires",
+ "any"
+ })
+@XmlRootElement(name = "SubscribeResponse")
+public class SubscribeResponse {
+
+ @XmlElement(name = "SubscriptionManager", namespace = "http://schemas.xmlsoap.org/ws/2004/08/eventing")
+ protected EndpointReferenceType subscriptionManager;
+ @XmlElement(name = "Expires", namespace = "http://schemas.xmlsoap.org/ws/2004/08/eventing")
+ protected Date expires;
+ @XmlAnyElement(lax = true)
+ protected List<Object> any;
+ @XmlAnyAttribute
+ private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+
+ /**
+ * Gets the value of the subscriptionManager property.
+ *
+ * @return
+ * possible object is
+ * {@link EndpointReferenceType }
+ *
+ */
+ public EndpointReferenceType getSubscriptionManager() {
+ return subscriptionManager;
+ }
+
+ /**
+ * Sets the value of the subscriptionManager property.
+ *
+ * @param value
+ * allowed object is
+ * {@link EndpointReferenceType }
+ *
+ */
+ public void setSubscriptionManager(EndpointReferenceType value) {
+ this.subscriptionManager = value;
+ }
+
+ /**
+ * Gets the value of the expires property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public Date getExpires() {
+ return expires;
+ }
+
+ /**
+ * Sets the value of the expires property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setExpires(Date value) {
+ this.expires = value;
+ }
+
+ /**
+ * Gets the value of the any property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the any property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getAny().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link Element }
+ * {@link Object }
+ *
+ *
+ */
+ public List<Object> getAny() {
+ if (any == null) {
+ any = new ArrayList<Object>();
+ }
+ return this.any;
+ }
+
+ /**
+ * Gets a map that contains attributes that aren't bound to any typed property on this class.
+ *
+ * <p>
+ * the map is keyed by the name of the attribute and
+ * the value is the string value of the attribute.
+ *
+ * the map returned by this method is live, and you can add new attribute
+ * by updating the map directly. Because of this design, there's no setter.
+ *
+ *
+ * @return
+ * always non-null
+ */
+ public Map<QName, String> getOtherAttributes() {
+ return otherAttributes;
+ }
+
+ public String getSubscriptionId()
+ {
+ JAXBElement<String> jaxbElement = (JAXBElement<String>)getSubscriptionManager().getReferenceParameters().getAny().get(0);
+ return jaxbElement.getValue();
+ }
+
+}
Added: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/SubscriptionEnd.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/SubscriptionEnd.java (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/SubscriptionEnd.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -0,0 +1,204 @@
+/*
+ * 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.extensions.eventing.jaxws;
+
+import org.w3c.dom.Element;
+
+import javax.xml.bind.annotation.*;
+import javax.xml.namespace.QName;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * <p>Java class for SubscriptionEnd element declaration.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <element name="SubscriptionEnd">
+ * <complexType>
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="SubscriptionManagerEndpoint" type="{http://www.w3.org/2005/08/addressing}EndpointReferenceType"/>
+ * <element name="Code" type="{http://schemas.xmlsoap.org/ws/2004/08/eventing}OpenSubscriptionEndCodeType"/>
+ * <element name="Reason" type="{http://schemas.xmlsoap.org/ws/2004/08/eventing}LanguageSpecificStringType" maxOccurs="unbounded" minOccurs="0"/>
+ * <any/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </element>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "subscriptionManager",
+ "code",
+ "reason",
+ "any"
+})
+@XmlRootElement(name = "SubscriptionEnd")
+public class SubscriptionEnd {
+
+ @XmlElement(name = "SubscriptionManager", namespace = "http://schemas.xmlsoap.org/ws/2004/08/eventing")
+ protected EndpointReferenceType subscriptionManager;
+ @XmlElement(name = "Code", namespace = "http://schemas.xmlsoap.org/ws/2004/08/eventing")
+ protected String code;
+ @XmlElement(name = "Reason", namespace = "http://schemas.xmlsoap.org/ws/2004/08/eventing")
+ protected List<LanguageSpecificStringType> reason;
+ @XmlAnyElement(lax = true)
+ protected List<Object> any;
+ @XmlAnyAttribute
+ private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+
+ /**
+ * Gets the value of the subscriptionManager property.
+ *
+ * @return
+ * possible object is
+ * {@link EndpointReferenceType }
+ *
+ */
+ public EndpointReferenceType getSubscriptionManager() {
+ return subscriptionManager;
+ }
+
+ /**
+ * Sets the value of the subscriptionManager property.
+ *
+ * @param value
+ * allowed object is
+ * {@link EndpointReferenceType }
+ *
+ */
+ public void setSubscriptionManager(EndpointReferenceType value) {
+ this.subscriptionManager = value;
+ }
+
+ /**
+ * Gets the value of the code property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getCode() {
+ return code;
+ }
+
+ /**
+ * Sets the value of the code property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setCode(String value) {
+ this.code = value;
+ }
+
+ /**
+ * Gets the value of the reason property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the reason property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getReason().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link LanguageSpecificStringType }
+ *
+ *
+ */
+ public List<LanguageSpecificStringType> getReason() {
+ if (reason == null) {
+ reason = new ArrayList<LanguageSpecificStringType>();
+ }
+ return this.reason;
+ }
+
+ /**
+ * Gets the value of the any property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the any property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getAny().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link Element }
+ * {@link Object }
+ *
+ *
+ */
+ public List<Object> getAny() {
+ if (any == null) {
+ any = new ArrayList<Object>();
+ }
+ return this.any;
+ }
+
+ /**
+ * Gets a map that contains attributes that aren't bound to any typed property on this class.
+ *
+ * <p>
+ * the map is keyed by the name of the attribute and
+ * the value is the string value of the attribute.
+ *
+ * the map returned by this method is live, and you can add new attribute
+ * by updating the map directly. Because of this design, there's no setter.
+ *
+ *
+ * @return
+ * always non-null
+ */
+ public Map<QName, String> getOtherAttributes() {
+ return otherAttributes;
+ }
+
+}
Added: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/SubscriptionManagerEndpoint.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/SubscriptionManagerEndpoint.java (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/SubscriptionManagerEndpoint.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -0,0 +1,88 @@
+/*
+ * 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.extensions.eventing.jaxws;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import javax.jws.soap.SOAPBinding.ParameterStyle;
+import javax.xml.ws.addressing.Action;
+
+/**
+ * This class was generated by the JAXWS SI.
+ * JAX-WS RI 2.0-b26-ea3
+ * Generated source version: 2.0
+ *
+ */
+@WebService(name = "SubscriptionManager", targetNamespace = "http://schemas.xmlsoap.org/ws/2004/08/eventing")
+@SOAPBinding(parameterStyle = ParameterStyle.WRAPPED)
+public interface SubscriptionManagerEndpoint {
+
+
+ /**
+ *
+ * @param body
+ * @return
+ * returns org.jboss.ws.extensions.eventing.GetStatusResponse
+ */
+ @WebMethod(operationName = "GetStatusOp")
+ @WebResult(name = "GetStatusResponse", targetNamespace = "http://schemas.xmlsoap.org/ws/2004/08/eventing", partName = "body")
+ @Action(
+ input = "http://schemas.xmlsoap.org/ws/2004/08/eventing/GetStatus",
+ output = "http://schemas.xmlsoap.org/ws/2004/08/eventing/GetStatusResponse"
+ )
+ public GetStatusResponse getStatusOp(
+ @WebParam(name = "GetStatus", targetNamespace = "http://schemas.xmlsoap.org/ws/2004/08/eventing", partName = "body")
+ GetStatus body);
+
+ /**
+ *
+ * @param body
+ * @return
+ * returns org.jboss.ws.extensions.eventing.RenewResponse
+ */
+ @WebMethod(operationName = "RenewOp")
+ @WebResult(name = "RenewResponse", targetNamespace = "http://schemas.xmlsoap.org/ws/2004/08/eventing", partName = "body")
+ @Action(
+ input = "http://schemas.xmlsoap.org/ws/2004/08/eventing/Renew",
+ output = "http://schemas.xmlsoap.org/ws/2004/08/eventing/RenewResponse"
+ )
+ public RenewResponse renewOp(
+ @WebParam(name = "Renew", targetNamespace = "http://schemas.xmlsoap.org/ws/2004/08/eventing", partName = "body")
+ Renew body);
+
+ /**
+ *
+ * @param body
+ */
+ @WebMethod(operationName = "UnsubscribeOp")
+ @Action(
+ input = "http://schemas.xmlsoap.org/ws/2004/08/eventing/Unsubscribe",
+ output = "http://schemas.xmlsoap.org/ws/2004/08/eventing/UnsubscribeResponse"
+ )
+ public void unsubscribeOp(
+ @WebParam(name = "Unsubscribe", targetNamespace = "http://schemas.xmlsoap.org/ws/2004/08/eventing", partName = "body")
+ Unsubscribe body);
+
+}
Added: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/SubscriptionManagerEndpointImpl.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/SubscriptionManagerEndpointImpl.java (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/SubscriptionManagerEndpointImpl.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -0,0 +1,188 @@
+/*
+ * 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.extensions.eventing.jaxws;
+
+import org.jboss.ws.Constants;
+import org.jboss.ws.annotation.EndpointConfig;
+import org.jboss.ws.core.CommonMessageContext;
+import org.jboss.ws.core.soap.MessageContextAssociation;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.jboss.ws.extensions.eventing.EventingConstants;
+import org.jboss.ws.extensions.eventing.common.EventingEndpointBase;
+import org.jboss.ws.extensions.eventing.mgmt.SubscriptionError;
+import org.w3c.dom.Element;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.xml.namespace.QName;
+import javax.xml.rpc.soap.SOAPFaultException;
+import javax.xml.ws.addressing.AddressingProperties;
+import javax.xml.ws.addressing.JAXWSAConstants;
+import javax.xml.ws.addressing.ReferenceParameters;
+import javax.xml.ws.addressing.Action;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.Date;
+
+/**
+ * @author Heiko.Braun(a)jboss.org
+ * @version $Id$
+ * @since 16.01.2007
+ */
+@WebService(
+ name = "SubscriptionManager",
+ portName = "SubscriptionManagerPort",
+ targetNamespace = "http://schemas.xmlsoap.org/ws/2004/08/eventing",
+ wsdlLocation = "/WEB-INF/wsdl/wind.wsdl")
+@EndpointConfig(configName = "Standard WSAddressing Endpoint")
+public class SubscriptionManagerEndpointImpl extends EventingEndpointBase implements SubscriptionManagerEndpoint {
+
+ public static final QName IDQN = new QName("http://schemas.xmlsoap.org/ws/2004/08/eventing", "Identifier", "ns1");
+
+ @WebMethod(operationName = "GetStatusOp")
+ @WebResult(name = "GetStatusResponse", targetNamespace = "http://schemas.xmlsoap.org/ws/2004/08/eventing", partName = "body")
+ @Action(
+ input = "http://schemas.xmlsoap.org/ws/2004/08/eventing/GetStatus",
+ output = "http://schemas.xmlsoap.org/ws/2004/08/eventing/GetStatusResponse"
+ )
+ public GetStatusResponse getStatusOp(@WebParam(name = "GetStatus", targetNamespace = "http://schemas.xmlsoap.org/ws/2004/08/eventing", partName = "body") GetStatus body) {
+ URI identifier = retrieveSubscriptionId();
+
+ try
+ {
+ Date leaseTime = getSubscriptionManager().getStatus(identifier);
+ GetStatusResponse response = new GetStatusResponse();
+ response.setExpires(leaseTime);
+
+ return response;
+ }
+ catch (SubscriptionError e)
+ {
+ throw new SOAPFaultException(buildFaultQName(e.getSubcode()), e.getReason(), null, null);
+ }
+ }
+
+ @WebMethod(operationName = "RenewOp")
+ @WebResult(name = "RenewResponse", targetNamespace = "http://schemas.xmlsoap.org/ws/2004/08/eventing", partName = "body")
+ @Action(
+ input = "http://schemas.xmlsoap.org/ws/2004/08/eventing/Renew",
+ output = "http://schemas.xmlsoap.org/ws/2004/08/eventing/RenewResponse"
+ )
+ public RenewResponse renewOp(@WebParam(name = "Renew", targetNamespace = "http://schemas.xmlsoap.org/ws/2004/08/eventing", partName = "body") Renew request) {
+
+ URI identifier = retrieveSubscriptionId();
+
+ try
+ {
+ Date newLeaseTime = getSubscriptionManager().renew(identifier, request.getExpires());
+ RenewResponse response = new RenewResponse();
+ response.setExpires(newLeaseTime);
+
+ return response;
+ }
+ catch (SubscriptionError e)
+ {
+ throw new SOAPFaultException(buildFaultQName(e.getSubcode()), e.getReason(), null, null);
+ }
+ }
+
+ @WebMethod(operationName = "UnsubscribeOp")
+ @Action(
+ input = "http://schemas.xmlsoap.org/ws/2004/08/eventing/Unsubscribe",
+ output = "http://schemas.xmlsoap.org/ws/2004/08/eventing/UnsubscribeResponse"
+ )
+ public void unsubscribeOp(@WebParam(name = "Unsubscribe", targetNamespace = "http://schemas.xmlsoap.org/ws/2004/08/eventing", partName = "body") Unsubscribe body) {
+
+ URI identifier = retrieveSubscriptionId();
+
+ try
+ {
+ getSubscriptionManager().unsubscribe(identifier);
+ }
+ catch (SubscriptionError e)
+ {
+ throw new SOAPFaultException(buildFaultQName(e.getSubcode()), e.getReason(), null, null);
+ }
+
+ }
+
+ private URI retrieveSubscriptionId()
+ {
+ URI subscriptionId = null;
+ CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
+ AddressingProperties addrProps = (AddressingProperties)msgContext.getProperty(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
+
+ if (null == addrProps)
+ {
+ throw new SOAPFaultException(
+ Constants.SOAP11_FAULT_CODE_CLIENT,
+ "The message is not valid and cannot be processed: " +
+ "Cannot obtain addressing properties.",
+ null, null
+ );
+ }
+
+ ReferenceParameters refParams = addrProps.getReferenceParameters();
+ if (refParams != null)
+ {
+ for (Object obj : refParams.getElements())
+ {
+ if (obj instanceof Element)
+ {
+ Element el = (Element)obj;
+ QName qname = DOMUtils.getElementQName(el);
+ if (qname.equals(IDQN))
+ {
+ try
+ {
+ subscriptionId = new URI(DOMUtils.getTextContent(el));
+ break;
+ }
+ catch (URISyntaxException e)
+ {
+ throw new SOAPFaultException(
+ Constants.SOAP11_FAULT_CODE_CLIENT,
+ "The message is not valid and cannot be processed: " +
+ "Invalid subscription id.",
+ null, null
+ );
+ }
+ }
+ }
+ }
+ }
+
+ if (null == subscriptionId)
+ {
+ throw new SOAPFaultException(
+ buildFaultQName(EventingConstants.CODE_INVALID_MESSAGE),
+ "The message is not valid and cannot be processed: "
+ + "Cannot obtain subscription id.",
+ null, null
+ );
+ }
+
+ return subscriptionId;
+ }
+}
Added: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/Unsubscribe.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/Unsubscribe.java (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/Unsubscribe.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -0,0 +1,96 @@
+
+package org.jboss.ws.extensions.eventing.jaxws;
+
+
+import org.w3c.dom.Element;
+
+import javax.xml.bind.annotation.*;
+import javax.xml.namespace.QName;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * <p>Java class for Unsubscribe element declaration.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <element name="Unsubscribe">
+ * <complexType>
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <any/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </element>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "any"
+})
+@XmlRootElement(name = "Unsubscribe")
+public class Unsubscribe {
+
+ @XmlAnyElement(lax = true)
+ protected List<Object> any;
+ @XmlAnyAttribute
+ private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+
+ /**
+ * Gets the value of the any property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the any property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getAny().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link Element }
+ * {@link Object }
+ *
+ *
+ */
+ public List<Object> getAny() {
+ if (any == null) {
+ any = new ArrayList<Object>();
+ }
+ return this.any;
+ }
+
+ /**
+ * Gets a map that contains attributes that aren't bound to any typed property on this class.
+ *
+ * <p>
+ * the map is keyed by the name of the attribute and
+ * the value is the string value of the attribute.
+ *
+ * the map returned by this method is live, and you can add new attribute
+ * by updating the map directly. Because of this design, there's no setter.
+ *
+ *
+ * @return
+ * always non-null
+ */
+ public Map<QName, String> getOtherAttributes() {
+ return otherAttributes;
+ }
+
+}
Added: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/package-info.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/package-info.java (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/jaxws/package-info.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -0,0 +1,2 @@
+(a)javax.xml.bind.annotation.XmlSchema(namespace = "http://schemas.xmlsoap.org/ws/2004/08/eventing")
+package org.jboss.ws.extensions.eventing.jaxws;
Copied: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/mgmt/DispatchException.java (from rev 1983, trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/DispatchException.java)
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/mgmt/DispatchException.java (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/mgmt/DispatchException.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -0,0 +1,36 @@
+/*
+ * 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.extensions.eventing.mgmt;
+
+
+import org.jboss.ws.WSException;
+
+public class DispatchException extends WSException {
+
+ public DispatchException() {
+ super();
+ }
+
+ public DispatchException(String message) {
+ super(message);
+ }
+}
\ No newline at end of file
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/mgmt/DispatcherFactory.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/mgmt/DispatcherFactory.java 2007-01-18 12:00:15 UTC (rev 1993)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/mgmt/DispatcherFactory.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -1,3 +1,24 @@
+/*
+ * 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.extensions.eventing.mgmt;
import java.util.Hashtable;
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/mgmt/Filter.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/mgmt/Filter.java 2007-01-18 12:00:15 UTC (rev 1993)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/mgmt/Filter.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -28,7 +28,6 @@
/**
* A local filter representation.
*
- * @see org.jboss.ws.extensions.eventing.element.FilterType
*
* @author Heiko Braun, <heiko(a)openj.net>
* @since 08-Dec-2005
Added: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/mgmt/NotificationFailure.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/mgmt/NotificationFailure.java (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/mgmt/NotificationFailure.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -0,0 +1,92 @@
+/*
+ * 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.extensions.eventing.mgmt;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+
+import org.jboss.ws.core.utils.DOMWriter;
+import org.jboss.ws.WSException;
+import org.w3c.dom.Element;
+
+/**
+ * Represent an error during notification.
+ *
+ * @author Stefano Maestri <stefano.maestri(a)javalinux.it>, Alessio Soldano <alessio.soldano(a)javalinux.it>
+ * @since 26/11/2006
+ */
+
+public class NotificationFailure
+{
+ private URI endTo;
+ private Element event;
+ private Exception exception;
+
+ public NotificationFailure(String endTo, Element event, Exception exception)
+ {
+ super();
+ try {
+ this.endTo = new URI(endTo);
+ } catch (URISyntaxException e) {
+ throw new WSException(e);
+ }
+ this.event = event;
+ this.exception = exception;
+ }
+ public URI getEndTo()
+ {
+ return endTo;
+ }
+ public void setEndTo(URI endTo)
+ {
+ this.endTo = endTo;
+ }
+ public Element getEvent()
+ {
+ return event;
+ }
+ public void setEvent(Element event)
+ {
+ this.event = event;
+ }
+ public Exception getException()
+ {
+ return exception;
+ }
+ public void setException(Exception exception)
+ {
+ this.exception = exception;
+ }
+
+ public String toString() {
+ StringBuffer sb = new StringBuffer();
+ sb.append("endTo: ");
+ sb.append(endTo);
+ sb.append("\n\nevent: ");
+ sb.append(DOMWriter.printNode(event, false));
+ sb.append("\n\nexception: ");
+ sb.append(exception);
+ sb.append("\n*******************\n");
+ return sb.toString();
+ }
+
+}
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/mgmt/Subscription.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/mgmt/Subscription.java 2007-01-18 12:00:15 UTC (rev 1993)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/mgmt/Subscription.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -26,11 +26,13 @@
import java.io.ByteArrayInputStream;
import java.net.URI;
import java.net.URL;
+import java.net.URISyntaxException;
import java.util.Date;
import javax.xml.soap.MessageFactory;
import javax.xml.soap.SOAPMessage;
import javax.xml.transform.TransformerException;
+import javax.xml.bind.JAXBElement;
import org.apache.xpath.XPathAPI;
import org.apache.xpath.objects.XObject;
@@ -38,8 +40,8 @@
import org.jboss.ws.core.soap.SOAPConnectionImpl;
import org.jboss.ws.core.utils.DOMWriter;
import org.jboss.ws.extensions.eventing.EventingConstants;
-import org.jboss.ws.extensions.eventing.element.EndpointReference;
-import org.jboss.ws.extensions.eventing.element.NotificationFailure;
+import org.jboss.ws.extensions.eventing.jaxws.AttributedURIType;
+import org.jboss.ws.extensions.eventing.jaxws.EndpointReferenceType;
import org.w3c.dom.Element;
/**
@@ -52,23 +54,23 @@
{
final private static Logger log = Logger.getLogger(Subscription.class);
- final private EndpointReference notifyTo;
- final private EndpointReference endTo;
+ final private EndpointReferenceType notifyTo;
+ final private EndpointReferenceType endTo;
private Date expires;
final private Filter filter;
- final private EndpointReference endpointReference;
+ final private EndpointReferenceType endpointReference;
final private URI eventSourceNS;
private SubscriptionManagerFactory factory = SubscriptionManagerFactory.getInstance();
- public Subscription(URI eventSourceNS, EndpointReference endpointReference, EndpointReference notifyTo, EndpointReference endTo, Date expires, Filter filter)
+ public Subscription(URI eventSourceNS, EndpointReferenceType epr, EndpointReferenceType notifyTo, EndpointReferenceType endTo, Date expires, Filter filter)
{
this.eventSourceNS = eventSourceNS;
this.notifyTo = notifyTo;
this.endTo = endTo; // is optional, can be null
this.expires = expires;
this.filter = filter;
- this.endpointReference = endpointReference;
+ this.endpointReference = epr;
}
public void notify(Element event)
@@ -96,13 +98,14 @@
sb.append("</env:Envelope>");
SOAPMessage reqMsg = msgFactory.createMessage(null, new ByteArrayInputStream(sb.toString().getBytes()));
- URL epURL = notifyTo.getAddress().toURL();
+ URL epURL = new URL(notifyTo.getAddress().getValue());
new SOAPConnectionImpl().callOneWay(reqMsg, epURL);
}
catch (Exception e)
{
SubscriptionManagerMBean manager = factory.getSubscriptionManager();
- NotificationFailure failure = new NotificationFailure(this.endTo.getAddress(), event, e);
+ AttributedURIType address = this.endTo.getAddress();
+ NotificationFailure failure = new NotificationFailure(address.getValue(), event, e);
manager.addNotificationFailure(failure);
log.error("Failed to send notification message", e);
}
@@ -169,7 +172,7 @@
{
MessageFactory msgFactory = MessageFactory.newInstance();
SOAPMessage reqMsg = msgFactory.createMessage(null, new ByteArrayInputStream(sb.toString().getBytes()));
- URL epURL = endTo.getAddress().toURL();
+ URL epURL = new URL(endTo.getAddress().getValue());
new SOAPConnectionImpl().callOneWay(reqMsg, epURL);
}
catch (Exception e)
@@ -189,12 +192,12 @@
return System.currentTimeMillis() > expires.getTime();
}
- public EndpointReference getNotifyTo()
+ public EndpointReferenceType getNotifyTo()
{
return notifyTo;
}
- public EndpointReference getEndTo()
+ public EndpointReferenceType getEndTo()
{
return endTo;
}
@@ -209,14 +212,19 @@
return filter;
}
- public EndpointReference getEndpointReference()
+ public EndpointReferenceType getEndpointReferenceType()
{
return endpointReference;
}
public URI getIdentifier()
{
- return endpointReference.getReferenceParams().getIdentifier();
+ try {
+ JAXBElement<String> jaxbElement = (JAXBElement<String>)endpointReference.getReferenceParameters().getAny().get(0);
+ return new URI(jaxbElement.getValue());
+ } catch (URISyntaxException e) {
+ throw new RuntimeException(e);
+ }
}
public void setExpires(Date expires)
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/mgmt/SubscriptionManager.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/mgmt/SubscriptionManager.java 2007-01-18 12:00:15 UTC (rev 1993)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/mgmt/SubscriptionManager.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -46,6 +46,8 @@
import javax.naming.NamingException;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.DocumentBuilder;
+import javax.xml.bind.JAXBElement;
+import javax.xml.namespace.QName;
import org.jboss.logging.Logger;
import org.jboss.util.naming.Util;
@@ -55,11 +57,10 @@
import org.jboss.ws.core.utils.DOMUtils;
import org.jboss.ws.core.utils.DOMWriter;
import org.jboss.ws.extensions.eventing.EventingConstants;
-import org.jboss.ws.extensions.eventing.DispatchException;
+import org.jboss.ws.extensions.eventing.jaxws.EndpointReferenceType;
+import org.jboss.ws.extensions.eventing.jaxws.ReferenceParametersType;
+import org.jboss.ws.extensions.eventing.jaxws.AttributedURIType;
import org.jboss.ws.extensions.eventing.deployment.EventingEndpointDI;
-import org.jboss.ws.extensions.eventing.element.EndpointReference;
-import org.jboss.ws.extensions.eventing.element.ReferenceParameters;
-import org.jboss.ws.extensions.eventing.element.NotificationFailure;
import org.w3c.dom.Element;
import org.xml.sax.InputSource;
import org.xml.sax.SAXParseException;
@@ -67,7 +68,7 @@
import org.apache.xml.utils.DefaultErrorHandler;
/**
- * The SubscriptionManager maintains event sources and subscriptions.<br>
+ * The SubscriptionManagerEndpoint maintains event sources and subscriptions.<br>
* It is interfaced through the EventSourceEndpoint and SubscriptionManagerEndpoint SOAP endpoints.
* <p>
* Applications can use the EventDispatcher interface to dispatch
@@ -84,9 +85,9 @@
* <p>
* Currently only event push is supported.
*
- * @see org.jboss.ws.extensions.eventing.EventSourceEndpoint
- * @see org.jboss.ws.extensions.eventing.SubscriptionManagerEndpoint
- * @see org.jboss.ws.extensions.eventing.element.FilterType
+ * @see org.jboss.ws.extensions.eventing.jaxws.EventSourceEndpoint
+ * @see org.jboss.ws.extensions.eventing.jaxws.SubscriptionManagerEndpoint
+ * @see org.jboss.ws.extensions.eventing.jaxws.FilterType
*
* @author Heiko Braun, <heiko(a)openj.net>
* @since 02-Dec-2005
@@ -257,15 +258,15 @@
}
/**
- * the of deployment info's is unknown therefore we try to
- * update the event source manager EPR anytime.
+ * When both the EventSourcePort and the SubscriptionManagerPort are registered
+ * we finally know the real SubscriptionManager EPR and update the endpoint adress.
* @param deploymentInfo
* @param eventSource
*/
private static void updateManagerAddress(EventingEndpointDI deploymentInfo, EventSource eventSource)
{
String addr = null;
- if(deploymentInfo.getPortName().equals("SubscriptionManagerPort")) // hackalert
+ if(deploymentInfo.getPortName().getLocalPart().equals("SubscriptionManagerPort"))
addr = deploymentInfo.getEndpointAddress();
if(addr!=null)
@@ -291,7 +292,7 @@
/**
* Subscribe to an event source.
*/
- public SubscriptionTicket subscribe(URI eventSourceNS, EndpointReference notifyTo, EndpointReference endTo, Date expires, Filter filter) throws SubscriptionError
+ public SubscriptionTicket subscribe(URI eventSourceNS, EndpointReferenceType notifyTo, EndpointReferenceType endTo, Date expires, Filter filter) throws SubscriptionError
{
log.debug("Subscription request for " + eventSourceNS);
@@ -333,16 +334,24 @@
}
// create subscription
- EndpointReference endpointReference = new EndpointReference();
- endpointReference.setAddress(eventSource.getManagerAddress());
- endpointReference.setReferenceParams(new ReferenceParameters(generateSubscriptionID()));
+ EndpointReferenceType epr = new EndpointReferenceType();
+ AttributedURIType attrURI = new AttributedURIType();
+ attrURI.setValue(eventSource.getManagerAddress().toString());
+ epr.setAddress(attrURI);
+ ReferenceParametersType refParam = new ReferenceParametersType();
+ JAXBElement idqn = new JAXBElement(
+ new QName("http://schemas.xmlsoap.org/ws/2004/08/eventing", "Identifier"),
+ String.class, generateSubscriptionID().toString()
+ );
+ refParam.getAny().add(idqn);
+ epr.setReferenceParameters(refParam);
- Subscription subscription = new Subscription(eventSource.getNameSpace(), endpointReference, notifyTo, endTo, expires, filter);
+ Subscription subscription = new Subscription(eventSource.getNameSpace(), epr, notifyTo, endTo, expires, filter);
subscriptionMapping.get(eventSourceNS).add(subscription);
log.debug("Registered subscription " + subscription.getIdentifier());
- return new SubscriptionTicket(endpointReference, subscription.getExpires());
+ return new SubscriptionTicket(epr, subscription.getExpires());
}
private void assertLeaseConstraints(Date expireDate) throws SubscriptionError
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/mgmt/SubscriptionManagerMBean.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/mgmt/SubscriptionManagerMBean.java 2007-01-18 12:00:15 UTC (rev 1993)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/mgmt/SubscriptionManagerMBean.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -28,8 +28,7 @@
import java.util.List;
import org.jboss.ws.extensions.eventing.deployment.EventingEndpointDI;
-import org.jboss.ws.extensions.eventing.element.EndpointReference;
-import org.jboss.ws.extensions.eventing.element.NotificationFailure;
+import org.jboss.ws.extensions.eventing.jaxws.EndpointReferenceType;
import org.w3c.dom.Element;
/**
@@ -81,8 +80,8 @@
public void setEventKeepAlive(long millies);
- // subscription endpointReference business
- SubscriptionTicket subscribe(URI eventSourceNS, EndpointReference notifyTo, EndpointReference endTo, Date expires, Filter filter) throws SubscriptionError;
+ // subscription EndpointReferenceType business
+ SubscriptionTicket subscribe(URI eventSourceNS, EndpointReferenceType notifyTo, EndpointReferenceType endTo, Date expires, Filter filter) throws SubscriptionError;
Date renew(URI identifier, Date lease) throws SubscriptionError;
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/mgmt/SubscriptionTicket.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/mgmt/SubscriptionTicket.java 2007-01-18 12:00:15 UTC (rev 1993)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/mgmt/SubscriptionTicket.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -23,25 +23,30 @@
// $Id$
+import org.jboss.ws.extensions.eventing.jaxws.EndpointReferenceType;
+
+import javax.xml.bind.JAXBElement;
import java.net.URI;
import java.util.Date;
-import org.jboss.ws.extensions.eventing.element.EndpointReference;
-
/**
* @author Heiko Braun, <heiko(a)openj.net>
* @since 02-Dec-2005
*/
public final class SubscriptionTicket
{
-
private URI identifier;
- private EndpointReference subscriptionManager;
+ private EndpointReferenceType subscriptionManager;
private Date expires;
- public SubscriptionTicket(EndpointReference subscriptionManager, Date expires)
+ public SubscriptionTicket(EndpointReferenceType subscriptionManager, Date expires)
{
- this.identifier = subscriptionManager.getReferenceParams().getIdentifier();
+ try {
+ JAXBElement<String> jaxbElement = (JAXBElement<String>)subscriptionManager.getReferenceParameters().getAny().get(0);
+ this.identifier = new URI(jaxbElement.getValue());
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
this.subscriptionManager = subscriptionManager;
this.expires = expires;
}
@@ -51,7 +56,7 @@
return identifier;
}
- public org.jboss.ws.extensions.eventing.element.EndpointReference getSubscriptionManager()
+ public EndpointReferenceType getSubscriptionManager()
{
return subscriptionManager;
}
@@ -59,5 +64,5 @@
public Date getExpires()
{
return expires;
- }
+ }
}
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java 2007-01-18 12:00:15 UTC (rev 1993)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -26,6 +26,12 @@
import org.jboss.logging.Logger;
import org.jboss.ws.Constants;
import org.jboss.ws.WSException;
+import org.jboss.ws.extensions.eventing.EventingUtils;
+import org.jboss.ws.extensions.eventing.EventingConstants;
+import org.jboss.ws.extensions.eventing.deployment.EventingEndpoint;
+import org.jboss.ws.extensions.eventing.metadata.EventingEpMetaExt;
+import org.jboss.ws.extensions.addressing.AddressingPropertiesImpl;
+import org.jboss.ws.extensions.addressing.metadata.AddressingOpMetaExt;
import org.jboss.ws.core.jaxrpc.Use;
import org.jboss.ws.core.server.ServiceEndpointManager;
import org.jboss.ws.core.server.ServiceEndpointManagerFactory;
@@ -36,7 +42,9 @@
import org.jboss.ws.metadata.umdm.ClientEndpointMetaData;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
+import org.jboss.ws.metadata.umdm.OperationMetaData;
import org.jboss.ws.metadata.wsdl.*;
+import org.jboss.ws.metadata.wsdl.xmlschema.JBossXSModel;
import org.w3c.dom.Element;
import javax.management.ObjectName;
@@ -48,6 +56,7 @@
import javax.wsdl.extensions.UnknownExtensibilityElement;
import javax.wsdl.extensions.soap.SOAPAddress;
import javax.xml.namespace.QName;
+import javax.xml.ws.addressing.AddressingProperties;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URI;
@@ -420,4 +429,82 @@
return null;
}
}
+
+ protected void processEndpointMetaDataExtensions(EndpointMetaData epMetaData, WSDLDefinitions wsdlDefinitions)
+ {
+ for (WSDLInterface wsdlInterface : wsdlDefinitions.getInterfaces())
+ {
+ WSDLProperty eventSourceProp = wsdlInterface.getProperty(Constants.WSDL_PROPERTY_EVENTSOURCE);
+ if (eventSourceProp != null && epMetaData instanceof ServerEndpointMetaData)
+ {
+ ServerEndpointMetaData sepMetaData = (ServerEndpointMetaData)epMetaData;
+ String eventSourceNS = wsdlInterface.getQName().getNamespaceURI() + "/" + wsdlInterface.getQName().getLocalPart();
+
+ // extract the schema model
+ JBossXSModel schemaModel = WSDLUtils.getSchemaModel(wsdlDefinitions.getWsdlTypes());
+ String[] notificationSchema = EventingUtils.extractNotificationSchema(schemaModel);
+
+ // extract the root element NS
+ String notificationRootElementNS = null;
+ WSDLInterfaceOperation wsdlInterfaceOperation = wsdlInterface.getOperations()[0];
+ if(wsdlInterfaceOperation.getOutputs().length > 0 )
+ {
+ WSDLInterfaceOperationOutput wsdlInterfaceOperationOutput = wsdlInterfaceOperation.getOutputs()[0];
+ notificationRootElementNS = wsdlInterfaceOperationOutput.getElement().getNamespaceURI();
+ }
+ else
+ {
+ // WSDL operation of an WSDL interface that is marked as an event source
+ // requires to carry an output message.
+ throw new WSException("Unable to resolve eventing root element NS. No operation output found at "+
+ wsdlInterfaceOperation.getQName());
+ }
+
+ EventingEpMetaExt ext = new EventingEpMetaExt(EventingConstants.NS_EVENTING);
+ ext.setEventSourceNS(eventSourceNS);
+ ext.setNotificationSchema(notificationSchema);
+ ext.setNotificationRootElementNS(notificationRootElementNS);
+
+ sepMetaData.addExtension(ext);
+ sepMetaData.setManagedEndpointBean(EventingEndpoint.class.getName());
+ }
+ }
+ }
+
+ /** Process operation meta data extensions. */
+ protected void processOpMetaExtensions(OperationMetaData opMetaData, WSDLInterfaceOperation wsdlOperation)
+ {
+
+ String tns = wsdlOperation.getQName().getNamespaceURI();
+ String portTypeName = wsdlOperation.getQName().getLocalPart();
+
+ AddressingProperties ADDR = new AddressingPropertiesImpl();
+ AddressingOpMetaExt addrExt = new AddressingOpMetaExt(ADDR.getNamespaceURI());
+
+ // inbound action
+ WSDLProperty wsaInAction = wsdlOperation.getProperty(Constants.WSDL_PROPERTY_ACTION_IN);
+ if (wsaInAction != null)
+ {
+ addrExt.setInboundAction(wsaInAction.getValue());
+ }
+ else
+ {
+ WSDLProperty messageName = wsdlOperation.getProperty(Constants.WSDL_PROPERTY_MESSAGE_NAME_IN);
+ addrExt.setInboundAction(tns + "/" + portTypeName + "/" + messageName);
+ }
+
+ // outbound action
+ WSDLProperty wsaOutAction = wsdlOperation.getProperty(Constants.WSDL_PROPERTY_ACTION_OUT);
+ if (wsaOutAction != null)
+ {
+ addrExt.setOutboundAction(wsaOutAction.getValue());
+ }
+ else
+ {
+ WSDLProperty messageName = wsdlOperation.getProperty(Constants.WSDL_PROPERTY_MESSAGE_NAME_OUT);
+ addrExt.setOutboundAction(tns + "/" + portTypeName + "/" + messageName);
+ }
+
+ opMetaData.addExtension(addrExt);
+ }
}
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCMetaDataBuilder.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCMetaDataBuilder.java 2007-01-18 12:00:15 UTC (rev 1993)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCMetaDataBuilder.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -945,81 +945,4 @@
}
}
- protected void processEndpointMetaDataExtensions(EndpointMetaData epMetaData, WSDLDefinitions wsdlDefinitions)
- {
- for (WSDLInterface wsdlInterface : wsdlDefinitions.getInterfaces())
- {
- WSDLProperty eventSourceProp = wsdlInterface.getProperty(Constants.WSDL_PROPERTY_EVENTSOURCE);
- if (eventSourceProp != null && epMetaData instanceof ServerEndpointMetaData)
- {
- ServerEndpointMetaData sepMetaData = (ServerEndpointMetaData)epMetaData;
- String eventSourceNS = wsdlInterface.getQName().getNamespaceURI() + "/" + wsdlInterface.getQName().getLocalPart();
-
- // extract the schema model
- JBossXSModel schemaModel = WSDLUtils.getSchemaModel(wsdlDefinitions.getWsdlTypes());
- String[] notificationSchema = EventingUtils.extractNotificationSchema(schemaModel);
-
- // extract the root element NS
- String notificationRootElementNS = null;
- WSDLInterfaceOperation wsdlInterfaceOperation = wsdlInterface.getOperations()[0];
- if(wsdlInterfaceOperation.getOutputs().length > 0 )
- {
- WSDLInterfaceOperationOutput wsdlInterfaceOperationOutput = wsdlInterfaceOperation.getOutputs()[0];
- notificationRootElementNS = wsdlInterfaceOperationOutput.getElement().getNamespaceURI();
- }
- else
- {
- // WSDL operation of an WSDL interface that is marked as an event source
- // requires to carry an output message.
- throw new WSException("Unable to resolve eventing root element NS. No operation output found at "+
- wsdlInterfaceOperation.getQName());
- }
-
- EventingEpMetaExt ext = new EventingEpMetaExt(EventingConstants.NS_EVENTING);
- ext.setEventSourceNS(eventSourceNS);
- ext.setNotificationSchema(notificationSchema);
- ext.setNotificationRootElementNS(notificationRootElementNS);
-
- sepMetaData.addExtension(ext);
- sepMetaData.setManagedEndpointBean(EventingEndpoint.class.getName());
- }
- }
- }
-
- /** Process operation meta data extensions. */
- protected void processOpMetaExtensions(OperationMetaData opMetaData, WSDLInterfaceOperation wsdlOperation)
- {
-
- String tns = wsdlOperation.getQName().getNamespaceURI();
- String portTypeName = wsdlOperation.getQName().getLocalPart();
-
- AddressingProperties ADDR = new AddressingPropertiesImpl();
- AddressingOpMetaExt addrExt = new AddressingOpMetaExt(ADDR.getNamespaceURI());
-
- // inbound action
- WSDLProperty wsaInAction = wsdlOperation.getProperty(Constants.WSDL_PROPERTY_ACTION_IN);
- if (wsaInAction != null)
- {
- addrExt.setInboundAction(wsaInAction.getValue());
- }
- else
- {
- WSDLProperty messageName = wsdlOperation.getProperty(Constants.WSDL_PROPERTY_MESSAGE_NAME_IN);
- addrExt.setInboundAction(tns + "/" + portTypeName + "/" + messageName);
- }
-
- // outbound action
- WSDLProperty wsaOutAction = wsdlOperation.getProperty(Constants.WSDL_PROPERTY_ACTION_OUT);
- if (wsaOutAction != null)
- {
- addrExt.setOutboundAction(wsaOutAction.getValue());
- }
- else
- {
- WSDLProperty messageName = wsdlOperation.getProperty(Constants.WSDL_PROPERTY_MESSAGE_NAME_OUT);
- addrExt.setOutboundAction(tns + "/" + portTypeName + "/" + messageName);
- }
-
- opMetaData.addExtension(addrExt);
- }
}
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java 2007-01-18 12:00:15 UTC (rev 1993)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -53,6 +53,7 @@
import javax.xml.ws.ResponseWrapper;
import javax.xml.ws.WebFault;
import javax.xml.ws.addressing.AddressingProperties;
+import javax.xml.ws.addressing.Action;
import org.jboss.logging.Logger;
import org.jboss.ws.Constants;
@@ -239,7 +240,7 @@
{
if (omd.isOneWay())
throw new IllegalStateException("JSR-181 4.3.1 - A JSR-181 processor is REQUIRED to report an error if an operation marked "
- + "@Oneway has a return value, declares any checked exceptions or has any INOUT or OUT parameters.");
+ + "@Oneway has a return value, declares any checked exceptions or has any INOUT or OUT parameters.");
WebFault annotation = exception.getAnnotation(WebFault.class);
@@ -445,7 +446,7 @@
if (namespace == null && (opMetaData.isDocumentBare() || header))
namespace = opMetaData.getQName().getNamespaceURI();
- // RPC body parts must have no namespace
+ // RPC body parts must have no namespace
else if (opMetaData.isRPCLiteral() && !header)
namespace = null;
@@ -480,7 +481,7 @@
if (namespace == null && (opMetaData.isDocumentBare() || header))
namespace = opMetaData.getQName().getNamespaceURI();
- // RPC body parts must have no namespace
+ // RPC body parts must have no namespace
else if (opMetaData.isRPCLiteral() && !header)
namespace = null;
@@ -494,20 +495,28 @@
/**
* Process operation meta data extensions.
*/
- private void processMetaExtensions(EndpointMetaData epMetaData, OperationMetaData opMetaData)
+ private void processMetaExtensions(Method method, EndpointMetaData epMetaData, OperationMetaData opMetaData)
{
- // Until there is a addressing annotion we fallback to implicit action association
- // TODO: figure out a way to assign message name instead of IN and OUT
- String tns = epMetaData.getPortName().getNamespaceURI();
- String portTypeName = epMetaData.getPortName().getLocalPart();
-
AddressingProperties ADDR = new AddressingPropertiesImpl();
AddressingOpMetaExt addrExt = new AddressingOpMetaExt(ADDR.getNamespaceURI());
- addrExt.setInboundAction(tns + "/" + portTypeName + "/IN");
- if (!opMetaData.isOneWay())
- addrExt.setOutboundAction(tns + "/" + portTypeName + "/OUT");
+ Action anAction = method.getAnnotation(Action.class);
+ if(anAction!=null)
+ {
+ addrExt.setInboundAction(anAction.input());
+ addrExt.setOutboundAction(anAction.output());
+ }
+ else // default action values
+ {
+ // TODO: figure out a way to assign message name instead of IN and OUT
+ String tns = epMetaData.getPortName().getNamespaceURI();
+ String portTypeName = epMetaData.getPortName().getLocalPart();
+ addrExt.setInboundAction(tns + "/" + portTypeName + "/IN");
+ if (!opMetaData.isOneWay())
+ addrExt.setOutboundAction(tns + "/" + portTypeName + "/OUT");
+ }
+
opMetaData.addExtension(addrExt);
}
@@ -722,7 +731,7 @@
addFault(opMetaData, exClass);
// process op meta data extension
- processMetaExtensions(epMetaData, opMetaData);
+ processMetaExtensions(method, epMetaData, opMetaData);
}
protected void processWebMethods(EndpointMetaData epMetaData, Class wsClass)
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java 2007-01-18 12:00:15 UTC (rev 1993)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -140,6 +140,9 @@
if (sepClass.isAnnotationPresent(SOAPMessageHandlers.class) || seiClass.isAnnotationPresent(SOAPMessageHandlers.class))
log.warn("@SOAPMessageHandlers is deprecated as of JAX-WS 2.0 with no replacement.");
+ // process endpoint meta data extensions
+ processEndpointMetaDataExtensions(sepMetaData, wsdlDefinitions);
+
// init service endpoint id
ObjectName sepID = MetaDataBuilder.createServiceEndpointID(udi, sepMetaData);
sepMetaData.setServiceEndpointID(sepID);
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/config/Configurable.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/config/Configurable.java 2007-01-18 12:00:15 UTC (rev 1993)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/config/Configurable.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -4,6 +4,8 @@
/**
* A marker interface that identifies configurable JBossWS components.
+ * Configurables may register themselves with a {@link ConfigurationProvider} in order
+ * to get notified then the configuration changes.
*
* @author Heiko.Braun(a)jboss.org
* @version $Id$
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/config/ConfigurationProvider.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/config/ConfigurationProvider.java 2007-01-18 12:00:15 UTC (rev 1993)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/config/ConfigurationProvider.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -48,6 +48,8 @@
*/
void configure(Configurable configurable);
+ void registerConfigObserver(Configurable configurable);
+
String getConfigFile();
void setConfigFile(String configFile);
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java 2007-01-18 12:00:15 UTC (rev 1993)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -587,7 +587,7 @@
public void configure(Configurable configurable) {
// emit notificatins when the config changes
- this.configObservable.addObserver(configurable);
+ registerConfigObserver(configurable);
if(null == config)
{
@@ -619,15 +619,19 @@
log.debug("Configure EndpointMetaData");
- List<HandlerMetaData> sepHandlers = getHandlerMetaData(HandlerType.ENDPOINT);
- clearHandlers();
+ // It's not necessarily the same instance
+ EndpointMetaData epmd = (EndpointMetaData)configurable;
+ // TODO: Why should we keep them?
+ List<HandlerMetaData> sepHandlers = epmd.getHandlerMetaData(HandlerType.ENDPOINT);
+ epmd.clearHandlers();
+
List<HandlerMetaData> preHandlers = config.getHandlers(this, HandlerType.PRE);
List<HandlerMetaData> postHandlers = config.getHandlers(this, HandlerType.POST);
- addHandlers(preHandlers);
- addHandlers(sepHandlers);
- addHandlers(postHandlers);
+ epmd.addHandlers(preHandlers);
+ epmd.addHandlers(sepHandlers);
+ epmd.addHandlers(postHandlers);
log.debug("Added " + preHandlers.size() + " PRE handlers");
log.debug("Added " + postHandlers.size() + " POST handlers");
@@ -635,6 +639,10 @@
}
+ public void registerConfigObserver(Configurable observer) {
+ this.configObservable.addObserver(observer);
+ }
+
public String getConfigFile()
{
return configFile;
@@ -656,7 +664,7 @@
this.configName = configName;
this.config = null;
- // notify obervers
+ // notify observers
log.debug("Reconfiguration forced");
this.configObservable.touch();
this.configObservable.notifyObservers(configName);
@@ -669,7 +677,7 @@
public void update(Observable observable, Object object) {
log.trace("Ingore configuration change notification");
-}
+ }
class ConfigObservable extends Observable {
public void touch()
Modified: trunk/jbossws-tests/ant-import/build-jars-jaxrpc.xml
===================================================================
--- trunk/jbossws-tests/ant-import/build-jars-jaxrpc.xml 2007-01-18 12:00:15 UTC (rev 1993)
+++ trunk/jbossws-tests/ant-import/build-jars-jaxrpc.xml 2007-01-18 12:54:34 UTC (rev 1994)
@@ -1745,7 +1745,7 @@
</jar>
<!-- jaxrpc-wseventing -->
- <war warfile="${tests.output.dir}/libs/jaxrpc-wseventing.war" webxml="${tests.output.dir}/resources/jaxrpc/wseventing/WEB-INF/web.xml">
+ <!--war warfile="${tests.output.dir}/libs/jaxrpc-wseventing.war" webxml="${tests.output.dir}/resources/jaxrpc/wseventing/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/classes">
<include name="org/jboss/ws/eventing/*.class"/>
<include name="org/jboss/test/ws/jaxrpc/wseventing/*.class"/>
@@ -1768,7 +1768,7 @@
<include name="application-client.xml"/>
<include name="jboss-client.xml"/>
</metainf>
- </jar>
+ </jar-->
<!-- jaxrpc-wsse-account-signup.war -->
<war warfile="${tests.output.dir}/libs/jaxrpc-wsse-account-signup.war" webxml="${tests.output.dir}/resources/jaxrpc/wsse/account-signup/WEB-INF/web.xml">
Modified: trunk/jbossws-tests/ant-import/build-jars-jaxws.xml
===================================================================
--- trunk/jbossws-tests/ant-import/build-jars-jaxws.xml 2007-01-18 12:00:15 UTC (rev 1993)
+++ trunk/jbossws-tests/ant-import/build-jars-jaxws.xml 2007-01-18 12:54:34 UTC (rev 1994)
@@ -697,6 +697,30 @@
<!-- Please add alphabetically -->
+
+ <!-- jaxws-wseventing -->
+ <war warfile="${tests.output.dir}/libs/jaxws-wseventing.war"
+ webxml="${tests.output.dir}/resources/jaxws/wseventing/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/classes">
+ <include name="org/jboss/ws/eventing/*.class"/>
+ <include name="org/jboss/test/ws/jaxws/wseventing/*.class"/>
+ </classes>
+ <webinf dir="${tests.output.dir}/resources/jaxws/wseventing/WEB-INF">
+ <include name="wsdl/**"/>
+ </webinf>
+ </war>
+ <!--jar jarfile="${tests.output.dir}/libs/jaxws-wseventing-client.jar">
+ <fileset dir="${tests.output.dir}/classes">
+ <include name="org/jboss/ws/eventing/*.class"/>
+ </fileset>
+ <metainf dir="${tests.output.dir}/resources/jaxws/wseventing/WEB-INF">
+ <include name="wsdl/**"/>
+ </metainf>
+ <metainf dir="${tests.output.dir}/resources/jaxws/wseventing/META-INF">
+ <include name="application-client.xml"/>
+ <include name="jboss-client.xml"/>
+ </metainf>
+ </jar-->
</target>
</project>
Modified: trunk/jbossws-tests/build.xml
===================================================================
--- trunk/jbossws-tests/build.xml 2007-01-18 12:00:15 UTC (rev 1993)
+++ trunk/jbossws-tests/build.xml 2007-01-18 12:54:34 UTC (rev 1994)
@@ -204,6 +204,8 @@
<src path="${tests.java.dir}"/>
<exclude name="org/jboss/test/ws/interop/**"/>
<exclude name="org/jboss/test/ws/jaxrpc/jbws718/**"/>
+ <exclude name="org/jboss/test/ws/jaxrpc/wseventing/**"/>
+ <exclude name="org/jboss/test/ws/jaxrpc/samples/wseventing/**"/>
<exclude name="org/jboss/test/ws/jaxws/**"/>
<exclude name="org/jboss/test/ws/tools/jsr181/**"/>
<classpath refid="javac.classpath"/>
@@ -216,6 +218,8 @@
<src path="${tests.java.dir}"/>
<exclude name="org/jboss/test/ws/interop/**"/>
<exclude name="org/jboss/test/ws/jaxrpc/jbws718/**"/>
+ <exclude name="org/jboss/test/ws/jaxrpc/wseventing/**"/>
+ <exclude name="org/jboss/test/ws/jaxrpc/samples/wseventing/**"/>
<classpath refid="javac.classpath"/>
</javac>
</target>
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/wseventing/SysmonTestCase.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/wseventing/SysmonTestCase.java 2007-01-18 12:00:15 UTC (rev 1993)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/wseventing/SysmonTestCase.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -47,16 +47,11 @@
import org.jboss.ws.core.jaxrpc.ServiceImpl;
import org.jboss.ws.extensions.addressing.AddressingClientUtil;
import org.jboss.ws.extensions.addressing.jaxrpc.WSAddressingClientHandler;
-import org.jboss.ws.extensions.eventing.EventSourceEndpoint;
+import org.jboss.ws.extensions.eventing.jaxrpc.EventSourceEndpoint;
import org.jboss.ws.extensions.eventing.EventingConstants;
-import org.jboss.ws.extensions.eventing.SubscriptionManagerEndpoint;
-import org.jboss.ws.extensions.eventing.element.DeliveryType;
-import org.jboss.ws.extensions.eventing.element.EndpointReference;
-import org.jboss.ws.extensions.eventing.element.FilterType;
-import org.jboss.ws.extensions.eventing.element.StatusRequest;
-import org.jboss.ws.extensions.eventing.element.SubscribeRequest;
-import org.jboss.ws.extensions.eventing.element.SubscribeResponse;
-import org.jboss.ws.extensions.eventing.element.UnsubscribeRequest;
+import org.jboss.ws.extensions.eventing.jaxrpc.SubscriptionManagerEndpoint;
+import org.jboss.ws.extensions.eventing.jaxrpc.element.EndpointReference;
+import org.jboss.ws.extensions.eventing.jaxrpc.element.*;
/**
* Test the eventing example service.
@@ -99,21 +94,21 @@
ServiceFactoryImpl factory = new ServiceFactoryImpl();
URL wsdlURL = new File("resources/jaxrpc/samples/wseventing/WEB-INF/wsdl/sysmon.wsdl").toURL();
URL mappingURL = new File("resources/jaxrpc/samples/wseventing/WEB-INF/jaxrpc-mapping.xml").toURL();
-
+
QName serviceName = new QName("http://schemas.xmlsoap.org/ws/2004/08/eventing", "EventingService");
QName portName1 = new QName("http://schemas.xmlsoap.org/ws/2004/08/eventing", "EventSourcePort");
QName portName2 = new QName("http://schemas.xmlsoap.org/ws/2004/08/eventing", "SubscriptionManagerPort");
-
+
ServiceImpl service = (ServiceImpl)factory.createService(wsdlURL, serviceName, mappingURL);
HandlerRegistry registry = service.getDynamicHandlerRegistry();
List infos1 = registry.getHandlerChain(portName1);
infos1.add(new HandlerInfo(WSAddressingClientHandler.class, new HashMap(), new QName[]{}));
registry.setHandlerChain(portName1, infos1);
-
+
List infos2 = registry.getHandlerChain(portName2);
infos2.add(new HandlerInfo(WSAddressingClientHandler.class, new HashMap(), new QName[]{}));
registry.setHandlerChain(portName2, infos2);
-
+
subscriptionPort = (EventSourceEndpoint)service.getPort(EventSourceEndpoint.class);
managementPort = (SubscriptionManagerEndpoint)service.getPort(SubscriptionManagerEndpoint.class);
}
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/wseventing/SysmonUtil.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/wseventing/SysmonUtil.java 2007-01-18 12:00:15 UTC (rev 1993)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/wseventing/SysmonUtil.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -11,8 +11,8 @@
import org.jboss.logging.Logger;
import org.jboss.ws.extensions.addressing.AddressingClientUtil;
-import org.jboss.ws.extensions.eventing.element.EndpointReference;
-import org.jboss.ws.extensions.eventing.element.SubscribeResponse;
+import org.jboss.ws.extensions.eventing.jaxrpc.element.EndpointReference;
+import org.jboss.ws.extensions.eventing.jaxrpc.element.SubscribeResponse;
/**
* Util methods that drive the SysmoneTestCase.
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/wseventing/DIIClientTestCase.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/wseventing/DIIClientTestCase.java 2007-01-18 12:00:15 UTC (rev 1993)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/wseventing/DIIClientTestCase.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -48,15 +48,11 @@
import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
import org.jboss.ws.extensions.addressing.AddressingClientUtil;
import org.jboss.ws.extensions.addressing.jaxrpc.WSAddressingClientHandler;
-import org.jboss.ws.extensions.eventing.EventSourceEndpoint;
+import org.jboss.ws.extensions.eventing.jaxrpc.EventSourceEndpoint;
+import org.jboss.ws.extensions.eventing.jaxrpc.SubscriptionManagerEndpoint;
import org.jboss.ws.extensions.eventing.EventingConstants;
-import org.jboss.ws.extensions.eventing.SubscriptionManagerEndpoint;
-import org.jboss.ws.extensions.eventing.element.DeliveryType;
-import org.jboss.ws.extensions.eventing.element.EndpointReference;
-import org.jboss.ws.extensions.eventing.element.FilterType;
-import org.jboss.ws.extensions.eventing.element.SubscribeRequest;
-import org.jboss.ws.extensions.eventing.element.SubscribeResponse;
-import org.jboss.ws.extensions.eventing.element.UnsubscribeRequest;
+import org.jboss.ws.extensions.eventing.jaxrpc.element.EndpointReference;
+import org.jboss.ws.extensions.eventing.jaxrpc.element.*;
import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/wseventing/EventingSupport.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/wseventing/EventingSupport.java 2007-01-18 12:00:15 UTC (rev 1993)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/wseventing/EventingSupport.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -36,14 +36,11 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.ws.extensions.addressing.AddressingClientUtil;
-import org.jboss.ws.extensions.eventing.EventSourceEndpoint;
+import org.jboss.ws.extensions.eventing.jaxrpc.EventSourceEndpoint;
import org.jboss.ws.extensions.eventing.EventingConstants;
-import org.jboss.ws.extensions.eventing.SubscriptionManagerEndpoint;
-import org.jboss.ws.extensions.eventing.element.DeliveryType;
-import org.jboss.ws.extensions.eventing.element.EndpointReference;
-import org.jboss.ws.extensions.eventing.element.FilterType;
-import org.jboss.ws.extensions.eventing.element.SubscribeRequest;
-import org.jboss.ws.extensions.eventing.element.SubscribeResponse;
+import org.jboss.ws.extensions.eventing.jaxrpc.element.EndpointReference;
+import org.jboss.ws.extensions.eventing.jaxrpc.SubscriptionManagerEndpoint;
+import org.jboss.ws.extensions.eventing.jaxrpc.element.*;
import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/wseventing/EventingTestCase.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/wseventing/EventingTestCase.java 2007-01-18 12:00:15 UTC (rev 1993)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/wseventing/EventingTestCase.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -35,14 +35,14 @@
import org.jboss.test.ws.JBossWSTestSetup;
import org.jboss.ws.extensions.addressing.AddressingClientUtil;
import org.jboss.ws.extensions.eventing.EventingConstants;
-import org.jboss.ws.extensions.eventing.element.DeliveryType;
-import org.jboss.ws.extensions.eventing.element.RenewRequest;
-import org.jboss.ws.extensions.eventing.element.RenewResponse;
-import org.jboss.ws.extensions.eventing.element.StatusRequest;
-import org.jboss.ws.extensions.eventing.element.StatusResponse;
-import org.jboss.ws.extensions.eventing.element.SubscribeRequest;
-import org.jboss.ws.extensions.eventing.element.SubscribeResponse;
-import org.jboss.ws.extensions.eventing.element.UnsubscribeRequest;
+import org.jboss.ws.extensions.eventing.jaxrpc.element.DeliveryType;
+import org.jboss.ws.extensions.eventing.jaxrpc.element.RenewRequest;
+import org.jboss.ws.extensions.eventing.jaxrpc.element.RenewResponse;
+import org.jboss.ws.extensions.eventing.jaxrpc.element.StatusRequest;
+import org.jboss.ws.extensions.eventing.jaxrpc.element.StatusResponse;
+import org.jboss.ws.extensions.eventing.jaxrpc.element.SubscribeRequest;
+import org.jboss.ws.extensions.eventing.jaxrpc.element.SubscribeResponse;
+import org.jboss.ws.extensions.eventing.jaxrpc.element.UnsubscribeRequest;
/**
* Test the eventing endpoints.
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/wseventing/NotificationTestCase.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/wseventing/NotificationTestCase.java 2007-01-18 12:00:15 UTC (rev 1993)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/wseventing/NotificationTestCase.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -30,7 +30,7 @@
import org.jboss.test.ws.JBossWSTestSetup;
import org.jboss.ws.core.utils.DOMUtils;
import org.jboss.ws.extensions.eventing.EventingConstants;
-import org.jboss.ws.extensions.eventing.element.SubscribeResponse;
+import org.jboss.ws.extensions.eventing.jaxrpc.element.SubscribeResponse;
import org.jboss.ws.extensions.eventing.mgmt.EventDispatcher;
import org.w3c.dom.Element;
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/wseventing/SubscriptionManagerTestCase.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/wseventing/SubscriptionManagerTestCase.java 2007-01-18 12:00:15 UTC (rev 1993)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/wseventing/SubscriptionManagerTestCase.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -29,15 +29,15 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.ws.core.utils.DOMUtils;
import org.jboss.ws.extensions.eventing.EventingConstants;
+import org.jboss.ws.extensions.eventing.jaxrpc.element.EndpointReference;
import org.jboss.ws.extensions.eventing.deployment.EventingEndpointDI;
-import org.jboss.ws.extensions.eventing.element.EndpointReference;
import org.jboss.ws.extensions.eventing.mgmt.Filter;
import org.jboss.ws.extensions.eventing.mgmt.SubscriptionManager;
import org.jboss.ws.extensions.eventing.mgmt.SubscriptionTicket;
import org.w3c.dom.Element;
/**
- * SubscriptionManager unit tests.
+ * SubscriptionManagerEndpoint unit tests.
*
* @author Heiko Braun, <heiko(a)openj.net>
* @since 02-Dec-2005
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/client/ServiceDelegateTestCase.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/client/ServiceDelegateTestCase.java 2007-01-18 12:00:15 UTC (rev 1993)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/client/ServiceDelegateTestCase.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -1,3 +1,24 @@
+/*
+ * 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.client;
import junit.framework.TestCase;
Added: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/wseventing/CustomEventSource.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/wseventing/CustomEventSource.java (rev 0)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/wseventing/CustomEventSource.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -0,0 +1,31 @@
+/*
+ * 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.wseventing;
+
+/**
+ * @author Heiko.Braun(a)jboss.org
+ * @version $Id$
+ * @since 16.01.2007
+ */
+public class CustomEventSource {
+
+}
Added: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/wseventing/EventSinkServlet.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/wseventing/EventSinkServlet.java (rev 0)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/wseventing/EventSinkServlet.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -0,0 +1,72 @@
+/*
+ * 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.wseventing;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.jboss.ws.core.utils.DOMUtils;
+import org.jboss.ws.core.utils.DOMWriter;
+import org.w3c.dom.Element;
+
+/**
+ * Simulates an eventsink endpoint.
+ *
+ * @author Heiko Braun, <heiko(a)openj.net>
+ * @since 05-Jan-2006
+ */
+public class EventSinkServlet extends HttpServlet {
+
+ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+ doRequest(request,response);
+ }
+
+ protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+ doRequest(request,response);
+ }
+
+ protected void doRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+
+ StringBuffer sb = new StringBuffer();
+ BufferedReader reader = request.getReader();
+
+ String s = reader.readLine();
+ sb.append( s );
+ while(s!=null)
+ {
+ s = reader.readLine();
+ if(s!=null)
+ sb.append(s);
+ }
+
+ reader.close();
+
+ Element soapEl = DOMUtils.parse(sb.toString());
+ String pretty = DOMWriter.printNode(soapEl, true);
+ getServletContext().log("EventSink received: \n" + pretty);
+ }
+}
Added: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/wseventing/EventingSupport.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/wseventing/EventingSupport.java (rev 0)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/wseventing/EventingSupport.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -0,0 +1,245 @@
+/*
+ * 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.wseventing;
+
+import org.jboss.test.ws.JBossWSTest;
+import org.jboss.ws.core.StubExt;
+import org.jboss.ws.core.soap.SOAPElementImpl;
+import org.jboss.ws.extensions.addressing.AddressingClientUtil;
+import org.jboss.ws.extensions.eventing.EventingConstants;
+import org.jboss.ws.extensions.eventing.jaxws.*;
+import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
+
+import javax.xml.namespace.QName;
+import javax.xml.rpc.Stub;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Service;
+import javax.xml.ws.addressing.AddressingBuilder;
+import javax.xml.ws.addressing.AddressingProperties;
+import javax.xml.ws.addressing.EndpointReference;
+import javax.xml.ws.addressing.JAXWSAConstants;
+import java.net.MalformedURLException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URL;
+
+/**
+ * Eventing test case support.
+ *
+ * @author Heiko Braun, <heiko(a)openj.net>
+ * @since 17-Jan-2006
+ */
+public class EventingSupport extends JBossWSTest
+{
+
+ EventSourceEndpoint eventSourcePort;
+
+ SubscriptionManagerEndpoint managerPort;
+
+ protected URI eventSourceURI = null;
+
+ private static int msgId = 0;
+
+ URL wsdlLocation;
+
+ protected String eventString =
+ "<WindReport type='critical'>\n" +
+ " <Date>030701</Date>\n" +
+ " <Time>0041</Time>\n" +
+ " <Speed>65</Speed>\n" +
+ " <Location>BRADENTON BEACH</Location>\n" +
+ " <County>MANATEE</County>\n" +
+ " <State>FL</State>\n" +
+ " <Lat>2746</Lat>\n" +
+ " <Long>8270</Long>\n" +
+ " <Comments xml:lang='en-US' >\n" +
+ " WINDS 55 WITH GUSTS TO 65. ROOF TORN OFF BOAT HOUSE. REPORTED\n" +
+ " BY STORM SPOTTER. (TBW)\n" +
+ " </Comments>\n" +
+ "</WindReport>";
+
+ protected static AddressingBuilder addrBuilder = AddressingBuilder.getAddressingBuilder();
+
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+
+ eventSourceURI = new URI("http://schemas.xmlsoap.org/ws/2004/08/eventing/Warnings");
+ wsdlLocation = new URL("http://" + getServerHost() + ":8080/jaxws-wseventing/subscribe?wsdl");
+
+ if (eventSourcePort == null)
+ {
+ Service service = Service.create(wsdlLocation, new QName("","EventingService"));
+ eventSourcePort = (EventSourceEndpoint)service.getPort(EventSourceEndpoint.class);
+ managerPort = (SubscriptionManagerEndpoint)service.getPort(SubscriptionManagerEndpoint.class);
+
+ ((StubExt)eventSourcePort).setConfigName("Standard WSAddressing Client");
+ ((StubExt)managerPort).setConfigName("Standard WSAddressing Client");
+
+ }
+ }
+
+ protected void tearDown() throws Exception
+ {
+
+ super.tearDown();
+
+ // remove event source
+ /*ObjectName oname = EventingConstants.getSubscriptionManagerName();
+ getServer().invoke(oname, "removeEventSource", new Object[] { new URI(eventSourceURI) }, new String[] { "java.net.URI" });
+ */
+ }
+
+ // ----------------------------------------------------------------------------
+ protected SubscribeResponse doSubscribe()
+ {
+
+ try
+ {
+ // append message correlation headers
+ AddressingProperties requestProps = AddressingClientUtil.createDefaultProps(
+ EventingConstants.SUBSCRIBE_ACTION, eventSourceURI.toString()
+ );
+ requestProps.setMessageID(AddressingClientUtil.createMessageID());
+ setRequestProperties((BindingProvider) eventSourcePort, requestProps);
+
+ // subscription
+ Subscribe request = new Subscribe();
+
+ DeliveryType delivery = getDefaultDelivery();
+ request.setDelivery(delivery);
+ request.setEndTo(delivery.getNotifyTo());
+ request.setFilter(getDefaultFilter());
+ //request.setExpires(new Date());
+
+ SubscribeResponse subscribeResponse = eventSourcePort.subscribeOp(request);
+ assertNotNull(subscribeResponse);
+
+ AddressingProperties responseProps = getResponseProperties((BindingProvider)eventSourcePort);
+ assertEquals(EventingConstants.SUBSCRIBE_RESPONSE_ACTION, responseProps.getAction().getURI().toString());
+
+ return subscribeResponse;
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException("Failed to create subscription: ", e);
+ }
+
+ }
+
+ protected DeliveryType getDefaultDelivery()
+ {
+ try
+ {
+ DeliveryType delivery = new DeliveryType();
+ delivery.setMode(EventingConstants.getDeliveryPush().toString());
+ EndpointReferenceType notifyEPR = new EndpointReferenceType();
+ AttributedURIType attURI = new AttributedURIType();
+ attURI.setValue("http://" + getServerHost() + ":8080/jaxws-wseventing/eventSink");
+ notifyEPR.setAddress(attURI);
+ delivery.setNotifyTo(notifyEPR);
+ return delivery;
+ }
+ catch (Exception e)
+ {
+ throw new IllegalStateException("Failed to create delivery payload", e);
+ }
+ }
+
+ protected FilterType getDefaultFilter()
+ {
+ FilterType filter = new FilterType();
+ filter.setDialect(EventingConstants.getDialectXPath().toString());
+ filter.getContent().add("/WindReport/State/text()='FL'");
+ return filter;
+ }
+
+ public static void setSubscriptionId(Stub stub, URI identifier)
+ {
+ stub._setProperty("subscriptionId", identifier);
+ }
+
+ public static URI setMessageId(Stub stub) throws Exception
+ {
+ URI messageId = new URI("http://www.example.org/eventSink/message#" + (msgId++));
+ //stub._setProperty(SOAPClientHandler.CLIENT_ADDRESSING_REQUEST_MESSAGE_ID, messageId);
+ return messageId;
+ }
+
+ protected void assertReplyAction(Stub stub, URI expectedAction) throws Exception
+ {
+ // see AddrConstraintsHandler
+ stub._setProperty("wsa:expectedReplyAction", expectedAction);
+ }
+
+ protected void assertRelatesTo(Stub stub, URI expectedRelatesTo) throws Exception
+ {
+ // see AddrConstraintsHandler
+ stub._setProperty("wsa:expectedRelatesTo", expectedRelatesTo);
+ }
+
+ protected void assertWSDLAccess() throws MalformedURLException
+ {
+ WSDLDefinitionsFactory factory = WSDLDefinitionsFactory.newInstance();
+ WSDLDefinitions wsdlDefinitions = factory.parse(wsdlLocation);
+ assertNotNull(wsdlDefinitions);
+ }
+
+ public static void setRequestProperties(BindingProvider provider, AddressingProperties props) {
+ provider.getRequestContext().put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, props);
+ }
+
+ protected AddressingProperties getResponseProperties(BindingProvider provider) {
+ return (AddressingProperties)provider.getResponseContext().get(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_INBOUND);
+ }
+
+ public static AddressingProperties buildFollowupProperties(SubscribeResponse response, String wsaAction, String wsaTo) {
+ try
+ {
+ AddressingProperties followupProps = addrBuilder.newAddressingProperties();
+
+ //followupProps.setTo(addrBuilder.newURI(wsaTo));
+ followupProps.setAction(addrBuilder.newURI(wsaAction));
+ followupProps.setMessageID(AddressingClientUtil.createMessageID());
+
+ // necessary in order to parse ref params
+ EndpointReference epr = addrBuilder.newEndpointReference(new URI(wsaTo));
+
+ String subscriptionID = response.getSubscriptionId();
+ SOAPElementImpl element = new SOAPElementImpl(
+ "Identifier",
+ "wse", "http://schemas.xmlsoap.org/ws/2004/08/eventing"
+ );
+ element.setValue(subscriptionID);
+ epr.getReferenceParameters().addElement(element);
+
+ followupProps.initializeAsDestination(epr);
+
+ return followupProps;
+ }
+ catch (URISyntaxException e)
+ {
+ throw new IllegalArgumentException(e.getMessage());
+ }
+ }
+}
Added: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/wseventing/EventingTestCase.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/wseventing/EventingTestCase.java (rev 0)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/wseventing/EventingTestCase.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -0,0 +1,248 @@
+/*
+ * 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.wseventing;
+
+// $Id: EventingTestCase.java 1757 2006-12-22 15:40:24Z thomas.diesler(a)jboss.com $
+
+import junit.framework.Test;
+import org.jboss.test.ws.JBossWSTestSetup;
+import org.jboss.ws.extensions.addressing.AddressingClientUtil;
+import org.jboss.ws.extensions.eventing.EventingConstants;
+import org.jboss.ws.extensions.eventing.jaxws.*;
+
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.addressing.AddressingProperties;
+import java.net.URI;
+import java.util.Date;
+
+/**
+ * Test the eventing endpoints.
+ *
+ * @author heiko(a)openj.net
+ * @since 29-Apr-2005
+ */
+public class EventingTestCase extends EventingSupport {
+
+ public static Test suite()
+ {
+ return JBossWSTestSetup.newTestSetup(EventingTestCase.class, "jaxws-wseventing.war");
+ }
+
+ // ----------------------------------------------------------------------------
+
+ public void testExpireDateInPast() throws Exception
+ {
+ assertWSDLAccess();
+
+ //
+ // If the expiration time is either a zero duration or a specific time that occurs in
+ // the past according to the event source, then the request MUST fail,
+ // and the event source MAY generate a wse:InvalidExpirationTime fault indicating
+ // that an invalid expiration time was requested.
+ //
+
+ AddressingProperties requestProps = AddressingClientUtil.createDefaultProps(
+ EventingConstants.SUBSCRIBE_ACTION, eventSourceURI.toString()
+ );
+ requestProps.setMessageID(AddressingClientUtil.createMessageID());
+ setRequestProperties((BindingProvider)eventSourcePort, requestProps);
+
+ Subscribe request = new Subscribe();
+ DeliveryType delivery = getDefaultDelivery();
+ request.setDelivery(delivery);
+ request.setEndTo(delivery.getNotifyTo());
+ request.setExpires(new Date(System.currentTimeMillis() - 1000 * 60 * 60)); // invalid lease time
+ request.setFilter(getDefaultFilter());
+
+ try
+ {
+ SubscribeResponse subscribeResponse = eventSourcePort.subscribeOp(request);
+ fail("Subscription should fail due to invalid lease time");
+ }
+ catch (Exception e)
+ {
+ // ignore expected exception
+ }
+ catch(Throwable t) {
+ fail(t.getMessage()); // can be thrown by AddrConstraintsHandler
+ }
+ }
+
+ public void testExpireDatePastMax() throws Exception
+ {
+ assertWSDLAccess();
+
+ //
+ // If such a source receives a Subscribe request containing a specific time expiration,
+ // then the request MAY fail; if so, the event source MAY generate a
+ // wse:UnsupportedExpirationType fault indicating that an unsupported expiration type was requested.
+ //
+
+ AddressingProperties requestProps = AddressingClientUtil.createDefaultProps(
+ EventingConstants.SUBSCRIBE_ACTION, eventSourceURI.toString()
+ );
+ requestProps.setMessageID(AddressingClientUtil.createMessageID());
+ setRequestProperties((BindingProvider)eventSourcePort, requestProps);
+
+ Subscribe request = new Subscribe();
+ DeliveryType delivery = getDefaultDelivery();
+ request.setDelivery(delivery);
+ request.setEndTo(delivery.getNotifyTo());
+ request.setExpires(new Date(System.currentTimeMillis() + EventingConstants.MAX_LEASE_TIME + 1000));
+ request.setFilter(getDefaultFilter());
+
+ try
+ {
+ SubscribeResponse subscribeResponse = eventSourcePort.subscribeOp(request);
+ fail("Subscription should fail due to exceedd max lease time");
+ }
+ catch (Exception e)
+ {
+ // ignore expected exception
+ }
+ catch(Throwable t) {
+ fail(t.getMessage()); // can be thrown by AddrConstraintsHandler
+ }
+ }
+
+ public void testRenewal() throws Exception {
+ assertWSDLAccess();
+
+ //
+ // To update the expiration for a subscription,
+ // subscription managers MUST support requests to renew subscriptions.
+ //
+ SubscribeResponse response = doSubscribe();
+
+ AddressingProperties requestProps =
+ buildFollowupProperties(response, EventingConstants.RENEW_ACTION, eventSourceURI.toString());
+ setRequestProperties((BindingProvider)managerPort, requestProps);
+
+ Date oldLeaseTime = response.getExpires();
+ Renew renewRequest = new Renew();
+ RenewResponse renewResponse = managerPort.renewOp(renewRequest);
+ assertNotNull(renewResponse);
+ assertNotNull(renewResponse.getExpires());
+ AddressingProperties responseProps = getResponseProperties((BindingProvider)managerPort);
+ assertEquals(responseProps.getAction().getURI().toString(), EventingConstants.RENEW_RESPONSE_ACTION);
+ assertTrue("Lease time not increased", oldLeaseTime.getTime() < renewResponse.getExpires().getTime());
+ }
+
+ public void testSubscriptionStatus() throws Exception
+ {
+ //
+ // If the subscription is valid and has not expired,
+ // the subscription manager MUST reply with the actual lease time.
+ //
+ SubscribeResponse response = doSubscribe();
+
+ AddressingProperties requestProps =
+ buildFollowupProperties(response, EventingConstants.GET_STATUS_ACTION, eventSourceURI.toString());
+ setRequestProperties((BindingProvider)managerPort, requestProps);
+
+ Date expectedLeaseTime = response.getExpires();
+ GetStatusResponse statusResponse = managerPort.getStatusOp(new GetStatus());
+
+ assertNotNull(statusResponse);
+ assertNotNull(statusResponse.getExpires());
+
+ AddressingProperties responseProps = getResponseProperties((BindingProvider)managerPort);
+ assertEquals(responseProps.getAction().getURI().toString(), EventingConstants.GET_STATUS_RESPONSE_ACTION);
+ assertEquals("Incorrect lease time", expectedLeaseTime, statusResponse.getExpires());
+ }
+
+ public void testUnsubscribe() throws Exception
+ {
+ assertWSDLAccess();
+
+ // Though subscriptions expire eventually, to minimize resources,
+ // the subscribing event sink SHOULD explicitly delete a subscription
+ // when it no longer wants notifications associated with the subscription.
+ SubscribeResponse response = doSubscribe();
+
+ AddressingProperties requestProps =
+ buildFollowupProperties(response, EventingConstants.UNSUBSCRIBE_ACTION, eventSourceURI.toString());
+ setRequestProperties((BindingProvider)managerPort, requestProps);
+
+ Unsubscribe unsubscribeRequest = new Unsubscribe();
+ managerPort.unsubscribeOp(unsubscribeRequest);
+
+ AddressingProperties responseProps = getResponseProperties((BindingProvider)managerPort);
+ assertEquals(responseProps.getAction().getURI().toString(), EventingConstants.UNSUBSCRIBE_RESPONSE_ACTION);
+
+ try
+ {
+
+ AddressingProperties renewProps =
+ buildFollowupProperties(response, EventingConstants.RENEW_ACTION, eventSourceURI.toString());
+ setRequestProperties((BindingProvider)managerPort, requestProps);
+
+ Renew renewRequest = new Renew();
+ managerPort.renewOp(renewRequest); // this should fail
+
+ fail("Subscription not removed");
+ }
+ catch (Exception e)
+ {
+ //
+ }
+ }
+
+ // Header/wsa:RelatesTo MUST be the value of the wsa:MessageID of the corresponding request.
+ public void testMessageCorrelation()
+ {
+ // this is actually tested within subscribe operations.
+ // look for usage of assertRelatesTo()
+ }
+
+ //
+ // "http://schemas.xmlsoap.org/ws/2004/08/eventing/DeliveryFailure"
+ // This value MUST be used if the event source terminated the subscription
+ // because of problems delivering notifications.
+ //
+ public void testSubscriptionEndMessage()
+ {
+ System.out.println("FIXME: [JBWS-798] Complete EventingTestCase");
+ }
+
+ //
+ // "http://schemas.xmlsoap.org/ws/2004/08/eventing/SourceShuttingDown"
+ // This value MUST be used if the event source terminated the subscription
+ // because the source is being shut down in a controlled manner;
+ // that is, if the event source is being shut down but has the opportunity
+ // to send a SubscriptionEnd message before it exits.
+ //
+ public void testShutdownMessage()
+ {
+ System.out.println("FIXME: [JBWS-798] Complete EventingTestCase");
+ }
+
+ //
+ // "http://schemas.xmlsoap.org/ws/2004/08/eventing/SourceCanceling"
+ // This value MUST be used if the event source terminated the subscription
+ // for some other reason before it expired.
+ //
+ public void testCancelMessage()
+ {
+ System.out.println("FIXME: [JBWS-798] Complete EventingTestCase");
+ }
+}
Added: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/wseventing/NotificationTestCase.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/wseventing/NotificationTestCase.java (rev 0)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/wseventing/NotificationTestCase.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -0,0 +1,69 @@
+/*
+ * 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.wseventing;
+
+// $Id: NotificationTestCase.java 1757 2006-12-22 15:40:24Z thomas.diesler(a)jboss.com $
+
+import javax.naming.InitialContext;
+
+import junit.framework.Test;
+
+import org.jboss.test.ws.JBossWSTestSetup;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.jboss.ws.extensions.eventing.EventingConstants;
+import org.jboss.ws.extensions.eventing.jaxws.SubscribeResponse;
+import org.jboss.ws.extensions.eventing.mgmt.EventDispatcher;
+import org.w3c.dom.Element;
+
+/**
+ * Test the notification delivery.
+ *
+ * @author heiko(a)openj.net
+ * @since 29-Apr-2005
+ */
+public class NotificationTestCase extends EventingSupport
+{
+ public static Test suite()
+ {
+ return JBossWSTestSetup.newTestSetup(NotificationTestCase.class, "jaxws-wseventing.war");
+ }
+
+ public void testNotification() throws Exception {
+
+ SubscribeResponse response = doSubscribe();
+
+ Element payload = DOMUtils.parse(eventString);
+ try
+ {
+ InitialContext iniCtx = getInitialContext();
+ EventDispatcher delegate = (EventDispatcher)
+ iniCtx.lookup(EventingConstants.DISPATCHER_JNDI_NAME);
+ delegate.dispatch(eventSourceURI, payload);
+ Thread.sleep(3000);
+ }
+ catch (Exception e)
+ {
+ throw e;
+ }
+ }
+
+}
Added: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/wseventing/SubscriptionManagerTestCase.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/wseventing/SubscriptionManagerTestCase.java (rev 0)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/wseventing/SubscriptionManagerTestCase.java 2007-01-18 12:54:34 UTC (rev 1994)
@@ -0,0 +1,204 @@
+/*
+ * 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.wseventing;
+
+// $Id: SubscriptionManagerTestCase.java 1971 2007-01-15 16:31:58Z heiko.braun(a)jboss.com $
+
+import java.net.URI;
+import java.util.Date;
+
+import org.jboss.test.ws.JBossWSTest;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.jboss.ws.extensions.eventing.EventingConstants;
+import org.jboss.ws.extensions.eventing.jaxws.EndpointReferenceType;
+import org.jboss.ws.extensions.eventing.jaxws.AttributedURIType;
+import org.jboss.ws.extensions.eventing.deployment.EventingEndpointDI;
+import org.jboss.ws.extensions.eventing.mgmt.Filter;
+import org.jboss.ws.extensions.eventing.mgmt.SubscriptionManager;
+import org.jboss.ws.extensions.eventing.mgmt.SubscriptionTicket;
+import org.w3c.dom.Element;
+
+import javax.xml.namespace.QName;
+
+/**
+ * SubscriptionManagerEndpoint unit tests.
+ *
+ * @author Heiko Braun, <heiko(a)openj.net>
+ * @since 02-Dec-2005
+ */
+public class SubscriptionManagerTestCase extends JBossWSTest
+{
+
+ private SubscriptionManager subscriptionManager;
+ private URI eventSourceNS;
+ private EndpointReferenceType eventSinkEndpoint;
+
+ private String eventString =
+ "<WindReport type='critical'>\n" +
+ " <Date>030701</Date>\n" +
+ " <Time>0041</Time>\n" +
+ " <Speed>65</Speed>\n" +
+ " <Location>BRADENTON BEACH</Location>\n" +
+ " <County>MANATEE</County>\n" +
+ " <State>FL</State>\n" +
+ " <Lat>2746</Lat>\n" +
+ " <Long>8270</Long>\n" +
+ " <Comments xml:lang='en-US' >\n" +
+ " WINDS 55 WITH GUSTS TO 65. ROOF TORN OFF BOAT HOUSE. REPORTED\n" +
+ " BY STORM SPOTTER. (TBW)\n" +
+ " </Comments>\n" +
+ "</WindReport>";
+
+ /**
+ * see http://www.w3.org/TR/xpath
+ */
+ private String filterExpr = "/WindReport/State/text()='FL'";
+
+ protected void setUp() throws Exception {
+ super.setUp();
+ init();
+ }
+
+ private void init()
+ {
+ try
+ {
+ EventingEndpointDI deploymentInfo = new EventingEndpointDI("http://schemas.xmlsoap.org/ws/2004/08/eventing/Warnings", null, null);
+ deploymentInfo.setEndpointAddress("http://localhost:8080/jaxws-wseventing/manage");
+ deploymentInfo.setPortName(new QName("http://schemas.xmlsoap.org/ws/2004/08/eventing","SubscriptionManagerPort"));
+
+ subscriptionManager = new SubscriptionManager();
+ subscriptionManager.registerEventSource(deploymentInfo);
+ subscriptionManager.registerEventSource(deploymentInfo);
+ subscriptionManager.start();
+
+ eventSinkEndpoint = new EndpointReferenceType();
+ AttributedURIType attrURI = new AttributedURIType();
+ attrURI.setValue("http://www.other.example.com/OnStormWarning");
+ eventSinkEndpoint.setAddress(attrURI);
+
+ eventSourceNS = new URI("http://schemas.xmlsoap.org/ws/2004/08/eventing/Warnings");
+
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ throw new IllegalStateException(e.getMessage());
+ }
+ }
+
+ public void testSimpleSubscription() throws Exception
+ {
+ SubscriptionTicket subscriptionTicket = subscriptionManager.subscribe(
+ eventSourceNS, eventSinkEndpoint, eventSinkEndpoint, null, null
+ );
+
+ assertNotNull(subscriptionTicket.getIdentifier());
+ assertNotNull(subscriptionTicket.getExpires());
+ assertTrue(subscriptionTicket.getExpires().getTime() > System.currentTimeMillis());
+ assertNotNull(subscriptionTicket.getSubscriptionManager());
+ }
+
+ /**
+ * If the expiration time is either a zero duration or a specific time that occurs in
+ * the past according to the event source, then the request MUST fail,
+ * and the event source MAY generate a wse:InvalidExpirationTime fault indicating
+ * that an invalid expiration time was requested.
+ */
+
+ public void testInvalidLeasetime() throws Exception
+ {
+ try
+ {
+ Date expires = new Date(System.currentTimeMillis() - 5000);
+ subscriptionManager.subscribe(eventSourceNS, eventSinkEndpoint, eventSinkEndpoint, expires, null);
+ fail("Expiration time was invalid");
+ }
+ catch (Exception e)
+ {
+ // ignore expected exception
+ }
+ }
+
+ public void testExceedsMaxLeaseTime() throws Exception
+ {
+ try
+ {
+ Date expires = new Date(System.currentTimeMillis() + EventingConstants.MAX_LEASE_TIME + 5000);
+ subscriptionManager.subscribe(eventSourceNS, eventSinkEndpoint, eventSinkEndpoint, expires, null);
+ fail("Expiration time exceeds lease limit");
+ }
+ catch (Exception e)
+ {
+ // ignore expected exception
+ }
+ }
+
+ /**
+ * If the expression evaluates to false for a notification,
+ * the notification MUST NOT be sent to the event sink.
+ * Implied value is an expression that always returns true.
+ * If the event source does not support filtering, then a request that specifies a filter MUST fail,
+ * and the event source MAY generate a wse:FilteringNotSupported fault indicating that filtering is not supported.
+ * If the event source supports filtering but cannot honor the requested filtering,
+ * the request MUST fail, and the event source MAY generate a wse:FilteringRequestedUnavailable
+ * fault indicating that the requested filter dialect is not supported.
+ */
+
+ public void testFilterConstraints() throws Exception
+ {
+ try
+ {
+ Filter filter = new Filter(new URI("http://example.org/unkownFilter"), filterExpr);
+ Date expires = new Date(System.currentTimeMillis() + 5000);
+ subscriptionManager.subscribe(eventSourceNS, eventSinkEndpoint, eventSinkEndpoint, expires, filter);
+ fail("Filtering should not be available");
+ }
+ catch (Exception e)
+ {
+ // ignore expected exception
+ }
+ }
+
+ public void testDispatch() throws Exception
+ {
+ for (int i = 0; i < 5; i++)
+ {
+ Date expires = new Date(System.currentTimeMillis() + 5000);
+ subscriptionManager.subscribe(eventSourceNS, eventSinkEndpoint, eventSinkEndpoint, expires, null);
+ }
+
+ Element payload = DOMUtils.parse(eventString);
+ subscriptionManager.dispatch(eventSourceNS, payload);
+ }
+
+ public void testXPathFilter() throws Exception
+ {
+
+ Date expires = new Date(System.currentTimeMillis() + 5000);
+ Filter filter = new Filter(new URI("http://www.w3.org/TR/1999/REC-xpath-19991116"), filterExpr);
+ subscriptionManager.subscribe(eventSourceNS, eventSinkEndpoint, eventSinkEndpoint, expires, filter);
+
+ Element event = DOMUtils.parse(eventString);
+ subscriptionManager.dispatch(eventSourceNS, event);
+ }
+}
Modified: trunk/jbossws-tests/src/main/resources/jaxrpc/samples/wseventing/META-INF/application-client.xml
===================================================================
--- trunk/jbossws-tests/src/main/resources/jaxrpc/samples/wseventing/META-INF/application-client.xml 2007-01-18 12:00:15 UTC (rev 1993)
+++ trunk/jbossws-tests/src/main/resources/jaxrpc/samples/wseventing/META-INF/application-client.xml 2007-01-18 12:54:34 UTC (rev 1994)
@@ -8,16 +8,16 @@
<service-ref>
<service-ref-name>service/SysmonService</service-ref-name>
- <service-interface>org.jboss.ws.extensions.eventing.EventingService</service-interface>
+ <service-interface>org.jboss.ws.extensions.eventing.jaxrpc.EventingService</service-interface>
<wsdl-file>META-INF/wsdl/sysmon.wsdl</wsdl-file>
<jaxrpc-mapping-file>META-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
<port-component-ref>
- <service-endpoint-interface>org.jboss.ws.extensions.eventing.EventSourceEndpoint</service-endpoint-interface>
+ <service-endpoint-interface>org.jboss.ws.extensions.eventing.jaxrpc.EventSourceEndpoint</service-endpoint-interface>
</port-component-ref>
<port-component-ref>
- <service-endpoint-interface>org.jboss.ws.extensions.eventing.SubscriptionManagerEndpoint</service-endpoint-interface>
+ <service-endpoint-interface>org.jboss.ws.extensions.eventing.jaxrpc.SubscriptionManagerEndpoint</service-endpoint-interface>
</port-component-ref>
<handler>
Modified: trunk/jbossws-tests/src/main/resources/jaxrpc/samples/wseventing/WEB-INF/jaxrpc-mapping.xml
===================================================================
--- trunk/jbossws-tests/src/main/resources/jaxrpc/samples/wseventing/WEB-INF/jaxrpc-mapping.xml 2007-01-18 12:00:15 UTC (rev 1993)
+++ trunk/jbossws-tests/src/main/resources/jaxrpc/samples/wseventing/WEB-INF/jaxrpc-mapping.xml 2007-01-18 12:54:34 UTC (rev 1994)
@@ -8,14 +8,14 @@
</package-mapping>
<java-xml-type-mapping>
- <java-type>org.jboss.ws.extensions.eventing.element.SubscribeRequest</java-type>
+ <java-type>org.jboss.ws.extensions.eventing.jaxrpc.element.SubscribeRequest</java-type>
<root-type-qname xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
typeNS:Subscribe</root-type-qname>
<qname-scope>element</qname-scope>
</java-xml-type-mapping>
<java-xml-type-mapping>
- <java-type>org.jboss.ws.extensions.eventing.element.SubscribeRequest</java-type>
+ <java-type>org.jboss.ws.extensions.eventing.jaxrpc.element.SubscribeRequest</java-type>
<anonymous-type-qname xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
typeNS:>Subscribe</anonymous-type-qname>
<qname-scope>complexType</qname-scope>
@@ -42,7 +42,7 @@
</java-xml-type-mapping>
<java-xml-type-mapping>
- <java-type>org.jboss.ws.extensions.eventing.element.FilterType</java-type>
+ <java-type>org.jboss.ws.extensions.eventing.jaxrpc.element.FilterType</java-type>
<root-type-qname xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
typeNS:FilterType</root-type-qname>
<qname-scope>complexType</qname-scope>
@@ -57,7 +57,7 @@
</java-xml-type-mapping>
<java-xml-type-mapping>
- <java-type>org.jboss.ws.extensions.eventing.element.DeliveryType</java-type>
+ <java-type>org.jboss.ws.extensions.eventing.jaxrpc.element.DeliveryType</java-type>
<root-type-qname xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
typeNS:DeliveryType</root-type-qname>
<qname-scope>complexType</qname-scope>
@@ -76,14 +76,14 @@
</java-xml-type-mapping>
<java-xml-type-mapping>
- <java-type>org.jboss.ws.extensions.eventing.element.SubscriptionEndRequest</java-type>
+ <java-type>org.jboss.ws.extensions.eventing.jaxrpc.element.SubscriptionEndRequest</java-type>
<root-type-qname xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
typeNS:SubscriptionEnd</root-type-qname>
<qname-scope>element</qname-scope>
</java-xml-type-mapping>
<java-xml-type-mapping>
- <java-type>org.jboss.ws.extensions.eventing.element.SubscriptionEndRequest</java-type>
+ <java-type>org.jboss.ws.extensions.eventing.jaxrpc.element.SubscriptionEndRequest</java-type>
<anonymous-type-qname xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
typeNS:>SubscriptionEnd</anonymous-type-qname>
<qname-scope>complexType</qname-scope>
@@ -102,14 +102,14 @@
</java-xml-type-mapping>
<java-xml-type-mapping>
- <java-type>org.jboss.ws.extensions.eventing.element.SubscribeResponse</java-type>
+ <java-type>org.jboss.ws.extensions.eventing.jaxrpc.element.SubscribeResponse</java-type>
<root-type-qname xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
typeNS:SubscribeResponse</root-type-qname>
<qname-scope>element</qname-scope>
</java-xml-type-mapping>
<java-xml-type-mapping>
- <java-type>org.jboss.ws.extensions.eventing.element.SubscribeResponse</java-type>
+ <java-type>org.jboss.ws.extensions.eventing.jaxrpc.element.SubscribeResponse</java-type>
<anonymous-type-qname xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
typeNS:>SubscribeResponse</anonymous-type-qname>
<qname-scope>complexType</qname-scope>
@@ -124,13 +124,13 @@
</java-xml-type-mapping>
<java-xml-type-mapping>
- <java-type>org.jboss.ws.extensions.eventing.element.EndpointReference</java-type>
+ <java-type>org.jboss.ws.extensions.eventing.jaxrpc.element.EndpointReference</java-type>
<root-type-qname xmlns:typeNS="http://www.w3.org/2005/08/addressing">typeNS:EndpointReference</root-type-qname>
<qname-scope>element</qname-scope>
</java-xml-type-mapping>
<java-xml-type-mapping>
- <java-type>org.jboss.ws.extensions.eventing.element.EndpointReference</java-type>
+ <java-type>org.jboss.ws.extensions.eventing.jaxrpc.element.EndpointReference</java-type>
<root-type-qname xmlns:typeNS="http://www.w3.org/2005/08/addressing">
typeNS:EndpointReferenceType</root-type-qname>
<qname-scope>complexType</qname-scope>
@@ -149,13 +149,13 @@
</java-xml-type-mapping>
<java-xml-type-mapping>
- <java-type>org.jboss.ws.extensions.eventing.element.MetaData</java-type>
+ <java-type>org.jboss.ws.extensions.eventing.jaxrpc.element.MetaData</java-type>
<root-type-qname xmlns:typeNS="http://www.w3.org/2005/08/addressing">typeNS:Metadata</root-type-qname>
<qname-scope>element</qname-scope>
</java-xml-type-mapping>
<!--java-xml-type-mapping>
- <java-type>org.jboss.ws.extensions.eventing.element.MetaData</java-type>
+ <java-type>org.jboss.ws.extensions.eventing.jaxrpc.element.MetaData</java-type>
<root-type-qname xmlns:typeNS="http://www.w3.org/2005/08/addressing">typeNS:MetadataType</root-type-qname>
<qname-scope>complexType</qname-scope>
<variable-mapping>
@@ -165,13 +165,13 @@
</java-xml-type-mapping-->
<java-xml-type-mapping>
- <java-type>org.jboss.ws.extensions.eventing.element.RenewRequest</java-type>
+ <java-type>org.jboss.ws.extensions.eventing.jaxrpc.element.RenewRequest</java-type>
<root-type-qname xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">typeNS:Renew</root-type-qname>
<qname-scope>element</qname-scope>
</java-xml-type-mapping>
<java-xml-type-mapping>
- <java-type>org.jboss.ws.extensions.eventing.element.RenewRequest</java-type>
+ <java-type>org.jboss.ws.extensions.eventing.jaxrpc.element.RenewRequest</java-type>
<anonymous-type-qname xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
typeNS:>Renew</anonymous-type-qname>
<qname-scope>complexType</qname-scope>
@@ -182,14 +182,14 @@
</java-xml-type-mapping>
<java-xml-type-mapping>
- <java-type>org.jboss.ws.extensions.eventing.element.RenewResponse</java-type>
+ <java-type>org.jboss.ws.extensions.eventing.jaxrpc.element.RenewResponse</java-type>
<root-type-qname xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
typeNS:RenewResponse</root-type-qname>
<qname-scope>element</qname-scope>
</java-xml-type-mapping>
<java-xml-type-mapping>
- <java-type>org.jboss.ws.extensions.eventing.element.RenewResponse</java-type>
+ <java-type>org.jboss.ws.extensions.eventing.jaxrpc.element.RenewResponse</java-type>
<anonymous-type-qname xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
typeNS:>RenewResponse</anonymous-type-qname>
<qname-scope>complexType</qname-scope>
@@ -200,7 +200,7 @@
</java-xml-type-mapping>
<java-xml-type-mapping>
- <java-type>org.jboss.ws.extensions.eventing.element.StatusRequest</java-type>
+ <java-type>org.jboss.ws.extensions.eventing.jaxrpc.element.StatusRequest</java-type>
<root-type-qname xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
typeNS:GetStatus</root-type-qname>
<qname-scope>element</qname-scope>
@@ -211,21 +211,21 @@
</java-xml-type-mapping>
<java-xml-type-mapping>
- <java-type>org.jboss.ws.extensions.eventing.element.StatusRequest</java-type>
+ <java-type>org.jboss.ws.extensions.eventing.jaxrpc.element.StatusRequest</java-type>
<anonymous-type-qname xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
typeNS:>GetStatus</anonymous-type-qname>
<qname-scope>complexType</qname-scope>
</java-xml-type-mapping>
<java-xml-type-mapping>
- <java-type>org.jboss.ws.extensions.eventing.element.StatusResponse</java-type>
+ <java-type>org.jboss.ws.extensions.eventing.jaxrpc.element.StatusResponse</java-type>
<root-type-qname xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
typeNS:GetStatusResponse</root-type-qname>
<qname-scope>element</qname-scope>
</java-xml-type-mapping>
<java-xml-type-mapping>
- <java-type>org.jboss.ws.extensions.eventing.element.StatusResponse</java-type>
+ <java-type>org.jboss.ws.extensions.eventing.jaxrpc.element.StatusResponse</java-type>
<anonymous-type-qname xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
typeNS:>GetStatusResponse</anonymous-type-qname>
<qname-scope>complexType</qname-scope>
@@ -236,7 +236,7 @@
</java-xml-type-mapping>
<java-xml-type-mapping>
- <java-type>org.jboss.ws.extensions.eventing.element.UnsubscribeRequest</java-type>
+ <java-type>org.jboss.ws.extensions.eventing.jaxrpc.element.UnsubscribeRequest</java-type>
<root-type-qname xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
typeNS:Unsubscribe</root-type-qname>
<qname-scope>element</qname-scope>
@@ -247,14 +247,14 @@
</java-xml-type-mapping>
<java-xml-type-mapping>
- <java-type>org.jboss.ws.extensions.eventing.element.UnsubscribeRequest</java-type>
+ <java-type>org.jboss.ws.extensions.eventing.jaxrpc.element.UnsubscribeRequest</java-type>
<anonymous-type-qname xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
typeNS:>Unsubscribe</anonymous-type-qname>
<qname-scope>complexType</qname-scope>
</java-xml-type-mapping>
<service-interface-mapping>
- <service-interface>org.jboss.ws.extensions.eventing.EventingService</service-interface>
+ <service-interface>org.jboss.ws.extensions.eventing.jaxrpc.EventingService</service-interface>
<wsdl-service-name xmlns:serviceNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
serviceNS:EventingService</wsdl-service-name>
<port-mapping>
@@ -268,7 +268,7 @@
</service-interface-mapping>
<service-endpoint-interface-mapping>
- <service-endpoint-interface>org.jboss.ws.extensions.eventing.EventSourceEndpoint</service-endpoint-interface>
+ <service-endpoint-interface>org.jboss.ws.extensions.eventing.jaxrpc.EventSourceEndpoint</service-endpoint-interface>
<wsdl-port-type xmlns:portTypeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
portTypeNS:EventSource</wsdl-port-type>
<wsdl-binding xmlns:bindingNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
@@ -278,7 +278,7 @@
<wsdl-operation>SubscribeOp</wsdl-operation>
<method-param-parts-mapping>
<param-position>0</param-position>
- <param-type>org.jboss.ws.extensions.eventing.element.SubscribeRequest</param-type>
+ <param-type>org.jboss.ws.extensions.eventing.jaxrpc.element.SubscribeRequest</param-type>
<wsdl-message-mapping>
<wsdl-message xmlns:wsdlMsgNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
wsdlMsgNS:SubscribeMsg</wsdl-message>
@@ -287,7 +287,7 @@
</wsdl-message-mapping>
</method-param-parts-mapping>
<wsdl-return-value-mapping>
- <method-return-value>org.jboss.ws.extensions.eventing.element.SubscribeResponse</method-return-value>
+ <method-return-value>org.jboss.ws.extensions.eventing.jaxrpc.element.SubscribeResponse</method-return-value>
<wsdl-message xmlns:wsdlMsgNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
wsdlMsgNS:SubscribeResponseMsg</wsdl-message>
<wsdl-message-part-name>body</wsdl-message-part-name>
@@ -298,7 +298,7 @@
<java-method-name>subscriptionEnd</java-method-name>
<wsdl-operation>SubscriptionEnd</wsdl-operation>
<wsdl-return-value-mapping>
- <method-return-value>org.jboss.ws.extensions.eventing.element.SubscriptionEndRequest</method-return-value>
+ <method-return-value>org.jboss.ws.extensions.eventing.jaxrpc.element.SubscriptionEndRequest</method-return-value>
<wsdl-message xmlns:wsdlMsgNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
wsdlMsgNS:SubscriptionEnd</wsdl-message>
<wsdl-message-part-name>body</wsdl-message-part-name>
@@ -308,7 +308,7 @@
</service-endpoint-interface-mapping>
<service-endpoint-interface-mapping>
- <service-endpoint-interface>org.jboss.ws.extensions.eventing.SubscriptionManagerEndpoint</service-endpoint-interface>
+ <service-endpoint-interface>org.jboss.ws.extensions.eventing.jaxrpc.SubscriptionManagerEndpoint</service-endpoint-interface>
<wsdl-port-type xmlns:portTypeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
portTypeNS:SubscriptionManager</wsdl-port-type>
@@ -320,7 +320,7 @@
<wsdl-operation>GetStatusOp</wsdl-operation>
<method-param-parts-mapping>
<param-position>0</param-position>
- <param-type>org.jboss.ws.extensions.eventing.element.StatusRequest</param-type>
+ <param-type>org.jboss.ws.extensions.eventing.jaxrpc.element.StatusRequest</param-type>
<wsdl-message-mapping>
<wsdl-message xmlns:wsdlMsgNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
wsdlMsgNS:GetStatusMsg</wsdl-message>
@@ -329,7 +329,7 @@
</wsdl-message-mapping>
</method-param-parts-mapping>
<wsdl-return-value-mapping>
- <method-return-value>org.jboss.ws.extensions.eventing.element.StatusResponse</method-return-value>
+ <method-return-value>org.jboss.ws.extensions.eventing.jaxrpc.element.StatusResponse</method-return-value>
<wsdl-message xmlns:wsdlMsgNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
wsdlMsgNS:GetStatusResponseMsg</wsdl-message>
<wsdl-message-part-name>body</wsdl-message-part-name>
@@ -341,7 +341,7 @@
<wsdl-operation>RenewOp</wsdl-operation>
<method-param-parts-mapping>
<param-position>0</param-position>
- <param-type>org.jboss.ws.extensions.eventing.element.RenewRequest</param-type>
+ <param-type>org.jboss.ws.extensions.eventing.jaxrpc.element.RenewRequest</param-type>
<wsdl-message-mapping>
<wsdl-message xmlns:wsdlMsgNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
wsdlMsgNS:RenewMsg</wsdl-message>
@@ -350,7 +350,7 @@
</wsdl-message-mapping>
</method-param-parts-mapping>
<wsdl-return-value-mapping>
- <method-return-value>org.jboss.ws.extensions.eventing.element.RenewResponse</method-return-value>
+ <method-return-value>org.jboss.ws.extensions.eventing.jaxrpc.element.RenewResponse</method-return-value>
<wsdl-message xmlns:wsdlMsgNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
wsdlMsgNS:RenewResponseMsg</wsdl-message>
<wsdl-message-part-name>body</wsdl-message-part-name>
@@ -362,7 +362,7 @@
<wsdl-operation>UnsubscribeOp</wsdl-operation>
<method-param-parts-mapping>
<param-position>0</param-position>
- <param-type>org.jboss.ws.extensions.eventing.element.UnsubscribeRequest</param-type>
+ <param-type>org.jboss.ws.extensions.eventing.jaxrpc.element.UnsubscribeRequest</param-type>
<wsdl-message-mapping>
<wsdl-message xmlns:wsdlMsgNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
wsdlMsgNS:UnsubscribeMsg</wsdl-message>
Modified: trunk/jbossws-tests/src/main/resources/jaxrpc/samples/wseventing/WEB-INF/web.xml
===================================================================
--- trunk/jbossws-tests/src/main/resources/jaxrpc/samples/wseventing/WEB-INF/web.xml 2007-01-18 12:00:15 UTC (rev 1993)
+++ trunk/jbossws-tests/src/main/resources/jaxrpc/samples/wseventing/WEB-INF/web.xml 2007-01-18 12:54:34 UTC (rev 1994)
@@ -6,11 +6,11 @@
<servlet>
<servlet-name>EventSourceServlet</servlet-name>
- <servlet-class>org.jboss.ws.extensions.eventing.EventSourceEndpointImpl</servlet-class>
+ <servlet-class>org.jboss.ws.extensions.eventing.jaxrpc.EventSourceEndpointImpl</servlet-class>
</servlet>
<servlet>
<servlet-name>SubscriptionManagerServlet</servlet-name>
- <servlet-class>org.jboss.ws.extensions.eventing.SubscriptionManagerEndpointImpl</servlet-class>
+ <servlet-class>org.jboss.ws.extensions.eventing.jaxrpc.SubscriptionManagerEndpointImpl</servlet-class>
</servlet>
<servlet-mapping>
Modified: trunk/jbossws-tests/src/main/resources/jaxrpc/samples/wseventing/WEB-INF/webservices.xml
===================================================================
--- trunk/jbossws-tests/src/main/resources/jaxrpc/samples/wseventing/WEB-INF/webservices.xml 2007-01-18 12:00:15 UTC (rev 1993)
+++ trunk/jbossws-tests/src/main/resources/jaxrpc/samples/wseventing/WEB-INF/webservices.xml 2007-01-18 12:54:34 UTC (rev 1994)
@@ -15,7 +15,7 @@
<port-component>
<port-component-name>SubscriptionManagerPort</port-component-name>
<wsdl-port>wsdl:SubscriptionManagerPort</wsdl-port>
- <service-endpoint-interface>org.jboss.ws.extensions.eventing.SubscriptionManagerEndpoint</service-endpoint-interface>
+ <service-endpoint-interface>org.jboss.ws.extensions.eventing.jaxrpc.SubscriptionManagerEndpoint</service-endpoint-interface>
<service-impl-bean>
<servlet-link>SubscriptionManagerServlet</servlet-link>
</service-impl-bean>
@@ -30,7 +30,7 @@
<port-component>
<port-component-name>EventSourcePort</port-component-name>
<wsdl-port>wsdl:EventSourcePort</wsdl-port>
- <service-endpoint-interface>org.jboss.ws.extensions.eventing.EventSourceEndpoint</service-endpoint-interface>
+ <service-endpoint-interface>org.jboss.ws.extensions.eventing.jaxrpc.EventSourceEndpoint</service-endpoint-interface>
<service-impl-bean>
<servlet-link>EventSourceServlet</servlet-link>
</service-impl-bean>
Modified: trunk/jbossws-tests/src/main/resources/jaxrpc/wseventing/META-INF/application-client.xml
===================================================================
--- trunk/jbossws-tests/src/main/resources/jaxrpc/wseventing/META-INF/application-client.xml 2007-01-18 12:00:15 UTC (rev 1993)
+++ trunk/jbossws-tests/src/main/resources/jaxrpc/wseventing/META-INF/application-client.xml 2007-01-18 12:54:34 UTC (rev 1994)
@@ -8,16 +8,16 @@
<service-ref>
<service-ref-name>service/EventingService</service-ref-name>
- <service-interface>org.jboss.ws.extensions.eventing.EventingService</service-interface>
+ <service-interface>org.jboss.ws.extensions.eventing.jaxrpc.EventingService</service-interface>
<wsdl-file>META-INF/wsdl/wind.wsdl</wsdl-file>
<jaxrpc-mapping-file>META-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
<port-component-ref>
- <service-endpoint-interface>org.jboss.ws.extensions.eventing.EventSourceEndpoint</service-endpoint-interface>
+ <service-endpoint-interface>org.jboss.ws.extensions.eventing.jaxrpc.EventSourceEndpoint</service-endpoint-interface>
</port-component-ref>
<port-component-ref>
- <service-endpoint-interface>org.jboss.ws.extensions.eventing.SubscriptionManagerEndpoint</service-endpoint-interface>
+ <service-endpoint-interface>org.jboss.ws.extensions.eventing.jaxrpc.SubscriptionManagerEndpoint</service-endpoint-interface>
</port-component-ref>
<handler>
Modified: trunk/jbossws-tests/src/main/resources/jaxrpc/wseventing/WEB-INF/jaxrpc-mapping.xml
===================================================================
--- trunk/jbossws-tests/src/main/resources/jaxrpc/wseventing/WEB-INF/jaxrpc-mapping.xml 2007-01-18 12:00:15 UTC (rev 1993)
+++ trunk/jbossws-tests/src/main/resources/jaxrpc/wseventing/WEB-INF/jaxrpc-mapping.xml 2007-01-18 12:54:34 UTC (rev 1994)
@@ -8,14 +8,14 @@
</package-mapping>
<java-xml-type-mapping>
- <java-type>org.jboss.ws.extensions.eventing.element.SubscribeRequest</java-type>
+ <java-type>org.jboss.ws.extensions.eventing.jaxrpc.element.SubscribeRequest</java-type>
<root-type-qname xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
typeNS:Subscribe</root-type-qname>
<qname-scope>element</qname-scope>
</java-xml-type-mapping>
<java-xml-type-mapping>
- <java-type>org.jboss.ws.extensions.eventing.element.SubscribeRequest</java-type>
+ <java-type>org.jboss.ws.extensions.eventing.jaxrpc.element.SubscribeRequest</java-type>
<anonymous-type-qname xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
typeNS:>Subscribe</anonymous-type-qname>
<qname-scope>complexType</qname-scope>
@@ -42,7 +42,7 @@
</java-xml-type-mapping>
<java-xml-type-mapping>
- <java-type>org.jboss.ws.extensions.eventing.element.FilterType</java-type>
+ <java-type>org.jboss.ws.extensions.eventing.jaxrpc.element.FilterType</java-type>
<root-type-qname xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
typeNS:FilterType</root-type-qname>
<qname-scope>complexType</qname-scope>
@@ -57,7 +57,7 @@
</java-xml-type-mapping>
<java-xml-type-mapping>
- <java-type>org.jboss.ws.extensions.eventing.element.DeliveryType</java-type>
+ <java-type>org.jboss.ws.extensions.eventing.jaxrpc.element.DeliveryType</java-type>
<root-type-qname xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
typeNS:DeliveryType</root-type-qname>
<qname-scope>complexType</qname-scope>
@@ -76,14 +76,14 @@
</java-xml-type-mapping>
<java-xml-type-mapping>
- <java-type>org.jboss.ws.extensions.eventing.element.SubscriptionEndRequest</java-type>
+ <java-type>org.jboss.ws.extensions.eventing.jaxrpc.element.SubscriptionEndRequest</java-type>
<root-type-qname xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
typeNS:SubscriptionEnd</root-type-qname>
<qname-scope>element</qname-scope>
</java-xml-type-mapping>
<java-xml-type-mapping>
- <java-type>org.jboss.ws.extensions.eventing.element.SubscriptionEndRequest</java-type>
+ <java-type>org.jboss.ws.extensions.eventing.jaxrpc.element.SubscriptionEndRequest</java-type>
<anonymous-type-qname xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
typeNS:>SubscriptionEnd</anonymous-type-qname>
<qname-scope>complexType</qname-scope>
@@ -102,14 +102,14 @@
</java-xml-type-mapping>
<java-xml-type-mapping>
- <java-type>org.jboss.ws.extensions.eventing.element.SubscribeResponse</java-type>
+ <java-type>org.jboss.ws.extensions.eventing.jaxrpc.element.SubscribeResponse</java-type>
<root-type-qname xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
typeNS:SubscribeResponse</root-type-qname>
<qname-scope>element</qname-scope>
</java-xml-type-mapping>
<java-xml-type-mapping>
- <java-type>org.jboss.ws.extensions.eventing.element.SubscribeResponse</java-type>
+ <java-type>org.jboss.ws.extensions.eventing.jaxrpc.element.SubscribeResponse</java-type>
<anonymous-type-qname xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
typeNS:>SubscribeResponse</anonymous-type-qname>
<qname-scope>complexType</qname-scope>
@@ -124,13 +124,13 @@
</java-xml-type-mapping>
<java-xml-type-mapping>
- <java-type>org.jboss.ws.extensions.eventing.element.EndpointReference</java-type>
+ <java-type>org.jboss.ws.extensions.eventing.jaxrpc.element.EndpointReference</java-type>
<root-type-qname xmlns:typeNS="http://www.w3.org/2005/08/addressing">typeNS:EndpointReference</root-type-qname>
<qname-scope>element</qname-scope>
</java-xml-type-mapping>
<java-xml-type-mapping>
- <java-type>org.jboss.ws.extensions.eventing.element.EndpointReference</java-type>
+ <java-type>org.jboss.ws.extensions.eventing.jaxrpc.element.EndpointReference</java-type>
<root-type-qname xmlns:typeNS="http://www.w3.org/2005/08/addressing">
typeNS:EndpointReferenceType</root-type-qname>
<qname-scope>complexType</qname-scope>
@@ -149,13 +149,13 @@
</java-xml-type-mapping>
<java-xml-type-mapping>
- <java-type>org.jboss.ws.extensions.eventing.element.MetaData</java-type>
+ <java-type>org.jboss.ws.extensions.eventing.jaxrpc.element.MetaData</java-type>
<root-type-qname xmlns:typeNS="http://www.w3.org/2005/08/addressing">typeNS:Metadata</root-type-qname>
<qname-scope>element</qname-scope>
</java-xml-type-mapping>
<!--java-xml-type-mapping>
- <java-type>org.jboss.ws.extensions.eventing.element.MetaData</java-type>
+ <java-type>org.jboss.ws.extensions.eventing.jaxrpc.element.MetaData</java-type>
<root-type-qname xmlns:typeNS="http://www.w3.org/2005/08/addressing">typeNS:MetadataType</root-type-qname>
<qname-scope>complexType</qname-scope>
<variable-mapping>
@@ -165,13 +165,13 @@
</java-xml-type-mapping-->
<java-xml-type-mapping>
- <java-type>org.jboss.ws.extensions.eventing.element.RenewRequest</java-type>
+ <java-type>org.jboss.ws.extensions.eventing.jaxrpc.element.RenewRequest</java-type>
<root-type-qname xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">typeNS:Renew</root-type-qname>
<qname-scope>element</qname-scope>
</java-xml-type-mapping>
<java-xml-type-mapping>
- <java-type>org.jboss.ws.extensions.eventing.element.RenewRequest</java-type>
+ <java-type>org.jboss.ws.extensions.eventing.jaxrpc.element.RenewRequest</java-type>
<anonymous-type-qname xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
typeNS:>Renew</anonymous-type-qname>
<qname-scope>complexType</qname-scope>
@@ -182,14 +182,14 @@
</java-xml-type-mapping>
<java-xml-type-mapping>
- <java-type>org.jboss.ws.extensions.eventing.element.RenewResponse</java-type>
+ <java-type>org.jboss.ws.extensions.eventing.jaxrpc.element.RenewResponse</java-type>
<root-type-qname xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
typeNS:RenewResponse</root-type-qname>
<qname-scope>element</qname-scope>
</java-xml-type-mapping>
<java-xml-type-mapping>
- <java-type>org.jboss.ws.extensions.eventing.element.RenewResponse</java-type>
+ <java-type>org.jboss.ws.extensions.eventing.jaxrpc.element.RenewResponse</java-type>
<anonymous-type-qname xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
typeNS:>RenewResponse</anonymous-type-qname>
<qname-scope>complexType</qname-scope>
@@ -200,7 +200,7 @@
</java-xml-type-mapping>
<java-xml-type-mapping>
- <java-type>org.jboss.ws.extensions.eventing.element.StatusRequest</java-type>
+ <java-type>org.jboss.ws.extensions.eventing.jaxrpc.element.StatusRequest</java-type>
<root-type-qname xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
typeNS:GetStatus</root-type-qname>
<qname-scope>element</qname-scope>
@@ -211,21 +211,21 @@
</java-xml-type-mapping>
<java-xml-type-mapping>
- <java-type>org.jboss.ws.extensions.eventing.element.StatusRequest</java-type>
+ <java-type>org.jboss.ws.extensions.eventing.jaxrpc.element.StatusRequest</java-type>
<anonymous-type-qname xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
typeNS:>GetStatus</anonymous-type-qname>
<qname-scope>complexType</qname-scope>
</java-xml-type-mapping>
<java-xml-type-mapping>
- <java-type>org.jboss.ws.extensions.eventing.element.StatusResponse</java-type>
+ <java-type>org.jboss.ws.extensions.eventing.jaxrpc.element.StatusResponse</java-type>
<root-type-qname xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
typeNS:GetStatusResponse</root-type-qname>
<qname-scope>element</qname-scope>
</java-xml-type-mapping>
<java-xml-type-mapping>
- <java-type>org.jboss.ws.extensions.eventing.element.StatusResponse</java-type>
+ <java-type>org.jboss.ws.extensions.eventing.jaxrpc.element.StatusResponse</java-type>
<anonymous-type-qname xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
typeNS:>GetStatusResponse</anonymous-type-qname>
<qname-scope>complexType</qname-scope>
@@ -236,7 +236,7 @@
</java-xml-type-mapping>
<java-xml-type-mapping>
- <java-type>org.jboss.ws.extensions.eventing.element.UnsubscribeRequest</java-type>
+ <java-type>org.jboss.ws.extensions.eventing.jaxrpc.element.UnsubscribeRequest</java-type>
<root-type-qname xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
typeNS:Unsubscribe</root-type-qname>
<qname-scope>element</qname-scope>
@@ -247,14 +247,14 @@
</java-xml-type-mapping>
<java-xml-type-mapping>
- <java-type>org.jboss.ws.extensions.eventing.element.UnsubscribeRequest</java-type>
+ <java-type>org.jboss.ws.extensions.eventing.jaxrpc.element.UnsubscribeRequest</java-type>
<anonymous-type-qname xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
typeNS:>Unsubscribe</anonymous-type-qname>
<qname-scope>complexType</qname-scope>
</java-xml-type-mapping>
<service-interface-mapping>
- <service-interface>org.jboss.ws.extensions.eventing.EventingService</service-interface>
+ <service-interface>org.jboss.ws.extensions.eventing.jaxrpc.EventingService</service-interface>
<wsdl-service-name xmlns:serviceNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
serviceNS:EventingService</wsdl-service-name>
<port-mapping>
@@ -268,7 +268,7 @@
</service-interface-mapping>
<service-endpoint-interface-mapping>
- <service-endpoint-interface>org.jboss.ws.extensions.eventing.EventSourceEndpoint</service-endpoint-interface>
+ <service-endpoint-interface>org.jboss.ws.extensions.eventing.jaxrpc.EventSourceEndpoint</service-endpoint-interface>
<wsdl-port-type xmlns:portTypeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
portTypeNS:EventSource</wsdl-port-type>
<wsdl-binding xmlns:bindingNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
@@ -278,7 +278,7 @@
<wsdl-operation>SubscribeOp</wsdl-operation>
<method-param-parts-mapping>
<param-position>0</param-position>
- <param-type>org.jboss.ws.extensions.eventing.element.SubscribeRequest</param-type>
+ <param-type>org.jboss.ws.extensions.eventing.jaxrpc.element.SubscribeRequest</param-type>
<wsdl-message-mapping>
<wsdl-message xmlns:wsdlMsgNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
wsdlMsgNS:SubscribeMsg</wsdl-message>
@@ -287,7 +287,7 @@
</wsdl-message-mapping>
</method-param-parts-mapping>
<wsdl-return-value-mapping>
- <method-return-value>org.jboss.ws.extensions.eventing.element.SubscribeResponse</method-return-value>
+ <method-return-value>org.jboss.ws.extensions.eventing.jaxrpc.element.SubscribeResponse</method-return-value>
<wsdl-message xmlns:wsdlMsgNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
wsdlMsgNS:SubscribeResponseMsg</wsdl-message>
<wsdl-message-part-name>body</wsdl-message-part-name>
@@ -298,7 +298,7 @@
<java-method-name>subscriptionEnd</java-method-name>
<wsdl-operation>SubscriptionEnd</wsdl-operation>
<wsdl-return-value-mapping>
- <method-return-value>org.jboss.ws.extensions.eventing.element.SubscriptionEndRequest</method-return-value>
+ <method-return-value>org.jboss.ws.extensions.eventing.jaxrpc.element.SubscriptionEndRequest</method-return-value>
<wsdl-message xmlns:wsdlMsgNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
wsdlMsgNS:SubscriptionEnd</wsdl-message>
<wsdl-message-part-name>body</wsdl-message-part-name>
@@ -308,7 +308,7 @@
</service-endpoint-interface-mapping>
<service-endpoint-interface-mapping>
- <service-endpoint-interface>org.jboss.ws.extensions.eventing.SubscriptionManagerEndpoint</service-endpoint-interface>
+ <service-endpoint-interface>org.jboss.ws.extensions.eventing.jaxrpc.SubscriptionManagerEndpoint</service-endpoint-interface>
<wsdl-port-type xmlns:portTypeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
portTypeNS:SubscriptionManager</wsdl-port-type>
@@ -320,7 +320,7 @@
<wsdl-operation>GetStatusOp</wsdl-operation>
<method-param-parts-mapping>
<param-position>0</param-position>
- <param-type>org.jboss.ws.extensions.eventing.element.StatusRequest</param-type>
+ <param-type>org.jboss.ws.extensions.eventing.jaxrpc.element.StatusRequest</param-type>
<wsdl-message-mapping>
<wsdl-message xmlns:wsdlMsgNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
wsdlMsgNS:GetStatusMsg</wsdl-message>
@@ -329,7 +329,7 @@
</wsdl-message-mapping>
</method-param-parts-mapping>
<wsdl-return-value-mapping>
- <method-return-value>org.jboss.ws.extensions.eventing.element.StatusResponse</method-return-value>
+ <method-return-value>org.jboss.ws.extensions.eventing.jaxrpc.element.StatusResponse</method-return-value>
<wsdl-message xmlns:wsdlMsgNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
wsdlMsgNS:GetStatusResponseMsg</wsdl-message>
<wsdl-message-part-name>body</wsdl-message-part-name>
@@ -341,7 +341,7 @@
<wsdl-operation>RenewOp</wsdl-operation>
<method-param-parts-mapping>
<param-position>0</param-position>
- <param-type>org.jboss.ws.extensions.eventing.element.RenewRequest</param-type>
+ <param-type>org.jboss.ws.extensions.eventing.jaxrpc.element.RenewRequest</param-type>
<wsdl-message-mapping>
<wsdl-message xmlns:wsdlMsgNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
wsdlMsgNS:RenewMsg</wsdl-message>
@@ -350,7 +350,7 @@
</wsdl-message-mapping>
</method-param-parts-mapping>
<wsdl-return-value-mapping>
- <method-return-value>org.jboss.ws.extensions.eventing.element.RenewResponse</method-return-value>
+ <method-return-value>org.jboss.ws.extensions.eventing.jaxrpc.element.RenewResponse</method-return-value>
<wsdl-message xmlns:wsdlMsgNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
wsdlMsgNS:RenewResponseMsg</wsdl-message>
<wsdl-message-part-name>body</wsdl-message-part-name>
@@ -362,7 +362,7 @@
<wsdl-operation>UnsubscribeOp</wsdl-operation>
<method-param-parts-mapping>
<param-position>0</param-position>
- <param-type>org.jboss.ws.extensions.eventing.element.UnsubscribeRequest</param-type>
+ <param-type>org.jboss.ws.extensions.eventing.jaxrpc.element.UnsubscribeRequest</param-type>
<wsdl-message-mapping>
<wsdl-message xmlns:wsdlMsgNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
wsdlMsgNS:UnsubscribeMsg</wsdl-message>
Modified: trunk/jbossws-tests/src/main/resources/jaxrpc/wseventing/WEB-INF/web.xml
===================================================================
--- trunk/jbossws-tests/src/main/resources/jaxrpc/wseventing/WEB-INF/web.xml 2007-01-18 12:00:15 UTC (rev 1993)
+++ trunk/jbossws-tests/src/main/resources/jaxrpc/wseventing/WEB-INF/web.xml 2007-01-18 12:54:34 UTC (rev 1994)
@@ -6,7 +6,7 @@
<display-name>Eventing Service App</display-name>
<servlet>
<servlet-name>EventSourceServlet</servlet-name>
- <servlet-class>org.jboss.ws.extensions.eventing.EventSourceEndpointImpl</servlet-class>
+ <servlet-class>org.jboss.ws.extensions.eventing.jaxrpc.EventSourceEndpointImpl</servlet-class>
<load-on-startup>0</load-on-startup>
</servlet>
<servlet-mapping>
@@ -16,7 +16,7 @@
<servlet>
<servlet-name>SubscriptionManagerServlet</servlet-name>
- <servlet-class>org.jboss.ws.extensions.eventing.SubscriptionManagerEndpointImpl</servlet-class>
+ <servlet-class>org.jboss.ws.extensions.eventing.jaxrpc.SubscriptionManagerEndpointImpl</servlet-class>
<load-on-startup>0</load-on-startup>
</servlet>
<servlet-mapping>
Modified: trunk/jbossws-tests/src/main/resources/jaxrpc/wseventing/WEB-INF/webservices.xml
===================================================================
--- trunk/jbossws-tests/src/main/resources/jaxrpc/wseventing/WEB-INF/webservices.xml 2007-01-18 12:00:15 UTC (rev 1993)
+++ trunk/jbossws-tests/src/main/resources/jaxrpc/wseventing/WEB-INF/webservices.xml 2007-01-18 12:54:34 UTC (rev 1994)
@@ -15,7 +15,7 @@
<port-component>
<port-component-name>SubscriptionManagerPort</port-component-name>
<wsdl-port>wsdl:SubscriptionManagerPort</wsdl-port>
- <service-endpoint-interface>org.jboss.ws.extensions.eventing.SubscriptionManagerEndpoint</service-endpoint-interface>
+ <service-endpoint-interface>org.jboss.ws.extensions.eventing.jaxrpc.SubscriptionManagerEndpoint</service-endpoint-interface>
<service-impl-bean>
<servlet-link>SubscriptionManagerServlet</servlet-link>
</service-impl-bean>
@@ -30,7 +30,7 @@
<port-component>
<port-component-name>EventSourcePort</port-component-name>
<wsdl-port>wsdl:EventSourcePort</wsdl-port>
- <service-endpoint-interface>org.jboss.ws.extensions.eventing.EventSourceEndpoint</service-endpoint-interface>
+ <service-endpoint-interface>org.jboss.ws.extensions.eventing.jaxrpc.EventSourceEndpoint</service-endpoint-interface>
<service-impl-bean>
<servlet-link>EventSourceServlet</servlet-link>
</service-impl-bean>
Modified: trunk/jbossws-tests/src/main/resources/jaxws/jsr181/handlerchain/jaxws-handlers.xml
===================================================================
--- trunk/jbossws-tests/src/main/resources/jaxws/jsr181/handlerchain/jaxws-handlers.xml 2007-01-18 12:00:15 UTC (rev 1993)
+++ trunk/jbossws-tests/src/main/resources/jaxws/jsr181/handlerchain/jaxws-handlers.xml 2007-01-18 12:54:34 UTC (rev 1994)
@@ -1,27 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<handler-chains xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee javaee_web_services_1_2.xsd">
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee javaee_web_services_1_2.xsd">
- <handler-chain>
- <protocol-bindings>##SOAP11_HTTP</protocol-bindings>
- <handler>
- <handler-name> LogHandler </handler-name>
- <handler-class> org.jboss.test.ws.jaxws.jsr181.handlerchain.LogHandler </handler-class>
- <init-param>
- <param-name>logCategory</param-name>
- <param-value>MyService</param-value>
- </init-param>
- </handler>
- <handler>
- <handler-name> AuthorizationHandler </handler-name>
- <handler-class> org.jboss.test.ws.jaxws.jsr181.handlerchain.AuthorizationHandler </handler-class>
- <soap-role>SecurityProvider</soap-role>
- </handler>
- <handler>
- <handler-name> RoutingHandler </handler-name>
- <handler-class> org.jboss.test.ws.jaxws.jsr181.handlerchain.RoutingHandler </handler-class>
- </handler>
- </handler-chain>
+ <handler-chain>
+ <protocol-bindings>##SOAP11_HTTP</protocol-bindings>
+ <handler>
+ <handler-name> LogHandler </handler-name>
+ <handler-class> org.jboss.test.ws.jaxws.jsr181.handlerchain.LogHandler </handler-class>
+ <init-param>
+ <param-name>logCategory</param-name>
+ <param-value>MyService</param-value>
+ </init-param>
+ </handler>
+ <handler>
+ <handler-name> AuthorizationHandler </handler-name>
+ <handler-class> org.jboss.test.ws.jaxws.jsr181.handlerchain.AuthorizationHandler </handler-class>
+ <soap-role>SecurityProvider</soap-role>
+ </handler>
+ <handler>
+ <handler-name> RoutingHandler </handler-name>
+ <handler-class> org.jboss.test.ws.jaxws.jsr181.handlerchain.RoutingHandler </handler-class>
+ </handler>
+ </handler-chain>
</handler-chains>
\ No newline at end of file
Added: trunk/jbossws-tests/src/main/resources/jaxws/wseventing/META-INF/application-client.xml
===================================================================
--- trunk/jbossws-tests/src/main/resources/jaxws/wseventing/META-INF/application-client.xml (rev 0)
+++ trunk/jbossws-tests/src/main/resources/jaxws/wseventing/META-INF/application-client.xml 2007-01-18 12:54:34 UTC (rev 1994)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<application-client version="1.4" xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application-client_1_4.xsd">
+
+ <display-name>Eventing Service test</display-name>
+
+ <service-ref>
+ <service-ref-name>service/EventingService</service-ref-name>
+ <service-interface>org.jboss.ws.extensions.eventing.jaxrpc.EventingService</service-interface>
+ <wsdl-file>META-INF/wsdl/wind.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>META-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
+
+ <port-component-ref>
+ <service-endpoint-interface>org.jboss.ws.extensions.eventing.jaxrpc.EventSourceEndpoint</service-endpoint-interface>
+ </port-component-ref>
+
+ <port-component-ref>
+ <service-endpoint-interface>org.jboss.ws.extensions.eventing.jaxrpc.SubscriptionManagerEndpoint</service-endpoint-interface>
+ </port-component-ref>
+
+ <handler>
+ <handler-name>SOAPOutboundHandler</handler-name>
+ <handler-class>org.jboss.ws.extensions.addressing.jaxrpc.WSAddressingClientHandler</handler-class>
+ </handler>
+
+ </service-ref>
+</application-client>
+
Added: trunk/jbossws-tests/src/main/resources/jaxws/wseventing/META-INF/jboss-client.xml
===================================================================
--- trunk/jbossws-tests/src/main/resources/jaxws/wseventing/META-INF/jboss-client.xml (rev 0)
+++ trunk/jbossws-tests/src/main/resources/jaxws/wseventing/META-INF/jboss-client.xml 2007-01-18 12:54:34 UTC (rev 1994)
@@ -0,0 +1,14 @@
+<?xml version='1.0' encoding='UTF-8' ?>
+
+<!DOCTYPE jboss-client PUBLIC "-//JBoss//DTD Application Client 4.0//EN" "http://www.jboss.org/j2ee/dtd/jboss-client_4_0.dtd">
+
+<jboss-client>
+ <jndi-name>jbossws-client</jndi-name>
+
+ <service-ref>
+ <service-ref-name>service/EventingService</service-ref-name>
+ <wsdl-override>http://@jbosstest.host.name@:8080/jaxrpc-wseventing/subscribe?wsdl</wsdl-override>
+ </service-ref>
+
+</jboss-client>
+
Added: trunk/jbossws-tests/src/main/resources/jaxws/wseventing/WEB-INF/jboss-web.xml
===================================================================
--- trunk/jbossws-tests/src/main/resources/jaxws/wseventing/WEB-INF/jboss-web.xml (rev 0)
+++ trunk/jbossws-tests/src/main/resources/jaxws/wseventing/WEB-INF/jboss-web.xml 2007-01-18 12:54:34 UTC (rev 1994)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.4//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">
+
+<jboss-web>
+ <context-root>/jbossws-test-eventing</context-root>
+</jboss-web>
\ No newline at end of file
Added: trunk/jbossws-tests/src/main/resources/jaxws/wseventing/WEB-INF/web.xml
===================================================================
--- trunk/jbossws-tests/src/main/resources/jaxws/wseventing/WEB-INF/web.xml (rev 0)
+++ trunk/jbossws-tests/src/main/resources/jaxws/wseventing/WEB-INF/web.xml 2007-01-18 12:54:34 UTC (rev 1994)
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+
+ <display-name>Eventing Service App</display-name>
+
+ <servlet>
+ <servlet-name>EventSinkServlet</servlet-name>
+ <servlet-class>org.jboss.test.ws.jaxws.wseventing.EventSinkServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>EventSinkServlet</servlet-name>
+ <url-pattern>/eventSink</url-pattern>
+ </servlet-mapping>
+
+ <servlet>
+ <servlet-name>EventSource</servlet-name>
+ <servlet-class>org.jboss.ws.extensions.eventing.jaxws.EventSourceEndpointImpl</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>EventSource</servlet-name>
+ <url-pattern>/subscribe</url-pattern>
+ </servlet-mapping>
+
+ <servlet>
+ <servlet-name>SubscriptionManager</servlet-name>
+ <servlet-class>org.jboss.ws.extensions.eventing.jaxws.SubscriptionManagerEndpointImpl</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>SubscriptionManager</servlet-name>
+ <url-pattern>/manage</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+</web-app>
\ No newline at end of file
Added: trunk/jbossws-tests/src/main/resources/jaxws/wseventing/WEB-INF/wsdl/eventing.wsdl
===================================================================
--- trunk/jbossws-tests/src/main/resources/jaxws/wseventing/WEB-INF/wsdl/eventing.wsdl (rev 0)
+++ trunk/jbossws-tests/src/main/resources/jaxws/wseventing/WEB-INF/wsdl/eventing.wsdl 2007-01-18 12:54:34 UTC (rev 1994)
@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<wsdl:definitions
+ targetNamespace='http://schemas.xmlsoap.org/ws/2004/08/eventing'
+ xmlns:wse='http://schemas.xmlsoap.org/ws/2004/08/eventing'
+ xmlns:wsa10='http://www.w3.org/2005/08/addressing'
+ xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/'
+ xmlns:xs='http://www.w3.org/2001/XMLSchema'
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
+
+ <wsdl:types>
+ <xs:schema targetNamespace='http://schemas.xmlsoap.org/ws/2004/08/eventing'>
+ <xs:include schemaLocation='eventing.xsd'/>
+ </xs:schema>
+ </wsdl:types>
+
+ <wsdl:message name='SubscribeMsg'>
+ <wsdl:part name='body' element='wse:Subscribe'/>
+ </wsdl:message>
+ <wsdl:message name='SubscribeResponseMsg'>
+ <wsdl:part name='body' element='wse:SubscribeResponse'/>
+ </wsdl:message>
+
+ <wsdl:message name='RenewMsg'>
+ <wsdl:part name='body' element='wse:Renew'/>
+ </wsdl:message>
+ <wsdl:message name='RenewResponseMsg'>
+ <wsdl:part name='body' element='wse:RenewResponse'/>
+ </wsdl:message>
+
+ <wsdl:message name='GetStatusMsg'>
+ <wsdl:part name='body' element='wse:GetStatus'/>
+ </wsdl:message>
+ <wsdl:message name='GetStatusResponseMsg'>
+ <wsdl:part name='body' element='wse:GetStatusResponse'/>
+ </wsdl:message>
+
+ <wsdl:message name='UnsubscribeMsg'>
+ <wsdl:part name='body' element='wse:Unsubscribe'/>
+ </wsdl:message>
+ <wsdl:message name='UnsubscribeResponseMsg'/>
+
+ <wsdl:message name='SubscriptionEnd'>
+ <wsdl:part name='body' element='wse:SubscriptionEnd'/>
+ </wsdl:message>
+
+ <wsdl:portType name='EventSource'>
+ <wsdl:operation name='SubscribeOp'>
+ <wsdl:input message='wse:SubscribeMsg' wsa10:Action='http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe'/>
+ <wsdl:output message='wse:SubscribeResponseMsg' wsa10:Action='http://schemas.xmlsoap.org/ws/2004/08/eventing/SubscribeResponse'/>
+ </wsdl:operation>
+ <!--wsdl:operation name='SubscriptionEnd'>
+ <wsdl:output message='wse:SubscriptionEnd'/>
+ </wsdl:operation-->
+ </wsdl:portType>
+
+ <wsdl:portType name='SubscriptionManager'>
+ <wsdl:operation name='RenewOp'>
+ <wsdl:input message='wse:RenewMsg' wsa10:Action='http://schemas.xmlsoap.org/ws/2004/08/eventing/Renew'/>
+ <wsdl:output message='wse:RenewResponseMsg' wsa10:Action='http://schemas.xmlsoap.org/ws/2004/08/eventing/RenewResponse'/>
+ </wsdl:operation>
+ <wsdl:operation name='GetStatusOp'>
+ <wsdl:input message='wse:GetStatusMsg' wsa10:Action='http://schemas.xmlsoap.org/ws/2004/08/eventing/GetStatus'/>
+ <wsdl:output message='wse:GetStatusResponseMsg' wsa10:Action='http://schemas.xmlsoap.org/ws/2004/08/eventing/GetStatusResponse'/>
+ </wsdl:operation>
+ <wsdl:operation name='UnsubscribeOp'>
+ <wsdl:input message='wse:UnsubscribeMsg' wsa10:Action='http://schemas.xmlsoap.org/ws/2004/08/eventing/Unsubscribe'/>
+ <wsdl:output message='wse:UnsubscribeResponseMsg' wsa10:Action='http://schemas.xmlsoap.org/ws/2004/08/eventing/UnsubscribeResponse'/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="EventSourceBinding" type="wse:EventSource">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="SubscribeOp">
+ <soap:operation soapAction=""/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ <!--wsdl:operation name="SubscriptionEnd">
+ <soap:operation soapAction=""/>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation-->
+ </wsdl:binding>
+
+ <wsdl:binding name="SubscriptionManagerBinding" type="wse:SubscriptionManager">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="GetStatusOp">
+ <soap:operation soapAction=""/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+
+ <wsdl:operation name="RenewOp">
+ <soap:operation soapAction=""/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+
+ <wsdl:operation name="UnsubscribeOp">
+ <soap:operation soapAction=""/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <wsdl:service name="EventingService">
+ <wsdl:port name="EventSourcePort" binding="wse:EventSourceBinding">
+ <soap:address location="http://@jbosstest.host.name@:8080/jaxrpc-wseventing/ws4ee/EventSourcePortType"/>
+ </wsdl:port>
+ <wsdl:port name="SubscriptionManagerPort" binding="wse:SubscriptionManagerBinding">
+ <soap:address location="http://@jbosstest.host.name@:8080/jaxrpc-wseventing/ws4ee/SubscriptionManagerPortType"/>
+ </wsdl:port>
+ </wsdl:service>
+
+</wsdl:definitions>
Added: trunk/jbossws-tests/src/main/resources/jaxws/wseventing/WEB-INF/wsdl/eventing.xsd
===================================================================
--- trunk/jbossws-tests/src/main/resources/jaxws/wseventing/WEB-INF/wsdl/eventing.xsd (rev 0)
+++ trunk/jbossws-tests/src/main/resources/jaxws/wseventing/WEB-INF/wsdl/eventing.xsd 2007-01-18 12:54:34 UTC (rev 1994)
@@ -0,0 +1,185 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+(c) 2004 BEA Systems Inc., Computer Associates International, Inc., International Business Machines Corporation, Microsoft Corporation, Inc, Sun Microsystems, Inc., and TIBCO Software Inc. All rights reserved.
+
+BEA Systems Inc., Computer Associates International, Inc., International Business Machines Corporation, Microsoft Corporation, Inc, Sun Microsystems, Inc, and TIBCO Software Inc (collectively, the "Authors") hereby grant you permission to copy and display the WS-Eventing Specification (the "Specification", which includes WSDL and schema documents), in any medium without fee or royalty, provided that you include the following on ALL copies of the Specification, that you make:
+
+1. A link or URL to the WS-Eventing Specification at one of the Authors' websites
+2. The copyright notice as shown in the WS-Eventing Specification.
+
+BEA, CA, IBM, Microsoft, Sun and TIBCO (collectively, the "Authors") each agree to grant you a license, under royalty-free and otherwise reasonable, non-discriminatory terms and conditions, to their respective essential patent claims that they deem necessary to implement the Specification.
+
+THE SPECIFICATION IS PROVIDED "AS IS," AND THE AUTHORS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF THE SPECIFICATION ARE SUITABLE FOR ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF SUCH CONTENTS WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
+
+THE AUTHORS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATING TO ANY USE OR DISTRIBUTION OF THE SPECIFICATION.
+
+The name and trademarks of the Authors may NOT be used in any manner, including advertising or publicity pertaining to the Specification or its contents without specific, written prior permission. Title to copyright in the Specification will at all times remain with the Authors.
+
+No other rights are granted by implication, estoppel or otherwise.
+-->
+<xs:schema targetNamespace="http://schemas.xmlsoap.org/ws/2004/08/eventing"
+ xmlns:tns="http://schemas.xmlsoap.org/ws/2004/08/eventing"
+ xmlns:wsa="http://www.w3.org/2005/08/addressing"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ elementFormDefault="qualified"
+ blockDefault="#all">
+
+ <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>
+
+ <xs:import namespace="http://www.w3.org/2005/08/addressing" schemaLocation="wsaddr.xsd"/>
+
+ <!-- Types and global elements -->
+ <xs:complexType name="DeliveryType" mixed="true">
+ <xs:sequence>
+ <xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:attribute name="Mode" type="xs:anyURI" use="optional"/>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
+
+ <xs:element name="NotifyTo" type="wsa:EndpointReferenceType"/>
+
+ <xs:simpleType name="NonNegativeDurationType">
+ <xs:restriction base="xs:duration">
+ <xs:minInclusive value="P0Y0M0DT0H0M0S"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="ExpirationType">
+ <xs:union memberTypes="xs:dateTime tns:NonNegativeDurationType"/>
+ </xs:simpleType>
+
+ <xs:complexType name="FilterType" mixed="true">
+ <xs:sequence>
+ <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:attribute name="Dialect" type="xs:anyURI" use="optional"/>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
+
+ <xs:complexType name="LanguageSpecificStringType">
+ <xs:simpleContent>
+ <xs:extension base="xs:string">
+ <xs:attribute ref="xml:lang"/>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <!-- Subscribe request -->
+ <xs:element name="Subscribe">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="EndTo" type="wsa:EndpointReferenceType" minOccurs="0"/>
+ <xs:element name="Delivery" type="tns:DeliveryType"/>
+ <xs:element name="Expires" type="tns:ExpirationType" minOccurs="0"/>
+ <xs:element name="Filter" type="tns:FilterType" minOccurs="0"/>
+ <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="Identifier" type="xs:anyURI"/>
+
+ <!-- Subscribe response -->
+ <xs:element name="SubscribeResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="SubscriptionManager" type="wsa:EndpointReferenceType"/>
+ <xs:element name="Expires" type="tns:ExpirationType"/>
+ <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
+ </xs:element>
+
+ <!-- Used in a fault if there's an unsupported dialect -->
+ <xs:element name="SupportedDialect" type="xs:anyURI"/>
+
+ <!-- Used in a fault if there's an unsupported delivery mode -->
+ <xs:element name="SupportedDeliveryMode" type="xs:anyURI"/>
+
+ <!-- Renew request -->
+ <xs:element name="Renew">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Expires" type="tns:ExpirationType" minOccurs="0"/>
+ <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
+ </xs:element>
+
+ <!-- Renew response -->
+ <xs:element name="RenewResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Expires" type="tns:ExpirationType" minOccurs="0"/>
+ <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
+ </xs:element>
+
+ <!-- GetStatus request -->
+ <xs:element name="GetStatus">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
+ </xs:element>
+
+ <!-- GetStatus response -->
+ <xs:element name="GetStatusResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Expires" type="tns:ExpirationType" minOccurs="0"/>
+ <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
+ </xs:element>
+
+ <!-- Unsubscribe request -->
+ <xs:element name="Unsubscribe">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
+ </xs:element>
+
+ <!-- count(/s:Envelope/s:Body/*) = 0 for Unsubscribe response -->
+
+ <!-- SubscriptionEnd message -->
+ <xs:element name="SubscriptionEnd">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="SubscriptionManager" type="wsa:EndpointReferenceType"/>
+ <xs:element name="Code" type="tns:OpenSubscriptionEndCodeType"/>
+ <xs:element name="Reason" type="tns:LanguageSpecificStringType" minOccurs="0" maxOccurs="unbounded"/>
+ <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:simpleType name="SubscriptionEndCodeType">
+ <xs:restriction base="xs:QName">
+ <xs:enumeration value="tns:DeliveryFailure"/>
+ <xs:enumeration value="tns:SourceShuttingDown"/>
+ <xs:enumeration value="tns:SourceCancelling"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="OpenSubscriptionEndCodeType">
+ <xs:union memberTypes="tns:SubscriptionEndCodeType xs:QName"/>
+ </xs:simpleType>
+
+ <xs:attribute name="EventSource" type="xs:boolean"/>
+
+</xs:schema>
\ No newline at end of file
Added: trunk/jbossws-tests/src/main/resources/jaxws/wseventing/WEB-INF/wsdl/wind.wsdl
===================================================================
--- trunk/jbossws-tests/src/main/resources/jaxws/wseventing/WEB-INF/wsdl/wind.wsdl (rev 0)
+++ trunk/jbossws-tests/src/main/resources/jaxws/wseventing/WEB-INF/wsdl/wind.wsdl 2007-01-18 12:54:34 UTC (rev 1994)
@@ -0,0 +1,174 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<wsdl:definitions
+ targetNamespace="http://schemas.xmlsoap.org/ws/2004/08/eventing"
+ xmlns:tns="http://schemas.xmlsoap.org/ws/2004/08/eventing"
+ xmlns:wse='http://schemas.xmlsoap.org/ws/2004/08/eventing'
+ xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/'
+ xmlns:wsa10='http://www.w3.org/2005/08/addressing'
+ xmlns:xs='http://www.w3.org/2001/XMLSchema'
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
+
+ <wsdl:types>
+
+ <xs:schema targetNamespace='http://schemas.xmlsoap.org/ws/2004/08/eventing'>
+
+ <xs:include schemaLocation='eventing.xsd'/>
+
+ <xs:element name="WindReport">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Date" type="xs:string"/>
+ <xs:element name="Time" type="xs:string"/>
+ <xs:element name="Speed" type="xs:string"/>
+ <xs:element name="Location" type="xs:string"/>
+ <xs:element name="County" type="xs:string"/>
+ <xs:element name="State" type="xs:string"/>
+ <xs:element name="Lat" type="xs:string"/>
+ <xs:element name="Long" type="xs:string"/>
+ <xs:element name="Comments" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+
+ </xs:schema>
+
+ </wsdl:types>
+
+ <wsdl:message name='SubscribeMsg'>
+ <wsdl:part name='body' element='wse:Subscribe'/>
+ </wsdl:message>
+ <wsdl:message name='SubscribeResponseMsg'>
+ <wsdl:part name='body' element='wse:SubscribeResponse'/>
+ </wsdl:message>
+
+ <wsdl:message name='RenewMsg'>
+ <wsdl:part name='body' element='wse:Renew'/>
+ </wsdl:message>
+ <wsdl:message name='RenewResponseMsg'>
+ <wsdl:part name='body' element='wse:RenewResponse'/>
+ </wsdl:message>
+
+ <wsdl:message name='GetStatusMsg'>
+ <wsdl:part name='body' element='wse:GetStatus'/>
+ </wsdl:message>
+ <wsdl:message name='GetStatusResponseMsg'>
+ <wsdl:part name='body' element='wse:GetStatusResponse'/>
+ </wsdl:message>
+
+ <wsdl:message name='UnsubscribeMsg'>
+ <wsdl:part name='body' element='wse:Unsubscribe'/>
+ </wsdl:message>
+ <wsdl:message name='UnsubscribeResponseMsg'/>
+
+ <wsdl:message name='SubscriptionEnd'>
+ <wsdl:part name='body' element='wse:SubscriptionEnd'/>
+ </wsdl:message>
+
+ <wsdl:message name='WindMsg'>
+ <wsdl:part name='body' element='tns:WindReport'/>
+ </wsdl:message>
+
+ <wsdl:portType name='EventSource'>
+ <wsdl:operation name='SubscribeOp'>
+ <wsdl:input message='wse:SubscribeMsg' wsa10:Action='http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe'/>
+ <wsdl:output message='wse:SubscribeResponseMsg' wsa10:Action='http://schemas.xmlsoap.org/ws/2004/08/eventing/SubscribeResponse'/>
+ </wsdl:operation>
+ <!--wsdl:operation name='SubscriptionEnd'>
+ <wsdl:output message='wse:SubscriptionEnd'/>
+ </wsdl:operation-->
+ </wsdl:portType>
+
+ <wsdl:portType name='SubscriptionManager'>
+ <wsdl:operation name='RenewOp'>
+ <wsdl:input message='wse:RenewMsg' wsa10:Action='http://schemas.xmlsoap.org/ws/2004/08/eventing/Renew'/>
+ <wsdl:output message='wse:RenewResponseMsg' wsa10:Action='http://schemas.xmlsoap.org/ws/2004/08/eventing/RenewResponse'/>
+ </wsdl:operation>
+ <wsdl:operation name='GetStatusOp'>
+ <wsdl:input message='wse:GetStatusMsg' wsa10:Action='http://schemas.xmlsoap.org/ws/2004/08/eventing/GetStatus'/>
+ <wsdl:output message='wse:GetStatusResponseMsg' wsa10:Action='http://schemas.xmlsoap.org/ws/2004/08/eventing/GetStatusResponse'/>
+ </wsdl:operation>
+ <wsdl:operation name='UnsubscribeOp'>
+ <wsdl:input message='wse:UnsubscribeMsg' wsa10:Action='http://schemas.xmlsoap.org/ws/2004/08/eventing/Unsubscribe'/>
+ <wsdl:output message='wse:UnsubscribeResponseMsg' wsa10:Action='http://schemas.xmlsoap.org/ws/2004/08/eventing/UnsubscribeResponse'/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:portType name='Warnings' wse:EventSource='true'>
+ <wsdl:operation name='WindOp'>
+ <wsdl:output message='tns:WindMsg'/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="WarningsBinding" type="tns:Warnings">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="WindOp">
+ <soap:operation soapAction=""/>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <wsdl:binding name="EventSourceBinding" type="wse:EventSource">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="SubscribeOp">
+ <soap:operation soapAction=""/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ <!--wsdl:operation name="SubscriptionEnd">
+ <soap:operation soapAction=""/>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation-->
+ </wsdl:binding>
+
+ <wsdl:binding name="SubscriptionManagerBinding" type="wse:SubscriptionManager">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="GetStatusOp">
+ <soap:operation soapAction=""/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+
+ <wsdl:operation name="RenewOp">
+ <soap:operation soapAction=""/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+
+ <wsdl:operation name="UnsubscribeOp">
+ <soap:operation soapAction=""/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <wsdl:service name="EventingService">
+ <wsdl:port name="EventSourcePort" binding="wse:EventSourceBinding">
+ <soap:address location="http://@jbosstest.host.name@:8080/jaxrpc-wseventing/ws4ee/EventSourcePortType"/>
+ </wsdl:port>
+ <wsdl:port name="SubscriptionManagerPort" binding="wse:SubscriptionManagerBinding">
+ <soap:address location="http://@jbosstest.host.name@:8080/jaxrpc-wseventing/ws4ee/SubscriptionManagerPortType"/>
+ </wsdl:port>
+ </wsdl:service>
+
+</wsdl:definitions>
Added: trunk/jbossws-tests/src/main/resources/jaxws/wseventing/WEB-INF/wsdl/wsaddr.xsd
===================================================================
--- trunk/jbossws-tests/src/main/resources/jaxws/wseventing/WEB-INF/wsdl/wsaddr.xsd (rev 0)
+++ trunk/jbossws-tests/src/main/resources/jaxws/wseventing/WEB-INF/wsdl/wsaddr.xsd 2007-01-18 12:54:34 UTC (rev 1994)
@@ -0,0 +1,151 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE xs:schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "http://www.w3.org/2001/XMLSchema.dtd">
+<!--
+ W3C XML Schema defined in the Web Services Addressing 1.0 specification
+ http://www.w3.org/TR/ws-addr-core
+
+ Copyright © 2005 World Wide Web Consortium,
+
+ (Massachusetts Institute of Technology, European Research Consortium for
+ Informatics and Mathematics, Keio University). All Rights Reserved. This
+ work is distributed under the W3C® Software License [1] 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.
+
+ [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+
+ $Id: ws-addr.xsd,v 1.3 2005/08/09 13:17:35 hugo Exp $
+-->
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:tns="http://www.w3.org/2005/08/addressing"
+ targetNamespace="http://www.w3.org/2005/08/addressing"
+ blockDefault="#all"
+ elementFormDefault="qualified"
+ finalDefault=""
+ attributeFormDefault="unqualified">
+
+ <!-- Constructs from the WS-Addressing Core -->
+
+ <xs:element name="EndpointReference" type="tns:EndpointReferenceType"/>
+ <xs:complexType name="EndpointReferenceType" mixed="false">
+ <xs:sequence>
+ <xs:element name="Address" type="tns:AttributedURIType"/>
+ <xs:element name="ReferenceParameters" type="tns:ReferenceParametersType" minOccurs="0"/>
+ <xs:element ref="tns:Metadata" minOccurs="0"/>
+ <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
+
+ <xs:complexType name="ReferenceParametersType" mixed="false">
+ <xs:sequence>
+ <xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
+
+ <xs:element name="Metadata" type="tns:MetadataType"/>
+ <xs:complexType name="MetadataType" mixed="false">
+ <xs:sequence>
+ <xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
+
+ <xs:element name="MessageID" type="tns:AttributedURIType"/>
+ <xs:element name="RelatesTo" type="tns:RelatesToType"/>
+ <xs:complexType name="RelatesToType" mixed="false">
+ <xs:simpleContent>
+ <xs:extension base="xs:anyURI">
+ <xs:attribute name="RelationshipType" type="tns:RelationshipTypeOpenEnum" use="optional" default="http://www.w3.org/2005/08/addressing/reply"/>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:simpleType name="RelationshipTypeOpenEnum">
+ <xs:union memberTypes="tns:RelationshipType xs:anyURI"/>
+ </xs:simpleType>
+
+ <xs:simpleType name="RelationshipType">
+ <xs:restriction base="xs:anyURI">
+ <xs:enumeration value="http://www.w3.org/2005/08/addressing/reply"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:element name="ReplyTo" type="tns:EndpointReferenceType"/>
+ <xs:element name="From" type="tns:EndpointReferenceType"/>
+ <xs:element name="FaultTo" type="tns:EndpointReferenceType"/>
+ <xs:element name="To" type="tns:AttributedURIType"/>
+ <xs:element name="Action" type="tns:AttributedURIType"/>
+
+ <xs:complexType name="AttributedURIType" mixed="false">
+ <xs:simpleContent>
+ <xs:extension base="xs:anyURI">
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <!-- Constructs from the WS-Addressing SOAP binding -->
+
+ <xs:attribute name="IsReferenceParameter" type="xs:boolean"/>
+
+ <xs:simpleType name="FaultCodesOpenEnumType">
+ <xs:union memberTypes="tns:FaultCodesType xs:QName"/>
+ </xs:simpleType>
+
+ <xs:simpleType name="FaultCodesType">
+ <xs:restriction base="xs:QName">
+ <xs:enumeration value="tns:InvalidAddressingHeader"/>
+ <xs:enumeration value="tns:InvalidAddress"/>
+ <xs:enumeration value="tns:InvalidEPR"/>
+ <xs:enumeration value="tns:InvalidCardinality"/>
+ <xs:enumeration value="tns:MissingAddressInEPR"/>
+ <xs:enumeration value="tns:DuplicateMessageID"/>
+ <xs:enumeration value="tns:ActionMismatch"/>
+ <xs:enumeration value="tns:MessageAddressingHeaderRequired"/>
+ <xs:enumeration value="tns:DestinationUnreachable"/>
+ <xs:enumeration value="tns:ActionNotSupported"/>
+ <xs:enumeration value="tns:EndpointUnavailable"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:element name="RetryAfter" type="tns:AttributedUnsignedLongType"/>
+ <xs:complexType name="AttributedUnsignedLongType" mixed="false">
+ <xs:simpleContent>
+ <xs:extension base="xs:unsignedLong">
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="ProblemHeaderQName" type="tns:AttributedQNameType"/>
+ <xs:complexType name="AttributedQNameType" mixed="false">
+ <xs:simpleContent>
+ <xs:extension base="xs:QName">
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="ProblemHeader" type="tns:AttributedAnyType"/>
+ <xs:complexType name="AttributedAnyType" mixed="false">
+ <xs:sequence>
+ <xs:any namespace="##any" processContents="lax" minOccurs="1" maxOccurs="1"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
+
+ <xs:element name="ProblemIRI" type="tns:AttributedURIType"/>
+
+ <xs:element name="ProblemAction" type="tns:ProblemActionType"/>
+ <xs:complexType name="ProblemActionType" mixed="false">
+ <xs:sequence>
+ <xs:element ref="tns:Action" minOccurs="0"/>
+ <xs:element name="SoapAction" minOccurs="0" type="xs:anyURI"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
[View Less]
18 years
JBossWS SVN: r1993 - trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-01-18 07:00:15 -0500 (Thu, 18 Jan 2007)
New Revision: 1993
Added:
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceExt.java
Log:
Fix jaxws service configuratuion
Added: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceExt.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceExt.java (…
[View More]rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceExt.java 2007-01-18 12:00:15 UTC (rev 1993)
@@ -0,0 +1,134 @@
+/*
+ * 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.core.jaxws.client;
+
+// $Id$
+
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.EndpointReference;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebServiceFeature;
+
+import org.jboss.ws.core.ConfigProvider;
+
+/**
+ * Extends the standard JAXWS Service
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @param <T>
+ * @since 18-Jan-2007
+ */
+public class ServiceExt extends Service implements ConfigProvider
+{
+ // The config name for all created ports
+ private String configName;
+ // The config file for all created ports
+ private String configFile;
+
+ public ServiceExt(URL wsdlDocumentLocation, QName serviceName)
+ {
+ super(wsdlDocumentLocation, serviceName);
+ }
+
+ /**
+ * Get the port configuration file for newly created ports
+ */
+ public String getConfigFile()
+ {
+ return configFile;
+ }
+
+ /**
+ * Set the port configuration file for newly created ports
+ */
+ public void setConfigFile(String configFile)
+ {
+ this.configFile = configFile;
+ }
+
+ /**
+ * Get the port configuration name for newly created ports
+ */
+ public String getConfigName()
+ {
+ return configName;
+ }
+
+ /**
+ * Set the port configuration name for newly created ports
+ */
+ public void setConfigName(String configName)
+ {
+ this.configName = configName;
+ }
+
+ @Override
+ public <T> T getPort(Class<T> serviceEndpointInterface, WebServiceFeature... features)
+ {
+ T port = super.getPort(serviceEndpointInterface, features);
+ configurePort(port);
+ return port;
+ }
+
+ @Override
+ public <T> T getPort(Class<T> serviceEndpointInterface)
+ {
+ T port = super.getPort(serviceEndpointInterface);
+ configurePort(port);
+ return port;
+ }
+
+ @Override
+ public <T> T getPort(EndpointReference endpointReference, Class<T> serviceEndpointInterface, WebServiceFeature... features)
+ {
+ T port = super.getPort(endpointReference, serviceEndpointInterface, features);
+ configurePort(port);
+ return port;
+ }
+
+ @Override
+ public <T> T getPort(QName portName, Class<T> serviceEndpointInterface, WebServiceFeature... features)
+ {
+ T port = super.getPort(portName, serviceEndpointInterface, features);
+ configurePort(port);
+ return port;
+ }
+
+ @Override
+ public <T> T getPort(QName portName, Class<T> serviceEndpointInterface)
+ {
+ T port = super.getPort(portName, serviceEndpointInterface);
+ configurePort(port);
+ return port;
+ }
+
+ private void configurePort(Object port)
+ {
+ ConfigProvider cp = (ConfigProvider)port;
+ if (configFile != null)
+ cp.setConfigFile(configFile);
+ if (configName != null)
+ cp.setConfigName(configName);
+ }
+}
Property changes on: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceExt.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
[View Less]
18 years
JBossWS SVN: r1992 - in trunk: jbossws-core/src/main/java/javax/xml/ws and 5 other directories.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-01-18 06:59:39 -0500 (Thu, 18 Jan 2007)
New Revision: 1992
Added:
trunk/jbossws-core/src/main/java/org/jboss/ws/core/ConfigProvider.java
Removed:
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/ServiceConfiguration.java
Modified:
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceObjectFactory.java
trunk/jbossws-core/src/main/java/javax/xml/ws/Service.java
trunk/jbossws-core/src/main/java/org/…
[View More]jboss/ws/core/StubExt.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java
trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/META-INF-secure/jboss-client.xml
Log:
Fix jaxws service configuratuion
Modified: trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceObjectFactory.java
===================================================================
--- trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceObjectFactory.java 2007-01-17 23:09:05 UTC (rev 1991)
+++ trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceObjectFactory.java 2007-01-18 11:59:39 UTC (rev 1992)
@@ -46,8 +46,7 @@
import org.jboss.logging.Logger;
import org.jboss.ws.WSException;
-import org.jboss.ws.core.StubExt;
-import org.jboss.ws.core.jaxws.ServiceConfiguration;
+import org.jboss.ws.core.ConfigProvider;
import org.jboss.ws.core.jaxws.client.UnifiedServiceRef;
import org.jboss.ws.core.server.UnifiedVirtualFile;
@@ -130,6 +129,17 @@
}
}
+ // Configure the service
+ if (target instanceof ConfigProvider)
+ {
+ ConfigProvider cp = (ConfigProvider)target;
+ if (usRef.getConfigFile() != null)
+ cp.setConfigFile(usRef.getConfigFile());
+ if (usRef.getConfigName() != null)
+ cp.setConfigName(usRef.getConfigName());
+
+ }
+
if (targetClassName != null && targetClassName.equals(serviceClassName) == false)
{
try
@@ -159,8 +169,6 @@
throw ex.getTargetException();
}
}
-
- configureInjectionTarget(target, usRef);
return target;
}
@@ -171,22 +179,6 @@
}
}
- private void configureInjectionTarget(Object target, UnifiedServiceRef usRef)
- {
- if (target instanceof ServiceConfiguration)
- {
- ServiceConfiguration service = (ServiceConfiguration)target;
- service.setConfigName(usRef.getConfigName());
- service.setConfigFile(usRef.getConfigFile());
- }
- if (target instanceof StubExt)
- {
- StubExt stub = (StubExt)target;
- stub.setConfigName(usRef.getConfigName());
- stub.setConfigFile(usRef.getConfigFile());
- }
- }
-
private UnifiedServiceRef unmarshallServiceRef(Reference ref) throws ClassNotFoundException, NamingException
{
UnifiedServiceRef sref;
@@ -209,7 +201,7 @@
{
UnifiedVirtualFile vfsRoot = usRef.getRootFile();
String wsdlLocation = usRef.getWsdlLocation();
-
+
URL wsdlURL = null;
if (wsdlLocation != null)
{
Modified: trunk/jbossws-core/src/main/java/javax/xml/ws/Service.java
===================================================================
--- trunk/jbossws-core/src/main/java/javax/xml/ws/Service.java 2007-01-17 23:09:05 UTC (rev 1991)
+++ trunk/jbossws-core/src/main/java/javax/xml/ws/Service.java 2007-01-18 11:59:39 UTC (rev 1992)
@@ -23,6 +23,9 @@
// $Id$
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.net.URL;
import java.util.Iterator;
import javax.xml.bind.JAXBContext;
@@ -63,9 +66,8 @@
**/
public class Service
{
+ protected ServiceDelegate delegate;
- private ServiceDelegate delegate;
-
/**
* The orientation of a dynamic client or service. MESSAGE provides
* access to entire protocol message, PAYLOAD to protocol message
@@ -714,9 +716,25 @@
* @throws WebServiceException If any error in creation of the
* specified service.
**/
- public static Service create(java.net.URL wsdlDocumentLocation, QName serviceName)
+ public static Service create(URL wsdlLocation, QName serviceName)
{
- return new Service(wsdlDocumentLocation, serviceName);
+ Service service;
+ try
+ {
+ Class extClass = Class.forName("org.jboss.ws.core.jaxws.client.ServiceExt");
+ Constructor ctor = extClass.getConstructor(new Class[]{URL.class, QName.class});
+ service = (Service)ctor.newInstance(new Object[]{wsdlLocation, serviceName});
+ }
+ catch (InvocationTargetException ex)
+ {
+ RuntimeException rte = (RuntimeException)ex.getTargetException();
+ throw rte;
+ }
+ catch (Exception e)
+ {
+ service = new Service(wsdlLocation, serviceName);
+ }
+ return service;
}
/**
@@ -728,6 +746,6 @@
*/
public static Service create(QName serviceName)
{
- return new Service(null, serviceName);
+ return create(null, serviceName);
}
}
Added: trunk/jbossws-core/src/main/java/org/jboss/ws/core/ConfigProvider.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/ConfigProvider.java (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/ConfigProvider.java 2007-01-18 11:59:39 UTC (rev 1992)
@@ -0,0 +1,53 @@
+/*
+ * 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.core;
+
+// $Id$
+
+/**
+ * Provides configuration for JAXRPC/JAXWS ports
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 17-Jan-2006
+ */
+public interface ConfigProvider
+{
+ /**
+ * Get the port configuration file
+ */
+ String getConfigFile();
+
+ /**
+ * Set the port configuration file
+ */
+ void setConfigFile(String configFile);
+
+ /**
+ * Get the port configuration name
+ */
+ String getConfigName();
+
+ /**
+ * Set the port configuration name
+ */
+ void setConfigName(String configName);
+}
Property changes on: trunk/jbossws-core/src/main/java/org/jboss/ws/core/ConfigProvider.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/StubExt.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/StubExt.java 2007-01-17 23:09:05 UTC (rev 1991)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/StubExt.java 2007-01-18 11:59:39 UTC (rev 1992)
@@ -37,7 +37,7 @@
* @author Thomas.Diesler(a)jboss.org
* @since 17-Jan-2007
*/
-public interface StubExt
+public interface StubExt extends ConfigProvider
{
/** ClientTimeout property: org.jboss.ws.timeout */
static final String PROPERTY_CLIENT_TIMEOUT = "org.jboss.ws.timeout";
@@ -126,28 +126,4 @@
* Creates a new empty AttachmentPart object.
*/
AttachmentPart createAttachmentPart();
-
- /**
- * Get the current port configuration file
- * A propriatory extension, that is not part of JAXRPC.
- */
- String getConfigFile();
-
- /**
- * Set the current port configuration file
- * A propriatory extension, that is not part of JAXRPC.
- */
- void setConfigFile(String configFile);
-
- /**
- * Get the current port configuration name
- * A propriatory extension, that is not part of JAXRPC.
- */
- String getConfigName();
-
- /**
- * Set the current port configuration name
- * A propriatory extension, that is not part of JAXRPC.
- */
- void setConfigName(String configName);
}
Deleted: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/ServiceConfiguration.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/ServiceConfiguration.java 2007-01-17 23:09:05 UTC (rev 1991)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/ServiceConfiguration.java 2007-01-18 11:59:39 UTC (rev 1992)
@@ -1,53 +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.ws.core.jaxws;
-
-// $Id$
-
-/**
- * Service provider for ServiceDelegate and Endpoint objects.
- *
- * @author Thomas.Diesler(a)jboss.com
- * @since 17-Jan-2006
- */
-public interface ServiceConfiguration
-{
- /**
- * Get the port configuration file for newly created ports
- */
- String getConfigFile();
-
- /**
- * Set the port configuration file for newly created ports
- */
- void setConfigFile(String configFile);
-
- /**
- * Get the port configuration name for newly created ports
- */
- String getConfigName();
-
- /**
- * Set the port configuration name for newly created ports
- */
- void setConfigName(String configName);
-}
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java 2007-01-17 23:09:05 UTC (rev 1991)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java 2007-01-18 11:59:39 UTC (rev 1992)
@@ -63,7 +63,7 @@
* @author Thomas.Diesler(a)jboss.org
* @since 04-Jul-2006
*/
-public class ClientImpl extends CommonClient implements BindingProvider, StubExt
+public class ClientImpl extends CommonClient implements BindingProvider
{
// provide logging
private static Logger log = Logger.getLogger(ClientImpl.class);
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java 2007-01-17 23:09:05 UTC (rev 1991)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java 2007-01-18 11:59:39 UTC (rev 1992)
@@ -47,7 +47,6 @@
import org.jboss.logging.Logger;
import org.jboss.util.NotImplementedException;
import org.jboss.ws.core.StubExt;
-import org.jboss.ws.core.jaxws.ServiceConfiguration;
import org.jboss.ws.core.jaxws.client.ClientImpl;
import org.jboss.ws.core.jaxws.client.ClientProxy;
import org.jboss.ws.core.jaxws.client.DispatchImpl;
@@ -69,7 +68,7 @@
* @author Thomas.Diesler(a)jboss.com
* @since 03-May-2006
*/
-public class ServiceDelegateImpl extends ServiceDelegate implements ServiceConfiguration
+public class ServiceDelegateImpl extends ServiceDelegate
{
// provide logging
private final Logger log = Logger.getLogger(ServiceDelegateImpl.class);
@@ -83,10 +82,6 @@
private HandlerResolver handlerResolver = new HandlerResolverImpl();
// The executor service
private ExecutorService executor;
- // The config name for all created ports
- private String configName;
- // The config file for all created ports
- private String configFile;
// A list of annotated ports
private List<QName> annotatedPorts = new ArrayList<QName>();
@@ -106,26 +101,6 @@
}
}
- public String getConfigFile()
- {
- return configFile;
- }
-
- public void setConfigFile(String configFile)
- {
- this.configFile = configFile;
- }
-
- public String getConfigName()
- {
- return configName;
- }
-
- public void setConfigName(String configName)
- {
- this.configName = configName;
- }
-
/**
* The getPort method returns a stub. A service client uses this stub to invoke operations on the target service endpoint.
* The serviceEndpointInterface specifies the service endpoint interface that is supported by the created dynamic proxy or stub instance.
Modified: trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/META-INF-secure/jboss-client.xml
===================================================================
--- trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/META-INF-secure/jboss-client.xml 2007-01-17 23:09:05 UTC (rev 1991)
+++ trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/META-INF-secure/jboss-client.xml 2007-01-18 11:59:39 UTC (rev 1992)
@@ -8,10 +8,10 @@
<service-ref>
<service-ref-name>SecureService1</service-ref-name>
<service-class-name>org.jboss.test.ws.jaxws.webserviceref.SecureEndpointService</service-class-name>
- <!--service-qname xmlns:ns1='http://org.jboss.ws/wsref'>ns1:SecureEndpointService</service-qname-->
+ <service-qname xmlns:nss='http://org.jboss.ws/wsref'>nss:SecureEndpointService</service-qname>
<port-info>
<service-endpoint-interface>org.jboss.test.ws.jaxws.webserviceref.SecureEndpoint</service-endpoint-interface>
- <!--wsdl-port xmlns:ns1='http://org.jboss.ws/wsref'>ns1:SecureEndpointPort</wsdl-port-->
+ <port-qname xmlns:nsp='http://org.jboss.ws/wsref'>nsp:SecureEndpointPort</port-qname>
<stub-property>
<name>javax.xml.ws.security.auth.password</name>
<value>j2ee</value>
@@ -27,7 +27,7 @@
<service-ref>
<service-ref-name>SecureService2</service-ref-name>
<port-info>
- <!--wsdl-port xmlns:ns1='http://org.jboss.ws/wsref'>ns1:SecureEndpointPort</wsdl-port-->
+ <port-qname xmlns:nsp='http://org.jboss.ws/wsref'>nsp:SecureEndpointPort</port-qname>
<stub-property>
<name>javax.xml.ws.security.auth.password</name>
<value>j2ee</value>
[View Less]
18 years
JBossWS SVN: r1991 - in trunk: jbossws-core/src/main/java/org/jboss/ws/metadata/jaxrpcmapping and 3 other directories.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-01-17 18:09:05 -0500 (Wed, 17 Jan 2007)
New Revision: 1991
Added:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/ServiceRefParserTestCase.java
Modified:
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/WebServiceRefHandler.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/jaxrpcmapping/JavaWsdlMappingFactory.java
trunk/jbossws-tests/build.xml
trunk/jbossws-tests/src/main/java/…
[View More]org/jboss/test/ws/jaxws/webserviceref/StubPropertyTestCase.java
trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/META-INF-secure/jboss-client.xml
Log:
Add <service-ref> parser test
Modified: trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/WebServiceRefHandler.java
===================================================================
--- trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/WebServiceRefHandler.java 2007-01-17 16:17:23 UTC (rev 1990)
+++ trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/WebServiceRefHandler.java 2007-01-17 23:09:05 UTC (rev 1991)
@@ -120,7 +120,7 @@
if (refEl != null)
ref.setConfigFile(DOMUtils.getTextContent(refEl));
- refEl = DOMUtils.getFirstChildElement(root, "wsdl-location");
+ refEl = DOMUtils.getFirstChildElement(root, "wsdl-override");
if (refEl != null)
ref.setWsdlLocation(DOMUtils.getTextContent(refEl));
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/jaxrpcmapping/JavaWsdlMappingFactory.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/jaxrpcmapping/JavaWsdlMappingFactory.java 2007-01-17 16:17:23 UTC (rev 1990)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/jaxrpcmapping/JavaWsdlMappingFactory.java 2007-01-17 23:09:05 UTC (rev 1991)
@@ -30,7 +30,6 @@
import javax.xml.namespace.QName;
import org.jboss.logging.Logger;
-import org.jboss.ws.core.utils.IOUtils;
import org.jboss.ws.core.utils.ResourceURL;
import org.jboss.xb.binding.JBossXBException;
import org.jboss.xb.binding.ObjectModelFactory;
Modified: trunk/jbossws-tests/build.xml
===================================================================
--- trunk/jbossws-tests/build.xml 2007-01-17 16:17:23 UTC (rev 1990)
+++ trunk/jbossws-tests/build.xml 2007-01-17 23:09:05 UTC (rev 1991)
@@ -172,6 +172,7 @@
<pathelement location="${thirdparty.dir}/stax-api.jar"/>
<pathelement location="${thirdparty.dir}/xmlunit1.0.jar"/>
<pathelement location="${jboss.client}/jboss-ejb3-client.jar"/>
+ <pathelement location="${jboss.server.lib}/jboss.jar"/>
</path>
<!-- The test client classpath -->
Added: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/ServiceRefParserTestCase.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/ServiceRefParserTestCase.java (rev 0)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/ServiceRefParserTestCase.java 2007-01-17 23:09:05 UTC (rev 1991)
@@ -0,0 +1,44 @@
+/*
+ * 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.webserviceref;
+
+import java.io.File;
+
+import org.jboss.ejb3.metamodel.JBossClientDDObjectFactory;
+import org.jboss.test.ws.JBossWSTest;
+
+/**
+ * Test the JAXWS annotation: javax.xml.ws.WebServiceRef
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 23-Oct-2005
+ */
+public class ServiceRefParserTestCase extends JBossWSTest
+{
+ public void testServiceRefParser() throws Exception
+ {
+ File ddFile = new File("resources/jaxws/webserviceref/META-INF-secure/jboss-client.xml");
+ assertTrue (ddFile.exists());
+
+ JBossClientDDObjectFactory.parse(ddFile.toURL(), null);
+ }
+}
Property changes on: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/ServiceRefParserTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/StubPropertyTestCase.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/StubPropertyTestCase.java 2007-01-17 16:17:23 UTC (rev 1990)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/StubPropertyTestCase.java 2007-01-17 23:09:05 UTC (rev 1991)
@@ -21,6 +21,7 @@
*/
package org.jboss.test.ws.jaxws.webserviceref;
+import java.io.File;
import java.net.MalformedURLException;
import java.net.URL;
@@ -31,6 +32,7 @@
import junit.framework.Test;
import org.jboss.ejb3.client.ClientLauncher;
+import org.jboss.ejb3.metamodel.JBossClientDDObjectFactory;
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
Modified: trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/META-INF-secure/jboss-client.xml
===================================================================
--- trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/META-INF-secure/jboss-client.xml 2007-01-17 16:17:23 UTC (rev 1990)
+++ trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/META-INF-secure/jboss-client.xml 2007-01-17 23:09:05 UTC (rev 1991)
@@ -7,16 +7,52 @@
<service-ref>
<service-ref-name>SecureService1</service-ref-name>
+ <service-class-name>org.jboss.test.ws.jaxws.webserviceref.SecureEndpointService</service-class-name>
+ <!--service-qname xmlns:ns1='http://org.jboss.ws/wsref'>ns1:SecureEndpointService</service-qname-->
+ <port-info>
+ <service-endpoint-interface>org.jboss.test.ws.jaxws.webserviceref.SecureEndpoint</service-endpoint-interface>
+ <!--wsdl-port xmlns:ns1='http://org.jboss.ws/wsref'>ns1:SecureEndpointPort</wsdl-port-->
+ <stub-property>
+ <name>javax.xml.ws.security.auth.password</name>
+ <value>j2ee</value>
+ </stub-property>
+ <stub-property>
+ <name>javax.xml.ws.security.auth.username</name>
+ <value>j2ee</value>
+ </stub-property>
+ </port-info>
<wsdl-override>http://@jbosstest.host.name@:8080/jaxws-webserviceref-secure/SecureEndpoint?wsdl</wsdl-override>
</service-ref>
<service-ref>
<service-ref-name>SecureService2</service-ref-name>
+ <port-info>
+ <!--wsdl-port xmlns:ns1='http://org.jboss.ws/wsref'>ns1:SecureEndpointPort</wsdl-port-->
+ <stub-property>
+ <name>javax.xml.ws.security.auth.password</name>
+ <value>j2ee</value>
+ </stub-property>
+ <stub-property>
+ <name>javax.xml.ws.security.auth.username</name>
+ <value>j2ee</value>
+ </stub-property>
+ </port-info>
<wsdl-override>http://@jbosstest.host.name@:8080/jaxws-webserviceref-secure/SecureEndpoint?wsdl</wsdl-override>
</service-ref>
<service-ref>
<service-ref-name>SecurePort1</service-ref-name>
+ <port-info>
+ <service-endpoint-interface>org.jboss.test.ws.jaxws.webserviceref.SecureEndpoint</service-endpoint-interface>
+ <stub-property>
+ <name>javax.xml.ws.security.auth.password</name>
+ <value>j2ee</value>
+ </stub-property>
+ <stub-property>
+ <name>javax.xml.ws.security.auth.username</name>
+ <value>j2ee</value>
+ </stub-property>
+ </port-info>
<wsdl-override>http://@jbosstest.host.name@:8080/jaxws-webserviceref-secure/SecureEndpoint?wsdl</wsdl-override>
</service-ref>
[View Less]
18 years
JBossWS SVN: r1990 - in trunk: jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-01-17 11:17:23 -0500 (Wed, 17 Jan 2007)
New Revision: 1990
Added:
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/VirtualFileAdaptor.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/UnifiedVirtualFile.java
Modified:
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/DeploymentInfoAdaptor.java
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/…
[View More]ServiceObjectFactory.java
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/WebServiceRefHandler.java
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/WebServiceRefHandlerMBean.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/UnifiedServiceRef.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/UnifiedDeploymentInfo.java
Log:
Use deployment root VirtualFile in @WebServiceRef handling
Modified: trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/DeploymentInfoAdaptor.java
===================================================================
--- trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/DeploymentInfoAdaptor.java 2007-01-17 15:29:14 UTC (rev 1989)
+++ trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/DeploymentInfoAdaptor.java 2007-01-17 16:17:23 UTC (rev 1990)
@@ -21,7 +21,6 @@
*/
package org.jboss.ws.integration.jboss50;
-import java.io.IOException;
import java.net.URL;
import java.net.URLClassLoader;
@@ -30,9 +29,7 @@
import org.jboss.ejb3.Ejb3Deployment;
import org.jboss.logging.Logger;
import org.jboss.metadata.WebMetaData;
-import org.jboss.virtual.VirtualFile;
import org.jboss.ws.core.server.UnifiedDeploymentInfo;
-import org.jboss.ws.core.server.UnifiedDeploymentInfo.UnifiedVirtualFile;
// $Id$
@@ -94,32 +91,4 @@
}
}
}
-
- public static class VirtualFileAdaptor implements UnifiedVirtualFile
- {
- private VirtualFile root;
-
- public VirtualFileAdaptor(VirtualFile root)
- {
- this.root = root;
- }
-
- public UnifiedVirtualFile findChild(String child) throws IOException
- {
- VirtualFile vf = root.findChild(child);
- return new VirtualFileAdaptor(vf);
- }
-
- public URL toURL()
- {
- try
- {
- return root.toURL();
- }
- catch (Exception e)
- {
- return null;
- }
- }
- }
}
Modified: trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceObjectFactory.java
===================================================================
--- trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceObjectFactory.java 2007-01-17 15:29:14 UTC (rev 1989)
+++ trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceObjectFactory.java 2007-01-17 16:17:23 UTC (rev 1990)
@@ -45,12 +45,11 @@
import javax.xml.ws.Service;
import org.jboss.logging.Logger;
-import org.jboss.virtual.VFS;
-import org.jboss.virtual.VirtualFile;
import org.jboss.ws.WSException;
import org.jboss.ws.core.StubExt;
import org.jboss.ws.core.jaxws.ServiceConfiguration;
import org.jboss.ws.core.jaxws.client.UnifiedServiceRef;
+import org.jboss.ws.core.server.UnifiedVirtualFile;
/**
* This ServiceObjectFactory reconstructs a javax.xml.ws.Service
@@ -103,8 +102,7 @@
Object target;
- URL rootURL = usRef.getRootURL();
- URL wsdlURL = getWsdlLocationURL(rootURL, serviceClass, usRef.getWsdlLocation());
+ URL wsdlURL = getWsdlLocationURL(targetClass != null ? targetClass : serviceClass, usRef);
// Generic javax.xml.ws.Service
if (serviceClass == Service.class)
@@ -207,8 +205,11 @@
return sref;
}
- private URL getWsdlLocationURL(URL rootURL, Class type, String wsdlLocation)
+ private URL getWsdlLocationURL(Class userClass, UnifiedServiceRef usRef)
{
+ UnifiedVirtualFile vfsRoot = usRef.getRootFile();
+ String wsdlLocation = usRef.getWsdlLocation();
+
URL wsdlURL = null;
if (wsdlLocation != null)
{
@@ -242,7 +243,6 @@
{
try
{
- VirtualFile vfsRoot = getVirtualFile(rootURL);
wsdlURL = vfsRoot.findChild(wsdlLocation).toURL();
}
catch (Exception ex)
@@ -254,11 +254,10 @@
// Try the filename relative to class
if (wsdlURL == null)
{
- String packagePath = type.getPackage().getName().replace('.', '/');
+ String packagePath = userClass.getPackage().getName().replace('.', '/');
String wsdlPath = packagePath + "/" + wsdlLocation;
try
{
- VirtualFile vfsRoot = getVirtualFile(rootURL);
wsdlURL = vfsRoot.findChild(wsdlPath).toURL();
}
catch (Exception ex)
@@ -272,18 +271,4 @@
}
return wsdlURL;
}
-
- /**
- * For some reason VFS.getRoot(rootURL) fails with
- * IOException("No context factory for " + rootURL);
- */
- private VirtualFile getVirtualFile(URL rootURL) throws IOException
- {
- URL fileURL = rootURL;
- if (rootURL.getProtocol().equals("vfsfile"))
- fileURL = new URL(rootURL.toExternalForm().substring(3));
-
- VirtualFile vfsRoot = VFS.getRoot(fileURL);
- return vfsRoot;
- }
}
Added: trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/VirtualFileAdaptor.java
===================================================================
--- trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/VirtualFileAdaptor.java (rev 0)
+++ trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/VirtualFileAdaptor.java 2007-01-17 16:17:23 UTC (rev 1990)
@@ -0,0 +1,66 @@
+/*
+ * 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.integration.jboss50;
+
+import java.io.IOException;
+import java.net.URL;
+
+import org.jboss.virtual.VirtualFile;
+import org.jboss.ws.core.server.UnifiedVirtualFile;
+
+// $Id$
+
+/**
+ * A JBoss50 VirtualFile adaptor
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 05-May-2006
+ */
+public class VirtualFileAdaptor implements UnifiedVirtualFile
+{
+ private static final long serialVersionUID = 6547394037548338042L;
+
+ private VirtualFile root;
+
+ public VirtualFileAdaptor(VirtualFile root)
+ {
+ this.root = root;
+ }
+
+ public UnifiedVirtualFile findChild(String child) throws IOException
+ {
+ VirtualFile vf = root.findChild(child);
+ return new VirtualFileAdaptor(vf);
+ }
+
+ public URL toURL()
+ {
+ try
+ {
+ return root.toURL();
+ }
+ catch (Exception e)
+ {
+ return null;
+ }
+ }
+}
Property changes on: trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/VirtualFileAdaptor.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/WebServiceRefHandler.java
===================================================================
--- trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/WebServiceRefHandler.java 2007-01-17 15:29:14 UTC (rev 1989)
+++ trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/WebServiceRefHandler.java 2007-01-17 16:17:23 UTC (rev 1990)
@@ -38,6 +38,7 @@
import org.jboss.logging.Logger;
import org.jboss.mx.util.MBeanServerLocator;
import org.jboss.util.naming.Util;
+import org.jboss.virtual.VirtualFile;
import org.jboss.ws.WSException;
import org.jboss.ws.core.jaxws.client.UnifiedServiceRef;
import org.jboss.ws.core.utils.DOMUtils;
@@ -55,7 +56,7 @@
// logging support
private static Logger log = Logger.getLogger(WebServiceRefHandler.class);
- public void setupWebServiceRef(Context encCtx, String encName, Class targetClass, WebServiceRef wsref, URL rootURL, Source metadata) throws NamingException
+ public void setupWebServiceRef(Context encCtx, String encName, Class targetClass, WebServiceRef wsref, VirtualFile vfsRoot, Source metadata) throws NamingException
{
String externalName = encCtx.getNameInNamespace() + "/" + encName;
String refTypeName = (targetClass != null ? targetClass.getName() : null);
@@ -86,7 +87,7 @@
try
{
- UnifiedServiceRef usRef = getUnifiedServiceRef(rootURL, metadata);
+ UnifiedServiceRef usRef = getUnifiedServiceRef(vfsRoot, metadata);
// Set the wsdlLocation if there is no override already
if (usRef.getWsdlLocation() == null && wsref.wsdlLocation().length() > 0)
@@ -104,12 +105,12 @@
}
}
- private UnifiedServiceRef getUnifiedServiceRef(URL rootURL, Source metadata) throws TransformerException
+ private UnifiedServiceRef getUnifiedServiceRef(VirtualFile vfsRoot, Source metadata) throws TransformerException
{
Element root = getElementFromSource(metadata);
String encName = DOMUtils.getTextContent(DOMUtils.getFirstChildElement(root, "service-ref-name"));
- UnifiedServiceRef ref = new UnifiedServiceRef(rootURL, encName);
+ UnifiedServiceRef ref = new UnifiedServiceRef(new VirtualFileAdaptor(vfsRoot), encName);
Element refEl = DOMUtils.getFirstChildElement(root, "config-name");
if (refEl != null)
Modified: trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/WebServiceRefHandlerMBean.java
===================================================================
--- trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/WebServiceRefHandlerMBean.java 2007-01-17 15:29:14 UTC (rev 1989)
+++ trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/WebServiceRefHandlerMBean.java 2007-01-17 16:17:23 UTC (rev 1990)
@@ -21,7 +21,6 @@
*/
package org.jboss.ws.integration.jboss50;
-import java.net.URL;
import javax.management.ObjectName;
import javax.naming.Context;
@@ -29,6 +28,7 @@
import javax.xml.transform.Source;
import javax.xml.ws.WebServiceRef;
+import org.jboss.virtual.VirtualFile;
import org.jboss.ws.core.utils.ObjectNameFactory;
/**
@@ -41,5 +41,5 @@
/** Binds a JAXWS WebServiceRef into the callers ENC
*/
- void setupWebServiceRef(Context encCtx, String encName, Class refType, WebServiceRef wsref, URL rootURL, Source metadata) throws NamingException;
+ void setupWebServiceRef(Context encCtx, String encName, Class refType, WebServiceRef wsref, VirtualFile vfsRoot, Source metadata) throws NamingException;
}
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/UnifiedServiceRef.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/UnifiedServiceRef.java 2007-01-17 15:29:14 UTC (rev 1989)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/UnifiedServiceRef.java 2007-01-17 16:17:23 UTC (rev 1990)
@@ -24,8 +24,9 @@
//$Id$
import java.io.Serializable;
-import java.net.URL;
+import org.jboss.ws.core.server.UnifiedVirtualFile;
+
/**
* Represents a <service-ref> element of the jboss.xml, jboss-web.xml, jboss-client.xml deployment descriptor
* for the 5.0 schema
@@ -34,23 +35,23 @@
*/
public class UnifiedServiceRef implements Serializable
{
- private static final long serialVersionUID = 7575421890971083734L;
+ private static final long serialVersionUID = -5518998734737147195L;
- private URL rootURL;
+ private UnifiedVirtualFile vfsRoot;
private String encName;
private String wsdlLocation;
private String configName;
private String configFile;
- public UnifiedServiceRef(URL rootURL, String name)
+ public UnifiedServiceRef(UnifiedVirtualFile vfsRoot, String name)
{
- this.rootURL = rootURL;
+ this.vfsRoot = vfsRoot;
this.encName = name;
}
- public URL getRootURL()
+ public UnifiedVirtualFile getRootFile()
{
- return rootURL;
+ return vfsRoot;
}
public String getEncName()
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/UnifiedDeploymentInfo.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/UnifiedDeploymentInfo.java 2007-01-17 15:29:14 UTC (rev 1989)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/UnifiedDeploymentInfo.java 2007-01-17 16:17:23 UTC (rev 1990)
@@ -122,16 +122,6 @@
return resourceURL;
}
- /**
- * An adaptor a VirtualFile from jboss-vfs.jar
- * jboss-vfs cannot be used in jboss-4.x because of its dependeny on jboss-common-core.jar
- */
- public interface UnifiedVirtualFile
- {
- UnifiedVirtualFile findChild(String child) throws IOException;
- URL toURL();
- }
-
public String toString()
{
StringBuilder builder = new StringBuilder();
Added: trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/UnifiedVirtualFile.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/UnifiedVirtualFile.java (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/UnifiedVirtualFile.java 2007-01-17 16:17:23 UTC (rev 1990)
@@ -0,0 +1,42 @@
+/*
+ * 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.core.server;
+
+// $Id$
+
+import java.io.IOException;
+import java.io.Serializable;
+import java.net.URL;
+
+/**
+ * An adaptor to a VirtualFile from jboss-vfs.jar
+ * jboss-vfs cannot be used in jboss-4.x because of its dependeny on jboss-common-core.jar
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 05-May-2006
+ */
+public interface UnifiedVirtualFile extends Serializable
+{
+ UnifiedVirtualFile findChild(String child) throws IOException;
+
+ URL toURL();
+}
Property changes on: trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/UnifiedVirtualFile.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
[View Less]
18 years
JBossWS SVN: r1989 - in trunk/jbossws-core/src/main/java/org/jboss/ws: core/jaxrpc/binding and 3 other directories.
by jbossws-commits@lists.jboss.org
Author: jason.greene(a)jboss.com
Date: 2007-01-17 10:29:14 -0500 (Wed, 17 Jan 2007)
New Revision: 1989
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/core/EndpointInvocation.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/Base64Serializer.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarSerializer.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/DateSerializer.java
trunk/jbossws-core/src/main/…
[View More]java/org/jboss/ws/core/jaxrpc/binding/HexSerializer.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/NullValueSerializer.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/QNameSerializer.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SerializationContext.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SerializerSupport.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SimpleSerializer.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBDeserializer.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBSerializer.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/SOAPFaultHelperJAXWS.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPContentElement.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java
Log:
Fixed JBCTS-453 - jaxws/ee/w2j/document/literal/marshalltest
Fixed QNameSerializer to handle ns declarations correctly
Enhanced wrapValueStr to allow for additional ns declarations
Added support for marshalling java.lang.Object with JAXB
Added the notion of context types to the SerializationContext
Fixed type substitution in JAXBSerializer/JAXBDeserializer
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/EndpointInvocation.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/EndpointInvocation.java 2007-01-17 14:46:03 UTC (rev 1988)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/EndpointInvocation.java 2007-01-17 15:29:14 UTC (rev 1989)
@@ -47,6 +47,7 @@
import org.jboss.ws.metadata.umdm.OperationMetaData;
import org.jboss.ws.metadata.umdm.ParameterMetaData;
import org.jboss.ws.metadata.umdm.WrappedParameter;
+import org.w3c.dom.Element;
/** A web service invocation.
*
@@ -187,7 +188,7 @@
{
QName xmlName = paramMetaData.getXmlName();
QName xmlType = paramMetaData.getXmlType();
- Class javaType = paramMetaData.getJavaType();
+ Class<?> javaType = paramMetaData.getJavaType();
String javaName = paramMetaData.getJavaTypeName();
if (xmlType == null)
@@ -229,8 +230,11 @@
}
else if (paramValue instanceof SOAPContentElement)
{
- // For type other than xsd:anyType we return the object value
- if (xmlType.getLocalPart().equals("anyType") == false)
+ // If this is bound to a SOAPElement, or Element, then we can return
+ // the content element as is.
+ // Note, that it is possible for a Java type to be bound to an any
+ // type, so checking the xml type is not sufficient.
+ if (! Element.class.isAssignableFrom(javaType))
{
SOAPContentElement soapElement = (SOAPContentElement)paramValue;
retValue = soapElement.getObjectValue();
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/Base64Serializer.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/Base64Serializer.java 2007-01-17 14:46:03 UTC (rev 1988)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/Base64Serializer.java 2007-01-17 15:29:14 UTC (rev 1989)
@@ -63,13 +63,13 @@
xopObject.setContentType("application/octet-stream");
String cid = xopMarshaller.addMtomAttachment(xopObject, xmlName.getNamespaceURI(), xmlType.getLocalPart() );
String xopInclude = "<xop:Include xmlns:xop='http://www.w3.org/2004/08/xop/include' href='"+cid+"'/>";
- xmlFragment = wrapValueStr(xmlName, xopInclude, nsRegistry, attributes, false);
+ xmlFragment = wrapValueStr(xmlName, xopInclude, nsRegistry, null, attributes, false);
}
else
{
value = JavaUtils.getPrimitiveValueArray(value);
String valueStr = SimpleTypeBindings.marshalBase64((byte[])value);
- xmlFragment = wrapValueStr(xmlName, valueStr, nsRegistry, attributes, true);
+ xmlFragment = wrapValueStr(xmlName, valueStr, nsRegistry, null, attributes, true);
}
return xmlFragment;
}
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarSerializer.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarSerializer.java 2007-01-17 14:46:03 UTC (rev 1988)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarSerializer.java 2007-01-17 15:29:14 UTC (rev 1989)
@@ -48,11 +48,11 @@
public String serialize(QName xmlName, QName xmlType, Object value, SerializationContext serContext, NamedNodeMap attributes) throws BindingException
{
log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
-
+
String valueStr = SimpleTypeBindings.marshalDateTime((Calendar)value);
NamespaceRegistry nsRegistry = serContext.getNamespaceRegistry();
- String xmlFragment = wrapValueStr(xmlName, valueStr, nsRegistry, attributes, true);
+ String xmlFragment = wrapValueStr(xmlName, valueStr, nsRegistry, null, attributes, true);
return xmlFragment;
}
}
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/DateSerializer.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/DateSerializer.java 2007-01-17 14:46:03 UTC (rev 1988)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/DateSerializer.java 2007-01-17 15:29:14 UTC (rev 1989)
@@ -62,7 +62,7 @@
String valueStr = SimpleTypeBindings.marshalDateTime((Calendar)value);
NamespaceRegistry nsRegistry = serContext.getNamespaceRegistry();
- String xmlFragment = wrapValueStr(xmlName, valueStr, nsRegistry, attributes, true);
+ String xmlFragment = wrapValueStr(xmlName, valueStr, nsRegistry, null, attributes, true);
return xmlFragment;
}
}
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/HexSerializer.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/HexSerializer.java 2007-01-17 14:46:03 UTC (rev 1988)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/HexSerializer.java 2007-01-17 15:29:14 UTC (rev 1989)
@@ -54,7 +54,7 @@
String valueStr = SimpleTypeBindings.marshalHexBinary((byte[])value);
NamespaceRegistry nsRegistry = serContext.getNamespaceRegistry();
- String xmlFragment = wrapValueStr(xmlName, valueStr, nsRegistry, attributes, true);
+ String xmlFragment = wrapValueStr(xmlName, valueStr, nsRegistry, null, attributes, true);
return xmlFragment;
}
}
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/NullValueSerializer.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/NullValueSerializer.java 2007-01-17 14:46:03 UTC (rev 1988)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/NullValueSerializer.java 2007-01-17 15:29:14 UTC (rev 1989)
@@ -46,13 +46,13 @@
/**
* Serializes an object null value.
- *
+ *
* If a message part of an RPC parameter is defined like this
- *
+ *
* <message name='SomeMessage'>
* <part name='partName' element='someElement'/>
* </message>
- *
+ *
* it is possible that the element definition does not allow
* null values. In that case an error should be generated.
*/
@@ -62,7 +62,7 @@
NamespaceRegistry nsRegistry = serContext.getNamespaceRegistry();
nsRegistry.registerURI(Constants.NS_SCHEMA_XSI, Constants.PREFIX_XSI);
- String xmlFragment = wrapValueStr(xmlName, null, nsRegistry, attributes, true);
+ String xmlFragment = wrapValueStr(xmlName, null, nsRegistry, null, attributes, true);
return xmlFragment;
}
}
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/QNameSerializer.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/QNameSerializer.java 2007-01-17 14:46:03 UTC (rev 1988)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/QNameSerializer.java 2007-01-17 15:29:14 UTC (rev 1989)
@@ -23,12 +23,12 @@
// $Id$
+import java.util.HashSet;
+import java.util.Set;
+
import javax.xml.namespace.QName;
import org.jboss.logging.Logger;
-import org.jboss.ws.core.jaxrpc.binding.BindingException;
-import org.jboss.ws.core.jaxrpc.binding.SerializationContext;
-import org.jboss.ws.core.jaxrpc.binding.SerializerSupport;
import org.jboss.xb.binding.NamespaceRegistry;
import org.jboss.xb.binding.SimpleTypeBindings;
import org.w3c.dom.NamedNodeMap;
@@ -52,26 +52,19 @@
String nsURI = qnameValue.getNamespaceURI();
NamespaceRegistry nsRegistry = serContext.getNamespaceRegistry();
-
+ Set<String> additionalNamespaces = new HashSet<String>();
// Remove prefix and register again
if (nsURI.length() > 0)
{
- qnameValue = new QName(qnameValue.getNamespaceURI(), qnameValue.getLocalPart());
+ qnameValue = new QName(nsURI, qnameValue.getLocalPart());
qnameValue = nsRegistry.registerQName(qnameValue);
+ if (!nsURI.equals(xmlName.getNamespaceURI()))
+ additionalNamespaces.add(nsURI);
}
String valueStr = SimpleTypeBindings.marshalQName(qnameValue, nsRegistry);
- String xmlFragment = wrapValueStr(xmlName, valueStr, nsRegistry, attributes, true);
- // Insert the NS declaration for the qnameValue
- if (nsURI.length() > 0)
- {
- StringBuilder buffer = new StringBuilder(xmlFragment);
- int indexGT = xmlFragment.indexOf(">");
- String prefix = qnameValue.getPrefix();
- buffer.insert(indexGT, " xmlns:" + prefix + "='" + nsURI + "'");
- xmlFragment = buffer.toString();
- }
+ String xmlFragment = wrapValueStr(xmlName, valueStr, nsRegistry, additionalNamespaces, attributes, true);
return xmlFragment;
}
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SerializationContext.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SerializationContext.java 2007-01-17 14:46:03 UTC (rev 1988)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SerializationContext.java 2007-01-17 15:29:14 UTC (rev 1989)
@@ -31,12 +31,14 @@
/**
* An abstract serialization context
- *
+ *
* @author Thomas.Diesler(a)jboss.org
* @since 04-Dec-2004
*/
public abstract class SerializationContext
{
+ public static final String CONTEXT_TYPES = "org.jboss.ws.jaxrpc.binding.contextTypes";
+
// The type mapping that is valid for this serialization context
private TypeMappingImpl typeMapping;
// The namespace registry that is valid for this serialization context
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SerializerSupport.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SerializerSupport.java 2007-01-17 14:46:03 UTC (rev 1988)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SerializerSupport.java 2007-01-17 15:29:14 UTC (rev 1989)
@@ -23,6 +23,8 @@
// $Id$
+import java.util.Set;
+
import javax.xml.namespace.QName;
import javax.xml.rpc.encoding.Serializer;
@@ -54,11 +56,10 @@
/** Wrap the value string in a XML fragment with the given name
*/
- protected String wrapValueStr(QName xmlName, String valueStr, NamespaceRegistry nsRegistry, NamedNodeMap attributes, boolean normalize)
+ protected String wrapValueStr(QName xmlName, String valueStr, NamespaceRegistry nsRegistry, Set<String> additionalNamespaces, NamedNodeMap attributes, boolean normalize)
{
String nsURI = xmlName.getNamespaceURI();
String localPart = xmlName.getLocalPart();
- String prefix = xmlName.getPrefix();
StringBuilder nsAttr = new StringBuilder("");
if (attributes != null)
@@ -76,20 +77,28 @@
if (nsURI.length() > 0)
{
xmlName = nsRegistry.registerQName(xmlName);
- prefix = xmlName.getPrefix();
+ String prefix = xmlName.getPrefix();
elName = prefix + ":" + localPart;
- String xmlns = " xmlns:" + prefix + "='" + nsURI + "'";
- if (nsAttr.indexOf(xmlns) < 0)
- {
- nsAttr.append(xmlns);
- }
+ nsAttr.append(" xmlns:" + prefix + "='" + nsURI + "'");
}
else
{
elName = localPart;
}
+ if (additionalNamespaces != null)
+ {
+ for (String ns : additionalNamespaces)
+ {
+ if (ns.equals(nsURI))
+ continue;
+
+ String prefix = nsRegistry.getPrefix(ns);
+ nsAttr.append(" xmlns:" + prefix + "='" + ns + "'");
+ }
+ }
+
String xmlFragment;
if (valueStr == null)
{
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SimpleSerializer.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SimpleSerializer.java 2007-01-17 14:46:03 UTC (rev 1988)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SimpleSerializer.java 2007-01-17 15:29:14 UTC (rev 1989)
@@ -68,7 +68,7 @@
valueStr = SimpleTypeBindings.marshal(xmlType.getLocalPart(), value, nsRegistry);
}
- String xmlFragment = wrapValueStr(xmlName, valueStr, nsRegistry, attributes, true);
+ String xmlFragment = wrapValueStr(xmlName, valueStr, nsRegistry, null, attributes, true);
return xmlFragment;
}
}
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBDeserializer.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBDeserializer.java 2007-01-17 14:46:03 UTC (rev 1988)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBDeserializer.java 2007-01-17 15:29:14 UTC (rev 1989)
@@ -24,6 +24,7 @@
// $Id$
import java.io.ByteArrayInputStream;
+import java.util.List;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBElement;
@@ -38,6 +39,7 @@
import org.jboss.ws.core.jaxrpc.binding.ComplexTypeDeserializer;
import org.jboss.ws.core.jaxrpc.binding.SerializationContext;
import org.jboss.ws.extensions.xop.jaxws.AttachmentUnmarshallerImpl;
+import org.jboss.ws.metadata.umdm.ParameterMetaData;
/**
* A Deserializer that can handle complex types by delegating to JAXB.
@@ -55,23 +57,25 @@
}
@Override
- public Object deserialize(QName xmlName, QName xmlType, String val, SerializationContext serContext)
+ public Object deserialize(QName xmlName, QName xmlType, String val, SerializationContext serContext)
{
log.debug("deserialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
Object value = null;
try
{
+ Class[] types = (Class[])serContext.getProperty(SerializationContext.CONTEXT_TYPES);
+
TypeMappingImpl typeMapping = serContext.getTypeMapping();
Class javaType = typeMapping.getJavaType(xmlType);
- JAXBContext jaxbContext = JAXBContext.newInstance(javaType);
+ JAXBContext jaxbContext = JAXBContext.newInstance(types);
Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
unmarshaller.setAttachmentUnmarshaller( new AttachmentUnmarshallerImpl());
-
+
ByteArrayInputStream ins = new ByteArrayInputStream(val.getBytes("UTF-8"));
JAXBElement jbe = unmarshaller.unmarshal(new StreamSource(ins), javaType);
value = jbe.getValue();
-
+
log.debug("deserialized: " + (value != null ? value.getClass().getName() : null));
}
catch (Exception ex)
@@ -82,14 +86,14 @@
}
- // 4.21 Conformance (Marshalling failure): If an error occurs when using the supplied JAXBContext to marshall
+ // 4.21 Conformance (Marshalling failure): If an error occurs when using the supplied JAXBContext to marshall
// a request or unmarshall a response, an implementation MUST throw a WebServiceException whose
// cause is set to the original JAXBException.
private void handleUnmarshallException(Exception ex)
{
if (ex instanceof WebServiceException)
throw (WebServiceException)ex;
-
+
throw new WebServiceException(ex);
}
}
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBSerializer.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBSerializer.java 2007-01-17 14:46:03 UTC (rev 1988)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBSerializer.java 2007-01-17 15:29:14 UTC (rev 1989)
@@ -75,7 +75,7 @@
{
if(JavaUtils.isAssignableFrom(type, value.getClass()))
{
- javaType = value.getClass();
+ javaType = type;
break;
}
}
@@ -91,9 +91,9 @@
JAXBContext jaxbContext = JAXBContext.newInstance(javaType);
Marshaller marshaller = jaxbContext.createMarshaller();
- marshaller.setProperty(Marshaller.JAXB_FRAGMENT, true);
+ marshaller.setProperty(Marshaller.JAXB_FRAGMENT, true);
marshaller.setAttachmentMarshaller(new AttachmentMarshallerImpl());
-
+
StringWriter strwr = new StringWriter();
marshaller.marshal(new JAXBElement(xmlName, javaType, value), strwr);
xmlFragment = strwr.toString();
@@ -106,15 +106,15 @@
}
return xmlFragment;
}
-
- // 4.21 Conformance (Marshalling failure): If an error occurs when using the supplied JAXBContext to marshall
+
+ // 4.21 Conformance (Marshalling failure): If an error occurs when using the supplied JAXBContext to marshall
// a request or unmarshall a response, an implementation MUST throw a WebServiceException whose
// cause is set to the original JAXBException.
private void handleMarshallException(Exception ex)
{
if (ex instanceof WebServiceException)
throw (WebServiceException)ex;
-
+
throw new WebServiceException(ex);
}
}
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/SOAPFaultHelperJAXWS.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/SOAPFaultHelperJAXWS.java 2007-01-17 14:46:03 UTC (rev 1988)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/SOAPFaultHelperJAXWS.java 2007-01-17 15:29:14 UTC (rev 1989)
@@ -95,7 +95,7 @@
// http://jira.jboss.org/jira/browse/JBWS-955
// Cannot deserialize fault detail
String prefix = deElement.getPrefix();
- if (prefix.length() > 0)
+ if (prefix != null && prefix.length() > 0)
{
String nsURI = deElement.getNamespaceURI();
String attrValue = deElement.getAttribute("xmlns:" + prefix);
@@ -115,6 +115,9 @@
// Try jaxb deserialization
try
{
+ Class[] types = opMetaData.getEndpointMetaData().getRegisteredTypes().toArray(new Class[0]);
+ serContext.setProperty(SerializationContext.CONTEXT_TYPES, types);
+
String xmlFragment = DOMWriter.printNode(deElement, false);
DeserializerSupport des = (DeserializerSupport)desFactory.getDeserializer();
Object faultBean = des.deserialize(xmlName, xmlType, xmlFragment, serContext);
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPContentElement.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPContentElement.java 2007-01-17 14:46:03 UTC (rev 1988)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPContentElement.java 2007-01-17 15:29:14 UTC (rev 1989)
@@ -30,6 +30,7 @@
import java.lang.reflect.Array;
import java.lang.reflect.Method;
import java.util.Iterator;
+import java.util.List;
import javax.activation.DataHandler;
import javax.activation.DataSource;
@@ -249,7 +250,10 @@
throw new WSException("MessageContext not available");
SerializationContext serContext = msgContext.getSerializationContext();
- serContext.setProperty(ParameterMetaData.class.getName(), getParamMetaData());
+ ParameterMetaData pmd = getParamMetaData();
+ serContext.setProperty(ParameterMetaData.class.getName(), pmd);
+ List<Class> registeredTypes = pmd.getOperationMetaData().getEndpointMetaData().getRegisteredTypes();
+ serContext.setProperty(SerializationContext.CONTEXT_TYPES, registeredTypes.toArray(new Class[0]));
try
{
@@ -323,7 +327,7 @@
if(!JavaUtils.isAssignableFrom(javaType, obj.getClass()))
{
- throw new WSException("Java type '" + javaType + "' is not assignable from: " + objType.getName());
+ throw new WSException("Java type '" + javaType + "' is not assignable from: " + objType.getName());
}
}
}
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java 2007-01-17 14:46:03 UTC (rev 1988)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java 2007-01-17 15:29:14 UTC (rev 1989)
@@ -24,7 +24,14 @@
// $Id$
import java.lang.reflect.Method;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Observable;
+import java.util.Properties;
import javax.jws.soap.SOAPBinding.ParameterStyle;
import javax.xml.namespace.QName;
@@ -114,6 +121,8 @@
private boolean handlersInitialized;
// Maps the java method to the operation meta data
private Map<Method, OperationMetaData> opMetaDataCache = new HashMap<Method, OperationMetaData>();
+ // All of the registered types
+ private List<Class> registeredTypes = new ArrayList<Class>();
private ConfigObservable configObservable = new ConfigObservable();
@@ -510,16 +519,18 @@
private void eagerInitializeTypes()
{
TypeMappingImpl typeMapping = serviceMetaData.getTypeMapping();
- for (TypeMappingMetaData tmMetaData : serviceMetaData.getTypesMetaData().getTypeMappings())
+ List<TypeMappingMetaData> typeMappings = serviceMetaData.getTypesMetaData().getTypeMappings();
+ registeredTypes = new ArrayList<Class>(typeMappings.size());
+ for (TypeMappingMetaData tmMetaData : typeMappings)
{
String javaTypeName = tmMetaData.getJavaTypeName();
QName xmlType = tmMetaData.getXmlType();
if (xmlType != null)
{
- List<Class> registeredTypes = typeMapping.getJavaTypes(xmlType);
+ List<Class> types = typeMapping.getJavaTypes(xmlType);
boolean registered = false;
- for (Class current : registeredTypes) {
+ for (Class current : types) {
if (current.getName().equals(javaTypeName))
{
registered = true;
@@ -537,6 +548,9 @@
if (JavaUtils.isPrimitive(javaTypeName))
javaType = JavaUtils.getWrapperType(javaType);
+ // Needed for runtime JAXB context
+ registeredTypes.add(javaType);
+
if (getEncodingStyle() == Use.ENCODED && javaType.isArray())
{
typeMapping.register(javaType, xmlType, new SOAPArraySerializerFactory(), new SOAPArrayDeserializerFactory());
@@ -648,6 +662,11 @@
this.configObservable.notifyObservers(configName);
}
+ public List<Class> getRegisteredTypes()
+ {
+ return Collections.unmodifiableList(registeredTypes);
+ }
+
public void update(Observable observable, Object object) {
log.trace("Ingore configuration change notification");
}
[View Less]
18 years
JBossWS SVN: r1988 - in trunk: integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50 and 30 other directories.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-01-17 09:46:03 -0500 (Wed, 17 Jan 2007)
New Revision: 1988
Added:
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceObjectFactory.java
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceReferenceable.java
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/WebServiceRefHandler.java
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/…
[View More]WebServiceRefHandlerMBean.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/StubExt.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/ServiceConfiguration.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/SecureEndpoint.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/SecureEndpointClient.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/SecureEndpointImpl.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/SecureEndpointService.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/StubPropertyTestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/TestEndpointClient.java
trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/META-INF-secure/
trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/META-INF-secure/application-client.xml
trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/META-INF-secure/jboss-client.xml
Removed:
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/StubExt.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/ServiceDecorator.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/StubExt.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceObjectFactory.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceReferenceable.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/WebServiceRefDeployer.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/ApplicationClient.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/Echo.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/EchoResponse.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/ObjectFactory.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/package-info.java
Modified:
trunk/build/etc/jbossws-component-info.xml
trunk/integration-jboss50/src/main/resources/jbossws.deployer/META-INF/jbossws-deployer-beans.xml
trunk/jbossws-core/src/main/java/org/jboss/ws/WSException.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/CommonClient.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/CommonSOAPBinding.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/CallImpl.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/PortProxy.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/ServiceImpl.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/ServiceObjectFactory.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ClientProxy.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/UnifiedServiceRef.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPConnectionImpl.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/xop/DisableMTOMHandler.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/xop/XOPContext.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ServerEndpointMetaData.java
trunk/jbossws-tests/.classpath
trunk/jbossws-tests/ant-import/build-jars-jaxrpc.xml
trunk/jbossws-tests/ant-import/build-jars-jaxws.xml
trunk/jbossws-tests/build.xml
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/JBossWSTest.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/JBossWSTestHelper.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1384/JBWS1384TestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1410/JBWS1410TestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/handler/HeaderClientTestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/handler/HeaderProxyTestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/mtom/MTOMTestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/wseventing/SysmonTestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/wssecurity/SimpleEncryptTestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/wssecurity/SimpleSignTestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/wseventing/DIIClientTestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/wseventing/EventingSupport.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/wseventing/EventingTestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/xop/doclit/XOPBase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/xop/rpclit/XOPBase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/xop/shared/MTOMServiceBase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/TestEndpoint.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/TestEndpointImpl.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/TestEndpointService.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefClientTestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefEJB3TestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefServletTestCase.java
trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/META-INF/jboss-client.xml
trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/META-INF/wsdl/TestEndpoint.wsdl
Log:
Fix handling of <wsdl-location> in jaxws <service-ref>
Support StubExt on jaxws client proxies
Fix configName, configFile handling on service and client proxy
Re-enable WebServiceRef client tests
Modified: trunk/build/etc/jbossws-component-info.xml
===================================================================
--- trunk/build/etc/jbossws-component-info.xml 2007-01-16 15:32:38 UTC (rev 1987)
+++ trunk/build/etc/jbossws-component-info.xml 2007-01-17 14:46:03 UTC (rev 1988)
@@ -40,7 +40,6 @@
</import>
<export>
- <include input="jbossws-client.jar"/>
<include input="jboss-jaxrpc.jar"/>
<include input="jboss-jaxws.jar"/>
<include input="jboss-saaj.jar"/>
Added: trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceObjectFactory.java
===================================================================
--- trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceObjectFactory.java (rev 0)
+++ trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceObjectFactory.java 2007-01-17 14:46:03 UTC (rev 1988)
@@ -0,0 +1,289 @@
+/*
+ * 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.
+ */
+// $Id$
+package org.jboss.ws.integration.jboss50;
+
+// $Id$
+
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Hashtable;
+
+import javax.naming.Context;
+import javax.naming.Name;
+import javax.naming.NamingException;
+import javax.naming.RefAddr;
+import javax.naming.Reference;
+import javax.naming.spi.ObjectFactory;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
+import org.jboss.logging.Logger;
+import org.jboss.virtual.VFS;
+import org.jboss.virtual.VirtualFile;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.StubExt;
+import org.jboss.ws.core.jaxws.ServiceConfiguration;
+import org.jboss.ws.core.jaxws.client.UnifiedServiceRef;
+
+/**
+ * This ServiceObjectFactory reconstructs a javax.xml.ws.Service
+ * for a given WSDL when the webservice client does a JNDI lookup
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 24-Oct-2004
+ */
+public class ServiceObjectFactory implements ObjectFactory
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(ServiceObjectFactory.class);
+
+ /**
+ * Creates an object using the location or reference information specified.
+ * <p/>
+ *
+ * @param obj The possibly null object containing location or reference
+ * information that can be used in creating an object.
+ * @param name The name of this object relative to <code>nameCtx</code>,
+ * or null if no name is specified.
+ * @param nameCtx The context relative to which the <code>name</code>
+ * parameter is specified, or null if <code>name</code> is
+ * relative to the default initial context.
+ * @param environment The possibly null environment that is used in
+ * creating the object.
+ * @return The object created; null if an object cannot be created.
+ * @throws Exception if this object factory encountered an exception
+ * while attempting to create an object, and no other object factories are
+ * to be tried.
+ * @see javax.naming.spi.NamingManager#getObjectInstance
+ * @see javax.naming.spi.NamingManager#getURLContext
+ */
+ public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable environment) throws Exception
+ {
+ try
+ {
+ Reference ref = (Reference)obj;
+
+ String serviceClassName = (String)ref.get(ServiceReferenceable.SERVICE_CLASS_NAME).getContent();
+ String targetClassName = (String)ref.get(ServiceReferenceable.TARGET_CLASS_NAME).getContent();
+ UnifiedServiceRef usRef = unmarshallServiceRef(ref);
+
+ ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
+ Class serviceClass = ctxLoader.loadClass(serviceClassName);
+ Class targetClass = (targetClassName != null ? ctxLoader.loadClass(targetClassName) : null);
+
+ if (Service.class.isAssignableFrom(serviceClass) == false)
+ throw new IllegalArgumentException("WebServiceRef type '" + serviceClass + "' is not assignable to javax.xml.ws.Service");
+
+ Object target;
+
+ URL rootURL = usRef.getRootURL();
+ URL wsdlURL = getWsdlLocationURL(rootURL, serviceClass, usRef.getWsdlLocation());
+
+ // Generic javax.xml.ws.Service
+ if (serviceClass == Service.class)
+ {
+ if (wsdlURL != null)
+ {
+ target = Service.create(wsdlURL, null);
+ }
+ else
+ {
+ throw new IllegalArgumentException("Cannot create generic javax.xml.ws.Service without wsdlLocation");
+ }
+ }
+ // Generated javax.xml.ws.Service subclass
+ else
+ {
+ if (wsdlURL != null)
+ {
+ Constructor ctor = serviceClass.getConstructor(new Class[] { URL.class, QName.class });
+ target = ctor.newInstance(new Object[] { wsdlURL, null });
+ }
+ else
+ {
+ target = (Service)serviceClass.newInstance();
+ }
+ }
+
+ if (targetClassName != null && targetClassName.equals(serviceClassName) == false)
+ {
+ try
+ {
+ Object port = null;
+ for (Method method : serviceClass.getMethods())
+ {
+ String methodName = method.getName();
+ Class retType = method.getReturnType();
+ if (methodName.startsWith("get") && targetClass.isAssignableFrom(retType))
+ {
+ port = method.invoke(target, new Object[0]);
+ target = port;
+ break;
+ }
+ }
+
+ if (port == null)
+ {
+ Method method = serviceClass.getMethod("getPort", new Class[] { Class.class });
+ port = method.invoke(target, new Object[] { targetClass });
+ target = port;
+ }
+ }
+ catch (InvocationTargetException ex)
+ {
+ throw ex.getTargetException();
+ }
+ }
+
+ configureInjectionTarget(target, usRef);
+
+ return target;
+ }
+ catch (Throwable ex)
+ {
+ WSException.rethrow("Cannot create service", ex);
+ return null;
+ }
+ }
+
+ private void configureInjectionTarget(Object target, UnifiedServiceRef usRef)
+ {
+ if (target instanceof ServiceConfiguration)
+ {
+ ServiceConfiguration service = (ServiceConfiguration)target;
+ service.setConfigName(usRef.getConfigName());
+ service.setConfigFile(usRef.getConfigFile());
+ }
+ if (target instanceof StubExt)
+ {
+ StubExt stub = (StubExt)target;
+ stub.setConfigName(usRef.getConfigName());
+ stub.setConfigFile(usRef.getConfigFile());
+ }
+ }
+
+ private UnifiedServiceRef unmarshallServiceRef(Reference ref) throws ClassNotFoundException, NamingException
+ {
+ UnifiedServiceRef sref;
+ RefAddr refAddr = ref.get(ServiceReferenceable.UNIFIED_SERVICE_REF);
+ ByteArrayInputStream bais = new ByteArrayInputStream((byte[])refAddr.getContent());
+ try
+ {
+ ObjectInputStream ois = new ObjectInputStream(bais);
+ sref = (UnifiedServiceRef)ois.readObject();
+ ois.close();
+ }
+ catch (IOException e)
+ {
+ throw new NamingException("Cannot unmarshall service ref meta data, cause: " + e.toString());
+ }
+ return sref;
+ }
+
+ private URL getWsdlLocationURL(URL rootURL, Class type, String wsdlLocation)
+ {
+ URL wsdlURL = null;
+ if (wsdlLocation != null)
+ {
+ // Try the wsdlLocation as URL
+ try
+ {
+ wsdlURL = new URL(wsdlLocation);
+ }
+ catch (MalformedURLException ex)
+ {
+ // ignore
+ }
+
+ // Try the filename as File
+ if (wsdlURL == null)
+ {
+ try
+ {
+ File file = new File(wsdlLocation);
+ if (file.exists())
+ wsdlURL = file.toURL();
+ }
+ catch (MalformedURLException e)
+ {
+ // ignore
+ }
+ }
+
+ // Try the filename as Resource
+ if (wsdlURL == null)
+ {
+ try
+ {
+ VirtualFile vfsRoot = getVirtualFile(rootURL);
+ wsdlURL = vfsRoot.findChild(wsdlLocation).toURL();
+ }
+ catch (Exception ex)
+ {
+ // ignore
+ }
+ }
+
+ // Try the filename relative to class
+ if (wsdlURL == null)
+ {
+ String packagePath = type.getPackage().getName().replace('.', '/');
+ String wsdlPath = packagePath + "/" + wsdlLocation;
+ try
+ {
+ VirtualFile vfsRoot = getVirtualFile(rootURL);
+ wsdlURL = vfsRoot.findChild(wsdlPath).toURL();
+ }
+ catch (Exception ex)
+ {
+ // ignore
+ }
+ }
+
+ if (wsdlURL == null)
+ throw new IllegalArgumentException("Cannot get URL for: " + wsdlLocation);
+ }
+ return wsdlURL;
+ }
+
+ /**
+ * For some reason VFS.getRoot(rootURL) fails with
+ * IOException("No context factory for " + rootURL);
+ */
+ private VirtualFile getVirtualFile(URL rootURL) throws IOException
+ {
+ URL fileURL = rootURL;
+ if (rootURL.getProtocol().equals("vfsfile"))
+ fileURL = new URL(rootURL.toExternalForm().substring(3));
+
+ VirtualFile vfsRoot = VFS.getRoot(fileURL);
+ return vfsRoot;
+ }
+}
Property changes on: trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceObjectFactory.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceReferenceable.java
===================================================================
--- trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceReferenceable.java (rev 0)
+++ trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceReferenceable.java 2007-01-17 14:46:03 UTC (rev 1988)
@@ -0,0 +1,97 @@
+/*
+ * 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.
+ */
+// $Id$
+package org.jboss.ws.integration.jboss50;
+
+// $Id$
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.ObjectOutputStream;
+
+import javax.naming.BinaryRefAddr;
+import javax.naming.NamingException;
+import javax.naming.Reference;
+import javax.naming.Referenceable;
+import javax.naming.StringRefAddr;
+
+import org.jboss.ws.core.jaxws.client.UnifiedServiceRef;
+
+/**
+ * A JNDI reference to a javax.xml.ws.Service
+ *
+ * It holds the information to reconstrut the javax.xml.ws.Service
+ * when the client does a JNDI lookup.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 24-Oct-2006
+ */
+public class ServiceReferenceable implements Referenceable
+{
+ public static final String UNIFIED_SERVICE_REF = "UNIFIED_SERVICE_REF";
+ public static final String SERVICE_CLASS_NAME = "SERVICE_CLASS_NAME";
+ public static final String TARGET_CLASS_NAME = "TARGET_CLASS_NAME";
+
+ private String serviceClassName;
+ private String targetClassName;
+ private UnifiedServiceRef usRef;
+
+ public ServiceReferenceable(String serviceClassName, String targetClassName, UnifiedServiceRef usRef)
+ {
+ this.serviceClassName = serviceClassName;
+ this.targetClassName = targetClassName;
+ this.usRef = usRef;
+ }
+
+ /**
+ * Retrieves the Reference of this object.
+ *
+ * @return The non-null Reference of this object.
+ * @throws javax.naming.NamingException If a naming exception was encountered while retrieving the reference.
+ */
+ public Reference getReference() throws NamingException
+ {
+ Reference myRef = new Reference(ServiceReferenceable.class.getName(), ServiceObjectFactory.class.getName(), null);
+
+ myRef.add(new StringRefAddr(SERVICE_CLASS_NAME, serviceClassName));
+ myRef.add(new StringRefAddr(TARGET_CLASS_NAME, targetClassName));
+ myRef.add(new BinaryRefAddr(UNIFIED_SERVICE_REF, marshall(usRef)));
+
+ return myRef;
+ }
+
+ private byte[] marshall(Object obj) throws NamingException
+ {
+ ByteArrayOutputStream baos = new ByteArrayOutputStream(512);
+ try
+ {
+ ObjectOutputStream oos = new ObjectOutputStream(baos);
+ oos.writeObject(obj);
+ oos.close();
+ }
+ catch (IOException e)
+ {
+ throw new NamingException("Cannot marshall object, cause: " + e.toString());
+ }
+ return baos.toByteArray();
+ }
+}
\ No newline at end of file
Property changes on: trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceReferenceable.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/WebServiceRefHandler.java
===================================================================
--- trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/WebServiceRefHandler.java (rev 0)
+++ trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/WebServiceRefHandler.java 2007-01-17 14:46:03 UTC (rev 1988)
@@ -0,0 +1,152 @@
+/*
+ * 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.integration.jboss50;
+
+// $Id$
+
+import java.net.URL;
+
+import javax.management.MBeanServer;
+import javax.naming.Context;
+import javax.naming.NamingException;
+import javax.xml.transform.Source;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMResult;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebServiceRef;
+
+import org.jboss.logging.Logger;
+import org.jboss.mx.util.MBeanServerLocator;
+import org.jboss.util.naming.Util;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.jaxws.client.UnifiedServiceRef;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+/**
+ * Binds a JAXWS Service object in the client's ENC
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 17-Jan-2007
+ */
+public class WebServiceRefHandler implements WebServiceRefHandlerMBean
+{
+ // logging support
+ private static Logger log = Logger.getLogger(WebServiceRefHandler.class);
+
+ public void setupWebServiceRef(Context encCtx, String encName, Class targetClass, WebServiceRef wsref, URL rootURL, Source metadata) throws NamingException
+ {
+ String externalName = encCtx.getNameInNamespace() + "/" + encName;
+ String refTypeName = (targetClass != null ? targetClass.getName() : null);
+ log.debug("setupWebServiceRef [jndi=" + externalName + ",refType=" + refTypeName + "]");
+
+ String serviceClassName = null;
+ String targetClassName = null;
+
+ // #1 Use the explicit @WebServiceRef.value
+ if (wsref.value() != Object.class)
+ serviceClassName = wsref.value().getName();
+
+ // #2 Use the target ref type
+ if (serviceClassName == null && targetClass != null && Service.class.isAssignableFrom(targetClass))
+ serviceClassName = targetClass.getName();
+
+ // #3 Use javax.xml.ws.Service
+ if (serviceClassName == null)
+ serviceClassName = Service.class.getName();
+
+ // #1 Use the explicit @WebServiceRef.type
+ if (wsref.type() != Object.class)
+ targetClassName = wsref.type().getName();
+
+ // #2 Use the target ref type
+ if (targetClassName == null && targetClass != null && Service.class.isAssignableFrom(targetClass) == false)
+ targetClassName = targetClass.getName();
+
+ try
+ {
+ UnifiedServiceRef usRef = getUnifiedServiceRef(rootURL, metadata);
+
+ // Set the wsdlLocation if there is no override already
+ if (usRef.getWsdlLocation() == null && wsref.wsdlLocation().length() > 0)
+ usRef.setWsdlLocation(wsref.wsdlLocation());
+
+ Util.rebind(encCtx, encName, new ServiceReferenceable(serviceClassName, targetClassName, usRef));
+ }
+ catch (RuntimeException rte)
+ {
+ throw rte;
+ }
+ catch (Exception ex)
+ {
+ throw new WSException("Cannot bind web service ref: " + encName, ex);
+ }
+ }
+
+ private UnifiedServiceRef getUnifiedServiceRef(URL rootURL, Source metadata) throws TransformerException
+ {
+ Element root = getElementFromSource(metadata);
+
+ String encName = DOMUtils.getTextContent(DOMUtils.getFirstChildElement(root, "service-ref-name"));
+ UnifiedServiceRef ref = new UnifiedServiceRef(rootURL, encName);
+
+ Element refEl = DOMUtils.getFirstChildElement(root, "config-name");
+ if (refEl != null)
+ ref.setConfigName(DOMUtils.getTextContent(refEl));
+
+ refEl = DOMUtils.getFirstChildElement(root, "config-file");
+ if (refEl != null)
+ ref.setConfigFile(DOMUtils.getTextContent(refEl));
+
+ refEl = DOMUtils.getFirstChildElement(root, "wsdl-location");
+ if (refEl != null)
+ ref.setWsdlLocation(DOMUtils.getTextContent(refEl));
+
+ return ref;
+ }
+
+ private Element getElementFromSource(Source retObj) throws TransformerException
+ {
+ DOMResult domResult = new DOMResult();
+ TransformerFactory tf = TransformerFactory.newInstance();
+ tf.newTransformer().transform(retObj, domResult);
+ Document doc = (Document)domResult.getNode();
+ Element docElement = doc.getDocumentElement();
+ return docElement;
+ }
+
+ public void create() throws Exception
+ {
+ MBeanServer server = MBeanServerLocator.locateJBoss();
+ if (server != null)
+ server.registerMBean(this, OBJECT_NAME);
+ }
+
+ public void destroy() throws Exception
+ {
+ MBeanServer server = MBeanServerLocator.locateJBoss();
+ if (server != null)
+ server.unregisterMBean(OBJECT_NAME);
+ }
+}
Property changes on: trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/WebServiceRefHandler.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/WebServiceRefHandlerMBean.java
===================================================================
--- trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/WebServiceRefHandlerMBean.java (rev 0)
+++ trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/WebServiceRefHandlerMBean.java 2007-01-17 14:46:03 UTC (rev 1988)
@@ -0,0 +1,45 @@
+/*
+* 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.integration.jboss50;
+
+import java.net.URL;
+
+import javax.management.ObjectName;
+import javax.naming.Context;
+import javax.naming.NamingException;
+import javax.xml.transform.Source;
+import javax.xml.ws.WebServiceRef;
+
+import org.jboss.ws.core.utils.ObjectNameFactory;
+
+/**
+ * MBean interface.
+ */
+public interface WebServiceRefHandlerMBean
+{
+ // default object name
+ public static final ObjectName OBJECT_NAME = ObjectNameFactory.create("jboss.ws:service=WebServiceRefHandler");
+
+ /** Binds a JAXWS WebServiceRef into the callers ENC
+ */
+ void setupWebServiceRef(Context encCtx, String encName, Class refType, WebServiceRef wsref, URL rootURL, Source metadata) throws NamingException;
+}
Property changes on: trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/WebServiceRefHandlerMBean.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: trunk/integration-jboss50/src/main/resources/jbossws.deployer/META-INF/jbossws-deployer-beans.xml
===================================================================
--- trunk/integration-jboss50/src/main/resources/jbossws.deployer/META-INF/jbossws-deployer-beans.xml 2007-01-16 15:32:38 UTC (rev 1987)
+++ trunk/integration-jboss50/src/main/resources/jbossws.deployer/META-INF/jbossws-deployer-beans.xml 2007-01-17 14:46:03 UTC (rev 1988)
@@ -37,9 +37,12 @@
<property name="serviceEndpointServlet">org.jboss.ws.integration.jboss50.JBossServiceEndpointServlet</property>
</bean>
- <!-- Bind JAXRPC Service objects in application client environment context -->
+ <!-- Bind JAXRPC Service objects in client environment context -->
<bean name="ServiceRefHandler" class="org.jboss.ws.integration.jboss50.ServiceRefHandler"/>
+ <!-- Bind JAXWS Service objects in client environment context -->
+ <bean name="WebServiceRefHandler" class="org.jboss.ws.integration.jboss50.WebServiceRefHandler"/>
+
<!-- A subscription manager for WS-Eventing -->
<bean name="SubscriptionManager" class="org.jboss.ws.extensions.eventing.mgmt.SubscriptionManager"/>
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/WSException.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/WSException.java 2007-01-16 15:32:38 UTC (rev 1987)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/WSException.java 2007-01-17 14:46:03 UTC (rev 1988)
@@ -59,4 +59,12 @@
throw new WSException(string, th);
}
+
+ public static void rethrow(Throwable th)
+ {
+ if (th instanceof WSException)
+ throw (WSException)th;
+
+ throw new WSException(th);
+ }
}
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/CommonClient.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/CommonClient.java 2007-01-16 15:32:38 UTC (rev 1987)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/CommonClient.java 2007-01-17 14:46:03 UTC (rev 1988)
@@ -25,10 +25,17 @@
import java.net.MalformedURLException;
import java.net.URL;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.List;
import java.util.Map;
import javax.xml.namespace.QName;
+import javax.xml.rpc.JAXRPCException;
import javax.xml.rpc.ParameterMode;
+import javax.xml.soap.AttachmentPart;
+import javax.xml.soap.MessageFactory;
import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPMessage;
import javax.xml.ws.addressing.AddressingProperties;
@@ -63,7 +70,7 @@
* @author Thomas.Diesler(a)jboss.org
* @since 10-Oct-2004
*/
-public abstract class CommonClient
+public abstract class CommonClient implements StubExt
{
// provide logging
private static Logger log = Logger.getLogger(CommonClient.class);
@@ -76,6 +83,10 @@
protected EndpointInvocation epInv;
// The binding provider
protected CommonBindingProvider bindingProvider;
+ // A Map<QName,UnboundHeader> of header entries
+ private Map<QName, UnboundHeader> unboundHeaders = new LinkedHashMap<QName, UnboundHeader>();
+ // A List<AttachmentPart> of attachment parts set through the proxy
+ private List<AttachmentPart> attachmentParts = new ArrayList<AttachmentPart>();
/** Create a call that needs to be configured manually
*/
@@ -212,7 +223,7 @@
* 6) unwrap the result using the BindingProvider
* 7) return the result
*/
- protected Object invoke(QName opName, Object[] inputParams, Map<QName, UnboundHeader> unboundHeaders, Map<String, Object> resContext, boolean forceOneway) throws Exception
+ protected Object invoke(QName opName, Object[] inputParams, Map<String, Object> resContext, boolean forceOneway) throws Exception
{
if (opName.equals(operationName) == false)
setOperationName(opName);
@@ -347,7 +358,11 @@
protected void addAttachmentParts(SOAPMessage reqMessage)
{
- // By default do nothing
+ for (AttachmentPart part : attachmentParts)
+ {
+ log.debug("Adding attachment part: " + part.getContentId());
+ reqMessage.addAttachmentPart(part);
+ }
}
protected abstract CommonMessageContext processPivot(CommonMessageContext requestContext);
@@ -405,4 +420,125 @@
return retValue;
}
+
+ /**
+ * Add a header that is not bound to an input parameter.
+ * A propriatory extension, that is not part of JAXRPC.
+ *
+ * @param xmlName The XML name of the header element
+ * @param xmlType The XML type of the header element
+ */
+ public void addUnboundHeader(QName xmlName, QName xmlType, Class javaType, ParameterMode mode)
+ {
+ UnboundHeader unboundHeader = new UnboundHeader(xmlName, xmlType, javaType, mode);
+ unboundHeaders.put(xmlName, unboundHeader);
+ }
+
+ /**
+ * Get the header value for the given XML name.
+ * A propriatory extension, that is not part of JAXRPC.
+ *
+ * @param xmlName The XML name of the header element
+ * @return The header value, or null
+ */
+ public Object getUnboundHeaderValue(QName xmlName)
+ {
+ UnboundHeader unboundHeader = unboundHeaders.get(xmlName);
+ return (unboundHeader != null ? unboundHeader.getHeaderValue() : null);
+ }
+
+ /**
+ * Set the header value for the given XML name.
+ * A propriatory extension, that is not part of JAXRPC.
+ *
+ * @param xmlName The XML name of the header element
+ */
+ public void setUnboundHeaderValue(QName xmlName, Object value)
+ {
+ UnboundHeader unboundHeader = unboundHeaders.get(xmlName);
+ if (unboundHeader == null)
+ throw new IllegalArgumentException("Cannot find unbound header: " + xmlName);
+
+ unboundHeader.setHeaderValue(value);
+ }
+
+ /**
+ * Clear all registered headers.
+ * A propriatory extension, that is not part of JAXRPC.
+ */
+ public void clearUnboundHeaders()
+ {
+ unboundHeaders.clear();
+ }
+
+ /**
+ * Remove the header for the given XML name.
+ * A propriatory extension, that is not part of JAXRPC.
+ */
+ public void removeUnboundHeader(QName xmlName)
+ {
+ unboundHeaders.remove(xmlName);
+ }
+
+ /**
+ * Get an Iterator over the registered header XML names.
+ * A propriatory extension, that is not part of JAXRPC.
+ */
+ public Iterator getUnboundHeaders()
+ {
+ return unboundHeaders.keySet().iterator();
+ }
+
+ /**
+ * Adds the given AttachmentPart object to the outgoing SOAPMessage.
+ * An AttachmentPart object must be created before it can be added to a message.
+ */
+ public void addAttachmentPart(AttachmentPart part)
+ {
+ attachmentParts.add(part);
+ }
+
+ /**
+ * Clears the list of attachment parts.
+ */
+ public void clearAttachmentParts()
+ {
+ attachmentParts.clear();
+ }
+
+ /**
+ * Creates a new empty AttachmentPart object.
+ */
+ public AttachmentPart createAttachmentPart()
+ {
+ try
+ {
+ MessageFactory factory = MessageFactory.newInstance();
+ return factory.createMessage().createAttachmentPart();
+ }
+ catch (SOAPException ex)
+ {
+ throw new JAXRPCException("Cannot create attachment part");
+ }
+ }
+
+ public String getConfigName()
+ {
+ EndpointMetaData epMetaData = getEndpointMetaData();
+ return epMetaData.getConfigName();
+ }
+
+ public abstract void setConfigName(String configName);
+
+ public String getConfigFile()
+ {
+ EndpointMetaData epMetaData = getEndpointMetaData();
+ return epMetaData.getConfigFile();
+ }
+
+ public void setConfigFile(String configFile)
+ {
+ EndpointMetaData epMetaData = getEndpointMetaData();
+ epMetaData.setConfigFile(configFile);
+ }
}
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/CommonSOAPBinding.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/CommonSOAPBinding.java 2007-01-16 15:32:38 UTC (rev 1987)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/CommonSOAPBinding.java 2007-01-17 14:46:03 UTC (rev 1988)
@@ -29,7 +29,6 @@
import org.jboss.ws.Constants;
import org.jboss.ws.WSException;
import org.jboss.ws.core.jaxrpc.ParameterWrapping;
-import org.jboss.ws.core.jaxrpc.StubExt;
import org.jboss.ws.core.jaxrpc.Style;
import org.jboss.ws.core.jaxrpc.binding.BindingException;
import org.jboss.ws.core.soap.*;
Copied: trunk/jbossws-core/src/main/java/org/jboss/ws/core/StubExt.java (from rev 1987, trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/StubExt.java)
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/StubExt.java (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/StubExt.java 2007-01-17 14:46:03 UTC (rev 1988)
@@ -0,0 +1,153 @@
+/*
+* 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.core;
+
+import java.util.Iterator;
+
+import javax.xml.namespace.QName;
+import javax.xml.rpc.ParameterMode;
+import javax.xml.soap.AttachmentPart;
+
+import org.jboss.ws.metadata.umdm.EndpointMetaData;
+
+// $Id$
+
+/**
+ * An extension of the standard JAXRPC/JAXWS stubs.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 17-Jan-2007
+ */
+public interface StubExt
+{
+ /** ClientTimeout property: org.jboss.ws.timeout */
+ static final String PROPERTY_CLIENT_TIMEOUT = "org.jboss.ws.timeout";
+ /** KeyStore property: org.jboss.ws.keyStore */
+ static final String PROPERTY_KEY_STORE = "org.jboss.ws.keyStore";
+ /** KeyStorePassword property: org.jboss.ws.keyStorePassword */
+ static final String PROPERTY_KEY_STORE_PASSWORD = "org.jboss.ws.keyStorePassword";
+ /** KeyStoreType property: org.jboss.ws.keyStoreType */
+ static final String PROPERTY_KEY_STORE_TYPE = "org.jboss.ws.keyStoreType";
+ /** TrustStore property: org.jboss.ws.trustStore */
+ static final String PROPERTY_TRUST_STORE = "org.jboss.ws.trustStore";
+ /** TrustStorePassword property: org.jboss.ws.trustStorePassword */
+ static final String PROPERTY_TRUST_STORE_PASSWORD = "org.jboss.ws.trustStorePassword";
+ /** TrustStoreType property: org.jboss.ws.trustStoreType */
+ static final String PROPERTY_TRUST_STORE_TYPE = "org.jboss.ws.trustStoreType";
+ /** Authentication type, used to specify basic, etc) */
+ static final String PROPERTY_AUTH_TYPE = "org.jboss.ws.authType";
+ /** Authentication type, BASIC */
+ static final String PROPERTY_AUTH_TYPE_BASIC = "org.jboss.ws.authType.basic";
+ /** Authentication type, WSEE */
+ static final String PROPERTY_AUTH_TYPE_WSSE = "org.jboss.ws.authType.wsse";
+ /** Enable MTOM on the stub */
+ static final String PROPERTY_MTOM_ENABLED= "org.jboss.ws.mtom.enabled";
+
+ /**
+ * Get the endpoint meta data for this stub
+ */
+ EndpointMetaData getEndpointMetaData();
+
+ /**
+ * Add a header that is not bound to an input parameter.
+ * A propriatory extension, that is not part of JAXRPC.
+ *
+ * @param xmlName The XML name of the header element
+ * @param xmlType The XML type of the header element
+ */
+ void addUnboundHeader(QName xmlName, QName xmlType, Class javaType, ParameterMode mode);
+
+ /**
+ * Get the header value for the given XML name.
+ * A propriatory extension, that is not part of JAXRPC.
+ *
+ * @param xmlName The XML name of the header element
+ * @return The header value, or null
+ */
+ Object getUnboundHeaderValue(QName xmlName);
+
+ /**
+ * Set the header value for the given XML name.
+ * A propriatory extension, that is not part of JAXRPC.
+ *
+ * @param xmlName The XML name of the header element
+ */
+ void setUnboundHeaderValue(QName xmlName, Object value);
+
+ /**
+ * Clear all registered headers.
+ * A propriatory extension, that is not part of JAXRPC.
+ */
+ void clearUnboundHeaders();
+
+ /**
+ * Remove the header for the given XML name.
+ * A propriatory extension, that is not part of JAXRPC.
+ */
+ void removeUnboundHeader(QName xmlName);
+
+ /**
+ * Get an Iterator over the registered header XML names.
+ * A propriatory extension, that is not part of JAXRPC.
+ */
+ Iterator getUnboundHeaders();
+
+ /**
+ * Adds the given AttachmentPart object to the outgoing SOAPMessage.
+ * An AttachmentPart object must be created before it can be added to a message.
+ */
+ void addAttachmentPart(AttachmentPart attachmentpart);
+
+ /**
+ * Clears the list of attachment parts.
+ */
+ void clearAttachmentParts();
+
+ /**
+ * Creates a new empty AttachmentPart object.
+ */
+ AttachmentPart createAttachmentPart();
+
+ /**
+ * Get the current port configuration file
+ * A propriatory extension, that is not part of JAXRPC.
+ */
+ String getConfigFile();
+
+ /**
+ * Set the current port configuration file
+ * A propriatory extension, that is not part of JAXRPC.
+ */
+ void setConfigFile(String configFile);
+
+ /**
+ * Get the current port configuration name
+ * A propriatory extension, that is not part of JAXRPC.
+ */
+ String getConfigName();
+
+ /**
+ * Set the current port configuration name
+ * A propriatory extension, that is not part of JAXRPC.
+ */
+ void setConfigName(String configName);
+}
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/CallImpl.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/CallImpl.java 2007-01-16 15:32:38 UTC (rev 1987)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/CallImpl.java 2007-01-17 14:46:03 UTC (rev 1988)
@@ -42,10 +42,7 @@
import javax.xml.rpc.Stub;
import javax.xml.rpc.encoding.SerializerFactory;
import javax.xml.rpc.soap.SOAPFaultException;
-import javax.xml.soap.AttachmentPart;
-import javax.xml.soap.MessageFactory;
import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPMessage;
import org.jboss.logging.Logger;
import org.jboss.ws.Constants;
@@ -57,7 +54,6 @@
import org.jboss.ws.core.jaxrpc.handler.HandlerChainBaseImpl;
import org.jboss.ws.core.jaxrpc.handler.SOAPMessageContextJAXRPC;
import org.jboss.ws.core.soap.MessageContextAssociation;
-import org.jboss.ws.core.soap.UnboundHeader;
import org.jboss.ws.core.utils.JavaUtils;
import org.jboss.ws.extensions.xop.XOPContext;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
@@ -85,12 +81,8 @@
private ServiceImpl jaxrpcService;
// The port type name
private QName portType;
- // A Map<QName,UnboundHeader> of header entries
- private Map<QName, UnboundHeader> unboundHeaders = new LinkedHashMap<QName, UnboundHeader>();
// A Map<String,Object> of Call properties
private Map<String, Object> properties = new HashMap<String, Object>();
- // A List<AttachmentPart> of attachment parts set through the proxy
- private List<AttachmentPart> attachmentParts = new ArrayList<AttachmentPart>();
// The set of supported properties
private static final Set<String> standardProperties = new HashSet<String>();
@@ -158,107 +150,6 @@
return properties;
}
- /**
- * Add a header that is not bound to an input parameter.
- * A propriatory extension, that is not part of JAXRPC.
- *
- * @param xmlName The XML name of the header element
- * @param xmlType The XML type of the header element
- */
- public void addUnboundHeader(QName xmlName, QName xmlType, Class javaType, ParameterMode mode)
- {
- UnboundHeader unboundHeader = new UnboundHeader(xmlName, xmlType, javaType, mode);
- unboundHeaders.put(xmlName, unboundHeader);
- }
-
- /**
- * Get the header value for the given XML name.
- * A propriatory extension, that is not part of JAXRPC.
- *
- * @param xmlName The XML name of the header element
- * @return The header value, or null
- */
- public Object getUnboundHeaderValue(QName xmlName)
- {
- UnboundHeader unboundHeader = unboundHeaders.get(xmlName);
- return (unboundHeader != null ? unboundHeader.getHeaderValue() : null);
- }
-
- /**
- * Set the header value for the given XML name.
- * A propriatory extension, that is not part of JAXRPC.
- *
- * @param xmlName The XML name of the header element
- */
- public void setUnboundHeaderValue(QName xmlName, Object value)
- {
- UnboundHeader unboundHeader = unboundHeaders.get(xmlName);
- if (unboundHeader == null)
- throw new IllegalArgumentException("Cannot find unbound header: " + xmlName);
-
- unboundHeader.setHeaderValue(value);
- }
-
- /**
- * Clear all registered headers.
- * A propriatory extension, that is not part of JAXRPC.
- */
- public void clearUnboundHeaders()
- {
- unboundHeaders.clear();
- }
-
- /**
- * Remove the header for the given XML name.
- * A propriatory extension, that is not part of JAXRPC.
- */
- public void removeUnboundHeader(QName xmlName)
- {
- unboundHeaders.remove(xmlName);
- }
-
- /**
- * Get an Iterator over the registered header XML names.
- * A propriatory extension, that is not part of JAXRPC.
- */
- public Iterator getUnboundHeaders()
- {
- return unboundHeaders.keySet().iterator();
- }
-
- /**
- * Adds the given AttachmentPart object to the outgoing SOAPMessage.
- * An AttachmentPart object must be created before it can be added to a message.
- */
- public void addAttachmentPart(AttachmentPart part)
- {
- attachmentParts.add(part);
- }
-
- /**
- * Clears the list of attachment parts.
- */
- public void clearAttachmentParts()
- {
- attachmentParts.clear();
- }
-
- /**
- * Creates a new empty AttachmentPart object.
- */
- public AttachmentPart createAttachmentPart()
- {
- try
- {
- MessageFactory factory = MessageFactory.newInstance();
- return factory.createMessage().createAttachmentPart();
- }
- catch (SOAPException ex)
- {
- throw new JAXRPCException("Cannot create attachment part");
- }
- }
-
/** Gets the address of a target service endpoint.
*/
public String getTargetEndpointAddress()
@@ -364,7 +255,7 @@
{
try
{
- invokeInternal(operationName, inputParams, unboundHeaders, true);
+ invokeInternal(operationName, inputParams, true);
}
catch (RemoteException ex)
{
@@ -376,14 +267,14 @@
*/
public Object invoke(Object[] inputParams) throws RemoteException
{
- return invokeInternal(operationName, inputParams, unboundHeaders, false);
+ return invokeInternal(operationName, inputParams, false);
}
/** Invokes a specific operation using a synchronous request-response interaction mode.
*/
public Object invoke(QName operationName, Object[] inputParams) throws RemoteException
{
- return invokeInternal(operationName, inputParams, unboundHeaders, false);
+ return invokeInternal(operationName, inputParams, false);
}
protected CommonMessageContext processPivot(CommonMessageContext requestContext) {
@@ -588,7 +479,7 @@
{
}
- private Object invokeInternal(QName opName, Object[] inputParams, Map<QName, UnboundHeader> unboundHeaders, boolean forceOneway) throws RemoteException
+ private Object invokeInternal(QName opName, Object[] inputParams, boolean forceOneway) throws RemoteException
{
if (opName.equals(operationName) == false)
setOperationName(opName);
@@ -604,7 +495,7 @@
Object retObj = null;
try
{
- retObj = super.invoke(opName, inputParams, unboundHeaders, properties, forceOneway);
+ retObj = super.invoke(opName, inputParams, properties, forceOneway);
return retObj;
}
catch (SOAPFaultException ex)
@@ -633,16 +524,6 @@
}
@Override
- protected void addAttachmentParts(SOAPMessage reqMessage)
- {
- for (AttachmentPart part : attachmentParts)
- {
- log.debug("Adding attachment part: " + part.getContentId());
- reqMessage.addAttachmentPart(part);
- }
- }
-
- @Override
protected boolean callRequestHandlerChain(QName portName, HandlerType type)
{
SOAPMessageContextJAXRPC msgContext = (SOAPMessageContextJAXRPC)MessageContextAssociation.peekMessageContext();
@@ -732,4 +613,14 @@
}
}
}
+
+ @Override
+ public void setConfigName(String configName)
+ {
+ EndpointMetaData epMetaData = getEndpointMetaData();
+ epMetaData.setConfigName(configName);
+
+ // Reinitialize the client handler chain
+ jaxrpcService.setupHandlerChain(epMetaData);
+ }
}
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/PortProxy.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/PortProxy.java 2007-01-16 15:32:38 UTC (rev 1987)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/PortProxy.java 2007-01-17 14:46:03 UTC (rev 1988)
@@ -42,6 +42,7 @@
import org.jboss.logging.Logger;
import org.jboss.ws.WSException;
+import org.jboss.ws.core.StubExt;
import org.jboss.ws.core.utils.JavaUtils;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
import org.jboss.ws.metadata.umdm.HandlerMetaData;
@@ -94,7 +95,8 @@
public PortProxy(CallImpl call)
{
this.call = call;
- this.stubMethods = Arrays.asList(StubExt.class.getMethods());
+ this.stubMethods = new ArrayList(Arrays.asList(StubExt.class.getMethods()));
+ this.stubMethods.addAll(Arrays.asList(Stub.class.getMethods()));
this.objectMethods = Arrays.asList(Object.class.getMethods());
}
@@ -119,34 +121,6 @@
setProperty((String)args[0], args[1]);
return null;
}
- else if (methodName.equals("getConfigFile"))
- {
- EndpointMetaData epMetaData = call.getEndpointMetaData();
- return epMetaData.getConfigFile();
- }
- else if (methodName.equals("setConfigFile"))
- {
- EndpointMetaData epMetaData = call.getEndpointMetaData();
- epMetaData.setConfigFile((String)args[0]);
- return null;
- }
- else if (methodName.equals("getConfigName"))
- {
- EndpointMetaData epMetaData = call.getEndpointMetaData();
- return epMetaData.getConfigName();
- }
- else if (methodName.equals("setConfigName"))
- {
- EndpointMetaData epMetaData = call.getEndpointMetaData();
- epMetaData.setConfigName((String)args[0]);
- epMetaData.configure(epMetaData);
-
- // Reinitialize the client handler chain
- ServiceImpl jaxrpcService = call.getServiceImpl();
- jaxrpcService.setupHandlerChain(epMetaData);
-
- return null;
- }
else
{
Method callMethod = CallImpl.class.getMethod(methodName, method.getParameterTypes());
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/ServiceImpl.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/ServiceImpl.java 2007-01-16 15:32:38 UTC (rev 1987)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/ServiceImpl.java 2007-01-17 14:46:03 UTC (rev 1988)
@@ -36,12 +36,14 @@
import javax.xml.namespace.QName;
import javax.xml.rpc.Call;
import javax.xml.rpc.ServiceException;
+import javax.xml.rpc.Stub;
import javax.xml.rpc.encoding.TypeMappingRegistry;
import javax.xml.rpc.handler.HandlerChain;
import javax.xml.rpc.handler.HandlerInfo;
import javax.xml.rpc.handler.HandlerRegistry;
import org.jboss.logging.Logger;
+import org.jboss.ws.core.StubExt;
import org.jboss.ws.metadata.builder.jaxrpc.JAXRPCClientMetaDataBuilder;
import org.jboss.ws.metadata.j2ee.UnifiedServiceRefMetaData;
import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
@@ -392,7 +394,7 @@
PortProxy handler = new PortProxy(call);
ClassLoader cl = epMetaData.getClassLoader();
- Remote proxy = (Remote)Proxy.newProxyInstance(cl, new Class[] { seiClass, StubExt.class }, handler);
+ Remote proxy = (Remote)Proxy.newProxyInstance(cl, new Class[] { seiClass, Stub.class, StubExt.class }, handler);
return proxy;
}
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/ServiceObjectFactory.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/ServiceObjectFactory.java 2007-01-16 15:32:38 UTC (rev 1987)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/ServiceObjectFactory.java 2007-01-17 14:46:03 UTC (rev 1988)
@@ -49,7 +49,6 @@
import javax.xml.rpc.Service;
import org.jboss.logging.Logger;
-import org.jboss.net.protocol.URLStreamHandlerFactory;
import org.jboss.ws.Constants;
import org.jboss.ws.WSException;
import org.jboss.ws.core.server.ServiceEndpoint;
Deleted: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/StubExt.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/StubExt.java 2007-01-16 15:32:38 UTC (rev 1987)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/StubExt.java 2007-01-17 14:46:03 UTC (rev 1988)
@@ -1,153 +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.ws.core.jaxrpc;
-
-import java.util.Iterator;
-
-import javax.xml.namespace.QName;
-import javax.xml.rpc.ParameterMode;
-import javax.xml.soap.AttachmentPart;
-
-import org.jboss.ws.metadata.umdm.EndpointMetaData;
-
-// $Id$
-
-/**
- * An instance of a stub class represents a client side proxy or stub instance for the target service endpoint.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 27-Jan-2005
- */
-public interface StubExt extends javax.xml.rpc.Stub
-{
- /** ClientTimeout property: org.jboss.ws.timeout */
- static final String PROPERTY_CLIENT_TIMEOUT = "org.jboss.ws.timeout";
- /** KeyStore property: org.jboss.ws.keyStore */
- static final String PROPERTY_KEY_STORE = "org.jboss.ws.keyStore";
- /** KeyStorePassword property: org.jboss.ws.keyStorePassword */
- static final String PROPERTY_KEY_STORE_PASSWORD = "org.jboss.ws.keyStorePassword";
- /** KeyStoreType property: org.jboss.ws.keyStoreType */
- static final String PROPERTY_KEY_STORE_TYPE = "org.jboss.ws.keyStoreType";
- /** TrustStore property: org.jboss.ws.trustStore */
- static final String PROPERTY_TRUST_STORE = "org.jboss.ws.trustStore";
- /** TrustStorePassword property: org.jboss.ws.trustStorePassword */
- static final String PROPERTY_TRUST_STORE_PASSWORD = "org.jboss.ws.trustStorePassword";
- /** TrustStoreType property: org.jboss.ws.trustStoreType */
- static final String PROPERTY_TRUST_STORE_TYPE = "org.jboss.ws.trustStoreType";
- /** Authentication type, used to specify basic, etc) */
- static final String PROPERTY_AUTH_TYPE = "org.jboss.ws.authType";
- /** Authentication type, BASIC */
- static final String PROPERTY_AUTH_TYPE_BASIC = "org.jboss.ws.authType.basic";
- /** Authentication type, WSEE */
- static final String PROPERTY_AUTH_TYPE_WSSE = "org.jboss.ws.authType.wsse";
- /** Enable MTOM on the stub */
- static final String PROPERTY_MTOM_ENABLED= "org.jboss.ws.mtom.enabled";
-
- /**
- * Get the endpoint meta data for this stub
- */
- EndpointMetaData getEndpointMetaData();
-
- /**
- * Add a header that is not bound to an input parameter.
- * A propriatory extension, that is not part of JAXRPC.
- *
- * @param xmlName The XML name of the header element
- * @param xmlType The XML type of the header element
- */
- void addUnboundHeader(QName xmlName, QName xmlType, Class javaType, ParameterMode mode);
-
- /**
- * Get the header value for the given XML name.
- * A propriatory extension, that is not part of JAXRPC.
- *
- * @param xmlName The XML name of the header element
- * @return The header value, or null
- */
- Object getUnboundHeaderValue(QName xmlName);
-
- /**
- * Set the header value for the given XML name.
- * A propriatory extension, that is not part of JAXRPC.
- *
- * @param xmlName The XML name of the header element
- */
- void setUnboundHeaderValue(QName xmlName, Object value);
-
- /**
- * Clear all registered headers.
- * A propriatory extension, that is not part of JAXRPC.
- */
- void clearUnboundHeaders();
-
- /**
- * Remove the header for the given XML name.
- * A propriatory extension, that is not part of JAXRPC.
- */
- void removeUnboundHeader(QName xmlName);
-
- /**
- * Get an Iterator over the registered header XML names.
- * A propriatory extension, that is not part of JAXRPC.
- */
- Iterator getUnboundHeaders();
-
- /**
- * Adds the given AttachmentPart object to the outgoing SOAPMessage.
- * An AttachmentPart object must be created before it can be added to a message.
- */
- void addAttachmentPart(AttachmentPart attachmentpart);
-
- /**
- * Clears the list of attachment parts.
- */
- void clearAttachmentParts();
-
- /**
- * Creates a new empty AttachmentPart object.
- */
- AttachmentPart createAttachmentPart();
-
- /**
- * Get the current port configuration file
- * A propriatory extension, that is not part of JAXRPC.
- */
- String getConfigFile();
-
- /**
- * Set the current port configuration file
- * A propriatory extension, that is not part of JAXRPC.
- */
- void setConfigFile(String configFile);
-
- /**
- * Get the current port configuration name
- * A propriatory extension, that is not part of JAXRPC.
- */
- String getConfigName();
-
- /**
- * Set the current port configuration name
- * A propriatory extension, that is not part of JAXRPC.
- */
- void setConfigName(String configName);
-}
Added: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/ServiceConfiguration.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/ServiceConfiguration.java (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/ServiceConfiguration.java 2007-01-17 14:46:03 UTC (rev 1988)
@@ -0,0 +1,53 @@
+/*
+ * 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.core.jaxws;
+
+// $Id$
+
+/**
+ * Service provider for ServiceDelegate and Endpoint objects.
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 17-Jan-2006
+ */
+public interface ServiceConfiguration
+{
+ /**
+ * Get the port configuration file for newly created ports
+ */
+ String getConfigFile();
+
+ /**
+ * Set the port configuration file for newly created ports
+ */
+ void setConfigFile(String configFile);
+
+ /**
+ * Get the port configuration name for newly created ports
+ */
+ String getConfigName();
+
+ /**
+ * Set the port configuration name for newly created ports
+ */
+ void setConfigName(String configName);
+}
Property changes on: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/ServiceConfiguration.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Deleted: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/ServiceDecorator.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/ServiceDecorator.java 2007-01-16 15:32:38 UTC (rev 1987)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/ServiceDecorator.java 2007-01-17 14:46:03 UTC (rev 1988)
@@ -1,111 +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.ws.core.jaxws;
-
-import org.jboss.ws.metadata.umdm.EndpointMetaData;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.EndpointReference;
-import javax.xml.ws.Service;
-import javax.xml.ws.WebServiceFeature;
-import java.util.HashMap;
-import java.util.Map;
-import java.net.URL;
-
-/**
- * Acts as a wrapper between clients and the JAX-WS API.
- * Allows additional, propriatary API to be injected and core API calls
- * to be decorated.
- *
- * @author Heiko.Braun(a)jboss.org
- * @version $Id$
- * @since 21.12.2006
- */
-public class ServiceDecorator extends Service {
-
- public final static String CLIENT_CONF_NAME = "org.jboss.ws.jaxws.client.configName";
- public final static String CLIENT_CONF_FILE = "org.jboss.ws.jaxws.client.configFile";
-
- private Map<String, Object> props = new HashMap<String, Object>();
-
- private Map getProps()
- {
- return props;
- }
-
- public void setProperty(String key, Object value)
- {
- props.put(key, value);
- }
-
- public Object getProperty(String key)
- {
- return props.get(key);
- }
-
- public static ServiceDecorator newInstance(URL wsdlDocumentLocation, QName serviceName)
- {
- return new ServiceDecorator(wsdlDocumentLocation, serviceName);
- }
-
- // ----------------------------------------------------------------------------
- // intercepted javax.xml.ws.Service invocations
-
- protected ServiceDecorator(URL wsdlDocumentLocation, QName serviceName) {
- super(wsdlDocumentLocation, serviceName);
- }
-
- public <T> T getPort(Class<T> serviceEndpointInterface) {
- T port = super.getPort(serviceEndpointInterface);
- adjustConfig((StubExt)port);
- return port;
- }
-
- public <T> T getPort(QName portName, Class<T> serviceEndpointInterface) {
- T port = super.getPort(portName, serviceEndpointInterface);
- adjustConfig((StubExt)port);
- return port;
- }
-
- public <T> T getPort(QName portName, Class<T> serviceEndpointInterface, WebServiceFeature... features) {
- return super.getPort(portName, serviceEndpointInterface, features);
- }
-
- public <T> T getPort(Class<T> serviceEndpointInterface, WebServiceFeature... features) {
- return super.getPort(serviceEndpointInterface, features);
- }
-
- public <T> T getPort(EndpointReference endpointReference, Class<T> serviceEndpointInterface, WebServiceFeature... features) {
- return super.getPort(endpointReference, serviceEndpointInterface, features);
- }
-
- private void adjustConfig(StubExt stub) {
-
- EndpointMetaData epMetaData = stub.getEndpointMetaData();
-
- if(props.containsKey(CLIENT_CONF_NAME))
- epMetaData.setConfigName((String)props.get(CLIENT_CONF_NAME));
- if(props.containsKey(CLIENT_CONF_FILE))
- epMetaData.setConfigFile((String)props.get(CLIENT_CONF_FILE));
-
- }
-}
Deleted: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/StubExt.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/StubExt.java 2007-01-16 15:32:38 UTC (rev 1987)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/StubExt.java 2007-01-17 14:46:03 UTC (rev 1988)
@@ -1,14 +0,0 @@
-package org.jboss.ws.core.jaxws;
-
-import org.jboss.ws.metadata.umdm.EndpointMetaData;
-
-/**
- * @author Heiko.Braun(a)jboss.org
- * @version $Id$
- * @since 21.12.2006
- */
-public interface StubExt {
-
- EndpointMetaData getEndpointMetaData();
-
-}
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java 2007-01-16 15:32:38 UTC (rev 1987)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java 2007-01-17 14:46:03 UTC (rev 1988)
@@ -45,17 +45,16 @@
import org.jboss.ws.core.CommonBindingProvider;
import org.jboss.ws.core.CommonClient;
import org.jboss.ws.core.CommonMessageContext;
+import org.jboss.ws.core.StubExt;
import org.jboss.ws.core.jaxws.binding.BindingExt;
import org.jboss.ws.core.jaxws.binding.BindingProviderImpl;
import org.jboss.ws.core.jaxws.handler.HandlerChainExecutor;
import org.jboss.ws.core.jaxws.handler.MessageContextJAXWS;
import org.jboss.ws.core.jaxws.handler.PortInfoImpl;
import org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS;
-import org.jboss.ws.core.jaxws.StubExt;
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
import org.jboss.ws.metadata.umdm.OperationMetaData;
-import org.jboss.ws.metadata.umdm.ServiceMetaData;
import org.jboss.ws.metadata.umdm.HandlerMetaData.HandlerType;
/**
@@ -140,7 +139,7 @@
try
{
- Object retObj = invoke(opName, args, null, resContext, false);
+ Object retObj = invoke(opName, args, resContext, false);
return retObj;
}
catch (Exception ex)
@@ -277,4 +276,12 @@
{
throw new NotImplementedException();
}
+
+ public void setConfigName(String configName)
+ {
+ EndpointMetaData epMetaData = getEndpointMetaData();
+ epMetaData.setConfigName(configName);
+ // TODO: Handlers not re-initialized
+ log.warn("Handlers not re-initialized");
+ }
}
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ClientProxy.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ClientProxy.java 2007-01-16 15:32:38 UTC (rev 1987)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ClientProxy.java 2007-01-17 14:46:03 UTC (rev 1988)
@@ -26,6 +26,7 @@
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
import java.rmi.RemoteException;
+import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
@@ -45,8 +46,8 @@
import org.jboss.logging.Logger;
import org.jboss.ws.Constants;
import org.jboss.ws.WSException;
+import org.jboss.ws.core.StubExt;
import org.jboss.ws.core.utils.JavaUtils;
-import org.jboss.ws.core.jaxws.StubExt;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
import org.jboss.ws.metadata.umdm.OperationMetaData;
@@ -68,8 +69,6 @@
// List<Method> of the Object methods
private List objectMethods;
- private List stubExtMethods;
-
// The service configured executor
private ExecutorService executor;
@@ -89,9 +88,9 @@
{
this.client = client;
this.executor = executor;
- this.stubMethods = Arrays.asList(BindingProvider.class.getMethods());
+ this.stubMethods = new ArrayList(Arrays.asList(BindingProvider.class.getMethods()));
+ this.stubMethods.addAll(Arrays.asList(StubExt.class.getMethods()));
this.objectMethods = Arrays.asList(Object.class.getMethods());
- this.stubExtMethods = Arrays.asList(StubExt.class.getMethods());
}
/** Processes a method invocation on a proxy instance and returns the result.
@@ -113,13 +112,6 @@
return objMethod.invoke(client, args);
}
- // An invocation on StubExt interface
- else if (stubExtMethods.contains(method))
- {
- Method stubExtMethod = ClientImpl.class.getMethod(methodName, method.getParameterTypes());
- return stubExtMethod.invoke(client, args);
- }
-
// An invocation on the service endpoint interface
else
{
Deleted: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceObjectFactory.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceObjectFactory.java 2007-01-16 15:32:38 UTC (rev 1987)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceObjectFactory.java 2007-01-17 14:46:03 UTC (rev 1988)
@@ -1,238 +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.
- */
-// $Id$
-package org.jboss.ws.core.jaxws.client;
-
-// $Id$
-
-import java.io.ByteArrayInputStream;
-import java.io.File;
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.Method;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.Hashtable;
-
-import javax.naming.Context;
-import javax.naming.Name;
-import javax.naming.NamingException;
-import javax.naming.RefAddr;
-import javax.naming.Reference;
-import javax.naming.spi.ObjectFactory;
-import javax.xml.namespace.QName;
-import javax.xml.ws.Service;
-import javax.xml.ws.WebServiceException;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.core.jaxws.ServiceDecorator;
-
-/**
- * This ServiceObjectFactory reconstructs a javax.xml.ws.Service
- * for a given WSDL when the webservice client does a JNDI lookup
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 24-Oct-2004
- */
-public class ServiceObjectFactory implements ObjectFactory
-{
- // provide logging
- private static final Logger log = Logger.getLogger(ServiceObjectFactory.class);
-
- /**
- * Creates an object using the location or reference information specified.
- * <p/>
- *
- * @param obj The possibly null object containing location or reference
- * information that can be used in creating an object.
- * @param name The name of this object relative to <code>nameCtx</code>,
- * or null if no name is specified.
- * @param nameCtx The context relative to which the <code>name</code>
- * parameter is specified, or null if <code>name</code> is
- * relative to the default initial context.
- * @param environment The possibly null environment that is used in
- * creating the object.
- * @return The object created; null if an object cannot be created.
- * @throws Exception if this object factory encountered an exception
- * while attempting to create an object, and no other object factories are
- * to be tried.
- * @see javax.naming.spi.NamingManager#getObjectInstance
- * @see javax.naming.spi.NamingManager#getURLContext
- */
- public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable environment) throws Exception
- {
- try
- {
- Reference ref = (Reference)obj;
-
- String serviceTypeName = (String)ref.get(ServiceReferenceable.SERVICE_TYPE).getContent();
- String portTypeName = (String)ref.get(ServiceReferenceable.PORT_TYPE).getContent();
- UnifiedServiceRef serviceRef = unmarshallServiceRef(ref);
-
- ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
- Class serviceType = ctxLoader.loadClass(serviceTypeName);
- Class portType = (portTypeName != null ? ctxLoader.loadClass(portTypeName) : null);
-
- if (Service.class.isAssignableFrom(serviceType) == false)
- throw new IllegalArgumentException("WebServiceRef type '" + serviceType + "' is not assignable to javax.xml.ws.Service");
-
- Object target;
-
- URL wsdlURL = getWsdlLocationURL(serviceType, serviceRef.getWsdlLocation());
-
- // Generic javax.xml.ws.Service
- if (serviceType == Service.class)
- {
- if (wsdlURL != null)
- {
- target = ServiceDecorator.create(wsdlURL, null);
- }
- else
- {
- throw new IllegalArgumentException("Cannot create generic javax.xml.ws.Service without wsdlLocation");
- }
- }
- // Generated javax.xml.ws.Service subclass
- else
- {
- if (wsdlURL != null)
- {
- Constructor ctor = serviceType.getConstructor(new Class[] { URL.class, QName.class });
- target = (Service)ctor.newInstance(new Object[] { wsdlURL, null });
- }
- else
- {
- target = (Service)serviceType.newInstance();
- }
- }
-
- if (portTypeName != null && portTypeName.equals(serviceTypeName) == false)
- {
- Object port = null;
- for (Method method : serviceType.getMethods())
- {
- String methodName = method.getName();
- Class retType = method.getReturnType();
- if (methodName.startsWith("get") && portType.isAssignableFrom(retType))
- {
- port = method.invoke(target, new Object[0]);
- target = port;
- break;
- }
- }
-
- if (port == null)
- throw new WebServiceException("Cannot find getter for port type: " + portTypeName);
- }
-
- // process config-name and config-file
- processConfig(target, serviceRef);
-
- return target;
- }
- catch (Exception ex)
- {
- log.error("Cannot create service", ex);
- throw ex;
- }
- }
-
- private void processConfig(Object target, UnifiedServiceRef serviceRef) {
- if(target instanceof ServiceDecorator)
- {
- ServiceDecorator service = (ServiceDecorator)target;
- service.setProperty(ServiceDecorator.CLIENT_CONF_NAME, serviceRef.getConfigName());
- service.setProperty(ServiceDecorator.CLIENT_CONF_FILE, serviceRef.getConfigFile());
- }
- else
- {
- log.warn("Configuration ignored for " + target.getClass().getName());
- }
- }
-
- private UnifiedServiceRef unmarshallServiceRef(Reference ref) throws ClassNotFoundException, NamingException
- {
- UnifiedServiceRef sref;
- RefAddr refAddr = ref.get(ServiceReferenceable.SERVICE_REF);
- ByteArrayInputStream bais = new ByteArrayInputStream((byte[])refAddr.getContent());
- try
- {
- ObjectInputStream ois = new ObjectInputStream(bais);
- sref = (UnifiedServiceRef)ois.readObject();
- ois.close();
- }
- catch (IOException e)
- {
- throw new NamingException("Cannot unmarshall service ref meta data, cause: " + e.toString());
- }
- return sref;
- }
-
- private URL getWsdlLocationURL(Class type, String wsdlLocation)
- {
- URL wsdlURL = null;
- if (wsdlLocation != null && wsdlLocation.length() > 0)
- {
- // Try the wsdlLocation as URL
- try
- {
- wsdlURL = new URL(wsdlLocation);
- }
- catch (MalformedURLException ex)
- {
- // ignore
- }
-
- // Try the filename as File
- if (wsdlURL == null)
- {
- try
- {
- File file = new File(wsdlLocation);
- if (file.exists())
- wsdlURL = file.toURL();
- }
- catch (MalformedURLException e)
- {
- // ignore
- }
- }
-
- // Try the filename as Resource
- if (wsdlURL == null)
- {
- ClassLoader loader = Thread.currentThread().getContextClassLoader();
- wsdlURL = loader.getResource(wsdlLocation);
- }
-
- // Try the filename relative to class
- if (wsdlURL == null)
- {
- String packagePath = type.getPackage().getName().replace('.', '/');
- ClassLoader loader = Thread.currentThread().getContextClassLoader();
- wsdlURL = loader.getResource(packagePath + "/" + wsdlLocation);
- }
- }
- return wsdlURL;
- }
-}
Deleted: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceReferenceable.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceReferenceable.java 2007-01-16 15:32:38 UTC (rev 1987)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceReferenceable.java 2007-01-17 14:46:03 UTC (rev 1988)
@@ -1,97 +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.
- */
-// $Id$
-package org.jboss.ws.core.jaxws.client;
-
-// $Id$
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.ObjectOutputStream;
-
-import javax.naming.BinaryRefAddr;
-import javax.naming.NamingException;
-import javax.naming.Reference;
-import javax.naming.Referenceable;
-import javax.naming.StringRefAddr;
-
-
-
-/**
- * A JNDI reference to a javax.xml.ws.Service
- *
- * It holds the information to reconstrut the javax.xml.ws.Service
- * when the client does a JNDI lookup.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 24-Oct-2006
- */
-public class ServiceReferenceable implements Referenceable
-{
- public static final String SERVICE_REF = "SERVICE_REF";
- public static final String SERVICE_TYPE = "SERVICE_TYPE";
- public static final String PORT_TYPE = "PORT_TYPE";
-
- private String serviceType;
- private String portType;
- private UnifiedServiceRef sref;
-
- public ServiceReferenceable(String serviceType, String portType, UnifiedServiceRef sref)
- {
- this.serviceType = serviceType;
- this.portType = portType;
- this.sref = sref;
- }
-
- /**
- * Retrieves the Reference of this object.
- *
- * @return The non-null Reference of this object.
- * @throws javax.naming.NamingException If a naming exception was encountered while retrieving the reference.
- */
- public Reference getReference() throws NamingException
- {
- Reference myRef = new Reference(ServiceReferenceable.class.getName(), ServiceObjectFactory.class.getName(), null);
-
- myRef.add(new StringRefAddr(SERVICE_TYPE, serviceType));
- myRef.add(new StringRefAddr(PORT_TYPE, portType));
- myRef.add(new BinaryRefAddr(SERVICE_REF, marshallServiceRef()));
-
- return myRef;
- }
-
- private byte[] marshallServiceRef() throws NamingException
- {
- ByteArrayOutputStream baos = new ByteArrayOutputStream(512);
- try
- {
- ObjectOutputStream oos = new ObjectOutputStream(baos);
- oos.writeObject(sref);
- oos.close();
- }
- catch (IOException e)
- {
- throw new NamingException("Cannot marshall service ref, cause: " + e.toString());
- }
- return baos.toByteArray();
- }
-}
\ No newline at end of file
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/UnifiedServiceRef.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/UnifiedServiceRef.java 2007-01-16 15:32:38 UTC (rev 1987)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/UnifiedServiceRef.java 2007-01-17 14:46:03 UTC (rev 1988)
@@ -24,6 +24,7 @@
//$Id$
import java.io.Serializable;
+import java.net.URL;
/**
* Represents a <service-ref> element of the jboss.xml, jboss-web.xml, jboss-client.xml deployment descriptor
@@ -33,20 +34,23 @@
*/
public class UnifiedServiceRef implements Serializable
{
- private static final long serialVersionUID = 223039007880052172L;
+ private static final long serialVersionUID = 7575421890971083734L;
+ private URL rootURL;
private String encName;
private String wsdlLocation;
private String configName;
private String configFile;
- public UnifiedServiceRef()
+ public UnifiedServiceRef(URL rootURL, String name)
{
+ this.rootURL = rootURL;
+ this.encName = name;
}
- public UnifiedServiceRef(String name)
+ public URL getRootURL()
{
- this.encName = name;
+ return rootURL;
}
public String getEncName()
@@ -54,11 +58,6 @@
return encName;
}
- public void setEncName(String name)
- {
- this.encName = name;
- }
-
public String getWsdlLocation()
{
return wsdlLocation;
Deleted: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/WebServiceRefDeployer.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/WebServiceRefDeployer.java 2007-01-16 15:32:38 UTC (rev 1987)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/WebServiceRefDeployer.java 2007-01-17 14:46:03 UTC (rev 1988)
@@ -1,85 +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.ws.core.jaxws.client;
-
-// $Id$
-
-import javax.naming.Context;
-import javax.xml.ws.Service;
-import javax.xml.ws.WebServiceRef;
-
-import org.jboss.logging.Logger;
-import org.jboss.util.naming.Util;
-
-/**
- * Binds a JAXWS Service object into JNDI
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 24-Oct-2006
- */
-public class WebServiceRefDeployer
-{
- // provide logging
- private static Logger log = Logger.getLogger(WebServiceRefDeployer.class);
-
- private WebServiceRefDeployer()
- {
- // Hide ctor
- }
-
- public static void setupWebServiceRef(Context ctx, String jndiName, Class refType, WebServiceRef wsref, UnifiedServiceRef sref) throws Exception
- {
- String externalName = ctx.getNameInNamespace() + "/" + jndiName;
- String refTypeName = (refType != null ? refType.getName() : null);
- String wsrefString = "[name=" + wsref.name() + ",value=" + wsref.value() + ",type=" + wsref.type() + ",wsdl=" + wsref.wsdlLocation() + ",mapped=" + wsref.mappedName() + "]";
- log.debug("setupWebServiceRef [jndi=" + externalName + ",refType=" + refTypeName + ",wsref=" + wsrefString + ",sref=" + sref + "]");
-
- String serviceTypeName = null;
- String portTypeName = null;
-
- // #1 Use the explicit @WebServiceRef.value
- if (wsref.value() != Object.class)
- serviceTypeName = wsref.value().getName();
-
- // #2 Use the target ref type
- if (serviceTypeName == null && refType != null && Service.class.isAssignableFrom(refType))
- serviceTypeName = refType.getName();
-
- // #3 Use javax.xml.ws.Service
- if (serviceTypeName == null)
- serviceTypeName = Service.class.getName();
-
- // #1 Use the explicit @WebServiceRef.type
- if (wsref.type() != Object.class)
- portTypeName = wsref.type().getName();
-
- // #2 Use the target ref type
- if (portTypeName == null && refType != null && Service.class.isAssignableFrom(refType) == false)
- portTypeName = refType.getName();
-
- // Set the wsdlLocation if there is no override already
- if (sref.getWsdlLocation() == null && wsref.wsdlLocation().length() > 0)
- sref.setWsdlLocation(wsref.wsdlLocation());
-
- Util.rebind(ctx, jndiName, new ServiceReferenceable(serviceTypeName, portTypeName, sref));
- }
-}
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java 2007-01-16 15:32:38 UTC (rev 1987)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java 2007-01-17 14:46:03 UTC (rev 1988)
@@ -46,7 +46,8 @@
import org.jboss.logging.Logger;
import org.jboss.util.NotImplementedException;
-import org.jboss.ws.core.jaxws.StubExt;
+import org.jboss.ws.core.StubExt;
+import org.jboss.ws.core.jaxws.ServiceConfiguration;
import org.jboss.ws.core.jaxws.client.ClientImpl;
import org.jboss.ws.core.jaxws.client.ClientProxy;
import org.jboss.ws.core.jaxws.client.DispatchImpl;
@@ -68,7 +69,7 @@
* @author Thomas.Diesler(a)jboss.com
* @since 03-May-2006
*/
-public class ServiceDelegateImpl extends ServiceDelegate
+public class ServiceDelegateImpl extends ServiceDelegate implements ServiceConfiguration
{
// provide logging
private final Logger log = Logger.getLogger(ServiceDelegateImpl.class);
@@ -82,6 +83,10 @@
private HandlerResolver handlerResolver = new HandlerResolverImpl();
// The executor service
private ExecutorService executor;
+ // The config name for all created ports
+ private String configName;
+ // The config file for all created ports
+ private String configFile;
// A list of annotated ports
private List<QName> annotatedPorts = new ArrayList<QName>();
@@ -101,6 +106,26 @@
}
}
+ public String getConfigFile()
+ {
+ return configFile;
+ }
+
+ public void setConfigFile(String configFile)
+ {
+ this.configFile = configFile;
+ }
+
+ public String getConfigName()
+ {
+ return configName;
+ }
+
+ public void setConfigName(String configName)
+ {
+ this.configName = configName;
+ }
+
/**
* The getPort method returns a stub. A service client uses this stub to invoke operations on the target service endpoint.
* The serviceEndpointInterface specifies the service endpoint interface that is supported by the created dynamic proxy or stub instance.
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPConnectionImpl.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPConnectionImpl.java 2007-01-16 15:32:38 UTC (rev 1987)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPConnectionImpl.java 2007-01-17 14:46:03 UTC (rev 1988)
@@ -44,9 +44,8 @@
import org.jboss.remoting.Client;
import org.jboss.remoting.InvokerLocator;
import org.jboss.remoting.marshal.MarshalFactory;
-import org.jboss.ws.WSException;
+import org.jboss.ws.core.StubExt;
import org.jboss.ws.core.WSTimeoutException;
-import org.jboss.ws.core.jaxrpc.StubExt;
import org.jboss.ws.extensions.xop.XOPContext;
/**
@@ -365,7 +364,7 @@
if (metadataMap.containsKey(key))
{
String remotingKey = metadataMap.get(key);
- if (key.equals(Stub.USERNAME_PROPERTY) || key.equals(Stub.PASSWORD_PROPERTY))
+ if ("http.basic.username".equals(remotingKey) || "http.basic.password".equals(remotingKey))
{
if (authType.equals(StubExt.PROPERTY_AUTH_TYPE_BASIC))
{
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java 2007-01-16 15:32:38 UTC (rev 1987)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java 2007-01-17 14:46:03 UTC (rev 1988)
@@ -35,7 +35,7 @@
import org.jboss.logging.Logger;
import org.jboss.ws.WSException;
import org.jboss.ws.core.CommonMessageContext;
-import org.jboss.ws.core.jaxrpc.StubExt;
+import org.jboss.ws.core.StubExt;
import org.jboss.ws.core.soap.SOAPMessageImpl;
import org.jboss.ws.core.utils.DOMWriter;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/xop/DisableMTOMHandler.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/xop/DisableMTOMHandler.java 2007-01-16 15:32:38 UTC (rev 1987)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/xop/DisableMTOMHandler.java 2007-01-17 14:46:03 UTC (rev 1988)
@@ -25,7 +25,7 @@
import javax.xml.rpc.handler.GenericHandler;
import javax.xml.rpc.handler.MessageContext;
-import org.jboss.ws.core.jaxrpc.StubExt;
+import org.jboss.ws.core.StubExt;
/**
* @author Heiko Braun <heiko.braun(a)jboss.com>
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/xop/XOPContext.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/xop/XOPContext.java 2007-01-16 15:32:38 UTC (rev 1987)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/xop/XOPContext.java 2007-01-17 14:46:03 UTC (rev 1988)
@@ -25,7 +25,7 @@
import org.jboss.ws.Constants;
import org.jboss.ws.WSException;
import org.jboss.ws.core.CommonMessageContext;
-import org.jboss.ws.core.jaxrpc.StubExt;
+import org.jboss.ws.core.StubExt;
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.core.soap.NameImpl;
import org.jboss.ws.core.soap.SOAPElementImpl;
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java 2007-01-16 15:32:38 UTC (rev 1987)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java 2007-01-17 14:46:03 UTC (rev 1988)
@@ -121,13 +121,9 @@
// Process an optional @HandlerChain annotation
if (sepClass.isAnnotationPresent(HandlerChain.class))
- {
processHandlerChain(sepMetaData, sepClass);
- }
else if (seiClass.isAnnotationPresent(HandlerChain.class))
- {
processHandlerChain(sepMetaData, seiClass);
- }
// Sanity check: read the generated WSDL and initialize the schema model
WSDLDefinitions wsdlDefinitions = serviceMetaData.getWsdlDefinitions();
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ServerEndpointMetaData.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ServerEndpointMetaData.java 2007-01-16 15:32:38 UTC (rev 1987)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ServerEndpointMetaData.java 2007-01-17 14:46:03 UTC (rev 1988)
@@ -139,7 +139,7 @@
public void setURLPattern(String urlPattern)
{
if (urlPattern != null && !urlPattern.startsWith("/"))
- throw new IllegalArgumentException("url pattern should start with '/'");
+ throw new IllegalArgumentException("URL pattern should start with '/'");
this.urlPattern = urlPattern;
}
Modified: trunk/jbossws-tests/.classpath
===================================================================
--- trunk/jbossws-tests/.classpath 2007-01-16 15:32:38 UTC (rev 1987)
+++ trunk/jbossws-tests/.classpath 2007-01-17 14:46:03 UTC (rev 1988)
@@ -40,5 +40,6 @@
<classpathentry kind="lib" path="/build/thirdparty/junit.jar"/>
<classpathentry kind="lib" path="/build/thirdparty/mail.jar"/>
<classpathentry kind="lib" path="/build/thirdparty/jbosssx-client.jar" sourcepath="/build/thirdparty/jbosssx-src.zip"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/jboss-5.0.x"/>
<classpathentry kind="output" path="output-eclipse"/>
</classpath>
Modified: trunk/jbossws-tests/ant-import/build-jars-jaxrpc.xml
===================================================================
--- trunk/jbossws-tests/ant-import/build-jars-jaxrpc.xml 2007-01-16 15:32:38 UTC (rev 1987)
+++ trunk/jbossws-tests/ant-import/build-jars-jaxrpc.xml 2007-01-17 14:46:03 UTC (rev 1988)
@@ -2254,6 +2254,9 @@
<include name="jaxrpc-mapping.xml"/>
</metainf>
</jar>
+
+ <!-- Please add alphabetically -->
+
</target>
</project>
Modified: trunk/jbossws-tests/ant-import/build-jars-jaxws.xml
===================================================================
--- trunk/jbossws-tests/ant-import/build-jars-jaxws.xml 2007-01-16 15:32:38 UTC (rev 1987)
+++ trunk/jbossws-tests/ant-import/build-jars-jaxws.xml 2007-01-17 14:46:03 UTC (rev 1988)
@@ -176,6 +176,17 @@
</classes>
</war>
+ <!-- jaxws-jbws1357 -->
+ <war warfile="${tests.output.dir}/libs/jaxws-jbws1357.war" webxml="${tests.output.dir}/resources/jaxws/jbws1357/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/classes">
+ <include name="org/jboss/test/ws/jaxws/jbws1357/JBWS1357.class"/>
+ <include name="org/jboss/test/ws/jaxws/jbws1357/JBWS1357Impl.class"/>
+ </classes>
+ <fileset dir="${tests.output.dir}/resources/jaxws/jbws1357">
+ <include name="hello.jsp"/>
+ </fileset>
+ </war>
+
<!-- jaxws-jsr181-complex -->
<war warfile="${tests.output.dir}/libs/jaxws-jsr181-complex.war" webxml="${tests.output.dir}/resources/jaxws/jsr181/complex/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/classes">
@@ -518,16 +529,13 @@
<war warfile="${tests.output.dir}/libs/jaxws-webserviceref.war" webxml="${tests.output.dir}/resources/jaxws/webserviceref/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/classes">
<include name="org/jboss/test/ws/jaxws/webserviceref/TestEndpointImpl.class"/>
- <include name="org/jboss/test/ws/jaxws/webserviceref/TestEndpoint.class"/>
</classes>
</war>
<jar destfile="${tests.output.dir}/libs/jaxws-webserviceref-client.jar">
<fileset dir="${tests.output.dir}/classes">
- <include name="org/jboss/test/ws/jaxws/webserviceref/ApplicationClient.class"/>
+ <include name="org/jboss/test/ws/jaxws/webserviceref/TestEndpointClient.class"/>
<include name="org/jboss/test/ws/jaxws/webserviceref/TestEndpointService.class"/>
<include name="org/jboss/test/ws/jaxws/webserviceref/TestEndpoint.class"/>
- <include name="org/jboss/test/ws/jaxws/webserviceref/EchoResponse.class"/>
- <include name="org/jboss/test/ws/jaxws/webserviceref/Echo.class"/>
</fileset>
<metainf dir="${tests.output.dir}/resources/jaxws/webserviceref/META-INF">
<include name="application-client.xml"/>
@@ -535,7 +543,7 @@
<include name="wsdl/**"/>
</metainf>
<manifest>
- <attribute name="main-class" value="org.jboss.test.ws.jaxws.webserviceref.ApplicationClient"/>
+ <attribute name="main-class" value="org.jboss.test.ws.jaxws.webserviceref.TestEndpointClient"/>
</manifest>
</jar>
<war destfile="${tests.output.dir}/libs/jaxws-webserviceref-servlet-client.war" webxml="${tests.output.dir}/resources/jaxws/webserviceref/servlet-client/WEB-INF/web.xml">
@@ -565,6 +573,25 @@
<include name="wsdl/**"/>
</metainf>
</jar>
+ <jar destfile="${tests.output.dir}/libs/jaxws-webserviceref-secure.jar">
+ <fileset dir="${tests.output.dir}/classes">
+ <include name="org/jboss/test/ws/jaxws/webserviceref/SecureEndpointImpl.class"/>
+ </fileset>
+ </jar>
+ <jar destfile="${tests.output.dir}/libs/jaxws-webserviceref-secure-client.jar">
+ <fileset dir="${tests.output.dir}/classes">
+ <include name="org/jboss/test/ws/jaxws/webserviceref/SecureEndpointClient.class"/>
+ <include name="org/jboss/test/ws/jaxws/webserviceref/SecureEndpointService.class"/>
+ <include name="org/jboss/test/ws/jaxws/webserviceref/SecureEndpoint.class"/>
+ </fileset>
+ <metainf dir="${tests.output.dir}/resources/jaxws/webserviceref/META-INF-secure">
+ <include name="application-client.xml"/>
+ <include name="jboss-client.xml"/>
+ </metainf>
+ <manifest>
+ <attribute name="main-class" value="org.jboss.test.ws.jaxws.webserviceref.SecureEndpointClient"/>
+ </manifest>
+ </jar>
<!-- jaxws-wrapped-accessor -->
<war warfile="${tests.output.dir}/libs/jaxws-wrapped-accessor.war" webxml="${tests.output.dir}/resources/jaxws/wrapped/accessor/WEB-INF/web.xml">
@@ -668,16 +695,8 @@
</classes>
</war>
- <!-- jaxws-jbws1357 -->
- <war warfile="${tests.output.dir}/libs/jaxws-jbws1357.war" webxml="${tests.output.dir}/resources/jaxws/jbws1357/WEB-INF/web.xml">
- <classes dir="${tests.output.dir}/classes">
- <include name="org/jboss/test/ws/jaxws/jbws1357/JBWS1357.class"/>
- <include name="org/jboss/test/ws/jaxws/jbws1357/JBWS1357Impl.class"/>
- </classes>
- <fileset dir="${tests.output.dir}/resources/jaxws/jbws1357">
- <include name="hello.jsp"/>
- </fileset>
- </war>
+ <!-- Please add alphabetically -->
+
</target>
</project>
Modified: trunk/jbossws-tests/build.xml
===================================================================
--- trunk/jbossws-tests/build.xml 2007-01-16 15:32:38 UTC (rev 1987)
+++ trunk/jbossws-tests/build.xml 2007-01-17 14:46:03 UTC (rev 1988)
@@ -42,15 +42,18 @@
</not>
</condition>
+ <!-- Available integration target -->
+ <property name="${jbossws.integration.target}.available" value="true"/>
+
<!-- Define jboss.home -->
<condition property="jboss.home" value="${jboss50.home}">
- <equals arg1="${jbossws.integration.target}" arg2="jboss50"/>
+ <isset property="jboss50.available"/>
</condition>
<condition property="jboss.home" value="${jboss42.home}">
- <equals arg1="${jbossws.integration.target}" arg2="jboss42"/>
+ <isset property="jboss42.available"/>
</condition>
<condition property="jboss.home" value="${jboss40.home}">
- <equals arg1="${jbossws.integration.target}" arg2="jboss40"/>
+ <isset property="jboss40.available"/>
</condition>
<!-- Integration Target Server -->
@@ -150,7 +153,7 @@
<target name="init" depends="prepare,thirdparty,init-jboss50-classpath">
</target>
- <target name="init-jboss50-classpath" depends="prepare">
+ <target name="init-jboss50-classpath" depends="prepare" if="jboss50.available">
<!-- The combined compile classpath -->
<path id="javac.classpath">
@@ -168,21 +171,22 @@
<pathelement location="${thirdparty.dir}/servlet-api.jar"/>
<pathelement location="${thirdparty.dir}/stax-api.jar"/>
<pathelement location="${thirdparty.dir}/xmlunit1.0.jar"/>
+ <pathelement location="${jboss.client}/jboss-ejb3-client.jar"/>
</path>
<!-- The test client classpath -->
<path id="test.client.classpath">
- <pathelement location="${jboss.client}/jbossall-client.jar"/>
+ <pathelement location="${jboss.client}/commons-logging.jar"/>
<pathelement location="${jboss.client}/jboss-ejb3-client.jar"/>
<pathelement location="${jboss.client}/jboss-aop-jdk50-client.jar"/>
<pathelement location="${jboss.client}/jboss-aspect-jdk50-client.jar"/>
+ <pathelement location="${jboss.client}/log4j.jar"/>
+ <pathelement location="${jboss.client}/jbossall-client.jar"/>
+ <pathelement location="${jboss.lib}/jboss-vfs.jar"/>
+ <pathelement location="${jboss.server.lib}/hibernate3.jar"/>
+ <pathelement location="${jboss.server.lib}/jboss.jar"/>
<pathelement location="${jboss.server.lib}/jbosssx.jar"/>
- <pathelement location="${jboss.lib}/jboss-vfs.jar"/>
<pathelement location="${integration.jboss50.dir}/output/lib/jbossws-jboss50-integration.jar"/>
- <pathelement location="${integration.jboss42.dir}/output/lib/jbossws-jboss42-integration.jar"/>
- <pathelement location="${integration.tomcat.dir}/output/lib/jbossws-tomcat-integration.jar"/>
- <pathelement location="${thirdparty.dir}/commons-logging.jar"/>
- <pathelement location="${thirdparty.dir}/log4j.jar"/>
<path refid="javac.classpath"/>
</path>
</target>
@@ -387,7 +391,6 @@
<sysproperty key="java.security.policy" value="${tests.etc.dir}/tst.policy"/>
<sysproperty key="jboss.home" value="${jboss.home}"/>
<sysproperty key="jbosstest.host.name" value="${node0}"/>
- <sysproperty key="jbosstest.server.host" value="${node0}"/>
<sysproperty key="jbossws.integration.target" value="${jbossws.integration.target}"/>
<sysproperty key="tomcat.home" value="${tomcat.home}"/>
<sysproperty key="tomcat.manager.password" value="${tomcat.manager.password}"/>
@@ -427,7 +430,6 @@
<sysproperty key="java.security.policy" value="${tests.etc.dir}/tst.policy"/>
<sysproperty key="jboss.home" value="${jboss.home}"/>
<sysproperty key="jbosstest.host.name" value="${node0}"/>
- <sysproperty key="jbosstest.server.host" value="${node0}"/>
<sysproperty key="jbossws.integration.target" value="${jbossws.integration.target}"/>
<sysproperty key="tomcat.home" value="${tomcat.home}"/>
<sysproperty key="tomcat.manager.password" value="${tomcat.manager.password}"/>
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/JBossWSTest.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/JBossWSTest.java 2007-01-16 15:32:38 UTC (rev 1987)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/JBossWSTest.java 2007-01-17 14:46:03 UTC (rev 1988)
@@ -31,6 +31,7 @@
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.xml.transform.Source;
+import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMResult;
@@ -134,17 +135,12 @@
}
}
- /**
- * Get the JBoss server host from system property "jbosstest.server.host"
- * This defaults to "" + getServerHost() + ""
- */
public String getServerHost()
{
- String hostName = System.getProperty("jbosstest.server.host", "localhost");
- return hostName;
+ return JBossWSTestHelper.getServerHost();
}
- public Element getElementFromSource(Source retObj) throws Exception
+ public Element getElementFromSource(Source retObj) throws TransformerException
{
DOMResult domResult = new DOMResult();
TransformerFactory tf = TransformerFactory.newInstance();
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/JBossWSTestHelper.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/JBossWSTestHelper.java 2007-01-16 15:32:38 UTC (rev 1987)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/JBossWSTestHelper.java 2007-01-17 14:46:03 UTC (rev 1988)
@@ -98,6 +98,16 @@
return "jboss40".equals(target);
}
+ /**
+ * Get the JBoss server host from system property "jbosstest.host.name"
+ * This defaults to "localhost"
+ */
+ public static String getServerHost()
+ {
+ String hostName = System.getProperty("jbosstest.host.name", "localhost");
+ return hostName;
+ }
+
public static MBeanServerConnection getServer()
{
if (server == null)
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1384/JBWS1384TestCase.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1384/JBWS1384TestCase.java 2007-01-16 15:32:38 UTC (rev 1987)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1384/JBWS1384TestCase.java 2007-01-17 14:46:03 UTC (rev 1988)
@@ -34,8 +34,8 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
+import org.jboss.ws.core.StubExt;
import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
-import org.jboss.ws.core.jaxrpc.StubExt;
import org.jboss.ws.tools.WSTools;
/**
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1410/JBWS1410TestCase.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1410/JBWS1410TestCase.java 2007-01-16 15:32:38 UTC (rev 1987)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1410/JBWS1410TestCase.java 2007-01-17 14:46:03 UTC (rev 1988)
@@ -33,9 +33,9 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
+import org.jboss.ws.core.StubExt;
import org.jboss.ws.core.WSTimeoutException;
import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
-import org.jboss.ws.core.jaxrpc.StubExt;
/**
* NumberFormatException From StubExt.PROPERTY_CLIENT_TIMEOUT
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/handler/HeaderClientTestCase.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/handler/HeaderClientTestCase.java 2007-01-16 15:32:38 UTC (rev 1987)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/handler/HeaderClientTestCase.java 2007-01-17 14:46:03 UTC (rev 1988)
@@ -36,8 +36,8 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
import org.jboss.ws.Constants;
+import org.jboss.ws.core.StubExt;
import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
-import org.jboss.ws.core.jaxrpc.StubExt;
/**
* Test bound and unbound headers
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/handler/HeaderProxyTestCase.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/handler/HeaderProxyTestCase.java 2007-01-16 15:32:38 UTC (rev 1987)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/handler/HeaderProxyTestCase.java 2007-01-17 14:46:03 UTC (rev 1988)
@@ -33,9 +33,9 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
import org.jboss.ws.Constants;
+import org.jboss.ws.core.StubExt;
import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
import org.jboss.ws.core.jaxrpc.ServiceImpl;
-import org.jboss.ws.core.jaxrpc.StubExt;
/**
* Test bound and unbound headers
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/mtom/MTOMTestCase.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/mtom/MTOMTestCase.java 2007-01-16 15:32:38 UTC (rev 1987)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/mtom/MTOMTestCase.java 2007-01-17 14:46:03 UTC (rev 1988)
@@ -38,8 +38,8 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
+import org.jboss.ws.core.StubExt;
import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
-import org.jboss.ws.core.jaxrpc.StubExt;
/**
* Test SOAP with XOP through the JAXRPC dynamic proxy layer.
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/wseventing/SysmonTestCase.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/wseventing/SysmonTestCase.java 2007-01-16 15:32:38 UTC (rev 1987)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/wseventing/SysmonTestCase.java 2007-01-17 14:46:03 UTC (rev 1988)
@@ -34,6 +34,7 @@
import javax.naming.InitialContext;
import javax.xml.namespace.QName;
import javax.xml.rpc.Service;
+import javax.xml.rpc.Stub;
import javax.xml.rpc.handler.HandlerInfo;
import javax.xml.rpc.handler.HandlerRegistry;
import javax.xml.ws.addressing.AddressingProperties;
@@ -44,7 +45,6 @@
import org.jboss.test.ws.JBossWSTestSetup;
import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
import org.jboss.ws.core.jaxrpc.ServiceImpl;
-import org.jboss.ws.core.jaxrpc.StubExt;
import org.jboss.ws.extensions.addressing.AddressingClientUtil;
import org.jboss.ws.extensions.addressing.jaxrpc.WSAddressingClientHandler;
import org.jboss.ws.extensions.eventing.EventSourceEndpoint;
@@ -143,13 +143,13 @@
// addressing correlation
AddressingProperties unsubscribeProps = SysmonUtil.buildFollowupProperties(subscribeResponse, EventingConstants.UNSUBSCRIBE_ACTION, eventSourceURI);
- SysmonUtil.setRequestProperties((StubExt)managementPort, unsubscribeProps);
+ SysmonUtil.setRequestProperties((Stub)managementPort, unsubscribeProps);
managementPort.unsubscribe(new UnsubscribeRequest(subscriptionID));
try
{
AddressingProperties getStatusProps = SysmonUtil.buildFollowupProperties(subscribeResponse, EventingConstants.GET_STATUS_ACTION, eventSourceURI);
- SysmonUtil.setRequestProperties((StubExt)managementPort, getStatusProps);
+ SysmonUtil.setRequestProperties((Stub)managementPort, getStatusProps);
managementPort.getStatus(new StatusRequest());
@@ -165,7 +165,7 @@
{
AddressingProperties reqProps = AddressingClientUtil.createDefaultProps(EventingConstants.SUBSCRIBE_ACTION, eventSourceURI);
reqProps.setMessageID(AddressingClientUtil.createMessageID());
- SysmonUtil.setRequestProperties((StubExt)subscriptionPort, reqProps);
+ SysmonUtil.setRequestProperties((Stub)subscriptionPort, reqProps);
// build subscription payload
SubscribeRequest request = new SubscribeRequest();
@@ -194,7 +194,7 @@
SubscribeResponse subscriptionTicket = subscriptionPort.subscribe(request);
// check message constraints
- AddressingProperties resProps = SysmonUtil.getResponseProperties((StubExt)subscriptionPort);
+ AddressingProperties resProps = SysmonUtil.getResponseProperties((Stub)subscriptionPort);
assertEquals(reqProps.getMessageID().getURI(), resProps.getRelatesTo()[0].getID());
return subscriptionTicket;
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/wssecurity/SimpleEncryptTestCase.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/wssecurity/SimpleEncryptTestCase.java 2007-01-16 15:32:38 UTC (rev 1987)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/wssecurity/SimpleEncryptTestCase.java 2007-01-17 14:46:03 UTC (rev 1988)
@@ -33,9 +33,9 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
+import org.jboss.ws.core.StubExt;
import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
import org.jboss.ws.core.jaxrpc.ServiceImpl;
-import org.jboss.ws.core.jaxrpc.StubExt;
/**
* Test WS-Security with RPC/Literal
@@ -86,10 +86,9 @@
ServiceImpl service = (ServiceImpl)factory.createService(wsdlURL, serviceName, mappingURL, securityURL);
Hello port = (Hello)service.getPort(Hello.class);
- StubExt stub = (StubExt)port;
- stub._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, "http://" + getServerHost() + ":8080/jaxrpc-samples-wssecurity-encrypt");
- stub.setConfigName("Standard WSSecurity Client");
+ ((Stub)port)._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, "http://" + getServerHost() + ":8080/jaxrpc-samples-wssecurity-encrypt");
+ ((StubExt)port).setConfigName("Standard WSSecurity Client");
return port;
}
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/wssecurity/SimpleSignTestCase.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/wssecurity/SimpleSignTestCase.java 2007-01-16 15:32:38 UTC (rev 1987)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/wssecurity/SimpleSignTestCase.java 2007-01-17 14:46:03 UTC (rev 1988)
@@ -23,24 +23,19 @@
import java.io.File;
import java.net.URL;
-import java.util.HashMap;
-import java.util.List;
import javax.naming.InitialContext;
import javax.xml.namespace.QName;
import javax.xml.rpc.Service;
import javax.xml.rpc.Stub;
-import javax.xml.rpc.handler.HandlerInfo;
-import javax.xml.rpc.handler.HandlerRegistry;
import junit.framework.Test;
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
+import org.jboss.ws.core.StubExt;
import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
import org.jboss.ws.core.jaxrpc.ServiceImpl;
-import org.jboss.ws.core.jaxrpc.StubExt;
-import org.jboss.ws.extensions.security.jaxrpc.WSSecurityHandlerOutbound;
/**
* Test WS-Security with RPC/Literal
@@ -88,15 +83,12 @@
URL securityURL = new File("resources/jaxrpc/samples/wssecurity/simple-sign/META-INF/jboss-wsse-client.xml").toURL();
QName serviceName = new QName("http://org.jboss.ws/samples/wssecurity", "HelloService");
- QName portName = new QName("http://org.jboss.ws/samples/wssecurity", "HelloPort");
-
ServiceImpl service = (ServiceImpl)factory.createService(wsdlURL, serviceName, mappingURL, securityURL);
Hello port = (Hello)service.getPort(Hello.class);
- StubExt stub = (StubExt)port;
- stub._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, "http://" + getServerHost() + ":8080/jaxrpc-samples-wssecurity-sign");
- stub.setConfigName("Standard WSSecurity Client");
+ ((Stub)port)._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, "http://" + getServerHost() + ":8080/jaxrpc-samples-wssecurity-sign");
+ ((StubExt)port).setConfigName("Standard WSSecurity Client");
return port;
}
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/wseventing/DIIClientTestCase.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/wseventing/DIIClientTestCase.java 2007-01-16 15:32:38 UTC (rev 1987)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/wseventing/DIIClientTestCase.java 2007-01-17 14:46:03 UTC (rev 1988)
@@ -34,6 +34,7 @@
import javax.xml.namespace.QName;
import javax.xml.rpc.Service;
import javax.xml.rpc.ServiceFactory;
+import javax.xml.rpc.Stub;
import javax.xml.rpc.handler.HandlerInfo;
import javax.xml.rpc.handler.HandlerRegistry;
import javax.xml.ws.addressing.AddressingBuilder;
@@ -45,7 +46,6 @@
import org.jboss.test.ws.JBossWSTestSetup;
import org.jboss.ws.core.jaxrpc.ServiceExt;
import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
-import org.jboss.ws.core.jaxrpc.StubExt;
import org.jboss.ws.extensions.addressing.AddressingClientUtil;
import org.jboss.ws.extensions.addressing.jaxrpc.WSAddressingClientHandler;
import org.jboss.ws.extensions.eventing.EventSourceEndpoint;
@@ -100,7 +100,7 @@
// append message correlation headers
AddressingProperties requestProps = AddressingClientUtil.createDefaultProps(EventingConstants.SUBSCRIBE_ACTION, eventSourceURI.toString());
requestProps.setMessageID(AddressingClientUtil.createMessageID());
- EventingSupport.setRequestProperties((StubExt)subscribePort, requestProps);
+ EventingSupport.setRequestProperties((Stub)subscribePort, requestProps);
SubscribeRequest request = new SubscribeRequest();
DeliveryType delivery = getDefaultDelivery();
@@ -116,7 +116,7 @@
requestProps = EventingSupport.buildFollowupProperties(response, EventingConstants.UNSUBSCRIBE_ACTION, eventSourceURI.toString());
requestProps.setTo(addrBuilder.newURI(eventSourceURI));
- EventingSupport.setRequestProperties((StubExt)managerPort, requestProps);
+ EventingSupport.setRequestProperties((Stub)managerPort, requestProps);
UnsubscribeRequest unsubscribeRequest = new UnsubscribeRequest();
managerPort.unsubscribe(unsubscribeRequest);
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/wseventing/EventingSupport.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/wseventing/EventingSupport.java 2007-01-16 15:32:38 UTC (rev 1987)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/wseventing/EventingSupport.java 2007-01-17 14:46:03 UTC (rev 1988)
@@ -35,7 +35,6 @@
import javax.xml.ws.addressing.JAXWSAConstants;
import org.jboss.test.ws.JBossWSTest;
-import org.jboss.ws.core.jaxrpc.StubExt;
import org.jboss.ws.extensions.addressing.AddressingClientUtil;
import org.jboss.ws.extensions.eventing.EventSourceEndpoint;
import org.jboss.ws.extensions.eventing.EventingConstants;
@@ -124,7 +123,7 @@
EventingConstants.SUBSCRIBE_ACTION, eventSourceURI.toString()
);
requestProps.setMessageID(AddressingClientUtil.createMessageID());
- setRequestProperties((StubExt)eventSourcePort, requestProps);
+ setRequestProperties((Stub)eventSourcePort, requestProps);
// subscription
SubscribeRequest request = new SubscribeRequest();
@@ -135,7 +134,7 @@
SubscribeResponse subscribeResponse = eventSourcePort.subscribe(request);
assertNotNull(subscribeResponse);
- AddressingProperties responseProps = getResponseProperties((StubExt)eventSourcePort);
+ AddressingProperties responseProps = getResponseProperties((Stub)eventSourcePort);
assertEquals(responseProps.getAction().getURI().toString(), EventingConstants.SUBSCRIBE_RESPONSE_ACTION);
return subscribeResponse;
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/wseventing/EventingTestCase.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/wseventing/EventingTestCase.java 2007-01-16 15:32:38 UTC (rev 1987)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/wseventing/EventingTestCase.java 2007-01-17 14:46:03 UTC (rev 1988)
@@ -1,24 +1,24 @@
/*
- * 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.test.ws.jaxrpc.wseventing;
// $Id$
@@ -27,12 +27,12 @@
import java.rmi.RemoteException;
import java.util.Date;
+import javax.xml.rpc.Stub;
import javax.xml.ws.addressing.AddressingProperties;
import junit.framework.Test;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.core.jaxrpc.StubExt;
import org.jboss.ws.extensions.addressing.AddressingClientUtil;
import org.jboss.ws.extensions.eventing.EventingConstants;
import org.jboss.ws.extensions.eventing.element.DeliveryType;
@@ -50,7 +50,8 @@
* @author heiko(a)openj.net
* @since 29-Apr-2005
*/
-public class EventingTestCase extends EventingSupport {
+public class EventingTestCase extends EventingSupport
+{
public static Test suite()
{
@@ -70,11 +71,9 @@
// that an invalid expiration time was requested.
//
- AddressingProperties requestProps = AddressingClientUtil.createDefaultProps(
- EventingConstants.SUBSCRIBE_ACTION, eventSourceURI.toString()
- );
+ AddressingProperties requestProps = AddressingClientUtil.createDefaultProps(EventingConstants.SUBSCRIBE_ACTION, eventSourceURI.toString());
requestProps.setMessageID(AddressingClientUtil.createMessageID());
- setRequestProperties((StubExt)eventSourcePort, requestProps);
+ setRequestProperties((Stub)eventSourcePort, requestProps);
SubscribeRequest request = new SubscribeRequest();
DeliveryType delivery = getDefaultDelivery();
@@ -86,13 +85,14 @@
try
{
SubscribeResponse subscribeResponse = eventSourcePort.subscribe(request);
- fail("Subscription should fail due to invalid lease time");
+ fail("Subscription should fail due to invalid lease time");
}
catch (RemoteException e)
{
// ignore expected exception
}
- catch(Throwable t) {
+ catch (Throwable t)
+ {
fail(t.getMessage()); // can be thrown by AddrConstraintsHandler
}
}
@@ -107,11 +107,9 @@
// wse:UnsupportedExpirationType fault indicating that an unsupported expiration type was requested.
//
- AddressingProperties requestProps = AddressingClientUtil.createDefaultProps(
- EventingConstants.SUBSCRIBE_ACTION, eventSourceURI.toString()
- );
+ AddressingProperties requestProps = AddressingClientUtil.createDefaultProps(EventingConstants.SUBSCRIBE_ACTION, eventSourceURI.toString());
requestProps.setMessageID(AddressingClientUtil.createMessageID());
- setRequestProperties((StubExt)eventSourcePort, requestProps);
+ setRequestProperties((Stub)eventSourcePort, requestProps);
SubscribeRequest request = new SubscribeRequest();
DeliveryType delivery = getDefaultDelivery();
@@ -129,12 +127,14 @@
{
// ignore expected exception
}
- catch(Throwable t) {
+ catch (Throwable t)
+ {
fail(t.getMessage()); // can be thrown by AddrConstraintsHandler
}
}
- public void testRenewal() throws Exception {
+ public void testRenewal() throws Exception
+ {
assertWSDLAccess();
//
@@ -143,16 +143,15 @@
//
SubscribeResponse response = doSubscribe();
- AddressingProperties requestProps =
- buildFollowupProperties(response, EventingConstants.RENEW_ACTION, eventSourceURI.toString());
- setRequestProperties((StubExt)managerPort, requestProps);
+ AddressingProperties requestProps = buildFollowupProperties(response, EventingConstants.RENEW_ACTION, eventSourceURI.toString());
+ setRequestProperties((Stub)managerPort, requestProps);
Date oldLeaseTime = response.getExpires();
RenewRequest renewRequest = new RenewRequest();
RenewResponse renewResponse = managerPort.renew(renewRequest);
assertNotNull(renewResponse);
assertNotNull(renewResponse.getExpires());
- AddressingProperties responseProps = getResponseProperties((StubExt)managerPort);
+ AddressingProperties responseProps = getResponseProperties((Stub)managerPort);
assertEquals(responseProps.getAction().getURI().toString(), EventingConstants.RENEW_RESPONSE_ACTION);
assertTrue("Lease time not increased", oldLeaseTime.getTime() < renewResponse.getExpires().getTime());
}
@@ -165,16 +164,15 @@
//
SubscribeResponse response = doSubscribe();
- AddressingProperties requestProps =
- buildFollowupProperties(response, EventingConstants.GET_STATUS_ACTION, eventSourceURI.toString());
- setRequestProperties((StubExt)managerPort, requestProps);
+ AddressingProperties requestProps = buildFollowupProperties(response, EventingConstants.GET_STATUS_ACTION, eventSourceURI.toString());
+ setRequestProperties((Stub)managerPort, requestProps);
Date expectedLeaseTime = response.getExpires();
StatusRequest statusRequest = new StatusRequest();
StatusResponse statusResponse = managerPort.getStatus(statusRequest);
assertNotNull(statusResponse);
assertNotNull(statusResponse.getExpires());
- AddressingProperties responseProps = getResponseProperties((StubExt)managerPort);
+ AddressingProperties responseProps = getResponseProperties((Stub)managerPort);
assertEquals(responseProps.getAction().getURI().toString(), EventingConstants.GET_STATUS_RESPONSE_ACTION);
assertEquals("Incorrect lease time", expectedLeaseTime, statusResponse.getExpires());
}
@@ -189,25 +187,23 @@
SubscribeResponse response = doSubscribe();
URI identifier = subscriptionIdFromResponse(response);
- AddressingProperties requestProps =
- buildFollowupProperties(response, EventingConstants.UNSUBSCRIBE_ACTION, eventSourceURI.toString());
- setRequestProperties((StubExt)managerPort, requestProps);
+ AddressingProperties requestProps = buildFollowupProperties(response, EventingConstants.UNSUBSCRIBE_ACTION, eventSourceURI.toString());
+ setRequestProperties((Stub)managerPort, requestProps);
UnsubscribeRequest unsubscribeRequest = new UnsubscribeRequest();
managerPort.unsubscribe(unsubscribeRequest);
- AddressingProperties responseProps = getResponseProperties((StubExt)managerPort);
+ AddressingProperties responseProps = getResponseProperties((Stub)managerPort);
assertEquals(responseProps.getAction().getURI().toString(), EventingConstants.UNSUBSCRIBE_RESPONSE_ACTION);
try
{
- AddressingProperties renewProps =
- buildFollowupProperties(response, EventingConstants.RENEW_ACTION, eventSourceURI.toString());
- setRequestProperties((StubExt)managerPort, requestProps);
+ AddressingProperties renewProps = buildFollowupProperties(response, EventingConstants.RENEW_ACTION, eventSourceURI.toString());
+ setRequestProperties((Stub)managerPort, requestProps);
RenewRequest renewRequest = new RenewRequest();
- managerPort.renew(renewRequest); // this should fail
+ managerPort.renew(renewRequest); // this should fail
fail("Subscription not removed");
}
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/xop/doclit/XOPBase.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/xop/doclit/XOPBase.java 2007-01-16 15:32:38 UTC (rev 1987)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/xop/doclit/XOPBase.java 2007-01-17 14:46:03 UTC (rev 1988)
@@ -24,7 +24,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.jaxrpc.xop.XOPTestSupport;
import org.jboss.test.ws.jaxrpc.xop.shared.*;
-import org.jboss.ws.core.jaxrpc.StubExt;
+import org.jboss.ws.core.StubExt;
import org.jboss.ws.core.utils.IOUtils;
import javax.activation.DataHandler;
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/xop/rpclit/XOPBase.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/xop/rpclit/XOPBase.java 2007-01-16 15:32:38 UTC (rev 1987)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/xop/rpclit/XOPBase.java 2007-01-17 14:46:03 UTC (rev 1988)
@@ -24,7 +24,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.jaxrpc.xop.XOPTestSupport;
import org.jboss.test.ws.jaxrpc.xop.shared.*;
-import org.jboss.ws.core.jaxrpc.StubExt;
+import org.jboss.ws.core.StubExt;
import org.jboss.ws.core.utils.IOUtils;
import javax.activation.DataHandler;
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/xop/shared/MTOMServiceBase.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/xop/shared/MTOMServiceBase.java 2007-01-16 15:32:38 UTC (rev 1987)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/xop/shared/MTOMServiceBase.java 2007-01-17 14:46:03 UTC (rev 1988)
@@ -22,7 +22,7 @@
package org.jboss.test.ws.jaxrpc.xop.shared;
import org.jboss.ws.core.CommonMessageContext;
-import org.jboss.ws.core.jaxrpc.StubExt;
+import org.jboss.ws.core.StubExt;
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.extensions.xop.XOPContext;
Deleted: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/ApplicationClient.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/ApplicationClient.java 2007-01-16 15:32:38 UTC (rev 1987)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/ApplicationClient.java 2007-01-17 14:46:03 UTC (rev 1988)
@@ -1,121 +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.webserviceref;
-
-import java.util.ArrayList;
-
-import javax.naming.InitialContext;
-import javax.xml.ws.WebServiceException;
-import javax.xml.ws.WebServiceRef;
-import javax.xml.ws.WebServiceRefs;
-
-import org.jboss.logging.Logger;
-
-//Test on type with wsdlLocation
-@WebServiceRef(name = "service1", value = TestEndpointService.class, wsdlLocation = "META-INF/wsdl/TestEndpoint.wsdl")
-
-// Test multiple on type
-@WebServiceRefs( {
- @WebServiceRef(name = "service2", value = TestEndpointService.class),
- @WebServiceRef(name = "port1", value = TestEndpointService.class, type = TestEndpoint.class) })
-public class ApplicationClient
-{
- // Provide logging
- private static Logger log = Logger.getLogger(ApplicationClient.class);
-
- // Test on field with name
- @WebServiceRef(name = "TestEndpointService3")
- public static TestEndpointService service3;
-
- // Test on field without name
- @WebServiceRef
- public static TestEndpointService service4;
-
- // Test on method with value
- @WebServiceRef(name = "TestEndpointService5")
- public static void setServiceSetter5(TestEndpointService service)
- {
- ApplicationClient.service5 = service;
- }
- private static TestEndpointService service5;
-
- // Test on method without name
- @WebServiceRef
- public static void setServiceSetter6(TestEndpointService service)
- {
- ApplicationClient.service6 = service;
- }
- private static TestEndpointService service6;
-
- // Test on field with name and value
- @WebServiceRef(name = "Port2", value = TestEndpointService.class)
- public static TestEndpoint port2;
-
- // Test on field with value
- @WebServiceRef(value = TestEndpointService.class)
- public static TestEndpoint port3;
-
- public static InitialContext iniCtx;
- public static String retStr;
-
- public static void main(String[] args)
- {
- String inStr = args[0];
- log.info("echo: " + inStr);
-
- ArrayList<TestEndpoint> ports = new ArrayList<TestEndpoint>();
- try
- {
- System.out.println("FIXME: EJBTHREE-760");
- //ports.add(((TestEndpointService)iniCtx.lookup("java:comp/env/service1")).getTestEndpointPort());
- //ports.add(((TestEndpointService)iniCtx.lookup("java:comp/env/service2")).getTestEndpointPort());
- ports.add((TestEndpoint)service3.getPort(TestEndpoint.class));
- //ports.add(((TestEndpointService)iniCtx.lookup("java:comp/env/TestEndpointService3")).getTestEndpointPort());
- ports.add((TestEndpoint)service4.getPort(TestEndpoint.class));
- //ports.add(((TestEndpointService)iniCtx.lookup("java:comp/env/" + ApplicationClient.class.getName() + "/service4")).getTestEndpointPort());
- ports.add((TestEndpoint)service5.getPort(TestEndpoint.class));
- //ports.add(((TestEndpointService)iniCtx.lookup("java:comp/env/TestEndpointService5")).getTestEndpointPort());
- ports.add((TestEndpoint)service6.getPort(TestEndpoint.class));
- //ports.add(((TestEndpointService)iniCtx.lookup("java:comp/env/" + ApplicationClient.class.getName() + "/serviceSetter6")).getTestEndpointPort());
- //ports.add((TestEndpoint)iniCtx.lookup("java:comp/env/port1"));
- ports.add(port2);
- //ports.add((TestEndpoint)iniCtx.lookup("java:comp/env/Port2"));
- ports.add(port3);
- //ports.add((TestEndpoint)iniCtx.lookup("java:comp/env/" + ApplicationClient.class.getName() + "/port3"));
- }
- catch (Exception ex)
- {
- log.error("Cannot add port", ex);
- throw new WebServiceException(ex);
- }
-
- for (TestEndpoint port : ports)
- {
- String outStr = port.echo(inStr);
- if (inStr.equals(outStr) == false)
- throw new WebServiceException("Invalid echo return: " + inStr);
- }
-
- retStr = inStr;
- }
-
-}
Deleted: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/Echo.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/Echo.java 2007-01-16 15:32:38 UTC (rev 1987)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/Echo.java 2007-01-17 14:46:03 UTC (rev 1988)
@@ -1,62 +0,0 @@
-
-package org.jboss.test.ws.jaxws.webserviceref;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlType;
-
-
-/**
- * <p>Java class for echo complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="echo">
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <sequence>
- * <element name="arg0" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
- * </sequence>
- * </restriction>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "echo", propOrder = {
- "arg0"
-})
-public class Echo {
-
- @XmlElement(namespace = "http://org.jboss.ws/wsref")
- protected String arg0;
-
- /**
- * Gets the value of the arg0 property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getArg0() {
- return arg0;
- }
-
- /**
- * Sets the value of the arg0 property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setArg0(String value) {
- this.arg0 = value;
- }
-
-}
Deleted: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/EchoResponse.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/EchoResponse.java 2007-01-16 15:32:38 UTC (rev 1987)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/EchoResponse.java 2007-01-17 14:46:03 UTC (rev 1988)
@@ -1,62 +0,0 @@
-
-package org.jboss.test.ws.jaxws.webserviceref;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlType;
-
-
-/**
- * <p>Java class for echoResponse complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="echoResponse">
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <sequence>
- * <element name="return" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
- * </sequence>
- * </restriction>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "echoResponse", propOrder = {
- "_return"
-})
-public class EchoResponse {
-
- @XmlElement(name = "return", namespace = "http://org.jboss.ws/wsref")
- protected String _return;
-
- /**
- * Gets the value of the return property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getReturn() {
- return _return;
- }
-
- /**
- * Sets the value of the return property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setReturn(String value) {
- this._return = value;
- }
-
-}
Deleted: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/ObjectFactory.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/ObjectFactory.java 2007-01-16 15:32:38 UTC (rev 1987)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/ObjectFactory.java 2007-01-17 14:46:03 UTC (rev 1988)
@@ -1,71 +0,0 @@
-
-package org.jboss.test.ws.jaxws.webserviceref;
-
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.annotation.XmlElementDecl;
-import javax.xml.bind.annotation.XmlRegistry;
-import javax.xml.namespace.QName;
-
-
-/**
- * This object contains factory methods for each
- * Java content interface and Java element interface
- * generated in the org.jboss.test.ws.jaxws.webserviceref package.
- * <p>An ObjectFactory allows you to programatically
- * construct new instances of the Java representation
- * for XML content. The Java representation of XML
- * content can consist of schema derived interfaces
- * and classes representing the binding of schema
- * type definitions, element declarations and model
- * groups. Factory methods for each of these are
- * provided in this class.
- *
- */
-@XmlRegistry
-public class ObjectFactory {
-
- private final static QName _EchoResponse_QNAME = new QName("http://org.jboss.ws/wsref", "echoResponse");
- private final static QName _Echo_QNAME = new QName("http://org.jboss.ws/wsref", "echo");
-
- /**
- * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.jboss.test.ws.jaxws.webserviceref
- *
- */
- public ObjectFactory() {
- }
-
- /**
- * Create an instance of {@link EchoResponse }
- *
- */
- public EchoResponse createEchoResponse() {
- return new EchoResponse();
- }
-
- /**
- * Create an instance of {@link Echo }
- *
- */
- public Echo createEcho() {
- return new Echo();
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link EchoResponse }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "http://org.jboss.ws/wsref", name = "echoResponse")
- public JAXBElement<EchoResponse> createEchoResponse(EchoResponse value) {
- return new JAXBElement<EchoResponse>(_EchoResponse_QNAME, EchoResponse.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link Echo }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "http://org.jboss.ws/wsref", name = "echo")
- public JAXBElement<Echo> createEcho(Echo value) {
- return new JAXBElement<Echo>(_Echo_QNAME, Echo.class, null, value);
- }
-
-}
Added: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/SecureEndpoint.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/SecureEndpoint.java (rev 0)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/SecureEndpoint.java 2007-01-17 14:46:03 UTC (rev 1988)
@@ -0,0 +1,35 @@
+
+package org.jboss.test.ws.jaxws.webserviceref;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import javax.jws.soap.SOAPBinding.Style;
+
+
+/**
+ * This class was generated by the JAXWS SI.
+ * JAX-WS RI 2.0-b26-ea3
+ * Generated source version: 2.0
+ *
+ */
+@WebService(name = "SecureEndpoint", targetNamespace = "http://org.jboss.ws/wsref", wsdlLocation = "http://localhost.localdomain:8080/jaxws-webserviceref-secure/SecureEndpoi...")
+@SOAPBinding(style = Style.RPC)
+public interface SecureEndpoint {
+
+
+ /**
+ *
+ * @param arg0
+ * @return
+ * returns java.lang.String
+ */
+ @WebMethod
+ @WebResult(targetNamespace = "http://org.jboss.ws/wsref", partName = "return")
+ public String echo(
+ @WebParam(name = "arg0", partName = "arg0")
+ String arg0);
+
+}
Property changes on: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/SecureEndpoint.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/SecureEndpointClient.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/SecureEndpointClient.java (rev 0)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/SecureEndpointClient.java 2007-01-17 14:46:03 UTC (rev 1988)
@@ -0,0 +1,82 @@
+/*
+ * 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.webserviceref;
+
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebServiceRef;
+
+import org.jboss.logging.Logger;
+
+public class SecureEndpointClient
+{
+ // Provide logging
+ private static Logger log = Logger.getLogger(SecureEndpointClient.class);
+
+ @WebServiceRef(name = "SecureService1")
+ public static SecureEndpointService secureService1;
+
+ @WebServiceRef(name = "SecureService2")
+ public static Service secureService2;
+
+ @WebServiceRef(name = "SecurePort1")
+ public static SecureEndpoint securePort1;
+
+ public static String retStr;
+
+ public static void main(String[] args)
+ {
+ String reqMsg = args[0];
+ log.info("echo: " + reqMsg);
+
+ String username = null;
+ if (args.length > 1)
+ username = args[1];
+
+ String password = null;
+ if (args.length > 2)
+ password = args[2];
+
+ SecureEndpoint port = secureService1.getSecureEndpointPort();
+ String retMsg = invokeEndpoint(port, reqMsg, username, password);
+
+ port = secureService2.getPort(SecureEndpoint.class);
+ retMsg += "|" + invokeEndpoint(port, reqMsg, username, password);
+
+ port = securePort1;
+ retMsg += "|" + invokeEndpoint(port, reqMsg, username, password);
+
+ retStr = retMsg;
+ }
+
+ private static String invokeEndpoint(SecureEndpoint port, String inStr, String username, String password)
+ {
+ if (username != null && password != null)
+ {
+ BindingProvider bindingProvider = (BindingProvider)port;
+ bindingProvider.getRequestContext().put(BindingProvider.USERNAME_PROPERTY, username);
+ bindingProvider.getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, password);
+ }
+
+ return port.echo(inStr);
+ }
+}
Property changes on: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/SecureEndpointClient.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/SecureEndpointImpl.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/SecureEndpointImpl.java (rev 0)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/SecureEndpointImpl.java 2007-01-17 14:46:03 UTC (rev 1988)
@@ -0,0 +1,53 @@
+/*
+ * 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.webserviceref;
+
+import javax.annotation.security.RolesAllowed;
+import javax.ejb.Stateless;
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import javax.jws.soap.SOAPBinding.Style;
+
+import org.jboss.annotation.security.SecurityDomain;
+import org.jboss.logging.Logger;
+import org.jboss.ws.annotation.WebContext;
+
+@WebService(name = "SecureEndpoint", targetNamespace = "http://org.jboss.ws/wsref")
+@Stateless(name = "SecureEndpoint")
+@SOAPBinding(style = Style.RPC)
+@RolesAllowed("friend")
+
+@WebContext(authMethod = "BASIC", transportGuarantee = "NONE", secureWSDLAccess = false)
+@SecurityDomain("JBossWS")
+public class SecureEndpointImpl
+{
+ // Provide logging
+ private static Logger log = Logger.getLogger(SecureEndpointImpl.class);
+
+ @WebMethod
+ public String echo(String input)
+ {
+ log.info(input);
+ return input;
+ }
+}
Property changes on: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/SecureEndpointImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/SecureEndpointService.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/SecureEndpointService.java (rev 0)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/SecureEndpointService.java 2007-01-17 14:46:03 UTC (rev 1988)
@@ -0,0 +1,55 @@
+
+package org.jboss.test.ws.jaxws.webserviceref;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebEndpoint;
+import javax.xml.ws.WebServiceClient;
+
+/**
+ * This class was generated by the JAXWS SI.
+ * JAX-WS RI 2.0-b26-ea3
+ * Generated source version: 2.0
+ *
+ */
+@WebServiceClient(name = "SecureEndpointService", targetNamespace = "http://org.jboss.ws/wsref", wsdlLocation = "http://localhost.localdomain:8080/jaxws-webserviceref-secure/SecureEndpoi...")
+public class SecureEndpointService
+ extends Service
+{
+
+ private final static URL WSDL_LOCATION;
+ private final static QName SECUREENDPOINTSERVICE = new QName("http://org.jboss.ws/wsref", "SecureEndpointService");
+ private final static QName SECUREENDPOINTPORT = new QName("http://org.jboss.ws/wsref", "SecureEndpointPort");
+
+ static {
+ URL url = null;
+ try {
+ url = new URL("http://localhost.localdomain:8080/jaxws-webserviceref-secure/SecureEndpoi...");
+ } catch (MalformedURLException e) {
+ e.printStackTrace();
+ }
+ WSDL_LOCATION = url;
+ }
+
+ public SecureEndpointService(URL wsdlLocation, QName serviceName) {
+ super(wsdlLocation, serviceName);
+ }
+
+ public SecureEndpointService() {
+ super(WSDL_LOCATION, SECUREENDPOINTSERVICE);
+ }
+
+ /**
+ *
+ * @return
+ * returns SecureEndpoint
+ */
+ @WebEndpoint(name = "SecureEndpointPort")
+ public SecureEndpoint getSecureEndpointPort() {
+ return (SecureEndpoint)super.getPort(SECUREENDPOINTPORT, SecureEndpoint.class);
+ }
+
+}
Property changes on: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/SecureEndpointService.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/StubPropertyTestCase.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/StubPropertyTestCase.java (rev 0)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/StubPropertyTestCase.java 2007-01-17 14:46:03 UTC (rev 1988)
@@ -0,0 +1,84 @@
+/*
+ * 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.webserviceref;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Service;
+
+import junit.framework.Test;
+
+import org.jboss.ejb3.client.ClientLauncher;
+import org.jboss.test.ws.JBossWSTest;
+import org.jboss.test.ws.JBossWSTestSetup;
+import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
+
+/**
+ * Test the JAXWS annotation: javax.xml.ws.WebServiceRef
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 23-Oct-2005
+ */
+public class StubPropertyTestCase extends JBossWSTest
+{
+ public final String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() + ":8080/jaxws-webserviceref-secure/SecureEndpoint";
+
+ public static Test suite()
+ {
+ return JBossWSTestSetup.newTestSetup(StubPropertyTestCase.class, "jaxws-webserviceref-secure.jar, jaxws-webserviceref-secure-client.jar");
+ }
+
+ public void testWSDLAccess() throws MalformedURLException
+ {
+ URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
+ WSDLDefinitionsFactory factory = WSDLDefinitionsFactory.newInstance();
+ WSDLDefinitions wsdlDefinitions = factory.parse(wsdlURL);
+ assertNotNull(wsdlDefinitions);
+ }
+
+ public void testDynamicProxy() throws Exception
+ {
+ URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
+ QName qname = new QName("http://org.jboss.ws/wsref", "SecureEndpointService");
+ Service service = Service.create(wsdlURL, qname);
+ SecureEndpoint port = (SecureEndpoint)service.getPort(SecureEndpoint.class);
+
+ BindingProvider bindingProvider = (BindingProvider)port;
+ bindingProvider.getRequestContext().put(BindingProvider.USERNAME_PROPERTY, "kermit");
+ bindingProvider.getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, "thefrog");
+
+ String helloWorld = "Hello World";
+ Object retObj = port.echo(helloWorld);
+ assertEquals(helloWorld, retObj);
+ }
+
+ public void testUnconfiguredStub() throws Throwable
+ {
+ String reqMsg = "Hello World";
+ new ClientLauncher().launch(SecureEndpointClient.class.getName(), "jbossws-client", new String[]{reqMsg, "kermit", "thefrog"});
+ assertEquals("Hello World|Hello World|Hello World", SecureEndpointClient.retStr);
+ }
+}
Property changes on: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/StubPropertyTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/TestEndpoint.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/TestEndpoint.java 2007-01-16 15:32:38 UTC (rev 1987)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/TestEndpoint.java 2007-01-17 14:46:03 UTC (rev 1988)
@@ -5,17 +5,18 @@
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
-import javax.xml.ws.RequestWrapper;
-import javax.xml.ws.ResponseWrapper;
+import javax.jws.soap.SOAPBinding;
+import javax.jws.soap.SOAPBinding.Style;
/**
* This class was generated by the JAXWS SI.
- * JAX-WS RI 2.0_01-b59-fcs
+ * JAX-WS RI 2.0-b26-ea3
* Generated source version: 2.0
*
*/
-@WebService(name = "TestEndpoint", targetNamespace = "http://org.jboss.ws/wsref")
+@WebService(name = "TestEndpoint", targetNamespace = "http://org.jboss.ws/wsref", wsdlLocation = "http://localhost.localdomain:8080/jaxws-webserviceref?wsdl")
+@SOAPBinding(style = Style.RPC)
public interface TestEndpoint {
@@ -26,11 +27,9 @@
* returns java.lang.String
*/
@WebMethod
- @WebResult(targetNamespace = "http://org.jboss.ws/wsref")
- @RequestWrapper(localName = "echo", targetNamespace = "http://org.jboss.ws/wsref", className = "org.jboss.test.ws.jaxws.webserviceref.Echo")
- @ResponseWrapper(localName = "echoResponse", targetNamespace = "http://org.jboss.ws/wsref", className = "org.jboss.test.ws.jaxws.webserviceref.EchoResponse")
+ @WebResult(targetNamespace = "http://org.jboss.ws/wsref", partName = "return")
public String echo(
- @WebParam(name = "arg0", targetNamespace = "http://org.jboss.ws/wsref")
+ @WebParam(name = "arg0", partName = "arg0")
String arg0);
}
Copied: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/TestEndpointClient.java (from rev 1987, trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/ApplicationClient.java)
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/TestEndpointClient.java (rev 0)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/TestEndpointClient.java 2007-01-17 14:46:03 UTC (rev 1988)
@@ -0,0 +1,132 @@
+/*
+ * 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.webserviceref;
+
+import java.util.ArrayList;
+
+import javax.naming.InitialContext;
+import javax.xml.ws.WebServiceException;
+import javax.xml.ws.WebServiceRef;
+import javax.xml.ws.WebServiceRefs;
+
+import org.jboss.logging.Logger;
+
+//Test on type with wsdlLocation
+@WebServiceRef(name = "service1", value = TestEndpointService.class, wsdlLocation = "META-INF/wsdl/TestEndpoint.wsdl")
+
+// Test multiple on type
+@WebServiceRefs( {
+ @WebServiceRef(name = "service2", value = TestEndpointService.class),
+ @WebServiceRef(name = "port1", value = TestEndpointService.class, type = TestEndpoint.class) })
+public class TestEndpointClient
+{
+ // Provide logging
+ private static Logger log = Logger.getLogger(TestEndpointClient.class);
+
+ // Test on field with name
+ @WebServiceRef(name = "TestEndpointService3")
+ public static TestEndpointService service3;
+
+ // Test on field without name
+ @WebServiceRef
+ public static TestEndpointService service4;
+
+ // Test on method with value
+ @WebServiceRef(name = "TestEndpointService5")
+ public static void setServiceSetter5(TestEndpointService service)
+ {
+ TestEndpointClient.service5 = service;
+ }
+
+ private static TestEndpointService service5;
+
+ // Test on method without name
+ @WebServiceRef
+ public static void setServiceSetter6(TestEndpointService service)
+ {
+ TestEndpointClient.service6 = service;
+ }
+
+ private static TestEndpointService service6;
+
+ // Test on field with name and value
+ @WebServiceRef(name = "Port2", value = TestEndpointService.class)
+ public static TestEndpoint port2;
+
+ // Test on field with value
+ @WebServiceRef(value = TestEndpointService.class)
+ public static TestEndpoint port3;
+
+ // Test on field
+ @WebServiceRef
+ public static TestEndpoint port4;
+
+ // Test on field with name
+ @WebServiceRef (name = "Port5")
+ public static TestEndpoint port5;
+
+ public static InitialContext iniCtx;
+ public static String retStr;
+
+ public static void main(String[] args)
+ {
+ String inStr = args[0];
+ log.info("echo: " + inStr);
+
+ ArrayList<TestEndpoint> ports = new ArrayList<TestEndpoint>();
+ try
+ {
+ System.out.println("FIXME: [EJBTHREE-760] - @WebServiceRef not bound to java:comp/env");
+ //ports.add(((TestEndpointService)iniCtx.lookup("java:comp/env/service1")).getTestEndpointPort());
+ //ports.add(((TestEndpointService)iniCtx.lookup("java:comp/env/service2")).getTestEndpointPort());
+ ports.add((TestEndpoint)service3.getPort(TestEndpoint.class));
+ //ports.add(((TestEndpointService)iniCtx.lookup("java:comp/env/TestEndpointService3")).getTestEndpointPort());
+ ports.add((TestEndpoint)service4.getPort(TestEndpoint.class));
+ //ports.add(((TestEndpointService)iniCtx.lookup("java:comp/env/" + ApplicationClient.class.getName() + "/service4")).getTestEndpointPort());
+ ports.add((TestEndpoint)service5.getPort(TestEndpoint.class));
+ //ports.add(((TestEndpointService)iniCtx.lookup("java:comp/env/TestEndpointService5")).getTestEndpointPort());
+ ports.add((TestEndpoint)service6.getPort(TestEndpoint.class));
+ //ports.add(((TestEndpointService)iniCtx.lookup("java:comp/env/" + ApplicationClient.class.getName() + "/serviceSetter6")).getTestEndpointPort());
+ //ports.add((TestEndpoint)iniCtx.lookup("java:comp/env/port1"));
+ ports.add(port2);
+ //ports.add((TestEndpoint)iniCtx.lookup("java:comp/env/Port2"));
+ ports.add(port3);
+ //ports.add((TestEndpoint)iniCtx.lookup("java:comp/env/" + ApplicationClient.class.getName() + "/port3"));
+ ports.add(port4);
+ ports.add(port5);
+ }
+ catch (Exception ex)
+ {
+ log.error("Cannot add port", ex);
+ throw new WebServiceException(ex);
+ }
+
+ for (TestEndpoint port : ports)
+ {
+ String outStr = port.echo(inStr);
+ if (inStr.equals(outStr) == false)
+ throw new WebServiceException("Invalid echo return: " + inStr);
+ }
+
+ retStr = inStr;
+ }
+}
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/TestEndpointImpl.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/TestEndpointImpl.java 2007-01-16 15:32:38 UTC (rev 1987)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/TestEndpointImpl.java 2007-01-17 14:46:03 UTC (rev 1988)
@@ -1,42 +1,41 @@
/*
- * 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.test.ws.jaxws.webserviceref;
+import javax.jws.WebMethod;
import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import javax.jws.soap.SOAPBinding.Style;
import org.jboss.logging.Logger;
-/**
- * Test the JAXWS annotation: javax.jws.WebServiceRef
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 23-Oct-2006
- */
-@WebService(endpointInterface="org.jboss.test.ws.jaxws.webserviceref.TestEndpoint")
-public class TestEndpointImpl implements TestEndpoint
+@WebService(name = "TestEndpoint", targetNamespace = "http://org.jboss.ws/wsref")
+@SOAPBinding(style = Style.RPC)
+public class TestEndpointImpl
{
// Provide logging
private static Logger log = Logger.getLogger(TestEndpointImpl.class);
+ @WebMethod
public String echo(String input)
{
log.info(input);
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/TestEndpointService.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/TestEndpointService.java 2007-01-16 15:32:38 UTC (rev 1987)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/TestEndpointService.java 2007-01-17 14:46:03 UTC (rev 1988)
@@ -3,33 +3,35 @@
import java.net.MalformedURLException;
import java.net.URL;
+
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
import javax.xml.ws.WebEndpoint;
import javax.xml.ws.WebServiceClient;
-
/**
* This class was generated by the JAXWS SI.
- * JAX-WS RI 2.0_01-b59-fcs
+ * JAX-WS RI 2.0-b26-ea3
* Generated source version: 2.0
*
*/
-@WebServiceClient(name = "TestEndpointService", targetNamespace = "http://org.jboss.ws/wsref", wsdlLocation = "META-INF/wsdl/TestEndpoint.wsdl")
+@WebServiceClient(name = "TestEndpointService", targetNamespace = "http://org.jboss.ws/wsref", wsdlLocation = "http://localhost.localdomain:8080/jaxws-webserviceref?wsdl")
public class TestEndpointService
extends Service
{
- private final static URL TESTENDPOINTSERVICE_WSDL_LOCATION;
+ private final static URL WSDL_LOCATION;
+ private final static QName TESTENDPOINTSERVICE = new QName("http://org.jboss.ws/wsref", "TestEndpointService");
+ private final static QName TESTENDPOINTPORT = new QName("http://org.jboss.ws/wsref", "TestEndpointPort");
static {
URL url = null;
try {
- url = new URL("file:./resources/jaxws/webserviceref/META-INF/wsdl/TestEndpoint.wsdl");
+ url = new URL("http://localhost.localdomain:8080/jaxws-webserviceref?wsdl");
} catch (MalformedURLException e) {
e.printStackTrace();
}
- TESTENDPOINTSERVICE_WSDL_LOCATION = url;
+ WSDL_LOCATION = url;
}
public TestEndpointService(URL wsdlLocation, QName serviceName) {
@@ -37,7 +39,7 @@
}
public TestEndpointService() {
- super(TESTENDPOINTSERVICE_WSDL_LOCATION, new QName("http://org.jboss.ws/wsref", "TestEndpointService"));
+ super(WSDL_LOCATION, TESTENDPOINTSERVICE);
}
/**
@@ -47,7 +49,7 @@
*/
@WebEndpoint(name = "TestEndpointPort")
public TestEndpoint getTestEndpointPort() {
- return (TestEndpoint)super.getPort(new QName("http://org.jboss.ws/wsref", "TestEndpointPort"), TestEndpoint.class);
+ return (TestEndpoint)super.getPort(TESTENDPOINTPORT, TestEndpoint.class);
}
}
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefClientTestCase.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefClientTestCase.java 2007-01-16 15:32:38 UTC (rev 1987)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefClientTestCase.java 2007-01-17 14:46:03 UTC (rev 1988)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.webserviceref;
-import java.io.File;
import java.net.MalformedURLException;
import java.net.URL;
@@ -30,6 +29,7 @@
import junit.framework.Test;
+import org.jboss.ejb3.client.ClientLauncher;
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
@@ -60,7 +60,7 @@
public void testDynamicProxy() throws Exception
{
- URL wsdlURL = new File("resources/jaxws/webserviceref/META-INF/wsdl/TestEndpoint.wsdl").toURL();
+ URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
QName qname = new QName("http://org.jboss.ws/wsref", "TestEndpointService");
Service service = Service.create(wsdlURL, qname);
TestEndpoint port = (TestEndpoint)service.getPort(TestEndpoint.class);
@@ -70,15 +70,12 @@
assertEquals(helloWorld, retObj);
}
- /* externalize
public void testApplicationClient() throws Throwable
{
String helloWorld = "Hello World!";
- ApplicationClient.iniCtx = getInitialContext();
+ TestEndpointClient.iniCtx = getInitialContext();
- AppClientLauncher apl = new ClientLauncher();
- apl.launch(ApplicationClient.class.getName(), "jbossws-client", new String[]{helloWorld});
- assertEquals(helloWorld, ApplicationClient.retStr);
+ new ClientLauncher().launch(TestEndpointClient.class.getName(), "jbossws-client", new String[]{helloWorld});
+ assertEquals(helloWorld, TestEndpointClient.retStr);
}
- */
}
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefEJB3TestCase.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefEJB3TestCase.java 2007-01-16 15:32:38 UTC (rev 1987)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefEJB3TestCase.java 2007-01-17 14:46:03 UTC (rev 1988)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.webserviceref;
-import java.io.File;
import java.net.MalformedURLException;
import java.net.URL;
@@ -61,7 +60,7 @@
public void testDynamicProxy() throws Exception
{
- URL wsdlURL = new File("resources/jaxws/webserviceref/META-INF/wsdl/TestEndpoint.wsdl").toURL();
+ URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
QName qname = new QName("http://org.jboss.ws/wsref", "TestEndpointService");
Service service = Service.create(wsdlURL, qname);
TestEndpoint port = (TestEndpoint)service.getPort(TestEndpoint.class);
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefServletTestCase.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefServletTestCase.java 2007-01-16 15:32:38 UTC (rev 1987)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefServletTestCase.java 2007-01-17 14:46:03 UTC (rev 1988)
@@ -22,12 +22,10 @@
package org.jboss.test.ws.jaxws.webserviceref;
import java.io.BufferedReader;
-import java.io.File;
import java.io.InputStreamReader;
import java.net.MalformedURLException;
import java.net.URL;
-import javax.naming.InitialContext;
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
@@ -63,7 +61,7 @@
public void testDynamicProxy() throws Exception
{
- URL wsdlURL = new File("resources/jaxws/webserviceref/META-INF/wsdl/TestEndpoint.wsdl").toURL();
+ URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
QName qname = new QName("http://org.jboss.ws/wsref", "TestEndpointService");
Service service = Service.create(wsdlURL, qname);
TestEndpoint port = (TestEndpoint)service.getPort(TestEndpoint.class);
Deleted: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/package-info.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/package-info.java 2007-01-16 15:32:38 UTC (rev 1987)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/package-info.java 2007-01-17 14:46:03 UTC (rev 1988)
@@ -1,2 +0,0 @@
-(a)javax.xml.bind.annotation.XmlSchema(namespace = "http://org.jboss.ws/wsref")
-package org.jboss.test.ws.jaxws.webserviceref;
Modified: trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/META-INF/jboss-client.xml
===================================================================
--- trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/META-INF/jboss-client.xml 2007-01-16 15:32:38 UTC (rev 1987)
+++ trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/META-INF/jboss-client.xml 2007-01-17 14:46:03 UTC (rev 1988)
@@ -33,7 +33,7 @@
@WebServiceRef
-->
<service-ref>
- <service-ref-name>org.jboss.test.ws.jaxws.webserviceref.ApplicationClient/service4</service-ref-name>
+ <service-ref-name>org.jboss.test.ws.jaxws.webserviceref.TestEndpointClient/service4</service-ref-name>
<wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
</service-ref>
@@ -49,7 +49,7 @@
@WebServiceRef
-->
<service-ref>
- <service-ref-name>org.jboss.test.ws.jaxws.webserviceref.ApplicationClient/serviceSetter6</service-ref-name>
+ <service-ref-name>org.jboss.test.ws.jaxws.webserviceref.TestEndpointClient/serviceSetter6</service-ref-name>
<wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
</service-ref>
@@ -73,8 +73,24 @@
@WebServiceRef(value = TestEndpointService.class)
-->
<service-ref>
- <service-ref-name>org.jboss.test.ws.jaxws.webserviceref.ApplicationClient/port3</service-ref-name>
+ <service-ref-name>org.jboss.test.ws.jaxws.webserviceref.TestEndpointClient/port3</service-ref-name>
<wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
</service-ref>
+ <!--
+ @WebServiceRef
+ -->
+ <service-ref>
+ <service-ref-name>org.jboss.test.ws.jaxws.webserviceref.TestEndpointClient/port4</service-ref-name>
+ <wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
+ </service-ref>
+
+ <!--
+ @WebServiceRef(name = "Port5")
+ -->
+ <service-ref>
+ <service-ref-name>Port5</service-ref-name>
+ <wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
+ </service-ref>
+
</jboss-client>
\ No newline at end of file
Modified: trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/META-INF/wsdl/TestEndpoint.wsdl
===================================================================
--- trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/META-INF/wsdl/TestEndpoint.wsdl 2007-01-16 15:32:38 UTC (rev 1987)
+++ trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/META-INF/wsdl/TestEndpoint.wsdl 2007-01-17 14:46:03 UTC (rev 1988)
@@ -2,49 +2,38 @@
wsimport -d ../../../java -keep -p org.jboss.test.ws.jaxws.webserviceref META-INF/wsdl/TestEndpoint.wsdl
-->
<definitions name='TestEndpointService' targetNamespace='http://org.jboss.ws/wsref' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://org.jboss.ws/wsref' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
- <types>
- <xs:schema targetNamespace='http://org.jboss.ws/wsref' version='1.0' xmlns:tns='http://org.jboss.ws/wsref' xmlns:xs='http://www.w3.org/2001/XMLSchema'>
- <xs:element name='echo' type='tns:echo'/>
- <xs:element name='echoResponse' type='tns:echoResponse'/>
- <xs:complexType name='echo'>
- <xs:sequence>
- <xs:element form='qualified' minOccurs='0' name='arg0' type='xs:string'/>
- </xs:sequence>
- </xs:complexType>
- <xs:complexType name='echoResponse'>
- <xs:sequence>
- <xs:element form='qualified' minOccurs='0' name='return' type='xs:string'/>
- </xs:sequence>
- </xs:complexType>
- </xs:schema>
- </types>
+
<message name='TestEndpoint_echo'>
- <part element='tns:echo' name='echo'/>
+ <part name='arg0' type='xsd:string'/>
</message>
<message name='TestEndpoint_echoResponse'>
- <part element='tns:echoResponse' name='echoResponse'/>
+ <part name='return' type='xsd:string'/>
</message>
+
<portType name='TestEndpoint'>
- <operation name='echo' parameterOrder='echo'>
+ <operation name='echo' parameterOrder='arg0'>
<input message='tns:TestEndpoint_echo'/>
<output message='tns:TestEndpoint_echoResponse'/>
</operation>
</portType>
+
<binding name='TestEndpointBinding' type='tns:TestEndpoint'>
- <soap:binding style='document' transport='http://schemas.xmlsoap.org/soap/http'/>
+ <soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>
<operation name='echo'>
<soap:operation soapAction=''/>
<input>
- <soap:body use='literal'/>
+ <soap:body namespace='http://org.jboss.ws/wsref' use='literal'/>
</input>
<output>
- <soap:body use='literal'/>
+ <soap:body namespace='http://org.jboss.ws/wsref' use='literal'/>
</output>
</operation>
</binding>
+
<service name='TestEndpointService'>
<port binding='tns:TestEndpointBinding' name='TestEndpointPort'>
- <soap:address location='http://@jbosstest.host.name@:8080/jaxws-webserviceref/TestEndpoint'/>
+ <soap:address location='http://@jbosstest.host.name@:8080/jaxws-webserviceref'/>
</port>
</service>
-</definitions>
\ No newline at end of file
+
+</definitions>
Added: trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/META-INF-secure/application-client.xml
===================================================================
--- trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/META-INF-secure/application-client.xml (rev 0)
+++ trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/META-INF-secure/application-client.xml 2007-01-17 14:46:03 UTC (rev 1988)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<application-client version="5" xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application-client_5.xsd">
+
+ <display-name>TestEndpointService</display-name>
+
+</application-client>
Property changes on: trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/META-INF-secure/application-client.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/META-INF-secure/jboss-client.xml
===================================================================
--- trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/META-INF-secure/jboss-client.xml (rev 0)
+++ trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/META-INF-secure/jboss-client.xml 2007-01-17 14:46:03 UTC (rev 1988)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE jboss-client PUBLIC "-//JBoss//DTD Application Client 5.0//EN" "http://www.jboss.org/j2ee/dtd/jboss-client_5_0.dtd">
+
+<jboss-client>
+ <jndi-name>jbossws-client</jndi-name>
+
+ <service-ref>
+ <service-ref-name>SecureService1</service-ref-name>
+ <wsdl-override>http://@jbosstest.host.name@:8080/jaxws-webserviceref-secure/SecureEndpoint?wsdl</wsdl-override>
+ </service-ref>
+
+ <service-ref>
+ <service-ref-name>SecureService2</service-ref-name>
+ <wsdl-override>http://@jbosstest.host.name@:8080/jaxws-webserviceref-secure/SecureEndpoint?wsdl</wsdl-override>
+ </service-ref>
+
+ <service-ref>
+ <service-ref-name>SecurePort1</service-ref-name>
+ <wsdl-override>http://@jbosstest.host.name@:8080/jaxws-webserviceref-secure/SecureEndpoint?wsdl</wsdl-override>
+ </service-ref>
+
+</jboss-client>
\ No newline at end of file
Property changes on: trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/META-INF-secure/jboss-client.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
[View Less]
18 years
JBossWS SVN: r1987 - in trunk: jbossws-core/src/main/java/org/jboss/ws/core/soap and 5 other directories.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-01-16 10:32:38 -0500 (Tue, 16 Jan 2007)
New Revision: 1987
Added:
trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/EnvelopeBuilder.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/EnvelopeBuilderDOM.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/EnvelopeBuilderPayload.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/EnvelopeBuilderStax.java
Removed:
trunk/jbossws-core/src/main/java/org/…
[View More]jboss/ws/core/soap/JAXWSPayloadBuilder.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/PayloadBuilder.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/SAAJPayloadBuilderDOM.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/SAAJPayloadBuilderStax.java
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/MessageFactoryImpl.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPMessageUnMarshaller.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPPartImpl.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/JBossWSTest.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/common/soap/MessageFactoryTestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/oneway/JSR181OneWayTestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/webmethod/JSR181WebMethodTestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/provider/ProviderPayloadTestCase.java
Log:
Fix SOAPPart.setContent
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java 2007-01-16 15:17:51 UTC (rev 1986)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java 2007-01-16 15:32:38 UTC (rev 1987)
@@ -298,6 +298,7 @@
SOAPBodyImpl soapBody = (SOAPBodyImpl)resMsg.getSOAPBody();
SOAPElement soapElement = (SOAPElement)soapBody.getChildElements().next();
+ log.debug("JAXB unmarshal: " + DOMWriter.printNode(soapElement, false));
Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
retObj = unmarshaller.unmarshal(soapElement);
}
@@ -308,7 +309,7 @@
}
catch (Exception ex)
{
- throw new WebServiceException("Cannot create request message", ex);
+ throw new WebServiceException("Cannot process response message", ex);
}
return retObj;
}
Copied: trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/EnvelopeBuilder.java (from rev 1978, trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/PayloadBuilder.java)
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/PayloadBuilder.java 2007-01-16 07:52:19 UTC (rev 1978)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/EnvelopeBuilder.java 2007-01-16 15:32:38 UTC (rev 1987)
@@ -0,0 +1,41 @@
+/*
+ * 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.core.soap;
+
+// $Id$
+
+import java.io.IOException;
+import java.io.InputStream;
+
+import javax.xml.soap.SOAPEnvelope;
+import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPMessage;
+
+/**
+ * @author Heiko Braun, <heiko.braun(a)jboss.com>
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 19-Apr-2006
+ */
+public interface EnvelopeBuilder
+{
+ SOAPEnvelope build(SOAPMessage soapMessage, InputStream in, boolean ignoreParseError) throws IOException, SOAPException;
+}
Copied: trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/EnvelopeBuilderDOM.java (from rev 1978, trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/SAAJPayloadBuilderDOM.java)
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/SAAJPayloadBuilderDOM.java 2007-01-16 07:52:19 UTC (rev 1978)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/EnvelopeBuilderDOM.java 2007-01-16 15:32:38 UTC (rev 1987)
@@ -0,0 +1,277 @@
+/*
+ * 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.core.soap;
+
+//$Id$
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Iterator;
+
+import javax.xml.namespace.QName;
+import javax.xml.soap.Detail;
+import javax.xml.soap.Name;
+import javax.xml.soap.SOAPBody;
+import javax.xml.soap.SOAPElement;
+import javax.xml.soap.SOAPEnvelope;
+import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPHeader;
+import javax.xml.soap.SOAPMessage;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.jaxrpc.Style;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.jboss.ws.core.utils.DOMWriter;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+/**
+ * A SOAPEnvelope builder for JAXRPC based on DOM
+ *
+ * @author Heiko Braun, <heiko.braun(a)jboss.com>
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 19-Apr-2006
+ */
+public class EnvelopeBuilderDOM implements EnvelopeBuilder
+{
+ // provide logging
+ private static Logger log = Logger.getLogger(EnvelopeBuilderDOM.class);
+
+ private Style style = Style.DOCUMENT;
+
+ public EnvelopeBuilderDOM(Style style)
+ {
+ this.style = style;
+ }
+
+ public SOAPEnvelope build(SOAPMessage soapMessage, InputStream ins, boolean ignoreParseError) throws IOException, SOAPException
+ {
+ // Parse the XML input stream
+ Element domEnv = null;
+ try
+ {
+ domEnv = DOMUtils.parse(ins);
+ }
+ catch (IOException ex)
+ {
+ if (ignoreParseError)
+ {
+ return null;
+ }
+ throw ex;
+ }
+
+ return build(soapMessage, domEnv);
+ }
+
+ public SOAPEnvelope build(SOAPMessage soapMessage, Element domEnv) throws SOAPException
+ {
+ String envNS = domEnv.getNamespaceURI();
+ String envPrefix = domEnv.getPrefix();
+
+ // Construct the envelope
+ SOAPFactoryImpl soapFactory = new SOAPFactoryImpl();
+ SOAPPartImpl soapPart = (SOAPPartImpl)soapMessage.getSOAPPart();
+ SOAPEnvelopeImpl soapEnv = new SOAPEnvelopeImpl(soapPart, soapFactory.createElement(domEnv, false));
+
+ DOMUtils.copyAttributes(soapEnv, domEnv);
+
+ // Add the header elements
+ Element domHeader = DOMUtils.getFirstChildElement(domEnv, new QName(envNS, "Header"));
+ if (domHeader != null)
+ {
+ SOAPHeader soapHeader = soapEnv.getHeader();
+
+ DOMUtils.copyAttributes(soapHeader, domHeader);
+
+ Iterator it = DOMUtils.getChildElements(domHeader);
+ while (it.hasNext())
+ {
+ Element srcElement = (Element)it.next();
+ //registerNamespacesLocally(srcElement);
+ String xmlFragment = DOMWriter.printNode(srcElement, false);
+
+ Name name = new NameImpl(srcElement.getLocalName(), srcElement.getPrefix(), srcElement.getNamespaceURI());
+ SOAPContentElement destElement = new SOAPHeaderElementImpl(name);
+ soapHeader.addChildElement(destElement);
+
+ DOMUtils.copyAttributes(destElement, srcElement);
+ destElement.setXMLFragment(xmlFragment);
+ }
+ }
+
+ // Add the body elements
+ Element domBody = DOMUtils.getFirstChildElement(domEnv, new QName(envNS, "Body"));
+ SOAPBody soapBody = soapEnv.getBody();
+
+ DOMUtils.copyAttributes(soapBody, domBody);
+
+ Iterator itBody = DOMUtils.getChildElements(domBody);
+ if (itBody.hasNext())
+ {
+ Element domBodyElement = (Element)itBody.next();
+
+ String localName = domBodyElement.getLocalName();
+ String prefix = domBodyElement.getPrefix();
+ String nsURI = domBodyElement.getNamespaceURI();
+ Name beName = new NameImpl(localName, prefix, nsURI);
+
+ // Process a <env:Fault> message
+ if (beName.equals(new NameImpl("Fault", envPrefix, envNS)))
+ {
+ SOAPFaultImpl soapFault = new SOAPFaultImpl(envPrefix, envNS);
+ soapBody.addChildElement(soapFault);
+
+ DOMUtils.copyAttributes(soapFault, domBodyElement);
+
+ Element domFaultCode = DOMUtils.getFirstChildElement(domBodyElement, new QName("faultcode"));
+ if (domFaultCode == null)
+ throw new SOAPException("SOAPFault does not contain a <faultcode> element");
+
+ Element domFaultString = DOMUtils.getFirstChildElement(domBodyElement, new QName("faultstring"));
+ if (domFaultString == null)
+ throw new SOAPException("SOAPFault does not contain a <faultstring> element");
+
+ String faultCode = DOMUtils.getTextContent(domFaultCode);
+ soapFault.setFaultCode(faultCode);
+
+ String faultString = DOMUtils.getTextContent(domFaultString);
+ soapFault.setFaultString(faultString);
+
+ Element domFaultActor = DOMUtils.getFirstChildElement(domBodyElement, new QName("faultactor"));
+ if (domFaultActor != null)
+ {
+ String faultActor = DOMUtils.getTextContent(domFaultActor);
+ soapFault.setFaultActor(faultActor);
+ }
+
+ // Add the fault detail
+ Element domFaultDetail = DOMUtils.getFirstChildElement(domBodyElement, "detail");
+ if (domFaultDetail != null)
+ {
+ Detail detail = soapFault.addDetail();
+ Iterator it = DOMUtils.getChildElements(domFaultDetail);
+ while (it.hasNext())
+ {
+ Element domElement = (Element)it.next();
+ SOAPElement detailEntry = new DetailEntryImpl(soapFactory.createElement(domElement));
+ detailEntry = detail.addChildElement(detailEntry);
+ }
+ }
+ }
+
+ // Process and RPC or DOCUMENT style message
+ else
+ {
+
+ if (style == Style.RPC)
+ {
+ SOAPBodyElementRpc soapBodyElement = new SOAPBodyElementRpc(beName);
+ soapBodyElement = (SOAPBodyElementRpc)soapBody.addChildElement(soapBodyElement);
+
+ DOMUtils.copyAttributes(soapBodyElement, domBodyElement);
+
+ Iterator itBodyElement = DOMUtils.getChildElements(domBodyElement);
+ while (itBodyElement.hasNext())
+ {
+ Element srcElement = (Element)itBodyElement.next();
+ registerNamespacesLocally(srcElement);
+
+ Name name = new NameImpl(srcElement.getLocalName(), srcElement.getPrefix(), srcElement.getNamespaceURI());
+ SOAPContentElement destElement = new SOAPContentElement(name);
+ destElement = (SOAPContentElement)soapBodyElement.addChildElement(destElement);
+
+ DOMUtils.copyAttributes(destElement, srcElement);
+
+ String xmlFragment = DOMWriter.printNode(srcElement, false);
+ destElement.setXMLFragment(xmlFragment);
+ }
+ }
+ else if (style == Style.DOCUMENT)
+ {
+ Element srcElement = (Element)domBodyElement;
+ registerNamespacesLocally(srcElement);
+ SOAPContentElement destElement = new SOAPBodyElementDoc(beName);
+ destElement = (SOAPContentElement)soapBody.addChildElement(destElement);
+
+ DOMUtils.copyAttributes(destElement, srcElement);
+
+ String xmlFragment = DOMWriter.printNode(srcElement, false);
+ destElement.setXMLFragment(xmlFragment);
+ }
+ else if (style == null)
+ {
+ SOAPBodyElementMessage soapBodyElement = new SOAPBodyElementMessage(beName);
+ soapBodyElement = (SOAPBodyElementMessage)soapBody.addChildElement(soapBodyElement);
+
+ DOMUtils.copyAttributes(soapBodyElement, domBodyElement);
+
+ NodeList nlist = domBodyElement.getChildNodes();
+ for (int i = 0; i < nlist.getLength(); i++)
+ {
+ org.w3c.dom.Node child = nlist.item(i);
+ short childType = child.getNodeType();
+ if (childType == org.w3c.dom.Node.ELEMENT_NODE)
+ {
+ SOAPElement soapElement = soapFactory.createElement((Element)child);
+ soapBodyElement.addChildElement(soapElement);
+ }
+ else if (childType == org.w3c.dom.Node.TEXT_NODE)
+ {
+ String nodeValue = child.getNodeValue();
+ soapBodyElement.addTextNode(nodeValue);
+ }
+ else if (childType == org.w3c.dom.Node.CDATA_SECTION_NODE)
+ {
+ String nodeValue = child.getNodeValue();
+ soapBodyElement.addTextNode(nodeValue);
+ }
+ else
+ {
+ log.warn("Ignore child type: " + childType);
+ }
+ }
+ }
+ else
+ {
+ throw new WSException("Unsupported message style: " + style);
+ }
+ }
+ }
+
+ return soapEnv;
+ }
+
+ /**
+ * Register globally available namespaces on element level.
+ * This is necessary to ensure that each xml fragment is valid.
+ */
+ private void registerNamespacesLocally(Element srcElement) {
+ if(srcElement.getPrefix()== null)
+ {
+ srcElement.setAttribute("xmlns", srcElement.getNamespaceURI());
+ }
+ else
+ {
+ srcElement.setAttribute("xmlns:"+srcElement.getPrefix(), srcElement.getNamespaceURI());
+ }
+ }
+}
Copied: trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/EnvelopeBuilderPayload.java (from rev 1978, trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/JAXWSPayloadBuilder.java)
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/JAXWSPayloadBuilder.java 2007-01-16 07:52:19 UTC (rev 1978)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/EnvelopeBuilderPayload.java 2007-01-16 15:32:38 UTC (rev 1987)
@@ -0,0 +1,114 @@
+/*
+ * 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.core.soap;
+
+//$Id$
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Iterator;
+
+import javax.xml.namespace.QName;
+import javax.xml.soap.Name;
+import javax.xml.soap.SOAPEnvelope;
+import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPHeader;
+import javax.xml.soap.SOAPMessage;
+import javax.xml.transform.dom.DOMSource;
+
+import org.jboss.ws.core.utils.DOMUtils;
+import org.jboss.ws.core.utils.DOMWriter;
+import org.w3c.dom.Element;
+
+/**
+ * A SOAPEnvelope builder for JAXWS in service mode PAYLOAD
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 30-Jun-2006
+ */
+public class EnvelopeBuilderPayload implements EnvelopeBuilder
+{
+ public SOAPEnvelope build(SOAPMessage soapMessage, InputStream ins, boolean ignoreParseError) throws IOException, SOAPException
+ {
+ // Parse the XML input stream
+ Element domEnv = null;
+ try
+ {
+ domEnv = DOMUtils.parse(ins);
+ }
+ catch (IOException ex)
+ {
+ if (ignoreParseError)
+ {
+ return null;
+ }
+ throw ex;
+ }
+
+ String envNS = domEnv.getNamespaceURI();
+
+ // Construct the envelope
+ SOAPFactoryImpl soapFactory = new SOAPFactoryImpl();
+ SOAPPartImpl soapPart = (SOAPPartImpl)soapMessage.getSOAPPart();
+ SOAPEnvelopeImpl soapEnv = new SOAPEnvelopeImpl(soapPart, soapFactory.createElement(domEnv, false));
+
+ DOMUtils.copyAttributes(soapEnv, domEnv);
+
+ // Add the header elements
+ Element domHeader = DOMUtils.getFirstChildElement(domEnv, new QName(envNS, "Header"));
+ if (domHeader != null)
+ {
+ SOAPHeader soapHeader = soapEnv.getHeader();
+
+ DOMUtils.copyAttributes(soapHeader, domHeader);
+
+ Iterator it = DOMUtils.getChildElements(domHeader);
+ while (it.hasNext())
+ {
+ Element srcElement = (Element)it.next();
+ String xmlFragment = DOMWriter.printNode(srcElement, false);
+
+ Name name = new NameImpl(srcElement.getLocalName(), srcElement.getPrefix(), srcElement.getNamespaceURI());
+ SOAPContentElement destElement = new SOAPHeaderElementImpl(name);
+ soapHeader.addChildElement(destElement);
+
+ DOMUtils.copyAttributes(destElement, srcElement);
+ destElement.setXMLFragment(xmlFragment);
+ }
+ }
+
+ // Add the body elements
+ Element domBody = DOMUtils.getFirstChildElement(domEnv, new QName(envNS, "Body"));
+ SOAPBodyImpl soapBody = (SOAPBodyImpl)soapEnv.getBody();
+
+ DOMUtils.copyAttributes(soapBody, domBody);
+
+ Iterator itBody = DOMUtils.getChildElements(domBody);
+ if (itBody.hasNext())
+ {
+ Element domBodyElement = (Element)itBody.next();
+ soapBody.setPayload(new DOMSource(domBodyElement));
+ }
+
+ return soapEnv;
+ }
+}
Copied: trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/EnvelopeBuilderStax.java (from rev 1978, trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/SAAJPayloadBuilderStax.java)
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/SAAJPayloadBuilderStax.java 2007-01-16 07:52:19 UTC (rev 1978)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/EnvelopeBuilderStax.java 2007-01-16 15:32:38 UTC (rev 1987)
@@ -0,0 +1,465 @@
+/*
+ * 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.core.soap;
+
+// $Id$
+
+import java.io.IOException;
+import java.io.InputStream;
+
+import javax.xml.namespace.QName;
+import javax.xml.soap.Name;
+import javax.xml.soap.SOAPBody;
+import javax.xml.soap.SOAPEnvelope;
+import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPFault;
+import javax.xml.soap.SOAPHeader;
+import javax.xml.soap.SOAPMessage;
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import org.w3c.dom.Element;
+
+import com.ctc.wstx.stax.WstxInputFactory;
+
+/**
+ * A SOAPEnvelope builder for JAXRPC based on Stax
+ *
+ * @author Heiko Braun, <heiko.braun(a)jboss.com>
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 15-Apr-2006
+ */
+public class EnvelopeBuilderStax implements EnvelopeBuilder
+{
+ private static final String END_ELEMENT_BRACKET = "</";
+ private static final String EMPTY_STRING = "";
+ private static final String CLOSING_BRACKET = ">";
+ private static final String START_ELEMENT_BRACKET = "<";
+ private static final String HEADER_ELEMENT_NAME = "Header";
+ private static final String BODY_ELEMENT_NAME = "Body";
+ private static final String FAULT_ELEMENT_NAME = "Fault";
+
+ private static enum Part
+ {
+ ENVELOPE, HEADER, BODY, FAULT, RPC_PAYLOAD, DOC_PAYLOAD, BARE_PAYLOAD
+ }
+
+ private Part currentPart = Part.ENVELOPE;
+ private Part previousPart = null;
+
+ // saaj
+ private SOAPPartImpl soapPart;
+ private SOAPEnvelopeImpl soapEnv;
+
+ private StringBuffer fragmentBuffer;
+ private QName fragmentRootCursor = null;
+ private QName currentRootElement = null;
+ private XMLStreamReader reader;
+
+ private static XMLInputFactory factory;
+
+ public EnvelopeBuilderStax()
+ {
+ resetFragmentBuffer();
+ }
+
+ private void resetFragmentBuffer()
+ {
+ this.fragmentBuffer = new StringBuffer();
+ this.fragmentBuffer.ensureCapacity(2048);
+ }
+
+ public SOAPEnvelope build(SOAPMessage soapMessage, InputStream in, boolean ignoreParseError) throws IOException, SOAPException
+ {
+ try
+ {
+ reader = getFactoryInstance().createXMLStreamReader(in);
+ }
+ catch (XMLStreamException e)
+ {
+ throw new IOException("Failed to create stream reader:" + e.getMessage());
+ }
+
+ try
+ {
+ soapPart = (SOAPPartImpl)soapMessage.getSOAPPart();
+
+ while (reader.hasNext())
+ {
+
+ if (reader.isStartElement())
+ {
+ processStartElement();
+ }
+ else if (reader.isCharacters())
+ {
+ processCharacters();
+ }
+ else if (reader.isEndElement())
+ {
+ processEndElement();
+ }
+
+ reader.next();
+ }
+
+ }
+ catch (XMLStreamException e)
+ {
+ if (!ignoreParseError)
+ throw new IOException("Failed to parse stream: " + e.getMessage());
+ }
+ finally
+ {
+ try
+ {
+ if (reader != null)
+ reader.close();
+ }
+ catch (XMLStreamException e)
+ {
+ // ignore
+ }
+ }
+ return soapEnv;
+ }
+
+ private static synchronized XMLInputFactory getFactoryInstance()
+ {
+ if (null == factory)
+ {
+ System.setProperty("javax.xml.stream.XMLInputFactory", "com.ctc.wstx.stax.WstxInputFactory");
+ //System.setProperty("javax.xml.stream.XMLInputFactory", "com.sun.xml.stream.ZephyrParserFactory");
+ factory = XMLInputFactory.newInstance();
+ factory.setProperty(XMLInputFactory.IS_VALIDATING, Boolean.FALSE);
+ ((WstxInputFactory)factory).configureForSpeed();
+ }
+ return factory;
+
+ }
+
+ private void processCharacters() throws SOAPException
+ {
+ if (fragmentRootCursor != null)
+ consumeCharacters();
+ }
+
+ private void consumeCharacters() throws SOAPException
+ {
+
+ String text = normalize(reader.getText());
+
+ if (!atPartMargin() && !reader.isWhiteSpace())
+ {
+
+ fragmentBuffer.append(text);
+
+ if (Part.FAULT == currentPart)
+ {
+ String localName = currentRootElement.getLocalPart();
+ SOAPFault fault = soapEnv.getBody().getFault();
+ if ("faultcode".equalsIgnoreCase(localName))
+ fault.setFaultCode(text);
+ else if ("faultactor".equalsIgnoreCase(localName))
+ fault.setFaultActor(text);
+ else if ("faultstring".equalsIgnoreCase(localName))
+ fault.setFaultString(text);
+ }
+ }
+ }
+
+ private void processEndElement() throws SOAPException
+ {
+ if (fragmentRootCursor != null)
+ consumeEndElement();
+ }
+
+ private void consumeEndElement() throws SOAPException
+ {
+
+ QName qName = reader.getName();
+
+ fragmentBuffer.append(END_ELEMENT_BRACKET);
+ fragmentBuffer.append(getFQElementName(qName));
+ fragmentBuffer.append(CLOSING_BRACKET);
+
+ if (fragmentRootCursor != null && fragmentRootCursor.equals(qName))
+ {
+ flushBuffer();
+ fragmentRootCursor = null;
+ }
+ }
+
+ private void flushBuffer() throws SOAPException
+ {
+ if (Part.HEADER == currentPart)
+ {
+ SOAPHeader soapHeader = soapEnv.getHeader();
+ SOAPContentElement lastHeaderElement = (SOAPContentElement)soapHeader.getChildNodes().item(soapHeader.getChildNodes().getLength() - 1);
+
+ lastHeaderElement.setXMLFragment(fragmentBuffer.toString());
+ }
+ else if (Part.BODY == currentPart)
+ {
+ SOAPBody soapBody = soapEnv.getBody();
+ SOAPContentElement lastBodyElement = (SOAPContentElement)soapBody.getChildNodes().item(soapBody.getChildNodes().getLength() - 1);
+ lastBodyElement.setXMLFragment(fragmentBuffer.toString());
+ }
+ else if (Part.FAULT == currentPart)
+ {
+ SOAPBody soapBody = soapEnv.getBody();
+ SOAPContentElement faultElement = (SOAPContentElement)soapBody.getFault();
+ faultElement.setXMLFragment(fragmentBuffer.toString());
+ }
+
+ resetFragmentBuffer();
+ }
+
+ private void processStartElement() throws SOAPException
+ {
+
+ QName qName = reader.getName();
+ currentRootElement = qName;
+
+ // identify current envelope part
+ togglePartMargin(qName);
+
+ // toggle current element
+ Element destElement = null;
+ if (Part.ENVELOPE == currentPart)
+ {
+ // setup envelope impl
+ soapEnv = new SOAPEnvelopeImpl(soapPart, qName.getNamespaceURI());
+ destElement = soapEnv; // soapEnv becomes current
+ }
+ else if (Part.HEADER == currentPart)
+ {
+ if (atPartMargin())
+ {
+ // the env:Header element itself
+ SOAPHeader soapHeader = soapEnv.getHeader();
+ destElement = soapHeader; // header becomes current
+ previousPart = Part.HEADER;
+ }
+ else
+ {
+ // child element of env:Header
+ if (fragmentRootCursor == null)
+ {
+ Name name = new NameImpl(qName.getLocalPart(), qName.getPrefix(), qName.getNamespaceURI());
+ SOAPContentElement headerElement = new SOAPHeaderElementImpl(name);
+ soapEnv.getHeader().addChildElement(headerElement);
+
+ destElement = headerElement; // headerElement becomes current
+ fragmentRootCursor = qName;
+ }
+
+ consumeStartElement();
+ }
+ }
+ else if (Part.BODY == currentPart)
+ {
+
+ SOAPBody soapBody = soapEnv.getBody();
+
+ if (atPartMargin())
+ {
+ // the env:Body element
+ destElement = soapBody;
+ previousPart = Part.BODY;
+ }
+ else
+ {
+ // payload not fault
+ Name bodyElementName = new NameImpl(qName.getLocalPart(), qName.getPrefix(), qName.getNamespaceURI());
+
+ if (fragmentRootCursor == null)
+ {
+ SOAPBodyElementDoc docBodyElement = new SOAPBodyElementDoc(bodyElementName);
+ docBodyElement = (SOAPBodyElementDoc)soapBody.addChildElement(docBodyElement);
+
+ destElement = docBodyElement;
+ fragmentRootCursor = qName;
+ }
+
+ consumeStartElement();
+ }
+ }
+ else if (Part.FAULT == currentPart)
+ {
+ // payload is fault
+ if (atPartMargin())
+ {
+ SOAPBody soapBody = soapEnv.getBody();
+ SOAPFaultImpl soapFault = new SOAPFaultImpl(soapEnv.getPrefix(), soapEnv.getNamespaceURI());
+ soapBody.addChildElement(soapFault);
+ destElement = soapFault;
+ previousPart = Part.FAULT;
+ }
+
+ if (fragmentRootCursor == null)
+ {
+ fragmentRootCursor = qName;
+ }
+
+ consumeStartElement();
+ }
+
+ if (fragmentRootCursor == null) // constructing soap elements
+ {
+ copyAttributes(destElement);
+ }
+ }
+
+ private void togglePartMargin(QName qName)
+ {
+ // identify the current part
+ if (qName.getLocalPart().equalsIgnoreCase(HEADER_ELEMENT_NAME))
+ {
+ previousPart = currentPart;
+ currentPart = Part.HEADER;
+ }
+ else if (qName.getLocalPart().equalsIgnoreCase(BODY_ELEMENT_NAME))
+ {
+ previousPart = currentPart;
+ currentPart = Part.BODY;
+ }
+ else if (qName.getLocalPart().equalsIgnoreCase(FAULT_ELEMENT_NAME))
+ {
+ previousPart = currentPart;
+ currentPart = Part.FAULT;
+ }
+ }
+
+ private void consumeStartElement()
+ {
+
+ QName qName = reader.getName();
+
+ // element
+ fragmentBuffer.append(START_ELEMENT_BRACKET);
+ fragmentBuffer.append(getFQElementName(qName));
+
+ // local namespaces
+ for (int x = 0; x < reader.getNamespaceCount(); x++)
+ {
+ if (reader.getNamespacePrefix(x) != null)
+ {
+ fragmentBuffer.append(" xmlns:");
+ fragmentBuffer.append(reader.getNamespacePrefix(x)).append("='");
+ fragmentBuffer.append(reader.getNamespaceURI(x)).append("'");
+ }
+ else if (reader.getNamespaceURI(x) != null)
+ {
+ fragmentBuffer.append(" xmlns='");
+ fragmentBuffer.append(reader.getNamespaceURI(x)).append("'");
+ }
+ }
+
+ // attributes
+ if (reader.getAttributeCount() > 0)
+ {
+ for (int i = 0; i < reader.getAttributeCount(); i++)
+ {
+ QName attQName = reader.getAttributeName(i);
+ fragmentBuffer.append(" ").append(getFQElementName(attQName));
+ fragmentBuffer.append("='").append(reader.getAttributeValue(i)).append("'");
+ }
+ }
+
+ fragmentBuffer.append(CLOSING_BRACKET);
+ }
+
+ private String getFQElementName(QName qName)
+ {
+ return !qName.getPrefix().equals(EMPTY_STRING) ? qName.getPrefix() + ":" + qName.getLocalPart() : qName.getLocalPart();
+ }
+
+ private void copyAttributes(Element destElement)
+ {
+
+ if (reader.getAttributeCount() == 0)
+ return;
+
+ for (int i = 0; i < reader.getAttributeCount(); i++)
+ {
+ destElement.setAttributeNS(reader.getAttributeNamespace(i), reader.getAttributeLocalName(i), reader.getAttributeValue(i));
+ }
+ }
+
+ private boolean atPartMargin()
+ {
+ return previousPart != currentPart;
+ }
+
+ private static String normalize(String valueStr)
+ {
+ // We assume most strings will not contain characters that need "escaping",
+ // and optimize for this case.
+ boolean found = false;
+ int i = 0;
+
+ outer: for (; i < valueStr.length(); i++)
+ {
+ switch (valueStr.charAt(i))
+ {
+ case '<':
+ case '>':
+ case '&':
+ case '"':
+ found = true;
+ break outer;
+ }
+ }
+
+ if (!found)
+ return valueStr;
+
+ // Resume where we left off
+ StringBuilder builder = new StringBuilder();
+ builder.append(valueStr.substring(0, i));
+ for (; i < valueStr.length(); i++)
+ {
+ char c = valueStr.charAt(i);
+ switch (c)
+ {
+ case '<':
+ builder.append("<");
+ break;
+ case '>':
+ builder.append(">");
+ break;
+ case '&':
+ builder.append("&");
+ break;
+ case '"':
+ builder.append(""");
+ break;
+ default:
+ builder.append(c);
+ }
+ }
+
+ return builder.toString();
+ }
+}
Deleted: trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/JAXWSPayloadBuilder.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/JAXWSPayloadBuilder.java 2007-01-16 15:17:51 UTC (rev 1986)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/JAXWSPayloadBuilder.java 2007-01-16 15:32:38 UTC (rev 1987)
@@ -1,110 +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.ws.core.soap;
-
-//$Id$
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Iterator;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.Name;
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPHeader;
-import javax.xml.transform.dom.DOMSource;
-
-import org.jboss.ws.core.utils.DOMUtils;
-import org.jboss.ws.core.utils.DOMWriter;
-import org.w3c.dom.Element;
-
-/**
- * A SOAPEnvelope builder for JAXWS in service mode PAYLOAD
- *
- * @author Thomas.Diesler(a)jboss.com
- * @since 30-Jun-2006
- */
-public class JAXWSPayloadBuilder implements PayloadBuilder
-{
- public void build(SOAPMessageImpl soapMessage, InputStream ins, boolean ignoreParseError) throws IOException, SOAPException
- {
- // Parse the XML input stream
- Element domEnv = null;
- try
- {
- domEnv = DOMUtils.parse(ins);
- }
- catch (IOException ex)
- {
- if (ignoreParseError)
- {
- return;
- }
- throw ex;
- }
-
- String envNS = domEnv.getNamespaceURI();
-
- // Construct the envelope
- SOAPFactoryImpl soapFactory = new SOAPFactoryImpl();
- SOAPPartImpl soapPart = (SOAPPartImpl)soapMessage.getSOAPPart();
- SOAPEnvelopeImpl soapEnv = new SOAPEnvelopeImpl(soapPart, soapFactory.createElement(domEnv, false));
-
- DOMUtils.copyAttributes(soapEnv, domEnv);
-
- // Add the header elements
- Element domHeader = DOMUtils.getFirstChildElement(domEnv, new QName(envNS, "Header"));
- if (domHeader != null)
- {
- SOAPHeader soapHeader = soapEnv.getHeader();
-
- DOMUtils.copyAttributes(soapHeader, domHeader);
-
- Iterator it = DOMUtils.getChildElements(domHeader);
- while (it.hasNext())
- {
- Element srcElement = (Element)it.next();
- String xmlFragment = DOMWriter.printNode(srcElement, false);
-
- Name name = new NameImpl(srcElement.getLocalName(), srcElement.getPrefix(), srcElement.getNamespaceURI());
- SOAPContentElement destElement = new SOAPHeaderElementImpl(name);
- soapHeader.addChildElement(destElement);
-
- DOMUtils.copyAttributes(destElement, srcElement);
- destElement.setXMLFragment(xmlFragment);
- }
- }
-
- // Add the body elements
- Element domBody = DOMUtils.getFirstChildElement(domEnv, new QName(envNS, "Body"));
- SOAPBodyImpl soapBody = (SOAPBodyImpl)soapEnv.getBody();
-
- DOMUtils.copyAttributes(soapBody, domBody);
-
- Iterator itBody = DOMUtils.getChildElements(domBody);
- if (itBody.hasNext())
- {
- Element domBodyElement = (Element)itBody.next();
- soapBody.setPayload(new DOMSource(domBodyElement));
- }
- }
-}
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/MessageFactoryImpl.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/MessageFactoryImpl.java 2007-01-16 15:17:51 UTC (rev 1986)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/MessageFactoryImpl.java 2007-01-16 15:32:38 UTC (rev 1987)
@@ -37,8 +37,10 @@
import javax.xml.soap.MimeHeader;
import javax.xml.soap.MimeHeaders;
import javax.xml.soap.SOAPConstants;
+import javax.xml.soap.SOAPEnvelope;
import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPMessage;
+import javax.xml.transform.dom.DOMSource;
import javax.xml.ws.Service.Mode;
import org.jboss.logging.Logger;
@@ -46,7 +48,9 @@
import org.jboss.ws.core.jaxrpc.Style;
import org.jboss.ws.core.soap.attachment.MimeConstants;
import org.jboss.ws.core.soap.attachment.MultipartRelatedDecoder;
+import org.jboss.ws.core.utils.DOMUtils;
import org.jboss.ws.core.utils.IOUtils;
+import org.w3c.dom.Element;
/**
* MessageFactory implementation
@@ -168,10 +172,10 @@
*/
public SOAPMessage createMessage(MimeHeaders mimeHeaders, InputStream ins) throws IOException, SOAPException
{
- return createMessageInternal(mimeHeaders, ins, false);
+ return createMessage(mimeHeaders, ins, false);
}
- public SOAPMessage createMessageInternal(MimeHeaders mimeHeaders, InputStream ins, boolean ignoreParseError) throws IOException, SOAPException
+ public SOAPMessage createMessage(MimeHeaders mimeHeaders, InputStream ins, boolean ignoreParseError) throws IOException, SOAPException
{
if (mimeHeaders == null)
{
@@ -239,19 +243,18 @@
soapMessage.setAttachments(attachments);
// Get the SOAPEnvelope builder
- PayloadBuilder payloadBuilder;
+ EnvelopeBuilder envBuilder;
if (serviceMode == Mode.PAYLOAD)
{
- payloadBuilder = new JAXWSPayloadBuilder();
+ envBuilder = new EnvelopeBuilderPayload();
}
else
{
- SAAJPayloadBuilderDOM jaxrpcBuilder = new SAAJPayloadBuilderDOM(getStyle());
- payloadBuilder = jaxrpcBuilder;
+ envBuilder = new EnvelopeBuilderDOM(getStyle());
}
// Build the payload
- payloadBuilder.build(soapMessage, ins, ignoreParseError);
+ envBuilder.build(soapMessage, ins, ignoreParseError);
return soapMessage;
}
Deleted: trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/PayloadBuilder.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/PayloadBuilder.java 2007-01-16 15:17:51 UTC (rev 1986)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/PayloadBuilder.java 2007-01-16 15:32:38 UTC (rev 1987)
@@ -1,39 +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.ws.core.soap;
-
-// $Id$
-
-import java.io.IOException;
-import java.io.InputStream;
-
-import javax.xml.soap.SOAPException;
-
-/**
- * @author Heiko Braun, <heiko.braun(a)jboss.com>
- * @author Thomas.Diesler(a)jboss.com
- * @since 19-Apr-2006
- */
-public interface PayloadBuilder
-{
- void build(SOAPMessageImpl soapMessage, InputStream in, boolean ignoreParseError) throws IOException, SOAPException;
-}
Deleted: trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/SAAJPayloadBuilderDOM.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/SAAJPayloadBuilderDOM.java 2007-01-16 15:17:51 UTC (rev 1986)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/SAAJPayloadBuilderDOM.java 2007-01-16 15:32:38 UTC (rev 1987)
@@ -1,268 +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.ws.core.soap;
-
-//$Id$
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Iterator;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.Detail;
-import javax.xml.soap.Name;
-import javax.xml.soap.SOAPBody;
-import javax.xml.soap.SOAPElement;
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPHeader;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.WSException;
-import org.jboss.ws.core.jaxrpc.Style;
-import org.jboss.ws.core.utils.DOMUtils;
-import org.jboss.ws.core.utils.DOMWriter;
-import org.w3c.dom.Element;
-import org.w3c.dom.NodeList;
-/**
- * A SOAPEnvelope builder for JAXRPC based on DOM
- *
- * @author Heiko Braun, <heiko.braun(a)jboss.com>
- * @author Thomas.Diesler(a)jboss.com
- * @since 19-Apr-2006
- */
-public class SAAJPayloadBuilderDOM implements PayloadBuilder
-{
- // provide logging
- private static Logger log = Logger.getLogger(SAAJPayloadBuilderDOM.class);
-
- private Style style = Style.DOCUMENT;
-
- public SAAJPayloadBuilderDOM(Style style)
- {
- this.style = style;
- }
-
- public void build(SOAPMessageImpl soapMessage, InputStream ins, boolean ignoreParseError) throws IOException, SOAPException
- {
- // Parse the XML input stream
- Element domEnv = null;
- try
- {
- domEnv = DOMUtils.parse(ins);
- }
- catch (IOException ex)
- {
- if (ignoreParseError)
- {
- return;
- }
- throw ex;
- }
-
- String envNS = domEnv.getNamespaceURI();
- String envPrefix = domEnv.getPrefix();
-
- // Construct the envelope
- SOAPFactoryImpl soapFactory = new SOAPFactoryImpl();
- SOAPPartImpl soapPart = (SOAPPartImpl)soapMessage.getSOAPPart();
- SOAPEnvelopeImpl soapEnv = new SOAPEnvelopeImpl(soapPart, soapFactory.createElement(domEnv, false));
-
- DOMUtils.copyAttributes(soapEnv, domEnv);
-
- // Add the header elements
- Element domHeader = DOMUtils.getFirstChildElement(domEnv, new QName(envNS, "Header"));
- if (domHeader != null)
- {
- SOAPHeader soapHeader = soapEnv.getHeader();
-
- DOMUtils.copyAttributes(soapHeader, domHeader);
-
- Iterator it = DOMUtils.getChildElements(domHeader);
- while (it.hasNext())
- {
- Element srcElement = (Element)it.next();
- //registerNamespacesLocally(srcElement);
- String xmlFragment = DOMWriter.printNode(srcElement, false);
-
- Name name = new NameImpl(srcElement.getLocalName(), srcElement.getPrefix(), srcElement.getNamespaceURI());
- SOAPContentElement destElement = new SOAPHeaderElementImpl(name);
- soapHeader.addChildElement(destElement);
-
- DOMUtils.copyAttributes(destElement, srcElement);
- destElement.setXMLFragment(xmlFragment);
- }
- }
-
- // Add the body elements
- Element domBody = DOMUtils.getFirstChildElement(domEnv, new QName(envNS, "Body"));
- SOAPBody soapBody = soapEnv.getBody();
-
- DOMUtils.copyAttributes(soapBody, domBody);
-
- Iterator itBody = DOMUtils.getChildElements(domBody);
- if (itBody.hasNext())
- {
- Element domBodyElement = (Element)itBody.next();
-
- String localName = domBodyElement.getLocalName();
- String prefix = domBodyElement.getPrefix();
- String nsURI = domBodyElement.getNamespaceURI();
- Name beName = new NameImpl(localName, prefix, nsURI);
-
- // Process a <env:Fault> message
- if (beName.equals(new NameImpl("Fault", envPrefix, envNS)))
- {
- SOAPFaultImpl soapFault = new SOAPFaultImpl(envPrefix, envNS);
- soapBody.addChildElement(soapFault);
-
- DOMUtils.copyAttributes(soapFault, domBodyElement);
-
- Element domFaultCode = DOMUtils.getFirstChildElement(domBodyElement, new QName("faultcode"));
- if (domFaultCode == null)
- throw new SOAPException("SOAPFault does not contain a <faultcode> element");
-
- Element domFaultString = DOMUtils.getFirstChildElement(domBodyElement, new QName("faultstring"));
- if (domFaultString == null)
- throw new SOAPException("SOAPFault does not contain a <faultstring> element");
-
- String faultCode = DOMUtils.getTextContent(domFaultCode);
- soapFault.setFaultCode(faultCode);
-
- String faultString = DOMUtils.getTextContent(domFaultString);
- soapFault.setFaultString(faultString);
-
- Element domFaultActor = DOMUtils.getFirstChildElement(domBodyElement, new QName("faultactor"));
- if (domFaultActor != null)
- {
- String faultActor = DOMUtils.getTextContent(domFaultActor);
- soapFault.setFaultActor(faultActor);
- }
-
- // Add the fault detail
- Element domFaultDetail = DOMUtils.getFirstChildElement(domBodyElement, "detail");
- if (domFaultDetail != null)
- {
- Detail detail = soapFault.addDetail();
- Iterator it = DOMUtils.getChildElements(domFaultDetail);
- while (it.hasNext())
- {
- Element domElement = (Element)it.next();
- SOAPElement detailEntry = new DetailEntryImpl(soapFactory.createElement(domElement));
- detailEntry = detail.addChildElement(detailEntry);
- }
- }
- }
-
- // Process and RPC or DOCUMENT style message
- else
- {
-
- if (style == Style.RPC)
- {
- SOAPBodyElementRpc soapBodyElement = new SOAPBodyElementRpc(beName);
- soapBodyElement = (SOAPBodyElementRpc)soapBody.addChildElement(soapBodyElement);
-
- DOMUtils.copyAttributes(soapBodyElement, domBodyElement);
-
- Iterator itBodyElement = DOMUtils.getChildElements(domBodyElement);
- while (itBodyElement.hasNext())
- {
- Element srcElement = (Element)itBodyElement.next();
- registerNamespacesLocally(srcElement);
-
- Name name = new NameImpl(srcElement.getLocalName(), srcElement.getPrefix(), srcElement.getNamespaceURI());
- SOAPContentElement destElement = new SOAPContentElement(name);
- destElement = (SOAPContentElement)soapBodyElement.addChildElement(destElement);
-
- DOMUtils.copyAttributes(destElement, srcElement);
-
- String xmlFragment = DOMWriter.printNode(srcElement, false);
- destElement.setXMLFragment(xmlFragment);
- }
- }
- else if (style == Style.DOCUMENT)
- {
- Element srcElement = (Element)domBodyElement;
- registerNamespacesLocally(srcElement);
- SOAPContentElement destElement = new SOAPBodyElementDoc(beName);
- destElement = (SOAPContentElement)soapBody.addChildElement(destElement);
-
- DOMUtils.copyAttributes(destElement, srcElement);
-
- String xmlFragment = DOMWriter.printNode(srcElement, false);
- destElement.setXMLFragment(xmlFragment);
- }
- else if (style == null)
- {
- SOAPBodyElementMessage soapBodyElement = new SOAPBodyElementMessage(beName);
- soapBodyElement = (SOAPBodyElementMessage)soapBody.addChildElement(soapBodyElement);
-
- DOMUtils.copyAttributes(soapBodyElement, domBodyElement);
-
- NodeList nlist = domBodyElement.getChildNodes();
- for (int i = 0; i < nlist.getLength(); i++)
- {
- org.w3c.dom.Node child = nlist.item(i);
- short childType = child.getNodeType();
- if (childType == org.w3c.dom.Node.ELEMENT_NODE)
- {
- SOAPElement soapElement = soapFactory.createElement((Element)child);
- soapBodyElement.addChildElement(soapElement);
- }
- else if (childType == org.w3c.dom.Node.TEXT_NODE)
- {
- String nodeValue = child.getNodeValue();
- soapBodyElement.addTextNode(nodeValue);
- }
- else if (childType == org.w3c.dom.Node.CDATA_SECTION_NODE)
- {
- String nodeValue = child.getNodeValue();
- soapBodyElement.addTextNode(nodeValue);
- }
- else
- {
- log.warn("Ignore child type: " + childType);
- }
- }
- }
- else
- {
- throw new WSException("Unsupported message style: " + style);
- }
- }
- }
- }
-
- /**
- * Register globally available namespaces on element level.
- * This is necessary to ensure that each xml fragment is valid.
- */
- private void registerNamespacesLocally(Element srcElement) {
- if(srcElement.getPrefix()== null)
- {
- srcElement.setAttribute("xmlns", srcElement.getNamespaceURI());
- }
- else
- {
- srcElement.setAttribute("xmlns:"+srcElement.getPrefix(), srcElement.getNamespaceURI());
- }
- }
-}
Deleted: trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/SAAJPayloadBuilderStax.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/SAAJPayloadBuilderStax.java 2007-01-16 15:17:51 UTC (rev 1986)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/SAAJPayloadBuilderStax.java 2007-01-16 15:32:38 UTC (rev 1987)
@@ -1,462 +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.ws.core.soap;
-
-// $Id$
-
-import java.io.IOException;
-import java.io.InputStream;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.Name;
-import javax.xml.soap.SOAPBody;
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPFault;
-import javax.xml.soap.SOAPHeader;
-import javax.xml.stream.XMLInputFactory;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-
-import org.w3c.dom.Element;
-
-import com.ctc.wstx.stax.WstxInputFactory;
-
-/**
- * A SOAPEnvelope builder for JAXRPC based on Stax
- *
- * @author Heiko Braun, <heiko.braun(a)jboss.com>
- * @author Thomas.Diesler(a)jboss.com
- * @since 15-Apr-2006
- */
-public class SAAJPayloadBuilderStax implements PayloadBuilder
-{
- private static final String END_ELEMENT_BRACKET = "</";
- private static final String EMPTY_STRING = "";
- private static final String CLOSING_BRACKET = ">";
- private static final String START_ELEMENT_BRACKET = "<";
- private static final String HEADER_ELEMENT_NAME = "Header";
- private static final String BODY_ELEMENT_NAME = "Body";
- private static final String FAULT_ELEMENT_NAME = "Fault";
-
- private static enum Part
- {
- ENVELOPE, HEADER, BODY, FAULT, RPC_PAYLOAD, DOC_PAYLOAD, BARE_PAYLOAD
- }
-
- private Part currentPart = Part.ENVELOPE;
- private Part previousPart = null;
-
- // saaj
- private SOAPPartImpl soapPart;
- private SOAPEnvelopeImpl soapEnv;
-
- private StringBuffer fragmentBuffer;
- private QName fragmentRootCursor = null;
- private QName currentRootElement = null;
- private XMLStreamReader reader;
-
- private static XMLInputFactory factory;
-
- public SAAJPayloadBuilderStax()
- {
- resetFragmentBuffer();
- }
-
- private void resetFragmentBuffer()
- {
- this.fragmentBuffer = new StringBuffer();
- this.fragmentBuffer.ensureCapacity(2048);
- }
-
- public void build(SOAPMessageImpl soapMessage, InputStream in, boolean ignoreParseError) throws IOException, SOAPException
- {
- try
- {
- reader = getFactoryInstance().createXMLStreamReader(in);
- }
- catch (XMLStreamException e)
- {
- throw new IOException("Failed to create stream reader:" + e.getMessage());
- }
-
- try
- {
- soapPart = (SOAPPartImpl)soapMessage.getSOAPPart();
-
- while (reader.hasNext())
- {
-
- if (reader.isStartElement())
- {
- processStartElement();
- }
- else if (reader.isCharacters())
- {
- processCharacters();
- }
- else if (reader.isEndElement())
- {
- processEndElement();
- }
-
- reader.next();
- }
-
- }
- catch (XMLStreamException e)
- {
- if (!ignoreParseError)
- throw new IOException("Failed to parse stream: " + e.getMessage());
- }
- finally
- {
- try
- {
- if (reader != null)
- reader.close();
- }
- catch (XMLStreamException e)
- {
- // ignore
- }
- }
- }
-
- private static synchronized XMLInputFactory getFactoryInstance()
- {
- if (null == factory)
- {
- System.setProperty("javax.xml.stream.XMLInputFactory", "com.ctc.wstx.stax.WstxInputFactory");
- //System.setProperty("javax.xml.stream.XMLInputFactory", "com.sun.xml.stream.ZephyrParserFactory");
- factory = XMLInputFactory.newInstance();
- factory.setProperty(XMLInputFactory.IS_VALIDATING, Boolean.FALSE);
- ((WstxInputFactory)factory).configureForSpeed();
- }
- return factory;
-
- }
-
- private void processCharacters() throws SOAPException
- {
- if (fragmentRootCursor != null)
- consumeCharacters();
- }
-
- private void consumeCharacters() throws SOAPException
- {
-
- String text = normalize(reader.getText());
-
- if (!atPartMargin() && !reader.isWhiteSpace())
- {
-
- fragmentBuffer.append(text);
-
- if (Part.FAULT == currentPart)
- {
- String localName = currentRootElement.getLocalPart();
- SOAPFault fault = soapEnv.getBody().getFault();
- if ("faultcode".equalsIgnoreCase(localName))
- fault.setFaultCode(text);
- else if ("faultactor".equalsIgnoreCase(localName))
- fault.setFaultActor(text);
- else if ("faultstring".equalsIgnoreCase(localName))
- fault.setFaultString(text);
- }
- }
- }
-
- private void processEndElement() throws SOAPException
- {
- if (fragmentRootCursor != null)
- consumeEndElement();
- }
-
- private void consumeEndElement() throws SOAPException
- {
-
- QName qName = reader.getName();
-
- fragmentBuffer.append(END_ELEMENT_BRACKET);
- fragmentBuffer.append(getFQElementName(qName));
- fragmentBuffer.append(CLOSING_BRACKET);
-
- if (fragmentRootCursor != null && fragmentRootCursor.equals(qName))
- {
- flushBuffer();
- fragmentRootCursor = null;
- }
- }
-
- private void flushBuffer() throws SOAPException
- {
- if (Part.HEADER == currentPart)
- {
- SOAPHeader soapHeader = soapEnv.getHeader();
- SOAPContentElement lastHeaderElement = (SOAPContentElement)soapHeader.getChildNodes().item(soapHeader.getChildNodes().getLength() - 1);
-
- lastHeaderElement.setXMLFragment(fragmentBuffer.toString());
- }
- else if (Part.BODY == currentPart)
- {
- SOAPBody soapBody = soapEnv.getBody();
- SOAPContentElement lastBodyElement = (SOAPContentElement)soapBody.getChildNodes().item(soapBody.getChildNodes().getLength() - 1);
- lastBodyElement.setXMLFragment(fragmentBuffer.toString());
- }
- else if (Part.FAULT == currentPart)
- {
- SOAPBody soapBody = soapEnv.getBody();
- SOAPContentElement faultElement = (SOAPContentElement)soapBody.getFault();
- faultElement.setXMLFragment(fragmentBuffer.toString());
- }
-
- resetFragmentBuffer();
- }
-
- private void processStartElement() throws SOAPException
- {
-
- QName qName = reader.getName();
- currentRootElement = qName;
-
- // identify current envelope part
- togglePartMargin(qName);
-
- // toggle current element
- Element destElement = null;
- if (Part.ENVELOPE == currentPart)
- {
- // setup envelope impl
- soapEnv = new SOAPEnvelopeImpl(soapPart, qName.getNamespaceURI());
- destElement = soapEnv; // soapEnv becomes current
- }
- else if (Part.HEADER == currentPart)
- {
- if (atPartMargin())
- {
- // the env:Header element itself
- SOAPHeader soapHeader = soapEnv.getHeader();
- destElement = soapHeader; // header becomes current
- previousPart = Part.HEADER;
- }
- else
- {
- // child element of env:Header
- if (fragmentRootCursor == null)
- {
- Name name = new NameImpl(qName.getLocalPart(), qName.getPrefix(), qName.getNamespaceURI());
- SOAPContentElement headerElement = new SOAPHeaderElementImpl(name);
- soapEnv.getHeader().addChildElement(headerElement);
-
- destElement = headerElement; // headerElement becomes current
- fragmentRootCursor = qName;
- }
-
- consumeStartElement();
- }
- }
- else if (Part.BODY == currentPart)
- {
-
- SOAPBody soapBody = soapEnv.getBody();
-
- if (atPartMargin())
- {
- // the env:Body element
- destElement = soapBody;
- previousPart = Part.BODY;
- }
- else
- {
- // payload not fault
- Name bodyElementName = new NameImpl(qName.getLocalPart(), qName.getPrefix(), qName.getNamespaceURI());
-
- if (fragmentRootCursor == null)
- {
- SOAPBodyElementDoc docBodyElement = new SOAPBodyElementDoc(bodyElementName);
- docBodyElement = (SOAPBodyElementDoc)soapBody.addChildElement(docBodyElement);
-
- destElement = docBodyElement;
- fragmentRootCursor = qName;
- }
-
- consumeStartElement();
- }
- }
- else if (Part.FAULT == currentPart)
- {
- // payload is fault
- if (atPartMargin())
- {
- SOAPBody soapBody = soapEnv.getBody();
- SOAPFaultImpl soapFault = new SOAPFaultImpl(soapEnv.getPrefix(), soapEnv.getNamespaceURI());
- soapBody.addChildElement(soapFault);
- destElement = soapFault;
- previousPart = Part.FAULT;
- }
-
- if (fragmentRootCursor == null)
- {
- fragmentRootCursor = qName;
- }
-
- consumeStartElement();
- }
-
- if (fragmentRootCursor == null) // constructing soap elements
- {
- copyAttributes(destElement);
- }
- }
-
- private void togglePartMargin(QName qName)
- {
- // identify the current part
- if (qName.getLocalPart().equalsIgnoreCase(HEADER_ELEMENT_NAME))
- {
- previousPart = currentPart;
- currentPart = Part.HEADER;
- }
- else if (qName.getLocalPart().equalsIgnoreCase(BODY_ELEMENT_NAME))
- {
- previousPart = currentPart;
- currentPart = Part.BODY;
- }
- else if (qName.getLocalPart().equalsIgnoreCase(FAULT_ELEMENT_NAME))
- {
- previousPart = currentPart;
- currentPart = Part.FAULT;
- }
- }
-
- private void consumeStartElement()
- {
-
- QName qName = reader.getName();
-
- // element
- fragmentBuffer.append(START_ELEMENT_BRACKET);
- fragmentBuffer.append(getFQElementName(qName));
-
- // local namespaces
- for (int x = 0; x < reader.getNamespaceCount(); x++)
- {
- if (reader.getNamespacePrefix(x) != null)
- {
- fragmentBuffer.append(" xmlns:");
- fragmentBuffer.append(reader.getNamespacePrefix(x)).append("='");
- fragmentBuffer.append(reader.getNamespaceURI(x)).append("'");
- }
- else if (reader.getNamespaceURI(x) != null)
- {
- fragmentBuffer.append(" xmlns='");
- fragmentBuffer.append(reader.getNamespaceURI(x)).append("'");
- }
- }
-
- // attributes
- if (reader.getAttributeCount() > 0)
- {
- for (int i = 0; i < reader.getAttributeCount(); i++)
- {
- QName attQName = reader.getAttributeName(i);
- fragmentBuffer.append(" ").append(getFQElementName(attQName));
- fragmentBuffer.append("='").append(reader.getAttributeValue(i)).append("'");
- }
- }
-
- fragmentBuffer.append(CLOSING_BRACKET);
- }
-
- private String getFQElementName(QName qName)
- {
- return !qName.getPrefix().equals(EMPTY_STRING) ? qName.getPrefix() + ":" + qName.getLocalPart() : qName.getLocalPart();
- }
-
- private void copyAttributes(Element destElement)
- {
-
- if (reader.getAttributeCount() == 0)
- return;
-
- for (int i = 0; i < reader.getAttributeCount(); i++)
- {
- destElement.setAttributeNS(reader.getAttributeNamespace(i), reader.getAttributeLocalName(i), reader.getAttributeValue(i));
- }
- }
-
- private boolean atPartMargin()
- {
- return previousPart != currentPart;
- }
-
- private static String normalize(String valueStr)
- {
- // We assume most strings will not contain characters that need "escaping",
- // and optimize for this case.
- boolean found = false;
- int i = 0;
-
- outer: for (; i < valueStr.length(); i++)
- {
- switch (valueStr.charAt(i))
- {
- case '<':
- case '>':
- case '&':
- case '"':
- found = true;
- break outer;
- }
- }
-
- if (!found)
- return valueStr;
-
- // Resume where we left off
- StringBuilder builder = new StringBuilder();
- builder.append(valueStr.substring(0, i));
- for (; i < valueStr.length(); i++)
- {
- char c = valueStr.charAt(i);
- switch (c)
- {
- case '<':
- builder.append("<");
- break;
- case '>':
- builder.append(">");
- break;
- case '&':
- builder.append("&");
- break;
- case '"':
- builder.append(""");
- break;
- default:
- builder.append(c);
- }
- }
-
- return builder.toString();
- }
-}
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPMessageUnMarshaller.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPMessageUnMarshaller.java 2007-01-16 15:17:51 UTC (rev 1986)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPMessageUnMarshaller.java 2007-01-16 15:32:38 UTC (rev 1987)
@@ -72,7 +72,7 @@
throw new WSException("Invalid HTTP server response [" + resCode + "] - " + resMessage);
MimeHeaders mimeHeaders = getMimeHeaders(metadata);
- SOAPMessage soapMsg = new MessageFactoryImpl().createMessageInternal(mimeHeaders, inputStream, true);
+ SOAPMessage soapMsg = new MessageFactoryImpl().createMessage(mimeHeaders, inputStream, true);
return soapMsg;
}
catch (SOAPException e)
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPPartImpl.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPPartImpl.java 2007-01-16 15:17:51 UTC (rev 1986)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPPartImpl.java 2007-01-16 15:32:38 UTC (rev 1987)
@@ -29,7 +29,6 @@
import java.util.List;
import javax.xml.soap.MimeHeaders;
-import javax.xml.soap.SOAPBody;
import javax.xml.soap.SOAPElement;
import javax.xml.soap.SOAPEnvelope;
import javax.xml.soap.SOAPException;
@@ -41,7 +40,7 @@
import org.jboss.logging.Logger;
import org.jboss.util.NotImplementedException;
-import org.jboss.ws.core.utils.DOMUtils;
+import org.jboss.ws.core.jaxrpc.Style;
import org.w3c.dom.Attr;
import org.w3c.dom.CDATASection;
import org.w3c.dom.Comment;
@@ -154,9 +153,9 @@
return;
}
- Element domElement;
if (source instanceof DOMSource)
{
+ Element domElement;
DOMSource domSource = (DOMSource)source;
Node node = domSource.getNode();
if (node instanceof Document)
@@ -165,13 +164,17 @@
domElement = (Element)node;
else
throw new SOAPException("Unsupported DOMSource node: " + node);
+
+ EnvelopeBuilderDOM envBuilder = new EnvelopeBuilderDOM(Style.DOCUMENT);
+ envBuilder.build(soapMessage, domElement);
}
else if (source instanceof StreamSource)
{
try
{
StreamSource streamSource = (StreamSource)source;
- domElement = DOMUtils.parse(streamSource.getInputStream());
+ EnvelopeBuilderDOM envBuilder = new EnvelopeBuilderDOM(Style.DOCUMENT);
+ envBuilder.build(soapMessage, streamSource.getInputStream(), false);
}
catch (IOException e)
{
@@ -182,19 +185,11 @@
{
throw new SOAPException("Unsupported source parameter: " + source);
}
-
- SOAPFactoryImpl factory = new SOAPFactoryImpl();
- SOAPElement soapElement = factory.createElement(domElement);
-
- SOAPBody body = soapEnvelope.getBody();
- body.removeContents();
- body.addChildElement(soapElement);
}
public Source getContent() throws SOAPException
{
- SOAPBody body = soapEnvelope.getBody();
- return new DOMSource(body.getFirstChild());
+ return new DOMSource(soapEnvelope);
}
// Document *********************************************************************************************************
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/JBossWSTest.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/JBossWSTest.java 2007-01-16 15:17:51 UTC (rev 1986)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/JBossWSTest.java 2007-01-16 15:32:38 UTC (rev 1987)
@@ -30,11 +30,15 @@
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
+import javax.xml.transform.Source;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMResult;
import junit.framework.TestCase;
import org.jboss.logging.Logger;
import org.jboss.ws.core.utils.DOMWriter;
+import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
@@ -140,6 +144,16 @@
return hostName;
}
+ public Element getElementFromSource(Source retObj) throws Exception
+ {
+ DOMResult domResult = new DOMResult();
+ TransformerFactory tf = TransformerFactory.newInstance();
+ tf.newTransformer().transform(retObj, domResult);
+ Document doc = (Document)domResult.getNode();
+ Element docElement = doc.getDocumentElement();
+ return docElement;
+ }
+
public static void assertEquals(Element expElement, Element wasElement, boolean ignoreWhitespace)
{
normalizeWhitspace(expElement, ignoreWhitespace);
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/common/soap/MessageFactoryTestCase.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/common/soap/MessageFactoryTestCase.java 2007-01-16 15:17:51 UTC (rev 1986)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/common/soap/MessageFactoryTestCase.java 2007-01-16 15:32:38 UTC (rev 1987)
@@ -22,6 +22,7 @@
package org.jboss.test.ws.common.soap;
import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
@@ -30,6 +31,7 @@
import javax.xml.soap.SOAPBodyElement;
import javax.xml.soap.SOAPEnvelope;
import javax.xml.soap.SOAPMessage;
+import javax.xml.transform.stream.StreamSource;
import org.jboss.test.ws.JBossWSTest;
import org.jboss.ws.Constants;
@@ -122,4 +124,30 @@
assertEquals("SOAP-ENV:Envelope", env.getNodeName());
assertEquals(Constants.NS_SOAP11_ENV, env.getNamespaceURI());
}
+
+ public void testSetContentOnSOAPPart() throws Exception
+ {
+ String expMsg =
+ "<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'>" +
+ " <soapenv:Header/>" +
+ " <soapenv:Body>" +
+ " <HelloResponse xmlns='http://helloservice.org/types\'>" +
+ " <argument>responseBean</argument>" +
+ " </HelloResponse>" +
+ " </soapenv:Body>" +
+ "</soapenv:Envelope>";
+
+ MessageFactory factory = new MessageFactoryImpl();
+ ByteArrayInputStream inputStream = new ByteArrayInputStream(expMsg.getBytes());
+ StreamSource source = new StreamSource(inputStream);
+ SOAPMessage message = factory.createMessage();
+ message.getSOAPPart().setContent(source);
+ message.saveChanges();
+
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ message.writeTo(baos);
+ String wasMsg = new String(baos.toByteArray());
+
+ assertEquals(DOMUtils.parse(expMsg), DOMUtils.parse(wasMsg));
+ }
}
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/oneway/JSR181OneWayTestCase.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/oneway/JSR181OneWayTestCase.java 2007-01-16 15:17:51 UTC (rev 1986)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/oneway/JSR181OneWayTestCase.java 2007-01-16 15:32:38 UTC (rev 1987)
@@ -25,6 +25,10 @@
import java.net.URL;
import javax.xml.namespace.QName;
+import javax.xml.transform.Source;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactoryConfigurationError;
import javax.xml.transform.stream.StreamSource;
import javax.xml.ws.Dispatch;
import javax.xml.ws.Service;
@@ -37,7 +41,6 @@
import org.jboss.ws.core.utils.DOMUtils;
import org.jboss.ws.core.utils.DOMWriter;
import org.w3c.dom.Element;
-import org.xml.sax.InputSource;
/**
* Test the JSR-181 annotation: javax.jws.Oneway
@@ -66,8 +69,10 @@
dispatch.invokeOneWay(new StreamSource(new StringReader(payload)));
payload = "<ns1:feedback xmlns:ns1='http://oneway.jsr181.jaxws.ws.test.jboss.org/'/>";
- StreamSource retObj = (StreamSource)dispatch.invoke(new StreamSource(new StringReader(payload)));
- Element retElement = DOMUtils.getFirstChildElement(DOMUtils.parse(new InputSource(retObj.getReader())));
+ Source retObj = (Source)dispatch.invoke(new StreamSource(new StringReader(payload)));
+
+ Element docElement = getElementFromSource(retObj);
+ Element retElement = DOMUtils.getFirstChildElement(docElement);
String retPayload = DOMWriter.printNode(retElement, false);
assertEquals("<return>ok</return>", retPayload);
}
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/webmethod/JSR181WebMethodTestCase.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/webmethod/JSR181WebMethodTestCase.java 2007-01-16 15:17:51 UTC (rev 1986)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/jsr181/webmethod/JSR181WebMethodTestCase.java 2007-01-16 15:32:38 UTC (rev 1987)
@@ -32,6 +32,7 @@
import javax.xml.soap.SOAPElement;
import javax.xml.soap.SOAPFault;
import javax.xml.soap.SOAPMessage;
+import javax.xml.transform.Source;
import javax.xml.transform.stream.StreamSource;
import javax.xml.ws.Dispatch;
import javax.xml.ws.Service;
@@ -143,8 +144,9 @@
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()));
+ Source retSource = (Source)dispatch.invoke(new StreamSource(new StringReader(reqPayload)));
+ Element retEl = getElementFromSource(retSource);
+
assertEquals(DOMUtils.parse(expPayload), retEl);
}
}
\ No newline at end of file
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/provider/ProviderPayloadTestCase.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/provider/ProviderPayloadTestCase.java 2007-01-16 15:17:51 UTC (rev 1986)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/provider/ProviderPayloadTestCase.java 2007-01-16 15:32:38 UTC (rev 1987)
@@ -51,6 +51,7 @@
import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
import org.w3c.dom.Document;
+import org.w3c.dom.Element;
/**
* Test a Provider<SOAPMessage>
@@ -81,12 +82,8 @@
Dispatch<Source> dispatch = createDispatch("ProviderEndpoint");
Source resPayload = dispatch.invoke(new DOMSource(DOMUtils.parse(msgString)));
- DOMResult domResult = new DOMResult();
- TransformerFactory tf = TransformerFactory.newInstance();
- tf.newTransformer().transform(resPayload, domResult);
-
- Document doc = (Document)domResult.getNode();
- assertEquals(DOMUtils.parse(msgString), doc.getDocumentElement());
+ Element docElement = getElementFromSource(resPayload);
+ assertEquals(DOMUtils.parse(msgString), docElement);
}
private Dispatch<Source> createDispatch(String target) throws MalformedURLException, JAXBException
[View Less]
18 years