JBossWS SVN: r5101 - framework/trunk/hudson/hudson-home.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-11-22 05:32:14 -0500 (Thu, 22 Nov 2007)
New Revision: 5101
Modified:
framework/trunk/hudson/hudson-home/config.xml
Log:
Remove AS-4.0.5
Modified: framework/trunk/hudson/hudson-home/config.xml
===================================================================
--- framework/trunk/hudson/hudson-home/config.xml 2007-11-22 10:31:16 UTC (rev 5100)
+++ framework/trunk/hudson/hudson-home/config.xml 2007-11-22 10:32:14 UTC (rev 5101)
@@ -31,7 +31,6 @@
<jobNames class="tree-set">
<no-comparator/>
<string>AS-Tests-ALL</string>
- <string>AS-Tests-AS-4.0.5</string>
<string>AS-Tests-AS-4.2.1</string>
<string>AS-Tests-AS-4.2.2</string>
<string>AS-Tests-AS-5.0.0</string>
16 years, 5 months
JBossWS SVN: r5100 - framework/trunk/hudson/hudson-home/jobs/AS-Tests-ALL.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-11-22 05:31:16 -0500 (Thu, 22 Nov 2007)
New Revision: 5100
Modified:
framework/trunk/hudson/hudson-home/jobs/AS-Tests-ALL/config.xml
Log:
Remove AS-4.0.5
Modified: framework/trunk/hudson/hudson-home/jobs/AS-Tests-ALL/config.xml
===================================================================
--- framework/trunk/hudson/hudson-home/jobs/AS-Tests-ALL/config.xml 2007-11-22 10:29:41 UTC (rev 5099)
+++ framework/trunk/hudson/hudson-home/jobs/AS-Tests-ALL/config.xml 2007-11-22 10:31:16 UTC (rev 5100)
@@ -3,7 +3,7 @@
<builders class="vector"/>
<publishers class="vector">
<hudson.tasks.BuildTrigger>
- <childProjects>AS-Tests-AS-4.0.5, AS-Tests-AS-4.2.1, AS-Tests-AS-4.2.2, AS-Tests-AS-5.0.0</childProjects>
+ <childProjects>AS-Tests-AS-4.2.1, AS-Tests-AS-4.2.2, AS-Tests-AS-5.0.0</childProjects>
</hudson.tasks.BuildTrigger>
</publishers>
<buildWrappers class="vector"/>
16 years, 5 months
JBossWS SVN: r5099 - in stack/native/trunk: ant-import and 5 other directories.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-11-22 05:29:41 -0500 (Thu, 22 Nov 2007)
New Revision: 5099
Added:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws944/EJB3RemoteBusinessInterface.java
Modified:
stack/native/trunk/ant-import-tests/build-jars-jaxws.xml
stack/native/trunk/ant-import/build-release.xml
stack/native/trunk/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceObjectFactoryJAXRPC.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws944/EJB3Bean01.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws944/EJB3RemoteInterface.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws944/JBWS944TestCase.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/webserviceref/SecureEndpointClient.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/webserviceref/StubPropertyTestCase.java
stack/native/trunk/src/test/resources/test-excludes-jboss500.txt
stack/native/trunk/version.properties
Log:
Merge missing bits from 2.0.2.GA
Modified: stack/native/trunk/ant-import/build-release.xml
===================================================================
--- stack/native/trunk/ant-import/build-release.xml 2007-11-22 10:25:51 UTC (rev 5098)
+++ stack/native/trunk/ant-import/build-release.xml 2007-11-22 10:29:41 UTC (rev 5099)
@@ -112,7 +112,7 @@
<xmlproperty file="${core.dir}/output/svn-info.xml"/>
<condition property="framework.externals.ok">
<or>
- <contains string="${info.entry.url}" substring="https://svn.jboss.org/repos/jbossws/framework/tags"/>
+ <contains string="${info.entry.url}" substring="jbossws/framework/tags"/>
<equals arg1="${repository.id}" arg2="snapshot"/>
</or>
</condition>
Modified: stack/native/trunk/ant-import-tests/build-jars-jaxws.xml
===================================================================
--- stack/native/trunk/ant-import-tests/build-jars-jaxws.xml 2007-11-22 10:25:51 UTC (rev 5098)
+++ stack/native/trunk/ant-import-tests/build-jars-jaxws.xml 2007-11-22 10:29:41 UTC (rev 5099)
@@ -190,6 +190,7 @@
<fileset dir="${tests.output.dir}/classes">
<include name="org/jboss/test/ws/jaxws/jbws944/EJB3Bean01.class"/>
<include name="org/jboss/test/ws/jaxws/jbws944/EJB3RemoteInterface.class"/>
+ <include name="org/jboss/test/ws/jaxws/jbws944/EJB3RemoteBusinessInterface.class"/>
<include name="org/jboss/test/ws/jaxws/jbws944/EJB3RemoteHome.class"/>
</fileset>
</jar>
Modified: stack/native/trunk/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceObjectFactoryJAXRPC.java
===================================================================
--- stack/native/trunk/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceObjectFactoryJAXRPC.java 2007-11-22 10:25:51 UTC (rev 5098)
+++ stack/native/trunk/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceObjectFactoryJAXRPC.java 2007-11-22 10:29:41 UTC (rev 5099)
@@ -238,9 +238,13 @@
// load all service endpoint interface classes
for (UnifiedPortComponentRefMetaData pcr : serviceRef.getPortComponentRefs())
{
- Class seiClass = contextCL.loadClass(pcr.getServiceEndpointInterface());
- if (Remote.class.isAssignableFrom(seiClass) == false)
- throw new IllegalArgumentException("The SEI does not implement java.rmi.Remote: " + seiClass.getName());
+ String seiName = pcr.getServiceEndpointInterface();
+ if (seiName != null)
+ {
+ Class seiClass = contextCL.loadClass(seiName);
+ if (Remote.class.isAssignableFrom(seiClass) == false)
+ throw new IllegalArgumentException("The SEI does not implement java.rmi.Remote: " + seiClass.getName());
+ }
}
// Setup the handler chain
Modified: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws944/EJB3Bean01.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws944/EJB3Bean01.java 2007-11-22 10:25:51 UTC (rev 5098)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws944/EJB3Bean01.java 2007-11-22 10:29:41 UTC (rev 5099)
@@ -34,11 +34,11 @@
@WebService(name = "EJB3Bean", serviceName = "EJB3BeanService", targetNamespace = "http://org.jboss.ws/jbws944")
@WebContext(contextRoot = "/jaxws-jbws944", urlPattern = "/FooBean01")
@SOAPBinding(style = SOAPBinding.Style.RPC)
-(a)Remote(EJB3RemoteInterface.class)
+(a)Remote({EJB3RemoteBusinessInterface.class,EJB3RemoteInterface.class})
@RemoteHome(EJB3RemoteHome.class)
@RemoteBinding(jndiBinding = "/ejb3/EJB3EndpointInterface")
@Stateless(name = "FooBean01")
-public class EJB3Bean01 implements EJB3RemoteInterface
+public class EJB3Bean01 implements EJB3RemoteBusinessInterface
{
@WebMethod
public String echo(String input)
Copied: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws944/EJB3RemoteBusinessInterface.java (from rev 5087, stack/native/tags/jbossws-native-2.0.2.GA/src/test/java/org/jboss/test/ws/jaxws/jbws944/EJB3RemoteBusinessInterface.java)
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws944/EJB3RemoteBusinessInterface.java (rev 0)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws944/EJB3RemoteBusinessInterface.java 2007-11-22 10:29:41 UTC (rev 5099)
@@ -0,0 +1,33 @@
+/*
+ * 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.jbws944;
+
+/**
+ * An EJB3 remote business interface
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 10-May-2005
+ */
+public interface EJB3RemoteBusinessInterface
+{
+ String echo(String input);
+}
Modified: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws944/EJB3RemoteInterface.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws944/EJB3RemoteInterface.java 2007-11-22 10:25:51 UTC (rev 5098)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws944/EJB3RemoteInterface.java 2007-11-22 10:29:41 UTC (rev 5099)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * Copyright 2007, 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.
*
@@ -21,13 +21,15 @@
*/
package org.jboss.test.ws.jaxws.jbws944;
+import javax.ejb.EJBObject;
+
/**
- * An EJB3 remote interface
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 10-May-2005
+ * EJB2.1 Remote Interface
+ *
+ * @author <mailto:andrew.rubinger@redhat.com>ALR</a>
+ * @version $Revision$
*/
-public interface EJB3RemoteInterface
+public interface EJB3RemoteInterface extends EJBObject
{
String echo(String input);
}
Modified: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws944/JBWS944TestCase.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws944/JBWS944TestCase.java 2007-11-22 10:25:51 UTC (rev 5098)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws944/JBWS944TestCase.java 2007-11-22 10:29:41 UTC (rev 5099)
@@ -57,7 +57,7 @@
public void testRemoteAccess() throws Exception
{
InitialContext iniCtx = getInitialContext();
- EJB3RemoteInterface ejb3Remote = (EJB3RemoteInterface)iniCtx.lookup("/ejb3/EJB3EndpointInterface");
+ EJB3RemoteBusinessInterface ejb3Remote = (EJB3RemoteBusinessInterface)iniCtx.lookup("/ejb3/EJB3EndpointInterface");
String helloWorld = "Hello world!";
Object retObj = ejb3Remote.echo(helloWorld);
@@ -73,6 +73,7 @@
System.out.println("FIXME: [JBCTS-540] EJB3 proxy does not implement the Home interface");
return;
}
+
InitialContext iniCtx = getInitialContext();
Object obj = iniCtx.lookup("/ejb3/EJB3EndpointInterface");
EJB3RemoteHome ejb3Home = (EJB3RemoteHome)PortableRemoteObject.narrow(obj, EJB3RemoteHome.class);
Modified: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/webserviceref/SecureEndpointClient.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/webserviceref/SecureEndpointClient.java 2007-11-22 10:25:51 UTC (rev 5098)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/webserviceref/SecureEndpointClient.java 2007-11-22 10:29:41 UTC (rev 5099)
@@ -57,16 +57,25 @@
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;
+ if (reqMsg.equals("SecureService1"))
+ {
+ SecureEndpoint port = secureService1.getSecureEndpointPort();
+ retStr = invokeEndpoint(port, reqMsg, username, password);
+ }
+ else if (reqMsg.equals("SecureService2"))
+ {
+ SecureEndpoint port = secureService2.getPort(SecureEndpoint.class);
+ retStr = invokeEndpoint(port, reqMsg, username, password);
+ }
+ else if (reqMsg.equals("SecurePort1"))
+ {
+ SecureEndpoint port = securePort1;
+ retStr = invokeEndpoint(port, reqMsg, username, password);
+ }
+ else
+ {
+ throw new IllegalArgumentException("Invalid req messge: " + reqMsg);
+ }
}
private static String invokeEndpoint(SecureEndpoint port, String inStr, String username, String password)
Modified: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/webserviceref/StubPropertyTestCase.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/webserviceref/StubPropertyTestCase.java 2007-11-22 10:25:51 UTC (rev 5098)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/webserviceref/StubPropertyTestCase.java 2007-11-22 10:29:41 UTC (rev 5099)
@@ -73,17 +73,45 @@
assertEquals(helloWorld, retObj);
}
- public void testUnconfiguredStub() throws Throwable
+ public void testExplicitSecureService1() throws Throwable
{
- String reqMsg = "Hello World";
+ String reqMsg = "SecureService1";
new ClientLauncher().launch(SecureEndpointClient.class.getName(), "jbossws-client", new String[] { reqMsg, "kermit", "thefrog" });
- assertEquals("Hello World|Hello World|Hello World", SecureEndpointClient.retStr);
+ assertEquals(reqMsg, SecureEndpointClient.retStr);
}
- public void testConfiguredStub() throws Throwable
+ public void testExplicitSecureService2() throws Throwable
{
- String reqMsg = "Hello World";
+ String reqMsg = "SecureService2";
+ new ClientLauncher().launch(SecureEndpointClient.class.getName(), "jbossws-client", new String[] { reqMsg, "kermit", "thefrog" });
+ assertEquals(reqMsg, SecureEndpointClient.retStr);
+ }
+
+ public void testExplicitSecurePort1() throws Throwable
+ {
+ String reqMsg = "SecurePort1";
+ new ClientLauncher().launch(SecureEndpointClient.class.getName(), "jbossws-client", new String[] { reqMsg, "kermit", "thefrog" });
+ assertEquals(reqMsg, SecureEndpointClient.retStr);
+ }
+
+ public void testImplicitSecureService1() throws Throwable
+ {
+ String reqMsg = "SecureService1";
new ClientLauncher().launch(SecureEndpointClient.class.getName(), "jbossws-client", new String[] { reqMsg });
- assertEquals("Hello World|Hello World|Hello World", SecureEndpointClient.retStr);
+ assertEquals(reqMsg, SecureEndpointClient.retStr);
}
+
+ public void testImplicitSecureService2() throws Throwable
+ {
+ String reqMsg = "SecureService2";
+ new ClientLauncher().launch(SecureEndpointClient.class.getName(), "jbossws-client", new String[] { reqMsg });
+ assertEquals(reqMsg, SecureEndpointClient.retStr);
+ }
+
+ public void testImplicitSecurePort1() throws Throwable
+ {
+ String reqMsg = "SecurePort1";
+ new ClientLauncher().launch(SecureEndpointClient.class.getName(), "jbossws-client", new String[] { reqMsg });
+ assertEquals(reqMsg, SecureEndpointClient.retStr);
+ }
}
Modified: stack/native/trunk/src/test/resources/test-excludes-jboss500.txt
===================================================================
--- stack/native/trunk/src/test/resources/test-excludes-jboss500.txt 2007-11-22 10:25:51 UTC (rev 5098)
+++ stack/native/trunk/src/test/resources/test-excludes-jboss500.txt 2007-11-22 10:29:41 UTC (rev 5099)
@@ -1,47 +1,6 @@
# Fix BPEL before AS50 goes final
org/jboss/test/ws/jaxrpc/samples/wsbpel/hello/*TestCase.*
-# [JBAS-4901] Reverse paths are not allowed (containing a . or ..)
-org/jboss/test/ws/jaxws/jbws1798/**
-org/jboss/test/ws/jaxrpc/jbws153/**
-
-# [JBAS-4902] nested jar not deployed
-org/jboss/test/ws/jaxrpc/jbws128/**
-org/jboss/test/ws/jaxrpc/jbws165/**
-org/jboss/test/ws/jaxrpc/jbws331/**
-org/jboss/test/ws/jaxrpc/jbws358/**
-org/jboss/test/ws/jaxrpc/jbws772/**
-org/jboss/test/ws/jaxws/jbws1813/**
-org/jboss/test/ws/jaxws/jbws1762/exploded_ear_ejb3/**
-org/jboss/test/ws/jaxws/jbws1762/exploded_ear_pojo/**
-org/jboss/test/ws/jaxws/jbws1762/packaged_ear_ejb3/**
-org/jboss/test/ws/jaxws/jbws1762/packaged_ear_pojo/**
-
-# [JBAS-4940] Deployment.types not propagated
-org/jboss/test/ws/jaxws/jbws1762/exploded_jar_ejb3/**
-org/jboss/test/ws/jaxws/jbws1762/packaged_jar_ejb3/**
-
-# [JBAS-4890] EJBAccessException: Caller unauthorized
-org/jboss/test/ws/jaxws/samples/context/**
-
-# [JBAS-4903] EJB 2.1 view cannot be realized
-org/jboss/test/ws/jaxws/jbws944/**
-
-# [JBAS-4923] No valid security context for the caller identity
-org/jboss/test/ws/jaxrpc/samples/jsr109ejb/*TestCase.*
-
# [JBAS-4930] Cannot lookup ejb3 remote proxy
-org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefEJBTestCase.*
-org/jboss/test/ws/jaxws/samples/webserviceref/WebServiceRefEJB3TestCase.*
-
-# [JBAS-4931] Fix ejb3 ClientLaucher
-org/jboss/test/ws/jaxws/samples/webserviceref/WebServiceRefClientTestCase.*
-org/jboss/test/ws/jaxws/webserviceref/**
-
-# [JBAS-4932] Invalid principal: anonymous
-org/jboss/test/ws/jaxrpc/jbws723/**
-org/jboss/test/ws/jaxrpc/samples/secureejb/SecureEJBTestCase.*
-org/jboss/test/ws/jaxrpc/wsse/UsernameTestCase.*
-
-# UsernameTokenHTTPSTestCase requires keystore & trustore in jboss-web tomcat configuration
-org/jboss/test/ws/interop/nov2007/wsse/UsernameTokenHTTPSTestCase.*
+org/jboss/test/ws/jaxrpc/jbws331/**
+org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefEJBTestCase.*
\ No newline at end of file
Modified: stack/native/trunk/version.properties
===================================================================
--- stack/native/trunk/version.properties 2007-11-22 10:25:51 UTC (rev 5098)
+++ stack/native/trunk/version.properties 2007-11-22 10:29:41 UTC (rev 5099)
@@ -25,17 +25,17 @@
# Dependend integration projects
jbossws-spi=1.0.0.GA
-jbossws-common=snapshot
+jbossws-common=1.0.2.GA
jbossws-framework=2.0.2.GA
-jbossws-jboss40=2.0.2.GA
-jbossws-jboss42=2.0.1.GA
+jbossws-jboss40=4.0.5.GA
+jbossws-jboss42=4.2.1.GA
# JBossAS-5.0
jboss-jbossxb-jboss50=snapshot
-jboss-remoting-jboss50=2.2.2.SP1
+jboss-remoting-jboss50=2.2.2.SP2
# JBossAS-4.2
-jboss-jbossxb-jboss42=1.0.0.GA
+jboss-jbossxb-jboss42=1.0.0.SP1
jboss-remoting-jboss42=2.2.2.SP1
# JBossAS-4.0
@@ -69,7 +69,6 @@
junit=3.8.1
oswego-concurrent=1.3.4
qdox=1.4
-sun-hudson=1.93
sun-jaf=1.1
sun-javamail=1.4
sun-servlet=2.4
16 years, 5 months
JBossWS SVN: r5097 - in stack/native/trunk/src/main/java/org/jboss/ws: extensions/wsrm and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2007-11-21 12:21:30 -0500 (Wed, 21 Nov 2007)
New Revision: 5097
Added:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/backchannel/CallbackHandler.java
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/backchannel/CallbackHandlerFactory.java
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/backchannel/RMCallbackHandler.java
Modified:
stack/native/trunk/src/main/java/org/jboss/ws/core/MessageTrace.java
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMChannelRequest.java
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMChannelResponse.java
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMClientHandler.java
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMConstant.java
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMHelper.java
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/backchannel/RMBackPortsInvocationHandler.java
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/backchannel/RMBackPortsServer.java
Log:
sync prototype with SVN - now all tests are passing through back channel as well
Modified: stack/native/trunk/src/main/java/org/jboss/ws/core/MessageTrace.java
===================================================================
--- stack/native/trunk/src/main/java/org/jboss/ws/core/MessageTrace.java 2007-11-21 17:19:55 UTC (rev 5096)
+++ stack/native/trunk/src/main/java/org/jboss/ws/core/MessageTrace.java 2007-11-21 17:21:30 UTC (rev 5097)
@@ -77,7 +77,7 @@
}
else if (message instanceof byte[])
{
- msgLog.trace(messagePrefix + "\n" + String.valueOf((byte[])message));
+ msgLog.trace(messagePrefix + "\n" + new String((byte[])message));
}
else
{
Modified: stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMChannelRequest.java
===================================================================
--- stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMChannelRequest.java 2007-11-21 17:19:55 UTC (rev 5096)
+++ stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMChannelRequest.java 2007-11-21 17:21:30 UTC (rev 5097)
@@ -32,8 +32,14 @@
import org.jboss.logging.Logger;
import org.jboss.remoting.Client;
import org.jboss.remoting.InvokerLocator;
+import org.jboss.remoting.callback.Callback;
+import org.jboss.remoting.callback.HandleCallbackException;
+import org.jboss.remoting.callback.InvokerCallbackHandler;
import org.jboss.ws.core.MessageTrace;
+import org.jboss.ws.extensions.wsrm.backchannel.CallbackHandler;
+import org.jboss.ws.extensions.wsrm.backchannel.CallbackHandlerFactory;
import org.jboss.ws.extensions.wsrm.backchannel.RMBackPortsServer;
+import org.jboss.ws.extensions.wsrm.backchannel.RMCallbackHandler;
import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequence;
import org.jboss.ws.extensions.wsrm.spi.protocol.Serializable;
@@ -43,7 +49,7 @@
* @see org.jboss.ws.extensions.wsrm.RMChannel
* @author richard.opalka(a)jboss.com
*/
-final class RMChannelRequest implements Callable<RMChannelResponse>
+public final class RMChannelRequest implements Callable<RMChannelResponse>
{
private static final Logger log = Logger.getLogger(RMChannelRequest.class);
private static final String JBOSSWS_SUBSYSTEM = "jbossws";
@@ -55,6 +61,15 @@
this.rmRequest = rmRequest;
}
+
+
+ public void handleCallback(Callback callback)
+ throws HandleCallbackException
+ {
+ System.out.println("Handling callback: " + callback);
+ // TODO: implement this method
+ }
+
public RMChannelResponse call()
{
InvokerLocator locator = null;
@@ -75,14 +90,19 @@
client.setMarshaller(RMMarshaller.getInstance());
URI backPort = RMHelper.getBackPortURI(rmRequest);
+ String messageId = RMHelper.getMessageId(rmRequest);
+
System.out.println("[WS-RM] backport URI is: " + backPort);
+ CallbackHandler callbackHandler = null;
+ // TODO: we should remember WSA:MessageId here too
if (backPort != null)
{
- RMBackPortsServer backPortsServer = RMBackPortsServer.getInstance(backPort.getScheme(), backPort.getHost(), backPort.getPort());
- //backPortsServer.registerCallback(backPort.getPath(), this);
+ callbackHandler = CallbackHandlerFactory.getCallbackHandler(backPort);
+ // TODO: callback must unregister itself
+ // TODO: you must call unregister callback as well
}
- boolean oneWay = RMHelper.isOneWayOperation(rmRequest);
+ boolean oneWay = RMHelper.isOneWayOperation(rmRequest) && (backPort == null); // TODO: backport support
if (!oneWay)
client.setUnMarshaller(RMUnMarshaller.getInstance());
@@ -109,6 +129,11 @@
// trace the incomming response message
if (rmResponse != null)
MessageTrace.traceMessage("Incoming RM Response Message", rmResponse.getPayload());
+
+ if (backPort != null) // TODO: backport support
+ {
+ return new RMChannelResponse(callbackHandler, messageId);
+ }
return new RMChannelResponse(rmResponse);
}
Modified: stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMChannelResponse.java
===================================================================
--- stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMChannelResponse.java 2007-11-21 17:19:55 UTC (rev 5096)
+++ stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMChannelResponse.java 2007-11-21 17:21:30 UTC (rev 5097)
@@ -21,6 +21,8 @@
*/
package org.jboss.ws.extensions.wsrm;
+import org.jboss.ws.extensions.wsrm.backchannel.CallbackHandler;
+
/**
* Represents response that goes from the RM channel
* @see org.jboss.ws.extensions.wsrm.RMChannel
@@ -30,31 +32,40 @@
{
private final Throwable fault;
private final RMMessage result;
+ private final CallbackHandler callback;
+ private final String messageId; // WS-Addressing: MessageID
+ public RMChannelResponse(CallbackHandler callback, String messageId)
+ {
+ this(null, null, callback, messageId);
+ }
+
public RMChannelResponse(Throwable fault)
{
- this(null, fault);
+ this(null, fault, null, null);
}
public RMChannelResponse(RMMessage result)
{
- this(result, null);
+ this(result, null, null, null);
}
- private RMChannelResponse(RMMessage result, Throwable fault)
+ private RMChannelResponse(RMMessage result, Throwable fault, CallbackHandler callback, String messageId)
{
super();
this.result = result;
this.fault = fault;
+ this.callback = callback;
+ this.messageId = messageId;
}
public Throwable getFault()
{
- return this.fault;
+ return (this.callback != null) ? this.callback.getFault(this.messageId) : this.fault;
}
public RMMessage getResponse()
{
- return this.result;
+ return (this.callback != null) ? this.callback.getMessage(this.messageId) : this.result;
}
}
\ No newline at end of file
Modified: stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMClientHandler.java
===================================================================
--- stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMClientHandler.java 2007-11-21 17:19:55 UTC (rev 5096)
+++ stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMClientHandler.java 2007-11-21 17:21:30 UTC (rev 5097)
@@ -90,6 +90,7 @@
SOAPAddressingProperties addrProps = (SOAPAddressingProperties)commonMsgContext.get(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND);
Map rmRequestContext = (Map)commonMsgContext.get(RMConstant.REQUEST_CONTEXT);
QName operation = (QName)rmRequestContext.get(RMConstant.OPERATION_QNAME);
+ rmRequestContext.put(RMConstant.WSA_MESSAGE_ID, addrProps.getMessageID().getURI().toString());
if (addrProps != null)
{
SOAPMessage soapMessage = ((SOAPMessageContext)commonMsgContext).getMessage();
Modified: stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMConstant.java
===================================================================
--- stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMConstant.java 2007-11-21 17:19:55 UTC (rev 5096)
+++ stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMConstant.java 2007-11-21 17:21:30 UTC (rev 5097)
@@ -34,6 +34,7 @@
public static final List<QName> PROTOCOL_OPERATION_QNAMES;
public static final String WSA_ANONYMOUS_URI = AddressingBuilder.getAddressingBuilder().newAddressingConstants().getAnonymousURI();
+ public static final String WSA_MESSAGE_ID = PREFIX + ".wsaMessageId";
static
{
Modified: stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMHelper.java
===================================================================
--- stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMHelper.java 2007-11-21 17:19:55 UTC (rev 5096)
+++ stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMHelper.java 2007-11-21 17:21:30 UTC (rev 5097)
@@ -24,6 +24,16 @@
return (ctx != null) && (ctx.containsKey(RMConstant.REQUEST_CONTEXT));
}
+ public static String getMessageId(RMMessage rmRequest)
+ {
+ Map<String, Object> invocationCtx = (Map<String, Object>)rmRequest.getMetadata().getContext(INVOCATION_CONTEXT);
+ Map<String, Object> wsrmRequestCtx = (Map<String, Object>)invocationCtx.get(REQUEST_CONTEXT);
+ String retVal = (String)wsrmRequestCtx.get(WSA_MESSAGE_ID);
+ if (retVal == null)
+ throw new RuntimeException();
+ return retVal;
+ }
+
public static URI getBackPortURI(RMMessage rmRequest)
{
Map<String, Object> invocationCtx = (Map<String, Object>)rmRequest.getMetadata().getContext(INVOCATION_CONTEXT);
Added: stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/backchannel/CallbackHandler.java
===================================================================
--- stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/backchannel/CallbackHandler.java (rev 0)
+++ stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/backchannel/CallbackHandler.java 2007-11-21 17:21:30 UTC (rev 5097)
@@ -0,0 +1,40 @@
+/*
+ * 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.wsrm.backchannel;
+
+import org.jboss.remoting.InvocationRequest;
+import org.jboss.ws.extensions.wsrm.RMMessage;
+
+/**
+ * TODO: Add comment
+ *
+ * @author richard.opalka(a)jboss.com
+ *
+ * @since Nov 21, 2007
+ */
+public interface CallbackHandler
+{
+ String getHandledPath();
+ void handle(InvocationRequest payload);
+ RMMessage getMessage(String messageId);
+ Throwable getFault(String messageId);
+}
Property changes on: stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/backchannel/CallbackHandler.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/backchannel/CallbackHandlerFactory.java
===================================================================
--- stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/backchannel/CallbackHandlerFactory.java (rev 0)
+++ stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/backchannel/CallbackHandlerFactory.java 2007-11-21 17:21:30 UTC (rev 5097)
@@ -0,0 +1,68 @@
+/*
+ * 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.wsrm.backchannel;
+
+import java.net.URI;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReentrantLock;
+
+/**
+ * Callback factory
+ *
+ * @author richard.opalka(a)jboss.com
+ *
+ * @since Nov 21, 2007
+ */
+public final class CallbackHandlerFactory
+{
+ private static RMBackPortsServer server;
+ private static Lock lock = new ReentrantLock();
+
+ private CallbackHandlerFactory()
+ {
+ // no instances
+ }
+
+ public static CallbackHandler getCallbackHandler(URI backPort)
+ {
+ lock.lock();
+ try
+ {
+ if (server == null)
+ {
+ server = RMBackPortsServer.getInstance(backPort.getScheme(), backPort.getHost(), backPort.getPort());
+ }
+ CallbackHandler callbackHandler = server.getCallback(backPort.getPath());
+ if (callbackHandler == null)
+ {
+ callbackHandler = new RMCallbackHandler(backPort.getPath());
+ server.registerCallback(callbackHandler);
+ }
+
+ return callbackHandler;
+ }
+ finally
+ {
+ lock.unlock();
+ }
+ }
+}
Property changes on: stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/backchannel/CallbackHandlerFactory.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/backchannel/RMBackPortsInvocationHandler.java
===================================================================
--- stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/backchannel/RMBackPortsInvocationHandler.java 2007-11-21 17:19:55 UTC (rev 5096)
+++ stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/backchannel/RMBackPortsInvocationHandler.java 2007-11-21 17:21:30 UTC (rev 5097)
@@ -21,14 +21,21 @@
*/
package org.jboss.ws.extensions.wsrm.backchannel;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReentrantLock;
+
import javax.management.MBeanServer;
+import org.jboss.logging.Logger;
import org.jboss.remoting.InvocationRequest;
import org.jboss.remoting.ServerInvocationHandler;
import org.jboss.remoting.ServerInvoker;
import org.jboss.remoting.callback.InvokerCallbackHandler;
import org.jboss.remoting.transport.coyote.RequestMap;
import org.jboss.remoting.transport.http.HTTPMetadataConstants;
+import org.jboss.ws.extensions.wsrm.client_api.RMException;
/**
* TODO: Add comment
@@ -39,46 +46,106 @@
*/
public final class RMBackPortsInvocationHandler implements ServerInvocationHandler
{
+ private static final Logger LOG = Logger.getLogger(RMBackPortsInvocationHandler.class);
+ private final List<CallbackHandler> callbacks = new LinkedList<CallbackHandler>();
+ private final Lock lock = new ReentrantLock();
+
public RMBackPortsInvocationHandler()
{
-
}
+
+ public CallbackHandler getCallback(String requestPath)
+ {
+ this.lock.lock();
+ try
+ {
+ for (CallbackHandler handler : this.callbacks)
+ {
+ if (handler.getHandledPath().equals(requestPath))
+ return handler;
+ }
+ }
+ finally
+ {
+ this.lock.unlock();
+ }
- public void addListener(InvokerCallbackHandler arg0)
+ return null;
+ }
+
+ public void registerCallback(CallbackHandler callbackHandler)
{
- // TODO Auto-generated method stub
-
+ this.lock.lock();
+ try
+ {
+ this.callbacks.add(callbackHandler);
+ }
+ finally
+ {
+ this.lock.unlock();
+ }
}
- public Object invoke(InvocationRequest arg0) throws Throwable
+ public void unregisterCallback(CallbackHandler callbackHandler)
{
- RequestMap rm = (RequestMap)arg0.getRequestPayload();
- System.out.println("... locator ..." + arg0.getLocator());
- System.out.println("... subsystem ..." + arg0.getSubsystem());
- System.out.println("... parameter ..." + arg0.getParameter());
- System.out.println("... parameter ..." + arg0.getParameter().getClass().getName());
- System.out.println("... method ..." + rm.get(HTTPMetadataConstants.METHODTYPE));
- System.out.println("... path ..." + rm.get(HTTPMetadataConstants.PATH));
- System.out.println("return ..." + arg0.getReturnPayload());
- return null;
+ this.lock.lock();
+ try
+ {
+ this.callbacks.remove(callbackHandler);
+ }
+ finally
+ {
+ this.lock.unlock();
+ }
}
- public void removeListener(InvokerCallbackHandler arg0)
+ public Object invoke(InvocationRequest request) throws Throwable
{
- // TODO Auto-generated method stub
-
+ this.lock.lock();
+ try
+ {
+ RequestMap rm = (RequestMap)request.getRequestPayload();
+ String requestPath = (String)rm.get(HTTPMetadataConstants.PATH);
+ boolean handlerExists = false;
+ for (CallbackHandler handler : this.callbacks)
+ {
+ if (handler.getHandledPath().equals(requestPath))
+ {
+ handlerExists = true;
+ LOG.debug("Handling request path: " + requestPath);
+ handler.handle(request);
+ break;
+ }
+ }
+ if (handlerExists == false)
+ LOG.warn("No callback handler registered for path: " + requestPath);
+
+ return null;
+ }
+ finally
+ {
+ this.lock.unlock();
+ }
}
+ public void addListener(InvokerCallbackHandler callbackHandler)
+ {
+ // do nothing - we're using custom callback handlers
+ }
+
+ public void removeListener(InvokerCallbackHandler callbackHandler)
+ {
+ // do nothing - we're using custom callback handlers
+ }
+
public void setInvoker(ServerInvoker arg0)
{
- // TODO Auto-generated method stub
-
+ // do nothing
}
public void setMBeanServer(MBeanServer arg0)
{
- // TODO Auto-generated method stub
-
+ // do nothing
}
}
Modified: stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/backchannel/RMBackPortsServer.java
===================================================================
--- stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/backchannel/RMBackPortsServer.java 2007-11-21 17:19:55 UTC (rev 5096)
+++ stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/backchannel/RMBackPortsServer.java 2007-11-21 17:21:30 UTC (rev 5097)
@@ -26,6 +26,7 @@
import org.jboss.logging.Logger;
import org.jboss.remoting.InvokerLocator;
+import org.jboss.remoting.callback.InvokerCallbackHandler;
import org.jboss.remoting.transport.Connector;
import org.jboss.ws.extensions.wsrm.client_api.RMException;
@@ -48,10 +49,26 @@
private final String scheme;
private final String host;
private final int port;
+ private RMBackPortsInvocationHandler handler;
private boolean started;
private boolean stopped;
private boolean terminated;
+ public final void registerCallback(CallbackHandler callbackHandler)
+ {
+ this.handler.registerCallback(callbackHandler);
+ }
+
+ public final void unregisterCallback(CallbackHandler callbackHandler)
+ {
+ this.handler.unregisterCallback(callbackHandler);
+ }
+
+ public final CallbackHandler getCallback(String requestPath)
+ {
+ return this.handler.getCallback(requestPath);
+ }
+
private RMBackPortsServer(String scheme, String host, int port)
throws RMException
{
@@ -62,13 +79,13 @@
try
{
InvokerLocator il = new InvokerLocator(this.scheme + "://" + this.host + ":" + this.port);
- connector = new Connector();
- connector.setInvokerLocator(il.getLocatorURI());
- connector.create();
+ this.connector = new Connector();
+ this.connector.setInvokerLocator(il.getLocatorURI());
+ this.connector.create();
- RMBackPortsInvocationHandler handler = new RMBackPortsInvocationHandler();
- connector.addInvocationHandler("wsrmBackPortsHandler", handler);
- connector.start();
+ this.handler = new RMBackPortsInvocationHandler();
+ this.connector.addInvocationHandler("wsrmBackPortsHandler", this.handler);
+ this.connector.start();
LOG.debug("WS-RM Backports Server started on: " + il.getLocatorURI());
}
catch (Exception e)
Added: stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/backchannel/RMCallbackHandler.java
===================================================================
--- stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/backchannel/RMCallbackHandler.java (rev 0)
+++ stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/backchannel/RMCallbackHandler.java 2007-11-21 17:21:30 UTC (rev 5097)
@@ -0,0 +1,110 @@
+/*
+ * 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.wsrm.backchannel;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.jboss.logging.Logger;
+import org.jboss.remoting.InvocationRequest;
+import org.jboss.ws.core.MessageTrace;
+import org.jboss.ws.extensions.wsrm.RMChannelRequest;
+import org.jboss.ws.extensions.wsrm.RMMessage;
+import org.jboss.ws.extensions.wsrm.RMMessageFactory;
+import org.jboss.ws.extensions.wsrm.RMMetadata;
+
+/**
+ * TODO: Add comment
+ *
+ * @author richard.opalka(a)jboss.com
+ *
+ * @since Nov 21, 2007
+ */
+public final class RMCallbackHandler implements CallbackHandler
+{
+ private static final Logger LOG = Logger.getLogger(RMCallbackHandler.class);
+ private final String handledPath;
+ private final Object instanceLock = new Object();
+ private Map<String, RMMessage> arrivedMessages = new HashMap<String, RMMessage>();
+
+ public RMCallbackHandler(String handledPath)
+ {
+ super();
+ this.handledPath = handledPath;
+ }
+
+ public Throwable getFault(String messageId)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public final String getHandledPath()
+ {
+ return this.handledPath;
+ }
+
+ public final void handle(InvocationRequest request)
+ {
+ String requestMessage = (String)request.getParameter();
+ System.out.println("=================================================");
+ System.out.println("4 - " + request.getRequestPayload());
+ System.out.println("5 - " + request.getReturnPayload());
+ synchronized (instanceLock)
+ {
+ LOG.debug("Setting response object");
+ MessageTrace.traceMessage("Incoming RM Response Message", requestMessage.getBytes());
+ String startPattern = "<wsa:RelatesTo>"; // TODO: remove this with XML content inspection
+ String endPattern = "</wsa:RelatesTo>";
+ int begin = requestMessage.indexOf(startPattern) + startPattern.length();
+ int end = requestMessage.indexOf(endPattern);
+ String messageId = requestMessage.substring(begin, end);
+ RMMessage message = RMMessageFactory.newMessage(requestMessage.getBytes(), new RMMetadata(new java.util.HashMap<String, Object>())); // TODO create map metadata
+ System.out.println("Arrived message id: " + messageId);
+ System.out.println("Message content is: " + requestMessage);
+ this.arrivedMessages.put(messageId, message);
+ System.out.println("Response object is null? -> " + (message == null));
+ System.out.println("=================================================");
+ }
+ }
+
+ public RMMessage getMessage(String messageId)
+ {
+ synchronized (instanceLock)
+ {
+ while (this.arrivedMessages.get(messageId) == null)
+ {
+ try
+ {
+ LOG.debug("waiting for response object associated with message id: " + messageId);
+ instanceLock.wait(100);
+ }
+ catch (InterruptedException ignore)
+ {
+ // TODO: never ignore exceptions - LOG it using logger
+ }
+ }
+ return this.arrivedMessages.get(messageId);
+ }
+ }
+
+}
Property changes on: stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/backchannel/RMCallbackHandler.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
16 years, 5 months
JBossWS SVN: r5096 - stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/emulator.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2007-11-21 12:19:55 -0500 (Wed, 21 Nov 2007)
New Revision: 5096
Modified:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/emulator/Constant.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/emulator/EndpointEmulator.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/emulator/Util.java
Log:
enhancing WS-RM emulator to create new TCP/IP connection when inbound message is addressable
Modified: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/emulator/Constant.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/emulator/Constant.java 2007-11-21 15:23:56 UTC (rev 5095)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/emulator/Constant.java 2007-11-21 17:19:55 UTC (rev 5096)
@@ -66,5 +66,7 @@
public static final String VALUE_ATTRIBUTE = "value";
public static final String HTTP_METHOD_ATTRIBUTE = "httpMethod";
public static final String PATH_INFO_ATTRIBUTE = "pathInfo";
-
+ // XML configuration referencable entities
+ public static final String RESPONSE_TO = PARAGRAPH + LEFT_BRACKET + "res.wsa.to" + RIGHT_BRACKET;
+ public static final String ADDRESSING_ANONYMOUS_URI = "http://www.w3.org/2005/08/addressing/anonymous";
}
Modified: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/emulator/EndpointEmulator.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/emulator/EndpointEmulator.java 2007-11-21 15:23:56 UTC (rev 5095)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/emulator/EndpointEmulator.java 2007-11-21 17:19:55 UTC (rev 5096)
@@ -25,7 +25,12 @@
import java.io.IOException;
import java.io.InputStream;
+import java.io.OutputStream;
import java.io.PrintWriter;
+import java.net.HttpURLConnection;
+import java.net.Socket;
+import java.net.URL;
+import java.net.URLConnection;
import java.util.List;
import java.util.Map;
@@ -98,6 +103,7 @@
Map<String, String> resProperties = view.getResponse().getProperties();
Map<String, String> reqProperties = view.getRequest().getProperties();
String responseMessage = Util.getResourceAsString(ctx, view.getResponse().getResource());
+ String responseTo = null;
if (resProperties.size() > 0)
{
@@ -109,14 +115,34 @@
Map<String, String> replaceMap = Util.prepareReplaceMap(initializedReqProperties, resProperties);
responseMessage = Util.replaceAll(responseMessage, replaceMap);
+ responseTo = replaceMap.get(RESPONSE_TO);
+ if (ADDRESSING_ANONYMOUS_URI.equals(responseTo))
+ {
+ responseTo = null;
+ }
}
- resp.setContentType(view.getResponse().getContentType());
- resp.setStatus(Integer.valueOf(view.getResponse().getStatusCode()));
- PrintWriter writer = resp.getWriter();
- writer.print(responseMessage);
- writer.flush();
- writer.close();
+ if (responseTo == null)
+ {
+ ctx.log("Sending response through ServletResponse");
+ resp.setContentType(view.getResponse().getContentType());
+ resp.setStatus(Integer.valueOf(view.getResponse().getStatusCode()));
+ PrintWriter writer = resp.getWriter();
+ writer.print(responseMessage);
+ writer.flush();
+ writer.close();
+ }
+ else
+ {
+ ctx.log("Sending response through new socket connection");
+ URL url = new URL(responseTo);
+ Socket socket = new Socket(url.getHost(), url.getPort());
+ OutputStream out = socket.getOutputStream();
+ out.write(Util.createHTTPHeaders(url, responseMessage.length()));
+ out.write(responseMessage.getBytes());
+ out.flush();
+ out.close();
+ }
}
}
\ No newline at end of file
Modified: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/emulator/Util.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/emulator/Util.java 2007-11-21 15:23:56 UTC (rev 5095)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/emulator/Util.java 2007-11-21 17:19:55 UTC (rev 5096)
@@ -28,6 +28,7 @@
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
+import java.net.URL;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedList;
@@ -64,6 +65,19 @@
{
// forbidden inheritance
}
+
+ private static final String CRLF = "\r\n";
+
+ public static byte[] createHTTPHeaders(URL url, int payloadLength)
+ {
+ StringBuilder sb = new StringBuilder();
+ sb.append("POST " + url.getPath() + " HTTP/1.1" + CRLF);
+ sb.append("Content-Type: text/xml" + CRLF);
+ sb.append("Host: " + url.getHost() + ":" + url.getPort() + CRLF);
+ sb.append("Content-Length: " + payloadLength + CRLF);
+ sb.append(CRLF);
+ return sb.toString().getBytes();
+ }
public static String replace(String oldString, String newString, String data)
{
16 years, 5 months
JBossWS SVN: r5095 - in rest: ant-import and 34 other directories.
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2007-11-21 10:23:56 -0500 (Wed, 21 Nov 2007)
New Revision: 5095
Added:
rest/src/main/java/org/jboss/rest/
rest/src/main/java/org/jboss/rest/MethodHTTP.java
rest/src/main/java/org/jboss/rest/ResourceError.java
rest/src/main/java/org/jboss/rest/ResourceRegistry.java
rest/src/main/java/org/jboss/rest/ResourceRegistryFactory.java
rest/src/main/java/org/jboss/rest/container/
rest/src/main/java/org/jboss/rest/container/wsf/
rest/src/main/java/org/jboss/rest/container/wsf/DescriptorDeploymentAspect.java
rest/src/main/java/org/jboss/rest/container/wsf/ModelDeploymentAspect.java
rest/src/main/java/org/jboss/rest/container/wsf/ResourceServlet.java
rest/src/main/java/org/jboss/rest/container/wsf/ResourceViewServlet.java
rest/src/main/java/org/jboss/rest/media/
rest/src/main/java/org/jboss/rest/media/ContentNegotiation.java
rest/src/main/java/org/jboss/rest/media/DefaultContentNegotiation.java
rest/src/main/java/org/jboss/rest/media/DefaultProviderFactory.java
rest/src/main/java/org/jboss/rest/media/simple/
rest/src/main/java/org/jboss/rest/media/simple/StringProvider.java
rest/src/main/java/org/jboss/rest/media/xml/
rest/src/main/java/org/jboss/rest/media/xml/JAXBProvider.java
rest/src/main/java/org/jboss/rest/model/
rest/src/main/java/org/jboss/rest/model/AbstractRegexResolveable.java
rest/src/main/java/org/jboss/rest/model/AbstractResourceOperation.java
rest/src/main/java/org/jboss/rest/model/NoMethodException.java
rest/src/main/java/org/jboss/rest/model/NoResourceException.java
rest/src/main/java/org/jboss/rest/model/OperationBinding.java
rest/src/main/java/org/jboss/rest/model/ParameterBinding.java
rest/src/main/java/org/jboss/rest/model/RegexQualifier.java
rest/src/main/java/org/jboss/rest/model/ResourceLocator.java
rest/src/main/java/org/jboss/rest/model/ResourceMatch.java
rest/src/main/java/org/jboss/rest/model/ResourceMethod.java
rest/src/main/java/org/jboss/rest/model/ResourceModel.java
rest/src/main/java/org/jboss/rest/model/ResourceModelParser.java
rest/src/main/java/org/jboss/rest/model/StatefulResourceResolver.java
rest/src/main/java/org/jboss/rest/model/dd/
rest/src/main/java/org/jboss/rest/model/dd/DeploymentDescriptorParser.java
rest/src/main/java/org/jboss/rest/model/dd/JbossrsType.java
rest/src/main/java/org/jboss/rest/model/dd/ObjectFactory.java
rest/src/main/java/org/jboss/rest/model/dd/ResourceType.java
rest/src/main/java/org/jboss/rest/model/dd/package-info.java
rest/src/main/java/org/jboss/rest/runtime/
rest/src/main/java/org/jboss/rest/runtime/ContextAdapterBuilder.java
rest/src/main/java/org/jboss/rest/runtime/DefaultInvocationBuilder.java
rest/src/main/java/org/jboss/rest/runtime/DefaultInvocationHandler.java
rest/src/main/java/org/jboss/rest/runtime/Invocation.java
rest/src/main/java/org/jboss/rest/runtime/InvocationBuilder.java
rest/src/main/java/org/jboss/rest/runtime/InvocationHandler.java
rest/src/main/java/org/jboss/rest/runtime/InvocationMediator.java
rest/src/main/java/org/jboss/rest/runtime/InvocationModel.java
rest/src/main/java/org/jboss/rest/runtime/PresetInvocationTarget.java
rest/src/main/java/org/jboss/rest/runtime/RuntimeContext.java
rest/src/main/java/org/jboss/rest/util/
rest/src/main/java/org/jboss/rest/util/Convert.java
rest/src/main/resources/container/
rest/src/main/resources/container/wsf/
rest/src/main/resources/container/wsf/jbossrest-config.xml
rest/src/main/resources/jbossrest-context.war/
rest/src/main/resources/jbossrest-context.war/WEB-INF/
rest/src/main/resources/jbossrest-context.war/WEB-INF/jboss-web.xml
rest/src/main/resources/jbossrest-context.war/WEB-INF/web.xml
rest/src/main/resources/jbossrest-context.war/index.html
rest/src/main/resources/jbossrest-context.war/styles.css
rest/src/main/resources/jbossrest.jar/
rest/src/main/resources/jbossrest.jar/META-INF/
rest/src/main/resources/jbossrest.jar/META-INF/services/
rest/src/test/java/org/jboss/test/rest/
rest/src/test/java/org/jboss/test/rest/Specification.java
rest/src/test/java/org/jboss/test/rest/Widget.java
rest/src/test/java/org/jboss/test/rest/WidgetList.java
rest/src/test/java/org/jboss/test/rest/deployment/
rest/src/test/java/org/jboss/test/rest/deployment/DeploymentTestCase.java
rest/src/test/java/org/jboss/test/rest/deployment/DescriptorParserTestCase.java
rest/src/test/java/org/jboss/test/rest/invocation/
rest/src/test/java/org/jboss/test/rest/invocation/InvocationBuilderTestCase.java
rest/src/test/java/org/jboss/test/rest/media/
rest/src/test/java/org/jboss/test/rest/media/BookResource.java
rest/src/test/java/org/jboss/test/rest/media/BookStoreResource.java
rest/src/test/java/org/jboss/test/rest/media/MediaTypeTestCase.java
rest/src/test/java/org/jboss/test/rest/model/
rest/src/test/java/org/jboss/test/rest/model/ModelParserTestCase.java
rest/src/test/java/org/jboss/test/rest/model/ResolverTestCase.java
rest/src/test/java/org/jboss/test/rest/model/RunRegex.java
rest/src/test/java/org/jboss/test/rest/runtime/
rest/src/test/java/org/jboss/test/rest/runtime/RuntimeContextTestCase.java
rest/src/test/java/org/jboss/test/rest/util/
rest/src/test/java/org/jboss/test/rest/util/RestCase.java
rest/src/test/java/org/jboss/test/rest/util/RestTestHelper.java
rest/src/test/java/org/jboss/test/rest/util/RestTestSetup.java
rest/src/test/java/org/jboss/test/rest/util/TestDeployer.java
rest/src/test/java/org/jboss/test/rest/util/TestDeployerJBoss.java
rest/src/test/resources/rest/
rest/src/test/resources/rest/deployment/
rest/src/test/resources/rest/deployment/jbossrs.xml
rest/src/test/resources/rest/deployment/web.xml
rest/src/test/resources/rest/media/
rest/src/test/resources/rest/media/jbossrs.xml
rest/src/test/resources/rest/media/web.xml
Removed:
rest/src/main/java/org/jboss/rs/
rest/src/main/resources/dtd/
rest/src/main/resources/jbossrs-context.war/
rest/src/main/resources/jbossrs.jar/
rest/src/main/resources/jbossws-native-config.xml
rest/src/main/resources/schema/eventing.xsd
rest/src/main/resources/schema/j2ee_1_4.xsd
rest/src/main/resources/schema/j2ee_jaxrpc_mapping_1_1.xsd
rest/src/main/resources/schema/j2ee_web_services_1_1.xsd
rest/src/main/resources/schema/j2ee_web_services_client_1_1.xsd
rest/src/main/resources/schema/javaee_5.xsd
rest/src/main/resources/schema/javaee_web_services_1_2.xsd
rest/src/main/resources/schema/javaee_web_services_client_1_2.xsd
rest/src/main/resources/schema/jaxrpc-config_2_0.xsd
rest/src/main/resources/schema/jaxws-config_2_0.xsd
rest/src/main/resources/schema/jboss-ws-security_1_0.xsd
rest/src/main/resources/schema/jbossws-tool_1_0.xsd
rest/src/main/resources/schema/soap-encoding_1_1.xsd
rest/src/main/resources/schema/soap-encoding_200206.xsd
rest/src/main/resources/schema/swaref.xsd
rest/src/main/resources/schema/ws-addr.xsd
rest/src/main/resources/schema/ws-policy.xsd
rest/src/main/resources/schema/wsdl20.xsd
rest/src/main/resources/schema/xml-media-types.xsd
rest/src/main/resources/schema/xml.xsd
rest/src/test/java/org/jboss/test/rs/
rest/src/test/resources/rs/
Modified:
rest/ant-import-tests/build-jars-jaxws.xml
rest/ant-import-tests/build-testsuite.xml
rest/ant-import/build-bin-dist.xml
rest/ant-import/build-release.xml
rest/ant-import/macros-deploy-rs.xml
rest/build.xml
rest/jboss-rest.ipr
rest/jboss-rest.iws
rest/src/main/etc/component-info50.xml
rest/src/main/resources/schema/jbossrs.xsd
rest/src/test-framework/ant-import/build-testsuite.xml
Log:
clean and rename
Modified: rest/ant-import/build-bin-dist.xml
===================================================================
--- rest/ant-import/build-bin-dist.xml 2007-11-21 12:01:29 UTC (rev 5094)
+++ rest/ant-import/build-bin-dist.xml 2007-11-21 15:23:56 UTC (rev 5095)
@@ -103,7 +103,7 @@
<include name="jbossws-core-scripts.zip"/>
</fileset>
<fileset dir="${core.dir}/output/lib">
- <include name="jbossrs-context.war"/>
+ <include name="jbossrest-context.war"/>
<include name="jbossws-native40.sar"/>
<include name="jbossws-native42.sar"/>
<include name="jbossrs-50.sar"/>
Modified: rest/ant-import/build-release.xml
===================================================================
--- rest/ant-import/build-release.xml 2007-11-21 12:01:29 UTC (rev 5094)
+++ rest/ant-import/build-release.xml 2007-11-21 15:23:56 UTC (rev 5095)
@@ -65,7 +65,7 @@
<mkdir dir="${jboss.repository.dir}/jbossws-native50/${repository.id}/lib"/>
<copy todir="${jboss.repository.dir}/jbossws-native50/${repository.id}/lib" overwrite="true">
<fileset dir="${core.dir}/output/lib">
- <include name="jbossrs-50.sar"/>
+ <include name="jbossrs-wsf.sar"/>
<include name="jbossws-native50-deployer.zip"/>
</fileset>
</copy>
Modified: rest/ant-import/macros-deploy-rs.xml
===================================================================
--- rest/ant-import/macros-deploy-rs.xml 2007-11-21 12:01:29 UTC (rev 5094)
+++ rest/ant-import/macros-deploy-rs.xml 2007-11-21 15:23:56 UTC (rev 5095)
@@ -436,8 +436,8 @@
</fileset>
</copy>
- <mkdir dir="${jboss500.home}/server/${jboss.server.instance}/deploy/jbossrs.sar"/>
- <unjar dest="${jboss500.home}/server/${jboss.server.instance}/deploy/jbossrs.sar" src="@{stacklibs}/jbossrs-50.sar"/>
+ <mkdir dir="${jboss500.home}/server/${jboss.server.instance}/deploy/jbossrest.sar"/>
+ <unjar dest="${jboss500.home}/server/${jboss.server.instance}/deploy/jbossrest.sar" src="@{stacklibs}/jbossrest-wsf.sar"/>
</sequential>
</macrodef>
Modified: rest/ant-import-tests/build-jars-jaxws.xml
===================================================================
--- rest/ant-import-tests/build-jars-jaxws.xml 2007-11-21 12:01:29 UTC (rev 5094)
+++ rest/ant-import-tests/build-jars-jaxws.xml 2007-11-21 15:23:56 UTC (rev 5095)
@@ -22,23 +22,23 @@
<!-- RS stuff -->
- <war warfile="${tests.output.dir}/libs/jbossrs-deployment.war" webxml="${tests.output.dir}/resources/rs/deployment/web.xml">
+ <war warfile="${tests.output.dir}/libs/jbossrs-deployment.war" webxml="${tests.output.dir}/resources/rest/deployment/web.xml">
<classes dir="${tests.output.dir}/classes">
- <include name="org/jboss/test/rs/WidgetList.class"/>
- <include name="org/jboss/test/rs/Widget.class"/>
- <include name="org/jboss/test/rs/Specification.class"/>
+ <include name="org/jboss/test/rest/WidgetList.class"/>
+ <include name="org/jboss/test/rest/Widget.class"/>
+ <include name="org/jboss/test/rest/Specification.class"/>
</classes>
- <webinf dir="${tests.output.dir}/resources/rs/deployment">
+ <webinf dir="${tests.output.dir}/resources/rest/deployment">
<include name="jbossrs.xml"/>
</webinf>
</war>
- <war warfile="${tests.output.dir}/libs/jbossrs-mediatype.war" webxml="${tests.output.dir}/resources/rs/media/web.xml">
+ <war warfile="${tests.output.dir}/libs/jbossrs-mediatype.war" webxml="${tests.output.dir}/resources/rest/media/web.xml">
<classes dir="${tests.output.dir}/classes">
- <include name="org/jboss/test/rs/media/BookResource.class"/>
- <include name="org/jboss/test/rs/media/BookStoreResource.class"/>
+ <include name="org/jboss/test/rest/media/BookResource.class"/>
+ <include name="org/jboss/test/rest/media/BookStoreResource.class"/>
</classes>
- <webinf dir="${tests.output.dir}/resources/rs/media">
+ <webinf dir="${tests.output.dir}/resources/rest/media">
<include name="jbossrs.xml"/>
</webinf>
</war>
Modified: rest/ant-import-tests/build-testsuite.xml
===================================================================
--- rest/ant-import-tests/build-testsuite.xml 2007-11-21 12:01:29 UTC (rev 5094)
+++ rest/ant-import-tests/build-testsuite.xml 2007-11-21 15:23:56 UTC (rev 5095)
@@ -30,7 +30,7 @@
<path id="ws.stack.classpath">
<pathelement location="${core.dir}/thirdparty/jbossws-common.jar"/>
<pathelement location="${core.dir}/thirdparty/jbossws-spi.jar"/>
- <pathelement location="${core.dir}/output/lib/jbossrs.jar"/>
+ <pathelement location="${core.dir}/output/lib/jbossrest.jar"/>
</path>
<path id="tests.extra.classpath">
Modified: rest/build.xml
===================================================================
--- rest/build.xml 2007-11-21 12:01:29 UTC (rev 5094)
+++ rest/build.xml 2007-11-21 15:23:56 UTC (rev 5095)
@@ -59,7 +59,7 @@
<mkdir dir="${core.output.classes.dir}"/>
<javac srcdir="${core.java.dir}" sourcepath="" destdir="${core.output.classes.dir}" encoding="utf-8" debug="${javac.debug}" verbose="${javac.verbose}"
deprecation="${javac.deprecation}" failonerror="${javac.fail.onerror}" source="1.5" target="1.5">
- <include name="org/jboss/rs/**"/>
+ <include name="org/jboss/rest/**"/>
<classpath path="${core.output.classes14.dir}"/>
<classpath refid="thirdparty.classpath"/>
</javac>
@@ -95,22 +95,22 @@
-->
<target name="jars-common" depends="compile">
- <!-- Build jbossrs.jar -->
+ <!-- Build jbossrest.jar -->
<mkdir dir="${core.output.lib.dir}"/>
- <jar jarfile="${core.output.lib.dir}/jbossrs.jar" manifest="${core.output.etc.dir}/default.mf">
+ <jar jarfile="${core.output.lib.dir}/jbossrest.jar" manifest="${core.output.etc.dir}/default.mf">
<fileset dir="${core.output.classes.dir}">
- <include name="org/jboss/rs/**"/>
+ <include name="org/jboss/rest/**"/>
</fileset>
<fileset dir="${core.resources.dir}">
<include name="schema/**"/>
<include name="dtd/**"/>
</fileset>
- <metainf dir="${core.resources.dir}/jbossrs.jar/META-INF"/>
+ <metainf dir="${core.resources.dir}/jbossrest.jar/META-INF"/>
</jar>
- <!-- Build jbossrs-context.war -->
- <copy todir="${core.output.lib.dir}/jbossrs-context.war">
- <fileset dir="${core.resources.dir}/jbossrs-context.war">
+ <!-- Build jbossrest-context.war -->
+ <copy todir="${core.output.lib.dir}/jbossrest-context.war">
+ <fileset dir="${core.resources.dir}/jbossrest-context.war">
<include name="index.html"/>
<include name="styles.css"/>
<include name="WEB-INF/**"/>
@@ -118,7 +118,7 @@
</copy>
<!-- Build jbossws-core-src.zip -->
- <zip zipfile="${core.output.lib.dir}/jbossrs-src.zip" >
+ <zip zipfile="${core.output.lib.dir}/jbossrest-src.zip" >
<fileset dir="${core.java.dir}"/>
</zip>
@@ -126,24 +126,24 @@
<target name="jars-jboss50" depends="jars-common">
- <!-- Concat jbossrs-beans.xml -->
- <concat destfile="${core.output.lib.dir}/jbossws-native50/jbossrs-beans.xml">
+ <!-- Concat jbossrest-beans.xml -->
+ <concat destfile="${core.output.lib.dir}/jbossrest-wsf/jbossrest-beans.xml">
<header trimleading="yes">
<deployment xmlns="urn:jboss:bean-deployer:2.0">
</header>
- <fileset file="${core.resources.dir}/jbossrs-config.xml"/>
+ <fileset file="${core.resources.dir}/container/wsf/jbossrest-config.xml"/>
<footer trimleading="yes">
</deployment>
</footer>
</concat>
- <!-- Build jbossrs-50.sar -->
- <jar jarfile="${core.output.lib.dir}/jbossrs-50.sar" manifest="${core.output.etc.dir}/default.mf">
+ <!-- Build jbossrs-wsf.sar -->
+ <jar jarfile="${core.output.lib.dir}/jbossrest-wsf.sar" manifest="${core.output.etc.dir}/default.mf">
<fileset dir="${core.output.lib.dir}">
- <include name="jbossrs-context.war/**"/>
+ <include name="jbossrest-context.war/**"/>
</fileset>
<fileset dir="${core.dir}/output/lib">
- <include name="jbossrs.jar"/>
+ <include name="jbossrest.jar"/>
</fileset>
<!--fileset dir="${core.dir}/thirdparty">
<include name="policy.jar"/>
@@ -152,8 +152,8 @@
<include name="wstx.jar"/>
<include name="jboss-jaxb-intros.jar"/>
</fileset-->
- <metainf dir="${core.output.lib.dir}/jbossws-native50">
- <include name="jbossrs-beans.xml"/>
+ <metainf dir="${core.output.lib.dir}/jbossrest-wsf">
+ <include name="jbossrest-beans.xml"/>
</metainf>
</jar>
@@ -179,9 +179,9 @@
<javadoc destdir="${core.output.apidocs.dir}" author="true" version="true" use="true" windowtitle="JBossRS API">
<classpath refid="thirdparty.classpath"/>
<packageset dir="${core.java.dir}" defaultexcludes="yes">
- <include name="org/jboss/rs/**"/>
+ <include name="org/jboss/rest/**"/>
</packageset>
- <doctitle><![CDATA[<h1>JBossRS</h1>]]></doctitle>
+ <doctitle><![CDATA[<h1>JBoss REST</h1>]]></doctitle>
<tag name="todo" scope="all" description="To do:"/>
<!--group title="Core" packages="org.jboss.ws.core*"/>
<group title="Metadata" packages="org.jboss.ws.metadata*"/>
Modified: rest/jboss-rest.ipr
===================================================================
--- rest/jboss-rest.ipr 2007-11-21 12:01:29 UTC (rev 5094)
+++ rest/jboss-rest.ipr 2007-11-21 15:23:56 UTC (rev 5095)
@@ -253,6 +253,8 @@
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/jboss-rest.iml" filepath="$PROJECT_DIR$/jboss-rest.iml" />
+ <module fileurl="file:///home/hbraun/dev/prj/jbossas/trunk/webservices/jboss50.iml" filepath="/home/hbraun/dev/prj/jbossas/trunk/webservices/jboss50.iml" />
+ <module fileurl="file:///home/hbraun/dev/prj/jbossws/common/trunk/trunk.iml" filepath="/home/hbraun/dev/prj/jbossws/common/trunk/trunk.iml" />
</modules>
</component>
<component name="ProjectRootManager" version="2" assert-keyword="true" jdk-15="true" project-jdk-name="1.5" project-jdk-type="JavaSDK">
Modified: rest/jboss-rest.iws
===================================================================
--- rest/jboss-rest.iws 2007-11-21 12:01:29 UTC (rev 5094)
+++ rest/jboss-rest.iws 2007-11-21 15:23:56 UTC (rev 5095)
@@ -86,6 +86,21 @@
<disable_hints />
</component>
<component name="DebuggerManager">
+ <line_breakpoints>
+ <breakpoint url="file://$PROJECT_DIR$/src/main/java/org/jboss/rest/container/wsf/ResourceServlet.java" line="96" class="org.jboss.rest.container.wsf.ResourceServlet" package="org.jboss.rest.container.wsf">
+ <option name="ENABLED" value="true" />
+ <option name="SUSPEND_POLICY" value="SuspendAll" />
+ <option name="LOG_ENABLED" value="false" />
+ <option name="LOG_EXPRESSION_ENABLED" value="false" />
+ <option name="COUNT_FILTER_ENABLED" value="false" />
+ <option name="COUNT_FILTER" value="0" />
+ <option name="CONDITION_ENABLED" value="false" />
+ <option name="CLASS_FILTERS_ENABLED" value="false" />
+ <option name="INSTANCE_FILTERS_ENABLED" value="false" />
+ <option name="CONDITION" value="" />
+ <option name="LOG_MESSAGE" value="" />
+ </breakpoint>
+ </line_breakpoints>
<breakpoint_any>
<breakpoint>
<option name="NOTIFY_CAUGHT" value="true" />
@@ -119,7 +134,24 @@
</breakpoint>
</breakpoint_any>
<breakpoint_rules />
- <ui_properties />
+ <ui_properties>
+ <property name="line_breakpoints_groupByMethods" value="false" />
+ <property name="line_breakpoints_viewId" value="TABLE" />
+ <property name="exception_breakpoints_flattenPackages" value="true" />
+ <property name="method_breakpoints_flattenPackages" value="true" />
+ <property name="field_breakpoints_flattenPackages" value="true" />
+ <property name="exception_breakpoints_groupByMethods" value="false" />
+ <property name="line_breakpoints_groupByClasses" value="true" />
+ <property name="method_breakpoints_viewId" value="TABLE" />
+ <property name="field_breakpoints_groupByMethods" value="false" />
+ <property name="line_breakpoints_flattenPackages" value="true" />
+ <property name="field_breakpoints_groupByClasses" value="true" />
+ <property name="method_breakpoints_groupByClasses" value="true" />
+ <property name="exception_breakpoints_viewId" value="TABLE" />
+ <property name="exception_breakpoints_groupByClasses" value="true" />
+ <property name="field_breakpoints_viewId" value="TABLE" />
+ <property name="method_breakpoints_groupByMethods" value="false" />
+ </ui_properties>
</component>
<component name="ErrorTreeViewConfiguration">
<option name="IS_AUTOSCROLL_TO_SOURCE" value="false" />
@@ -131,17 +163,33 @@
<component name="FavoritesProjectViewPane" />
<component name="FileEditorManager">
<leaf>
- <file leaf-file-name="ModelDeploymentAspect.java" pinned="false" current="true" current-in-tab="true">
- <entry file="file://$PROJECT_DIR$/src/main/java/org/jboss/rs/deployment/ModelDeploymentAspect.java">
+ <file leaf-file-name="ResourceServlet.java" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/src/main/java/org/jboss/rest/container/wsf/ResourceServlet.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="31" column="50" selection-start="1412" selection-end="1412" vertical-scroll-proportion="0.38348624">
- <folding>
- <element signature="imports" expanded="true" />
- </folding>
+ <state line="96" column="0" selection-start="3556" selection-end="3556" vertical-scroll-proportion="0.38822114">
+ <folding />
</state>
</provider>
</entry>
</file>
+ <file leaf-file-name="DeploymentTestCase.java" pinned="false" current="true" current-in-tab="true">
+ <entry file="file://$PROJECT_DIR$/src/test/java/org/jboss/test/rest/deployment/DeploymentTestCase.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="63" column="65" selection-start="2100" selection-end="2100" vertical-scroll-proportion="0.10271547">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="ArchiveDeployerHook.java" pinned="false" current="false" current-in-tab="false">
+ <entry file="file:///home/hbraun/dev/prj/jbossas/trunk/webservices/src/main/org/jboss/wsf/container/jboss50/ArchiveDeployerHook.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="94" column="0" selection-start="3414" selection-end="3414" vertical-scroll-proportion="0.19244392">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
</leaf>
</component>
<component name="FindManager">
@@ -159,10 +207,10 @@
<option name="SPLITTER_PROPORTION" value="0.5" />
<option name="GROUP_BY_SEVERITY" value="false" />
<option name="FILTER_RESOLVED_ITEMS" value="true" />
- <option name="ANALYZE_TEST_SOURCES" value="true" />
+ <option name="ANALYZE_TEST_SOURCES" value="false" />
<option name="SHOW_DIFF_WITH_PREVIOUS_RUN" value="false" />
<option name="SCOPE_TYPE" value="1" />
- <option name="CUSTOM_SCOPE_NAME" value="" />
+ <option name="CUSTOM_SCOPE_NAME" value="Project Files" />
<option name="SHOW_ONLY_DIFF" value="false" />
<option name="myCurrentProfileName" value="Default" />
</component>
@@ -185,6 +233,26 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewModuleNode" />
</PATH_ELEMENT>
</PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="jboss-rest.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="jboss-rest" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="org.jboss.test.rs" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageElementNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="jboss-rest.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewProjectNode" />
+ </PATH_ELEMENT>
+ </PATH>
</subPane>
</component>
<component name="PerforceChangeBrowserSettings">
@@ -234,7 +302,13 @@
<option name="myItemId" value="jboss-rest.ipr" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
+ </PATH>
+ <PATH>
<PATH_ELEMENT>
+ <option name="myItemId" value="jboss-rest.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
<option name="myItemId" value="jboss-rest" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
</PATH_ELEMENT>
@@ -270,6 +344,10 @@
<option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test-framework" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
@@ -289,9 +367,125 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test-framework" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test-framework/ant-import" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="jboss-rest.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="jboss-rest" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="jboss-rest.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="jboss-rest" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test/java" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test/java/org/jboss/test/rest" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="jboss-rest.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="jboss-rest" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test/java" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test/java/org/jboss/test/rest" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test/java/org/jboss/test/rest/deployment" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="jboss-rest.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="jboss-rest" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
<option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/resources" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
@@ -315,11 +509,75 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/resources" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/resources/jbossrest-context.war" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="jboss-rest.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="jboss-rest" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/resources" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/resources/jbossrest-context.war" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/resources/jbossrest-context.war/WEB-INF" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="jboss-rest.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="jboss-rest" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
<option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/java" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/java/org/jboss/rs" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/java/org/jboss/rest" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
@@ -349,14 +607,54 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/java/org/jboss/rs" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/java/org/jboss/rest" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/java/org/jboss/rs/deployment" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/java/org/jboss/rest/container/wsf" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="jboss-rest.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="jboss-rest" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="jboss-rest.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="jboss-rest" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/ant-import-tests" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
</subPane>
</component>
<component name="ProjectReloadState">
@@ -379,6 +677,8 @@
<component name="PropertiesComponent">
<property name="GoToFile.includeJavaFiles" value="false" />
<property name="GoToClass.toSaveIncludeLibraries" value="false" />
+ <property name="RunManagerConfig.compileBeforeRunning" value="false" />
+ <property name="RunManagerConfig.showSettingsBeforeRunnig" value="false" />
<property name="MemberChooser.sorted" value="false" />
<property name="last_opened_file_path" value="/home/hbraun/dev/prj/jbossas/trunk/build" />
<property name="MemberChooser.showClasses" value="true" />
@@ -388,9 +688,17 @@
<component name="ReadonlyStatusHandler">
<option name="SHOW_DIALOG" value="true" />
</component>
- <component name="RecentsManager" />
+ <component name="RecentsManager">
+ <key name="CopyClassDialog.RECENTS_KEY">
+ <recent name="org.jboss.test.rest.util" />
+ </key>
+ <key name="MoveClassesOrPackagesDialog.RECENTS_KEY">
+ <recent name="org.jboss.wsf.container.jboss50.rest" />
+ <recent name="org.jboss.rs.container.wsf" />
+ </key>
+ </component>
<component name="RestoreUpdateTree" />
- <component name="RunManager">
+ <component name="RunManager" selected="Remote.server">
<configuration default="true" type="Application" factoryName="Application" enabled="false" merge="false">
<option name="MAIN_CLASS_NAME" />
<option name="VM_PARAMETERS" />
@@ -416,6 +724,9 @@
<option name="TEST_SEARCH_SCOPE">
<value defaultName="wholeProject" />
</option>
+ <method>
+ <option name="Make" value="true" />
+ </method>
</configuration>
<configuration default="true" type="Applet" factoryName="Applet">
<module name="" />
@@ -436,6 +747,22 @@
<option name="HOST" value="localhost" />
<option name="PORT" value="5005" />
</configuration>
+ <configuration default="false" name="server" type="Remote" factoryName="Remote">
+ <option name="USE_SOCKET_TRANSPORT" value="true" />
+ <option name="SERVER_MODE" value="false" />
+ <option name="SHMEM_ADDRESS" value="javadebug" />
+ <option name="HOST" value="localhost" />
+ <option name="PORT" value="8787" />
+ <RunnerSettings RunnerId="Debug">
+ <option name="DEBUG_PORT" value="8787" />
+ <option name="TRANSPORT" value="0" />
+ <option name="LOCAL" value="false" />
+ </RunnerSettings>
+ <ConfigurationWrapper RunnerId="Debug" />
+ <method>
+ <option name="Make" value="true" />
+ </method>
+ </configuration>
<configuration name="<template>" type="WebApp" default="true" selected="false">
<Host>localhost</Host>
<Port>5050</Port>
@@ -506,28 +833,28 @@
</todo-panel>
</component>
<component name="ToolWindowManager">
- <frame x="0" y="25" width="1680" height="997" extended-state="2" />
+ <frame x="-3" y="25" width="1686" height="1003" extended-state="6" />
<editor active="true" />
<layout>
<window_info id="UI Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="-1" />
<window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="-1" />
<window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="-1" />
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="1" />
- <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.33142203" order="1" />
- <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" order="3" />
+ <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4498861" order="1" />
+ <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3997722" order="3" />
<window_info id="IDEtalk Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="-1" />
<window_info id="IDEtalk" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="-1" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="-1" />
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="-1" />
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="7" />
- <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="1" />
+ <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.24954017" order="1" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" order="0" />
<window_info id="CVS" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="-1" />
<window_info id="Module Dependencies" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="-1" />
- <window_info id="Dependency Viewer" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="-1" />
+ <window_info id="Dependency Viewer" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.74943054" order="-1" />
<window_info id="File View" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="-1" />
- <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.25046155" order="0" />
- <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="2" />
+ <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.33476394" order="0" />
+ <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.1563458" order="2" />
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" order="6" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="2" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="5" />
@@ -608,118 +935,116 @@
<component name="com.intellij.ide.util.scopeChooser.ScopeChooserConfigurable" proportions="" version="1">
<option name="myLastEditedConfigurable" />
</component>
- <component name="com.intellij.openapi.roots.ui.configuration.projectRoot.ProjectRootMasterDetailsConfigurable" proportions="0.16666667" version="1">
+ <component name="com.intellij.openapi.roots.ui.configuration.projectRoot.ProjectRootMasterDetailsConfigurable" proportions="0.16666667,0.5" version="1">
<option name="myPlainMode" value="false" />
- <option name="myLastEditedConfigurable" value="jboss-dependency.jar" />
+ <option name="myLastEditedConfigurable" value="jboss-rest" />
</component>
<component name="com.intellij.profile.ui.ErrorOptionsConfigurable" proportions="" version="1">
<option name="myLastEditedConfigurable" />
</component>
<component name="editorHistoryManager">
- <entry file="file:///home/hbraun/dev/prj/jbossas/trunk/build/pom.xml">
+ <entry file="file://$PROJECT_DIR$/ant-import-tests/build-jars-jaxws.xml">
<provider selected="true" editor-type-id="text-editor">
- <state line="71" column="26" selection-start="2376" selection-end="2379" vertical-scroll-proportion="1.5926801">
+ <state line="24" column="111" selection-start="1043" selection-end="1043" vertical-scroll-proportion="0.60745615">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/src/main/java/org/jboss/rs/model/ResourceModelParser.java">
+ <entry file="file:///home/hbraun/dev/prj/jbossas/trunk/webservices/src/main/org/jboss/wsf/container/jboss50/AbstractDeployerHook.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="166" column="12" selection-start="4789" selection-end="4789" vertical-scroll-proportion="0.86894923">
+ <state line="64" column="0" selection-start="2343" selection-end="2343" vertical-scroll-proportion="0.18673219">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/build.xml">
+ <entry file="jar://$PROJECT_DIR$/thirdparty/jboss-logging-spi.jar!/org/jboss/logging/Logger.class">
<provider selected="true" editor-type-id="text-editor">
- <state line="189" column="60" selection-start="7859" selection-end="7859" vertical-scroll-proportion="4.316106">
+ <state line="56" column="0" selection-start="2198" selection-end="2198" vertical-scroll-proportion="0.46314496">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/ant-import/build-setup.xml">
+ <entry file="file:///home/hbraun/dev/prj/jbossas/trunk/webservices/src/main/org/jboss/wsf/container/jboss50/AbstractWebServiceDeployer.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="-0.26918536">
+ <state line="62" column="0" selection-start="2276" selection-end="2276" vertical-scroll-proportion="0.63329315">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/ant-import-tests/build-jars-jaxws.xml">
+ <entry file="file:///home/hbraun/dev/prj/jbossas/trunk/webservices/src/main/org/jboss/wsf/container/jboss50/rest/RestDeployerHookPostJSE.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="22" column="40" selection-start="930" selection-end="930" vertical-scroll-proportion="0.76492536">
+ <state line="47" column="10" selection-start="1601" selection-end="1818" vertical-scroll-proportion="0.893848">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/ant-import/build-release.xml">
+ <entry file="file://$PROJECT_DIR$/src/main/resources/jbossrest-context.war/WEB-INF/jboss-web.xml">
<provider selected="true" editor-type-id="text-editor">
<state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/ant-import/build-bin-dist.xml">
+ <entry file="file://$PROJECT_DIR$/src/main/resources/jbossrest-context.war/WEB-INF/web.xml">
<provider selected="true" editor-type-id="text-editor">
- <state line="149" column="60" selection-start="5593" selection-end="5593" vertical-scroll-proportion="1.2087114">
+ <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/ant-import/build-deploy.xml">
+ <entry file="file:///home/hbraun/dev/prj/jbossas/trunk/webservices/src/main/org/jboss/wsf/container/jboss50/JAXWSDeployerHookPostJSE.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="14" column="2" selection-start="775" selection-end="775" vertical-scroll-proportion="0.3">
+ <state line="56" column="49" selection-start="2202" selection-end="2202" vertical-scroll-proportion="0.6875754">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/ant-import-tests/build-testsuite.xml">
+ <entry file="file:///home/hbraun/dev/prj/jbossas/trunk/webservices/src/main/org/jboss/wsf/container/jboss50/JAXWSDeployerHookPreJSE.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="50" column="56" selection-start="2237" selection-end="2252" vertical-scroll-proportion="0.33211008">
+ <state line="105" column="0" selection-start="3744" selection-end="3744" vertical-scroll-proportion="0.1893848">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/src/test-framework/ant-import/build-testsuite.xml">
+ <entry file="file://$PROJECT_DIR$/src/test/resources/rest/deployment/web.xml">
<provider selected="true" editor-type-id="text-editor">
- <state line="126" column="57" selection-start="5768" selection-end="5768" vertical-scroll-proportion="0.4754717">
+ <state line="9" column="63" selection-start="338" selection-end="382" vertical-scroll-proportion="0.20627262">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/ant-import/macros-deploy-rs.xml">
+ <entry file="file://$PROJECT_DIR$/src/test/resources/rest/media/web.xml">
<provider selected="true" editor-type-id="text-editor">
- <state line="428" column="18" selection-start="18143" selection-end="18143" vertical-scroll-proportion="0.5471698">
+ <state line="9" column="63" selection-start="382" selection-end="382" vertical-scroll-proportion="0.20627262">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/ant-import/build-thirdparty.xml">
+ <entry file="jar:///home/hbraun/dev/prj/jbossas/trunk/build/output/jboss-5.0.0.Beta3/lib/jboss-deployers-structure-spi.jar!/org/jboss/deployers/structure/spi/helpers/AbstractDeploymentUnit.class">
<provider selected="true" editor-type-id="text-editor">
- <state line="90" column="68" selection-start="6631" selection-end="6631" vertical-scroll-proportion="0.83773583">
+ <state line="79" column="0" selection-start="4046" selection-end="4046" vertical-scroll-proportion="0.50982803">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/version.properties">
+ <entry file="file:///home/hbraun/dev/prj/jbossas/trunk/webservices/src/main/org/jboss/wsf/container/jboss50/ArchiveDeployerHook.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="35" column="15" selection-start="905" selection-end="905" vertical-scroll-proportion="0.7816514">
+ <state line="94" column="0" selection-start="3414" selection-end="3414" vertical-scroll-proportion="0.19244392">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/src/main/java/org/jboss/rs/deployment/ResourceServlet.java">
+ <entry file="file://$PROJECT_DIR$/src/main/java/org/jboss/rest/container/wsf/ResourceServlet.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="60" column="60" selection-start="2401" selection-end="2401" vertical-scroll-proportion="0.59266055">
+ <state line="96" column="0" selection-start="3556" selection-end="3556" vertical-scroll-proportion="0.38822114">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/src/main/java/org/jboss/rs/deployment/ModelDeploymentAspect.java">
+ <entry file="file://$PROJECT_DIR$/src/test/java/org/jboss/test/rest/deployment/DeploymentTestCase.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="31" column="50" selection-start="1412" selection-end="1412" vertical-scroll-proportion="0.38348624">
- <folding>
- <element signature="imports" expanded="true" />
- </folding>
+ <state line="63" column="65" selection-start="2100" selection-end="2100" vertical-scroll-proportion="0.10271547">
+ <folding />
</state>
</provider>
</entry>
Modified: rest/src/main/etc/component-info50.xml
===================================================================
--- rest/src/main/etc/component-info50.xml 2007-11-21 12:01:29 UTC (rev 5094)
+++ rest/src/main/etc/component-info50.xml 2007-11-21 15:23:56 UTC (rev 5095)
@@ -5,7 +5,7 @@
version="@repository.id@"
licenseType="lgpl">
- <artifact id="jbossrs-50.sar"/>
+ <artifact id="jbossrest-wsf.sar"/>
<import componentref="jboss/jbossws">
<compatible version="@repository.id@"/>
Added: rest/src/main/java/org/jboss/rest/MethodHTTP.java
===================================================================
--- rest/src/main/java/org/jboss/rest/MethodHTTP.java (rev 0)
+++ rest/src/main/java/org/jboss/rest/MethodHTTP.java 2007-11-21 15:23:56 UTC (rev 5095)
@@ -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.rest;
+
+/**
+ * @author Heiko.Braun(a)jboss.com
+ * @version $Revision$
+ */
+public enum MethodHTTP
+{
+ GET, POST, PUT, DELETE, HEAD;
+}
Property changes on: rest/src/main/java/org/jboss/rest/MethodHTTP.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: rest/src/main/java/org/jboss/rest/ResourceError.java
===================================================================
--- rest/src/main/java/org/jboss/rest/ResourceError.java (rev 0)
+++ rest/src/main/java/org/jboss/rest/ResourceError.java 2007-11-21 15:23:56 UTC (rev 5095)
@@ -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.rest;
+
+/**
+ * @author Heiko.Braun(a)jboss.com
+ * @version $Revision$
+ */
+public class ResourceError extends Exception
+{
+ public int status;
+
+ public ResourceError(String message)
+ {
+ super(message);
+ }
+
+ public ResourceError(String message, Throwable cause)
+ {
+ super(message, cause);
+ }
+
+ public ResourceError(int status, String message)
+ {
+ super(message);
+ this.status = status;
+ }
+
+ public ResourceError(int status, String message, Throwable cause)
+ {
+ super(message, cause);
+ this.status = status;
+ }
+}
Property changes on: rest/src/main/java/org/jboss/rest/ResourceError.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: rest/src/main/java/org/jboss/rest/ResourceRegistry.java
===================================================================
--- rest/src/main/java/org/jboss/rest/ResourceRegistry.java (rev 0)
+++ rest/src/main/java/org/jboss/rest/ResourceRegistry.java 2007-11-21 15:23:56 UTC (rev 5095)
@@ -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.rest;
+
+import org.jboss.rest.model.ResourceModel;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Register root resources for webContext's.
+ *
+ * @author Heiko.Braun(a)jboss.com
+ * @version $Revision$
+ */
+public class ResourceRegistry
+{
+ private Map<String, List<ResourceModel>> webContextMapping = new HashMap<String, List<ResourceModel>>();
+
+ public void addResourceModelForContext(String webContext, ResourceModel model)
+ {
+ if(null == webContextMapping.get(webContext))
+ webContextMapping.put(webContext, new ArrayList<ResourceModel>());
+
+ webContextMapping.get(webContext).add(model);
+ }
+
+ public List<ResourceModel> getResourceModelsForContext(String webContext)
+ {
+ if(null == webContextMapping.get(webContext))
+ webContextMapping.put(webContext, new ArrayList<ResourceModel>());
+
+ return webContextMapping.get(webContext);
+ }
+
+}
Property changes on: rest/src/main/java/org/jboss/rest/ResourceRegistry.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: rest/src/main/java/org/jboss/rest/ResourceRegistryFactory.java
===================================================================
--- rest/src/main/java/org/jboss/rest/ResourceRegistryFactory.java (rev 0)
+++ rest/src/main/java/org/jboss/rest/ResourceRegistryFactory.java 2007-11-21 15:23:56 UTC (rev 5095)
@@ -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.rest;
+
+import org.jboss.wsf.common.KernelAwareSPIFactory;
+
+/**
+ * @author Heiko.Braun(a)jboss.com
+ * @version $Revision$
+ */
+public class ResourceRegistryFactory
+{
+ public final static String BEAN_NAME = "RSResourceRegistry";
+
+ public static ResourceRegistryFactory newInstance()
+ {
+ return new ResourceRegistryFactory();
+ }
+
+ public ResourceRegistry createResourceRegistry()
+ {
+ return new KernelAwareSPIFactory().getKernelProvidedSPI(
+ BEAN_NAME, ResourceRegistry.class
+ );
+
+ }
+
+}
Property changes on: rest/src/main/java/org/jboss/rest/ResourceRegistryFactory.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: rest/src/main/java/org/jboss/rest/container/wsf/DescriptorDeploymentAspect.java
===================================================================
--- rest/src/main/java/org/jboss/rest/container/wsf/DescriptorDeploymentAspect.java (rev 0)
+++ rest/src/main/java/org/jboss/rest/container/wsf/DescriptorDeploymentAspect.java 2007-11-21 15:23:56 UTC (rev 5095)
@@ -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.rest.container.wsf;
+
+import org.jboss.rest.model.dd.DeploymentDescriptorParser;
+import org.jboss.rest.model.dd.JbossrsType;
+import org.jboss.rest.model.dd.ResourceType;
+import org.jboss.wsf.spi.SPIProvider;
+import org.jboss.wsf.spi.SPIProviderResolver;
+import org.jboss.wsf.spi.deployment.*;
+
+import java.io.IOException;
+
+/**
+ * Parses the jbossrs descriptor and turns it into a
+ * SPI structure for further consumption.
+ *
+ * @see org.jboss.rest.model.dd.DeploymentDescriptorParser
+ *
+ * @author Heiko.Braun(a)jboss.com
+ * @version $Revision$
+ */
+public class DescriptorDeploymentAspect extends DeploymentAspect
+{
+
+ public final static String RSDD_POINTER = "jbossrs.dd.pointer";
+
+ public void create(Deployment deployment)
+ {
+ try
+ {
+ UnifiedVirtualFile vf = getJBossRSDescriptor(deployment);
+ JbossrsType dd = DeploymentDescriptorParser.read(vf.toURL().openStream());
+
+ // keep the DD model
+ deployment.addAttachment(JbossrsType.class, dd);
+
+ Service service = deployment.getService();
+
+ for(ResourceType resourceDesc : dd.getResource())
+ {
+ String name = resourceDesc.getName() != null ? resourceDesc.getName() : "";
+ String impl = resourceDesc.getImplementation();
+
+ Endpoint ep = newEndpoint(impl);
+ ep.setShortName(name);
+ service.addEndpoint(ep);
+ }
+ }
+ catch (IOException e)
+ {
+ throw new RuntimeException("Failed to parse JBossRS descriptor", e);
+ }
+
+ }
+
+ private UnifiedVirtualFile getJBossRSDescriptor(Deployment deployment)
+ {
+ Object vfs = deployment.getProperty(RSDD_POINTER);
+
+ if(null==vfs)
+ throw new IllegalArgumentException("JBossRS container descripto not found");
+
+ return (UnifiedVirtualFile) vfs;
+ }
+
+ private Endpoint newEndpoint(String impl)
+ {
+ SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
+ DeploymentModelFactory deploymentModelFactory = spiProvider.getSPI(DeploymentModelFactory.class);
+ return deploymentModelFactory.newEndpoint(impl);
+ }
+}
Property changes on: rest/src/main/java/org/jboss/rest/container/wsf/DescriptorDeploymentAspect.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: rest/src/main/java/org/jboss/rest/container/wsf/ModelDeploymentAspect.java
===================================================================
--- rest/src/main/java/org/jboss/rest/container/wsf/ModelDeploymentAspect.java (rev 0)
+++ rest/src/main/java/org/jboss/rest/container/wsf/ModelDeploymentAspect.java 2007-11-21 15:23:56 UTC (rev 5095)
@@ -0,0 +1,70 @@
+/*
+ * 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.rest.container.wsf;
+
+import org.jboss.rest.ResourceRegistry;
+import org.jboss.rest.ResourceRegistryFactory;
+import org.jboss.rest.model.ResourceModel;
+import org.jboss.rest.model.ResourceModelParser;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.DeploymentAspect;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.deployment.Service;
+
+/**
+ * @author Heiko.Braun(a)jboss.com
+ * @version $Revision$
+ */
+public class ModelDeploymentAspect extends DeploymentAspect
+{
+
+ public void create(Deployment deployment)
+ {
+
+ Service service = deployment.getService();
+ String contextRoot = service.getContextRoot();
+
+ if(null == contextRoot)
+ throw new IllegalArgumentException("Null context root");
+
+ ResourceRegistry registry = ResourceRegistryFactory.newInstance().createResourceRegistry();
+
+ ResourceModelParser parser = ResourceModelParser.newInstance();
+ ClassLoader runtimeLoader = deployment.getRuntimeClassLoader();
+
+ for(Endpoint ep : service.getEndpoints())
+ {
+ try
+ {
+ Class c = runtimeLoader.loadClass(ep.getTargetBeanName());
+ ResourceModel rootResource = parser.parse(c);
+ registry.addResourceModelForContext(contextRoot, rootResource);
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException("Failed to load " + ep.getTargetBeanName(), e);
+ }
+
+ }
+
+ }
+}
Property changes on: rest/src/main/java/org/jboss/rest/container/wsf/ModelDeploymentAspect.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: rest/src/main/java/org/jboss/rest/container/wsf/ResourceServlet.java
===================================================================
--- rest/src/main/java/org/jboss/rest/container/wsf/ResourceServlet.java (rev 0)
+++ rest/src/main/java/org/jboss/rest/container/wsf/ResourceServlet.java 2007-11-21 15:23:56 UTC (rev 5095)
@@ -0,0 +1,164 @@
+/*
+ * 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.rest.container.wsf;
+
+import org.jboss.logging.Logger;
+import org.jboss.rest.MethodHTTP;
+import org.jboss.rest.ResourceError;
+import org.jboss.rest.ResourceRegistry;
+import org.jboss.rest.ResourceRegistryFactory;
+import org.jboss.rest.media.DefaultProviderFactory;
+import org.jboss.rest.model.ResourceModel;
+import org.jboss.rest.runtime.InvocationMediator;
+import org.jboss.rest.runtime.RuntimeContext;
+
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.ext.MessageBodyWriter;
+import javax.ws.rs.ext.ProviderFactory;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.PrintWriter;
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author Heiko.Braun(a)jboss.com
+ * @version $Revision$
+ */
+public class ResourceServlet extends HttpServlet
+{
+ private static Logger log = Logger.getLogger(ResourceServlet.class);
+ private List<ResourceModel> rootResources = new ArrayList<ResourceModel>();
+
+ public void init(ServletConfig servletConfig) throws ServletException
+ {
+ ResourceRegistry reg = ResourceRegistryFactory.newInstance().createResourceRegistry();
+ String webContext = servletConfig.getServletContext().getContextPath();
+ List<ResourceModel> models = reg.getResourceModelsForContext(webContext);
+
+ if(models.isEmpty())
+ throw new IllegalArgumentException("No root resources for context " + webContext);
+ else
+ rootResources.addAll(models);
+
+ }
+
+ protected void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
+ {
+ invokeFrom(MethodHTTP.GET, req, res);
+ }
+
+ protected void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
+ {
+ invokeFrom(MethodHTTP.POST, req, res);
+ }
+
+ protected void doPut(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
+ {
+ invokeFrom(MethodHTTP.PUT, req, res);
+ }
+
+ protected void doDelete(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
+ {
+ invokeFrom(MethodHTTP.DELETE, req, res);
+ }
+
+ private void invokeFrom(MethodHTTP method, HttpServletRequest req, HttpServletResponse res)
+ throws ServletException
+ {
+ try
+ {
+ // construct a runtime context
+ URI uri = new URI(req.getRequestURI());
+ RuntimeContext rt = new RuntimeContext(method, uri, rootResources);
+ parseAcceptHeader(req, rt);
+
+ // mediate the invocation
+ InvocationMediator mediator = new InvocationMediator(rt);
+ Object invocationResult = mediator.invoke();
+ Object returnValue = null;
+
+ // may be a Response object
+ if(invocationResult instanceof Response)
+ {
+ Response response = (Response)invocationResult;
+ returnValue = response.getEntity();
+ log.warn("Not implemented: Response metadata currently ignored");
+ }
+ else
+ {
+ returnValue = invocationResult;
+ }
+
+ // response meta data
+ // write to output stream, TODO: mediatypes
+ ProviderFactory providerfactory = DefaultProviderFactory.newInstance();
+ MessageBodyWriter writer = providerfactory.createMessageBodyWriter(returnValue.getClass(), null);
+ OutputStream out = res.getOutputStream();
+ writer.writeTo(returnValue, null, null, out);
+ out.flush();
+ out.close();
+
+ }
+ catch(ResourceError resourceError)
+ {
+ serverError(resourceError.status, resourceError.getMessage(), res);
+ }
+ catch (Throwable e)
+ {
+ throw new ServletException(e);
+ }
+ }
+
+ private void parseAcceptHeader(HttpServletRequest req, RuntimeContext rt) throws ServletException {
+ String requestAccept = req.getHeader("Accept");
+ if(requestAccept!=null)
+ rt.parseAcceptHeader("text/plain, text/html");
+ else
+ throw new ServletException("Accept header is missing");
+ }
+
+ private void serverError(int status, String message, HttpServletResponse res)
+ {
+
+ log.error(status + ":" + message);
+
+ try
+ {
+ res.setStatus(status);
+ PrintWriter out = res.getWriter();
+ out.write(message);
+ out.flush();
+ out.close();
+ }
+ catch (IOException e)
+ {
+ System.out.println("Failed to write response:" + e.getMessage());
+ }
+ }
+}
Property changes on: rest/src/main/java/org/jboss/rest/container/wsf/ResourceServlet.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: rest/src/main/java/org/jboss/rest/container/wsf/ResourceViewServlet.java
===================================================================
--- rest/src/main/java/org/jboss/rest/container/wsf/ResourceViewServlet.java (rev 0)
+++ rest/src/main/java/org/jboss/rest/container/wsf/ResourceViewServlet.java 2007-11-21 15:23:56 UTC (rev 5095)
@@ -0,0 +1,19 @@
+package org.jboss.rest.container.wsf;
+
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.ServletException;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+public class ResourceViewServlet extends HttpServlet
+{
+
+ protected void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
+ {
+ PrintWriter writer = res.getWriter();
+ writer.write("ResourceViewServlet");
+ writer.close();
+ }
+}
Property changes on: rest/src/main/java/org/jboss/rest/container/wsf/ResourceViewServlet.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: rest/src/main/java/org/jboss/rest/media/ContentNegotiation.java
===================================================================
--- rest/src/main/java/org/jboss/rest/media/ContentNegotiation.java (rev 0)
+++ rest/src/main/java/org/jboss/rest/media/ContentNegotiation.java 2007-11-21 15:23:56 UTC (rev 5095)
@@ -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.rest.media;
+
+import org.jboss.rest.model.NoMethodException;
+import org.jboss.rest.model.ResourceMatch;
+import org.jboss.rest.model.ResourceMethod;
+import org.jboss.rest.runtime.RuntimeContext;
+
+import java.util.List;
+
+/**
+ * Matches available resource methods against the runtime context.<br>
+ * Since this is likely to change it can be plugged into the {@link org.jboss.rest.model.StatefulResourceResolver}.
+ *
+ * @author Heiko.Braun(a)jboss.com
+ * @version $Revision$
+ */
+public interface ContentNegotiation
+{
+ ResourceMethod match(RuntimeContext context, List<ResourceMatch<ResourceMethod>> candidates)
+ throws NoMethodException;
+}
Property changes on: rest/src/main/java/org/jboss/rest/media/ContentNegotiation.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: rest/src/main/java/org/jboss/rest/media/DefaultContentNegotiation.java
===================================================================
--- rest/src/main/java/org/jboss/rest/media/DefaultContentNegotiation.java (rev 0)
+++ rest/src/main/java/org/jboss/rest/media/DefaultContentNegotiation.java 2007-11-21 15:23:56 UTC (rev 5095)
@@ -0,0 +1,180 @@
+/*
+ * 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.rest.media;
+
+import org.jboss.logging.Logger;
+import org.jboss.rest.MethodHTTP;
+import org.jboss.rest.model.NoMethodException;
+import org.jboss.rest.model.ResourceMatch;
+import org.jboss.rest.model.ResourceMethod;
+import org.jboss.rest.runtime.RuntimeContext;
+
+import javax.activation.MimeType;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Matches resource methods in the following order:
+ * <ol>
+ * <li>Request Method
+ * <li>Input mime-type
+ * <li>Output mime-type
+ * </ol>
+ *
+ * Failure in any of the above steps can result in a {@link org.jboss.rest.model.NoMethodException}:
+ * <ol>
+ * <li>HTTP 405
+ * <li>HTTP 415
+ * <li>HTTP 406
+ * </ol>
+ *
+ * @see org.jboss.rest.model.StatefulResourceResolver
+ *
+ * @author Heiko.Braun(a)jboss.com
+ * @version $Revision$
+ */
+public class DefaultContentNegotiation implements ContentNegotiation
+{
+
+ private static Logger log = Logger.getLogger(DefaultContentNegotiation.class);
+
+ public ResourceMethod match(RuntimeContext context, List<ResourceMatch<ResourceMethod>> candidates)
+ throws NoMethodException
+ {
+ ResourceMethod match = null;
+
+ for(ResourceMatch<ResourceMethod> candiate : candidates)
+ {
+
+ List<ResourceMethod> matches = matchByHTTPMethod(context, candidates);
+ matches = matchByInputMime(context, matches);
+ matches = matchByOutputMime(context, matches);
+
+ // TODO: sort results, requires abstracting of RegexQualifier to a more general Qualifier
+ log.warn("Conneg sort algo is missing");
+ match = matches.get(0);
+ }
+
+ return match;
+ }
+
+ /**
+ * Match by request method -> HTTP 405
+ * @param context
+ * @param candidates
+ * @return
+ * @throws NoMethodException
+ */
+ private List<ResourceMethod> matchByHTTPMethod(RuntimeContext context, List<ResourceMatch<ResourceMethod>> candidates)
+ throws NoMethodException
+ {
+ List<ResourceMethod> matches = new ArrayList<ResourceMethod>();
+
+ for(ResourceMatch<ResourceMethod> candiate : candidates)
+ {
+ if(context.getRequestMethod() == candiate.model.getMethodHTTP())
+ {
+ matches.add(candiate.model);
+ }
+ }
+
+ if(matches.isEmpty())
+ throw new NoMethodException(405, "The request method is not supported");
+
+ return matches;
+ }
+
+ /**
+ * Match by supported input data format -> HTTP 415
+ * @param context
+ * @param candidates
+ * @return
+ * @throws NoMethodException
+ */
+ private List<ResourceMethod> matchByInputMime(RuntimeContext context, List<ResourceMethod> candidates)
+ throws NoMethodException
+ {
+ List<ResourceMethod> matches = new ArrayList<ResourceMethod>();
+ MethodHTTP requestMethod = context.getRequestMethod();
+
+ // matching by input mime only works on POST and PUT
+ if(MethodHTTP.POST == requestMethod || MethodHTTP.PUT == requestMethod)
+ {
+ MimeType produceMime = context.getProvideMimeType();
+
+ for(ResourceMethod candiate : candidates)
+ {
+ for(MimeType consumeMime : candiate.getConsumeMimeTypes())
+ {
+ if(consumeMime.match(produceMime))
+ matches.add(candiate);
+ }
+ }
+
+ if(matches.isEmpty())
+ throw new NoMethodException(415, "No consumer for " + produceMime);
+ }
+ else
+ {
+ // Not matching by input mime
+ matches = candidates;
+ }
+
+ return matches;
+ }
+
+
+ /**
+ * Match by supported output data format -> HTTP 406
+ *
+ * @param context
+ * @param candidates
+ * @return
+ * @throws NoMethodException
+ */
+ private List<ResourceMethod> matchByOutputMime(RuntimeContext context, List<ResourceMethod> candidates)
+ throws NoMethodException
+ {
+ List<ResourceMethod> matches = new ArrayList<ResourceMethod>();
+ List<MimeType> requestConsumeMimes = context.getConsumeMimeTypes();
+
+ for(ResourceMethod candiate : candidates)
+ {
+ for(MimeType methodProduceMime : candiate.getProduceMimeTypes())
+ {
+ for(MimeType requestConsumeMime : requestConsumeMimes)
+ {
+ if(methodProduceMime.match(requestConsumeMime))
+ matches.add(candiate);
+ }
+ }
+ }
+
+ if(matches.isEmpty())
+ throw new NoMethodException(415, "No producer for " + requestConsumeMimes);
+
+ return matches;
+ }
+
+
+
+}
Property changes on: rest/src/main/java/org/jboss/rest/media/DefaultContentNegotiation.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: rest/src/main/java/org/jboss/rest/media/DefaultProviderFactory.java
===================================================================
--- rest/src/main/java/org/jboss/rest/media/DefaultProviderFactory.java (rev 0)
+++ rest/src/main/java/org/jboss/rest/media/DefaultProviderFactory.java 2007-11-21 15:23:56 UTC (rev 5095)
@@ -0,0 +1,89 @@
+package org.jboss.rest.media;
+
+import org.jboss.rest.media.simple.StringProvider;
+import org.jboss.rest.media.xml.JAXBProvider;
+
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.ext.HeaderProvider;
+import javax.ws.rs.ext.MessageBodyReader;
+import javax.ws.rs.ext.MessageBodyWriter;
+import javax.ws.rs.ext.ProviderFactory;
+import java.util.ArrayList;
+import java.util.List;
+
+
+/**
+ * Ugly hack.
+ * TODO: Provide a scoped (classloading) reader/writer registry that this class can delegate to.
+ */
+public class DefaultProviderFactory extends ProviderFactory
+{
+
+ private static List<MessageBodyReader> reader = new ArrayList<MessageBodyReader>();
+ private static List<MessageBodyWriter> writer = new ArrayList<MessageBodyWriter>();
+
+ static final JAXBProvider JAXB = new JAXBProvider();
+ static final StringProvider STRING = new StringProvider();
+
+ static
+ {
+ reader.add( JAXB );
+ reader.add( STRING );
+
+ writer.add( JAXB );
+ writer.add( STRING );
+ }
+
+ public static ProviderFactory newInstance()
+ {
+ return new DefaultProviderFactory();
+ }
+
+ public <T> T createInstance(Class<T> aClass)
+ {
+ return null;
+ }
+
+ public <T> HeaderProvider<T> createHeaderProvider(Class<T> aClass)
+ {
+ throw new IllegalArgumentException("Not implemented");
+ }
+
+ public <T> MessageBodyReader<T> createMessageBodyReader(Class<T> aClass, MediaType mediaType)
+ {
+ MessageBodyReader match = null;
+
+ for(MessageBodyReader r : reader)
+ {
+ if(r.isReadable(aClass))
+ {
+ match = r;
+ break;
+ }
+ }
+
+ if(null==match)
+ throw new RuntimeException("No reader for type: " + aClass + ", mediaType="+mediaType);
+
+ return match;
+ }
+
+ public <T> MessageBodyWriter<T> createMessageBodyWriter(Class<T> aClass, MediaType mediaType)
+ {
+ MessageBodyWriter match = null;
+
+ for(MessageBodyWriter w : writer)
+ {
+ if(w.isWriteable(aClass))
+ {
+ match = w;
+ break;
+ }
+ }
+
+ if(null==match)
+ throw new RuntimeException("No writer for type: " + aClass + ", mediaType="+mediaType);
+
+ return match;
+ }
+}
Property changes on: rest/src/main/java/org/jboss/rest/media/DefaultProviderFactory.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: rest/src/main/java/org/jboss/rest/media/simple/StringProvider.java
===================================================================
--- rest/src/main/java/org/jboss/rest/media/simple/StringProvider.java (rev 0)
+++ rest/src/main/java/org/jboss/rest/media/simple/StringProvider.java 2007-11-21 15:23:56 UTC (rev 5095)
@@ -0,0 +1,43 @@
+package org.jboss.rest.media.simple;
+
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.MultivaluedMap;
+import javax.ws.rs.ext.MessageBodyReader;
+import javax.ws.rs.ext.MessageBodyWriter;
+import java.io.*;
+
+public class StringProvider implements MessageBodyReader<String>, MessageBodyWriter<String>
+{
+
+ public boolean isReadable(Class<?> aClass)
+ {
+ return aClass == String.class;
+ }
+
+ public String readFrom(Class<String> aClass, MediaType mediaType, MultivaluedMap<String, String> multivaluedMap, InputStream inputStream) throws IOException
+ {
+ Reader reader = new InputStreamReader(inputStream);
+ StringBuilder sb = new StringBuilder();
+ char[] c = new char[1024];
+ int l;
+ while ((l = reader.read(c)) != -1) {
+ sb.append(c, 0, l);
+ }
+ return sb.toString();
+ }
+
+ public boolean isWriteable(Class<?> aClass)
+ {
+ return aClass == String.class;
+ }
+
+ public long getSize(String s)
+ {
+ return s.length();
+ }
+
+ public void writeTo(String s, MediaType mediaType, MultivaluedMap<String, Object> multivaluedMap, OutputStream outputStream) throws IOException
+ {
+ outputStream.write( s.getBytes() );
+ }
+}
Property changes on: rest/src/main/java/org/jboss/rest/media/simple/StringProvider.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: rest/src/main/java/org/jboss/rest/media/xml/JAXBProvider.java
===================================================================
--- rest/src/main/java/org/jboss/rest/media/xml/JAXBProvider.java (rev 0)
+++ rest/src/main/java/org/jboss/rest/media/xml/JAXBProvider.java 2007-11-21 15:23:56 UTC (rev 5095)
@@ -0,0 +1,61 @@
+package org.jboss.rest.media.xml;
+
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.MultivaluedMap;
+import javax.ws.rs.ext.MessageBodyReader;
+import javax.ws.rs.ext.MessageBodyWriter;
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.annotation.XmlRootElement;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+
+public class JAXBProvider implements MessageBodyReader<Object>, MessageBodyWriter<Object>
+{
+ public boolean isReadable(Class<?> aClass)
+ {
+ return aClass.isAnnotationPresent(XmlRootElement.class);
+ }
+
+ public java.lang.Object readFrom(Class<java.lang.Object> aClass, MediaType mediaType, MultivaluedMap<String, String> multivaluedMap, InputStream inputStream) throws IOException
+ {
+ try
+ {
+ JAXBContext jaxb = JAXBContext.newInstance(aClass);
+ Object obj = jaxb.createUnmarshaller().unmarshal(inputStream);
+
+ if(obj instanceof JAXBElement)
+ obj = ((JAXBElement)obj).getValue();
+
+ return obj;
+ } catch (JAXBException e)
+ {
+ throw new IOException(e.getMessage());
+ }
+ }
+
+ public boolean isWriteable(Class<?> aClass)
+ {
+ return aClass.isAnnotationPresent(XmlRootElement.class);
+ }
+
+ public long getSize(java.lang.Object object)
+ {
+ return -1;
+ }
+
+ public void writeTo(java.lang.Object object, MediaType mediaType, MultivaluedMap<String, java.lang.Object> multivaluedMap, OutputStream outputStream) throws IOException
+ {
+ try
+ {
+ JAXBContext jaxb = JAXBContext.newInstance(object.getClass());
+ jaxb.createMarshaller().marshal(object, outputStream);
+ } catch (JAXBException e)
+ {
+ throw new IOException(e.getMessage());
+ }
+ }
+
+}
Property changes on: rest/src/main/java/org/jboss/rest/media/xml/JAXBProvider.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: rest/src/main/java/org/jboss/rest/model/AbstractRegexResolveable.java
===================================================================
--- rest/src/main/java/org/jboss/rest/model/AbstractRegexResolveable.java (rev 0)
+++ rest/src/main/java/org/jboss/rest/model/AbstractRegexResolveable.java 2007-11-21 15:23:56 UTC (rev 5095)
@@ -0,0 +1,174 @@
+/*
+ * 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.rest.model;
+
+import java.util.StringTokenizer;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * @author Heiko.Braun(a)jboss.com
+ * @version $Revision$
+ */
+abstract class AbstractRegexResolveable<T>
+{
+ public final String URI_PARAM_PATTERN = "(.*?)";
+ public final String CHILD_SUFFIX_PATTERN = "(/.*)?";
+ public final String CHILDLESS_SUFFIX_PATTERN = "(/)?";
+
+ protected Pattern regexPattern;
+ private boolean isCompiled;
+
+ protected T parent = null;
+
+ protected void initFromUriTemplate(String uriTemplate)
+ {
+ setupRegexPatterns(uriTemplate, null);
+ }
+
+ protected void setupRegexPatterns(String uriTemplate, UriParamHandler handler)
+ {
+ assert uriTemplate!=null;
+ assert !uriTemplate.startsWith("/");
+
+ StringTokenizer tokenizer = new StringTokenizer(uriTemplate, "/");
+ StringBuffer patternBuffer = new StringBuffer();
+ int groupIndex = 1; // matching regex groups start with 1
+ while(tokenizer.hasMoreTokens())
+ {
+ String tok = tokenizer.nextToken();
+ if(isUriParam(tok))
+ {
+
+ if(groupIndex>1)
+ {
+ // i.e. 'spec/{name}'
+ patternBuffer.append("(/)");
+ groupIndex++;
+ }
+
+ if(handler != null)
+ {
+ // register uri param callback
+ String paramName = tok.substring(1, tok.length()-1);
+ handler.newUriParam(groupIndex, paramName);
+
+ }
+
+ patternBuffer.append( regexFromUriParam(tok) );
+ }
+ else
+ {
+ patternBuffer.append( regexFromPathSegment(tok) );
+ }
+
+ groupIndex++;
+ }
+
+ if(hasChildren())
+ patternBuffer.append(CHILD_SUFFIX_PATTERN);
+ else
+ patternBuffer.append(CHILDLESS_SUFFIX_PATTERN);
+
+
+ String patternString = patternBuffer.toString();
+
+ this.regexPattern = Pattern.compile(patternString);
+ this.isCompiled = true;
+ }
+
+ /**
+ *
+ * @param input a URI string
+ * @return a comparable or <code>null</code> if no match
+ */
+ public RegexQualifier resolve(String input)
+ {
+ assert isCompiled;
+ assert input != null;
+ assert !input.startsWith("/");
+
+ RegexQualifier qualifier = null;
+
+ Matcher matcher = regexPattern.matcher(input);
+ if(! matcher.matches() )
+ return qualifier;
+
+ String lastGroup = matcher.group( matcher.groupCount() );
+ if(null == lastGroup)
+ {
+ lastGroup = "";
+ }
+ else if(lastGroup.startsWith("/"))
+ {
+ lastGroup = lastGroup.substring(1);
+ }
+
+ qualifier = new RegexQualifier(
+ getMatchingGroups(matcher),
+ regexPattern.pattern().length(),
+ lastGroup
+ );
+
+ return qualifier;
+ }
+
+ private static int getMatchingGroups(Matcher m)
+ {
+ int matchingGroups = 0;
+ for(int i=1; i<=m.groupCount(); i++)
+ {
+ String s = m.group(i);
+ if(s!=null && !"".equals(s)) matchingGroups++;
+ }
+ return matchingGroups;
+ }
+
+ private String regexFromPathSegment(String tok)
+ {
+ return "(\\b"+tok+"\\b)";
+ }
+
+ private String regexFromUriParam(String tok)
+ {
+ return URI_PARAM_PATTERN;
+ }
+
+ private boolean isUriParam(String token)
+ {
+ return token.startsWith("{") && token.endsWith("}");
+ }
+
+ public T getParent() {
+ return parent;
+ }
+
+ abstract boolean hasChildren();
+
+ abstract void freeze();
+
+ public interface UriParamHandler
+ {
+ void newUriParam(int regexGroup, String paramName);
+ }
+
+}
Property changes on: rest/src/main/java/org/jboss/rest/model/AbstractRegexResolveable.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: rest/src/main/java/org/jboss/rest/model/AbstractResourceOperation.java
===================================================================
--- rest/src/main/java/org/jboss/rest/model/AbstractResourceOperation.java (rev 0)
+++ rest/src/main/java/org/jboss/rest/model/AbstractResourceOperation.java 2007-11-21 15:23:56 UTC (rev 5095)
@@ -0,0 +1,71 @@
+package org.jboss.rest.model;
+
+import java.lang.reflect.Method;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Common base class for {@link org.jboss.rest.model.ResourceLocator}
+ * and {@link org.jboss.rest.model.ResourceMethod}
+ */
+abstract class AbstractResourceOperation extends AbstractRegexResolveable
+{
+ protected String uriTemplate;
+ protected Method invocationTarget;
+ protected ParameterBinding parameterBinding;
+ protected boolean frozen;
+
+ AbstractResourceOperation(String uriTemplate, Method invocationTarget)
+ {
+ this.uriTemplate = uriTemplate;
+ this.invocationTarget = invocationTarget;
+ }
+
+ void freeze()
+ {
+ // We need to know which param belongs to what regex group
+ final Map<String, Integer> regexInfo = new HashMap<String, Integer>();
+ UriParamHandler collectRegexInfo = new UriParamHandler()
+ {
+ public void newUriParam(int regexGroup, String paramName)
+ {
+ regexInfo.put(paramName, regexGroup);
+ }
+ };
+
+ setupRegexPatterns(this.uriTemplate, collectRegexInfo);
+
+ setupParameterBinding(regexInfo);
+
+ // Lock instance
+ this.frozen = true;
+ }
+
+ private void setupParameterBinding(Map<String, Integer> regexInfo)
+ {
+ // Create ParameterBindig
+ this.parameterBinding = new ParameterBinding(this.regexPattern);
+
+ // Annotations on method parameters
+ this.parameterBinding.registerParameterAnnotations(invocationTarget);
+
+ // Additional info abpout the regex binding
+ for(String paramName : regexInfo.keySet())
+ {
+ int group = regexInfo.get(paramName);
+ this.parameterBinding.registerRegexGroupForParam(group, paramName);
+ }
+ }
+
+ public ParameterBinding getParameterBinding()
+ {
+ assert frozen;
+ return parameterBinding;
+ }
+
+ public OperationBinding getOperationBinding()
+ {
+ assert frozen;
+ return new OperationBinding(this.invocationTarget);
+ }
+}
Property changes on: rest/src/main/java/org/jboss/rest/model/AbstractResourceOperation.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: rest/src/main/java/org/jboss/rest/model/NoMethodException.java
===================================================================
--- rest/src/main/java/org/jboss/rest/model/NoMethodException.java (rev 0)
+++ rest/src/main/java/org/jboss/rest/model/NoMethodException.java 2007-11-21 15:23:56 UTC (rev 5095)
@@ -0,0 +1,51 @@
+/*
+ * 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.rest.model;
+
+import org.jboss.rest.ResourceError;
+
+/**
+ * @author Heiko.Braun(a)jboss.com
+ * @version $Revision$
+ */
+public class NoMethodException extends ResourceError
+{
+ public NoMethodException(String message)
+ {
+ super(message);
+ }
+
+ public NoMethodException(String message, Throwable cause)
+ {
+ super(message, cause);
+ }
+
+ public NoMethodException(int status, String message)
+ {
+ super(status, message);
+ }
+
+ public NoMethodException(int status, String message, Throwable cause)
+ {
+ super(status, message, cause);
+ }
+}
Property changes on: rest/src/main/java/org/jboss/rest/model/NoMethodException.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: rest/src/main/java/org/jboss/rest/model/NoResourceException.java
===================================================================
--- rest/src/main/java/org/jboss/rest/model/NoResourceException.java (rev 0)
+++ rest/src/main/java/org/jboss/rest/model/NoResourceException.java 2007-11-21 15:23:56 UTC (rev 5095)
@@ -0,0 +1,51 @@
+/*
+ * 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.rest.model;
+
+import org.jboss.rest.ResourceError;
+
+/**
+ * @author Heiko.Braun(a)jboss.com
+ * @version $Revision$
+ */
+public class NoResourceException extends ResourceError
+{
+ public NoResourceException(int status, String message)
+ {
+ super(status, message);
+ }
+
+ public NoResourceException(int status, String message, Throwable cause)
+ {
+ super(status, message, cause);
+ }
+
+ public NoResourceException(String message)
+ {
+ super(message);
+ }
+
+ public NoResourceException(String message, Throwable cause)
+ {
+ super(message, cause);
+ }
+}
Property changes on: rest/src/main/java/org/jboss/rest/model/NoResourceException.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: rest/src/main/java/org/jboss/rest/model/OperationBinding.java
===================================================================
--- rest/src/main/java/org/jboss/rest/model/OperationBinding.java (rev 0)
+++ rest/src/main/java/org/jboss/rest/model/OperationBinding.java 2007-11-21 15:23:56 UTC (rev 5095)
@@ -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.rest.model;
+
+import org.jboss.rest.runtime.Invocation;
+import org.jboss.rest.runtime.InvocationModel;
+
+import java.lang.reflect.Method;
+
+/**
+ * @author Heiko.Braun(a)jboss.com
+ * @version $Revision$
+ */
+public class OperationBinding implements InvocationModel
+{
+ private Method invocationTarget;
+
+ public OperationBinding(Method targetMethod)
+ {
+ this.invocationTarget = targetMethod;
+ }
+
+ public void accept(Invocation invocation)
+ {
+ try
+ {
+ Class<?> targetBean = invocationTarget.getDeclaringClass();
+ invocation.setTargetMethod(invocationTarget);
+ invocation.setTargetBean(targetBean);
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException("Failed to build invocation", e);
+ }
+
+
+ }
+}
Property changes on: rest/src/main/java/org/jboss/rest/model/OperationBinding.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: rest/src/main/java/org/jboss/rest/model/ParameterBinding.java
===================================================================
--- rest/src/main/java/org/jboss/rest/model/ParameterBinding.java (rev 0)
+++ rest/src/main/java/org/jboss/rest/model/ParameterBinding.java 2007-11-21 15:23:56 UTC (rev 5095)
@@ -0,0 +1,198 @@
+/*
+ * 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.rest.model;
+
+import org.jboss.rest.MethodHTTP;
+import org.jboss.rest.runtime.ContextAdapterBuilder;
+import org.jboss.rest.runtime.Invocation;
+import org.jboss.rest.runtime.InvocationModel;
+import org.jboss.rest.runtime.RuntimeContext;
+
+import javax.ws.rs.HeaderParam;
+import javax.ws.rs.UriParam;
+import javax.ws.rs.core.HttpContext;
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Method;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * ParameterBinding maps {@link org.jboss.rest.runtime.RuntimeContext} parameter
+ * to {@link Invocation} instances. ParameterBinding works on the full request path
+ * ({@link org.jboss.rest.runtime.RuntimeContext#getPath()}).
+ *
+ * <p>
+ * It carries mapping information about
+ * <ul>
+ * <li>MatrixParam
+ * <li>QueryParam
+ * <li>UriParam
+ * <li>HttpContext
+ * <li>HeaderParam
+ * </ul>
+ *
+ * <p>
+ * UriParameter are extracted by using using regular expressions.
+ *
+ * @see org.jboss.rest.model.ResourceMethod
+ * @see org.jboss.rest.model.ResourceLocator
+ *
+ * @author Heiko.Braun(a)jboss.com
+ * @version $Revision$
+ */
+public class ParameterBinding implements InvocationModel
+{
+ /* Pattern of the owning ResourceMethod */
+ private final Pattern regex;
+
+ /*the total number of parameters */
+ private int totalParameters = 0;
+
+ /*positions of the query parameters*/
+ Map<String, Integer> queryParam = new HashMap<String, Integer>();
+
+ /*positions of the header parameters*/
+ Map<String, Integer> headerParam = new HashMap<String, Integer>();
+
+ /*positions of the header parameters*/
+ Map<String, Integer> uriParam = new HashMap<String, Integer>();
+
+ /* maps regex groups to UriTemplate wildcards */
+ Map<String, Integer> regexMapping = new HashMap<String, Integer>();
+
+ Map<Class, Integer> contextParamter = new HashMap<Class, Integer>();
+
+ private Class entityBodyType = null;
+ private int entityBodyIndex = -1;
+
+ /* Parameter types except for entity body*/
+ Map<Integer, Class> parameterTypes = new HashMap<Integer, Class>();
+
+ ParameterBinding(Pattern rootPattern)
+ {
+ this.regex = rootPattern;
+ }
+
+ public void accept(Invocation invocation)
+ {
+ RuntimeContext ctx = invocation.getContext();
+ String workingPath = ctx.getWorkingPath();
+
+ assert ctx!=null;
+ assert workingPath !=null;
+
+ // local workingPath matching
+ Matcher matcher = regex.matcher(workingPath);
+ boolean matches = matcher.matches();
+
+ if(!matches)
+ throw new RuntimeException("RuntimeContext doesn't match invocation model");
+
+ // @UriParam
+ for(String param : uriParam.keySet())
+ {
+ int paramIndex = uriParam.get(param);
+ String paramValue = matcher.group(regexMapping.get(param));
+ invocation.insertParameterInstance(paramIndex, paramValue);
+ }
+
+ ContextAdapterBuilder builder = new ContextAdapterBuilder(ctx);
+
+ // TODO: @QueryParam and @MatrixParam
+
+ // TODO: @HeaderParam
+
+ // @HttpContext
+ for(Class paramType : contextParamter.keySet())
+ {
+ Object paramInstance = builder.buildTypedAdapter(paramType);
+ invocation.insertParameterInstance(contextParamter.get(paramType), paramInstance);
+ }
+
+ // TODO: Entity body
+ if(entityBodyType != null)
+ {
+ boolean validRequestMethod = MethodHTTP.POST == ctx.getRequestMethod() || MethodHTTP.PUT == ctx.getRequestMethod();
+ if(!validRequestMethod)
+ throw new RuntimeException("No entity body with request type " + ctx.getRequestMethod());
+
+ // unmarshall body
+ }
+ }
+
+ void registerRegexGroupForParam(int group, String paramName)
+ {
+ regexMapping.put(paramName, group);
+ }
+
+ void registerParameterAnnotations(Method method)
+ {
+ for (Annotation[] parameterAnnotations : method.getParameterAnnotations())
+ {
+ if (parameterAnnotations!=null)
+ {
+ for (Annotation annotation : parameterAnnotations)
+ {
+ if(annotation.annotationType() == UriParam.class)
+ {
+ UriParam p = (UriParam)annotation;
+ uriParam.put(p.value(), totalParameters);
+ }
+ else if(annotation.annotationType() == HeaderParam.class)
+ {
+ HeaderParam p = (HeaderParam)annotation;
+ headerParam.put(p.value(), totalParameters);
+ }
+ else if(annotation.annotationType() == HttpContext.class)
+ {
+ HttpContext p = (HttpContext)annotation;
+ int paramPosition = totalParameters > 0 ? totalParameters - 1 : 0;
+ Class httpContextType = method.getParameterTypes()[paramPosition];
+ int httpContextIndex = totalParameters;
+
+ if(null == contextParamter.get(httpContextType))
+ contextParamter.put(httpContextType, httpContextIndex);
+ else
+ throw new RuntimeException("HttpContext on more then one method parameter: " + method.getName()+ "," +httpContextIndex);
+ }
+ }
+
+ }
+ else
+ {
+ // The value of an non-annotated parameter is mapped from the request entity body
+ // Must not be more then one per method
+ if(entityBodyType!=null)
+ throw new RuntimeException("Method " + method.getName() + " contains more then one possible entity body parameters");
+
+ entityBodyType = method.getParameterTypes()[totalParameters-1];
+ entityBodyIndex = totalParameters;
+
+ }
+
+ totalParameters++;
+ }
+ }
+
+}
Property changes on: rest/src/main/java/org/jboss/rest/model/ParameterBinding.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: rest/src/main/java/org/jboss/rest/model/RegexQualifier.java
===================================================================
--- rest/src/main/java/org/jboss/rest/model/RegexQualifier.java (rev 0)
+++ rest/src/main/java/org/jboss/rest/model/RegexQualifier.java 2007-11-21 15:23:56 UTC (rev 5095)
@@ -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.rest.model;
+
+/**
+ * @author Heiko.Braun(a)jboss.com
+ * @version $Revision$
+ */
+public class RegexQualifier implements Comparable
+{
+ public final int numGroups;
+ public final int patternLength;
+ public final String nextUriToken;
+
+ public static RegexQualifier NONE = new RegexQualifier(0,0,"");
+
+ RegexQualifier(int matchingGroups, int patternLenght, String uriToken)
+ {
+ this.numGroups = matchingGroups;
+ this.patternLength = patternLenght;
+
+ if(null == uriToken)
+ throw new IllegalArgumentException("Null UriToken");
+
+ this.nextUriToken = uriToken;
+ }
+
+ public int compareTo(Object o)
+ {
+ if(! (o instanceof RegexQualifier) )
+ throw new IllegalArgumentException("Cannot compare RegexQualifier.class to " + o.getClass());
+
+ RegexQualifier to = (RegexQualifier)o;
+ if(to.numGroups <this.numGroups)
+ return -1;
+ else if(to.numGroups >this.numGroups)
+ return 1;
+ else
+ {
+ // bigger pattern but same number of matching groups
+ // means it's less accurate
+ if(to.patternLength<this.patternLength)
+ return 1;
+ else if(to.patternLength>this.patternLength)
+ return -1;
+ else
+ return 0;
+ }
+
+ }
+
+ public boolean marksEnd()
+ {
+ return ("".equals(nextUriToken) || "/".equals(nextUriToken));
+ }
+
+ public String toString()
+ {
+ return "RegexQualifier{groups="+ numGroups +", patternLength="+patternLength+"}";
+ }
+}
\ No newline at end of file
Property changes on: rest/src/main/java/org/jboss/rest/model/RegexQualifier.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: rest/src/main/java/org/jboss/rest/model/ResourceLocator.java
===================================================================
--- rest/src/main/java/org/jboss/rest/model/ResourceLocator.java (rev 0)
+++ rest/src/main/java/org/jboss/rest/model/ResourceLocator.java 2007-11-21 15:23:56 UTC (rev 5095)
@@ -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.rest.model;
+
+import java.lang.reflect.Method;
+
+/**
+ * Resource locator meta data.
+ *
+ * @author Heiko.Braun(a)jboss.com
+ * @version $Revision$
+ */
+public class ResourceLocator extends AbstractResourceOperation {
+ private ResourceModel link;
+
+ ResourceLocator(ResourceModel parent, Method invocationTarget, ResourceModel link)
+ {
+ super(link.getUriTemplate(), invocationTarget);
+ super.parent = parent;
+ this.link = link;
+ }
+
+ public String getUriTemplate()
+ {
+ return uriTemplate;
+ }
+
+ public ResourceModel field()
+ {
+ return link;
+ }
+
+ boolean hasChildren()
+ {
+ // always append '(/.*)?' to the regex
+ return true;
+ }
+
+ public String toString() {
+ return "ResourceLocator{uri="+uriTemplate+", regex="+regexPattern+"}";
+ }
+}
Property changes on: rest/src/main/java/org/jboss/rest/model/ResourceLocator.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: rest/src/main/java/org/jboss/rest/model/ResourceMatch.java
===================================================================
--- rest/src/main/java/org/jboss/rest/model/ResourceMatch.java (rev 0)
+++ rest/src/main/java/org/jboss/rest/model/ResourceMatch.java 2007-11-21 15:23:56 UTC (rev 5095)
@@ -0,0 +1,48 @@
+/*
+ * 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.rest.model;
+
+/**
+ * @author Heiko.Braun(a)jboss.com
+ * @version $Revision$
+ */
+public class ResourceMatch<T> implements Comparable
+{
+ public final T model;
+ public final RegexQualifier qualifier;
+
+ public ResourceMatch(T model, RegexQualifier weight)
+ {
+ this.model = model;
+ this.qualifier = weight;
+ }
+
+ public int compareTo(Object o)
+ {
+ return qualifier.compareTo(((ResourceMatch<T>)o).qualifier);
+ }
+
+ public String toString()
+ {
+ return "ResourceMatch {model="+model+", weight="+ qualifier +"}";
+ }
+}
Property changes on: rest/src/main/java/org/jboss/rest/model/ResourceMatch.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: rest/src/main/java/org/jboss/rest/model/ResourceMethod.java
===================================================================
--- rest/src/main/java/org/jboss/rest/model/ResourceMethod.java (rev 0)
+++ rest/src/main/java/org/jboss/rest/model/ResourceMethod.java 2007-11-21 15:23:56 UTC (rev 5095)
@@ -0,0 +1,124 @@
+/*
+ * 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.rest.model;
+
+import org.jboss.rest.MethodHTTP;
+import org.jboss.rest.util.Convert;
+
+import javax.activation.MimeType;
+import javax.ws.rs.ConsumeMime;
+import javax.ws.rs.ProduceMime;
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Resource mthod meta data.
+ *
+ * @author Heiko.Braun(a)jboss.com
+ * @version $Revision$
+ */
+public class ResourceMethod extends AbstractResourceOperation {
+
+ private MethodHTTP methodHTTP;
+ private List<MimeType> consumeMimeTypes = new ArrayList<MimeType>();
+ private List<MimeType> produceMimeTypes = new ArrayList<MimeType>();
+
+ ResourceMethod(ResourceModel parent, MethodHTTP method, String uriTemplate, Method invocationTarget)
+ {
+ super(uriTemplate, invocationTarget);
+ super.parent = parent;
+ this.methodHTTP = method;
+ }
+
+ public MethodHTTP getMethodHTTP()
+ {
+ return methodHTTP;
+ }
+
+ public String getUriTemplate()
+ {
+ return this.uriTemplate;
+ }
+
+ boolean hasChildren()
+ {
+ // always append '(/)?' to the regex
+ return false;
+ }
+
+ public Method getInvocationTarget()
+ {
+ return invocationTarget;
+ }
+
+
+ public List<MimeType> getConsumeMimeTypes()
+ {
+ return consumeMimeTypes;
+ }
+
+ public List<MimeType> getProduceMimeTypes()
+ {
+ return produceMimeTypes;
+ }
+
+ void freeze()
+ {
+ super.freeze();
+
+ // parse the mime annotations
+ initMimeTypes();
+ }
+
+ private void initMimeTypes()
+ {
+ // ConsumeMime
+ ConsumeMime consumeMime = (ConsumeMime)mimeFromMethodOrClass(ConsumeMime.class);
+ if(consumeMime != null)
+ consumeMimeTypes.addAll(Convert.annotationToMimeType(consumeMime));
+ else
+ consumeMimeTypes.add( Convert.ANY_MIME );
+
+ // ProduceMime
+ ProduceMime produceMime = (ProduceMime)mimeFromMethodOrClass(ProduceMime.class);
+ if(produceMime != null)
+ produceMimeTypes.addAll(Convert.annotationToMimeType(produceMime));
+ else
+ produceMimeTypes.add( Convert.ANY_MIME );
+ }
+
+ private Annotation mimeFromMethodOrClass( Class type )
+ {
+ Annotation ann = invocationTarget.isAnnotationPresent(type) ?
+ invocationTarget.getAnnotation(type) :
+ invocationTarget.getDeclaringClass().getAnnotation(type);
+
+ return ann;
+ }
+
+ public String toString()
+ {
+ return "ResourceMethod {"+methodHTTP+" uri="+uriTemplate+", regex="+regexPattern+"}";
+ }
+}
Property changes on: rest/src/main/java/org/jboss/rest/model/ResourceMethod.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: rest/src/main/java/org/jboss/rest/model/ResourceModel.java
===================================================================
--- rest/src/main/java/org/jboss/rest/model/ResourceModel.java (rev 0)
+++ rest/src/main/java/org/jboss/rest/model/ResourceModel.java 2007-11-21 15:23:56 UTC (rev 5095)
@@ -0,0 +1,116 @@
+/*
+ * 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.rest.model;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Resource meta data.
+ *
+ * @author Heiko.Braun(a)jboss.com
+ * @version $Revision$
+ */
+public class ResourceModel extends AbstractRegexResolveable
+{
+ private String uriTemplate;
+ private Class invocationTarget;
+
+ private List<ResourceMethod> resourceMethods = new ArrayList<ResourceMethod>();
+ private List<ResourceMethod> subResourceMethods = new ArrayList<ResourceMethod>();
+ private List<ResourceLocator> resourceLocators = new ArrayList<ResourceLocator>();
+
+ ResourceModel(String uriTemplate, Class implementation)
+ {
+ this(null, uriTemplate, implementation);
+ }
+
+ public ResourceModel(ResourceModel parent, String uriTemplate, Class invocationTarget)
+ {
+ super.parent = parent;
+ this.uriTemplate = uriTemplate;
+ this.invocationTarget = invocationTarget;
+ }
+
+ /**
+ * Locks the resource model for further modifications
+ */
+ void freeze()
+ {
+ initFromUriTemplate(this.uriTemplate);
+ }
+
+ public void addResourceMethod(ResourceMethod srm)
+ {
+ resourceMethods.add(srm);
+ }
+
+ public void addSubResourceMethod(ResourceMethod srm)
+ {
+ subResourceMethods.add(srm);
+ }
+
+ public void addSubResourceLocator(ResourceLocator srl)
+ {
+ resourceLocators.add(srl);
+ }
+
+ public boolean hasSubResources()
+ {
+ return !subResourceMethods.isEmpty() || !resourceLocators.isEmpty();
+ }
+
+ public Class getInvocationTarget()
+ {
+ return invocationTarget;
+ }
+
+ public String getUriTemplate()
+ {
+ return uriTemplate;
+ }
+
+ public List<ResourceMethod> getResourceMethods()
+ {
+ return resourceMethods;
+ }
+
+ public List<ResourceMethod> getSubResourceMethods()
+ {
+ return subResourceMethods;
+ }
+
+ public List<ResourceLocator> getResourceLocator()
+ {
+ return resourceLocators;
+ }
+
+ boolean hasChildren()
+ {
+ return hasSubResources();
+ }
+
+ public String toString()
+ {
+ return "ResourceModel {uri=" + uriTemplate + ", regex=" + regexPattern + ", impl=" + invocationTarget + "}";
+ }
+}
Property changes on: rest/src/main/java/org/jboss/rest/model/ResourceModel.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: rest/src/main/java/org/jboss/rest/model/ResourceModelParser.java
===================================================================
--- rest/src/main/java/org/jboss/rest/model/ResourceModelParser.java (rev 0)
+++ rest/src/main/java/org/jboss/rest/model/ResourceModelParser.java 2007-11-21 15:23:56 UTC (rev 5095)
@@ -0,0 +1,166 @@
+/*
+ * 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.rest.model;
+
+import org.jboss.logging.Logger;
+import org.jboss.rest.MethodHTTP;
+import org.jboss.rest.util.Convert;
+
+import javax.ws.rs.HttpMethod;
+import javax.ws.rs.UriTemplate;
+import java.lang.reflect.Method;
+
+/**
+ * @author Heiko.Braun(a)jboss.com
+ * @version $Revision$
+ */
+public class ResourceModelParser
+{
+ private static Logger log = Logger.getLogger(ResourceModelParser.class);
+
+ ResourceModelParser()
+ {
+ }
+
+ public static ResourceModelParser newInstance()
+ {
+ return new ResourceModelParser();
+ }
+
+ public ResourceModel parse(Class bean)
+ {
+ assert bean.isAnnotationPresent(UriTemplate.class);
+
+ // the root resource
+ UriTemplate rootUri = (UriTemplate)bean.getAnnotation(UriTemplate.class);
+ ResourceModel rootResource = new ResourceModel(rootUri.value(), bean);
+
+ log.debug("Creating resource model from bean: " + bean);
+
+ parseInternal(rootResource);
+
+ return rootResource;
+ }
+
+ private void parseInternal(ResourceModel resource)
+ {
+
+ for( Method m : resource.getInvocationTarget().getDeclaredMethods() )
+ {
+ parseMethod(m, resource);
+
+ // todo: constructors
+ }
+
+ // freeze root resource
+ resource.freeze();
+
+ logResourceTree(resource);
+ }
+
+ private void parseMethod(Method method, ResourceModel parentResource)
+ {
+ if(method.isAnnotationPresent(UriTemplate.class))
+ {
+ UriTemplate uri = method.getAnnotation(UriTemplate.class);
+
+ ResourceMethod resourceMethod = null;
+
+ // subresource methods
+
+ if(method.isAnnotationPresent(HttpMethod.class))
+ {
+ // sub resource method
+ HttpMethod a = method.getAnnotation(HttpMethod.class);
+ MethodHTTP methodHttp = a.value().equals("") ?
+ Convert.prefixToMethodHTTP(method) : Convert.annotationToMethodHTTP(a);
+
+ resourceMethod = new ResourceMethod(
+ parentResource,
+ methodHttp, uri.value(), method
+ );
+
+ resourceMethod.freeze();
+ parentResource.addSubResourceMethod(resourceMethod);
+ }
+
+
+ // subresource locator
+ if(null == resourceMethod)
+ {
+ ResourceModel subResource = new ResourceModel(parentResource, uri.value(), method.getReturnType());
+ ResourceLocator locator = new ResourceLocator(parentResource, method, subResource);
+
+ locator.freeze();
+ parentResource.addSubResourceLocator(locator);
+
+ // recursive
+ parseInternal(subResource);
+ }
+ }
+ else
+ {
+ if(method.isAnnotationPresent(HttpMethod.class))
+ {
+ // resource method
+ HttpMethod a = method.getAnnotation(HttpMethod.class);
+ MethodHTTP methodHttp = a.value().equals("") ?
+ Convert.prefixToMethodHTTP(method) : Convert.annotationToMethodHTTP(a);
+
+ ResourceMethod resourceMethod = new ResourceMethod(
+ parentResource,
+ methodHttp, "", method
+ );
+
+ resourceMethod.freeze();
+ parentResource.addResourceMethod(resourceMethod);
+ }
+ }
+ }
+
+ private void logResourceTree(ResourceModel resource)
+ {
+ log.debug("---");
+ log.debug(resource);
+
+ // freeze resource methods
+ for(ResourceMethod rm : resource.getResourceMethods())
+ {
+ log.debug(rm);
+ }
+
+ // log locators methods
+ for(ResourceLocator loc : resource.getResourceLocator())
+ {
+ log.debug(loc);
+ }
+
+ // freeze sub resource methods
+ for(ResourceMethod srm : resource.getSubResourceMethods())
+ {
+ log.debug(srm);
+ }
+
+ log.debug("---");
+ }
+
+}
Property changes on: rest/src/main/java/org/jboss/rest/model/ResourceModelParser.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: rest/src/main/java/org/jboss/rest/model/StatefulResourceResolver.java
===================================================================
--- rest/src/main/java/org/jboss/rest/model/StatefulResourceResolver.java (rev 0)
+++ rest/src/main/java/org/jboss/rest/model/StatefulResourceResolver.java 2007-11-21 15:23:56 UTC (rev 5095)
@@ -0,0 +1,258 @@
+/*
+ * 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.rest.model;
+
+import org.jboss.rest.media.ContentNegotiation;
+import org.jboss.rest.media.DefaultContentNegotiation;
+import org.jboss.rest.runtime.RuntimeContext;
+
+import java.util.*;
+
+/**
+ * Resolves resource methods from {@link org.jboss.rest.runtime.RuntimeContext#getPath()}.<br>
+ * Once a set a of resource methods is identified, the resolver
+ * delegates to a {@link org.jboss.rest.media.ContentNegotiation} plugin
+ * to do a more fine grained media type matching.
+ *
+ * @author Heiko.Braun(a)jboss.com
+ * @version $Revision$
+ */
+public class StatefulResourceResolver
+{
+ // the runtime context
+ private RuntimeContext context;
+
+ // pluggable content negotitation
+ private ContentNegotiation connegPlugin;
+
+ private Stack<ResourceLocator> visitedLocator = new Stack<ResourceLocator>();
+
+ private Map<ResourceLocator, String> locatorWorkingPath = new HashMap<ResourceLocator, String>();
+
+ private String methodWorkingPath;
+
+ /**
+ * Provides a resolver with the default content negotitation.
+ *
+ * @param context the runtime context
+ * @return a configured resource resolver instance
+ */
+ public static StatefulResourceResolver newInstance(RuntimeContext context)
+ {
+ assert context!=null;
+ StatefulResourceResolver resourceResolver = new StatefulResourceResolver(context);
+ resourceResolver.connegPlugin = new DefaultContentNegotiation();
+ return resourceResolver;
+ }
+
+ private StatefulResourceResolver(RuntimeContext context)
+ {
+ this.context = context;
+ }
+
+ public ResourceMethod resolve()
+ throws NoResourceException, NoMethodException
+ {
+ ResourceMethod resourceMethod = null;
+
+ // Filter the set of resource classes by rejecting those whose
+ // regular expression does not match uri
+ List<ResourceMatch> includedResources = new ArrayList<ResourceMatch>();
+ Iterator<ResourceModel> it1 = context.getRootResources().iterator();
+ while(it1.hasNext())
+ {
+ ResourceModel model = it1.next();
+ RegexQualifier qualifier = model.resolve(context.getPath());
+ if(qualifier!=null)
+ includedResources.add( new ResourceMatch(model, qualifier) );
+ }
+
+ if(includedResources.isEmpty())
+ throw new NoResourceException("No resource matches URI '"+context.getPath()+"'");
+
+ Collections.sort(includedResources);
+
+ // DFS by locator, should result in a resource match
+ Iterator<ResourceMatch> it2 = includedResources.iterator();
+ while(it2.hasNext() && null==resourceMethod)
+ {
+ ResourceMatch rootResource = it2.next();
+ resourceMethod = dfsResourceMatch(rootResource);
+ }
+
+ if(null == resourceMethod && visitedLocator.isEmpty())
+ throw new NoMethodException("No method matches URI '"+context.getPath());
+
+ // gotcha
+ return resourceMethod;
+ }
+
+ /**
+ * Recursive scan for resource methods.
+ * Inspect a resource match for methods and if it fails try the locators.
+ *
+ * @param dfsEntry
+ * @return
+ */
+ private ResourceMethod dfsResourceMatch(ResourceMatch dfsEntry)
+ throws NoMethodException, NoResourceException
+ {
+ ResourceMethod resourceMethod = null;
+ String nextUriToken = dfsEntry.qualifier.nextUriToken;
+
+ // resource and subresource methods first
+ resourceMethod = resolveResourceMethod(dfsEntry);
+
+ // root didn't match, so recurse locators to find a resource
+ if(resourceMethod!=null)
+ {
+ methodWorkingPath = nextUriToken;
+ }
+ else
+ {
+ ResourceMatch<ResourceModel> subResource = resolveByLocator(dfsEntry);
+ if(subResource!=null)
+ resourceMethod = dfsResourceMatch(subResource);
+ }
+
+ return resourceMethod;
+ }
+
+ private ResourceMatch<ResourceModel> resolveByLocator(ResourceMatch<ResourceModel> resourceMatch)
+ throws NoResourceException
+ {
+ ResourceMatch<ResourceModel> match = null;
+ String uriToken = resourceMatch.qualifier.nextUriToken;
+
+ List<ResourceMatch<ResourceModel>> weightedResults = new ArrayList<ResourceMatch<ResourceModel>>();
+ Iterator<ResourceLocator> locators = resourceMatch.model.getResourceLocator().iterator();
+ while(locators.hasNext())
+ {
+ ResourceLocator bridge = locators.next();
+ RegexQualifier qualifier = bridge.resolve(uriToken);
+
+ if(qualifier!=null && ! qualifier.marksEnd() )
+ {
+ // a subresource method is the target
+ weightedResults.add( new ResourceMatch<ResourceModel>( bridge.field(), qualifier) );
+ }
+ else if(qualifier!=null)
+ {
+ // the locator is the target itself
+ rememberLocator(bridge, uriToken);
+ }
+ }
+
+ if(!weightedResults.isEmpty())
+ {
+ Collections.sort(weightedResults);
+ match = weightedResults.get(0);
+
+ // for subresource methods we need to identify the locator after sorting
+ for(ResourceLocator loc : resourceMatch.model.getResourceLocator())
+ {
+ if(match.model == loc.field())
+ {
+ rememberLocator(loc, uriToken);
+ }
+ }
+ }
+
+
+
+ return match;
+ }
+
+ private void rememberLocator(ResourceLocator loc, String workingPath)
+ {
+ visitedLocator.add(0, loc);
+ locatorWorkingPath.put(loc, workingPath);
+ }
+
+ private ResourceMethod resolveResourceMethod(ResourceMatch<ResourceModel> methodTarget)
+ throws NoMethodException
+ {
+ ResourceMethod match = null;
+ List<ResourceMatch<ResourceMethod>> matches = new ArrayList<ResourceMatch<ResourceMethod>>();
+ String uriToken = methodTarget.qualifier.nextUriToken;
+
+ if( methodTarget.qualifier.marksEnd() ) // resources methods
+ {
+ // use any available resource method for further mathing by mimetype, etc
+ for(ResourceMethod resourceMethod : methodTarget.model.getResourceMethods())
+ {
+ matches.add(
+ new ResourceMatch<ResourceMethod>(resourceMethod, RegexQualifier.NONE)
+ );
+ }
+ }
+ else // subresource methods
+ {
+ List<ResourceMethod> methods = methodTarget.model.getSubResourceMethods();
+ Iterator<ResourceMethod> it = methods.iterator();
+ while(it.hasNext())
+ {
+ ResourceMethod method = it.next();
+ RegexQualifier qualifier = method.resolve(uriToken);
+ if(qualifier!=null && qualifier.marksEnd() )
+ {
+ matches.add(
+ new ResourceMatch<ResourceMethod>(method, qualifier)
+ );
+ }
+ }
+ }
+
+ if(!matches.isEmpty())
+ {
+ Collections.sort(matches);
+ match = contentNegotiation(matches);
+ }
+
+ return match;
+ }
+
+ private ResourceMethod contentNegotiation(List<ResourceMatch<ResourceMethod>> matches)
+ throws NoMethodException
+ {
+ assert connegPlugin !=null;
+
+ // delegate to conneg plugin
+ return connegPlugin.match(context, matches);
+ }
+
+ public Stack<ResourceLocator> getVisitedLocator() {
+ return visitedLocator;
+ }
+
+ public String getLocatorWorkingPath(ResourceLocator loc)
+ {
+ assert locatorWorkingPath.containsKey(loc);
+ return locatorWorkingPath.get(loc);
+ }
+
+ public String getMethodWorkingPath()
+ {
+ assert methodWorkingPath!=null;
+ return methodWorkingPath;
+ }
+}
Property changes on: rest/src/main/java/org/jboss/rest/model/StatefulResourceResolver.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: rest/src/main/java/org/jboss/rest/model/dd/DeploymentDescriptorParser.java
===================================================================
--- rest/src/main/java/org/jboss/rest/model/dd/DeploymentDescriptorParser.java (rev 0)
+++ rest/src/main/java/org/jboss/rest/model/dd/DeploymentDescriptorParser.java 2007-11-21 15:23:56 UTC (rev 5095)
@@ -0,0 +1,71 @@
+/*
+ * 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.rest.model.dd;
+
+import com.sun.xml.bind.v2.runtime.JAXBContextImpl;
+
+import javax.xml.bind.*;
+import javax.xml.namespace.QName;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+
+/**
+ * Ddeployment descriptor parser
+ * @author Heiko.Braun(a)jboss.com
+ * @version $Revision$
+ */
+public class DeploymentDescriptorParser
+{
+ public static JbossrsType read(InputStream inputStream)
+ throws IOException
+ {
+ try
+ {
+ JAXBContextImpl jc = (JAXBContextImpl) JAXBContext.newInstance( "org.jboss.rest.model.dd" );
+ Unmarshaller unmarshaller = jc.createUnmarshaller();
+ JAXBElement element = ( JAXBElement ) unmarshaller.unmarshal( inputStream );
+ return ( JbossrsType) element.getValue();
+ }
+ catch (JAXBException e)
+ {
+ throw new RuntimeException("Failed to unmarshall container descriptor", e);
+ }
+ }
+
+ public static void write(JbossrsType dd, OutputStream outputStream)
+ throws IOException
+ {
+ try
+ {
+ JAXBContext jaxb = JAXBContext.newInstance(JbossrsType.class);
+ JAXBElement wrapper = new JAXBElement(new QName("http://org.jboss.rest/", "jbossrs"), JbossrsType.class, dd);
+ Marshaller marshaller = jaxb.createMarshaller();
+ marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
+ marshaller.marshal(wrapper, outputStream);
+ }
+ catch (JAXBException e)
+ {
+ throw new RuntimeException("Failed to marshall container descriptor", e);
+ }
+ }
+}
Property changes on: rest/src/main/java/org/jboss/rest/model/dd/DeploymentDescriptorParser.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: rest/src/main/java/org/jboss/rest/model/dd/JbossrsType.java
===================================================================
--- rest/src/main/java/org/jboss/rest/model/dd/JbossrsType.java (rev 0)
+++ rest/src/main/java/org/jboss/rest/model/dd/JbossrsType.java 2007-11-21 15:23:56 UTC (rev 5095)
@@ -0,0 +1,76 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.0.5-b02-fcs
+// See <a href="http://java.sun.com/xml/xml">http://java.sun.com/xml/xml</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2007.11.06 at 02:11:05 PM CET
+//
+
+
+package org.jboss.rest.model.dd;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+import java.util.ArrayList;
+import java.util.List;
+
+
+/**
+ * <p>Java class for jbossrs-type complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="jbossrs-type">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="resource" type="{http://org.jboss.rest/}resource-type" maxOccurs="unbounded"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "jbossrs-type", propOrder = {
+ "resource"
+})
+public class JbossrsType {
+
+ @XmlElement(required = true)
+ protected List<ResourceType> resource;
+
+ /**
+ * Gets the value of the resource 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 resource property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getResource().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link ResourceType }
+ *
+ *
+ */
+ public List<ResourceType> getResource() {
+ if (resource == null) {
+ resource = new ArrayList<ResourceType>();
+ }
+ return this.resource;
+ }
+
+}
Property changes on: rest/src/main/java/org/jboss/rest/model/dd/JbossrsType.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: rest/src/main/java/org/jboss/rest/model/dd/ObjectFactory.java
===================================================================
--- rest/src/main/java/org/jboss/rest/model/dd/ObjectFactory.java (rev 0)
+++ rest/src/main/java/org/jboss/rest/model/dd/ObjectFactory.java 2007-11-21 15:23:56 UTC (rev 5095)
@@ -0,0 +1,68 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.0.5-b02-fcs
+// See <a href="http://java.sun.com/xml/xml">http://java.sun.com/xml/xml</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2007.11.06 at 02:11:05 PM CET
+//
+
+
+package org.jboss.rest.model.dd;
+
+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.rest.model.dd 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 _Jbossrs_QNAME = new QName("http://org.jboss.rest/", "jbossrs");
+
+ /**
+ * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.jboss.rest.model.dd
+ *
+ */
+ public ObjectFactory() {
+ }
+
+ /**
+ * Create an instance of {@link ResourceType }
+ *
+ */
+ public ResourceType createResourceType() {
+ return new ResourceType();
+ }
+
+ /**
+ * Create an instance of {@link JbossrsType }
+ *
+ */
+ public JbossrsType createJbossrsType() {
+ return new JbossrsType();
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link JbossrsType }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://org.jboss.rest/", name = "jbossrs")
+ public JAXBElement<JbossrsType> createJbossrs(JbossrsType value) {
+ return new JAXBElement<JbossrsType>(_Jbossrs_QNAME, JbossrsType.class, null, value);
+ }
+
+}
Property changes on: rest/src/main/java/org/jboss/rest/model/dd/ObjectFactory.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: rest/src/main/java/org/jboss/rest/model/dd/ResourceType.java
===================================================================
--- rest/src/main/java/org/jboss/rest/model/dd/ResourceType.java (rev 0)
+++ rest/src/main/java/org/jboss/rest/model/dd/ResourceType.java 2007-11-21 15:23:56 UTC (rev 5095)
@@ -0,0 +1,94 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.0.5-b02-fcs
+// See <a href="http://java.sun.com/xml/xml">http://java.sun.com/xml/xml</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2007.11.06 at 02:11:05 PM CET
+//
+
+
+package org.jboss.rest.model.dd;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for resource-type complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="resource-type">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="name" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * <element name="implementation" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "resource-type", propOrder = {
+ "name",
+ "implementation"
+})
+public class ResourceType {
+
+ protected String name;
+ protected String implementation;
+
+ /**
+ * Gets the value of the name property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * Sets the value of the name property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setName(String value) {
+ this.name = value;
+ }
+
+ /**
+ * Gets the value of the implementation property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getImplementation() {
+ return implementation;
+ }
+
+ /**
+ * Sets the value of the implementation property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setImplementation(String value) {
+ this.implementation = value;
+ }
+
+}
Property changes on: rest/src/main/java/org/jboss/rest/model/dd/ResourceType.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: rest/src/main/java/org/jboss/rest/model/dd/package-info.java
===================================================================
--- rest/src/main/java/org/jboss/rest/model/dd/package-info.java (rev 0)
+++ rest/src/main/java/org/jboss/rest/model/dd/package-info.java 2007-11-21 15:23:56 UTC (rev 5095)
@@ -0,0 +1,9 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.0.5-b02-fcs
+// See <a href="http://java.sun.com/xml/xml">http://java.sun.com/xml/xml</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2007.11.06 at 02:11:05 PM CET
+//
+
+(a)javax.xml.bind.annotation.XmlSchema(namespace = "http://org.jboss.rest/", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
+package org.jboss.rest.model.dd;
Property changes on: rest/src/main/java/org/jboss/rest/model/dd/package-info.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: rest/src/main/java/org/jboss/rest/runtime/ContextAdapterBuilder.java
===================================================================
--- rest/src/main/java/org/jboss/rest/runtime/ContextAdapterBuilder.java (rev 0)
+++ rest/src/main/java/org/jboss/rest/runtime/ContextAdapterBuilder.java 2007-11-21 15:23:56 UTC (rev 5095)
@@ -0,0 +1,159 @@
+/*
+ * 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.rest.runtime;
+
+import javax.ws.rs.core.*;
+import java.net.URI;
+import java.util.List;
+
+/**
+ * Adopts 311 runtime interfaces to an internal runtime context.<br>
+ * This way typed subsets of runtime information can be exposed, i.e:
+ *
+ * <ul>
+ * <li>{@link javax.ws.rs.core.HttpHeaders}
+ * <li>{@link javax.ws.rs.core.UriInfo}
+ * </ul>
+ * @author Heiko.Braun(a)jboss.com
+ * @version $Revision$
+ */
+public class ContextAdapterBuilder
+{
+ private RuntimeContext context;
+
+ public ContextAdapterBuilder(RuntimeContext context)
+ {
+ this.context = context;
+ }
+
+ public Object buildTypedAdapter(Class type)
+ {
+ Object returnType = null;
+
+ if(HttpHeaders.class == type)
+ {
+ returnType = new HttpHeadersAdapter();
+ }
+ else if (UriInfo.class == type)
+ {
+ returnType = new UriInfoAdapter();
+ }
+
+ if(null==returnType)
+ throw new RuntimeException("Unknown type " + type);
+
+ return returnType;
+ }
+
+ public class HttpHeadersAdapter implements HttpHeaders
+ {
+
+ public MultivaluedMap<String, String> getRequestHeaders()
+ {
+ return null;
+ }
+
+ public List<MediaType> getAcceptableMediaTypes()
+ {
+ return null;
+ }
+
+ public MediaType getMediaType()
+ {
+ return null;
+ }
+
+ public String getLanguage()
+ {
+ return null;
+ }
+
+ public List<Cookie> getCookies()
+ {
+ return null;
+ }
+ }
+
+ public class UriInfoAdapter implements UriInfo
+ {
+
+ public String getPath()
+ {
+ return null;
+ }
+
+ public String getPath(boolean b)
+ {
+ return null;
+ }
+
+ public List<PathSegment> getPathSegments()
+ {
+ return null;
+ }
+
+ public List<PathSegment> getPathSegments(boolean b)
+ {
+ return null;
+ }
+
+ public URI getAbsolute()
+ {
+ return null;
+ }
+
+ public UriBuilder getBuilder()
+ {
+ return null;
+ }
+
+ public URI getBase()
+ {
+ return null;
+ }
+
+ public UriBuilder getBaseBuilder()
+ {
+ return null;
+ }
+
+ public MultivaluedMap<String, String> getTemplateParameters()
+ {
+ return null;
+ }
+
+ public MultivaluedMap<String, String> getTemplateParameters(boolean b)
+ {
+ return null;
+ }
+
+ public MultivaluedMap<String, String> getQueryParameters()
+ {
+ return null;
+ }
+
+ public MultivaluedMap<String, String> getQueryParameters(boolean b)
+ {
+ return null;
+ }
+ }
+}
Property changes on: rest/src/main/java/org/jboss/rest/runtime/ContextAdapterBuilder.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: rest/src/main/java/org/jboss/rest/runtime/DefaultInvocationBuilder.java
===================================================================
--- rest/src/main/java/org/jboss/rest/runtime/DefaultInvocationBuilder.java (rev 0)
+++ rest/src/main/java/org/jboss/rest/runtime/DefaultInvocationBuilder.java 2007-11-21 15:23:56 UTC (rev 5095)
@@ -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.rest.runtime;
+
+/**
+ * @author Heiko.Braun(a)jboss.com
+ * @version $Revision$
+ */
+public class DefaultInvocationBuilder extends InvocationBuilder
+{
+
+ public Invocation build(RuntimeContext context)
+ {
+ // Possible runtime aspects here
+ return super.build(context);
+ }
+}
Property changes on: rest/src/main/java/org/jboss/rest/runtime/DefaultInvocationBuilder.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: rest/src/main/java/org/jboss/rest/runtime/DefaultInvocationHandler.java
===================================================================
--- rest/src/main/java/org/jboss/rest/runtime/DefaultInvocationHandler.java (rev 0)
+++ rest/src/main/java/org/jboss/rest/runtime/DefaultInvocationHandler.java 2007-11-21 15:23:56 UTC (rev 5095)
@@ -0,0 +1,58 @@
+/*
+ * 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.rest.runtime;
+
+/**
+ * @author Heiko.Braun(a)jboss.com
+ * @version $Revision$
+ */
+public class DefaultInvocationHandler implements InvocationHandler
+{
+
+ public Object invoke(Invocation invocation)
+ {
+ try
+ {
+ Object targetInstance = invocation.getTargetInstance() == null ?
+ invocation.getTargetBean().newInstance() :
+ invocation.getTargetInstance();
+
+ Object result;
+
+ if(invocation.getParameterInstances().isEmpty())
+ {
+ result = invocation.getTargetMethod().invoke(targetInstance);
+ }
+ else
+ {
+ result = invocation.getTargetMethod().invoke(
+ targetInstance, invocation.getParameterInstances().toArray()
+ );
+ }
+ return result;
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException("Invocation failed", e);
+ }
+ }
+}
Property changes on: rest/src/main/java/org/jboss/rest/runtime/DefaultInvocationHandler.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: rest/src/main/java/org/jboss/rest/runtime/Invocation.java
===================================================================
--- rest/src/main/java/org/jboss/rest/runtime/Invocation.java (rev 0)
+++ rest/src/main/java/org/jboss/rest/runtime/Invocation.java 2007-11-21 15:23:56 UTC (rev 5095)
@@ -0,0 +1,110 @@
+/*
+ * 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.rest.runtime;
+
+import java.lang.reflect.Method;
+import java.util.LinkedList;
+import java.util.List;
+
+/**
+ * The visitor part of the pattern.
+ *
+ * @see org.jboss.rest.runtime.InvocationModel
+ *
+ * @author Heiko.Braun(a)jboss.com
+ * @version $Revision$
+ */
+public class Invocation
+{
+ private RuntimeContext context;
+
+ // Actual paramter instances
+ private List parameterInstances = new LinkedList();
+
+ // invocation metadata about the method
+ private Method targetMethod;
+
+ // invocation metadata about the bean
+ private Class targetBean;
+
+ private Object targetInstance;
+
+ public Invocation(RuntimeContext context)
+ {
+ this.context = context;
+ }
+
+ public RuntimeContext getContext()
+ {
+ return context;
+ }
+
+ /**
+ * Convinience method to work with String parameter types
+ * @param index
+ * @param param
+ */
+ public void insertParameterInstance(int index, String param)
+ {
+ if(param.startsWith("/"))
+ param = param.substring(1);
+ parameterInstances.add(index, param);
+ }
+
+ public void insertParameterInstance(int index, Object param)
+ {
+ parameterInstances.add(index, param);
+ }
+
+ public List getParameterInstances()
+ {
+ return parameterInstances;
+ }
+
+ public void setTargetMethod(Method targetMethod)
+ {
+ this.targetMethod = targetMethod;
+ }
+
+ public void setTargetBean(Class targetBean)
+ {
+ this.targetBean = targetBean;
+ }
+
+ public Method getTargetMethod()
+ {
+ return targetMethod;
+ }
+
+ public Class getTargetBean()
+ {
+ return targetBean;
+ }
+
+ public Object getTargetInstance() {
+ return targetInstance;
+ }
+
+ public void setTargetInstance(Object targetInstance) {
+ this.targetInstance = targetInstance;
+ }
+}
Property changes on: rest/src/main/java/org/jboss/rest/runtime/Invocation.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: rest/src/main/java/org/jboss/rest/runtime/InvocationBuilder.java
===================================================================
--- rest/src/main/java/org/jboss/rest/runtime/InvocationBuilder.java (rev 0)
+++ rest/src/main/java/org/jboss/rest/runtime/InvocationBuilder.java 2007-11-21 15:23:56 UTC (rev 5095)
@@ -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.rest.runtime;
+
+import java.util.LinkedList;
+import java.util.List;
+
+/**
+ * Gathers invocation models (both static and runtime)
+ * and builds an {@link org.jboss.rest.runtime.Invocation} instance that can be consumed
+ * by an {@link org.jboss.rest.runtime.InvocationHandler}
+ *
+ * @author Heiko.Braun(a)jboss.com
+ * @version $Revision$
+ */
+public abstract class InvocationBuilder
+{
+ private List<InvocationModel> invocationModels = new LinkedList<InvocationModel>();
+
+ /**
+ * Add invocaiton model to an ordered list.
+ *
+ * @param model
+ */
+ public void addInvocationModel(InvocationModel model )
+ {
+ invocationModels.add(model);
+ }
+
+ public Invocation build(RuntimeContext context)
+ {
+ Invocation invocation = new Invocation(context);
+
+ for(InvocationModel model : invocationModels)
+ {
+ model.accept(invocation);
+ }
+
+ return invocation;
+ }
+}
Property changes on: rest/src/main/java/org/jboss/rest/runtime/InvocationBuilder.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: rest/src/main/java/org/jboss/rest/runtime/InvocationHandler.java
===================================================================
--- rest/src/main/java/org/jboss/rest/runtime/InvocationHandler.java (rev 0)
+++ rest/src/main/java/org/jboss/rest/runtime/InvocationHandler.java 2007-11-21 15:23:56 UTC (rev 5095)
@@ -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.rest.runtime;
+
+/**
+ * @author Heiko.Braun(a)jboss.com
+ * @version $Revision$
+ */
+public interface InvocationHandler
+{
+ Object invoke(Invocation invocation);
+}
Property changes on: rest/src/main/java/org/jboss/rest/runtime/InvocationHandler.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: rest/src/main/java/org/jboss/rest/runtime/InvocationMediator.java
===================================================================
--- rest/src/main/java/org/jboss/rest/runtime/InvocationMediator.java (rev 0)
+++ rest/src/main/java/org/jboss/rest/runtime/InvocationMediator.java 2007-11-21 15:23:56 UTC (rev 5095)
@@ -0,0 +1,70 @@
+package org.jboss.rest.runtime;
+
+import org.jboss.rest.ResourceError;
+import org.jboss.rest.model.ResourceLocator;
+import org.jboss.rest.model.ResourceMethod;
+import org.jboss.rest.model.StatefulResourceResolver;
+
+import java.util.Stack;
+
+/**
+ * A resource invocation can go through many locator invocations
+ * before invoking the final resource method. A mediator hides the implementation
+ * details of this process from outermost components.
+ *
+ */
+public class InvocationMediator
+{
+ private RuntimeContext runtimeContext;
+
+ public InvocationMediator(RuntimeContext rt)
+ {
+ this.runtimeContext = rt;
+ }
+
+ public Object invoke() throws ResourceError
+ {
+ Object result = null;
+
+ StatefulResourceResolver resolver = StatefulResourceResolver.newInstance(runtimeContext);
+ ResourceMethod resourceMethod = resolver.resolve();
+
+ // evaluate locator stack
+ Object subResourceInstance = null;
+ Stack<ResourceLocator> visitedLocators = resolver.getVisitedLocator();
+ while(!visitedLocators.isEmpty())
+ {
+ ResourceLocator loc = visitedLocators.pop();
+ runtimeContext.setWorkingPath(resolver.getLocatorWorkingPath(loc));
+
+ InvocationBuilder builder = new DefaultInvocationBuilder();
+ builder.addInvocationModel(loc.getParameterBinding());
+ builder.addInvocationModel(loc.getOperationBinding());
+ Invocation locatorInvocation = builder.build(runtimeContext);
+
+ InvocationHandler bridgeInvoker = new DefaultInvocationHandler();
+ subResourceInstance = bridgeInvoker.invoke(locatorInvocation);
+ result = subResourceInstance; // best match
+ }
+
+ if(resourceMethod!=null)
+ {
+ // create an Invocation instance
+ InvocationBuilder builder = new DefaultInvocationBuilder();
+ runtimeContext.setWorkingPath(resolver.getMethodWorkingPath());
+
+ if(subResourceInstance!=null)
+ builder.addInvocationModel(new PresetInvocationTarget(subResourceInstance));
+
+ builder.addInvocationModel( resourceMethod.getParameterBinding() );
+ builder.addInvocationModel( resourceMethod.getOperationBinding() );
+ Invocation invocation = builder.build(runtimeContext);
+
+ // invoke it
+ InvocationHandler invoker = new DefaultInvocationHandler();
+ result = invoker.invoke(invocation); // more fine grained match
+ }
+
+ return result;
+ }
+}
Property changes on: rest/src/main/java/org/jboss/rest/runtime/InvocationMediator.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: rest/src/main/java/org/jboss/rest/runtime/InvocationModel.java
===================================================================
--- rest/src/main/java/org/jboss/rest/runtime/InvocationModel.java (rev 0)
+++ rest/src/main/java/org/jboss/rest/runtime/InvocationModel.java 2007-11-21 15:23:56 UTC (rev 5095)
@@ -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.rest.runtime;
+
+/**
+ * An <code>InvocationModel</code> will be visited by an {@link org.jboss.rest.runtime.Invocation}
+ * instance and supplies a certain aspect (i.e. Parameter mapping, injection, etc) to it.
+ * <p>
+ * It's the visitable part of the pattern.
+ *
+ * @author Heiko.Braun(a)jboss.com
+ * @version $Revision$
+ */
+public interface InvocationModel
+{
+ void accept(Invocation invocation);
+}
Property changes on: rest/src/main/java/org/jboss/rest/runtime/InvocationModel.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: rest/src/main/java/org/jboss/rest/runtime/PresetInvocationTarget.java
===================================================================
--- rest/src/main/java/org/jboss/rest/runtime/PresetInvocationTarget.java (rev 0)
+++ rest/src/main/java/org/jboss/rest/runtime/PresetInvocationTarget.java 2007-11-21 15:23:56 UTC (rev 5095)
@@ -0,0 +1,17 @@
+package org.jboss.rest.runtime;
+
+public class PresetInvocationTarget implements InvocationModel
+{
+ private Object invocationInstance;
+
+
+ public PresetInvocationTarget(Object invocationInstance) {
+ assert invocationInstance!=null;
+ this.invocationInstance = invocationInstance;
+ }
+
+ public void accept(Invocation invocation) {
+
+ invocation.setTargetInstance(invocationInstance);
+ }
+}
Property changes on: rest/src/main/java/org/jboss/rest/runtime/PresetInvocationTarget.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: rest/src/main/java/org/jboss/rest/runtime/RuntimeContext.java
===================================================================
--- rest/src/main/java/org/jboss/rest/runtime/RuntimeContext.java (rev 0)
+++ rest/src/main/java/org/jboss/rest/runtime/RuntimeContext.java 2007-11-21 15:23:56 UTC (rev 5095)
@@ -0,0 +1,163 @@
+/*
+ * 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.rest.runtime;
+
+import org.jboss.rest.MethodHTTP;
+import org.jboss.rest.model.ResourceModel;
+import org.jboss.rest.util.Convert;
+
+import javax.activation.MimeType;
+import javax.activation.MimeTypeParseException;
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Requesting a resource thorugh HTTP creates a runtime context<br>
+ * The context is associated with a set of {@link ResourceModel}
+ *
+ * @author Heiko.Braun(a)jboss.com
+ * @version $Revision$
+ */
+public class RuntimeContext
+{
+ // Request method
+ private MethodHTTP requestMethod;
+
+ // Request URI
+ private URI uri;
+
+ private String path;
+
+ private String webcontext;
+
+ // Accepted response body mime types
+ private List<MimeType> consumeMimeTypes = new ArrayList<MimeType>();
+
+ // Request body content-type, available with POST or PUT requests
+ private MimeType provideMimeType;
+
+ // The associated runtime model for a web context
+ private List<ResourceModel> rootResources;
+
+ private String workingPath;
+
+ public RuntimeContext(MethodHTTP requestMethod, URI uri, List<ResourceModel> rootResources)
+ {
+ this.requestMethod = requestMethod;
+ this.rootResources = rootResources;
+ this.uri = uri;
+
+ tokenizeUri(this.uri);
+ }
+
+ private void tokenizeUri(URI uri)
+ {
+ try
+ {
+ // path without web context
+ String tmpPath = uri.toString();
+ if(tmpPath.startsWith("/"))
+ tmpPath = tmpPath.substring(1);
+ int i = tmpPath.indexOf("/");
+
+ this.path = tmpPath.substring(i);
+ if(path.startsWith("/"))
+ path = path.substring(1);
+
+ this.webcontext = tmpPath.substring(0, i+1);
+ }
+ catch (Exception e)
+ {
+ throw new IllegalArgumentException(e);
+ }
+
+ }
+
+ public MethodHTTP getRequestMethod()
+ {
+ return requestMethod;
+ }
+
+
+ public List<ResourceModel> getRootResources()
+ {
+ return rootResources;
+ }
+
+ public void parseAcceptHeader(String headerValue)
+ {
+ assert headerValue!=null;
+ consumeMimeTypes.addAll( Convert.mimeStringToMimeTypes(headerValue) );
+ }
+
+ public void parseContentTypeHeader(String headerValue)
+ {
+ try
+ {
+ this.provideMimeType = new MimeType(headerValue);
+ }
+ catch (MimeTypeParseException e)
+ {
+ throw new IllegalArgumentException("Failed to parse 'Content-Type' header", e);
+ }
+ }
+
+ public List<MimeType> getConsumeMimeTypes()
+ {
+ return consumeMimeTypes;
+ }
+
+
+ public MimeType getProvideMimeType()
+ {
+ if(! (requestMethod == MethodHTTP.POST || requestMethod == MethodHTTP.PUT) )
+ throw new IllegalArgumentException(requestMethod + " does not provide a 'Content-Type header'");
+
+ assert provideMimeType !=null;
+
+ return provideMimeType;
+ }
+
+ public String getWebcontext()
+ {
+ return webcontext;
+ }
+
+ /**
+ * @return the path info of the associated URI.
+ */
+ public String getPath()
+ {
+ return path;
+ }
+
+ public String getWorkingPath()
+ {
+ return workingPath;
+ }
+
+ public void setWorkingPath(String workingPath)
+ {
+ this.workingPath = workingPath;
+ }
+}
Property changes on: rest/src/main/java/org/jboss/rest/runtime/RuntimeContext.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: rest/src/main/java/org/jboss/rest/util/Convert.java
===================================================================
--- rest/src/main/java/org/jboss/rest/util/Convert.java (rev 0)
+++ rest/src/main/java/org/jboss/rest/util/Convert.java 2007-11-21 15:23:56 UTC (rev 5095)
@@ -0,0 +1,148 @@
+/*
+ * 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.rest.util;
+
+import org.jboss.rest.MethodHTTP;
+
+import javax.activation.MimeType;
+import javax.activation.MimeTypeParseException;
+import javax.ws.rs.ConsumeMime;
+import javax.ws.rs.HttpMethod;
+import javax.ws.rs.ProduceMime;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.StringTokenizer;
+
+/**
+ * @author Heiko.Braun(a)jboss.com
+ * @version $Revision$
+ */
+public class Convert
+{
+
+ public static MimeType ANY_MIME;
+
+ static
+ {
+ try
+ {
+ ANY_MIME = new MimeType("*/*");
+ }
+ catch (MimeTypeParseException e)
+ {
+ //
+ }
+ }
+
+ public static MethodHTTP prefixToMethodHTTP(Method m)
+ {
+ MethodHTTP result = null;
+
+ String methodName = m.getName();
+ if(methodName.startsWith("get"))
+ result = MethodHTTP.GET;
+ else if(methodName.startsWith("post"))
+ result = MethodHTTP.POST;
+ else if(methodName.startsWith("put"))
+ result = MethodHTTP.PUT;
+ else if(methodName.startsWith("delete"))
+ result = MethodHTTP.DELETE;
+
+ if(null==result)
+ throw new IllegalArgumentException("Failed to match method by prefix: " + methodName);
+
+ return result;
+ }
+
+ public static MethodHTTP annotationToMethodHTTP(HttpMethod a)
+ {
+ HttpMethod hm = (HttpMethod)a;
+ MethodHTTP result = null;
+
+ if(hm.value() == HttpMethod.GET)
+ result = MethodHTTP.GET;
+ else if(hm.value() == HttpMethod.POST)
+ result = MethodHTTP.POST;
+ else if(hm.value() == HttpMethod.PUT)
+ result = MethodHTTP.PUT;
+ else if(hm.value() == HttpMethod.DELETE)
+ result = MethodHTTP.DELETE;
+
+ if(null==result)
+ throw new IllegalArgumentException("Failed to match method by value: " + hm.value());
+
+ return result;
+
+ }
+
+ public static List<MimeType> annotationToMimeType(ConsumeMime consumeMime)
+ {
+ return mimeStringsToMimeTypes(consumeMime.value());
+ }
+
+ public static List<MimeType> annotationToMimeType(ProduceMime produceMime)
+ {
+ return mimeStringsToMimeTypes(produceMime.value());
+ }
+
+ public static List<MimeType> mimeStringToMimeTypes(String mime)
+ {
+ List<MimeType> mimes = new ArrayList<MimeType>();
+
+ try
+ {
+ StringTokenizer tokenizer = new StringTokenizer(mime, ",");
+ while(tokenizer.hasMoreTokens())
+ {
+ String tok = tokenizer.nextToken().trim();
+ if(tok.indexOf("/") != -1) // Ignore mimes without subtype, i.e '*; q=.2'
+ mimes.add( new MimeType(tok) );
+ }
+ }
+ catch (MimeTypeParseException e)
+ {
+ throw new IllegalArgumentException("Failed to parse mime string '"+mime+"'", e);
+ }
+
+ return mimes;
+ }
+
+ public static List<MimeType> mimeStringsToMimeTypes(String[] mimeStrings)
+ {
+ List<MimeType> mimes = new ArrayList<MimeType>();
+
+ try
+ {
+ for(String s : mimeStrings)
+ {
+ mimes.add( new MimeType(s) );
+ }
+ }
+ catch (MimeTypeParseException e)
+ {
+ throw new IllegalArgumentException("Failed to parse mime string '"+mimeStrings+"'", e);
+ }
+
+ return mimes;
+ }
+}
Property changes on: rest/src/main/java/org/jboss/rest/util/Convert.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: rest/src/main/resources/container/wsf/jbossrest-config.xml
===================================================================
--- rest/src/main/resources/container/wsf/jbossrest-config.xml (rev 0)
+++ rest/src/main/resources/container/wsf/jbossrest-config.xml 2007-11-21 15:23:56 UTC (rev 5095)
@@ -0,0 +1,27 @@
+
+ <!-- The registry for REST resources -->
+ <bean name="RSResourceRegistry" class="org.jboss.rest.ResourceRegistry">
+ <!--property name="mbeanServer"><inject bean="RSMBeanServerLocator" property="mbeanServer"/></property-->
+ </bean>
+
+ <!-- RS deployment aspects -->
+ <bean name="RSDescriptorDeploymentAspect" class="org.jboss.rest.container.wsf.DescriptorDeploymentAspect">
+ <property name="provides">ContainerMetaData</property>
+ </bean>
+
+ <bean name="RSModelDeploymentAspect" class="org.jboss.rest.container.wsf.ModelDeploymentAspect">
+ <property name="requires">RuntimeLoader</property>
+ <property name="provides">ResourceModel</property>
+ </bean>
+
+ <bean name="SortingRestDeploymentAspectInstaller" class="org.jboss.wsf.framework.deployment.DeploymentAspectInstaller">
+ <property name="manager"><inject bean="RestDeploymentAspectManager"/></property>
+ <property name="sortAspectsOnCreate">true</property>
+ <property name="aspects">
+ <set class="java.util.HashSet" elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
+ <inject bean="RSDescriptorDeploymentAspect"/>
+ <inject bean="RSModelDeploymentAspect"/>
+ </set>
+ </property>
+ </bean>
+
Property changes on: rest/src/main/resources/container/wsf/jbossrest-config.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: rest/src/main/resources/jbossrest-context.war/WEB-INF/jboss-web.xml
===================================================================
--- rest/src/main/resources/jbossrest-context.war/WEB-INF/jboss-web.xml (rev 0)
+++ rest/src/main/resources/jbossrest-context.war/WEB-INF/jboss-web.xml 2007-11-21 15:23:56 UTC (rev 5095)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!DOCTYPE jboss-web
+ PUBLIC "-//JBoss//DTD Web Application 2.3V2//EN"
+ "http://www.jboss.org/j2ee/dtd/jboss-web_3_2.dtd">
+
+<jboss-web>
+
+ <!-- A security domain that restricts access
+ <security-domain>java:/jaas/JBossWS</security-domain>
+ -->
+
+ <context-root>jbossrest</context-root>
+
+</jboss-web>
Property changes on: rest/src/main/resources/jbossrest-context.war/WEB-INF/jboss-web.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: rest/src/main/resources/jbossrest-context.war/WEB-INF/web.xml
===================================================================
--- rest/src/main/resources/jbossrest-context.war/WEB-INF/web.xml (rev 0)
+++ rest/src/main/resources/jbossrest-context.war/WEB-INF/web.xml 2007-11-21 15:23:56 UTC (rev 5095)
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!--
+ A web application that installs the JBossWS servlets
+
+ $Id$
+-->
+
+<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>JBossRest</display-name>
+
+ <servlet>
+ <servlet-name>ResourceViewServlet</servlet-name>
+ <servlet-class>org.jboss.rest.container.wsf.ResourceViewServlet</servlet-class>
+ </servlet>
+
+ <!-- now the mappings -->
+
+ <servlet-mapping>
+ <servlet-name>ResourceViewServlet</servlet-name>
+ <url-pattern>/resources/*</url-pattern>
+ </servlet-mapping>
+
+
+ <!-- A security constraint that restricts access
+ <security-constraint>
+ <web-resource-collection>
+ <web-resource-name>ContextServlet</web-resource-name>
+ <description>An example security config that only allows users with the
+ role 'friend' to access the JBossWS console web application
+ </description>
+ <url-pattern>/*</url-pattern>
+ <http-method>GET</http-method>
+ <http-method>POST</http-method>
+ </web-resource-collection>
+ <auth-constraint>
+ <role-name>friend</role-name>
+ </auth-constraint>
+ </security-constraint>
+ -->
+
+ <login-config>
+ <auth-method>BASIC</auth-method>
+ <realm-name>JBossWS Management Console</realm-name>
+ </login-config>
+
+ <security-role>
+ <role-name>friend</role-name>
+ </security-role>
+
+ <!--
+ currently the W3C haven't settled on a media type for WSDL;
+ http://www.w3.org/TR/2003/WD-wsdl12-20030303/#ietf-draft
+ for now we go with the basic 'it's XML' response
+ -->
+ <mime-mapping>
+ <extension>wsdl</extension>
+ <mime-type>text/xml</mime-type>
+ </mime-mapping>
+
+ <mime-mapping>
+ <extension>xsd</extension>
+ <mime-type>text/xml</mime-type>
+ </mime-mapping>
+
+ <welcome-file-list id="WelcomeFileList">
+ <welcome-file>index.html</welcome-file>
+ </welcome-file-list>
+
+</web-app>
Property changes on: rest/src/main/resources/jbossrest-context.war/WEB-INF/web.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: rest/src/main/resources/jbossrest-context.war/index.html
===================================================================
--- rest/src/main/resources/jbossrest-context.war/index.html (rev 0)
+++ rest/src/main/resources/jbossrest-context.war/index.html 2007-11-21 15:23:56 UTC (rev 5095)
@@ -0,0 +1,11 @@
+<html><head>
+<meta http-equiv='Content-Type content='text/html; charset=iso-8859-1'>
+<title>JBossRS</title>
+<link rel='stylesheet' href='./styles.css'>
+</head>
+<body>
+
+<div class='pageHeader'>Welcome to JBoss RESTful services</div>
+
+</body>
+</html>
Added: rest/src/main/resources/jbossrest-context.war/styles.css
===================================================================
--- rest/src/main/resources/jbossrest-context.war/styles.css (rev 0)
+++ rest/src/main/resources/jbossrest-context.war/styles.css 2007-11-21 15:23:56 UTC (rev 5095)
@@ -0,0 +1,186 @@
+
+/* table for list views */
+.table_list {
+}
+
+/* table for detail views */
+.table_form {
+}
+
+.pageHeader {
+ font-size: 14pt;
+ font-weight: BOLD;
+ color: #ffffff;
+ border-bottom-width:1px;
+ border-bottom-style:solid;
+ border-color:#000066;
+ margin-bottom:15px;
+ padding-left:15px;
+ padding-top:5px;
+ padding-bottom:5px;
+ background-color: #aaaadd;
+ max-width: 900px;
+}
+
+.pageSection {
+ padding-left:15px;
+ margin-bottom: 5px;
+ max-width: 900px;
+}
+
+.metrics
+{
+ font-size: 6pt;
+ background-color: #dddddd;
+ width: 100%;
+}
+
+/* table row header */
+.list_tr_head {
+ font-family: Verdana, sans-serif;
+ font-size: 8pt;
+ font-weight: 600;
+ text-align: center;
+ background-color: #aaaadd;
+}
+
+/* table row list view */
+.list_tr {
+ font-family: Verdana, sans-serif;
+ font-size: 8pt;
+ color: #000066;
+ vertical-align: top;
+ background-color: #ffffff;
+}
+
+/* table row list view odd lines */
+.list_tr_even {
+ font-family: Verdana, sans-serif;
+ font-size: 8pt;
+ color: #000066;
+ vertical-align: top;
+ background-color: #ffffff;
+}
+
+/* table row list view even lines */
+.list_tr_odd {
+ font-family: Verdana, sans-serif;
+ font-size: 8pt;
+ color: #000066;
+ vertical-align: top;
+ background-color: #dddddd;
+}
+
+/* form label */
+.form_label {
+ font-family: Verdana, sans-serif;
+ font-weight: 500;
+ font-size: 8pt;
+ color: #000066;
+ vertical-align: top;
+ background-color: #dddddd;
+ padding-top: 2px;
+ padding-bottom: 2px;
+}
+
+/* form value */
+.form_value {
+ font-family: Verdana, sans-serif;
+ font-size: 8pt;
+ color: #000066;
+ vertical-align: baseline;
+}
+
+/* tiny writing */
+.tiny {
+ font-family: Verdana, sans-serif;
+ font-size: 8pt;
+ color: #666666;
+}
+
+/* required input fields */
+.inputmust {
+ background-color: #dddddd;
+}
+
+/* error message */
+.error {
+ font-family: Courier New;
+ color: #990000;
+}
+
+/* error message */
+.error_trace {
+ font-family: Courier New;
+}
+
+/* active tree node */
+.tree_active_label {
+ font-weight: bold;
+}
+
+body {
+ font-family: Verdana,, sans-serif;
+ font-size: 8pt;
+ color: #000066;
+ background-color: #ffffff;
+}
+
+/* title style */
+h1 {
+ font-family: Verdana, sans-serif;
+ font-size: 14pt;
+ font-weight: 600;
+ color: #000066;
+}
+
+h2 {
+ font-family: Verdana, sans-serif;
+ font-size: 12pt;
+ font-weight: 600;
+ color: #000066;
+}
+
+h3 {
+ font-family: Verdana, sans-serif;
+ font-size: 10pt;
+ font-weight: 600;
+ color: #000066;
+}
+
+h4 {
+ font-family: Verdana, sans-serif;
+ font-size: 10pt;
+ font-weight: 500;
+ color: #000066;
+}
+
+/* table desk */
+td {
+ font-family: Verdana, sans-serif;
+ font-size: 8pt;
+ padding-left: 5px;
+ padding-right: 5px;
+}
+
+input, textarea, select, option {
+ font-family: Verdana, sans-serif;
+ font-size: 8pt;
+ color: #000066;
+}
+
+a {
+ font-family: Verdana, sans-serif;
+ color: #0000dd;
+ text-decoration: none;
+}
+
+a:hover{
+ font-family: Verdana, sans-serif;
+ color: #cc0000;
+ text-decoration: none;
+}
+
+pre {
+ background:#dddddd
+}
\ No newline at end of file
Deleted: rest/src/main/resources/jbossws-native-config.xml
===================================================================
--- rest/src/main/resources/jbossws-native-config.xml 2007-11-21 12:01:29 UTC (rev 5094)
+++ rest/src/main/resources/jbossws-native-config.xml 2007-11-21 15:23:56 UTC (rev 5095)
@@ -1,172 +0,0 @@
-
- <!-- An abstraction of server configuration aspects. -->
- <bean name="WSServerConfig" class="org.jboss.wsf.stack.jbws.NativeServerConfig">
- <property name="mbeanServer"><inject bean="WSMBeanServerLocator" property="mbeanServer"/></property>
-
- <!--
- The WSDL, that is a required deployment artifact for an endpoint, has a <soap:address>
- element which points to the location of the endpoint. JBoss supports rewriting of that SOAP address.
-
- If the content of <soap:address> is a valid URL, JBossWS will not rewrite it unless 'modifySOAPAddress' is true.
- If the content of <soap:address> is not a valid URL, JBossWS will rewrite it using the attribute values given below.
-
- If 'webServiceHost' is not set, JBossWS uses requesters protocol host when rewriting the <soap:address>.
- -->
- <property name="webServiceHost">${jboss.bind.address}</property>
- <property name="modifySOAPAddress">true</property>
-
- <!--
- Set these properties to explicitly define the ports that will be used for rewriting the SOAP address.
- Otherwise the ports will be identified by querying the list of installed connectors.
- If multiple connectors are found the port of the first connector is used.
- <property name="webServiceSecurePort">8443</property>
- <property name="webServicePort">8080</property>
- -->
- </bean>
-
- <!-- The registry for web service endpoints -->
- <bean name="WSEndpointRegistry" class="org.jboss.wsf.framework.management.ManagedEndpointRegistry">
- <property name="mbeanServer"><inject bean="WSMBeanServerLocator" property="mbeanServer"/></property>
- </bean>
-
- <!-- The registry for REST resources -->
- <bean name="RS_RESOURCE_REGISTRY" class="org.jboss.rs.ResourceRegistry">
- <!--property name="mbeanServer"><inject bean="WSMBeanServerLocator" property="mbeanServer"/></property-->
- </bean>
-
- <!-- A subscription manager for WS-Eventing -->
- <bean name="WSSubscriptionManager" class="org.jboss.ws.extensions.eventing.mgmt.SubscriptionManager">
- <property name="bindAddress">${jboss.bind.address}</property>
- </bean>
-
- <!--
- The stack specific deployment aspects
- -->
- <bean name="WSNativeContextPropertiesDeploymentAspect" class="org.jboss.wsf.framework.deployment.ContextPropertiesDeploymentAspect">
- <property name="provides">ContextProperties, StackDescriptor</property>
- <property name="contextProperties">
- <map keyClass="java.lang.String" valueClass="java.lang.String">
- <entry><key>org.jboss.ws.webapp.ServletClass</key><value>org.jboss.wsf.stack.jbws.EndpointServlet</value></entry>
- </map>
- </property>
- </bean>
-
- <bean name="WSNativeEagerInitializeDeploymentAspect" class="org.jboss.wsf.stack.jbws.EagerInitializeDeploymentAspect">
- <property name="requires">UnifiedMetaDataModel</property>
- <property name="provides">InitializedMetaDataModel</property>
- </bean>
-
- <bean name="WSNativeEndpointHandlerDeploymentAspect" class="org.jboss.wsf.framework.deployment.EndpointHandlerDeploymentAspect">
- <property name="requires">ContainerEndpointHandler, ContainerMetaData</property>
- <property name="provides">StackEndpointHandler</property>
- </bean>
-
- <bean name="WSNativeEventingDeploymentAspect" class="org.jboss.wsf.stack.jbws.EventingDeploymentAspect">
- <property name="requires">UnifiedMetaDataModel</property>
- </bean>
-
- <bean name="WSNativePublishContractDeploymentAspect" class="org.jboss.wsf.stack.jbws.PublishContractDeploymentAspect">
- <property name="requires">UnifiedMetaDataModel, JAXBIntros</property>
- <property name="provides">PublishedContract</property>
- </bean>
-
- <bean name="WSNativeServiceEndpointInvokerDeploymentAspect" class="org.jboss.wsf.stack.jbws.ServiceEndpointInvokerDeploymentAspect">
- <property name="requires">UnifiedMetaDataModel</property>
- </bean>
-
- <bean name="WSNativeUnifiedMetaDataDeploymentAspect" class="org.jboss.wsf.stack.jbws.UnifiedMetaDataDeploymentAspect">
- <property name="requires">RuntimeLoader, ContainerMetaData, URLPattern, VFSRoot, JAXBIntros</property>
- <property name="provides">UnifiedMetaDataModel</property>
- </bean>
-
- <bean name="WSJAXBIntroDeploymentAspect" class="org.jboss.wsf.stack.jbws.JAXBIntroDeploymentAspect">
- <property name="provides">JAXBIntros</property>
- </bean>
-
- <bean name="RSDescriptorDeploymentAspect" class="org.jboss.rs.deployment.DescriptorDeploymentAspect">
- <property name="provides">ContainerMetaData</property>
- </bean>
-
- <bean name="RSModelDeploymentAspect" class="org.jboss.rs.deployment.ModelDeploymentAspect">
- <property name="requires">RuntimeLoader</property>
- <property name="provides">ResourceModel</property>
- </bean>
-
- <!-- Deployment aspect installers -->
- <!-- Phase 1 -->
- <bean name="WSNativeDeploymentAspectInstallerPreJSE" class="org.jboss.wsf.framework.deployment.DeploymentAspectInstaller">
- <property name="manager"><inject bean="WSDeploymentAspectManagerPreJSE"/></property>
- <property name="sortAspectsOnCreate">true</property>
- <property name="aspects">
- <set class="java.util.HashSet" elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
- <inject bean="WSNativeContextPropertiesDeploymentAspect"/>
- </set>
- </property>
- <depends>WSDeploymentAspectInstallerPreJSE</depends>
- </bean>
- <!-- Phase 2 -->
- <bean name="WSNativeDeploymentAspectInstallerPostJSE" class="org.jboss.wsf.framework.deployment.DeploymentAspectInstaller">
- <property name="manager"><inject bean="WSDeploymentAspectManagerPostJSE"/></property>
- <property name="sortAspectsOnCreate">true</property>
- <property name="aspects">
- <set class="java.util.HashSet" elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
- <inject bean="WSNativeEndpointHandlerDeploymentAspect"/>
- <inject bean="WSNativeEventingDeploymentAspect"/>
- <inject bean="WSNativePublishContractDeploymentAspect"/>
- <inject bean="WSNativeServiceEndpointInvokerDeploymentAspect"/>
- <inject bean="WSNativeUnifiedMetaDataDeploymentAspect"/>
- <inject bean="WSNativeEagerInitializeDeploymentAspect"/>
- <inject bean="WSJAXBIntroDeploymentAspect"/>
- </set>
- </property>
- <depends>WSDeploymentAspectInstallerPostJSE</depends>
- </bean>
-
- <bean name="WSNativeDeploymentAspectInstallerEJB" class="org.jboss.wsf.framework.deployment.DeploymentAspectInstaller">
- <property name="manager"><inject bean="WSDeploymentAspectManagerEJB"/></property>
- <property name="sortAspectsOnCreate">true</property>
- <property name="aspects">
- <set class="java.util.HashSet" elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
- <inject bean="WSNativeContextPropertiesDeploymentAspect"/>
- <inject bean="WSNativeEagerInitializeDeploymentAspect"/>
- <inject bean="WSNativeEndpointHandlerDeploymentAspect"/>
- <inject bean="WSNativeEventingDeploymentAspect"/>
- <inject bean="WSNativePublishContractDeploymentAspect"/>
- <inject bean="WSNativeServiceEndpointInvokerDeploymentAspect"/>
- <inject bean="WSNativeUnifiedMetaDataDeploymentAspect"/>
- <inject bean="WSJAXBIntroDeploymentAspect"/>
- </set>
- </property>
- <depends>WSDeploymentAspectInstallerEJB</depends>
- </bean>
-
- <bean name="WSNativeDeploymentAspectInstallerEndpointAPI" class="org.jboss.wsf.framework.deployment.DeploymentAspectInstaller">
- <property name="manager"><inject bean="WSDeploymentAspectManagerEndpointAPI"/></property>
- <property name="sortAspectsOnCreate">true</property>
- <property name="aspects">
- <set class="java.util.HashSet" elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
- <inject bean="WSNativeContextPropertiesDeploymentAspect"/>
- <inject bean="WSNativeEagerInitializeDeploymentAspect"/>
- <inject bean="WSNativeEndpointHandlerDeploymentAspect"/>
- <inject bean="WSNativeEventingDeploymentAspect"/>
- <inject bean="WSNativePublishContractDeploymentAspect"/>
- <inject bean="WSNativeServiceEndpointInvokerDeploymentAspect"/>
- <inject bean="WSNativeUnifiedMetaDataDeploymentAspect"/>
- <inject bean="WSJAXBIntroDeploymentAspect"/>
- </set>
- </property>
- <depends>WSDeploymentAspectInstallerEndpointAPI</depends>
- </bean>
-
-
- <bean name="NativeRestDeploymentAspectInstaller" class="org.jboss.wsf.framework.deployment.DeploymentAspectInstaller">
- <property name="manager"><inject bean="RestDeploymentAspectManager"/></property>
- <property name="sortAspectsOnCreate">true</property>
- <property name="aspects">
- <set class="java.util.HashSet" elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
- <inject bean="RSDescriptorDeploymentAspect"/>
- <inject bean="RSModelDeploymentAspect"/>
- </set>
- </property>
- </bean>
-
Deleted: rest/src/main/resources/schema/eventing.xsd
===================================================================
--- rest/src/main/resources/schema/eventing.xsd 2007-11-21 12:01:29 UTC (rev 5094)
+++ rest/src/main/resources/schema/eventing.xsd 2007-11-21 15:23:56 UTC (rev 5095)
@@ -1,186 +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"/-->
- <xs:import namespace="http://www.w3.org/2005/08/addressing"/>
-
- <!-- 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: rest/src/main/resources/schema/j2ee_1_4.xsd
===================================================================
--- rest/src/main/resources/schema/j2ee_1_4.xsd 2007-11-21 12:01:29 UTC (rev 5094)
+++ rest/src/main/resources/schema/j2ee_1_4.xsd 2007-11-21 15:23:56 UTC (rev 5095)
@@ -1,1607 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsd:schema
- targetNamespace="http://java.sun.com/xml/ns/j2ee"
- xmlns:j2ee="http://java.sun.com/xml/ns/j2ee"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- elementFormDefault="qualified"
- attributeFormDefault="unqualified"
- version="1.4">
- <xsd:annotation>
- <xsd:documentation>
- @(#)j2ee_1_4.xsds 1.43 03/09/16
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
-
- Copyright 2003 Sun Microsystems, Inc., 901 San Antonio
- Road, Palo Alto, California 94303, U.S.A. All rights
- reserved.
-
- Sun Microsystems, Inc. has intellectual property rights
- relating to technology described in this document. In
- particular, and without limitation, these intellectual
- property rights may include one or more of the U.S. patents
- listed at http://www.sun.com/patents and one or more
- additional patents or pending patent applications in the
- U.S. and other countries.
-
- This document and the technology which it describes are
- distributed under licenses restricting their use, copying,
- distribution, and decompilation. No part of this document
- may be reproduced in any form by any means without prior
- written authorization of Sun and its licensors, if any.
-
- Third-party software, including font technology, is
- copyrighted and licensed from Sun suppliers.
-
- Sun, Sun Microsystems, the Sun logo, Solaris, Java, J2EE,
- JavaServer Pages, Enterprise JavaBeans and the Java Coffee
- Cup logo are trademarks or registered trademarks of Sun
- Microsystems, Inc. in the U.S. and other countries.
-
- Federal Acquisitions: Commercial Software - Government Users
- Subject to Standard License Terms and Conditions.
-
- </xsd:documentation>
- </xsd:annotation>
-
-<xsd:annotation>
-<xsd:documentation>
-
-The following definitions that appear in the common
-shareable schema(s) of J2EE deployment descriptors should be
-interpreted with respect to the context they are included:
-
-Deployment Component may indicate one of the following:
- j2ee application;
- application client;
- web application;
- enterprise bean;
- resource adapter;
-
-Deployment File may indicate one of the following:
- ear file;
- war file;
- jar file;
- rar file;
-
-</xsd:documentation>
-</xsd:annotation>
-
- <xsd:import namespace="http://www.w3.org/XML/1998/namespace"
- schemaLocation="http://www.w3.org/2001/xml.xsd"/>
-
- <xsd:include schemaLocation=
- "http://www.ibm.com/webservices/xsd/j2ee_web_services_client_1_1.xsd"/>
-
-
-<!-- **************************************************** -->
-
- <xsd:group name="descriptionGroup">
- <xsd:annotation>
- <xsd:documentation>
-
- This group keeps the usage of the contained description related
- elements consistent across J2EE deployment descriptors.
-
- All elements may occur multiple times with different languages,
- to support localization of the content.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="description"
- type="j2ee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="display-name"
- type="j2ee:display-nameType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="icon"
- type="j2ee:iconType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:group>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="descriptionType">
- <xsd:annotation>
- <xsd:documentation>
-
- The description type is used by a description element to
- provide text describing the parent element. The elements
- that use this type should include any information that the
- Deployment Component's Deployment File file producer wants
- to provide to the consumer of the Deployment Component's
- Deployment File (i.e., to the Deployer). Typically, the
- tools used by such a Deployment File consumer will display
- the description when processing the parent element that
- contains the description.
-
- The lang attribute defines the language that the
- description is provided in. The default value is "en" (English).
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:extension base="j2ee:xsdStringType">
- <xsd:attribute ref="xml:lang"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:simpleType name="dewey-versionType">
- <xsd:annotation>
- <xsd:documentation>
-
- This type defines a dewey decimal which is used
- to describe versions of documents.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:restriction base="xsd:decimal">
- <xsd:whiteSpace value="collapse"/>
- </xsd:restriction>
-
- </xsd:simpleType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="display-nameType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The display-name type contains a short name that is intended
- to be displayed by tools. It is used by display-name
- elements. The display name need not be unique.
-
- Example:
-
- ...
- <display-name xml:lang="en">Employee Self Service</display-name>
-
- The value of the xml:lang attribute is "en" (English) by default.
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:extension base="j2ee:string">
- <xsd:attribute ref="xml:lang"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="ejb-linkType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The ejb-linkType is used by ejb-link
- elements in the ejb-ref or ejb-local-ref elements to specify
- that an EJB reference is linked to enterprise bean.
-
- The value of the ejb-link element must be the ejb-name of an
- enterprise bean in the same ejb-jar file or in another ejb-jar
- file in the same J2EE application unit.
-
- Alternatively, the name in the ejb-link element may be
- composed of a path name specifying the ejb-jar containing the
- referenced enterprise bean with the ejb-name of the target
- bean appended and separated from the path name by "#". The
- path name is relative to the Deployment File containing
- Deployment Component that is referencing the enterprise
- bean. This allows multiple enterprise beans with the same
- ejb-name to be uniquely identified.
-
- Examples:
-
- <ejb-link>EmployeeRecord</ejb-link>
-
- <ejb-link>../products/product.jar#ProductEJB</ejb-link>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:string"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="ejb-local-refType">
- <xsd:annotation>
- <xsd:documentation>
-
- The ejb-local-refType is used by ejb-local-ref elements for
- the declaration of a reference to an enterprise bean's local
- home. The declaration consists of:
-
- - an optional description
- - the EJB reference name used in the code of the Deployment
- Component that's referencing the enterprise bean
- - the expected type of the referenced enterprise bean
- - the expected local home and local interfaces of the
- referenced enterprise bean
- - optional ejb-link information, used to specify the
- referenced enterprise bean
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="j2ee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="ejb-ref-name"
- type="j2ee:ejb-ref-nameType"/>
- <xsd:element name="ejb-ref-type"
- type="j2ee:ejb-ref-typeType"/>
- <xsd:element name="local-home"
- type="j2ee:local-homeType"/>
- <xsd:element name="local"
- type="j2ee:localType"/>
- <xsd:element name="ejb-link"
- type="j2ee:ejb-linkType"
- minOccurs="0"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="ejb-ref-nameType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The ejb-ref-name element contains the name of an EJB
- reference. The EJB reference is an entry in the
- Deployment Component's environment and is relative to the
- java:comp/env context. The name must be unique within the
- Deployment Component.
-
- It is recommended that name is prefixed with "ejb/".
-
- Example:
-
- <ejb-ref-name>ejb/Payroll</ejb-ref-name>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:jndi-nameType"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="ejb-ref-typeType">
- <xsd:annotation>
- <xsd:documentation>
-
- The ejb-ref-typeType contains the expected type of the
- referenced enterprise bean.
-
- The ejb-ref-type designates a value
- that must be one of the following:
-
- Entity
- Session
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:string">
- <xsd:enumeration value="Entity"/>
- <xsd:enumeration value="Session"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="ejb-refType">
- <xsd:annotation>
- <xsd:documentation>
-
- The ejb-refType is used by ejb-ref elements for the
- declaration of a reference to an enterprise bean's home. The
- declaration consists of:
-
- - an optional description
- - the EJB reference name used in the code of
- the Deployment Component that's referencing the enterprise
- bean
- - the expected type of the referenced enterprise bean
- - the expected home and remote interfaces of the referenced
- enterprise bean
- - optional ejb-link information, used to specify the
- referenced enterprise bean
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="j2ee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="ejb-ref-name"
- type="j2ee:ejb-ref-nameType"/>
- <xsd:element name="ejb-ref-type"
- type="j2ee:ejb-ref-typeType"/>
-
- <xsd:element name="home"
- type="j2ee:homeType"/>
- <xsd:element name="remote"
- type="j2ee:remoteType"/>
- <xsd:element name="ejb-link"
- type="j2ee:ejb-linkType"
- minOccurs="0"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="emptyType">
- <xsd:annotation>
- <xsd:documentation>
-
- This type is used to designate an empty
- element when used.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="env-entry-type-valuesType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- This type contains the fully-qualified Java type of the
- environment entry value that is expected by the
- application's code.
-
- The following are the legal values of env-entry-type-valuesType:
-
- java.lang.Boolean
- java.lang.Byte
- java.lang.Character
- java.lang.String
- java.lang.Short
- java.lang.Integer
- java.lang.Long
- java.lang.Float
- java.lang.Double
-
- Example:
-
- <env-entry-type>java.lang.Boolean</env-entry-type>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:string">
- <xsd:enumeration value="java.lang.Boolean"/>
- <xsd:enumeration value="java.lang.Byte"/>
- <xsd:enumeration value="java.lang.Character"/>
- <xsd:enumeration value="java.lang.String"/>
- <xsd:enumeration value="java.lang.Short"/>
- <xsd:enumeration value="java.lang.Integer"/>
- <xsd:enumeration value="java.lang.Long"/>
- <xsd:enumeration value="java.lang.Float"/>
- <xsd:enumeration value="java.lang.Double"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="env-entryType">
- <xsd:annotation>
- <xsd:documentation>
-
- The env-entryType is used to declare an application's
- environment entry. The declaration consists of an optional
- description, the name of the environment entry, and an
- optional value. If a value is not specified, one must be
- supplied during deployment.
-
- It is used by env-entry elements.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="j2ee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="env-entry-name"
- type="j2ee:jndi-nameType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The env-entry-name element contains the name of a
- Deployment Component's environment entry. The name
- is a JNDI name relative to the java:comp/env
- context. The name must be unique within a
- Deployment Component. The uniqueness
- constraints must be defined within the declared
- context.
-
- Example:
-
- <env-entry-name>minAmount</env-entry-name>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="env-entry-type"
- type="j2ee:env-entry-type-valuesType"/>
-
- <xsd:element name="env-entry-value"
- type="j2ee:xsdStringType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The env-entry-value designates the value of a
- Deployment Component's environment entry. The value
- must be a String that is valid for the
- constructor of the specified type that takes a
- single String parameter, or for java.lang.Character,
- a single character.
-
- Example:
-
- <env-entry-value>100.00</env-entry-value>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The elements that use this type designate the name of a
- Java class or interface. The name is in the form of a
- "binary name", as defined in the JLS. This is the form
- of name used in Class.forName(). Tools that need the
- canonical name (the name used in source code) will need
- to convert this binary name to the canonical name.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:string"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="generic-booleanType">
- <xsd:annotation>
- <xsd:documentation>
-
- This type defines four different values which can designate
- boolean values. This includes values yes and no which are
- not designated by xsd:boolean
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:string">
- <xsd:enumeration value="true"/>
- <xsd:enumeration value="false"/>
- <xsd:enumeration value="yes"/>
- <xsd:enumeration value="no"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="homeType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The homeType defines the fully-qualified name of
- an enterprise bean's home interface.
-
- Example:
-
- <home>com.aardvark.payroll.PayrollHome</home>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:fully-qualified-classType"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="iconType">
- <xsd:annotation>
- <xsd:documentation>
-
- The icon type contains small-icon and large-icon elements
- that specify the file names for small and large GIF or
- JPEG icon images used to represent the parent element in a
- GUI tool.
-
- The xml:lang attribute defines the language that the
- icon file names are provided in. Its value is "en" (English)
- by default.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="small-icon" type="j2ee:pathType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The small-icon element contains the name of a file
- containing a small (16 x 16) icon image. The file
- name is a relative path within the Deployment
- Component's Deployment File.
-
- The image may be either in the JPEG or GIF format.
- The icon can be used by tools.
-
- Example:
-
- <small-icon>employee-service-icon16x16.jpg</small-icon>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="large-icon" type="j2ee:pathType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The large-icon element contains the name of a file
- containing a large
- (32 x 32) icon image. The file name is a relative
- path within the Deployment Component's Deployment
- File.
-
- The image may be either in the JPEG or GIF format.
- The icon can be used by tools.
-
- Example:
-
- <large-icon>employee-service-icon32x32.jpg</large-icon>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- </xsd:sequence>
-
- <xsd:attribute ref="xml:lang"/>
- <xsd:attribute name="id" type="xsd:ID"/>
-
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="java-identifierType">
- <xsd:annotation>
- <xsd:documentation>
-
- The java-identifierType defines a Java identifier.
- The users of this type should further verify that
- the content does not contain Java reserved keywords.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:string">
- <xsd:pattern value="($|_|\p{L})(\p{L}|\p{Nd}|_|$)*"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="java-typeType">
- <xsd:annotation>
- <xsd:documentation>
-
- This is a generic type that designates a Java primitive
- type or a fully qualified name of a Java interface/type,
- or an array of such types.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:string">
- <xsd:pattern value="[^\p{Z}]*"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="jndi-nameType">
- <xsd:annotation>
- <xsd:documentation>
-
- The jndi-nameType type designates a JNDI name in the
- Deployment Component's environment and is relative to the
- java:comp/env context. A JNDI name must be unique within the
- Deployment Component.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:string"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:group name="jndiEnvironmentRefsGroup">
- <xsd:annotation>
- <xsd:documentation>
-
- This group keeps the usage of the contained JNDI environment
- reference elements consistent across J2EE deployment descriptors.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="env-entry"
- type="j2ee:env-entryType"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="ejb-ref"
- type="j2ee:ejb-refType"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="ejb-local-ref"
- type="j2ee:ejb-local-refType"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:group ref="j2ee:service-refGroup"/>
- <xsd:element name="resource-ref"
- type="j2ee:resource-refType"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="resource-env-ref"
- type="j2ee:resource-env-refType"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="message-destination-ref"
- type="j2ee:message-destination-refType"
- minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:group>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="listenerType">
- <xsd:annotation>
- <xsd:documentation>
-
- The listenerType indicates the deployment properties for a web
- application listener bean.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:group ref="j2ee:descriptionGroup"/>
- <xsd:element name="listener-class"
- type="j2ee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The listener-class element declares a class in the
- application must be registered as a web
- application listener bean. The value is the fully
- qualified classname of the listener class.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="local-homeType">
- <xsd:annotation>
- <xsd:documentation>
-
- The local-homeType defines the fully-qualified
- name of an enterprise bean's local home interface.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:fully-qualified-classType"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="localType">
- <xsd:annotation>
- <xsd:documentation>
-
- The localType defines the fully-qualified name of an
- enterprise bean's local interface.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:fully-qualified-classType"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="message-destination-linkType">
- <xsd:annotation>
- <xsd:documentation>
-
- The message-destination-linkType is used to link a message
- destination reference or message-driven bean to a message
- destination.
-
- The Assembler sets the value to reflect the flow of messages
- between producers and consumers in the application.
-
- The value must be the message-destination-name of a message
- destination in the same Deployment File or in another
- Deployment File in the same J2EE application unit.
-
- Alternatively, the value may be composed of a path name
- specifying a Deployment File containing the referenced
- message destination with the message-destination-name of the
- destination appended and separated from the path name by
- "#". The path name is relative to the Deployment File
- containing Deployment Component that is referencing the
- message destination. This allows multiple message
- destinations with the same name to be uniquely identified.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:string"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="message-destination-refType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The message-destination-ref element contains a declaration
- of Deployment Component's reference to a message destination
- associated with a resource in Deployment Component's
- environment. It consists of:
-
- - an optional description
- - the message destination reference name
- - the message destination type
- - a specification as to whether the
- destination is used for
- consuming or producing messages, or both
- - a link to the message destination
-
- Examples:
-
- <message-destination-ref>
- <message-destination-ref-name>jms/StockQueue
- </message-destination-ref-name>
- <message-destination-type>javax.jms.Queue
- </message-destination-type>
- <message-destination-usage>Consumes
- </message-destination-usage>
- <message-destination-link>CorporateStocks
- </message-destination-link>
- </message-destination-ref>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="description"
- type="j2ee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="message-destination-ref-name"
- type="j2ee:jndi-nameType">
- <xsd:annotation>
- <xsd:documentation>
-
- The message-destination-ref-name element specifies
- the name of a message destination reference; its
- value is the environment entry name used in
- Deployment Component code. The name is a JNDI name
- relative to the java:comp/env context and must be
- unique within an ejb-jar (for enterprise beans) or a
- Deployment File (for others).
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="message-destination-type"
- type="j2ee:message-destination-typeType"/>
- <xsd:element name="message-destination-usage"
- type="j2ee:message-destination-usageType"/>
- <xsd:element name="message-destination-link"
- type="j2ee:message-destination-linkType"
- minOccurs="0"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
-
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="message-destination-typeType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The message-destination-typeType specifies the type of
- the destination. The type is specified by the Java interface
- expected to be implemented by the destination.
-
- Example:
-
- <message-destination-type>javax.jms.Queue
- </message-destination-type>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:fully-qualified-classType"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="message-destination-usageType">
- <xsd:annotation>
- <xsd:documentation>
-
- The message-destination-usageType specifies the use of the
- message destination indicated by the reference. The value
- indicates whether messages are consumed from the message
- destination, produced for the destination, or both. The
- Assembler makes use of this information in linking producers
- of a destination with its consumers.
-
- The value of the message-destination-usage element must be
- one of the following:
- Consumes
- Produces
- ConsumesProduces
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:string">
- <xsd:enumeration value="Consumes"/>
- <xsd:enumeration value="Produces"/>
- <xsd:enumeration value="ConsumesProduces"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="message-destinationType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The message-destinationType specifies a message
- destination. The logical destination described by this
- element is mapped to a physical destination by the Deployer.
-
- The message destination element contains:
-
- - an optional description
- - an optional display-name
- - an optional icon
- - a message destination name which must be unique
- among message destination names within the same
- Deployment File.
-
- Example:
-
- <message-destination>
- <message-destination-name>CorporateStocks
- </message-destination-name>
- </message-destination>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:group ref="j2ee:descriptionGroup"/>
- <xsd:element name="message-destination-name"
- type="j2ee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- The message-destination-name element specifies a
- name for a message destination. This name must be
- unique among the names of message destinations
- within the Deployment File.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="param-valueType">
- <xsd:annotation>
- <xsd:documentation>
-
- This type is a general type that can be used to declare
- parameter/value lists.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="j2ee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="param-name"
- type="j2ee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- The param-name element contains the name of a
- parameter.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="param-value"
- type="j2ee:xsdStringType">
- <xsd:annotation>
- <xsd:documentation>
-
- The param-value element contains the value of a
- parameter.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="pathType">
- <xsd:annotation>
- <xsd:documentation>
-
- The elements that use this type designate either a relative
- path or an absolute path starting with a "/".
-
- In elements that specify a pathname to a file within the
- same Deployment File, relative filenames (i.e., those not
- starting with "/") are considered relative to the root of
- the Deployment File's namespace. Absolute filenames (i.e.,
- those starting with "/") also specify names in the root of
- the Deployment File's namespace. In general, relative names
- are preferred. The exception is .war files where absolute
- names are preferred for consistency with the Servlet API.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:string"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="remoteType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The remote element contains the fully-qualified name
- of the enterprise bean's remote interface.
-
- Example:
-
- <remote>com.wombat.empl.EmployeeService</remote>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:fully-qualified-classType"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="res-authType">
- <xsd:annotation>
- <xsd:documentation>
-
- The res-authType specifies whether the Deployment Component
- code signs on programmatically to the resource manager, or
- whether the Container will sign on to the resource manager
- on behalf of the Deployment Component. In the latter case,
- the Container uses information that is supplied by the
- Deployer.
-
- The value must be one of the two following:
-
- Application
- Container
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:string">
- <xsd:enumeration value="Application"/>
- <xsd:enumeration value="Container"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="res-sharing-scopeType">
- <xsd:annotation>
- <xsd:documentation>
-
- The res-sharing-scope type specifies whether connections
- obtained through the given resource manager connection
- factory reference can be shared. The value, if specified,
- must be one of the two following:
-
- Shareable
- Unshareable
-
- The default value is Shareable.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:string">
- <xsd:enumeration value="Shareable"/>
- <xsd:enumeration value="Unshareable"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="resource-env-refType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The resource-env-refType is used to define
- resource-env-type elements. It contains a declaration of a
- Deployment Component's reference to an administered object
- associated with a resource in the Deployment Component's
- environment. It consists of an optional description, the
- resource environment reference name, and an indication of
- the resource environment reference type expected by the
- Deployment Component code.
-
- Example:
-
- <resource-env-ref>
- <resource-env-ref-name>jms/StockQueue
- </resource-env-ref-name>
- <resource-env-ref-type>javax.jms.Queue
- </resource-env-ref-type>
- </resource-env-ref>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="j2ee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="resource-env-ref-name"
- type="j2ee:jndi-nameType">
- <xsd:annotation>
- <xsd:documentation>
-
- The resource-env-ref-name element specifies the name
- of a resource environment reference; its value is
- the environment entry name used in
- the Deployment Component code. The name is a JNDI
- name relative to the java:comp/env context and must
- be unique within a Deployment Component.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="resource-env-ref-type"
- type="j2ee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The resource-env-ref-type element specifies the type
- of a resource environment reference. It is the
- fully qualified name of a Java language class or
- interface.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="resource-refType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The resource-refType contains a declaration of a
- Deployment Component's reference to an external resource. It
- consists of an optional description, the resource manager
- connection factory reference name, the indication of the
- resource manager connection factory type expected by the
- Deployment Component code, the type of authentication
- (Application or Container), and an optional specification of
- the shareability of connections obtained from the resource
- (Shareable or Unshareable).
-
- Example:
-
- <resource-ref>
- <res-ref-name>jdbc/EmployeeAppDB</res-ref-name>
- <res-type>javax.sql.DataSource</res-type>
- <res-auth>Container</res-auth>
- <res-sharing-scope>Shareable</res-sharing-scope>
- </resource-ref>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="j2ee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="res-ref-name"
- type="j2ee:jndi-nameType">
- <xsd:annotation>
- <xsd:documentation>
-
- The res-ref-name element specifies the name of a
- resource manager connection factory reference.
- The name is a JNDI name relative to the
- java:comp/env context.
- The name must be unique within a Deployment File.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="res-type"
- type="j2ee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The res-type element specifies the type of the data
- source. The type is specified by the fully qualified
- Java language class or interface
- expected to be implemented by the data source.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="res-auth"
- type="j2ee:res-authType"/>
-
- <xsd:element name="res-sharing-scope"
- type="j2ee:res-sharing-scopeType"
- minOccurs="0"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="role-nameType">
- <xsd:annotation>
- <xsd:documentation>
-
- The role-nameType designates the name of a security role.
-
- The name must conform to the lexical rules for a token.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:string"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="run-asType">
- <xsd:annotation>
- <xsd:documentation>
-
- The run-asType specifies the run-as identity to be
- used for the execution of a component. It contains an
- optional description, and the name of a security role.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="j2ee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="role-name"
- type="j2ee:role-nameType"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="security-role-refType">
- <xsd:annotation>
- <xsd:documentation>
-
- The security-role-refType contains the declaration of a
- security role reference in a component's or a
- Deployment Component's code. The declaration consists of an
- optional description, the security role name used in the
- code, and an optional link to a security role. If the
- security role is not specified, the Deployer must choose an
- appropriate security role.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="j2ee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="role-name"
- type="j2ee:role-nameType">
- <xsd:annotation>
- <xsd:documentation>
-
- The value of the role-name element must be the String used
- as the parameter to the
- EJBContext.isCallerInRole(String roleName) method or the
- HttpServletRequest.isUserInRole(String role) method.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="role-link"
- type="j2ee:role-nameType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The role-link element is a reference to a defined
- security role. The role-link element must contain
- the name of one of the security roles defined in the
- security-role elements.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="security-roleType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The security-roleType contains the definition of a security
- role. The definition consists of an optional description of the
- security role, and the security role name.
-
- Example:
-
- <security-role>
- <description>
- This role includes all employees who are authorized
- to access the employee service application.
- </description>
- <role-name>employee</role-name>
- </security-role>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="j2ee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="role-name"
- type="j2ee:role-nameType"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="string">
- <xsd:annotation>
- <xsd:documentation>
-
- This is a special string datatype that is defined by J2EE as
- a base type for defining collapsed strings. When schemas
- require trailing/leading space elimination as well as
- collapsing the existing whitespace, this base type may be
- used.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:extension base="xsd:token">
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="true-falseType">
- <xsd:annotation>
- <xsd:documentation>
-
- This simple type designates a boolean with only two
- permissible values
-
- - true
- - false
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:xsdBooleanType">
- <xsd:pattern value="(true|false)"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="url-patternType">
- <xsd:annotation>
- <xsd:documentation>
-
- The url-patternType contains the url pattern of the mapping.
- It must follow the rules specified in Section 11.2 of the
- Servlet API Specification. This pattern is assumed to be in
- URL-decoded form and must not contain CR(#xD) or LF(#xA).
- If it contains those characters, the container must inform
- the developer with a descriptive error message.
- The container must preserve all characters including whitespaces.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:extension base="xsd:string"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="xsdAnyURIType">
- <xsd:annotation>
- <xsd:documentation>
-
- This type adds an "id" attribute to xsd:anyURI.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:extension base="xsd:anyURI">
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="xsdBooleanType">
- <xsd:annotation>
- <xsd:documentation>
-
- This type adds an "id" attribute to xsd:boolean.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:extension base="xsd:boolean">
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="xsdIntegerType">
- <xsd:annotation>
- <xsd:documentation>
-
- This type adds an "id" attribute to xsd:integer.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:extension base="xsd:integer">
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="xsdNMTOKENType">
- <xsd:annotation>
- <xsd:documentation>
-
- This type adds an "id" attribute to xsd:NMTOKEN.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:extension base="xsd:NMTOKEN">
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="xsdNonNegativeIntegerType">
- <xsd:annotation>
- <xsd:documentation>
-
- This type adds an "id" attribute to xsd:nonNegativeInteger.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:extension base="xsd:nonNegativeInteger">
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="xsdPositiveIntegerType">
- <xsd:annotation>
- <xsd:documentation>
-
- This type adds an "id" attribute to xsd:positiveInteger.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:extension base="xsd:positiveInteger">
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="xsdQNameType">
- <xsd:annotation>
- <xsd:documentation>
-
- This type adds an "id" attribute to xsd:QName.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:extension base="xsd:QName">
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="xsdStringType">
- <xsd:annotation>
- <xsd:documentation>
-
- This type adds an "id" attribute to xsd:string.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:extension base="xsd:string">
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
-</xsd:schema>
-
Deleted: rest/src/main/resources/schema/j2ee_jaxrpc_mapping_1_1.xsd
===================================================================
--- rest/src/main/resources/schema/j2ee_jaxrpc_mapping_1_1.xsd 2007-11-21 12:01:29 UTC (rev 5094)
+++ rest/src/main/resources/schema/j2ee_jaxrpc_mapping_1_1.xsd 2007-11-21 15:23:56 UTC (rev 5095)
@@ -1,885 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://java.sun.com/xml/ns/j2ee"
- xmlns:j2ee="http://java.sun.com/xml/ns/j2ee"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- elementFormDefault="qualified"
- attributeFormDefault="unqualified"
- version="1.1">
- <xsd:annotation>
- <xsd:documentation>
- @(#)j2ee_jaxrpc_mapping_1_1.xsds 1.11 09/03/03
-
- Based on j2ee_jaxrpc_mapping_1_0.dtd, Last updated: 09/19/2002 10:26
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
-
- Copyright 2003 Sun Microsystems, Inc., 901 San Antonio
- Road, Palo Alto, California 94303, U.S.A. All rights
- reserved.
-
- Sun Microsystems, Inc. has intellectual property rights
- relating to technology described in this document. In
- particular, and without limitation, these intellectual
- property rights may include one or more of the U.S. patents
- listed at http://www.sun.com/patents and one or more
- additional patents or pending patent applications in the
- U.S. and other countries.
-
- This document and the technology which it describes are
- distributed under licenses restricting their use, copying,
- distribution, and decompilation. No part of this document
- may be reproduced in any form by any means without prior
- written authorization of Sun and its licensors, if any.
-
- Third-party software, including font technology, is
- copyrighted and licensed from Sun suppliers.
-
- Sun, Sun Microsystems, the Sun logo, Solaris, Java, J2EE,
- JavaServer Pages, Enterprise JavaBeans and the Java Coffee
- Cup logo are trademarks or registered trademarks of Sun
- Microsystems, Inc. in the U.S. and other countries.
-
- Federal Acquisitions: Commercial Software - Government Users
- Subject to Standard License Terms and Conditions.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
-
- (C) Copyright International Business Machines Corporation 2002
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The element describes the Java mapping to a known WSDL document.
-
- It contains the mapping between package names and XML namespaces,
- WSDL root types and Java artifacts, and the set of mappings for
- services.
-
- All java-wsdl-mapping deployment descriptors must indicate the
- schema by using the J2EE namespace:
-
- http://java.sun.com/xml/ns/j2ee
-
- and by indicating the version of the schema by using the
- version element as shown below:
-
- <java-wsdl-mapping 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://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd"
- version="1.1">
- ...
- </java-wsdl-mapping>
-
- The instance documents may indicate the published version of
- the schema using the xsi:schemaLocation attribute for J2EE
- namespace with the following location:
-
- http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
-
- The following conventions apply to all J2EE
- deployment descriptor elements unless indicated otherwise.
-
- - In elements that specify a pathname to a file within the
- same JAR file, relative filenames (i.e., those not
- starting with "/") are considered relative to the root of
- the JAR file's namespace. Absolute filenames (i.e., those
- starting with "/") also specify names in the root of the
- JAR file's namespace. In general, relative names are
- preferred. The exception is .war files where absolute
- names are preferred for consistency with the Servlet API.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:include schemaLocation="j2ee_1_4.xsd"/>
-
-
- <!-- **************************************************** -->
-
-
- <xsd:element name="java-wsdl-mapping" type="j2ee:java-wsdl-mappingType">
- <xsd:annotation>
- <xsd:documentation>
-
- This is the root of the java-wsdl-mapping deployment descriptor.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="constructor-parameter-orderType">
- <xsd:annotation>
- <xsd:documentation>
-
- The constructor-parameter-order element defines the order
- that complexType element values are applied to a Java
- exception constructor. Element names are specified for each
- parameter of the constructor, including element names of
- inherited types if necessary.
-
- Used in: exception-mapping
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="element-name"
- type="j2ee:string"
- minOccurs="1" maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- The element-name element defines the name of a complexType
- element name attribute value.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="exception-mappingType">
- <xsd:annotation>
- <xsd:documentation>
-
- The exception-mapping element defines the mapping between the
- service specific exception types and wsdl faults and
- SOAP headerfaults.
-
- This element should be interpreted with respect to the
- mapping between a method and an operation which provides the
- mapping context.
-
- Used in: service-endpoint-method-mapping
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="exception-type"
- type="j2ee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The exception-type element defines Java type of the exception.
- It may be a service specific exception.
-
- It must be a fully qualified class name.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="wsdl-message"
- type="j2ee:wsdl-messageType"/>
- <xsd:element name="wsdl-message-part-name"
- type="j2ee:wsdl-message-part-nameType"
- minOccurs="0" maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
-
- The wsdl-message-part-name element is required only
- when the message referenced by the wsdl-message element
- has more than one part.
-
- This only occurs when multiple headerfaults use the
- same message.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="constructor-parameter-order"
- type="j2ee:constructor-parameter-orderType"
- minOccurs="0" maxOccurs="1"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="java-wsdl-mappingType">
- <xsd:annotation>
- <xsd:documentation>
-
- The element describes the Java mapping to a known WSDL document.
-
- It contains the mapping between package names and XML namespaces,
- WSDL root types and Java artifacts, and the set of mappings for
- services.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="package-mapping"
- type="j2ee:package-mappingType"
- minOccurs="1" maxOccurs="unbounded"/>
- <xsd:element name="java-xml-type-mapping"
- type="j2ee:java-xml-type-mappingType"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="exception-mapping"
- type="j2ee:exception-mappingType"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:sequence minOccurs="0" maxOccurs="unbounded">
- <xsd:element name="service-interface-mapping"
- type="j2ee:service-interface-mappingType"
- minOccurs="0" maxOccurs="1"/>
- <xsd:element name="service-endpoint-interface-mapping"
- type="j2ee:service-endpoint-interface-mappingType"
- minOccurs="1" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:sequence>
-
- <xsd:attribute name="version"
- type="j2ee:dewey-versionType"
- fixed="1.1"
- use="required">
- <xsd:annotation>
- <xsd:documentation>
-
- The required value for the version is 1.1.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:attribute>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="java-xml-type-mappingType">
- <xsd:annotation>
- <xsd:documentation>
-
- The java-xml-type-mapping element contains a java-type that is the
- fully qualified name of the Java class, primitive type, or array
- type, QName of the XML root type or anonymous type, the WSDL type
- scope the QName applies to and the set of variable mappings for
- each public variable within the Java class.
-
- Used in: java-wsdl-mapping
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="java-type"
- type="j2ee:java-typeType">
- <xsd:annotation>
- <xsd:documentation>
-
- The java-type element is the fully qualified class name of
- a Java class, primitive, or array type.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <choice>
- <xsd:element name="root-type-qname"
- type="j2ee:xsdQNameType">
- <xsd:annotation>
- <xsd:documentation>
-
- The root-type-qname identifies the WSDL QName of an XML type.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="anonymous-type-qname"
- type="j2ee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- The anonymous-type-qname identifies the WSDL QName of an
- anonymous XML type.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </choice>
- <xsd:element name="qname-scope"
- type="j2ee:qname-scopeType"/>
- <xsd:element name="variable-mapping"
- type="j2ee:variable-mappingType"
- minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="method-param-parts-mappingType">
- <xsd:annotation>
- <xsd:documentation>
-
- The method-param-parts-mapping element defines the mapping between a
- Java method parameters and a wsdl-message.
-
- Used in: service-endpoint-method-mapping
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="param-position"
- type="j2ee:xsdNonNegativeIntegerType">
- <xsd:annotation>
- <xsd:documentation>
-
- The param-position element defines the position of a
- parameter within a Java method. It must be an integer
- starting from 0.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="param-type"
- type="j2ee:java-typeType">
- <xsd:annotation>
- <xsd:documentation>
-
- The param-type element defines the fully qualified
- class name of a Java class, primitive, or array type.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="wsdl-message-mapping"
- type="j2ee:wsdl-message-mappingType"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="package-mappingType">
- <xsd:annotation>
- <xsd:documentation>
-
- The package-mapping indicates the mapping between java-package-name
- and XML namespace in the WSDL document.
-
- Used in: java-wsdl-mapping
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="package-type"
- type="j2ee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The package-type indicates the Java package name. It must be a fully
- qualified package name, even though the XML schema type is
- fully-qualified-classType.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="namespaceURI"
- type="j2ee:xsdAnyURIType">
- <xsd:annotation>
- <xsd:documentation>
-
- The namespaceURI element indicates a URI.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="parameter-modeType">
- <xsd:annotation>
- <xsd:documentation>
-
- The parameter-mode element defines the mode of the parameter.
- It can have only three values, IN, OUT, INOUT.
-
- Used in: java-xml-type-mapping
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:string">
- <xsd:enumeration value="IN"/>
- <xsd:enumeration value="OUT"/>
- <xsd:enumeration value="INOUT"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="port-mappingType">
- <xsd:annotation>
- <xsd:documentation>
-
- The port-mapping defines the mapping of the WSDL port name attribute
- to the Java name used to generate the Generated Service Interface
- method get{java-name}.
-
- Used in: service-interface-mapping
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="port-name"
- type="j2ee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- The port-mapping defines the mapping of the WSDL port name
- attribute to the Java name used to generate the Generated
- Service Interface method get{java-name}.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="java-port-name"
- type="j2ee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- The java-port-name element is the string to use as the port
- name in Java. It is used in generating the Generated
- Service Interface method get{java-port-name}.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="qname-scopeType">
- <xsd:annotation>
- <xsd:documentation>
-
- The qname-scope elements scopes the reference of a QName to the WSDL
- element type it applies to. The value of qname-scope may be
- simpleType, complexType, or element.
-
- Used in: java-xml-type-mapping
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:string">
- <xsd:enumeration value="simpleType"/>
- <xsd:enumeration value="complexType"/>
- <xsd:enumeration value="element"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="service-endpoint-interface-mappingType">
- <xsd:annotation>
- <xsd:documentation>
-
- The service-endpoint-interface-mapping defines a tuple
- to specify Service Endpoint Interfaces to
- WSDL port types and WSDL bindings.
-
- An interface may be mapped to a port-type and binding multiple
- times. This happens rarely.
-
- Used in: java-wsdl-mapping
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="service-endpoint-interface"
- type="j2ee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The service-endpoint-interface element defines the Java
- type for the endpoint interface. The name must be a fully
- qualified class name.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="wsdl-port-type"
- type="j2ee:xsdQNameType">
- <xsd:annotation>
- <xsd:documentation>
-
- The wsdl-port-type element defines the wsdl port type
- by a QNAME which uniquely identifies the port type.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="wsdl-binding"
- type="j2ee:xsdQNameType">
- <xsd:annotation>
- <xsd:documentation>
-
- The wsdl-binding element defines the wsdl binding
- by a QNAME which uniquely identifies the binding.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="service-endpoint-method-mapping"
- type="j2ee:service-endpoint-method-mappingType"
- minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="service-endpoint-method-mappingType">
- <xsd:annotation>
- <xsd:documentation>
-
- The service-endpoint-method-mapping element defines the mapping of
- Java methods to operations (which are not uniquely qualified by
- qnames).
-
- The wsdl-operation should be interpreted with respect to the
- portType and binding in which this definition is embedded within.
- See the definitions for service-endpoint-interface-mapping and
- service-interface-mapping to acquire the proper context. The
- wrapped-element indicator should only be specified when a WSDL
- message wraps an element type. The wsdl-return-value-mapping is
- not specified for one-way operations.
-
- Used in: service-endpoint-interface-mapping
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="java-method-name"
- type="j2ee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- The java-method-name element defines the name of a Java method
- within an interface.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="wsdl-operation"
- type="j2ee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- The wsdl-operation element defines an operation within a WSDL
- document. It must be interpreted with respect to a port type.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="wrapped-element"
- type="j2ee:emptyType"
- minOccurs="0"
- maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
-
- The wrapped-element element is defined when a WSDL message
- with a single part is used to wrap an element type and the
- element's name matches the operation name.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="method-param-parts-mapping"
- type="j2ee:method-param-parts-mappingType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="wsdl-return-value-mapping"
- type="j2ee:wsdl-return-value-mappingType"
- minOccurs="0"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="service-interface-mappingType">
- <xsd:annotation>
- <xsd:documentation>
-
- The service-interface-mapping element defines how a Java type for
- the service interface maps to a WSDL service.
-
- Used in: java-wsdl-mapping
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="service-interface"
- type="j2ee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The service-interface element defines the Java type for the service.
- For static services, it is javax.xml.rpc.Service interface. For
- generated service, it would be the generated interface name.
-
- The name must be a fully qualified class name.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="wsdl-service-name"
- type="j2ee:xsdQNameType">
- <xsd:annotation>
- <xsd:documentation>
-
- The wsdl-service-name element defines the wsdl service name
- by a QNAME which uniquely identifies the service.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="port-mapping"
- type="j2ee:port-mappingType"
- minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="variable-mappingType">
- <xsd:annotation>
- <xsd:documentation>
-
- The variable-mapping element defines the correlation between a
- Java class data member or JavaBeans property to an XML element
- or attribute name of an XML root type. If the data-member
- element is present, the Java variable name is a public data
- member. If data-member is not present, the Java variable name
- is a JavaBeans property.
-
- Used in: java-xml-type-mapping
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="java-variable-name"
- type="j2ee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- The java-variable-name defines the name of a public data member or
- JavaBeans property within a Java class.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="data-member"
- type="j2ee:emptyType"
- minOccurs="0" maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
-
- The data-member element is a boolean indicator that a Java
- variable is a public data member and not a JavaBeans property.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:choice>
- <xsd:element name="xml-attribute-name"
- type="j2ee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- The xml-attribute-name element defines name attribute value
- of a WSDL attribute element within a root type. The value
- of an xml-attribute-name element must match the value of
- the ref attribute if mapping an attribute reference.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="xml-element-name"
- type="j2ee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- The xml-element-name element defines name attribute value of
- a WSDL element within a root type. The value of an
- xml-element-name element must match the value of the ref
- attribute if mapping an element reference.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="xml-wildcard"
- type="j2ee:emptyType">
- <xsd:annotation>
- <xsd:documentation>
-
- The xml-wildcard element associates the variable-mapping with
- an xsd:any element within a root type.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:choice>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="wsdl-message-mappingType">
- <xsd:annotation>
- <xsd:documentation>
-
- The wsdl-message-mapping element defines the mapping to a
- specific message and its part. Together they define uniquely
- the mapping for a specific parameter. Parts within a message
- context are uniquely identified with their names.
-
- The parameter-mode is defined by the mapping to indicate
- whether the mapping will be IN, OUT, or INOUT.. The presence
- of the soap-header element indicates that the parameter is
- mapped to a soap header only. When absent, it means that the
- wsdl-message is mapped to a Java parameter. The soap headers
- are interpreted in the order they are provided in the mapping.
-
- Used in: method-param-parts-mapping
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="wsdl-message"
- type="j2ee:wsdl-messageType"/>
- <xsd:element name="wsdl-message-part-name"
- type="j2ee:wsdl-message-part-nameType"/>
- <xsd:element name="parameter-mode"
- type="j2ee:parameter-modeType"/>
- <xsd:element name="soap-header"
- type="j2ee:emptyType"
- minOccurs="0" maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
-
- The soap-header element is a boolean element indicating that
- a parameter is mapped to a SOAP header.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="wsdl-message-part-nameType">
- <xsd:annotation>
- <xsd:documentation>
-
- Interpretation of the wsdl-message-part-name element depends on
- whether or not wrapped-element has been defined in the
- service-endpoint-method-mapping. If wrapped-element is not
- specified, wsdl-message-part-name defines a WSDL message part. It
- should always be interpreted with respect to a wsdl-message
- element. If wrapped-element is specified, wsdl-message-part-name
- refers to an element name of the element type.
-
- Used in: wsdl-message-mapping, wsdl-return-value-mapping
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:string"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="wsdl-messageType">
- <xsd:annotation>
- <xsd:documentation>
-
- The wsdl-message element defines a WSDL message by a QNAME.
-
- Used in: wsdl-message-mapping, wsdl-return-value-mapping,
- exception-mapping
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:xsdQNameType"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="wsdl-return-value-mappingType">
- <xsd:annotation>
- <xsd:documentation>
-
- The wsdl-return-value-mapping element defines the mapping for the
- method's return value. It defines the mapping to a specific message
- and its part. Together they define uniquely the mapping for a
- specific parameter. Parts within a message context are uniquely
- identified with their names. The wsdl-message-part-name is not
- specified if there is no return value or OUT parameters.
-
- Used in: service-endpoint-method-mapping
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="method-return-value"
- type="j2ee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The method-return-value element defines a fully qualified
- class name or void type for the method's return value
- type.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="wsdl-message"
- type="j2ee:wsdl-messageType"/>
- <xsd:element name="wsdl-message-part-name"
- type="j2ee:wsdl-message-part-nameType"
- minOccurs="0"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-</xsd:schema>
-
Deleted: rest/src/main/resources/schema/j2ee_web_services_1_1.xsd
===================================================================
--- rest/src/main/resources/schema/j2ee_web_services_1_1.xsd 2007-11-21 12:01:29 UTC (rev 5094)
+++ rest/src/main/resources/schema/j2ee_web_services_1_1.xsd 2007-11-21 15:23:56 UTC (rev 5095)
@@ -1,490 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://java.sun.com/xml/ns/j2ee"
- xmlns:j2ee="http://java.sun.com/xml/ns/j2ee"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- elementFormDefault="qualified"
- attributeFormDefault="unqualified"
- version="1.1">
- <xsd:annotation>
- <xsd:documentation>
- @(#)j2ee_web_services_1_1.xsds 1.11 02/11/03
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
-
- Copyright 2003 Sun Microsystems, Inc., 901 San Antonio
- Road, Palo Alto, California 94303, U.S.A. All rights
- reserved.
-
- Sun Microsystems, Inc. has intellectual property rights
- relating to technology described in this document. In
- particular, and without limitation, these intellectual
- property rights may include one or more of the U.S. patents
- listed at http://www.sun.com/patents and one or more
- additional patents or pending patent applications in the
- U.S. and other countries.
-
- This document and the technology which it describes are
- distributed under licenses restricting their use, copying,
- distribution, and decompilation. No part of this document
- may be reproduced in any form by any means without prior
- written authorization of Sun and its licensors, if any.
-
- Third-party software, including font technology, is
- copyrighted and licensed from Sun suppliers.
-
- Sun, Sun Microsystems, the Sun logo, Solaris, Java, J2EE,
- JavaServer Pages, Enterprise JavaBeans and the Java Coffee
- Cup logo are trademarks or registered trademarks of Sun
- Microsystems, Inc. in the U.S. and other countries.
-
- Federal Acquisitions: Commercial Software - Government Users
- Subject to Standard License Terms and Conditions.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
-
- (C) Copyright International Business Machines Corporation 2002
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The webservices element is the root element for the web services
- deployment descriptor. It specifies the set of web service
- descriptions that are to be deployed into the J2EE Application
- Server and the dependencies they have on container resources and
- services. The deployment descriptor must be named
- "META-INF/webservices.xml" in the web services' jar file.
-
- Used in: webservices.xml
-
- All webservices deployment descriptors must indicate the
- webservices schema by using the J2EE namespace:
-
- http://java.sun.com/xml/ns/j2ee
-
- and by indicating the version of the schema by using the version
- element as shown below:
-
- <webservices 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://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd"
- version="1.1">
- ...
- </webservices>
-
- The instance documents may indicate the published version of the
- schema using the xsi:schemaLocation attribute for the J2EE
- namespace with the following location:
-
- http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
-
- The following conventions apply to all J2EE
- deployment descriptor elements unless indicated otherwise.
-
- - In elements that specify a pathname to a file within the
- same JAR file, relative filenames (i.e., those not
- starting with "/") are considered relative to the root of
- the JAR file's namespace. Absolute filenames (i.e., those
- starting with "/") also specify names in the root of the
- JAR file's namespace. In general, relative names are
- preferred. The exception is .war files where absolute
- names are preferred for consistency with the Servlet API.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:include schemaLocation="j2ee_1_4.xsd"/>
-
-
- <!-- **************************************************** -->
-
-
- <xsd:element name="webservices" type="j2ee:webservicesType">
- <xsd:annotation>
- <xsd:documentation>
-
- The webservices element is the root element for the web services
- deployment descriptor. It specifies the set of web service
- descriptions that are to be deployed into the J2EE Application Server
- and the dependencies they have on container resources and services.
-
- Used in: webservices.xml
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:key name="webservice-description-name-key">
- <xsd:annotation>
- <xsd:documentation>
-
- The webservice-description-name identifies the collection of
- port-components associated with a WSDL file and JAX-RPC mapping. The
- name must be unique within the deployment descriptor.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="j2ee:webservice-description"/>
- <xsd:field xpath="j2ee:webservice-description-name"/>
- </xsd:key>
- </xsd:element>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="port-componentType">
- <xsd:annotation>
- <xsd:documentation>
-
- The port-component element associates a WSDL port with a web service
- interface and implementation. It defines the name of the port as a
- component, optional description, optional display name, optional iconic
- representations, WSDL port QName, Service Endpoint Interface, Service
- Implementation Bean.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="j2ee:descriptionType"
- minOccurs="0" maxOccurs="1"/>
- <xsd:element name="display-name"
- type="j2ee:display-nameType"
- minOccurs="0" maxOccurs="1"/>
- <xsd:element name="icon"
- type="j2ee:iconType"
- minOccurs="0" maxOccurs="1"/>
- <xsd:element name="port-component-name"
- type="j2ee:string">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The port-component-name element specifies a port component's
- name. This name is assigned by the module producer to name
- the service implementation bean in the module's deployment
- descriptor. The name must be unique among the port component
- names defined in the same module.
-
- Used in: port-component
-
- Example:
- <port-component-name>EmployeeService
- </port-component-name>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="wsdl-port"
- type="j2ee:xsdQNameType">
- <xsd:annotation>
- <xsd:documentation>
-
- Defines the name space and local name part of the WSDL port QName.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="service-endpoint-interface"
- type="j2ee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The service-endpoint-interface element contains the
- fully-qualified name of the port component's Service Endpoint
- Interface.
-
- Used in: port-component
-
- Example:
- <remote>com.wombat.empl.EmployeeService</remote>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="service-impl-bean"
- type="j2ee:service-impl-beanType"/>
-
- <xsd:element name="handler"
- type="j2ee:port-component_handlerType"
- minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="port-component_handlerType">
- <xsd:annotation>
- <xsd:documentation>
-
- Declares the handler for a port-component. Handlers can access the
- init-param name/value pairs using the HandlerInfo interface.
-
- Used in: port-component
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:group ref="j2ee:descriptionGroup"/>
- <xsd:element name="handler-name"
- type="j2ee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- Defines the name of the handler. The name must be unique within the
- module.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="handler-class"
- type="j2ee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- Defines a fully qualified class name for the handler implementation.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="init-param"
- type="j2ee:param-valueType"
- minOccurs="0" maxOccurs="unbounded"/>
-
- <xsd:element name="soap-header"
- type="j2ee:xsdQNameType"
- minOccurs="0" maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- Defines the QName of a SOAP header that will be processed by the
- handler.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="soap-role"
- type="j2ee:string"
- minOccurs="0" maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- The soap-role element contains a SOAP actor definition that the
- Handler will play as a role.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="service-impl-beanType">
- <xsd:annotation>
- <xsd:documentation>
-
- The service-impl-bean element defines the web service implementation.
- A service implementation can be an EJB bean class or JAX-RPC web
- component. Existing EJB implementations are exposed as a web service
- using an ejb-link.
-
- Used in: port-component
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:choice>
- <xsd:element name="ejb-link"
- type="j2ee:ejb-linkType"/>
- <xsd:element name="servlet-link"
- type="j2ee:servlet-linkType"/>
- </xsd:choice>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="servlet-linkType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The servlet-link element is used in the service-impl-bean element
- to specify that a Service Implementation Bean is defined as a
- JAX-RPC Service Endpoint.
-
- The value of the servlet-link element must be the servlet-name of
- a JAX-RPC Service Endpoint in the same WAR file.
-
- Used in: service-impl-bean
-
- Example:
- <servlet-link>StockQuoteService</servlet-link>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:string"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="webservice-descriptionType">
- <xsd:annotation>
- <xsd:documentation>
-
- The webservice-description element defines a WSDL document file
- and the set of Port components associated with the WSDL ports
- defined in the WSDL document. There may be multiple
- webservice-descriptions defined within a module.
-
- All WSDL file ports must have a corresponding port-component element
- defined.
-
- Used in: webservices
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="j2ee:descriptionType"
- minOccurs="0" maxOccurs="1"/>
- <xsd:element name="display-name"
- type="j2ee:display-nameType"
- minOccurs="0" maxOccurs="1"/>
- <xsd:element name="icon"
- type="j2ee:iconType"
- minOccurs="0" maxOccurs="1"/>
- <xsd:element name="webservice-description-name"
- type="j2ee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- The webservice-description-name identifies the collection of
- port-components associated with a WSDL file and JAX-RPC
- mapping. The name must be unique within the deployment descriptor.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="wsdl-file"
- type="j2ee:pathType">
- <xsd:annotation>
- <xsd:documentation>
-
- The wsdl-file element contains the name of a WSDL file in the
- module. The file name is a relative path within the module.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="jaxrpc-mapping-file"
- type="j2ee:pathType">
- <xsd:annotation>
- <xsd:documentation>
-
- The jaxrpc-mapping-file element contains the name of a file that
- describes the JAX-RPC mapping between the Java interaces used by
- the application and the WSDL description in the wsdl-file. The
- file name is a relative path within the module.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="port-component"
- type="j2ee:port-componentType"
- minOccurs="1" maxOccurs="unbounded">
- <xsd:key name="port-component_handler-name-key">
- <xsd:annotation>
- <xsd:documentation>
-
- Defines the name of the handler. The name must be unique
- within the module.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="j2ee:handler"/>
- <xsd:field xpath="j2ee:handler-name"/>
- </xsd:key>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="webservicesType">
- <xsd:sequence>
- <xsd:group ref="j2ee:descriptionGroup"/>
- <xsd:element name="webservice-description"
- type="j2ee:webservice-descriptionType"
- minOccurs="1" maxOccurs="unbounded">
- <xsd:key name="port-component-name-key">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The port-component-name element specifies a port
- component's name. This name is assigned by the module
- producer to name the service implementation bean in the
- module's deployment descriptor. The name must be unique
- among the port component names defined in the same module.
-
- Used in: port-component
-
- Example:
- <port-component-name>EmployeeService
- </port-component-name>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="j2ee:port-component"/>
- <xsd:field xpath="j2ee:port-component-name"/>
- </xsd:key>
- </xsd:element>
- </xsd:sequence>
-
- <xsd:attribute name="version"
- type="j2ee:dewey-versionType"
- fixed="1.1"
- use="required">
- <xsd:annotation>
- <xsd:documentation>
-
- The required value for the version is 1.1.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:attribute>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-</xsd:schema>
-
Deleted: rest/src/main/resources/schema/j2ee_web_services_client_1_1.xsd
===================================================================
--- rest/src/main/resources/schema/j2ee_web_services_client_1_1.xsd 2007-11-21 12:01:29 UTC (rev 5094)
+++ rest/src/main/resources/schema/j2ee_web_services_client_1_1.xsd 2007-11-21 15:23:56 UTC (rev 5095)
@@ -1,208 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://java.sun.com/xml/ns/j2ee" xmlns:j2ee="http://java.sun.com/xml/ns/j2ee"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.1">
- <xsd:annotation>
- <xsd:documentation> @(#)j2ee_web_services_client_1_1.xsds 1.10 02/11/03 </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
- Copyright 2003 Sun Microsystems, Inc., 901 San Antonio Road, Palo Alto, California 94303, U.S.A. All rights reserved.
- Sun Microsystems, Inc. has intellectual property rights relating to technology described in this document. In particular, and without limitation, these intellectual property rights may
- include one or more of the U.S. patents listed at http://www.sun.com/patents and one or more additional patents or pending patent applications in the U.S. and other countries.
- This document and the technology which it describes are distributed under licenses restricting their use, copying, distribution, and decompilation. No part of this document may be
- reproduced in any form by any means without prior written authorization of Sun and its licensors, if any.
- Third-party software, including font technology, is copyrighted and licensed from Sun suppliers.
- Sun, Sun Microsystems, the Sun logo, Solaris, Java, J2EE, JavaServer Pages, Enterprise JavaBeans and the Java Coffee Cup logo are trademarks or registered trademarks of Sun Microsystems,
- Inc. in the U.S. and other countries.
- Federal Acquisitions: Commercial Software - Government Users Subject to Standard License Terms and Conditions.
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
- (C) Copyright International Business Machines Corporation 2002
- </xsd:documentation>
- </xsd:annotation>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="port-component-refType">
- <xsd:annotation>
- <xsd:documentation>
- The port-component-ref element declares a client dependency on the container for resolving a Service Endpoint Interface to a WSDL port. It optionally associates the Service Endpoint
- Interface with a particular port-component. This is only used by the container for a Service.getPort(Class) method call.
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="service-endpoint-interface" type="j2ee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
- The service-endpoint-interface element defines a fully qualified Java class that represents the Service Endpoint Interface of a WSDL port.
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="port-component-link" type="j2ee:string" minOccurs="0" maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
- The port-component-link element links a port-component-ref to a specific port-component required to be made available by a service reference.
- The value of a port-component-link must be the port-component-name of a port-component in the same module or another module in the same application unit. The syntax for specification
- follows the syntax defined for ejb-link in the EJB 2.0 specification.
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:group name="service-refGroup">
- <xsd:sequence>
- <xsd:element name="service-ref" type="j2ee:service-refType" minOccurs="0" maxOccurs="unbounded">
- <xsd:key name="service-ref_handler-name-key">
- <xsd:annotation>
- <xsd:documentation>
- Defines the name of the handler. The name must be unique within the module.
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="j2ee:handler"/>
- <xsd:field xpath="j2ee:handler-name"/>
- </xsd:key>
- </xsd:element>
- </xsd:sequence>
- </xsd:group>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="service-refType">
- <xsd:annotation>
- <xsd:documentation>
- The service-ref element declares a reference to a Web service. It contains optional description, display name and icons, a declaration of the required Service interface, an optional WSDL
- document location, an optional set of JAX-RPC mappings, an optional QName for the service element, an optional set of Service Endpoint Interfaces to be resolved by the container to a WSDL
- port, and an optional set of handlers.
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:group ref="j2ee:descriptionGroup"/>
- <xsd:element name="service-ref-name" type="j2ee:jndi-nameType">
- <xsd:annotation>
- <xsd:documentation>
- The service-ref-name element declares logical name that the components in the module use to look up the Web service. It is recommended that all service reference names start with
- "service/".
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="service-interface" type="j2ee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
- The service-interface element declares the fully qualified class name of the JAX-RPC Service interface the client depends on. In most cases the value will be javax.xml.rpc.Service. A
- JAX-RPC generated Service Interface class may also be specified.
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="wsdl-file" type="j2ee:xsdAnyURIType" minOccurs="0" maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
- The wsdl-file element contains the URI location of a WSDL file. The location is relative to the root of the module.
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="jaxrpc-mapping-file" type="j2ee:pathType" minOccurs="0" maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
- The jaxrpc-mapping-file element contains the name of a file that describes the JAX-RPC mapping between the Java interaces used by the application and the WSDL description in the
- wsdl-file. The file name is a relative path within the module file.
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="service-qname" type="j2ee:xsdQNameType" minOccurs="0" maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
- The service-qname element declares the specific WSDL service element that is being refered to. It is not specified if no wsdl-file is declared.
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="port-component-ref" type="j2ee:port-component-refType" minOccurs="0" maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation> The port-component-ref element declares a client dependency on the container for resolving a Service Endpoint Interface to a WSDL port. It optionally associates
- the Service Endpoint Interface with a particular port-component. This is only used by the container for a Service.getPort(Class) method call. </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="handler" type="j2ee:service-ref_handlerType" minOccurs="0" maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
- Declares the handler for a port-component. Handlers can access the init-param name/value pairs using the HandlerInfo interface. If port-name is not specified, the handler is assumed
- to be associated with all ports of the service.
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="service-ref_handlerType">
- <xsd:annotation>
- <xsd:documentation>
- Declares the handler for a port-component. Handlers can access the init-param name/value pairs using the HandlerInfo interface. If port-name is not specified, the handler is assumed to be
- associated with all ports of the service.
- Used in: service-ref
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:group ref="j2ee:descriptionGroup"/>
- <xsd:element name="handler-name" type="j2ee:string">
- <xsd:annotation>
- <xsd:documentation>
- Defines the name of the handler. The name must be unique within the module.
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="handler-class" type="j2ee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
- Defines a fully qualified class name for the handler implementation.
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="init-param" type="j2ee:param-valueType" minOccurs="0" maxOccurs="unbounded"/>
-
- <xsd:element name="soap-header" type="j2ee:xsdQNameType" minOccurs="0" maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
- Defines the QName of a SOAP header that will be processed by the handler.
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="soap-role" type="j2ee:string" minOccurs="0" maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
- The soap-role element contains a SOAP actor definition that the Handler will play as a role.
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="port-name" type="j2ee:string" minOccurs="0" maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
- The port-name element defines the WSDL port-name that a handler should be associated with.
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-</xsd:schema>
Deleted: rest/src/main/resources/schema/javaee_5.xsd
===================================================================
--- rest/src/main/resources/schema/javaee_5.xsd 2007-11-21 12:01:29 UTC (rev 5094)
+++ rest/src/main/resources/schema/javaee_5.xsd 2007-11-21 15:23:56 UTC (rev 5095)
@@ -1,2095 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsd:schema
- targetNamespace="http://java.sun.com/xml/ns/javaee"
- xmlns:javaee="http://java.sun.com/xml/ns/javaee"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- elementFormDefault="qualified"
- attributeFormDefault="unqualified"
- version="5">
- <xsd:annotation>
- <xsd:documentation>
- @(#)javaee_5.xsds 1.65 06/02/17
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
-
- Copyright 2003-2006 Sun Microsystems, Inc.
- 4150 Network Circle
- Santa Clara, California 95054
- U.S.A
- All rights reserved.
-
- Sun Microsystems, Inc. has intellectual property rights
- relating to technology described in this document. In
- particular, and without limitation, these intellectual
- property rights may include one or more of the U.S. patents
- listed at http://www.sun.com/patents and one or more
- additional patents or pending patent applications in the
- U.S. and other countries.
-
- This document and the technology which it describes are
- distributed under licenses restricting their use, copying,
- distribution, and decompilation. No part of this document
- may be reproduced in any form by any means without prior
- written authorization of Sun and its licensors, if any.
-
- Third-party software, including font technology, is
- copyrighted and licensed from Sun suppliers.
-
- Sun, Sun Microsystems, the Sun logo, Solaris, Java, J2EE,
- JavaServer Pages, Enterprise JavaBeans and the Java Coffee
- Cup logo are trademarks or registered trademarks of Sun
- Microsystems, Inc. in the U.S. and other countries.
-
- Federal Acquisitions: Commercial Software - Government Users
- Subject to Standard License Terms and Conditions.
-
- </xsd:documentation>
- </xsd:annotation>
-
-<xsd:annotation>
-<xsd:documentation>
-
-The following definitions that appear in the common
-shareable schema(s) of J2EE deployment descriptors should be
-interpreted with respect to the context they are included:
-
-Deployment Component may indicate one of the following:
- j2ee application;
- application client;
- web application;
- enterprise bean;
- resource adapter;
-
-Deployment File may indicate one of the following:
- ear file;
- war file;
- jar file;
- rar file;
-
-</xsd:documentation>
-</xsd:annotation>
-
- <xsd:import namespace="http://www.w3.org/XML/1998/namespace"
- schemaLocation="http://www.w3.org/2001/xml.xsd"/>
-
- <xsd:include schemaLocation="javaee_web_services_client_1_2.xsd"/>
-
-
-<!-- **************************************************** -->
-
- <xsd:group name="descriptionGroup">
- <xsd:annotation>
- <xsd:documentation>
-
- This group keeps the usage of the contained description related
- elements consistent across Java EE deployment descriptors.
-
- All elements may occur multiple times with different languages,
- to support localization of the content.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="display-name"
- type="javaee:display-nameType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="icon"
- type="javaee:iconType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:group>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="descriptionType">
- <xsd:annotation>
- <xsd:documentation>
-
- The description type is used by a description element to
- provide text describing the parent element. The elements
- that use this type should include any information that the
- Deployment Component's Deployment File file producer wants
- to provide to the consumer of the Deployment Component's
- Deployment File (i.e., to the Deployer). Typically, the
- tools used by such a Deployment File consumer will display
- the description when processing the parent element that
- contains the description.
-
- The lang attribute defines the language that the
- description is provided in. The default value is "en" (English).
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:extension base="javaee:xsdStringType">
- <xsd:attribute ref="xml:lang"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:simpleType name="dewey-versionType">
- <xsd:annotation>
- <xsd:documentation>
-
- This type defines a dewey decimal that is used
- to describe versions of documents.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:restriction base="xsd:token">
- <xsd:pattern value="\.?[0-9]+(\.[0-9]+)*"/>
- </xsd:restriction>
- </xsd:simpleType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="display-nameType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The display-name type contains a short name that is intended
- to be displayed by tools. It is used by display-name
- elements. The display name need not be unique.
-
- Example:
-
- ...
- <display-name xml:lang="en">
- Employee Self Service
- </display-name>
-
- The value of the xml:lang attribute is "en" (English) by default.
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:extension base="javaee:string">
- <xsd:attribute ref="xml:lang"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="ejb-linkType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The ejb-linkType is used by ejb-link
- elements in the ejb-ref or ejb-local-ref elements to specify
- that an EJB reference is linked to enterprise bean.
-
- The value of the ejb-link element must be the ejb-name of an
- enterprise bean in the same ejb-jar file or in another ejb-jar
- file in the same Java EE application unit.
-
- Alternatively, the name in the ejb-link element may be
- composed of a path name specifying the ejb-jar containing the
- referenced enterprise bean with the ejb-name of the target
- bean appended and separated from the path name by "#". The
- path name is relative to the Deployment File containing
- Deployment Component that is referencing the enterprise
- bean. This allows multiple enterprise beans with the same
- ejb-name to be uniquely identified.
-
- Examples:
-
- <ejb-link>EmployeeRecord</ejb-link>
-
- <ejb-link>../products/product.jar#ProductEJB</ejb-link>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="ejb-local-refType">
- <xsd:annotation>
- <xsd:documentation>
-
- The ejb-local-refType is used by ejb-local-ref elements for
- the declaration of a reference to an enterprise bean's local
- home or to the local business interface of a 3.0 bean.
- The declaration consists of:
-
- - an optional description
- - the EJB reference name used in the code of the Deployment
- Component that's referencing the enterprise bean.
- - the optional expected type of the referenced enterprise bean
- - the optional expected local interface of the referenced
- enterprise bean or the local business interface of the
- referenced enterprise bean.
- - the optional expected local home interface of the referenced
- enterprise bean. Not applicable if this ejb-local-ref refers
- to the local business interface of a 3.0 bean.
- - optional ejb-link information, used to specify the
- referenced enterprise bean
- - optional elements to define injection of the named enterprise
- bean into a component field or property.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="ejb-ref-name"
- type="javaee:ejb-ref-nameType"/>
- <xsd:element name="ejb-ref-type"
- type="javaee:ejb-ref-typeType"
- minOccurs="0"/>
- <xsd:element name="local-home"
- type="javaee:local-homeType"
- minOccurs="0"/>
- <xsd:element name="local"
- type="javaee:localType"
- minOccurs="0"/>
- <xsd:element name="ejb-link"
- type="javaee:ejb-linkType"
- minOccurs="0"/>
- <xsd:group ref="javaee:resourceGroup"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="ejb-ref-nameType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The ejb-ref-name element contains the name of an EJB
- reference. The EJB reference is an entry in the
- Deployment Component's environment and is relative to the
- java:comp/env context. The name must be unique within the
- Deployment Component.
-
- It is recommended that name is prefixed with "ejb/".
-
- Example:
-
- <ejb-ref-name>ejb/Payroll</ejb-ref-name>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:jndi-nameType"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="ejb-ref-typeType">
- <xsd:annotation>
- <xsd:documentation>
-
- The ejb-ref-typeType contains the expected type of the
- referenced enterprise bean.
-
- The ejb-ref-type designates a value
- that must be one of the following:
-
- Entity
- Session
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string">
- <xsd:enumeration value="Entity"/>
- <xsd:enumeration value="Session"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="ejb-refType">
- <xsd:annotation>
- <xsd:documentation>
-
- The ejb-refType is used by ejb-ref elements for the
- declaration of a reference to an enterprise bean's home or
- to the remote business interface of a 3.0 bean.
- The declaration consists of:
-
- - an optional description
- - the EJB reference name used in the code of
- the Deployment Component that's referencing the enterprise
- bean.
- - the optional expected type of the referenced enterprise bean
- - the optional remote interface of the referenced enterprise bean
- or the remote business interface of the referenced enterprise
- bean
- - the optional expected home interface of the referenced
- enterprise bean. Not applicable if this ejb-ref
- refers to the remote business interface of a 3.0 bean.
- - optional ejb-link information, used to specify the
- referenced enterprise bean
- - optional elements to define injection of the named enterprise
- bean into a component field or property
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="ejb-ref-name"
- type="javaee:ejb-ref-nameType"/>
- <xsd:element name="ejb-ref-type"
- type="javaee:ejb-ref-typeType"
- minOccurs="0"/>
- <xsd:element name="home"
- type="javaee:homeType"
- minOccurs="0"/>
- <xsd:element name="remote"
- type="javaee:remoteType"
- minOccurs="0"/>
- <xsd:element name="ejb-link"
- type="javaee:ejb-linkType"
- minOccurs="0"/>
- <xsd:group ref="javaee:resourceGroup"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="emptyType">
- <xsd:annotation>
- <xsd:documentation>
-
- This type is used to designate an empty
- element when used.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="env-entry-type-valuesType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- This type contains the fully-qualified Java type of the
- environment entry value that is expected by the
- application's code.
-
- The following are the legal values of env-entry-type-valuesType:
-
- java.lang.Boolean
- java.lang.Byte
- java.lang.Character
- java.lang.String
- java.lang.Short
- java.lang.Integer
- java.lang.Long
- java.lang.Float
- java.lang.Double
-
- Example:
-
- <env-entry-type>java.lang.Boolean</env-entry-type>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string">
- <xsd:enumeration value="java.lang.Boolean"/>
- <xsd:enumeration value="java.lang.Byte"/>
- <xsd:enumeration value="java.lang.Character"/>
- <xsd:enumeration value="java.lang.String"/>
- <xsd:enumeration value="java.lang.Short"/>
- <xsd:enumeration value="java.lang.Integer"/>
- <xsd:enumeration value="java.lang.Long"/>
- <xsd:enumeration value="java.lang.Float"/>
- <xsd:enumeration value="java.lang.Double"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="env-entryType">
- <xsd:annotation>
- <xsd:documentation>
-
- The env-entryType is used to declare an application's
- environment entry. The declaration consists of an optional
- description, the name of the environment entry, a type
- (optional if the value is injected, otherwise required), and
- an optional value.
-
- It also includes optional elements to define injection of
- the named resource into fields or JavaBeans properties.
-
- If a value is not specified and injection is requested,
- no injection will occur and no entry of the specified name
- will be created. This allows an initial value to be
- specified in the source code without being incorrectly
- changed when no override has been specified.
-
- If a value is not specified and no injection is requested,
- a value must be supplied during deployment.
-
- This type is used by env-entry elements.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="env-entry-name"
- type="javaee:jndi-nameType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The env-entry-name element contains the name of a
- Deployment Component's environment entry. The name
- is a JNDI name relative to the java:comp/env
- context. The name must be unique within a
- Deployment Component. The uniqueness
- constraints must be defined within the declared
- context.
-
- Example:
-
- <env-entry-name>minAmount</env-entry-name>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="env-entry-type"
- type="javaee:env-entry-type-valuesType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The env-entry-type element contains the Java language
- type of the environment entry. If an injection target
- is specified for the environment entry, the type may
- be omitted, or must match the type of the injection
- target. If no injection target is specified, the type
- is required.
-
- Example:
-
- <env-entry-type>java.lang.Integer</env-entry-type>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="env-entry-value"
- type="javaee:xsdStringType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The env-entry-value designates the value of a
- Deployment Component's environment entry. The value
- must be a String that is valid for the
- constructor of the specified type that takes a
- single String parameter, or for java.lang.Character,
- a single character.
-
- Example:
-
- <env-entry-value>100.00</env-entry-value>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:group ref="javaee:resourceGroup"/>
-
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The elements that use this type designate the name of a
- Java class or interface. The name is in the form of a
- "binary name", as defined in the JLS. This is the form
- of name used in Class.forName(). Tools that need the
- canonical name (the name used in source code) will need
- to convert this binary name to the canonical name.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="generic-booleanType">
- <xsd:annotation>
- <xsd:documentation>
-
- This type defines four different values which can designate
- boolean values. This includes values yes and no which are
- not designated by xsd:boolean
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string">
- <xsd:enumeration value="true"/>
- <xsd:enumeration value="false"/>
- <xsd:enumeration value="yes"/>
- <xsd:enumeration value="no"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="homeType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The homeType defines the fully-qualified name of
- an enterprise bean's home interface.
-
- Example:
-
- <home>com.aardvark.payroll.PayrollHome</home>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:fully-qualified-classType"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="iconType">
- <xsd:annotation>
- <xsd:documentation>
-
- The icon type contains small-icon and large-icon elements
- that specify the file names for small and large GIF, JPEG,
- or PNG icon images used to represent the parent element in a
- GUI tool.
-
- The xml:lang attribute defines the language that the
- icon file names are provided in. Its value is "en" (English)
- by default.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="small-icon" type="javaee:pathType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The small-icon element contains the name of a file
- containing a small (16 x 16) icon image. The file
- name is a relative path within the Deployment
- Component's Deployment File.
-
- The image may be in the GIF, JPEG, or PNG format.
- The icon can be used by tools.
-
- Example:
-
- <small-icon>employee-service-icon16x16.jpg</small-icon>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="large-icon" type="javaee:pathType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The large-icon element contains the name of a file
- containing a large
- (32 x 32) icon image. The file name is a relative
- path within the Deployment Component's Deployment
- File.
-
- The image may be in the GIF, JPEG, or PNG format.
- The icon can be used by tools.
-
- Example:
-
- <large-icon>employee-service-icon32x32.jpg</large-icon>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- </xsd:sequence>
-
- <xsd:attribute ref="xml:lang"/>
- <xsd:attribute name="id" type="xsd:ID"/>
-
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="injection-targetType">
- <xsd:annotation>
- <xsd:documentation>
-
- An injection target specifies a class and a name within
- that class into which a resource should be injected.
-
- The injection target class specifies the fully qualified
- class name that is the target of the injection. The
- Java EE specifications describe which classes can be an
- injection target.
-
- The injection target name specifies the target within
- the specified class. The target is first looked for as a
- JavaBeans property name. If not found, the target is
- looked for as a field name.
-
- The specified resource will be injected into the target
- during initialization of the class by either calling the
- set method for the target property or by setting a value
- into the named field.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="injection-target-class"
- type="javaee:fully-qualified-classType"/>
- <xsd:element name="injection-target-name"
- type="javaee:java-identifierType"/>
- </xsd:sequence>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="java-identifierType">
- <xsd:annotation>
- <xsd:documentation>
-
- The java-identifierType defines a Java identifier.
- The users of this type should further verify that
- the content does not contain Java reserved keywords.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string">
- <xsd:pattern value="($|_|\p{L})(\p{L}|\p{Nd}|_|$)*"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="java-typeType">
- <xsd:annotation>
- <xsd:documentation>
-
- This is a generic type that designates a Java primitive
- type or a fully qualified name of a Java interface/type,
- or an array of such types.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string">
- <xsd:pattern value="[^\p{Z}]*"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="jndi-nameType">
- <xsd:annotation>
- <xsd:documentation>
-
- The jndi-nameType type designates a JNDI name in the
- Deployment Component's environment and is relative to the
- java:comp/env context. A JNDI name must be unique within the
- Deployment Component.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:group name="jndiEnvironmentRefsGroup">
- <xsd:annotation>
- <xsd:documentation>
-
- This group keeps the usage of the contained JNDI environment
- reference elements consistent across Java EE deployment descriptors.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="env-entry"
- type="javaee:env-entryType"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="ejb-ref"
- type="javaee:ejb-refType"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="ejb-local-ref"
- type="javaee:ejb-local-refType"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:group ref="javaee:service-refGroup"/>
- <xsd:element name="resource-ref"
- type="javaee:resource-refType"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="resource-env-ref"
- type="javaee:resource-env-refType"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="message-destination-ref"
- type="javaee:message-destination-refType"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="persistence-context-ref"
- type="javaee:persistence-context-refType"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="persistence-unit-ref"
- type="javaee:persistence-unit-refType"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="post-construct"
- type="javaee:lifecycle-callbackType"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="pre-destroy"
- type="javaee:lifecycle-callbackType"
- minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:group>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="lifecycle-callbackType">
- <xsd:annotation>
- <xsd:documentation>
-
- The lifecycle-callback type specifies a method on a
- class to be called when a lifecycle event occurs.
- Note that each class may have only one lifecycle callback
- method for any given event and that the method may not
- be overloaded.
-
- If the lifefycle-callback-class element is missing then
- the class defining the callback is assumed to be the
- component class in scope at the place in the descriptor
- in which the callback definition appears.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="lifecycle-callback-class"
- type="javaee:fully-qualified-classType"
- minOccurs="0"/>
- <xsd:element name="lifecycle-callback-method"
- type="javaee:java-identifierType"/>
- </xsd:sequence>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="listenerType">
- <xsd:annotation>
- <xsd:documentation>
-
- The listenerType indicates the deployment properties for a web
- application listener bean.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:group ref="javaee:descriptionGroup"/>
- <xsd:element name="listener-class"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The listener-class element declares a class in the
- application must be registered as a web
- application listener bean. The value is the fully
- qualified classname of the listener class.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="local-homeType">
- <xsd:annotation>
- <xsd:documentation>
-
- The local-homeType defines the fully-qualified
- name of an enterprise bean's local home interface.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:fully-qualified-classType"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="localType">
- <xsd:annotation>
- <xsd:documentation>
-
- The localType defines the fully-qualified name of an
- enterprise bean's local interface.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:fully-qualified-classType"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="message-destination-linkType">
- <xsd:annotation>
- <xsd:documentation>
-
- The message-destination-linkType is used to link a message
- destination reference or message-driven bean to a message
- destination.
-
- The Assembler sets the value to reflect the flow of messages
- between producers and consumers in the application.
-
- The value must be the message-destination-name of a message
- destination in the same Deployment File or in another
- Deployment File in the same Java EE application unit.
-
- Alternatively, the value may be composed of a path name
- specifying a Deployment File containing the referenced
- message destination with the message-destination-name of the
- destination appended and separated from the path name by
- "#". The path name is relative to the Deployment File
- containing Deployment Component that is referencing the
- message destination. This allows multiple message
- destinations with the same name to be uniquely identified.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="message-destination-refType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The message-destination-ref element contains a declaration
- of Deployment Component's reference to a message destination
- associated with a resource in Deployment Component's
- environment. It consists of:
-
- - an optional description
- - the message destination reference name
- - an optional message destination type
- - an optional specification as to whether
- the destination is used for
- consuming or producing messages, or both.
- if not specified, "both" is assumed.
- - an optional link to the message destination
- - optional injection targets
-
- The message destination type must be supplied unless an
- injection target is specified, in which case the type
- of the target is used. If both are specified, the type
- must be assignment compatible with the type of the injection
- target.
-
- Examples:
-
- <message-destination-ref>
- <message-destination-ref-name>jms/StockQueue
- </message-destination-ref-name>
- <message-destination-type>javax.jms.Queue
- </message-destination-type>
- <message-destination-usage>Consumes
- </message-destination-usage>
- <message-destination-link>CorporateStocks
- </message-destination-link>
- </message-destination-ref>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="message-destination-ref-name"
- type="javaee:jndi-nameType">
- <xsd:annotation>
- <xsd:documentation>
-
- The message-destination-ref-name element specifies
- the name of a message destination reference; its
- value is the environment entry name used in
- Deployment Component code. The name is a JNDI name
- relative to the java:comp/env context and must be
- unique within an ejb-jar (for enterprise beans) or a
- Deployment File (for others).
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="message-destination-type"
- type="javaee:message-destination-typeType"
- minOccurs="0"/>
- <xsd:element name="message-destination-usage"
- type="javaee:message-destination-usageType"
- minOccurs="0"/>
- <xsd:element name="message-destination-link"
- type="javaee:message-destination-linkType"
- minOccurs="0"/>
-
- <xsd:group ref="javaee:resourceGroup"/>
-
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
-
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="message-destination-typeType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The message-destination-typeType specifies the type of
- the destination. The type is specified by the Java interface
- expected to be implemented by the destination.
-
- Example:
-
- <message-destination-type>javax.jms.Queue
- </message-destination-type>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:fully-qualified-classType"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="message-destination-usageType">
- <xsd:annotation>
- <xsd:documentation>
-
- The message-destination-usageType specifies the use of the
- message destination indicated by the reference. The value
- indicates whether messages are consumed from the message
- destination, produced for the destination, or both. The
- Assembler makes use of this information in linking producers
- of a destination with its consumers.
-
- The value of the message-destination-usage element must be
- one of the following:
- Consumes
- Produces
- ConsumesProduces
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string">
- <xsd:enumeration value="Consumes"/>
- <xsd:enumeration value="Produces"/>
- <xsd:enumeration value="ConsumesProduces"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="message-destinationType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The message-destinationType specifies a message
- destination. The logical destination described by this
- element is mapped to a physical destination by the Deployer.
-
- The message destination element contains:
-
- - an optional description
- - an optional display-name
- - an optional icon
- - a message destination name which must be unique
- among message destination names within the same
- Deployment File.
- - an optional mapped name
-
- Example:
-
- <message-destination>
- <message-destination-name>CorporateStocks
- </message-destination-name>
- </message-destination>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:group ref="javaee:descriptionGroup"/>
- <xsd:element name="message-destination-name"
- type="javaee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- The message-destination-name element specifies a
- name for a message destination. This name must be
- unique among the names of message destinations
- within the Deployment File.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="mapped-name"
- type="javaee:xsdStringType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- A product specific name that this message destination
- should be mapped to. Each message-destination-ref
- element that references this message destination will
- define a name in the namespace of the referencing
- component. (It's a name in the JNDI java:comp/env
- namespace.) Many application servers provide a way to
- map these local names to names of resources known to the
- application server. This mapped name is often a global
- JNDI name, but may be a name of any form. Each of the
- local names should be mapped to this same global name.
-
- Application servers are not required to support any
- particular form or type of mapped name, nor the ability
- to use mapped names. The mapped name is
- product-dependent and often installation-dependent. No
- use of a mapped name is portable.
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="param-valueType">
- <xsd:annotation>
- <xsd:documentation>
-
- This type is a general type that can be used to declare
- parameter/value lists.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="param-name"
- type="javaee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- The param-name element contains the name of a
- parameter.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="param-value"
- type="javaee:xsdStringType">
- <xsd:annotation>
- <xsd:documentation>
-
- The param-value element contains the value of a
- parameter.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="pathType">
- <xsd:annotation>
- <xsd:documentation>
-
- The elements that use this type designate either a relative
- path or an absolute path starting with a "/".
-
- In elements that specify a pathname to a file within the
- same Deployment File, relative filenames (i.e., those not
- starting with "/") are considered relative to the root of
- the Deployment File's namespace. Absolute filenames (i.e.,
- those starting with "/") also specify names in the root of
- the Deployment File's namespace. In general, relative names
- are preferred. The exception is .war files where absolute
- names are preferred for consistency with the Servlet API.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="persistence-context-refType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The persistence-context-ref element contains a declaration
- of Deployment Component's reference to a persistence context
- associated within a Deployment Component's
- environment. It consists of:
-
- - an optional description
- - the persistence context reference name
- - an optional persistence unit name. If not specified,
- the default persistence unit is assumed.
- - an optional specification as to whether
- the persistence context type is Transaction or
- Extended. If not specified, Transaction is assumed.
- - an optional list of persistence properties
- - optional injection targets
-
- Examples:
-
- <persistence-context-ref>
- <persistence-context-ref-name>myPersistenceContext
- </persistence-context-ref-name>
- </persistence-context-ref>
-
- <persistence-context-ref>
- <persistence-context-ref-name>myPersistenceContext
- </persistence-context-ref-name>
- <persistence-unit-name>PersistenceUnit1
- </persistence-unit-name>
- <persistence-context-type>Extended</persistence-context-type>
- </persistence-context-ref>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="persistence-context-ref-name"
- type="javaee:jndi-nameType">
- <xsd:annotation>
- <xsd:documentation>
-
- The persistence-context-ref-name element specifies
- the name of a persistence context reference; its
- value is the environment entry name used in
- Deployment Component code. The name is a JNDI name
- relative to the java:comp/env context.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="persistence-unit-name"
- type="javaee:string"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The Application Assembler(or BeanProvider) may use the
- following syntax to avoid the need to rename persistence
- units to have unique names within a Java EE application.
-
- The Application Assembler specifies the pathname of the
- root of the persistence.xml file for the referenced
- persistence unit and appends the name of the persistence
- unit separated from the pathname by #. The pathname is
- relative to the referencing application component jar file.
- In this manner, multiple persistence units with the same
- persistence unit name may be uniquely identified when the
- Application Assembler cannot change persistence unit names.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="persistence-context-type"
- type="javaee:persistence-context-typeType"
- minOccurs="0"/>
-
- <xsd:element name="persistence-property"
- type="javaee:propertyType"
- minOccurs="0"
- maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- Used to specify properties for the container or persistence
- provider. Vendor-specific properties may be included in
- the set of properties. Properties that are not recognized
- by a vendor must be ignored. Entries that make use of the
- namespace javax.persistence and its subnamespaces must not
- be used for vendor-specific properties. The namespace
- javax.persistence is reserved for use by the specification.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:group ref="javaee:resourceGroup"/>
-
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
-
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="persistence-context-typeType">
- <xsd:annotation>
- <xsd:documentation>
-
- The persistence-context-typeType specifies the transactional
- nature of a persistence context reference.
-
- The value of the persistence-context-type element must be
- one of the following:
- Transaction
- Extended
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string">
- <xsd:enumeration value="Transaction"/>
- <xsd:enumeration value="Extended"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="persistence-unit-refType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The persistence-unit-ref element contains a declaration
- of Deployment Component's reference to a persistence unit
- associated within a Deployment Component's
- environment. It consists of:
-
- - an optional description
- - the persistence unit reference name
- - an optional persistence unit name. If not specified,
- the default persistence unit is assumed.
- - optional injection targets
-
- Examples:
-
- <persistence-unit-ref>
- <persistence-unit-ref-name>myPersistenceUnit
- </persistence-unit-ref-name>
- </persistence-unit-ref>
-
- <persistence-unit-ref>
- <persistence-unit-ref-name>myPersistenceUnit
- </persistence-unit-ref-name>
- <persistence-unit-name>PersistenceUnit1
- </persistence-unit-name>
- </persistence-unit-ref>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="persistence-unit-ref-name"
- type="javaee:jndi-nameType">
- <xsd:annotation>
- <xsd:documentation>
-
- The persistence-unit-ref-name element specifies
- the name of a persistence unit reference; its
- value is the environment entry name used in
- Deployment Component code. The name is a JNDI name
- relative to the java:comp/env context.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="persistence-unit-name"
- type="javaee:string"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The Application Assembler(or BeanProvider) may use the
- following syntax to avoid the need to rename persistence
- units to have unique names within a Java EE application.
-
- The Application Assembler specifies the pathname of the
- root of the persistence.xml file for the referenced
- persistence unit and appends the name of the persistence
- unit separated from the pathname by #. The pathname is
- relative to the referencing application component jar file.
- In this manner, multiple persistence units with the same
- persistence unit name may be uniquely identified when the
- Application Assembler cannot change persistence unit names.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:group ref="javaee:resourceGroup"/>
-
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
-
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="propertyType">
- <xsd:annotation>
- <xsd:documentation>
-
- Specifies a name/value pair.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="name"
- type="javaee:xsdStringType">
- </xsd:element>
- <xsd:element name="value"
- type="javaee:xsdStringType">
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="remoteType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The remote element contains the fully-qualified name
- of the enterprise bean's remote interface.
-
- Example:
-
- <remote>com.wombat.empl.EmployeeService</remote>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:fully-qualified-classType"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="res-authType">
- <xsd:annotation>
- <xsd:documentation>
-
- The res-authType specifies whether the Deployment Component
- code signs on programmatically to the resource manager, or
- whether the Container will sign on to the resource manager
- on behalf of the Deployment Component. In the latter case,
- the Container uses information that is supplied by the
- Deployer.
-
- The value must be one of the two following:
-
- Application
- Container
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string">
- <xsd:enumeration value="Application"/>
- <xsd:enumeration value="Container"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="res-sharing-scopeType">
- <xsd:annotation>
- <xsd:documentation>
-
- The res-sharing-scope type specifies whether connections
- obtained through the given resource manager connection
- factory reference can be shared. The value, if specified,
- must be one of the two following:
-
- Shareable
- Unshareable
-
- The default value is Shareable.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string">
- <xsd:enumeration value="Shareable"/>
- <xsd:enumeration value="Unshareable"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="resource-env-refType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The resource-env-refType is used to define
- resource-env-type elements. It contains a declaration of a
- Deployment Component's reference to an administered object
- associated with a resource in the Deployment Component's
- environment. It consists of an optional description, the
- resource environment reference name, and an optional
- indication of the resource environment reference type
- expected by the Deployment Component code.
-
- It also includes optional elements to define injection of
- the named resource into fields or JavaBeans properties.
-
- The resource environment type must be supplied unless an
- injection target is specified, in which case the type
- of the target is used. If both are specified, the type
- must be assignment compatible with the type of the injection
- target.
-
- Example:
-
- <resource-env-ref>
- <resource-env-ref-name>jms/StockQueue
- </resource-env-ref-name>
- <resource-env-ref-type>javax.jms.Queue
- </resource-env-ref-type>
- </resource-env-ref>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="resource-env-ref-name"
- type="javaee:jndi-nameType">
- <xsd:annotation>
- <xsd:documentation>
-
- The resource-env-ref-name element specifies the name
- of a resource environment reference; its value is
- the environment entry name used in
- the Deployment Component code. The name is a JNDI
- name relative to the java:comp/env context and must
- be unique within a Deployment Component.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="resource-env-ref-type"
- type="javaee:fully-qualified-classType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The resource-env-ref-type element specifies the type
- of a resource environment reference. It is the
- fully qualified name of a Java language class or
- interface.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:group ref="javaee:resourceGroup"/>
-
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="resource-refType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The resource-refType contains a declaration of a
- Deployment Component's reference to an external resource. It
- consists of an optional description, the resource manager
- connection factory reference name, an optional indication of
- the resource manager connection factory type expected by the
- Deployment Component code, an optional type of authentication
- (Application or Container), and an optional specification of
- the shareability of connections obtained from the resource
- (Shareable or Unshareable).
-
- It also includes optional elements to define injection of
- the named resource into fields or JavaBeans properties.
-
- The connection factory type must be supplied unless an
- injection target is specified, in which case the type
- of the target is used. If both are specified, the type
- must be assignment compatible with the type of the injection
- target.
-
- Example:
-
- <resource-ref>
- <res-ref-name>jdbc/EmployeeAppDB</res-ref-name>
- <res-type>javax.sql.DataSource</res-type>
- <res-auth>Container</res-auth>
- <res-sharing-scope>Shareable</res-sharing-scope>
- </resource-ref>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="res-ref-name"
- type="javaee:jndi-nameType">
- <xsd:annotation>
- <xsd:documentation>
-
- The res-ref-name element specifies the name of a
- resource manager connection factory reference.
- The name is a JNDI name relative to the
- java:comp/env context.
- The name must be unique within a Deployment File.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="res-type"
- type="javaee:fully-qualified-classType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The res-type element specifies the type of the data
- source. The type is specified by the fully qualified
- Java language class or interface
- expected to be implemented by the data source.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="res-auth"
- type="javaee:res-authType"
- minOccurs="0"/>
-
- <xsd:element name="res-sharing-scope"
- type="javaee:res-sharing-scopeType"
- minOccurs="0"/>
-
- <xsd:group ref="javaee:resourceGroup"/>
-
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:group name="resourceGroup">
- <xsd:annotation>
- <xsd:documentation>
-
- This group collects elements that are common to all the
- JNDI resource elements.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="mapped-name"
- type="javaee:xsdStringType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- A product specific name that this resource should be
- mapped to. The name of this resource, as defined by the
- resource's name element or defaulted, is a name that is
- local to the application component using the resource.
- (It's a name in the JNDI java:comp/env namespace.) Many
- application servers provide a way to map these local
- names to names of resources known to the application
- server. This mapped name is often a global JNDI name,
- but may be a name of any form.
-
- Application servers are not required to support any
- particular form or type of mapped name, nor the ability
- to use mapped names. The mapped name is
- product-dependent and often installation-dependent. No
- use of a mapped name is portable.
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="injection-target"
- type="javaee:injection-targetType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:group>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="role-nameType">
- <xsd:annotation>
- <xsd:documentation>
-
- The role-nameType designates the name of a security role.
-
- The name must conform to the lexical rules for a token.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="run-asType">
- <xsd:annotation>
- <xsd:documentation>
-
- The run-asType specifies the run-as identity to be
- used for the execution of a component. It contains an
- optional description, and the name of a security role.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="role-name"
- type="javaee:role-nameType"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="security-role-refType">
- <xsd:annotation>
- <xsd:documentation>
-
- The security-role-refType contains the declaration of a
- security role reference in a component's or a
- Deployment Component's code. The declaration consists of an
- optional description, the security role name used in the
- code, and an optional link to a security role. If the
- security role is not specified, the Deployer must choose an
- appropriate security role.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="role-name"
- type="javaee:role-nameType">
- <xsd:annotation>
- <xsd:documentation>
-
- The value of the role-name element must be the String used
- as the parameter to the
- EJBContext.isCallerInRole(String roleName) method or the
- HttpServletRequest.isUserInRole(String role) method.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="role-link"
- type="javaee:role-nameType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The role-link element is a reference to a defined
- security role. The role-link element must contain
- the name of one of the security roles defined in the
- security-role elements.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="security-roleType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The security-roleType contains the definition of a security
- role. The definition consists of an optional description of
- the security role, and the security role name.
-
- Example:
-
- <security-role>
- <description>
- This role includes all employees who are authorized
- to access the employee service application.
- </description>
- <role-name>employee</role-name>
- </security-role>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="role-name"
- type="javaee:role-nameType"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="string">
- <xsd:annotation>
- <xsd:documentation>
-
- This is a special string datatype that is defined by Java EE as
- a base type for defining collapsed strings. When schemas
- require trailing/leading space elimination as well as
- collapsing the existing whitespace, this base type may be
- used.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:extension base="xsd:token">
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="true-falseType">
- <xsd:annotation>
- <xsd:documentation>
-
- This simple type designates a boolean with only two
- permissible values
-
- - true
- - false
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:xsdBooleanType">
- <xsd:pattern value="(true|false)"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="url-patternType">
- <xsd:annotation>
- <xsd:documentation>
-
- The url-patternType contains the url pattern of the mapping.
- It must follow the rules specified in Section 11.2 of the
- Servlet API Specification. This pattern is assumed to be in
- URL-decoded form and must not contain CR(#xD) or LF(#xA).
- If it contains those characters, the container must inform
- the developer with a descriptive error message.
- The container must preserve all characters including whitespaces.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:extension base="xsd:string"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="xsdAnyURIType">
- <xsd:annotation>
- <xsd:documentation>
-
- This type adds an "id" attribute to xsd:anyURI.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:extension base="xsd:anyURI">
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="xsdBooleanType">
- <xsd:annotation>
- <xsd:documentation>
-
- This type adds an "id" attribute to xsd:boolean.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:extension base="xsd:boolean">
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="xsdIntegerType">
- <xsd:annotation>
- <xsd:documentation>
-
- This type adds an "id" attribute to xsd:integer.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:extension base="xsd:integer">
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="xsdNMTOKENType">
- <xsd:annotation>
- <xsd:documentation>
-
- This type adds an "id" attribute to xsd:NMTOKEN.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:extension base="xsd:NMTOKEN">
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="xsdNonNegativeIntegerType">
- <xsd:annotation>
- <xsd:documentation>
-
- This type adds an "id" attribute to xsd:nonNegativeInteger.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:extension base="xsd:nonNegativeInteger">
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="xsdPositiveIntegerType">
- <xsd:annotation>
- <xsd:documentation>
-
- This type adds an "id" attribute to xsd:positiveInteger.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:extension base="xsd:positiveInteger">
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="xsdQNameType">
- <xsd:annotation>
- <xsd:documentation>
-
- This type adds an "id" attribute to xsd:QName.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:extension base="xsd:QName">
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="xsdStringType">
- <xsd:annotation>
- <xsd:documentation>
-
- This type adds an "id" attribute to xsd:string.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:extension base="xsd:string">
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
-</xsd:schema>
-
Deleted: rest/src/main/resources/schema/javaee_web_services_1_2.xsd
===================================================================
--- rest/src/main/resources/schema/javaee_web_services_1_2.xsd 2007-11-21 12:01:29 UTC (rev 5094)
+++ rest/src/main/resources/schema/javaee_web_services_1_2.xsd 2007-11-21 15:23:56 UTC (rev 5095)
@@ -1,747 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://java.sun.com/xml/ns/javaee"
- xmlns:javaee="http://java.sun.com/xml/ns/javaee"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- elementFormDefault="qualified"
- attributeFormDefault="unqualified"
- version="1.2">
- <xsd:annotation>
- <xsd:documentation>
- @(#)javaee_web_services_1_2.xsds 1.18 02/13/06
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
-
- Copyright 2003-2006 Sun Microsystems, Inc.
- 4150 Network Circle
- Santa Clara, California 95054
- U.S.A
- All rights reserved.
-
- Sun Microsystems, Inc. has intellectual property rights
- relating to technology described in this document. In
- particular, and without limitation, these intellectual
- property rights may include one or more of the U.S. patents
- listed at http://www.sun.com/patents and one or more
- additional patents or pending patent applications in the
- U.S. and other countries.
-
- This document and the technology which it describes are
- distributed under licenses restricting their use, copying,
- distribution, and decompilation. No part of this document
- may be reproduced in any form by any means without prior
- written authorization of Sun and its licensors, if any.
-
- Third-party software, including font technology, is
- copyrighted and licensed from Sun suppliers.
-
- Sun, Sun Microsystems, the Sun logo, Solaris, Java, J2EE,
- JavaServer Pages, Enterprise JavaBeans and the Java Coffee
- Cup logo are trademarks or registered trademarks of Sun
- Microsystems, Inc. in the U.S. and other countries.
-
- Federal Acquisitions: Commercial Software - Government Users
- Subject to Standard License Terms and Conditions.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
-
- (C) Copyright International Business Machines Corporation 2002
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The webservices element is the root element for the web services
- deployment descriptor. It specifies the set of web service
- descriptions that are to be deployed into the Java EE Application
- Server and the dependencies they have on container resources and
- services. The deployment descriptor must be named
- "META-INF/webservices.xml" in the web services' jar file.
-
- Used in: webservices.xml
-
- All webservices deployment descriptors must indicate the
- webservices schema by using the Java EE namespace:
-
- http://java.sun.com/xml/ns/javaee
-
- and by indicating the version of the schema by using the version
- element as shown below:
-
- <webservices 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/javaee_web_services_1_2.xsd"
- version="1.2">
- ...
- </webservices>
-
- The instance documents may indicate the published version of the
- schema using the xsi:schemaLocation attribute for the Java EE
- namespace with the following location:
-
- http://java.sun.com/xml/ns/javaee/javaee_web_services_1_2.xsd
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
-
- The following conventions apply to all Java EE
- deployment descriptor elements unless indicated otherwise.
-
- - In elements that specify a pathname to a file within the
- same JAR file, relative filenames (i.e., those not
- starting with "/") are considered relative to the root of
- the JAR file's namespace. Absolute filenames (i.e., those
- starting with "/") also specify names in the root of the
- JAR file's namespace. In general, relative names are
- preferred. The exception is .war files where absolute
- names are preferred for consistency with the Servlet API.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:include schemaLocation="javaee_5.xsd"/>
-
-
-<!-- **************************************************** -->
-
- <xsd:element name="webservices" type="javaee:webservicesType">
- <xsd:annotation>
- <xsd:documentation>
-
- The webservices element is the root element for the web services
- deployment descriptor. It specifies the set of web service
- descriptions that are to be deployed into the Java EE Application Server
- and the dependencies they have on container resources and services.
-
- Used in: webservices.xml
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:key name="webservice-description-name-key">
- <xsd:annotation>
- <xsd:documentation>
-
- The webservice-description-name identifies the collection of
- port-components associated with a WSDL file and JAX-RPC mapping. The
- name must be unique within the deployment descriptor.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:webservice-description"/>
- <xsd:field xpath="javaee:webservice-description-name"/>
- </xsd:key>
- </xsd:element>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="handler-chainType">
- <xsd:annotation>
- <xsd:documentation>
-
- The handler-chain element defines the handlerchain.
- Handlerchain can be defined such that the handlers in the
- handlerchain operate,all ports of a service, on a specific
- port or on a list of protocol-bindings. The choice of elements
- service-name-pattern, port-name-pattern and protocol-bindings
- are used to specify whether the handlers in handler-chain are
- for a service, port or protocol binding. If none of these
- choices are specified with the handler-chain element then the
- handlers specified in the handler-chain will be applied on
- everything.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
-
- <xsd:choice minOccurs="0" maxOccurs="1">
- <xsd:element name="service-name-pattern"
- type="javaee:qname-pattern" />
- <xsd:element name="port-name-pattern"
- type="javaee:qname-pattern" />
- <xsd:element name="protocol-bindings"
- type="javaee:protocol-bindingListType"/>
- </xsd:choice>
-
- <xsd:element name="handler"
- type="javaee:port-component_handlerType"
- minOccurs="1" maxOccurs="unbounded"/>
- </xsd:sequence>
-
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="handler-chainsType">
- <xsd:annotation>
- <xsd:documentation>
-
- The handler-chains element defines the handlerchains associated
- with this service or service endpoint.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="handler-chain"
- type="javaee:handler-chainType"
- minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
-
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="port-componentType">
- <xsd:annotation>
- <xsd:documentation>
-
- The port-component element associates a WSDL port with a web service
- interface and implementation. It defines the name of the port as a
- component, optional description, optional display name, optional iconic
- representations, WSDL port QName, Service Endpoint Interface, Service
- Implementation Bean.
-
- This element also associates a WSDL service with a JAX-WS Provider
- implementation.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0" maxOccurs="1"/>
- <xsd:element name="display-name"
- type="javaee:display-nameType"
- minOccurs="0" maxOccurs="1"/>
- <xsd:element name="icon"
- type="javaee:iconType"
- minOccurs="0" maxOccurs="1"/>
- <xsd:element name="port-component-name"
- type="javaee:string">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The port-component-name element specifies a port component's
- name. This name is assigned by the module producer to name
- the service implementation bean in the module's deployment
- descriptor. The name must be unique among the port component
- names defined in the same module.
-
- Used in: port-component
-
- Example:
- <port-component-name>EmployeeService
- </port-component-name>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="wsdl-service"
- type="javaee:xsdQNameType"
- minOccurs="0" maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
-
- Defines the name space and local name part of the WSDL
- service QName. This is required to be specified for
- port components that are JAX-WS Provider implementations.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="wsdl-port"
- type="javaee:xsdQNameType"
- minOccurs="0" maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
-
- Defines the name space and local name part of the WSDL
- port QName. This is not required to be specified for port
- components that are JAX-WS Provider implementations
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="enable-mtom"
- type="javaee:true-falseType"
- minOccurs="0" maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
-
- Used to enable or disable SOAP MTOM/XOP mechanism for an
- endpoint implementation.
-
- Not to be specified for JAX-RPC runtime
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="protocol-binding"
- type="javaee:protocol-bindingType"
- minOccurs="0" maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
-
- Used to specify the protocol binding used by the port-component.
- If this element is not specified, then the default binding is
- used (SOAP 1.1 over HTTP)
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="service-endpoint-interface"
- type="javaee:fully-qualified-classType"
- minOccurs="0" maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The service-endpoint-interface element contains the
- fully-qualified name of the port component's Service Endpoint
- Interface.
-
- Used in: port-component
-
- Example:
- <remote>com.wombat.empl.EmployeeService</remote>
-
- This may not be specified in case there is no Service
- Enpoint Interface as is the case with directly using an
- implementation class with the @WebService annotation.
-
- When the port component is a Provider implementation
- this is not specified.
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="service-impl-bean"
- type="javaee:service-impl-beanType"/>
-
- <xsd:choice>
- <xsd:element name="handler"
- type="javaee:port-component_handlerType"
- minOccurs="0" maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
- To be used with JAX-RPC based runtime only.
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="handler-chains"
- type="javaee:handler-chainsType"
- minOccurs="0" maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
- To be used with JAX-WS based runtime only.
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:choice>
-
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="port-component_handlerType">
- <xsd:annotation>
- <xsd:documentation>
-
- Declares the handler for a port-component. Handlers can access the
- init-param name/value pairs using the HandlerInfo interface.
-
- Used in: port-component
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:group ref="javaee:descriptionGroup"/>
- <xsd:element name="handler-name"
- type="javaee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- Defines the name of the handler. The name must be unique within the
- module.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="handler-class"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- Defines a fully qualified class name for the handler implementation.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="init-param"
- type="javaee:param-valueType"
- minOccurs="0" maxOccurs="unbounded"/>
-
- <xsd:element name="soap-header"
- type="javaee:xsdQNameType"
- minOccurs="0" maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- Defines the QName of a SOAP header that will be processed by the
- handler.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="soap-role"
- type="javaee:string"
- minOccurs="0" maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- The soap-role element contains a SOAP actor definition that the
- Handler will play as a role.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:simpleType name="protocol-URIAliasType">
- <xsd:annotation>
- <xsd:documentation>
- Defines the type that is used for specifying tokens that
- start with ## which are used to alias existing standard
- protocol bindings and support aliases for new standard
- binding URIs that are introduced in future specifications.
-
- The following tokens alias the standard protocol binding
- URIs:
-
- ##SOAP11_HTTP = "http://schemas.xmlsoap.org/wsdl/soap/http"
- ##SOAP11_HTTP_MTOM =
- "http://schemas.xmlsoap.org/wsdl/soap/http?mtom=true"
- ##SOAP12_HTTP = "http://www.w3.org/2003/05/soap/bindings/HTTP/"
- ##SOAP12_HTTP_MTOM =
- "http://www.w3.org/2003/05/soap/bindings/HTTP/?mtom=true"
- ##XML_HTTP = "http://www.w3.org/2004/08/wsdl/http"
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:restriction base="xsd:token">
- <xsd:pattern value="##.+"/>
- </xsd:restriction>
- </xsd:simpleType>
-
-<!-- **************************************************** -->
-
- <xsd:simpleType name="protocol-bindingListType">
- <xsd:annotation>
- <xsd:documentation>
- Defines the type used for specifying a list of
- protocol-bindingType(s). For e.g.
-
- ##SOAP11_HTTP ##SOAP12_HTTP ##XML_HTTP
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:list itemType="javaee:protocol-bindingType"/>
- </xsd:simpleType>
-
-<!-- **************************************************** -->
-
- <xsd:simpleType name="protocol-bindingType">
- <xsd:annotation>
- <xsd:documentation>
- Defines the type used for specifying the URI for the
- protocol binding used by the port-component. For
- portability one could use one of the following tokens that
- alias the standard binding types:
-
- ##SOAP11_HTTP
- ##SOAP11_HTTP_MTOM
- ##SOAP12_HTTP
- ##SOAP12_HTTP_MTOM
- ##XML_HTTP
-
- Other specifications could define tokens that start with ##
- to alias new standard binding URIs that are introduced.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:union memberTypes="xsd:anyURI javaee:protocol-URIAliasType"/>
- </xsd:simpleType>
-
-<!-- **************************************************** -->
-
- <xsd:simpleType name="qname-pattern">
- <xsd:annotation>
- <xsd:documentation>
- This is used to specify the QName pattern in the
- attribute service-name-pattern and port-name-pattern in
- the handler-chain element
-
- For example, the various forms acceptable here for
- service-name-pattern attribute in handler-chain element
- are :
-
- Exact Name: service-name-pattern="ns1:EchoService"
-
- In this case, handlers specified in this
- handler-chain element will apply to all ports with
- this exact service name. The namespace prefix must
- have been declared in a namespace declaration
- attribute in either the start-tag of the element
- where the prefix is used or in an an ancestor
- element (i.e. an element in whose content the
- prefixed markup occurs)
-
- Pattern : service-name-pattern="ns1:EchoService*"
-
- In this case, handlers specified in this
- handler-chain element will apply to all ports whose
- Service names are like EchoService1, EchoServiceFoo
- etc. The namespace prefix must have been declared in
- a namespace declaration attribute in either the
- start-tag of the element where the prefix is used or
- in an an ancestor element (i.e. an element in whose
- content the prefixed markup occurs)
-
- Wild Card : service-name-pattern="*"
-
- In this case, handlers specified in this handler-chain
- element will apply to ports of all service names.
-
- The same can be applied to port-name attribute in
- handler-chain element.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:restriction base="xsd:token">
- <xsd:pattern value="\*|([\i-[:]][\c-[:]]*:)?[\i-[:]][\c-[:]]*\*?"/>
- </xsd:restriction>
-
- </xsd:simpleType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="service-impl-beanType">
- <xsd:annotation>
- <xsd:documentation>
-
- The service-impl-bean element defines the web service implementation.
- A service implementation can be an EJB bean class or JAX-RPC web
- component. Existing EJB implementations are exposed as a web service
- using an ejb-link.
-
- Used in: port-component
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:choice>
- <xsd:element name="ejb-link"
- type="javaee:ejb-linkType"/>
- <xsd:element name="servlet-link"
- type="javaee:servlet-linkType"/>
- </xsd:choice>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="servlet-linkType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The servlet-link element is used in the service-impl-bean element
- to specify that a Service Implementation Bean is defined as a
- JAX-RPC Service Endpoint.
-
- The value of the servlet-link element must be the servlet-name of
- a JAX-RPC Service Endpoint in the same WAR file.
-
- Used in: service-impl-bean
-
- Example:
- <servlet-link>StockQuoteService</servlet-link>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="webservice-descriptionType">
- <xsd:annotation>
- <xsd:documentation>
-
- The webservice-description element defines a WSDL document file
- and the set of Port components associated with the WSDL ports
- defined in the WSDL document. There may be multiple
- webservice-descriptions defined within a module.
-
- All WSDL file ports must have a corresponding port-component element
- defined.
-
- Used in: webservices
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0" maxOccurs="1"/>
- <xsd:element name="display-name"
- type="javaee:display-nameType"
- minOccurs="0" maxOccurs="1"/>
- <xsd:element name="icon"
- type="javaee:iconType"
- minOccurs="0" maxOccurs="1"/>
- <xsd:element name="webservice-description-name"
- type="javaee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- The webservice-description-name identifies the collection of
- port-components associated with a WSDL file and JAX-RPC
- mapping. The name must be unique within the deployment descriptor.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="wsdl-file"
- type="javaee:pathType"
- minOccurs="0" maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
-
- The wsdl-file element contains the name of a WSDL file in the
- module. The file name is a relative path within the module.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="jaxrpc-mapping-file"
- type="javaee:pathType"
- minOccurs="0" maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
-
- The jaxrpc-mapping-file element contains the name of a file that
- describes the JAX-RPC mapping between the Java interaces used by
- the application and the WSDL description in the wsdl-file. The
- file name is a relative path within the module.
-
- This is not required when JAX-WS based runtime is used.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="port-component"
- type="javaee:port-componentType"
- minOccurs="1" maxOccurs="unbounded">
- <xsd:key name="port-component_handler-name-key">
- <xsd:annotation>
- <xsd:documentation>
-
- Defines the name of the handler. The name must be unique
- within the module.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:handler"/>
- <xsd:field xpath="javaee:handler-name"/>
- </xsd:key>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="webservicesType">
- <xsd:sequence>
- <xsd:group ref="javaee:descriptionGroup"/>
- <xsd:element name="webservice-description"
- type="javaee:webservice-descriptionType"
- minOccurs="1" maxOccurs="unbounded">
- <xsd:key name="port-component-name-key">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The port-component-name element specifies a port
- component's name. This name is assigned by the module
- producer to name the service implementation bean in the
- module's deployment descriptor. The name must be unique
- among the port component names defined in the same module.
-
- Used in: port-component
-
- Example:
- <port-component-name>EmployeeService
- </port-component-name>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:port-component"/>
- <xsd:field xpath="javaee:port-component-name"/>
- </xsd:key>
- </xsd:element>
- </xsd:sequence>
-
- <xsd:attribute name="version"
- type="javaee:dewey-versionType"
- fixed="1.2"
- use="required">
- <xsd:annotation>
- <xsd:documentation>
-
- The required value for the version is 1.2.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:attribute>
-
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-</xsd:schema>
-
Deleted: rest/src/main/resources/schema/javaee_web_services_client_1_2.xsd
===================================================================
--- rest/src/main/resources/schema/javaee_web_services_client_1_2.xsd 2007-11-21 12:01:29 UTC (rev 5094)
+++ rest/src/main/resources/schema/javaee_web_services_client_1_2.xsd 2007-11-21 15:23:56 UTC (rev 5095)
@@ -1,578 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://java.sun.com/xml/ns/javaee"
- xmlns:javaee="http://java.sun.com/xml/ns/javaee"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- elementFormDefault="qualified"
- attributeFormDefault="unqualified"
- version="1.2">
- <xsd:annotation>
- <xsd:documentation>
- @(#)javaee_web_services_client_1_2.xsds 1.19 02/13/06
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
-
- Copyright 2003-2006 Sun Microsystems, Inc.
- 4150 Network Circle
- Santa Clara, California 95054
- U.S.A
- All rights reserved.
-
- Sun Microsystems, Inc. has intellectual property rights
- relating to technology described in this document. In
- particular, and without limitation, these intellectual
- property rights may include one or more of the U.S. patents
- listed at http://www.sun.com/patents and one or more
- additional patents or pending patent applications in the
- U.S. and other countries.
-
- This document and the technology which it describes are
- distributed under licenses restricting their use, copying,
- distribution, and decompilation. No part of this document
- may be reproduced in any form by any means without prior
- written authorization of Sun and its licensors, if any.
-
- Third-party software, including font technology, is
- copyrighted and licensed from Sun suppliers.
-
- Sun, Sun Microsystems, the Sun logo, Solaris, Java, J2EE,
- JavaServer Pages, Enterprise JavaBeans and the Java Coffee
- Cup logo are trademarks or registered trademarks of Sun
- Microsystems, Inc. in the U.S. and other countries.
-
- Federal Acquisitions: Commercial Software - Government Users
- Subject to Standard License Terms and Conditions.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
-
- (C) Copyright International Business Machines Corporation 2002
-
- </xsd:documentation>
- </xsd:annotation>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="port-component-refType">
- <xsd:annotation>
- <xsd:documentation>
-
- The port-component-ref element declares a client dependency
- on the container for resolving a Service Endpoint Interface
- to a WSDL port. It optionally associates the Service Endpoint
- Interface with a particular port-component. This is only used
- by the container for a Service.getPort(Class) method call.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="service-endpoint-interface"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The service-endpoint-interface element defines a fully qualified
- Java class that represents the Service Endpoint Interface of a
- WSDL port.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="enable-mtom"
- type="javaee:true-falseType"
- minOccurs="0" maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
-
- Used to enable or disable SOAP MTOM/XOP mechanism on the client
- side for a port-component.
-
- Not to be specified for JAX-RPC runtime
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="port-component-link"
- type="javaee:string"
- minOccurs="0" maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
-
- The port-component-link element links a port-component-ref
- to a specific port-component required to be made available
- by a service reference.
-
- The value of a port-component-link must be the
- port-component-name of a port-component in the same module
- or another module in the same application unit. The syntax
- for specification follows the syntax defined for ejb-link
- in the EJB 2.0 specification.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:group name="service-refGroup">
- <xsd:sequence>
- <xsd:element name="service-ref"
- type="javaee:service-refType"
- minOccurs="0" maxOccurs="unbounded">
- <xsd:key name="service-ref_handler-name-key">
- <xsd:annotation>
- <xsd:documentation>
-
- Defines the name of the handler. The name must be unique
- within the module.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:handler"/>
- <xsd:field xpath="javaee:handler-name"/>
- </xsd:key>
- </xsd:element>
- </xsd:sequence>
- </xsd:group>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="service-refType">
- <xsd:annotation>
- <xsd:documentation>
-
- The service-ref element declares a reference to a Web
- service. It contains optional description, display name and
- icons, a declaration of the required Service interface,
- an optional WSDL document location, an optional set
- of JAX-RPC mappings, an optional QName for the service element,
- an optional set of Service Endpoint Interfaces to be resolved
- by the container to a WSDL port, and an optional set of handlers.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:group ref="javaee:descriptionGroup"/>
- <xsd:element name="service-ref-name"
- type="javaee:jndi-nameType">
- <xsd:annotation>
- <xsd:documentation>
-
- The service-ref-name element declares logical name that the
- components in the module use to look up the Web service. It
- is recommended that all service reference names start with
- "service/".
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="service-interface"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The service-interface element declares the fully qualified class
- name of the JAX-RPC Service interface the client depends on.
- In most cases the value will be javax.xml.rpc.Service. A JAX-RPC
- generated Service Interface class may also be specified.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="service-ref-type"
- type="javaee:fully-qualified-classType"
- minOccurs="0" maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
-
- The service-ref-type element declares the type of the service-ref
- element that is injected or returned when a JNDI lookup is done.
- This must be either a fully qualified name of Service class or
- the fully qualified name of service endpoint interface class.
- This is only used with JAX-WS runtime where the corresponding
- @WebServiceRef annotation can be used to denote both a Service
- or a Port.
-
- If this is not specified, then the type of service-ref element
- that is injected or returned when a JNDI lookup is done is
- always a Service interface/class.
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="wsdl-file"
- type="javaee:xsdAnyURIType"
- minOccurs="0" maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
-
- The wsdl-file element contains the URI location of a WSDL
- file. The location is relative to the root of the module.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="jaxrpc-mapping-file"
- type="javaee:pathType"
- minOccurs="0" maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
-
- The jaxrpc-mapping-file element contains the name of a file that
- describes the JAX-RPC mapping between the Java interaces used by
- the application and the WSDL description in the wsdl-file. The
- file name is a relative path within the module file.
-
- This is not required when JAX-WS based runtime is used.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="service-qname"
- type="javaee:xsdQNameType"
- minOccurs="0" maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
-
- The service-qname element declares the specific WSDL service
- element that is being refered to. It is not specified if no
- wsdl-file is declared.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="port-component-ref"
- type="javaee:port-component-refType"
- minOccurs="0" maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- The port-component-ref element declares a client dependency
- on the container for resolving a Service Endpoint Interface
- to a WSDL port. It optionally associates the Service Endpoint
- Interface with a particular port-component. This is only used
- by the container for a Service.getPort(Class) method call.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:choice>
- <xsd:element name="handler"
- type="javaee:service-ref_handlerType"
- minOccurs="0" maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- Declares the handler for a port-component. Handlers can
- access the init-param name/value pairs using the
- HandlerInfo interface. If port-name is not specified, the
- handler is assumed to be associated with all ports of the
- service.
-
- To be used with JAX-RPC based runtime only.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="handler-chains"
- type="javaee:service-ref_handler-chainsType"
- minOccurs="0" maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
- To be used with JAX-WS based runtime only.
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:choice>
-
- <xsd:group ref="javaee:resourceGroup"/>
-
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="service-ref_handler-chainType">
- <xsd:annotation>
- <xsd:documentation>
-
- The handler-chain element defines the handlerchain.
- Handlerchain can be defined such that the handlers in the
- handlerchain operate,all ports of a service, on a specific
- port or on a list of protocol-bindings. The choice of elements
- service-name-pattern, port-name-pattern and protocol-bindings
- are used to specify whether the handlers in handler-chain are
- for a service, port or protocol binding. If none of these
- choices are specified with the handler-chain element then the
- handlers specified in the handler-chain will be applied on
- everything.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
-
- <xsd:choice minOccurs="0" maxOccurs="1">
- <xsd:element name="service-name-pattern"
- type="javaee:service-ref_qname-pattern" />
- <xsd:element name="port-name-pattern"
- type="javaee:service-ref_qname-pattern" />
- <xsd:element name="protocol-bindings"
- type="javaee:service-ref_protocol-bindingListType"/>
- </xsd:choice>
-
- <xsd:element name="handler"
- type="javaee:service-ref_handlerType"
- minOccurs="1" maxOccurs="unbounded"/>
- </xsd:sequence>
-
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="service-ref_handler-chainsType">
- <xsd:annotation>
- <xsd:documentation>
-
- The handler-chains element defines the handlerchains associated with this
- service or service endpoint.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="handler-chain"
- type="javaee:service-ref_handler-chainType"
- minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
-
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="service-ref_handlerType">
- <xsd:annotation>
- <xsd:documentation>
-
- Declares the handler for a port-component. Handlers can access the
- init-param name/value pairs using the HandlerInfo interface. If
- port-name is not specified, the handler is assumed to be associated
- with all ports of the service.
-
- Used in: service-ref
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:group ref="javaee:descriptionGroup"/>
- <xsd:element name="handler-name"
- type="javaee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- Defines the name of the handler. The name must be unique
- within the module.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="handler-class"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- Defines a fully qualified class name for the handler
- implementation.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="init-param"
- type="javaee:param-valueType"
- minOccurs="0" maxOccurs="unbounded"/>
-
- <xsd:element name="soap-header"
- type="javaee:xsdQNameType"
- minOccurs="0" maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- Defines the QName of a SOAP header that will be processed
- by the handler.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="soap-role"
- type="javaee:string"
- minOccurs="0" maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- The soap-role element contains a SOAP actor definition that
- the Handler will play as a role.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="port-name"
- type="javaee:string"
- minOccurs="0" maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- The port-name element defines the WSDL port-name that a
- handler should be associated with.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:simpleType name="service-ref_protocol-URIAliasType">
- <xsd:annotation>
- <xsd:documentation>
- Defines the type that is used for specifying tokens that
- start with ## which are used to alias existing standard
- protocol bindings and support aliases for new standard
- binding URIs that are introduced in future specifications.
-
- The following tokens alias the standard protocol binding
- URIs:
-
- ##SOAP11_HTTP = "http://schemas.xmlsoap.org/wsdl/soap/http"
- ##SOAP11_HTTP_MTOM =
- "http://schemas.xmlsoap.org/wsdl/soap/http?mtom=true"
- ##SOAP12_HTTP = "http://www.w3.org/2003/05/soap/bindings/HTTP/"
- ##SOAP12_HTTP_MTOM =
- "http://www.w3.org/2003/05/soap/bindings/HTTP/?mtom=true"
- ##XML_HTTP = "http://www.w3.org/2004/08/wsdl/http"
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:restriction base="xsd:token">
- <xsd:pattern value="##.+"/>
- </xsd:restriction>
- </xsd:simpleType>
-
-<!-- **************************************************** -->
-
- <xsd:simpleType name="service-ref_protocol-bindingListType">
- <xsd:annotation>
- <xsd:documentation>
- Defines the type used for specifying a list of
- protocol-bindingType(s). For e.g.
-
- ##SOAP11_HTTP ##SOAP12_HTTP ##XML_HTTP
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:list itemType="javaee:service-ref_protocol-bindingType"/>
- </xsd:simpleType>
-
-<!-- **************************************************** -->
-
- <xsd:simpleType name="service-ref_protocol-bindingType">
- <xsd:annotation>
- <xsd:documentation>
- Defines the type used for specifying the URI for the
- protocol binding used by the port-component. For
- portability one could use one of the following tokens that
- alias the standard binding types:
-
- ##SOAP11_HTTP
- ##SOAP11_HTTP_MTOM
- ##SOAP12_HTTP
- ##SOAP12_HTTP_MTOM
- ##XML_HTTP
-
- Other specifications could define tokens that start with ##
- to alias new standard binding URIs that are introduced.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:union memberTypes="xsd:anyURI javaee:service-ref_protocol-URIAliasType"/>
- </xsd:simpleType>
-
-<!-- **************************************************** -->
-
- <xsd:simpleType name="service-ref_qname-pattern">
- <xsd:annotation>
- <xsd:documentation>
- This is used to specify the QName pattern in the
- attribute service-name-pattern and port-name-pattern in
- the handler-chain element
-
- For example, the various forms acceptable here for
- service-name-pattern attribute in handler-chain element
- are :
-
- Exact Name: service-name-pattern="ns1:EchoService"
-
- In this case, handlers specified in this
- handler-chain element will apply to all ports with
- this exact service name. The namespace prefix must
- have been declared in a namespace declaration
- attribute in either the start-tag of the element
- where the prefix is used or in an an ancestor
- element (i.e. an element in whose content the
- prefixed markup occurs)
-
- Pattern : service-name-pattern="ns1:EchoService*"
-
- In this case, handlers specified in this
- handler-chain element will apply to all ports whose
- Service names are like EchoService1, EchoServiceFoo
- etc. The namespace prefix must have been declared in
- a namespace declaration attribute in either the
- start-tag of the element where the prefix is used or
- in an an ancestor element (i.e. an element in whose
- content the prefixed markup occurs)
-
- Wild Card : service-name-pattern="*"
-
- In this case, handlers specified in this handler-chain
- element will apply to ports of all service names.
-
- The same can be applied to port-name attribute in
- handler-chain element.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:restriction base="xsd:token">
- <xsd:pattern value="\*|([\i-[:]][\c-[:]]*:)?[\i-[:]][\c-[:]]*\*?"/>
- </xsd:restriction>
-
- </xsd:simpleType>
-
-</xsd:schema>
-
Deleted: rest/src/main/resources/schema/jaxrpc-config_2_0.xsd
===================================================================
--- rest/src/main/resources/schema/jaxrpc-config_2_0.xsd 2007-11-21 12:01:29 UTC (rev 5094)
+++ rest/src/main/resources/schema/jaxrpc-config_2_0.xsd 2007-11-21 15:23:56 UTC (rev 5095)
@@ -1,83 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:jboss:jaxrpc-config:2.0" xmlns:tns="urn:jboss:jaxrpc-config:2.0"
- xmlns:jbxb="http://www.jboss.org/xml/ns/jbxb" xmlns:j2ee="http://java.sun.com/xml/ns/j2ee" xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
- attributeFormDefault="unqualified" version="1.1">
-
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- This is the schema definition for JBossWS configurations JAXRPC.
- It relies on the handler definitions that are part of the standard J2EE-1.4 deployment descriptors.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:import namespace="http://java.sun.com/xml/ns/j2ee" schemaLocation="j2ee_web_services_1_1.xsd"/>
-
- <xsd:complexType name="jaxrpcConfigType">
- <xsd:annotation>
- <xsd:appinfo>
- <jbxb:class impl="org.jboss.ws.metadata.config.WSConfig"/>
- </xsd:appinfo>
- </xsd:annotation>
- <xsd:choice>
- <xsd:element name="endpoint-config" type="tns:endpointConfigType" minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="client-config" type="tns:clientConfigType" minOccurs="0" maxOccurs="unbounded"/>
- </xsd:choice>
- </xsd:complexType>
-
- <xsd:element name="jaxrpc-config" type="tns:jaxrpcConfigType"/>
-
- <xsd:complexType name="endpointConfigType">
- <xsd:annotation>
- <xsd:appinfo>
- <jbxb:class impl="org.jboss.ws.metadata.config.WSEndpointConfig"/>
- </xsd:appinfo>
- </xsd:annotation>
- <xsd:complexContent>
- <xsd:extension base="tns:commonConfigType"/>
- </xsd:complexContent>
- </xsd:complexType>
-
- <xsd:complexType name="clientConfigType">
- <xsd:annotation>
- <xsd:appinfo>
- <jbxb:class impl="org.jboss.ws.metadata.config.WSClientConfig"/>
- </xsd:appinfo>
- </xsd:annotation>
- <xsd:complexContent>
- <xsd:extension base="tns:commonConfigType"/>
- </xsd:complexContent>
- </xsd:complexType>
-
- <xsd:complexType name="commonConfigType">
- <xsd:sequence>
- <xsd:element name="config-name" type="xsd:string"/>
- <xsd:element name="pre-handler-chain" type="tns:handlerChainType" minOccurs="0"/>
- <xsd:element name="post-handler-chain" type="tns:handlerChainType" minOccurs="0"/>
- <xsd:element name="feature" type="xsd:anyURI" minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="property" type="tns:propertyType" minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:complexType name="handlerChainType">
- <xsd:annotation>
- <xsd:appinfo>
- <jbxb:class impl="org.jboss.ws.metadata.config.WSHandlerChainConfig"/>
- </xsd:appinfo>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="handler-chain-name" type="xsd:string"/>
- <xsd:element name="handler" type="j2ee:port-component_handlerType" minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:complexType name="propertyType">
- <xsd:sequence>
- <xsd:element name="property-name" type="xsd:string"/>
- <xsd:element name="property-value" type="xsd:string"/>
- </xsd:sequence>
- </xsd:complexType>
-
-</xsd:schema>
\ No newline at end of file
Deleted: rest/src/main/resources/schema/jaxws-config_2_0.xsd
===================================================================
--- rest/src/main/resources/schema/jaxws-config_2_0.xsd 2007-11-21 12:01:29 UTC (rev 5094)
+++ rest/src/main/resources/schema/jaxws-config_2_0.xsd 2007-11-21 15:23:56 UTC (rev 5095)
@@ -1,67 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
- targetNamespace="urn:jboss:jaxws-config:2.0"
- xmlns:tns="urn:jboss:jaxws-config:2.0"
- xmlns:jbxb="http://www.jboss.org/xml/ns/jbxb"
- xmlns:javaee="http://java.sun.com/xml/ns/javaee"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.1">
-
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
- This is the schema definition for JBossWS configurations JAXWS.
- It relies on the handler definitions that are part of the standard J2EE-1.5 deployment descriptors.
- ]]>
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:import namespace="http://java.sun.com/xml/ns/javaee" schemaLocation="javaee_web_services_1_2.xsd"/>
-
- <xsd:element name="jaxws-config" type="tns:jaxwsConfigType"/>
- <xsd:complexType name="jaxwsConfigType">
- <xsd:choice>
- <xsd:element name="endpoint-config" type="tns:endpointConfigType" minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="client-config" type="tns:clientConfigType" minOccurs="0" maxOccurs="unbounded"/>
- </xsd:choice>
- </xsd:complexType>
-
- <xsd:complexType name="endpointConfigType">
- <xsd:complexContent>
- <xsd:extension base="tns:commonConfigType"/>
- </xsd:complexContent>
- </xsd:complexType>
-
- <!-- client config -->
- <xsd:complexType name="clientConfigType">
- <xsd:complexContent>
- <xsd:extension base="tns:commonConfigType"/>
- </xsd:complexContent>
- </xsd:complexType>
-
- <xsd:complexType name="commonConfigType">
- <xsd:sequence>
- <xsd:element name="config-name" type="xsd:string"/>
- <xsd:element name="pre-handler-chains" type="javaee:handler-chainsType" minOccurs="0"/>
- <xsd:element name="post-handler-chains" type="javaee:handler-chainsType" minOccurs="0"/>
- <xsd:element name="feature" type="xsd:anyURI" minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="property" type="tns:propertyType" minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:complexType name="propertyType">
- <xsd:annotation>
- <xsd:documentation>
-
- A property models name value pairs.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="property-name" type="xsd:anyURI"/>
- <xsd:element name="property-value" type="xsd:string"/>
- </xsd:sequence>
- </xsd:complexType>
-
-</xsd:schema>
Deleted: rest/src/main/resources/schema/jboss-ws-security_1_0.xsd
===================================================================
--- rest/src/main/resources/schema/jboss-ws-security_1_0.xsd 2007-11-21 12:01:29 UTC (rev 5094)
+++ rest/src/main/resources/schema/jboss-ws-security_1_0.xsd 2007-11-21 15:23:56 UTC (rev 5095)
@@ -1,253 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.jboss.com/ws-security/config" targetNamespace="http://www.jboss.com/ws-security/config" elementFormDefault="qualified">
- <xs:element name="jboss-ws-security">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="key-store-file" type="xs:string" minOccurs="0">
- <xs:annotation>
- <xs:documentation>The key store file that will be used for all operations. This file is relative to the deployment. For example, WEB-INF/foo.keystore </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="key-store-type" type="xs:string" minOccurs="0">
- <xs:annotation>
- <xs:documentation>The type of the key store. For example, JKS.</xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="key-store-password" type="xs:string" minOccurs="0">
- <xs:annotation>
- <xs:documentation>This specifies the key store's password.</xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="trust-store-file" type="xs:string" minOccurs="0">
- <xs:annotation>
- <xs:documentation>This specifies the trust store. The truststore is used to validate all X.509v3 tokens that are included in the message. This file is relative to the deployment. For example, WEB-INF/foo.truststore.</xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="trust-store-type" type="xs:string" minOccurs="0">
- <xs:annotation>
- <xs:documentation>This specifies the type of the trust store. For example, JKS.</xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="trust-store-password" type="xs:string" minOccurs="0">
- <xs:annotation>
- <xs:documentation>This specifies the trust store's password.</xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="key-passwords" type="passwordsType" minOccurs="0">
- <xs:annotation>
- <xs:documentation>The passwords for the private keys in the keystore. Only required if the passwords are different from that of the keystore.</xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="config" type="configType" minOccurs="0">
- <xs:annotation>
- <xs:documentation>The default security configuration that is applied to all operations on all ports. This is only used if there is no port/operation config.</xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="port" type="portType" minOccurs="0" maxOccurs="unbounded">
- <xs:annotation>
- <xs:documentation>The WSDL port.</xs:documentation>
- </xs:annotation>
- </xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:complexType name="passwordsType">
- <xs:sequence>
- <xs:element name="key-password" type="passwordType" minOccurs="0" maxOccurs="unbounded">
- <xs:annotation>
- <xs:documentation>The password for a private key in the keystore. Necessary only if the password is different from that of the keystore.</xs:documentation>
- </xs:annotation>
- </xs:element>
- </xs:sequence>
- </xs:complexType>
- <xs:complexType name="passwordType">
- <xs:attribute name="alias" type="xs:string" use="required">
- <xs:annotation>
- <xs:documentation>The name of the private key.</xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="password" type="xs:string">
- <xs:annotation>
- <xs:documentation>The password of this private key. If not specified, the keystore password will be used.</xs:documentation>
- </xs:annotation>
- </xs:attribute>
- </xs:complexType>
- <xs:complexType name="configType" mixed="true">
- <xs:all>
- <xs:element name="timestamp" type="timestampType" minOccurs="0">
- <xs:annotation>
- <xs:documentation>The timestamp options that can be used to configure WS-Security message expiration.</xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="username" type="usernameType" minOccurs="0">
- <xs:annotation>
- <xs:documentation>Specifies that the message should include a username token if there is a username set on the Call or Proxy object.</xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="encrypt" type="encryptType" minOccurs="0">
- <xs:annotation>
- <xs:documentation>Specifies that the message should be encrypted. If no targets are specified, then just the body will be encrypted.</xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="sign" type="signType" minOccurs="0">
- <xs:annotation>
- <xs:documentation>Specifies that the message should be signed. If no targets are specified then the entire body will be signed.</xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="requires" type="requiresType" minOccurs="0">
- <xs:annotation>
- <xs:documentation>Specifies the security requirements that should be applied when receiving a response from the communicating party. If this is not specified, all messages will be allowed through.</xs:documentation>
- </xs:annotation>
- </xs:element>
- </xs:all>
- </xs:complexType>
- <xs:complexType name="requireTimestampType">
- <xs:attribute name="maxAge" type="xs:long" use="optional">
- <xs:annotation>
- <xs:documentation>The maximum age that a message can be and still be processed.</xs:documentation>
- </xs:annotation>
- </xs:attribute>
- </xs:complexType>
- <xs:complexType name="requireEncryptionType">
- <xs:sequence>
- <xs:element name="targets" type="targetsType" minOccurs="0"/>
- </xs:sequence>
- </xs:complexType>
- <xs:complexType name="requireSignatureType">
- <xs:sequence>
- <xs:element name="targets" type="targetsType" minOccurs="0"/>
- </xs:sequence>
- </xs:complexType>
- <xs:complexType name="requiresType">
- <xs:all>
- <xs:element name="timestamp" type="requireTimestampType" minOccurs="0">
- <xs:annotation>
- <xs:documentation>Indicates that a timestamp element must be present in the message, and that the message can not be older than maxAge.</xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="encryption" type="requireEncryptionType" minOccurs="0">
- <xs:annotation>
- <xs:documentation>Indicates that the specified targets in this message must be encrypted. If no targets are specified, then the full body of the message must be encrypted</xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="signature" type="requireSignatureType" minOccurs="0">
- <xs:annotation>
- <xs:documentation>Indicates that the specified targets in this message must be signed. If no targets are specified, then the full body of the message must be signed.</xs:documentation>
- </xs:annotation>
- </xs:element>
- </xs:all>
- </xs:complexType>
- <xs:complexType name="timestampType">
- <xs:attribute name="ttl" use="optional">
- <xs:annotation>
- <xs:documentation>The Time-To-Live for a message in seconds. The default is no expiration.</xs:documentation>
- </xs:annotation>
- </xs:attribute>
- </xs:complexType>
- <xs:complexType name="usernameType">
- <xs:sequence/>
- </xs:complexType>
- <xs:complexType name="encryptType">
- <xs:sequence>
- <xs:element name="targets" type="targetsType" minOccurs="0">
- <xs:annotation>
- <xs:documentation>A list of targets to apply the parent operation on.</xs:documentation>
- </xs:annotation>
- </xs:element>
- </xs:sequence>
- <xs:attribute name="type" use="required">
- <xs:annotation>
- <xs:documentation>The type of token that should should be used when performing encryption. The only supported value is "x509v3", which means to use an X.509v3 cert to encrypt the symmetric key.</xs:documentation>
- </xs:annotation>
- <xs:simpleType>
- <xs:restriction base="xs:string">
- <xs:enumeration value="x509v3"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- <xs:attribute name="alias" type="xs:string" use="required">
- <xs:annotation>
- <xs:documentation>The name of the certificate to use.</xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="algorithm">
- <xs:annotation>
- <xs:documentation>The symmetric encryption algorithm to use. If not specified aes-128 will be used.</xs:documentation>
- </xs:annotation>
- <xs:simpleType>
- <xs:restriction base="xs:string">
- <xs:enumeration value="aes-128"/>
- <xs:enumeration value="aes-192"/>
- <xs:enumeration value="aes-256"/>
- <xs:enumeration value="tripledes"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- </xs:complexType>
- <xs:complexType name="signType">
- <xs:sequence>
- <xs:element name="targets" type="targetsType" minOccurs="0"/>
- </xs:sequence>
- <xs:attribute name="type" use="required">
- <xs:simpleType>
- <xs:restriction base="xs:string">
- <xs:enumeration value="x509v3"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- <xs:attribute name="alias" type="xs:string" use="required"/>
- <xs:attribute name="includeTimestamp" type="xs:boolean" use="optional"/>
- </xs:complexType>
- <xs:complexType name="operationType">
- <xs:sequence>
- <xs:element name="config" type="configType">
- <xs:annotation>
- <xs:documentation>The security configuration for a specific operation on a specific port. If specified the default configuration values are not used.</xs:documentation>
- </xs:annotation>
- </xs:element>
- </xs:sequence>
- <xs:attribute name="name" type="xs:string" use="required"/>
- </xs:complexType>
- <xs:complexType name="portType">
- <xs:sequence>
- <xs:element name="config" type="configType" minOccurs="0">
- <xs:annotation>
- <xs:documentation>The default security configuration that is applied to all operations on this port. This is only used if there is no operation configuration defined.</xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="operation" type="operationType">
- <xs:annotation>
- <xs:documentation>The WSDL operation.</xs:documentation>
- </xs:annotation>
- </xs:element>
- </xs:sequence>
- <xs:attribute name="name" type="xs:string" use="required"/>
- </xs:complexType>
- <xs:complexType name="targetType" mixed="true">
- <xs:attribute name="contentOnly" type="xs:string" use="optional">
- <xs:annotation>
- <xs:documentation>If true, the content of this element will be encrypted as opposed to the entire element.</xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="type" use="required">
- <xs:annotation>
- <xs:documentation>The type of target. Current allowed values are qname, which specifies an XML fully qualified name, and wsuid which maps to an internal WS-Security id</xs:documentation>
- </xs:annotation>
- <xs:simpleType>
- <xs:restriction base="xs:string">
- <xs:enumeration value="qname"/>
- <xs:enumeration value="wsuid"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- </xs:complexType>
- <xs:complexType name="targetsType">
- <xs:sequence>
- <xs:element name="target" type="targetType" minOccurs="0" maxOccurs="unbounded">
- <xs:annotation>
- <xs:documentation>An element in the message to perform an operation on. The content of this field should match the rules of the specified type.</xs:documentation>
- </xs:annotation>
- </xs:element>
- </xs:sequence>
- </xs:complexType>
-</xs:schema>
Modified: rest/src/main/resources/schema/jbossrs.xsd
===================================================================
--- rest/src/main/resources/schema/jbossrs.xsd 2007-11-21 12:01:29 UTC (rev 5094)
+++ rest/src/main/resources/schema/jbossrs.xsd 2007-11-21 15:23:56 UTC (rev 5095)
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://org.jboss.rs/"
- xmlns:tns="http://org.jboss.rs/"
+ targetNamespace="http://org.jboss.rest/"
+ xmlns:tns="http://org.jboss.rest/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.1">
Deleted: rest/src/main/resources/schema/jbossws-tool_1_0.xsd
===================================================================
--- rest/src/main/resources/schema/jbossws-tool_1_0.xsd 2007-11-21 12:01:29 UTC (rev 5094)
+++ rest/src/main/resources/schema/jbossws-tool_1_0.xsd 2007-11-21 15:23:56 UTC (rev 5095)
@@ -1,281 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- edited with XMLSpy v2005 rel. 3 U (http://www.altova.com) by jboss (JBoss, Inc.) -->
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://www.jboss.org/jbossws-tools" targetNamespace="http://www.jboss.org/jbossws-tools" elementFormDefault="qualified" attributeFormDefault="unqualified">
- <xs:element name="configuration" type="ns1:configurationType">
- <xs:annotation>
- <xs:documentation>Configuration Element</xs:documentation>
- </xs:annotation>
- </xs:element>
- <!-- Define the Complex Types Here -->
- <xs:complexType name="configurationType">
- <xs:sequence>
- <xs:element name="global" type="ns1:globalType" minOccurs="0">
- <xs:annotation>
- <xs:documentation>Represents global options</xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:choice>
- <xs:element name="java-wsdl" type="ns1:javaToWsdlType">
- <xs:annotation>
- <xs:documentation>Generates a WSDL file from a JSR-109 service endpoint interface. Additionally, a webservices.xml and a JSR-109 mapping file can also be generated</xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="wsdl-java" type="ns1:wsdlToJavaType">
- <xs:annotation>
- <xs:documentation>Generates a JSR-109 service endpoint interface, and optionally a JSR-109 mapping file</xs:documentation>
- </xs:annotation>
- </xs:element>
- </xs:choice>
- </xs:sequence>
- </xs:complexType>
- <xs:complexType name="globalType">
- <xs:sequence>
- <xs:element name="package-namespace" type="ns1:pkgNSType" minOccurs="0" maxOccurs="unbounded">
- <xs:annotation>
- <xs:documentation>Allows customization of the java package name to xml namespace mapping. This is specified in package/namespace element pairs.</xs:documentation>
- </xs:annotation>
- </xs:element>
- </xs:sequence>
- </xs:complexType>
- <xs:complexType name="pkgNSType">
- <xs:annotation>
- <xs:documentation>A package namespace pair.</xs:documentation>
- </xs:annotation>
- <xs:simpleContent>
- <xs:extension base="xs:string">
- <xs:attribute name="package">
- <xs:annotation>
- <xs:documentation>Package Name</xs:documentation>
- </xs:annotation>
- <xs:simpleType>
- <xs:restriction base="xs:string">
- <xs:whiteSpace value="collapse"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- <xs:attribute name="namespace">
- <xs:annotation>
- <xs:documentation>XML Namespace</xs:documentation>
- </xs:annotation>
- <xs:simpleType>
- <xs:restriction base="xs:string">
- <xs:whiteSpace value="collapse"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
- <xs:complexType name="serviceType">
- <xs:sequence>
- <xs:element name="operation" type="ns1:operationType" minOccurs="0" maxOccurs="unbounded">
- <xs:annotation>
- <xs:documentation>Used to customize a WSDL operation. This chlid elements of this tag are mapped to a Java method on the endpoint interface. The name and parameter types must be specified in order to locate the method.</xs:documentation>
- </xs:annotation>
- </xs:element>
- </xs:sequence>
- <xs:attribute name="name" use="required">
- <xs:annotation>
- <xs:documentation>Name of the service. This will appear in the service element of the generated WSDL file.</xs:documentation>
- </xs:annotation>
- <xs:simpleType>
- <xs:restriction base="xs:string">
- <xs:whiteSpace value="collapse"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- <xs:attribute name="endpoint" use="required">
- <xs:annotation>
- <xs:documentation>The fully qualified Java interface name of the service endpoint interface.</xs:documentation>
- </xs:annotation>
- <xs:simpleType>
- <xs:restriction base="xs:string">
- <xs:whiteSpace value="collapse"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- <xs:attribute name="style" use="optional" default="rpc">
- <xs:annotation>
- <xs:documentation>The style of the web service. The "rpc" style indicates multiple parts where each part is a separate schema document instance. The "document" style indicates that the body of the message is represented by a single part.</xs:documentation>
- </xs:annotation>
- <xs:simpleType>
- <xs:restriction base="xs:string">
- <xs:enumeration value="rpc"/>
- <xs:enumeration value="document"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- <xs:attribute name="parameter-style" use="optional" default="wrapped">
- <xs:annotation>
- <xs:documentation>The parameter style convention to use when using document/literal. The "bare" convention requires that the Java method have a single parameter that represents the full request message body, and a single return value that represents the full response message body. The "wrapped" convention allows any Java method signature because it wraps all parameter in a single schema type.</xs:documentation>
- </xs:annotation>
- <xs:simpleType>
- <xs:restriction base="xs:string">
- <xs:enumeration value="bare"/>
- <xs:enumeration value="wrapped"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- </xs:complexType>
- <xs:complexType name="namespacesType">
- <xs:attribute name="target-namespace" use="required">
- <xs:annotation>
- <xs:documentation>The target namespace of the WSDL. By default, it will be derived from the package name of the java endpoint.</xs:documentation>
- </xs:annotation>
- <xs:simpleType>
- <xs:restriction base="xs:anyURI">
- <xs:whiteSpace value="collapse"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- <xs:attribute name="type-namespace" use="required">
- <xs:annotation>
- <xs:documentation>The namespace to be used for the schema types.By default, will be the same as the target namespace of the WSDL file.</xs:documentation>
- </xs:annotation>
- <xs:simpleType>
- <xs:restriction base="xs:anyURI">
- <xs:whiteSpace value="collapse"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- </xs:complexType>
- <xs:complexType name="mappingType">
- <xs:attribute name="file" use="optional" default="jaxrpc-mapping.xml">
- <xs:annotation>
- <xs:documentation>The JSR-109 mapping file to generate. This defaults to jaxrpc-mapping.xml</xs:documentation>
- </xs:annotation>
- <xs:simpleType>
- <xs:restriction base="xs:string">
- <xs:whiteSpace value="collapse"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- </xs:complexType>
- <xs:complexType name="operationType">
- <xs:sequence>
- <xs:element name="parameter" type="ns1:parameterType" minOccurs="0" maxOccurs="unbounded">
- <xs:annotation>
- <xs:documentation>Represents a method parameter. It must be in the exact order of the Java method signature.</xs:documentation>
- </xs:annotation>
- </xs:element>
- </xs:sequence>
- <xs:attribute name="name" use="required">
- <xs:annotation>
- <xs:documentation>The Java method name.</xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="one-way" use="optional">
- <xs:annotation>
- <xs:documentation>If true, the generated WSDL operation should have no response message.</xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="return-xml-name" type="xs:QName" use="optional">
- <xs:annotation>
- <xs:documentation>The name of the return value in the response message.</xs:documentation>
- </xs:annotation>
- </xs:attribute>
- </xs:complexType>
- <xs:complexType name="wsxmlType">
- <xs:attribute name="servlet-link" use="optional">
- <xs:annotation>
- <xs:documentation>Specifies the web.xml servlet-link that is used by Java Service Endpoints (WAR style deployments)</xs:documentation>
- </xs:annotation>
- <xs:simpleType>
- <xs:restriction base="xs:string">
- <xs:whiteSpace value="collapse"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- <xs:attribute name="ejb-link" use="optional">
- <xs:annotation>
- <xs:documentation>Specifies the ejb-jar.xml ejb-link for Stateless Session Bean endpoints</xs:documentation>
- </xs:annotation>
- <xs:simpleType>
- <xs:restriction base="xs:string">
- <xs:whiteSpace value="collapse"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- <xs:attribute name="append" type="xs:boolean" use="optional" />
- </xs:complexType>
- <xs:complexType name="javaToWsdlType">
- <xs:sequence>
- <xs:element name="service" type="ns1:serviceType"/>
- <xs:element name="namespaces" type="ns1:namespacesType">
- <xs:annotation>
- <xs:documentation>Namespaces to use when generating the WSDL file.</xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="mapping" type="ns1:mappingType" minOccurs="0">
- <xs:annotation>
- <xs:documentation>Specifies the JSR-109 mapping file to generate.</xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="webservices" type="ns1:wsxmlType" minOccurs="0">
- <xs:annotation>
- <xs:documentation>Used to generate the JSR-109 webservices.xml file</xs:documentation>
- </xs:annotation>
- </xs:element>
- </xs:sequence>
- </xs:complexType>
- <xs:complexType name="wsdlToJavaType">
- <xs:sequence>
- <xs:element name="mapping" type="ns1:mappingType" minOccurs="0">
- <xs:annotation>
- <xs:documentation>Specifies the JSR-109 mapping file to generate.</xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="webservices" type="ns1:wsxmlType" minOccurs="0">
- <xs:annotation>
- <xs:documentation>Used to generate the JSR-109 webservices.xml file</xs:documentation>
- </xs:annotation>
- </xs:element>
- </xs:sequence>
- <xs:attribute name="location" type="xs:anyURI" use="required">
- <xs:annotation>
- <xs:documentation>Specifies the location of the WSDL file as a URL. The URL may be either absolute or relative to the current directory. Remote protocols such as http are supported.</xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="parameter-style" use="optional" default="wrapped">
- <xs:annotation>
- <xs:documentation>The parameter style convention to use when using document/literal. The "bare" convention requires that the Java method have a single parameter that represents the full request message body, and a single return value that represents the full response message body. The "wrapped" convention allows any Java method signature because it wraps all parameter in a single schema type.</xs:documentation>
- </xs:annotation>
- <xs:simpleType>
- <xs:restriction base="xs:string">
- <xs:enumeration value="bare"/>
- <xs:enumeration value="wrapped"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- </xs:complexType>
- <xs:complexType name="parameterType">
- <xs:attribute name="type" use="required">
- <xs:annotation>
- <xs:documentation>The fully qualified Java class name of the method parameter type.</xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="xml-name" type="xs:QName" use="optional">
- <xs:annotation>
- <xs:documentation>Used to customize the name of the parameter that is used in the generated WSDL file.</xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="mode" use="optional" default="IN">
- <xs:annotation>
- <xs:documentation>Indicates the in/out mode of the parameter. The "IN" mode is a normal java parameter. The "OUT" mode is a holder parameter that is used to pass multiple return values. The "INOUT" mode is a holder parameter that is used to receive as well as return values. The default is "IN".</xs:documentation>
- </xs:annotation>
- <xs:simpleType>
- <xs:restriction base="xs:string">
- <xs:whiteSpace value="collapse"/>
- <xs:enumeration value="IN"/>
- <xs:enumeration value="OUT"/>
- <xs:enumeration value="INOUT"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- <xs:attribute name="header" type="xs:boolean" use="optional">
- <xs:annotation>
- <xs:documentation>Indicates whether this parameter should be mapped to a SOAP header instead of a SOAP body part.</xs:documentation>
- </xs:annotation>
- </xs:attribute>
- </xs:complexType>
-</xs:schema>
Deleted: rest/src/main/resources/schema/soap-encoding_1_1.xsd
===================================================================
--- rest/src/main/resources/schema/soap-encoding_1_1.xsd 2007-11-21 12:01:29 UTC (rev 5094)
+++ rest/src/main/resources/schema/soap-encoding_1_1.xsd 2007-11-21 15:23:56 UTC (rev 5095)
@@ -1,536 +0,0 @@
-<?xml version='1.0' encoding='UTF-8' ?>
-
-<!-- Schema for the SOAP/1.1 encoding
-
-Portions c 2001 DevelopMentor.
-c 2001 W3C (Massachusetts Institute of Technology, Institut National de Recherche en Informatique et en Automatique, Keio University). All Rights Reserved.
-
-This document is governed by the W3C Software License [1] as described in the FAQ [2].
-[1] http://www.w3.org/Consortium/Legal/copyright-software-19980720
-[2] http://www.w3.org/Consortium/Legal/IPR-FAQ-20000620.html#DTD
-By obtaining, using and/or copying this work, you (the licensee) agree that you have read, understood, and will comply with the following terms and conditions:
-
-Permission to use, copy, modify, and distribute this software and its documentation, with or without modification, for any purpose and without fee or royalty is hereby granted, provided that you include the following on ALL copies of the software and documentation or portions thereof, including modifications, that you make:
-
-1. The full text of this NOTICE in a location viewable to users of the redistributed or derivative work.
-
-2. Any pre-existing intellectual property disclaimers, notices, or terms and conditions. If none exist, a short notice of the following form (hypertext is preferred, text is permitted) should be used within the body of any redistributed or derivative code: "Copyright c 2001 World Wide Web Consortium, (Massachusetts Institute of Technology, Institut National de Recherche en Informatique et en Automatique, Keio University). All Rights Reserved. http://www.w3.org/Consortium/Legal/"
-
-3. Notice of any changes or modifications to the W3C files, including the date changes were made. (We recommend you provide URIs to the location from which the code is derived.)
-
-Original W3C files; http://www.w3.org/2001/06/soap-encoding
-Changes made:
- - reverted namespace to http://schemas.xmlsoap.org/soap/encoding/
- - reverted root to only allow 0 and 1 as lexical values
- - removed default value from root attribute declaration
-
-THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
-
-COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
-
-The name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to the software without specific, written prior permission. Title to copyright in this software and any associated documentation will at all times remain with copyright holders.
-
--->
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
- xmlns:tns="http://schemas.xmlsoap.org/soap/encoding/"
- targetNamespace="http://schemas.xmlsoap.org/soap/encoding/" >
-
- <xs:attribute name="root" >
- <xs:annotation>
- <xs:documentation>
- 'root' can be used to distinguish serialization roots from other
- elements that are present in a serialization but are not roots of
- a serialized value graph
- </xs:documentation>
- </xs:annotation>
- <xs:simpleType>
- <xs:restriction base='xs:boolean'>
- <xs:pattern value='0|1' />
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
-
- <xs:attributeGroup name="commonAttributes" >
- <xs:annotation>
- <xs:documentation>
- Attributes common to all elements that function as accessors or
- represent independent (multi-ref) values. The href attribute is
- intended to be used in a manner like CONREF. That is, the element
- content should be empty iff the href attribute appears
- </xs:documentation>
- </xs:annotation>
- <xs:attribute name="id" type="xs:ID" />
- <xs:attribute name="href" type="xs:anyURI" />
- <xs:anyAttribute namespace="##other" processContents="lax" />
- </xs:attributeGroup>
-
- <!-- Global Attributes. The following attributes are intended to be usable via qualified attribute names on any complex type referencing them. -->
-
- <!-- Array attributes. Needed to give the type and dimensions of an array's contents, and the offset for partially-transmitted arrays. -->
-
- <xs:simpleType name="arrayCoordinate" >
- <xs:restriction base="xs:string" />
- </xs:simpleType>
-
- <xs:attribute name="arrayType" type="xs:string" />
- <xs:attribute name="offset" type="tns:arrayCoordinate" />
-
- <xs:attributeGroup name="arrayAttributes" >
- <xs:attribute ref="tns:arrayType" />
- <xs:attribute ref="tns:offset" />
- </xs:attributeGroup>
-
- <xs:attribute name="position" type="tns:arrayCoordinate" />
-
- <xs:attributeGroup name="arrayMemberAttributes" >
- <xs:attribute ref="tns:position" />
- </xs:attributeGroup>
-
- <xs:group name="Array" >
- <xs:sequence>
- <xs:any namespace="##any" minOccurs="0" maxOccurs="unbounded" processContents="lax" />
- </xs:sequence>
- </xs:group>
-
- <xs:element name="Array" type="tns:Array" />
- <xs:complexType name="Array" >
- <xs:annotation>
- <xs:documentation>
- 'Array' is a complex type for accessors identified by position
- </xs:documentation>
- </xs:annotation>
- <xs:group ref="tns:Array" minOccurs="0" />
- <xs:attributeGroup ref="tns:arrayAttributes" />
- <xs:attributeGroup ref="tns:commonAttributes" />
- </xs:complexType>
-
- <!-- 'Struct' is a complex type for accessors identified by name.
- Constraint: No element may be have the same name as any other,
- nor may any element have a maxOccurs > 1. -->
-
- <xs:element name="Struct" type="tns:Struct" />
-
- <xs:group name="Struct" >
- <xs:sequence>
- <xs:any namespace="##any" minOccurs="0" maxOccurs="unbounded" processContents="lax" />
- </xs:sequence>
- </xs:group>
-
- <xs:complexType name="Struct" >
- <xs:group ref="tns:Struct" minOccurs="0" />
- <xs:attributeGroup ref="tns:commonAttributes"/>
- </xs:complexType>
-
- <!-- 'Base64' can be used to serialize binary data using base64 encoding
- as defined in RFC2045 but without the MIME line length limitation. -->
-
- <xs:simpleType name="base64" >
- <xs:restriction base="xs:base64Binary" />
- </xs:simpleType>
-
- <!-- Element declarations corresponding to each of the simple types in the
- XML Schemas Specification. -->
-
- <xs:element name="duration" type="tns:duration" />
- <xs:complexType name="duration" >
- <xs:simpleContent>
- <xs:extension base="xs:duration" >
- <xs:attributeGroup ref="tns:commonAttributes" />
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="dateTime" type="tns:dateTime" />
- <xs:complexType name="dateTime" >
- <xs:simpleContent>
- <xs:extension base="xs:dateTime" >
- <xs:attributeGroup ref="tns:commonAttributes" />
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
-
-
- <xs:element name="NOTATION" type="tns:NOTATION" />
- <xs:complexType name="NOTATION" >
- <xs:simpleContent>
- <xs:extension base="xs:QName" >
- <xs:attributeGroup ref="tns:commonAttributes" />
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
-
- <xs:element name="time" type="tns:time" />
- <xs:complexType name="time" >
- <xs:simpleContent>
- <xs:extension base="xs:time" >
- <xs:attributeGroup ref="tns:commonAttributes" />
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="date" type="tns:date" />
- <xs:complexType name="date" >
- <xs:simpleContent>
- <xs:extension base="xs:date" >
- <xs:attributeGroup ref="tns:commonAttributes" />
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="gYearMonth" type="tns:gYearMonth" />
- <xs:complexType name="gYearMonth" >
- <xs:simpleContent>
- <xs:extension base="xs:gYearMonth" >
- <xs:attributeGroup ref="tns:commonAttributes" />
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="gYear" type="tns:gYear" />
- <xs:complexType name="gYear" >
- <xs:simpleContent>
- <xs:extension base="xs:gYear" >
- <xs:attributeGroup ref="tns:commonAttributes" />
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="gMonthDay" type="tns:gMonthDay" />
- <xs:complexType name="gMonthDay" >
- <xs:simpleContent>
- <xs:extension base="xs:gMonthDay" >
- <xs:attributeGroup ref="tns:commonAttributes" />
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="gDay" type="tns:gDay" />
- <xs:complexType name="gDay" >
- <xs:simpleContent>
- <xs:extension base="xs:gDay" >
- <xs:attributeGroup ref="tns:commonAttributes" />
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="gMonth" type="tns:gMonth" />
- <xs:complexType name="gMonth" >
- <xs:simpleContent>
- <xs:extension base="xs:gMonth" >
- <xs:attributeGroup ref="tns:commonAttributes" />
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="boolean" type="tns:boolean" />
- <xs:complexType name="boolean" >
- <xs:simpleContent>
- <xs:extension base="xs:boolean" >
- <xs:attributeGroup ref="tns:commonAttributes" />
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="base64Binary" type="tns:base64Binary" />
- <xs:complexType name="base64Binary" >
- <xs:simpleContent>
- <xs:extension base="xs:base64Binary" >
- <xs:attributeGroup ref="tns:commonAttributes" />
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="hexBinary" type="tns:hexBinary" />
- <xs:complexType name="hexBinary" >
- <xs:simpleContent>
- <xs:extension base="xs:hexBinary" >
- <xs:attributeGroup ref="tns:commonAttributes" />
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="float" type="tns:float" />
- <xs:complexType name="float" >
- <xs:simpleContent>
- <xs:extension base="xs:float" >
- <xs:attributeGroup ref="tns:commonAttributes" />
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="double" type="tns:double" />
- <xs:complexType name="double" >
- <xs:simpleContent>
- <xs:extension base="xs:double" >
- <xs:attributeGroup ref="tns:commonAttributes" />
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="anyURI" type="tns:anyURI" />
- <xs:complexType name="anyURI" >
- <xs:simpleContent>
- <xs:extension base="xs:anyURI" >
- <xs:attributeGroup ref="tns:commonAttributes" />
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="QName" type="tns:QName" />
- <xs:complexType name="QName" >
- <xs:simpleContent>
- <xs:extension base="xs:QName" >
- <xs:attributeGroup ref="tns:commonAttributes" />
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
-
- <xs:element name="string" type="tns:string" />
- <xs:complexType name="string" >
- <xs:simpleContent>
- <xs:extension base="xs:string" >
- <xs:attributeGroup ref="tns:commonAttributes" />
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="normalizedString" type="tns:normalizedString" />
- <xs:complexType name="normalizedString" >
- <xs:simpleContent>
- <xs:extension base="xs:normalizedString" >
- <xs:attributeGroup ref="tns:commonAttributes" />
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="token" type="tns:token" />
- <xs:complexType name="token" >
- <xs:simpleContent>
- <xs:extension base="xs:token" >
- <xs:attributeGroup ref="tns:commonAttributes" />
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="language" type="tns:language" />
- <xs:complexType name="language" >
- <xs:simpleContent>
- <xs:extension base="xs:language" >
- <xs:attributeGroup ref="tns:commonAttributes" />
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="Name" type="tns:Name" />
- <xs:complexType name="Name" >
- <xs:simpleContent>
- <xs:extension base="xs:Name" >
- <xs:attributeGroup ref="tns:commonAttributes" />
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="NMTOKEN" type="tns:NMTOKEN" />
- <xs:complexType name="NMTOKEN" >
- <xs:simpleContent>
- <xs:extension base="xs:NMTOKEN" >
- <xs:attributeGroup ref="tns:commonAttributes" />
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="NCName" type="tns:NCName" />
- <xs:complexType name="NCName" >
- <xs:simpleContent>
- <xs:extension base="xs:NCName" >
- <xs:attributeGroup ref="tns:commonAttributes" />
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="NMTOKENS" type="tns:NMTOKENS" />
- <xs:complexType name="NMTOKENS" >
- <xs:simpleContent>
- <xs:extension base="xs:NMTOKENS" >
- <xs:attributeGroup ref="tns:commonAttributes" />
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="ID" type="tns:ID" />
- <xs:complexType name="ID" >
- <xs:simpleContent>
- <xs:extension base="xs:ID" >
- <xs:attributeGroup ref="tns:commonAttributes" />
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="IDREF" type="tns:IDREF" />
- <xs:complexType name="IDREF" >
- <xs:simpleContent>
- <xs:extension base="xs:IDREF" >
- <xs:attributeGroup ref="tns:commonAttributes" />
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="ENTITY" type="tns:ENTITY" />
- <xs:complexType name="ENTITY" >
- <xs:simpleContent>
- <xs:extension base="xs:ENTITY" >
- <xs:attributeGroup ref="tns:commonAttributes" />
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="IDREFS" type="tns:IDREFS" />
- <xs:complexType name="IDREFS" >
- <xs:simpleContent>
- <xs:extension base="xs:IDREFS" >
- <xs:attributeGroup ref="tns:commonAttributes" />
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="ENTITIES" type="tns:ENTITIES" />
- <xs:complexType name="ENTITIES" >
- <xs:simpleContent>
- <xs:extension base="xs:ENTITIES" >
- <xs:attributeGroup ref="tns:commonAttributes" />
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="decimal" type="tns:decimal" />
- <xs:complexType name="decimal" >
- <xs:simpleContent>
- <xs:extension base="xs:decimal" >
- <xs:attributeGroup ref="tns:commonAttributes" />
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="integer" type="tns:integer" />
- <xs:complexType name="integer" >
- <xs:simpleContent>
- <xs:extension base="xs:integer" >
- <xs:attributeGroup ref="tns:commonAttributes" />
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="nonPositiveInteger" type="tns:nonPositiveInteger" />
- <xs:complexType name="nonPositiveInteger" >
- <xs:simpleContent>
- <xs:extension base="xs:nonPositiveInteger" >
- <xs:attributeGroup ref="tns:commonAttributes" />
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="negativeInteger" type="tns:negativeInteger" />
- <xs:complexType name="negativeInteger" >
- <xs:simpleContent>
- <xs:extension base="xs:negativeInteger" >
- <xs:attributeGroup ref="tns:commonAttributes" />
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="long" type="tns:long" />
- <xs:complexType name="long" >
- <xs:simpleContent>
- <xs:extension base="xs:long" >
- <xs:attributeGroup ref="tns:commonAttributes" />
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="int" type="tns:int" />
- <xs:complexType name="int" >
- <xs:simpleContent>
- <xs:extension base="xs:int" >
- <xs:attributeGroup ref="tns:commonAttributes" />
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="short" type="tns:short" />
- <xs:complexType name="short" >
- <xs:simpleContent>
- <xs:extension base="xs:short" >
- <xs:attributeGroup ref="tns:commonAttributes" />
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="byte" type="tns:byte" />
- <xs:complexType name="byte" >
- <xs:simpleContent>
- <xs:extension base="xs:byte" >
- <xs:attributeGroup ref="tns:commonAttributes" />
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="nonNegativeInteger" type="tns:nonNegativeInteger" />
- <xs:complexType name="nonNegativeInteger" >
- <xs:simpleContent>
- <xs:extension base="xs:nonNegativeInteger" >
- <xs:attributeGroup ref="tns:commonAttributes" />
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="unsignedLong" type="tns:unsignedLong" />
- <xs:complexType name="unsignedLong" >
- <xs:simpleContent>
- <xs:extension base="xs:unsignedLong" >
- <xs:attributeGroup ref="tns:commonAttributes" />
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="unsignedInt" type="tns:unsignedInt" />
- <xs:complexType name="unsignedInt" >
- <xs:simpleContent>
- <xs:extension base="xs:unsignedInt" >
- <xs:attributeGroup ref="tns:commonAttributes" />
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="unsignedShort" type="tns:unsignedShort" />
- <xs:complexType name="unsignedShort" >
- <xs:simpleContent>
- <xs:extension base="xs:unsignedShort" >
- <xs:attributeGroup ref="tns:commonAttributes" />
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="unsignedByte" type="tns:unsignedByte" />
- <xs:complexType name="unsignedByte" >
- <xs:simpleContent>
- <xs:extension base="xs:unsignedByte" >
- <xs:attributeGroup ref="tns:commonAttributes" />
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="positiveInteger" type="tns:positiveInteger" />
- <xs:complexType name="positiveInteger" >
- <xs:simpleContent>
- <xs:extension base="xs:positiveInteger" >
- <xs:attributeGroup ref="tns:commonAttributes" />
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="anyType" />
-</xs:schema>
-
Deleted: rest/src/main/resources/schema/soap-encoding_200206.xsd
===================================================================
--- rest/src/main/resources/schema/soap-encoding_200206.xsd 2007-11-21 12:01:29 UTC (rev 5094)
+++ rest/src/main/resources/schema/soap-encoding_200206.xsd 2007-11-21 15:23:56 UTC (rev 5095)
@@ -1,562 +0,0 @@
-<!-- Schema defined in the SOAP Version 1.2 Part 2 specification
- Last Call Working Draft:
- http://www.w3.org/TR/2002/WD-soap12-part2-20020621/
- $Id$
-
- Copyright 2001 W3C (Massachusetts Institute of Technology,
- Institut National de Recherche en Informatique et en Automatique,
- Keio University). All Rights Reserved.
- http://www.w3.org/Consortium/Legal/
-
- This document is governed by the W3C Software License [1] as
- described in the FAQ [2].
-
- [1] http://www.w3.org/Consortium/Legal/copyright-software-19980720
- [2] http://www.w3.org/Consortium/Legal/IPR-FAQ-20000620.html#DTD
--->
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://www.w3.org/2002/06/soap-encoding" targetNamespace="http://www.w3.org/2002/06/soap-encoding">
-
- <xs:attribute name="root" type="xs:boolean" default="0">
- <xs:annotation>
- <xs:documentation>
- 'root' can be used to distinguish serialization roots from other
- elements that are present in a serialization but are not roots of
- a serialized value graph
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
-
- <xs:attributeGroup name="commonAttributes">
- <xs:annotation>
- <xs:documentation>
- Attributes common to all elements that function as accessors or
- represent independent (multi-ref) values. The ref attribute is
- intended to be used in a manner like CONREF. That is, the element
- content should be empty iff the ref attribute appears
- </xs:documentation>
- </xs:annotation>
- <xs:attribute name="id" type="xs:ID"/>
- <xs:attribute name="ref" type="xs:IDREF"/>
- <xs:anyAttribute namespace="##other" processContents="lax"/>
- </xs:attributeGroup>
-
- <!-- Global Attributes. The following attributes are intended to be usable via qualified attribute names on any complex type referencing them. -->
-
- <!-- Array attributes. Needed to give the type and dimensions of an array's contents, and the offset for partially-transmitted arrays. -->
-
- <xs:simpleType name="arraySizeBase">
- <xs:annotation>
- <xs:documentation>
- A list type that allows * and non negative integers. Used as the
- base type for arraySize below.
- </xs:documentation>
- </xs:annotation>
- <xs:list>
- <xs:simpleType>
- <xs:union memberTypes="xs:nonNegativeInteger">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="*"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:union>
- </xs:simpleType>
- </xs:list>
- </xs:simpleType>
-
-
- <xs:simpleType name="arraySize">
- <xs:annotation>
- <xs:documentation>
- Pattern based restriction of the arraySizeBase list type. Used
- as the type of the arraySize attribute. Restricts asterisk ( * )
- to first list item only. Instances must contain at least an
- asterisk ( * ) or a nonNegativeInteger. May contain other
- nonNegativeIntegers as subsequent list items.
- Valid instances include;
-
- *
- 1
- * 2
- 2 2
- * 2 0
-
- </xs:documentation>
- </xs:annotation>
- <xs:restriction base="tns:arraySizeBase">
- <xs:pattern value="(\*|(\d+))(\s*\d+)*"/>
- </xs:restriction>
- </xs:simpleType>
-
- <xs:attribute name="arraySize" type="tns:arraySize"/>
- <xs:attribute name="itemType" type="xs:QName"/>
-
- <xs:attributeGroup name="arrayAttributes">
- <xs:attribute ref="tns:arraySize"/>
- <xs:attribute ref="tns:itemType"/>
- </xs:attributeGroup>
-
- <xs:group name="Array">
- <xs:sequence>
- <xs:any namespace="##any" minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
- </xs:sequence>
- </xs:group>
-
- <xs:element name="Array" type="tns:Array"/>
- <xs:complexType name="Array">
- <xs:annotation>
- <xs:documentation>
- 'Array' is a complex type for accessors identified by position
- </xs:documentation>
- </xs:annotation>
- <xs:group ref="tns:Array" minOccurs="0"/>
- <xs:attributeGroup ref="tns:arrayAttributes"/>
- <xs:attributeGroup ref="tns:commonAttributes"/>
- </xs:complexType>
-
- <!-- 'Struct' is a complex type for accessors identified by name.
- Constraint: No element may be have the same name as any other,
- nor may any element have a maxOccurs > 1. -->
-
- <xs:element name="Struct" type="tns:Struct"/>
-
- <xs:group name="Struct">
- <xs:sequence>
- <xs:any namespace="##any" minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
- </xs:sequence>
- </xs:group>
-
- <xs:complexType name="Struct">
- <xs:group ref="tns:Struct" minOccurs="0"/>
- <xs:attributeGroup ref="tns:commonAttributes"/>
- </xs:complexType>
-
- <!-- 'Base64' can be used to serialize binary data using base64 encoding
- as defined in RFC2045 but without the MIME line length limitation. -->
-
- <xs:simpleType name="base64">
- <xs:restriction base="xs:base64Binary"/>
- </xs:simpleType>
-
- <!-- Element declarations corresponding to each of the simple types in the
- XML Schemas Specification. -->
-
- <xs:element name="duration" type="tns:duration"/>
- <xs:complexType name="duration">
- <xs:simpleContent>
- <xs:extension base="xs:duration">
- <xs:attributeGroup ref="tns:commonAttributes"/>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="dateTime" type="tns:dateTime"/>
- <xs:complexType name="dateTime">
- <xs:simpleContent>
- <xs:extension base="xs:dateTime">
- <xs:attributeGroup ref="tns:commonAttributes"/>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="time" type="tns:time"/>
- <xs:complexType name="time">
- <xs:simpleContent>
- <xs:extension base="xs:time">
- <xs:attributeGroup ref="tns:commonAttributes"/>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="date" type="tns:date"/>
- <xs:complexType name="date">
- <xs:simpleContent>
- <xs:extension base="xs:date">
- <xs:attributeGroup ref="tns:commonAttributes"/>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="gYearMonth" type="tns:gYearMonth"/>
- <xs:complexType name="gYearMonth">
- <xs:simpleContent>
- <xs:extension base="xs:gYearMonth">
- <xs:attributeGroup ref="tns:commonAttributes"/>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="gYear" type="tns:gYear"/>
- <xs:complexType name="gYear">
- <xs:simpleContent>
- <xs:extension base="xs:gYear">
- <xs:attributeGroup ref="tns:commonAttributes"/>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="gMonthDay" type="tns:gMonthDay"/>
- <xs:complexType name="gMonthDay">
- <xs:simpleContent>
- <xs:extension base="xs:gMonthDay">
- <xs:attributeGroup ref="tns:commonAttributes"/>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="gDay" type="tns:gDay"/>
- <xs:complexType name="gDay">
- <xs:simpleContent>
- <xs:extension base="xs:gDay">
- <xs:attributeGroup ref="tns:commonAttributes"/>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="gMonth" type="tns:gMonth"/>
- <xs:complexType name="gMonth">
- <xs:simpleContent>
- <xs:extension base="xs:gMonth">
- <xs:attributeGroup ref="tns:commonAttributes"/>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="boolean" type="tns:boolean"/>
- <xs:complexType name="boolean">
- <xs:simpleContent>
- <xs:extension base="xs:boolean">
- <xs:attributeGroup ref="tns:commonAttributes"/>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="base64Binary" type="tns:base64Binary"/>
- <xs:complexType name="base64Binary">
- <xs:simpleContent>
- <xs:extension base="xs:base64Binary">
- <xs:attributeGroup ref="tns:commonAttributes"/>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="hexBinary" type="tns:hexBinary"/>
- <xs:complexType name="hexBinary">
- <xs:simpleContent>
- <xs:extension base="xs:hexBinary">
- <xs:attributeGroup ref="tns:commonAttributes"/>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="float" type="tns:float"/>
- <xs:complexType name="float">
- <xs:simpleContent>
- <xs:extension base="xs:float">
- <xs:attributeGroup ref="tns:commonAttributes"/>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="double" type="tns:double"/>
- <xs:complexType name="double">
- <xs:simpleContent>
- <xs:extension base="xs:double">
- <xs:attributeGroup ref="tns:commonAttributes"/>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="anyURI" type="tns:anyURI"/>
- <xs:complexType name="anyURI">
- <xs:simpleContent>
- <xs:extension base="xs:anyURI">
- <xs:attributeGroup ref="tns:commonAttributes"/>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="QName" type="tns:QName"/>
- <xs:complexType name="QName">
- <xs:simpleContent>
- <xs:extension base="xs:QName">
- <xs:attributeGroup ref="tns:commonAttributes"/>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="string" type="tns:string"/>
- <xs:complexType name="string">
- <xs:simpleContent>
- <xs:extension base="xs:string">
- <xs:attributeGroup ref="tns:commonAttributes"/>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="normalizedString" type="tns:normalizedString"/>
- <xs:complexType name="normalizedString">
- <xs:simpleContent>
- <xs:extension base="xs:normalizedString">
- <xs:attributeGroup ref="tns:commonAttributes"/>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="token" type="tns:token"/>
- <xs:complexType name="token">
- <xs:simpleContent>
- <xs:extension base="xs:token">
- <xs:attributeGroup ref="tns:commonAttributes"/>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="language" type="tns:language"/>
- <xs:complexType name="language">
- <xs:simpleContent>
- <xs:extension base="xs:language">
- <xs:attributeGroup ref="tns:commonAttributes"/>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="Name" type="tns:Name"/>
- <xs:complexType name="Name">
- <xs:simpleContent>
- <xs:extension base="xs:Name">
- <xs:attributeGroup ref="tns:commonAttributes"/>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="NMTOKEN" type="tns:NMTOKEN"/>
- <xs:complexType name="NMTOKEN">
- <xs:simpleContent>
- <xs:extension base="xs:NMTOKEN">
- <xs:attributeGroup ref="tns:commonAttributes"/>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="NCName" type="tns:NCName"/>
- <xs:complexType name="NCName">
- <xs:simpleContent>
- <xs:extension base="xs:NCName">
- <xs:attributeGroup ref="tns:commonAttributes"/>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <!--
- For compatibility with XML 1.0 the following element declaration and
- associated complex type definition should NOT be used. It is
- provided here for completenes.
- -->
- <xs:element name="NMTOKENS" type="tns:NMTOKENS"/>
- <xs:complexType name="NMTOKENS">
- <xs:simpleContent>
- <xs:extension base="xs:NMTOKENS">
- <xs:attributeGroup ref="tns:commonAttributes"/>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <!--
- For compatibility with XML 1.0 the following element declaration and
- associated complex type definition should NOT be used. It is
- provided here for completenes.
- -->
- <xs:element name="ID" type="tns:ID"/>
- <xs:complexType name="ID">
- <xs:simpleContent>
- <xs:extension base="xs:ID">
- <xs:attributeGroup ref="tns:commonAttributes"/>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <!--
- For compatibility with XML 1.0 the following element declaration and
- associated complex type definition should NOT be used. It is
- provided here for completenes.
- -->
- <xs:element name="IDREF" type="tns:IDREF"/>
- <xs:complexType name="IDREF">
- <xs:simpleContent>
- <xs:extension base="xs:IDREF">
- <xs:attributeGroup ref="tns:commonAttributes"/>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <!--
- For compatibility with XML 1.0 the following element declaration and
- associated complex type definition should NOT be used. It is
- provided here for completenes.
- -->
- <xs:element name="ENTITY" type="tns:ENTITY"/>
- <xs:complexType name="ENTITY">
- <xs:simpleContent>
- <xs:extension base="xs:ENTITY">
- <xs:attributeGroup ref="tns:commonAttributes"/>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <!--
- For compatibility with XML 1.0 the following element declaration and
- associated complex type definition should NOT be used. It is
- provided here for completenes.
- -->
- <xs:element name="IDREFS" type="tns:IDREFS"/>
- <xs:complexType name="IDREFS">
- <xs:simpleContent>
- <xs:extension base="xs:IDREFS">
- <xs:attributeGroup ref="tns:commonAttributes"/>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <!--
- For compatibility with XML 1.0 the following element declaration and
- associated complex type definition should NOT be used. It is
- provided here for completenes.
- -->
- <xs:element name="ENTITIES" type="tns:ENTITIES"/>
- <xs:complexType name="ENTITIES">
- <xs:simpleContent>
- <xs:extension base="xs:ENTITIES">
- <xs:attributeGroup ref="tns:commonAttributes"/>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="decimal" type="tns:decimal"/>
- <xs:complexType name="decimal">
- <xs:simpleContent>
- <xs:extension base="xs:decimal">
- <xs:attributeGroup ref="tns:commonAttributes"/>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="integer" type="tns:integer"/>
- <xs:complexType name="integer">
- <xs:simpleContent>
- <xs:extension base="xs:integer">
- <xs:attributeGroup ref="tns:commonAttributes"/>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="nonPositiveInteger" type="tns:nonPositiveInteger"/>
- <xs:complexType name="nonPositiveInteger">
- <xs:simpleContent>
- <xs:extension base="xs:nonPositiveInteger">
- <xs:attributeGroup ref="tns:commonAttributes"/>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="negativeInteger" type="tns:negativeInteger"/>
- <xs:complexType name="negativeInteger">
- <xs:simpleContent>
- <xs:extension base="xs:negativeInteger">
- <xs:attributeGroup ref="tns:commonAttributes"/>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="long" type="tns:long"/>
- <xs:complexType name="long">
- <xs:simpleContent>
- <xs:extension base="xs:long">
- <xs:attributeGroup ref="tns:commonAttributes"/>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="int" type="tns:int"/>
- <xs:complexType name="int">
- <xs:simpleContent>
- <xs:extension base="xs:int">
- <xs:attributeGroup ref="tns:commonAttributes"/>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="short" type="tns:short"/>
- <xs:complexType name="short">
- <xs:simpleContent>
- <xs:extension base="xs:short">
- <xs:attributeGroup ref="tns:commonAttributes"/>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="byte" type="tns:byte"/>
- <xs:complexType name="byte">
- <xs:simpleContent>
- <xs:extension base="xs:byte">
- <xs:attributeGroup ref="tns:commonAttributes"/>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="nonNegativeInteger" type="tns:nonNegativeInteger"/>
- <xs:complexType name="nonNegativeInteger">
- <xs:simpleContent>
- <xs:extension base="xs:nonNegativeInteger">
- <xs:attributeGroup ref="tns:commonAttributes"/>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="unsignedLong" type="tns:unsignedLong"/>
- <xs:complexType name="unsignedLong">
- <xs:simpleContent>
- <xs:extension base="xs:unsignedLong">
- <xs:attributeGroup ref="tns:commonAttributes"/>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="unsignedInt" type="tns:unsignedInt"/>
- <xs:complexType name="unsignedInt">
- <xs:simpleContent>
- <xs:extension base="xs:unsignedInt">
- <xs:attributeGroup ref="tns:commonAttributes"/>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="unsignedShort" type="tns:unsignedShort"/>
- <xs:complexType name="unsignedShort">
- <xs:simpleContent>
- <xs:extension base="xs:unsignedShort">
- <xs:attributeGroup ref="tns:commonAttributes"/>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="unsignedByte" type="tns:unsignedByte"/>
- <xs:complexType name="unsignedByte">
- <xs:simpleContent>
- <xs:extension base="xs:unsignedByte">
- <xs:attributeGroup ref="tns:commonAttributes"/>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="positiveInteger" type="tns:positiveInteger"/>
- <xs:complexType name="positiveInteger">
- <xs:simpleContent>
- <xs:extension base="xs:positiveInteger">
- <xs:attributeGroup ref="tns:commonAttributes"/>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:element name="anyType"/>
-</xs:schema>
\ No newline at end of file
Deleted: rest/src/main/resources/schema/swaref.xsd
===================================================================
--- rest/src/main/resources/schema/swaref.xsd 2007-11-21 12:01:29 UTC (rev 5094)
+++ rest/src/main/resources/schema/swaref.xsd 2007-11-21 15:23:56 UTC (rev 5095)
@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright (c) 2002-2004 by The Web Services-Interoperability Organization (WS-I) and
- Certain of its Members. All Rights Reserved.
-
- Notice
- The material contained herein is not a license, either expressly or impliedly, to any
- intellectual property owned or controlled by any of the authors or developers of this
- material or WS-I. The material contained herein is provided on an "AS IS" basis and to
- the maximum extent permitted by applicable law, this material is provided AS IS AND WITH
- ALL FAULTS, and the authors and developers of this material and WS-I hereby disclaim all
- other warranties and conditions, either express, implied or statutory, including, but not
- limited to, any (if any) implied warranties, duties or conditions of merchantability,
- of fitness for a particular purpose, of accuracy or completeness of responses, of results,
- of workmanlike effort, of lack of viruses, and of lack of negligence. ALSO, THERE IS NO
- WARRANTY OR CONDITION OF TITLE, QUIET ENJOYMENT, QUIET POSSESSION, CORRESPONDENCE TO
- DESCRIPTION OR NON-INFRINGEMENT WITH REGARD TO THIS MATERIAL.
-
- IN NO EVENT WILL ANY AUTHOR OR DEVELOPER OF THIS MATERIAL OR WS-I BE LIABLE TO ANY OTHER
- PARTY FOR THE COST OF PROCURING SUBSTITUTE GOODS OR SERVICES, LOST PROFITS, LOSS OF USE,
- LOSS OF DATA, OR ANY INCIDENTAL, CONSEQUENTIAL, DIRECT, INDIRECT, OR SPECIAL DAMAGES
- WHETHER UNDER CONTRACT, TORT, WARRANTY, OR OTHERWISE, ARISING IN ANY WAY OUT OF THIS OR
- ANY OTHER AGREEMENT RELATING TO THIS MATERIAL, WHETHER OR NOT SUCH PARTY HAD ADVANCE
- NOTICE OF THE POSSIBILITY OF SUCH DAMAGES.
-
- WS-I License Information
- Use of this WS-I Material is governed by the WS-I Test License and other licenses. Information on these
- licenses are contained in the README.txt and ReleaseNotes.txt files. By downloading this file, you agree
- to the terms of these licenses.
-
- How To Provide Feedback
- The Web Services-Interoperability Organization (WS-I) would like to receive input,
- suggestions and other feedback ("Feedback") on this work from a wide variety of
- industry participants to improve its quality over time.
-
- By sending email, or otherwise communicating with WS-I, you (on behalf of yourself if
- you are an individual, and your company if you are providing Feedback on behalf of the
- company) will be deemed to have granted to WS-I, the members of WS-I, and other parties
- that have access to your Feedback, a non-exclusive, non-transferable, worldwide, perpetual,
- irrevocable, royalty-free license to use, disclose, copy, license, modify, sublicense or
- otherwise distribute and exploit in any manner whatsoever the Feedback you provide regarding
- the work. You acknowledge that you have no expectation of confidentiality with respect to
- any Feedback you provide. You represent and warrant that you have rights to provide this
- Feedback, and if you are providing Feedback on behalf of a company, you represent and warrant
- that you have the rights to provide Feedback on behalf of your company. You also acknowledge
- that WS-I is not required to review, discuss, use, consider or in any way incorporate your
- Feedback into future versions of its work. If WS-I does incorporate some or all of your
- Feedback in a future version of the work, it may, but is not obligated to include your name
- (or, if you are identified as acting on behalf of your company, the name of your company) on
- a list of contributors to the work. If the foregoing is not acceptable to you and any company
- on whose behalf you are acting, please do not provide any Feedback.
-
- Feedback on this document should be directed to wsi-test-comments(a)ws-i.org.
--->
-<xsd:schema targetNamespace="http://ws-i.org/profiles/basic/1.1/xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <xsd:simpleType name="swaRef">
- <xsd:restriction base="xsd:anyURI"/>
- </xsd:simpleType>
-</xsd:schema>
\ No newline at end of file
Deleted: rest/src/main/resources/schema/ws-addr.xsd
===================================================================
--- rest/src/main/resources/schema/ws-addr.xsd 2007-11-21 12:01:29 UTC (rev 5094)
+++ rest/src/main/resources/schema/ws-addr.xsd 2007-11-21 15:23:56 UTC (rev 5095)
@@ -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$
--->
-<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
Deleted: rest/src/main/resources/schema/ws-policy.xsd
===================================================================
--- rest/src/main/resources/schema/ws-policy.xsd 2007-11-21 12:01:29 UTC (rev 5094)
+++ rest/src/main/resources/schema/ws-policy.xsd 2007-11-21 15:23:56 UTC (rev 5095)
@@ -1,118 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-(c) 2001-2004 BEA Systems Inc., International Business Machines Corporation, Microsoft Corporation, Inc., SAP AG, Sonic Software, and VeriSign, Inc. All rights reserved.
-
-Permission to copy and display the WS-Policy Specification (the "Specification", which includes WSDL and schema documents), in any medium without fee or royalty is hereby granted, provided that you include the following on ALL copies of the WS-Policy Specification, that you make:
-
-1. A link or URL to the WS-Policy Specification at one of the Authors' websites
-2. The copyright notice as shown in the WS-Policy Specification.
-
-BEA Systems, IBM, Microsoft, SAP, Sonic Software, and VeriSign (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 WS-Policy Specification.
-
-THE WS-POLICY 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 WS-POLICY 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 WS-POLICY SPECIFICATION.
-
-The name and trademarks of the Authors may NOT be used in any manner, including advertising or publicity pertaining to the WS-Policy Specification or its contents without specific, written prior permission. Title to copyright in the WS-Policy 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/09/policy"
- xmlns:tns="http://schemas.xmlsoap.org/ws/2004/09/policy"
- xmlns:xs="http://www.w3.org/2001/XMLSchema"
- xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext..."
- xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utilit..."
- elementFormDefault="qualified"
- blockDefault="#all" >
-
- <xs:import namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext..."
- schemaLocation="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext..." />
-
- <xs:import namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utilit..."
- schemaLocation="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utilit..." />
-
- <!-- ////////// WS-Policy ////////// -->
-
- <xs:element name="Policy" >
- <xs:complexType>
- <xs:complexContent>
- <xs:extension base="tns:OperatorContentType" >
- <xs:attribute name="TargetNamespace"
- type="xs:anyURI"
- use="optional" />
- <xs:attribute ref="wsu:Id" use="optional" />
- <xs:anyAttribute namespace="##any" processContents="lax" />
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
- </xs:element>
- <xs:element name="All" type="tns:OperatorContentType" />
- <xs:element name="ExactlyOne" type="tns:OperatorContentType" />
-
- <xs:complexType name="OperatorContentType" >
- <xs:choice minOccurs="0" maxOccurs="unbounded" >
- <xs:element ref="tns:Policy" />
- <xs:element ref="tns:All" />
- <xs:element ref="tns:ExactlyOne" />
- <xs:element ref="tns:PolicyReference" />
- <xs:any namespace="##other" processContents="lax" />
- </xs:choice>
- </xs:complexType>
-
- <xs:element name="PolicyReference" >
- <xs:complexType>
- <xs:attribute name="URI" type="xs:anyURI" />
- <xs:attribute name="Digest" type="xs:base64Binary" use="optional" />
- <xs:attribute name="DigestAlgorithm" type="xs:anyURI" use="optional" />
- <xs:anyAttribute namespace="##any" processContents="lax" />
- </xs:complexType>
- </xs:element>
-
- <xs:attribute name="Optional" type="xs:boolean" />
-
- <!-- ////////// WS-PolicyAttachment ////////// -->
-
- <xs:element name="UsingPolicy" >
- <xs:complexType>
- <xs:anyAttribute namespace="##any" processContents="lax" />
- </xs:complexType>
- </xs:element>
-
- <xs:attribute name="PolicyURIs" >
- <xs:simpleType>
- <xs:list itemType="xs:anyURI" />
- </xs:simpleType>
- </xs:attribute>
-
- <xs:element name="PolicyAttachment" >
- <xs:complexType>
- <xs:sequence>
- <xs:element ref="tns:AppliesTo" />
- <xs:choice maxOccurs="unbounded" >
- <xs:element ref="tns:Policy" />
- <xs:element ref="tns:PolicyReference" />
- </xs:choice>
-<!-- omitted only because it causes the content model to be non-determistic
- <xs:element ref="wsse:Security" minOccurs="0" />
--->
- <xs:any namespace="##other"
- processContents="lax"
- minOccurs="0"
- maxOccurs="unbounded" />
- </xs:sequence>
- <xs:anyAttribute namespace="##any" processContents="lax" />
- </xs:complexType>
- </xs:element>
-
- <xs:element name="AppliesTo" >
- <xs:complexType>
- <xs:sequence>
- <xs:any namespace="##any"
- processContents="lax"
- maxOccurs="unbounded" />
- </xs:sequence>
- <xs:anyAttribute namespace="##any" processContents="lax" />
- </xs:complexType>
- </xs:element>
-
-</xs:schema>
Deleted: rest/src/main/resources/schema/wsdl20.xsd
===================================================================
--- rest/src/main/resources/schema/wsdl20.xsd 2007-11-21 12:01:29 UTC (rev 5094)
+++ rest/src/main/resources/schema/wsdl20.xsd 2007-11-21 15:23:56 UTC (rev 5095)
@@ -1,328 +0,0 @@
-<?xml version="1.0" encoding="us-ascii"?>
-<!--
- W3C XML Schema defined in the Web Services Description (WSDL)
- Version 2.0 specification
- http://www.w3.org/TR/wsdl20
-
- Copyright (c) 2003 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(r) 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
--->
-
-<!DOCTYPE xs:schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "http://www.w3.org/2001/XMLSchema.dtd">
-
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://www.w3.org/2003/11/wsdl" targetNamespace="http://www.w3.org/2003/11/wsdl" elementFormDefault="qualified" finalDefault="" blockDefault="" attributeFormDefault="unqualified">
-
-
- <xs:complexType name="DocumentationType" mixed="true">
- <xs:sequence>
- <xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded" namespace="##any"/>
- </xs:sequence>
- </xs:complexType>
-
- <xs:complexType name="DocumentedType" mixed="false">
- <xs:annotation>
- <xs:documentation>
- This type is extended by component types to allow them to be documented.
- </xs:documentation>
- </xs:annotation>
- <xs:sequence>
- <xs:element name="documentation" type="wsdl:DocumentationType" minOccurs="0"/>
- </xs:sequence>
- </xs:complexType>
-
- <xs:complexType name="ExtensibleDocumentedType" abstract="true" mixed="false">
- <xs:annotation>
- <xs:documentation>
- This type is extended by component types to allow
- attributes from other namespaces to be added.
- </xs:documentation>
- </xs:annotation>
- <xs:complexContent>
- <xs:extension base="wsdl:DocumentedType">
- <xs:anyAttribute namespace="##other" processContents="lax"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-
- <!-- definitions element decl and type def -->
- <xs:element name="definitions" type="wsdl:DefinitionsType">
- <xs:unique name="interface">
- <xs:selector xpath="wsdl:interface"/>
- <xs:field xpath="@name"/>
- </xs:unique>
- <xs:unique name="binding">
- <xs:selector xpath="wsdl:binding"/>
- <xs:field xpath="@name"/>
- </xs:unique>
- <xs:unique name="service">
- <xs:selector xpath="wsdl:service"/>
- <xs:field xpath="@name"/>
- </xs:unique>
- </xs:element>
-
- <xs:complexType name="DefinitionsType" mixed="false">
- <xs:complexContent>
- <xs:extension base="wsdl:ExtensibleDocumentedType">
- <xs:sequence>
- <xs:choice minOccurs="0" maxOccurs="unbounded">
- <xs:element ref="tns:import"/>
- <xs:element ref="tns:include"/>
- <xs:any namespace="##other" processContents="lax" minOccurs="1" maxOccurs="1"/>
- </xs:choice>
- <xs:element ref="tns:types" minOccurs="0"/>
- <xs:choice minOccurs="0" maxOccurs="unbounded">
- <xs:annotation>
- <xs:documentation>Any top-level, optional element is allowed to appear more than once.
- </xs:documentation>
- </xs:annotation>
- <xs:element ref="tns:interface">
- <xs:unique name="operation">
- <xs:selector xpath="wsdl:operation"/>
- <xs:field xpath="@name"/>
- </xs:unique>
- </xs:element>
- <xs:element ref="tns:binding"/>
- <xs:element ref="tns:service">
- <xs:unique name="endpoint">
- <xs:selector xpath="wsdl:endpoint"/>
- <xs:field xpath="@name"/>
- </xs:unique>
- </xs:element>
- <xs:any namespace="##other" processContents="lax" minOccurs="1" maxOccurs="1"/>
- </xs:choice>
- </xs:sequence>
- <xs:attribute name="targetNamespace" type="xs:anyURI" use="required"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-
- <!-- types for import and include elements -->
- <xs:element name="import" type="tns:ImportType"/>
- <xs:complexType name="ImportType" mixed="false">
- <xs:complexContent>
- <xs:extension base="wsdl:ExtensibleDocumentedType">
- <xs:attribute name="namespace" type="xs:anyURI" use="required"/>
- <xs:attribute name="location" type="xs:anyURI" use="optional"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-
- <xs:element name="include" type="tns:IncludeType"/>
- <xs:complexType name="IncludeType" mixed="false">
- <xs:complexContent>
- <xs:extension base="wsdl:ExtensibleDocumentedType">
- <xs:attribute name="location" type="xs:anyURI" use="required"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-
- <xs:element name="types" type="tns:TypesType"/>
- <xs:complexType name="TypesType" mixed="false">
- <xs:complexContent>
- <xs:extension base="wsdl:ExtensibleDocumentedType">
- <xs:sequence>
- <xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded" processContents="strict"/>
- </xs:sequence>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-
- <!-- parts related to wsdl:interface -->
- <xs:element name="interface" type="tns:InterfaceType"/>
- <xs:complexType name="InterfaceType" mixed="false">
- <xs:complexContent>
- <xs:extension base="wsdl:ExtensibleDocumentedType">
- <xs:choice minOccurs="0" maxOccurs="unbounded">
- <xs:element name="operation" type="wsdl:InterfaceOperationType"/>
- <xs:element name="feature" type="wsdl:FeatureType"/>
- <xs:element name="property" type="wsdl:PropertyType"/>
- <xs:any namespace="##other" processContents="lax" minOccurs="1" maxOccurs="1"/>
- </xs:choice>
- <xs:attribute name="name" type="xs:NCName" use="required"/>
- <xs:attribute name="extends" use="optional">
- <xs:simpleType>
- <xs:list itemType="xs:QName"/>
- </xs:simpleType>
- </xs:attribute>
- <xs:attribute name="encodingStyleDefault" type="xs:anyURI" use="optional"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-
- <xs:complexType name="InterfaceOperationType" mixed="false">
- <xs:complexContent>
- <xs:extension base="wsdl:ExtensibleDocumentedType">
- <xs:choice minOccurs="0" maxOccurs="unbounded">
- <xs:element name="input" type="wsdl:MessageRefType"/>
- <xs:element name="output" type="wsdl:MessageRefType"/>
- <xs:element name="infault" type="wsdl:MessageRefFaultType"/>
- <xs:element name="outfault" type="wsdl:MessageRefFaultType"/>
- <xs:element name="feature" type="wsdl:FeatureType"/>
- <xs:element name="property" type="wsdl:PropertyType"/>
- <xs:any namespace="##other" processContents="lax" minOccurs="1" maxOccurs="1"/>
- </xs:choice>
- <xs:attribute name="name" type="xs:NCName" use="required"/>
- <xs:attribute name="pattern" type="xs:anyURI" use="required"/>
- <xs:attribute name="style" type="xs:anyURI" use="optional"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-
- <xs:complexType name="MessageRefType" mixed="false">
- <xs:complexContent>
- <xs:extension base="wsdl:ExtensibleDocumentedType">
- <xs:choice minOccurs="0" maxOccurs="unbounded">
- <xs:any namespace="##other" processContents="lax" minOccurs="1" maxOccurs="1"/>
- </xs:choice>
- <xs:attribute name="messageReference" type="xs:NCName" use="optional"/>
- <xs:attribute name="message" type="xs:QName" use="optional"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-
- <xs:complexType name="MessageRefFaultType" mixed="false">
- <xs:complexContent>
- <xs:extension base="wsdl:ExtensibleDocumentedType">
- <xs:choice minOccurs="0" maxOccurs="unbounded">
- <xs:any namespace="##other" processContents="lax" minOccurs="1" maxOccurs="1"/>
- </xs:choice>
- <xs:attribute name="name" type="xs:NCName" use="required"/>
- <xs:attribute name="messageReference" type="xs:NCName" use="optional"/>
- <xs:attribute name="message" type="xs:QName" use="optional"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-
- <xs:complexType name="FeatureType" mixed="false">
- <xs:complexContent>
- <xs:extension base="wsdl:ExtensibleDocumentedType">
- <xs:choice minOccurs="0" maxOccurs="unbounded">
- <xs:any namespace="##other" processContents="lax" minOccurs="1" maxOccurs="1"/>
- </xs:choice>
- <xs:attribute name="uri" type="xs:QName" use="required"/>
- <xs:attribute name="required" type="xs:boolean" use="optional"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-
- <xs:complexType name="PropertyType" mixed="false">
- <xs:complexContent>
- <xs:extension base="wsdl:ExtensibleDocumentedType">
- <xs:sequence>
- <xs:choice>
- <xs:element name="value" type="xs:anySimpleType"/>
- <xs:element name="constraint" type="xs:QName"/>
- </xs:choice>
- <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
- </xs:sequence>
- <xs:attribute name="uri" type="xs:QName" use="required"/>
- <xs:attribute name="required" type="xs:boolean" use="optional"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-
- <!-- types related to wsdl:binding -->
- <xs:element name="binding" type="tns:BindingType"/>
- <xs:complexType name="BindingType" mixed="false">
- <xs:complexContent>
- <xs:extension base="wsdl:ExtensibleDocumentedType">
- <xs:choice minOccurs="0" maxOccurs="unbounded">
- <xs:element name="operation" type="wsdl:BindingOperationType"/>
- <xs:element name="feature" type="wsdl:FeatureType"/>
- <xs:element name="property" type="wsdl:PropertyType"/>
- <xs:any namespace="##other" processContents="lax" minOccurs="1" maxOccurs="1"/>
- </xs:choice>
- <xs:attribute name="name" type="xs:NCName" use="required"/>
- <xs:attribute name="interface" type="xs:QName" use="optional"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-
- <xs:complexType name="BindingOperationType" mixed="false">
- <xs:complexContent>
- <xs:extension base="wsdl:ExtensibleDocumentedType">
- <xs:choice minOccurs="0" maxOccurs="unbounded">
- <xs:element name="input" type="wsdl:BindingOperationMessageType"/>
- <xs:element name="output" type="wsdl:BindingOperationMessageType"/>
- <xs:element name="infault" type="wsdl:BindingOperationFaultType"/>
- <xs:element name="outfault" type="wsdl:BindingOperationFaultType"/>
- <xs:element name="feature" type="wsdl:FeatureType"/>
- <xs:element name="property" type="wsdl:PropertyType"/>
- <xs:any namespace="##other" processContents="lax" minOccurs="1" maxOccurs="1"/>
- </xs:choice>
- <xs:attribute name="name" type="xs:NCName" use="required"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-
- <xs:complexType name="BindingOperationMessageType" mixed="false">
- <xs:complexContent>
- <xs:extension base="wsdl:ExtensibleDocumentedType">
- <xs:choice minOccurs="0" maxOccurs="unbounded">
- <xs:any namespace="##other" processContents="lax" minOccurs="1" maxOccurs="1"/>
- </xs:choice>
- <xs:attribute name="messageReference" type="xs:NCName" use="required"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-
- <xs:complexType name="BindingOperationFaultType" mixed="false">
- <xs:complexContent>
- <xs:extension base="wsdl:ExtensibleDocumentedType">
- <xs:choice minOccurs="0" maxOccurs="unbounded">
- <xs:any namespace="##other" processContents="lax" minOccurs="1" maxOccurs="1"/>
- </xs:choice>
- <xs:attribute name="name" type="xs:NCName" use="required"/>
- <xs:attribute name="messageReference" type="xs:NCName" use="required"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-
- <!-- types related to service -->
- <xs:element name="service" type="tns:ServiceType"/>
- <xs:complexType name="ServiceType" mixed="false">
- <xs:complexContent>
- <xs:extension base="wsdl:ExtensibleDocumentedType">
- <xs:choice minOccurs="1" maxOccurs="unbounded">
- <xs:element name="endpoint" type="wsdl:EndpointType"/>
- <xs:any namespace="##other" processContents="lax" minOccurs="1" maxOccurs="1"/>
- </xs:choice>
- <xs:attribute name="name" type="xs:NCName" use="required"/>
- <xs:attribute name="interface" type="xs:QName" use="required"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-
- <xs:complexType name="EndpointType" mixed="false">
- <xs:complexContent>
- <xs:extension base="wsdl:ExtensibleDocumentedType">
- <xs:choice minOccurs="0" maxOccurs="unbounded">
- <xs:any namespace="##other" processContents="lax" minOccurs="1" maxOccurs="1"/>
- </xs:choice>
- <xs:attribute name="name" type="xs:NCName" use="required"/>
- <xs:attribute name="binding" type="xs:QName" use="required"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-
- <xs:attribute name="required" type="xs:boolean"/>
-
- <xs:complexType name="ExtensibilityElement" abstract="true" mixed="false">
- <xs:annotation>
- <xs:documentation>
- This abstract type is intended to serve as the base type for
- extensibility elements. It includes the wsdl:required attribute
- which it is anticipated will be used by most extension elements
- </xs:documentation>
- </xs:annotation>
- <xs:attribute ref="wsdl:required" use="optional"/>
- </xs:complexType>
-
-</xs:schema>
\ No newline at end of file
Deleted: rest/src/main/resources/schema/xml-media-types.xsd
===================================================================
--- rest/src/main/resources/schema/xml-media-types.xsd 2007-11-21 12:01:29 UTC (rev 5094)
+++ rest/src/main/resources/schema/xml-media-types.xsd 2007-11-21 15:23:56 UTC (rev 5095)
@@ -1,36 +0,0 @@
-<!--
- Describing Media Content of Binary Data in XML
- http://www.w3.org/TR/2005/NOTE-xml-media-types-20050504
--->
-
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
- xmlns:xmime="http://www.w3.org/2005/05/xmlmime"
- targetNamespace="http://www.w3.org/2005/05/xmlmime">
-
- <xs:attribute name="contentType">
- <xs:simpleType>
- <xs:restriction base="xs:string">
- <xs:minLength value="3"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
-
- <xs:attribute name="expectedContentTypes" type="xs:string"/>
-
- <xs:complexType name="base64Binary">
- <xs:simpleContent>
- <xs:extension base="xs:base64Binary">
- <xs:attribute ref="xmime:contentType"/>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- <xs:complexType name="hexBinary">
- <xs:simpleContent>
- <xs:extension base="xs:hexBinary">
- <xs:attribute ref="xmime:contentType"/>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
-</xs:schema>
\ No newline at end of file
Deleted: rest/src/main/resources/schema/xml.xsd
===================================================================
--- rest/src/main/resources/schema/xml.xsd 2007-11-21 12:01:29 UTC (rev 5094)
+++ rest/src/main/resources/schema/xml.xsd 2007-11-21 15:23:56 UTC (rev 5095)
@@ -1,86 +0,0 @@
-<?xml version='1.0'?>
-<xs:schema targetNamespace="http://www.w3.org/XML/1998/namespace" xmlns:xs="http://www.w3.org/2001/XMLSchema" xml:lang="en">
-
- <xs:annotation>
- <xs:documentation> See http://www.w3.org/XML/1998/namespace.html and http://www.w3.org/TR/REC-xml for information about this namespace. This schema document describes the XML
- namespace, in a form suitable for import by other schema documents. Note that local names in this namespace are intended to be defined only by the World Wide Web Consortium or its subgroups. The
- following names are currently defined in this namespace and should not be used with conflicting semantics by any Working Group, specification, or document instance: base (as an attribute
- name): denotes an attribute whose value provides a URI to be used as the base for interpreting any relative URIs in the scope of the element on which it appears; its value is inherited. This name is
- reserved by virtue of its definition in the XML Base specification. id (as an attribute name): denotes an attribute whose value should be interpreted as if declared to be of type ID. The xml:id
- specification is not yet a W3C Recommendation, but this attribute is included here to facilitate experimentation with the mechanisms it proposes. Note that it is _not_ included in the
- specialAttrs attribute group. lang (as an attribute name): denotes an attribute whose value is a language code for the natural language of the content of any element; its value is inherited.
- This name is reserved by virtue of its definition in the XML specification. space (as an attribute name): denotes an attribute whose value is a keyword indicating what whitespace processing
- discipline is intended for the content of the element; its value is inherited. This name is reserved by virtue of its definition in the XML specification. Father (in any context at all): denotes
- Jon Bosak, the chair of the original XML Working Group. This name is reserved by the following decision of the W3C XML Plenary and XML Coordination groups: In appreciation for his vision,
- leadership and dedication the W3C XML Plenary on this 10th day of February, 2000 reserves for Jon Bosak in perpetuity the XML name xml:Father </xs:documentation>
- </xs:annotation>
-
- <xs:annotation>
- <xs:documentation>This schema defines attributes and an attribute group suitable for use by schemas wishing to allow xml:base, xml:lang, xml:space or xml:id attributes on elements they
- define. To enable this, such a schema must import this schema for the XML namespace, e.g. as follows:
- <schema . . .> . . .
- <import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/> Subsequently, qualified reference to any of the attributes or
- the group defined below will have the desired effect, e.g.
-
- <type . . .> . . .
- <attributeGroup ref="xml:specialAttrs"/> will define a type which will schema-validate an instance element with any of those attributes</xs:documentation>
-
- </xs:annotation>
-
- <xs:annotation>
- <xs:documentation>In keeping with the XML Schema WG's standard versioning policy, this schema document will persist at http://www.w3.org/2005/08/xml.xsd. At the date of issue it can also be
- found at http://www.w3.org/2001/xml.xsd. The schema document at that URI may however change in the future, in order to remain compatible with the latest version of XML Schema itself, or with
- the XML namespace itself. In other words, if the XML Schema or XML namespaces change, the version of this document at http://www.w3.org/2001/xml.xsd will change accordingly; the version at
- http://www.w3.org/2005/08/xml.xsd will not change. </xs:documentation>
- </xs:annotation>
-
- <xs:attribute name="lang">
- <xs:annotation>
- <xs:documentation>Attempting to install the relevant ISO 2- and 3-letter codes as the enumerated possible values is probably never going to be a realistic possibility. See RFC 3066 at
- http://www.ietf.org/rfc/rfc3066.txt and the IANA registry at http://www.iana.org/assignments/lang-tag-apps.htm for further information. The union allows for the
- 'un-declaration' of xml:lang with the empty string.</xs:documentation>
-
- </xs:annotation>
- <xs:simpleType>
- <xs:union memberTypes="xs:language">
- <xs:simpleType>
- <xs:restriction base="xs:string">
- <xs:enumeration value=""/>
- </xs:restriction>
- </xs:simpleType>
- </xs:union>
-
- </xs:simpleType>
- </xs:attribute>
-
- <xs:attribute name="space">
- <xs:simpleType>
- <xs:restriction base="xs:NCName">
- <xs:enumeration value="default"/>
- <xs:enumeration value="preserve"/>
- </xs:restriction>
-
- </xs:simpleType>
- </xs:attribute>
-
- <xs:attribute name="base" type="xs:anyURI">
- <xs:annotation>
- <xs:documentation>See http://www.w3.org/TR/xmlbase/ for information about this attribute.</xs:documentation>
- </xs:annotation>
- </xs:attribute>
-
- <xs:attribute name="id" type="xs:ID">
-
- <xs:annotation>
- <xs:documentation>See http://www.w3.org/TR/xml-id/ for information about this attribute.</xs:documentation>
- </xs:annotation>
- </xs:attribute>
-
- <xs:attributeGroup name="specialAttrs">
- <xs:attribute ref="xml:base"/>
- <xs:attribute ref="xml:lang"/>
- <xs:attribute ref="xml:space"/>
-
- </xs:attributeGroup>
-
-</xs:schema>
\ No newline at end of file
Added: rest/src/test/java/org/jboss/test/rest/Specification.java
===================================================================
--- rest/src/test/java/org/jboss/test/rest/Specification.java (rev 0)
+++ rest/src/test/java/org/jboss/test/rest/Specification.java 2007-11-21 15:23:56 UTC (rev 5095)
@@ -0,0 +1,48 @@
+/*
+ * 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.rest;
+
+import javax.ws.rs.HttpMethod;
+
+/**
+ * @author Heiko.Braun(a)jboss.com
+ * @version $Revision$
+ */
+public class Specification
+{
+ public String name = "Unknown";
+
+ public Specification()
+ {
+ }
+
+ public Specification(String name)
+ {
+ this.name = name;
+ }
+
+ @HttpMethod
+ public String getName()
+ {
+ return name;
+ }
+}
Property changes on: rest/src/test/java/org/jboss/test/rest/Specification.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: rest/src/test/java/org/jboss/test/rest/Widget.java
===================================================================
--- rest/src/test/java/org/jboss/test/rest/Widget.java (rev 0)
+++ rest/src/test/java/org/jboss/test/rest/Widget.java 2007-11-21 15:23:56 UTC (rev 5095)
@@ -0,0 +1,68 @@
+/*
+ * 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.rest;
+
+import javax.ws.rs.HttpMethod;
+import javax.ws.rs.ProduceMime;
+import javax.ws.rs.UriParam;
+import javax.ws.rs.UriTemplate;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author Heiko.Braun(a)jboss.com
+ * @version $Revision$
+ */
+public class Widget
+{
+ String id = "";
+
+ public Widget() {
+ }
+
+ public Widget(String id)
+ {
+ this.id = id;
+ }
+
+ @HttpMethod
+ @UriTemplate("id")
+ @ProduceMime("text/plain")
+ public String getId() {
+ return this.id;
+ }
+
+ @HttpMethod
+ @UriTemplate("spec")
+ public List<Specification> getSpecifications() {
+ List<Specification> specs = new ArrayList<Specification>();
+ specs.add( new Specification());
+ return specs;
+ }
+
+ @HttpMethod
+ @UriTemplate("spec/{name}")
+ public Specification getSpecByName(@UriParam("name")String name)
+ {
+ return new Specification(name);
+ }
+}
Property changes on: rest/src/test/java/org/jboss/test/rest/Widget.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: rest/src/test/java/org/jboss/test/rest/WidgetList.java
===================================================================
--- rest/src/test/java/org/jboss/test/rest/WidgetList.java (rev 0)
+++ rest/src/test/java/org/jboss/test/rest/WidgetList.java 2007-11-21 15:23:56 UTC (rev 5095)
@@ -0,0 +1,58 @@
+/*
+ * 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.rest;
+
+import javax.ws.rs.*;
+import javax.ws.rs.core.HttpContext;
+import javax.ws.rs.core.HttpHeaders;
+
+@UriTemplate("widgets")
+public class WidgetList
+{
+ @HttpMethod
+ @ProduceMime({"text/plain"})
+ public String getDescription() {
+ return "A widgetlist";
+ }
+
+ @HttpMethod
+ @UriTemplate("offers")
+ public WidgetList getDiscounted() {
+ return null;
+ }
+
+ @HttpMethod
+ @UriTemplate("special")
+ @ConsumeMime({"text/xml", "application/xml"})
+ public void putDiscounted(
+ @HttpContext HttpHeaders headers,
+ Widget special
+ )
+ {
+
+ }
+
+ @UriTemplate("{id}")
+ public Widget findWidget(@UriParam("id") String id) {
+ return new Widget(id);
+ }
+}
Property changes on: rest/src/test/java/org/jboss/test/rest/WidgetList.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: rest/src/test/java/org/jboss/test/rest/deployment/DeploymentTestCase.java
===================================================================
--- rest/src/test/java/org/jboss/test/rest/deployment/DeploymentTestCase.java (rev 0)
+++ rest/src/test/java/org/jboss/test/rest/deployment/DeploymentTestCase.java 2007-11-21 15:23:56 UTC (rev 5095)
@@ -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.test.rest.deployment;
+
+import junit.framework.Test;
+import org.jboss.test.rest.util.RestCase;
+import org.jboss.test.rest.util.RestTestSetup;
+
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+import java.io.OutputStreamWriter;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+/**
+ * @author Heiko.Braun(a)jboss.com
+ * @version $Revision$
+ */
+public class DeploymentTestCase extends RestCase
+{
+ public static Test suite()
+ {
+ return new RestTestSetup(DeploymentTestCase.class, "jbossrs-deployment.war");
+ }
+
+ /**
+ * Invoke a root resource
+ * @throws Exception
+ */
+ public void testRequest1() throws Exception
+ {
+ URL url = new URL("http://localhost:8080/jbossrs-deployment/widgets");
+ String response = doTextPlainRequest(url, null);
+ assertNotNull(response);
+ assertEquals("A widgetlist", response);
+ }
+
+ /**
+ * Invoke a subresource
+ *
+ * @throws Exception
+ */
+ public void testRequest2() throws Exception
+ {
+ URL url = new URL("http://localhost:8080/jbossrs-deployment/widgets/123/id");
+ String response = doTextPlainRequest(url, null);
+ assertNotNull(response);
+ assertEquals("123", response);
+ }
+
+ private String doTextPlainRequest(URL url, String data) throws Exception
+ {
+ HttpURLConnection conn = (HttpURLConnection)url.openConnection();
+ conn.setDoOutput( data!=null );
+ conn.setRequestProperty("accept", "text/*");
+
+ if(data !=null)
+ {
+ OutputStreamWriter wr = new OutputStreamWriter(conn.getOutputStream());
+
+ wr.write(data);
+ wr.flush();
+ wr.close();
+ }
+
+ // Get the response
+ BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream()));
+ String line;
+ StringBuffer sb = new StringBuffer();
+ while ((line = rd.readLine()) != null)
+ {
+ sb.append(line);
+ }
+ rd.close();
+
+ return sb.toString();
+ }
+}
Property changes on: rest/src/test/java/org/jboss/test/rest/deployment/DeploymentTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: rest/src/test/java/org/jboss/test/rest/deployment/DescriptorParserTestCase.java
===================================================================
--- rest/src/test/java/org/jboss/test/rest/deployment/DescriptorParserTestCase.java (rev 0)
+++ rest/src/test/java/org/jboss/test/rest/deployment/DescriptorParserTestCase.java 2007-11-21 15:23:56 UTC (rev 5095)
@@ -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.test.rest.deployment;
+
+import junit.framework.TestCase;
+import org.jboss.rest.model.dd.DeploymentDescriptorParser;
+import org.jboss.rest.model.dd.JbossrsType;
+import org.jboss.rest.model.dd.ResourceType;
+import org.jboss.test.rest.util.RestCase;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+
+/**
+ * Test the container descriptor parser.
+ *
+ * @author Heiko.Braun(a)jboss.com
+ * @version $Revision$
+ */
+public class DescriptorParserTestCase extends RestCase
+{
+ private final static String DD = "<?xml version='1.0' encoding='UTF-8'?>\n"+
+ "<jbossrs xmlns='http://org.jboss.rest/'>"+
+ " <resource>"+
+ " <name>SampleEndpoint</name>"+
+ " <implementation>org.jboss.test.rest.WidgetList</implementation>"+
+ " </resource>"+
+ "</jbossrs>";
+
+ public void testReadDescriptor() throws Exception
+ {
+ JbossrsType dd = DeploymentDescriptorParser.read( new ByteArrayInputStream(DD.getBytes()));
+ assertNotNull(dd);
+ assertTrue(dd.getResource().size()==1);
+
+ ResourceType resource = dd.getResource().get(0);
+ assertTrue(resource.getName().equals("SampleEndpoint"));
+ assertTrue(resource.getImplementation().equals("org.jboss.test.rest.WidgetList"));
+ }
+
+ public void testWriteDescriptor() throws Exception
+ {
+ JbossrsType dd = DeploymentDescriptorParser.read( new ByteArrayInputStream(DD.getBytes()));
+ ResourceType resource = new ResourceType();
+ resource.setImplementation("a.b.c.class");
+ resource.setName("FooBarResource");
+
+ dd.getResource().add(resource);
+
+ ByteArrayOutputStream bout = new ByteArrayOutputStream();
+ DeploymentDescriptorParser.write(dd, bout);
+ String result = new String(bout.toByteArray());
+ assertTrue(result.indexOf("FooBarResource")!=-1);
+ }
+}
Property changes on: rest/src/test/java/org/jboss/test/rest/deployment/DescriptorParserTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: rest/src/test/java/org/jboss/test/rest/invocation/InvocationBuilderTestCase.java
===================================================================
--- rest/src/test/java/org/jboss/test/rest/invocation/InvocationBuilderTestCase.java (rev 0)
+++ rest/src/test/java/org/jboss/test/rest/invocation/InvocationBuilderTestCase.java 2007-11-21 15:23:56 UTC (rev 5095)
@@ -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.test.rest.invocation;
+
+import junit.framework.TestCase;
+import org.jboss.rest.MethodHTTP;
+import org.jboss.rest.ResourceRegistry;
+import org.jboss.rest.model.*;
+import org.jboss.rest.runtime.*;
+import org.jboss.test.rest.WidgetList;
+import org.jboss.test.rest.util.RestCase;
+
+import javax.ws.rs.core.HttpHeaders;
+import java.net.URI;
+import java.util.List;
+import java.util.Stack;
+
+/**
+ * @author Heiko.Braun(a)jboss.com
+ * @version $Revision$
+ */
+public class InvocationBuilderTestCase extends RestCase
+{
+ ResourceRegistry registry;
+ List<ResourceModel> rootModels;
+
+ protected void setUp() throws Exception
+ {
+ this.registry = new ResourceRegistry();
+ ResourceModel root = ResourceModelParser.newInstance().parse(WidgetList.class);
+ registry.addResourceModelForContext("/rest", root);
+ rootModels = registry.getResourceModelsForContext("/rest");
+ }
+
+ public void testUriParamBinding() throws Exception
+ {
+ URI uri = new URI("/rest/widgets/Foo/spec/Bar");
+ RuntimeContext context = defaultRuntimeContext(MethodHTTP.GET, uri);
+ StatefulResourceResolver resolver = StatefulResourceResolver.newInstance(context);
+
+ ResourceMethod method = resolver.resolve();
+
+ assertNotNull(method);
+ assertEquals("spec/{name}", method.getUriTemplate());
+
+ // evaluate locator stack
+ Object subResourceInstance = null;
+ Stack<ResourceLocator> visitedLocators = resolver.getVisitedLocator();
+ while(!visitedLocators.isEmpty())
+ {
+ ResourceLocator loc = visitedLocators.pop();
+
+ // adopt working path
+ context.setWorkingPath(resolver.getLocatorWorkingPath(loc));
+
+ InvocationBuilder builder = new DefaultInvocationBuilder();
+ builder.addInvocationModel(loc.getParameterBinding());
+ builder.addInvocationModel(loc.getOperationBinding());
+ Invocation locatorInvocation = builder.build(context);
+
+ InvocationHandler bridgeInvoker = new DefaultInvocationHandler();
+ subResourceInstance = bridgeInvoker.invoke(locatorInvocation);
+
+ }
+
+ // setup a builder
+ InvocationBuilder builder = new DefaultInvocationBuilder();
+ context.setWorkingPath(resolver.getMethodWorkingPath());
+
+ if(subResourceInstance!=null)
+ builder.addInvocationModel(new PresetInvocationTarget(subResourceInstance));
+
+ builder.addInvocationModel(method.getParameterBinding());
+ builder.addInvocationModel(method.getOperationBinding());
+ Invocation invocation = builder.build(context);
+
+ Object parameterInstance = invocation.getParameterInstances().get(0);
+ assertTrue(parameterInstance!=null);
+ assertTrue("Wildcard parameter {name} not bound", parameterInstance.equals("Bar"));
+
+ }
+
+ public void testHttpContextParamBinding() throws Exception
+ {
+ URI uri = new URI("/rest/widgets/special");
+ RuntimeContext context = defaultRuntimeContext(MethodHTTP.PUT, uri);
+ context.parseContentTypeHeader("text/xml");
+ StatefulResourceResolver resolver = StatefulResourceResolver.newInstance(context);
+
+ ResourceMethod method = resolver.resolve();
+ context.setWorkingPath(resolver.getMethodWorkingPath());
+
+ assertNotNull(method);
+ assertEquals("special", method.getUriTemplate());
+
+ // setup a builder
+ InvocationBuilder builder = new DefaultInvocationBuilder();
+ builder.addInvocationModel(method.getParameterBinding());
+ builder.addInvocationModel(method.getOperationBinding());
+
+ // create an Invocation instance
+ Invocation invocation = builder.build(context);
+ Object parameterInstance = invocation.getParameterInstances().get(0);
+ assertTrue(parameterInstance!=null);
+ assertTrue("HttpContext parameter not bound", parameterInstance instanceof HttpHeaders);
+
+ }
+
+ private RuntimeContext defaultRuntimeContext(MethodHTTP method, URI uri)
+ {
+ RuntimeContext context = new RuntimeContext(method, uri, rootModels );
+ context.parseAcceptHeader("*/*");
+ return context;
+ }
+}
Property changes on: rest/src/test/java/org/jboss/test/rest/invocation/InvocationBuilderTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: rest/src/test/java/org/jboss/test/rest/media/BookResource.java
===================================================================
--- rest/src/test/java/org/jboss/test/rest/media/BookResource.java (rev 0)
+++ rest/src/test/java/org/jboss/test/rest/media/BookResource.java 2007-11-21 15:23:56 UTC (rev 5095)
@@ -0,0 +1,62 @@
+package org.jboss.test.rest.media;
+
+import javax.ws.rs.HttpMethod;
+import javax.ws.rs.UriTemplate;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement(name = "book")
+public class BookResource
+{
+ private String author;
+ private String ISBN;
+ private String title;
+
+ public BookResource()
+ {
+ }
+
+ public BookResource(String author, String ISBN, String title)
+ {
+ this.author = author;
+ this.ISBN = ISBN;
+ this.title = title;
+ }
+
+ @HttpMethod
+ @UriTemplate("author")
+ @XmlElement
+ public String getAuthor()
+ {
+ return author;
+ }
+
+ public void setAuthor(String author)
+ {
+ this.author = author;
+ }
+
+ @XmlElement
+ public String getISBN()
+ {
+ return ISBN;
+ }
+
+ public void setISBN(String ISBN)
+ {
+ this.ISBN = ISBN;
+ }
+
+ @HttpMethod
+ @UriTemplate("title")
+ @XmlElement
+ public String getTitle()
+ {
+ return title;
+ }
+
+ public void setTitle(String title)
+ {
+ this.title = title;
+ }
+}
Property changes on: rest/src/test/java/org/jboss/test/rest/media/BookResource.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: rest/src/test/java/org/jboss/test/rest/media/BookStoreResource.java
===================================================================
--- rest/src/test/java/org/jboss/test/rest/media/BookStoreResource.java (rev 0)
+++ rest/src/test/java/org/jboss/test/rest/media/BookStoreResource.java 2007-11-21 15:23:56 UTC (rev 5095)
@@ -0,0 +1,47 @@
+package org.jboss.test.rest.media;
+
+import javax.ws.rs.HttpMethod;
+import javax.ws.rs.ProduceMime;
+import javax.ws.rs.UriParam;
+import javax.ws.rs.UriTemplate;
+import java.util.ArrayList;
+import java.util.List;
+
+@UriTemplate("books")
+public class BookStoreResource
+{
+
+ private List<BookResource> availableBooks = new ArrayList<BookResource>();
+
+ public BookStoreResource()
+ {
+ availableBooks.add( new BookResource("Leonard Richardson", "596529260", "RESTful Web Services") );
+ availableBooks.add( new BookResource("Sam Ruby", "3897217279", "Web Services mit REST") );
+ }
+
+ @UriTemplate("{isbn}")
+ public BookResource getBookByISBN(
+ @UriParam("isbn")
+ String isbn)
+ {
+ BookResource match = null;
+
+ for(BookResource book : availableBooks)
+ {
+ if(book.getISBN().equals(isbn))
+ {
+ match = book;
+ break;
+ }
+ }
+
+ return match;
+ }
+
+ @HttpMethod
+ @ProduceMime("text/xml")
+ public List<BookResource> getAllBooks()
+ {
+ return availableBooks;
+ }
+}
Property changes on: rest/src/test/java/org/jboss/test/rest/media/BookStoreResource.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: rest/src/test/java/org/jboss/test/rest/media/MediaTypeTestCase.java
===================================================================
--- rest/src/test/java/org/jboss/test/rest/media/MediaTypeTestCase.java (rev 0)
+++ rest/src/test/java/org/jboss/test/rest/media/MediaTypeTestCase.java 2007-11-21 15:23:56 UTC (rev 5095)
@@ -0,0 +1,67 @@
+package org.jboss.test.rest.media;
+
+import junit.framework.Test;
+import org.jboss.rest.media.DefaultProviderFactory;
+import org.jboss.test.rest.util.RestCase;
+import org.jboss.test.rest.util.RestTestSetup;
+
+import javax.ws.rs.ext.MessageBodyReader;
+import javax.ws.rs.ext.MessageBodyWriter;
+import javax.ws.rs.ext.ProviderFactory;
+import java.io.OutputStream;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+/**
+ * @author Heiko.Braun(a)jboss.com
+ * @version $Revision$
+ */
+public class MediaTypeTestCase extends RestCase
+{
+ public static Test suite()
+ {
+ return new RestTestSetup(MediaTypeTestCase.class, "jbossrs-mediatype.war");
+ }
+
+ /**
+ * Request a xml resource representation
+ *
+ * @throws Exception
+ */
+ public void testRequest1() throws Exception
+ {
+ URL url = new URL("http://localhost:8080/jbossrs-mediatype/books/3897217279");
+
+ Object response = doMediaRequest(url, null);
+ assertNotNull(response );
+ assertTrue( (response instanceof BookResource));
+ assertEquals( "Sam Ruby", ((BookResource)response ).getAuthor());
+ }
+
+ private Object doMediaRequest(URL url, Object data) throws Exception
+ {
+ ProviderFactory providerFactory = DefaultProviderFactory.newInstance();
+
+ HttpURLConnection conn = (HttpURLConnection)url.openConnection();
+ conn.setDoOutput( data!=null );
+ conn.setRequestProperty("accept", "text/xml");
+
+ if(data !=null)
+ {
+ OutputStream out = conn.getOutputStream();
+ MessageBodyWriter writer = providerFactory.createMessageBodyWriter(data.getClass(), null);
+ writer.writeTo(data, null, null, out);
+ out.flush();
+ out.close();
+ }
+
+ Object returnValue = null;
+ MessageBodyReader reader = providerFactory.createMessageBodyReader(BookResource.class, null);
+ if(reader.isReadable(BookResource.class))
+ {
+ returnValue = reader.readFrom(BookResource.class, null, null, conn.getInputStream());
+ }
+
+ return returnValue;
+ }
+}
Property changes on: rest/src/test/java/org/jboss/test/rest/media/MediaTypeTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: rest/src/test/java/org/jboss/test/rest/model/ModelParserTestCase.java
===================================================================
--- rest/src/test/java/org/jboss/test/rest/model/ModelParserTestCase.java (rev 0)
+++ rest/src/test/java/org/jboss/test/rest/model/ModelParserTestCase.java 2007-11-21 15:23:56 UTC (rev 5095)
@@ -0,0 +1,55 @@
+/*
+ * 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.rest.model;
+
+import junit.framework.TestCase;
+import org.jboss.rest.MethodHTTP;
+import org.jboss.rest.model.ResourceMethod;
+import org.jboss.rest.model.ResourceModel;
+import org.jboss.rest.model.ResourceModelParser;
+import org.jboss.test.rest.WidgetList;
+import org.jboss.test.rest.util.RestCase;
+
+/**
+ * @author Heiko.Braun(a)jboss.com
+ * @version $Revision$
+ */
+public class ModelParserTestCase extends RestCase
+{
+ public void testParseMetaModel() throws Exception
+ {
+ ResourceModel root = ResourceModelParser.newInstance().parse(WidgetList.class);
+
+ ResourceMethod match = null;
+ for(ResourceMethod m : root.getSubResourceMethods())
+ {
+ if(m.getMethodHTTP() == MethodHTTP.PUT
+ && m.getUriTemplate().equals("special"))
+ {
+ match = m;
+ break;
+ }
+ }
+
+ assertNotNull(match);
+ }
+}
Property changes on: rest/src/test/java/org/jboss/test/rest/model/ModelParserTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: rest/src/test/java/org/jboss/test/rest/model/ResolverTestCase.java
===================================================================
--- rest/src/test/java/org/jboss/test/rest/model/ResolverTestCase.java (rev 0)
+++ rest/src/test/java/org/jboss/test/rest/model/ResolverTestCase.java 2007-11-21 15:23:56 UTC (rev 5095)
@@ -0,0 +1,128 @@
+/*
+ * 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.rest.model;
+
+import junit.framework.TestCase;
+import org.jboss.rest.MethodHTTP;
+import org.jboss.rest.ResourceRegistry;
+import org.jboss.rest.model.ResourceMethod;
+import org.jboss.rest.model.ResourceModel;
+import org.jboss.rest.model.ResourceModelParser;
+import org.jboss.rest.model.StatefulResourceResolver;
+import org.jboss.rest.runtime.RuntimeContext;
+import org.jboss.test.rest.WidgetList;
+import org.jboss.test.rest.util.RestCase;
+
+import java.lang.reflect.Method;
+import java.net.URI;
+import java.util.List;
+
+/**
+ * @author Heiko.Braun(a)jboss.com
+ * @version $Revision$
+ */
+public class ResolverTestCase extends RestCase
+{
+
+ ResourceRegistry registry;
+ List<ResourceModel> rootModels;
+
+ protected void setUp() throws Exception
+ {
+ this.registry = new ResourceRegistry();
+ ResourceModel root = ResourceModelParser.newInstance().parse(WidgetList.class);
+ registry.addResourceModelForContext("/rest", root);
+ rootModels = registry.getResourceModelsForContext("/rest");
+ }
+
+ public void testRegexResolver1() throws Exception
+ {
+ URI uri = new URI("/rest/widgets/Id/spec");
+ RuntimeContext context = defaultRuntimeContext(MethodHTTP.GET, uri);
+ StatefulResourceResolver resolver = StatefulResourceResolver.newInstance(context);
+ ResourceMethod method = resolver.resolve();
+
+ assertNotNull(method);
+ assertEquals("spec", method.getUriTemplate());
+ }
+
+ public void testRegexResolver2() throws Exception
+ {
+ URI uri = new URI("/rest/widgets/special");
+ RuntimeContext context = defaultRuntimeContext(MethodHTTP.PUT, uri);
+ context.parseContentTypeHeader("text/xml");
+
+ StatefulResourceResolver resolver = StatefulResourceResolver.newInstance(context);
+
+ ResourceMethod method = resolver.resolve();
+
+ assertNotNull(method);
+ assertEquals("special", method.getUriTemplate());
+ }
+
+ public void testRegexResolver3() throws Exception
+ {
+ URI uri = new URI("/rest/widgets/offers");
+ RuntimeContext context = defaultRuntimeContext(MethodHTTP.GET, uri);
+ StatefulResourceResolver resolver = StatefulResourceResolver.newInstance(context);
+
+ ResourceMethod method = resolver.resolve();
+
+ assertNotNull(method);
+ assertEquals("offers", method.getUriTemplate());
+ }
+
+ public void testRegexResolver4() throws Exception
+ {
+ URI uri = new URI("/rest/widgets/Id/spec/SpecName");
+ RuntimeContext context = defaultRuntimeContext(MethodHTTP.GET, uri);
+ StatefulResourceResolver resolver = StatefulResourceResolver.newInstance(context);
+
+ ResourceMethod method = resolver.resolve();
+
+ assertNotNull(method);
+ assertEquals("spec/{name}", method.getUriTemplate());
+ }
+
+ public void testRegexResolver5() throws Exception
+ {
+ URI uri = new URI("/rest/widgets");
+ RuntimeContext context = defaultRuntimeContext(MethodHTTP.GET, uri);
+ context.parseAcceptHeader("text/plain");
+
+ StatefulResourceResolver resolver = StatefulResourceResolver.newInstance(context);
+ ResourceMethod method = resolver.resolve();
+
+ assertNotNull(method);
+ Method target = method.getInvocationTarget();
+ String result = (String)target.invoke( target.getDeclaringClass().newInstance());
+ assertEquals("A widgetlist", result);
+ }
+
+ private RuntimeContext defaultRuntimeContext(MethodHTTP method, URI uri)
+ {
+ RuntimeContext context = new RuntimeContext(method, uri, rootModels );
+ context.parseAcceptHeader("text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2");
+ return context;
+ }
+
+}
Property changes on: rest/src/test/java/org/jboss/test/rest/model/ResolverTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: rest/src/test/java/org/jboss/test/rest/model/RunRegex.java
===================================================================
--- rest/src/test/java/org/jboss/test/rest/model/RunRegex.java (rev 0)
+++ rest/src/test/java/org/jboss/test/rest/model/RunRegex.java 2007-11-21 15:23:56 UTC (rev 5095)
@@ -0,0 +1,63 @@
+/*
+ * 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.rest.model;
+
+import java.net.URI;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * @author Heiko.Braun(a)jboss.com
+ * @version $Revision$
+ */
+public class RunRegex
+{
+ public static void main(String[] args) throws Exception
+ {
+
+ URI uri = new URI("http://jboss.com/widgets/special");
+ System.out.println(uri.getPath());
+
+ String s = "spec";
+ System.out.println("> " +s);
+ Pattern p = Pattern.compile("(\\bspec\\b)(.*?)(/)?");
+ //Pattern p = Pattern.compile("(\\bspec\\b)(/)?");
+ Matcher m = p.matcher(s);
+
+ System.out.println("? " + m.matches());
+
+ int matchingGroups = 0;
+ for(int i=1; i<=m.groupCount(); i++)
+ {
+ String s1 = m.group(i);
+ System.out.println("g '" + s1 + "'");
+ if(s1!=null && "".equals(s1)==false)
+ matchingGroups++;
+ }
+
+ System.out.println("! "+matchingGroups);
+ System.out.println("< "+m.group(m.groupCount()));
+ System.out.println("---");
+
+
+ }
+}
Property changes on: rest/src/test/java/org/jboss/test/rest/model/RunRegex.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: rest/src/test/java/org/jboss/test/rest/runtime/RuntimeContextTestCase.java
===================================================================
--- rest/src/test/java/org/jboss/test/rest/runtime/RuntimeContextTestCase.java (rev 0)
+++ rest/src/test/java/org/jboss/test/rest/runtime/RuntimeContextTestCase.java 2007-11-21 15:23:56 UTC (rev 5095)
@@ -0,0 +1,27 @@
+package org.jboss.test.rest.runtime;
+
+import junit.framework.TestCase;
+import org.jboss.rest.MethodHTTP;
+import org.jboss.rest.model.ResourceModel;
+import org.jboss.rest.runtime.RuntimeContext;
+import org.jboss.test.rest.util.RestCase;
+
+import java.net.URI;
+import java.util.ArrayList;
+
+
+public class RuntimeContextTestCase extends RestCase
+{
+ public void testAcceptHeaderParsing() throws Exception
+ {
+ // typical firefox accept header
+ String headerValue = "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2";
+ RuntimeContext ctx = new RuntimeContext(
+ MethodHTTP.GET,
+ new URI("/jbossrs-container/widgets"),
+ new ArrayList<ResourceModel>()
+ );
+
+ ctx.parseAcceptHeader(headerValue);
+ }
+}
Property changes on: rest/src/test/java/org/jboss/test/rest/runtime/RuntimeContextTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: rest/src/test/java/org/jboss/test/rest/util/RestCase.java
===================================================================
--- rest/src/test/java/org/jboss/test/rest/util/RestCase.java (rev 0)
+++ rest/src/test/java/org/jboss/test/rest/util/RestCase.java 2007-11-21 15:23:56 UTC (rev 5095)
@@ -0,0 +1,254 @@
+package org.jboss.test.rest.util;
+
+import junit.framework.TestCase;
+import org.jboss.logging.Logger;
+import org.jboss.wsf.common.DOMWriter;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+import javax.management.MBeanServerConnection;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Hashtable;
+import java.util.Iterator;
+
+/**
+ * Base class for JBossWS test cases
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 14-Oct-2004
+ */
+public abstract class RestCase extends TestCase
+{
+ // provide logging
+ protected Logger log = Logger.getLogger(getClass().getName());
+
+ private RestTestHelper delegate = new RestTestHelper();
+
+ public RestCase()
+ {
+ }
+
+ public RestCase(String name)
+ {
+ super(name);
+ }
+
+ public MBeanServerConnection getServer() throws NamingException
+ {
+ return delegate.getServer();
+ }
+
+ public boolean isTargetJBoss50()
+ {
+ return delegate.isTargetJBoss50();
+ }
+
+ public boolean isTargetJBoss42()
+ {
+ return delegate.isTargetJBoss42();
+ }
+
+ public boolean isTargetJBoss40()
+ {
+ return delegate.isTargetJBoss40();
+ }
+
+ /** Deploy the given archive
+ */
+ public void deploy(String archive) throws Exception
+ {
+ delegate.deploy(archive);
+ }
+
+ /** Undeploy the given archive
+ */
+ public void undeploy(String archive) throws Exception
+ {
+ delegate.undeploy(archive);
+ }
+
+ public String getServerHost()
+ {
+ return delegate.getServerHost();
+ }
+
+ /** Get the client's env context for a given name.
+ */
+ protected InitialContext getInitialContext(String clientName) throws NamingException
+ {
+ InitialContext iniCtx = new InitialContext();
+ Hashtable env = iniCtx.getEnvironment();
+ env.put(Context.URL_PKG_PREFIXES, "org.jboss.naming.client");
+ env.put("j2ee.clientName", clientName);
+ return new InitialContext(env);
+ }
+
+ /** Get the client's env context
+ */
+ protected InitialContext getInitialContext() throws NamingException
+ {
+ return getInitialContext("jbossws-client");
+ }
+
+ public boolean hasJDK15()
+ {
+ try
+ {
+ Class.forName("java.lang.Enum");
+ return true;
+ }
+ catch (ClassNotFoundException ex)
+ {
+ return false;
+ }
+ }
+
+ public static void assertEquals(Element expElement, Element wasElement, boolean ignoreWhitespace)
+ {
+ normalizeWhitspace(expElement, ignoreWhitespace);
+ normalizeWhitspace(wasElement, ignoreWhitespace);
+ String expStr = DOMWriter.printNode(expElement, false);
+ String wasStr = DOMWriter.printNode(wasElement, false);
+ if (expStr.equals(wasStr) == false)
+ {
+ System.out.println("\nExp: " + expStr + "\nWas: " + wasStr);
+ Logger.getLogger(RestCase.class).error("\nExp: " + expStr + "\nWas: " + wasStr);
+ }
+ assertEquals(expStr, wasStr);
+ }
+
+ public static void assertEquals(Element expElement, Element wasElement)
+ {
+ assertEquals(expElement, wasElement, false);
+ }
+
+ public static void assertEquals(Object exp, Object was)
+ {
+ if (exp instanceof Object[] && was instanceof Object[])
+ assertEqualsArray((Object[])exp, (Object[])was);
+ else if (exp instanceof byte[] && was instanceof byte[])
+ assertEqualsArray((byte[])exp, (byte[])was);
+ else if (exp instanceof boolean[] && was instanceof boolean[])
+ assertEqualsArray((boolean[])exp, (boolean[])was);
+ else if (exp instanceof short[] && was instanceof short[])
+ assertEqualsArray((short[])exp, (short[])was);
+ else if (exp instanceof int[] && was instanceof int[])
+ assertEqualsArray((int[])exp, (int[])was);
+ else if (exp instanceof long[] && was instanceof long[])
+ assertEqualsArray((long[])exp, (long[])was);
+ else if (exp instanceof float[] && was instanceof float[])
+ assertEqualsArray((float[])exp, (float[])was);
+ else if (exp instanceof double[] && was instanceof double[])
+ assertEqualsArray((double[])exp, (double[])was);
+ else TestCase.assertEquals(exp, was);
+ }
+
+ private static void assertEqualsArray(Object[] exp, Object[] was)
+ {
+ if (exp == null && was == null)
+ return;
+
+ if (exp != null && was != null)
+ {
+ if (exp.length != was.length)
+ {
+ fail("Expected <" + exp.length + "> array items, but was <" + was.length + ">");
+ }
+ else
+ {
+ for (int i = 0; i < exp.length; i++)
+ {
+
+ Object compExp = exp[i];
+ Object compWas = was[i];
+ assertEquals(compExp, compWas);
+ }
+ }
+ }
+ else if (exp == null)
+ {
+ fail("Expected a null array, but was: " + Arrays.asList(was));
+ }
+ else if (was == null)
+ {
+ fail("Expected " + Arrays.asList(exp) + ", but was: null");
+ }
+ }
+
+ private static void assertEqualsArray(byte[] exp, byte[] was)
+ {
+ assertTrue("Arrays don't match", Arrays.equals(exp, was));
+ }
+
+ private static void assertEqualsArray(boolean[] exp, boolean[] was)
+ {
+ assertTrue("Arrays don't match", Arrays.equals(exp, was));
+ }
+
+ private static void assertEqualsArray(short[] exp, short[] was)
+ {
+ assertTrue("Arrays don't match", Arrays.equals(exp, was));
+ }
+
+ private static void assertEqualsArray(int[] exp, int[] was)
+ {
+ assertTrue("Arrays don't match", Arrays.equals(exp, was));
+ }
+
+ private static void assertEqualsArray(long[] exp, long[] was)
+ {
+ assertTrue("Arrays don't match", Arrays.equals(exp, was));
+ }
+
+ private static void assertEqualsArray(float[] exp, float[] was)
+ {
+ assertTrue("Arrays don't match", Arrays.equals(exp, was));
+ }
+
+ private static void assertEqualsArray(double[] exp, double[] was)
+ {
+ assertTrue("Arrays don't match", Arrays.equals(exp, was));
+ }
+
+ /** Removes whitespace text nodes if they have an element sibling.
+ */
+ private static void normalizeWhitspace(Element element, boolean ignoreWhitespace)
+ {
+ boolean hasChildElement = false;
+ ArrayList toDetach = new ArrayList();
+
+ String nodeName = element.getNodeName();
+ NodeList childNodes = element.getChildNodes();
+ for (int i = 0; i < childNodes.getLength(); i++)
+ {
+ Node node = childNodes.item(i);
+ if (node.getNodeType() == Node.TEXT_NODE)
+ {
+ String nodeValue = node.getNodeValue();
+ if (nodeValue.trim().length() == 0)
+ toDetach.add(node);
+ }
+ if (node.getNodeType() == Node.ELEMENT_NODE)
+ {
+ normalizeWhitspace((Element)node, ignoreWhitespace);
+ hasChildElement = true;
+ }
+ }
+
+ // remove whitespace nodes
+ if (hasChildElement || ignoreWhitespace)
+ {
+ Iterator it = toDetach.iterator();
+ while (it.hasNext())
+ {
+ Node node = (Node)it.next();
+ element.removeChild(node);
+ }
+ }
+ }
+}
Property changes on: rest/src/test/java/org/jboss/test/rest/util/RestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: rest/src/test/java/org/jboss/test/rest/util/RestTestHelper.java
===================================================================
--- rest/src/test/java/org/jboss/test/rest/util/RestTestHelper.java (rev 0)
+++ rest/src/test/java/org/jboss/test/rest/util/RestTestHelper.java 2007-11-21 15:23:56 UTC (rev 5095)
@@ -0,0 +1,166 @@
+package org.jboss.test.rest.util;
+
+import org.jboss.logging.Logger;
+import org.jboss.wsf.common.ObjectNameFactory;
+
+import javax.management.MBeanServerConnection;
+import javax.management.ObjectName;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Hashtable;
+
+/**
+ * A JBossWS test helper that deals with test deployment/undeployment, etc.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 14-Oct-2004
+ */
+public class RestTestHelper
+{
+ // provide logging
+ private static Logger log = Logger.getLogger(RestTestHelper.class);
+
+ private static MBeanServerConnection server;
+ private static String integrationTarget;
+
+ /** Deploy the given archive
+ */
+ public void deploy(String archive) throws Exception
+ {
+ URL url = getArchiveURL(archive);
+ getDeployer().deploy(url);
+ }
+
+ /** Undeploy the given archive
+ */
+ public void undeploy(String archive) throws Exception
+ {
+ URL url = getArchiveURL(archive);
+ getDeployer().undeploy(url);
+ }
+
+ /** True, if -Djbossws.integration.target=jboss50x */
+ public boolean isTargetJBoss50()
+ {
+ String target = getIntegrationTarget();
+ return target.startsWith("jboss50");
+ }
+
+ /** True, if -Djbossws.integration.target=jboss42x */
+ public boolean isTargetJBoss42()
+ {
+ String target = getIntegrationTarget();
+ return target.startsWith("jboss42");
+ }
+
+ /** True, if -Djbossws.integration.target=jboss40x */
+ public boolean isTargetJBoss40()
+ {
+ String target = getIntegrationTarget();
+ return target.startsWith("jboss40");
+ }
+
+ /**
+ * Get the JBoss server host from system property "jboss.bind.address"
+ * This defaults to "localhost"
+ */
+ public static String getServerHost()
+ {
+ String hostName = System.getProperty("jboss.bind.address", "localhost");
+ return hostName;
+ }
+
+ public static MBeanServerConnection getServer()
+ {
+ if (server == null)
+ {
+ Hashtable jndiEnv = null;
+ try
+ {
+ InitialContext iniCtx = new InitialContext();
+ jndiEnv = iniCtx.getEnvironment();
+ server = (MBeanServerConnection)iniCtx.lookup("jmx/invoker/RMIAdaptor");
+ }
+ catch (NamingException ex)
+ {
+ throw new RuntimeException("Cannot obtain MBeanServerConnection using jndi props: " + jndiEnv, ex);
+ }
+ }
+ return server;
+ }
+
+ private TestDeployer getDeployer()
+ {
+ return new TestDeployerJBoss(getServer());
+ }
+
+ public String getIntegrationTarget()
+ {
+ if (integrationTarget == null)
+ {
+ integrationTarget = System.getProperty("jbossws.integration.target");
+
+ if (integrationTarget == null)
+ throw new IllegalStateException("Cannot obtain jbossws.integration.target");
+
+ // Read the JBoss SpecificationVersion
+ String jbossVersion = null;
+ try
+ {
+ ObjectName oname = ObjectNameFactory.create("jboss.system:type=ServerConfig");
+ jbossVersion = (String) getServer().getAttribute(oname, "SpecificationVersion");
+ if (jbossVersion.startsWith("5.0"))
+ jbossVersion = "jboss50";
+ else if (jbossVersion.startsWith("4.2"))
+ jbossVersion = "jboss42";
+ else if (jbossVersion.startsWith("4.0"))
+ jbossVersion = "jboss40";
+ else throw new RuntimeException("Unsupported jboss version: " + jbossVersion);
+ }
+ catch (Throwable th)
+ {
+ // ignore, we are not running on jboss-4.2 or greater
+ }
+
+ if (jbossVersion != null && integrationTarget.startsWith(jbossVersion) == false)
+ throw new IllegalStateException("Integration target mismatch, using: " + jbossVersion);
+ }
+ return integrationTarget;
+ }
+
+ /** Try to discover the URL for the deployment archive */
+ public URL getArchiveURL(String archive) throws MalformedURLException
+ {
+ URL url = null;
+ try
+ {
+ url = new URL(archive);
+ }
+ catch (MalformedURLException ignore)
+ {
+ // ignore
+ }
+
+ if (url == null)
+ {
+ File file = new File(archive);
+ if (file.exists())
+ url = file.toURL();
+ }
+
+ if (url == null)
+ {
+ File file = new File("libs/" + archive);
+ if (file.exists())
+ url = file.toURL();
+ }
+
+ if (url == null)
+ throw new IllegalArgumentException("Cannot obtain URL for: " + archive);
+
+ return url;
+ }
+}
Property changes on: rest/src/test/java/org/jboss/test/rest/util/RestTestHelper.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: rest/src/test/java/org/jboss/test/rest/util/RestTestSetup.java
===================================================================
--- rest/src/test/java/org/jboss/test/rest/util/RestTestSetup.java (rev 0)
+++ rest/src/test/java/org/jboss/test/rest/util/RestTestSetup.java 2007-11-21 15:23:56 UTC (rev 5095)
@@ -0,0 +1,115 @@
+package org.jboss.test.rest.util;
+
+import junit.extensions.TestSetup;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import org.jboss.logging.Logger;
+import org.jboss.wsf.test.JBossWSTestHelper;
+
+import javax.management.MBeanServerConnection;
+import javax.naming.NamingException;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.StringTokenizer;
+
+/**
+ * A test setup that deploys/undeploys archives
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 14-Oct-2004
+ */
+public class RestTestSetup extends TestSetup
+{
+ // provide logging
+ private static Logger log = Logger.getLogger(RestTestSetup.class);
+
+ private RestTestHelper delegate = new RestTestHelper();
+
+ private String[] archives = new String[0];
+
+ public RestTestSetup(Class testClass, String archiveList)
+ {
+ super(new TestSuite(testClass));
+ getArchiveArray(archiveList);
+ }
+
+ public RestTestSetup(Test test, String archiveList)
+ {
+ super(test);
+ getArchiveArray(archiveList);
+ }
+
+ public RestTestSetup(Test test)
+ {
+ super(test);
+ }
+
+ private void getArchiveArray(String archiveList)
+ {
+ if (archiveList != null)
+ {
+ StringTokenizer st = new StringTokenizer(archiveList, ", ");
+ archives = new String[st.countTokens()];
+
+ for (int i = 0; i < archives.length; i++)
+ archives[i] = st.nextToken();
+ }
+ }
+
+ protected void setUp() throws Exception
+ {
+ // verify integration target
+ String integrationTarget = delegate.getIntegrationTarget();
+ log.debug("Integration target: " + integrationTarget);
+
+ List clientJars = new ArrayList();
+ for (int i = 0; i < archives.length; i++)
+ {
+ String archive = archives[i];
+ try
+ {
+ delegate.deploy(archive);
+ }
+ catch (Exception ex)
+ {
+ ex.printStackTrace();
+ delegate.undeploy(archive);
+ }
+
+ if (archive.endsWith("-client.jar"))
+ {
+ URL archiveURL = delegate.getArchiveURL(archive);
+ clientJars.add(archiveURL);
+ }
+ }
+
+ // add the client jars to the classloader
+ if (!clientJars.isEmpty())
+ {
+ ClassLoader parent = Thread.currentThread().getContextClassLoader();
+ URL[] urls = new URL[clientJars.size()];
+ for (int i = 0; i < clientJars.size(); i++)
+ {
+ urls[i] = (URL)clientJars.get(i);
+ }
+ URLClassLoader cl = new URLClassLoader(urls, parent);
+ Thread.currentThread().setContextClassLoader(cl);
+ }
+ }
+
+ protected void tearDown() throws Exception
+ {
+ for (int i = 0; i < archives.length; i++)
+ {
+ String archive = archives[archives.length - i - 1];
+ delegate.undeploy(archive);
+ }
+ }
+
+ public MBeanServerConnection getServer() throws NamingException
+ {
+ return delegate.getServer();
+ }
+}
Property changes on: rest/src/test/java/org/jboss/test/rest/util/RestTestSetup.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: rest/src/test/java/org/jboss/test/rest/util/TestDeployer.java
===================================================================
--- rest/src/test/java/org/jboss/test/rest/util/TestDeployer.java (rev 0)
+++ rest/src/test/java/org/jboss/test/rest/util/TestDeployer.java 2007-11-21 15:23:56 UTC (rev 5095)
@@ -0,0 +1,20 @@
+package org.jboss.test.rest.util;
+
+import java.net.URL;
+
+/**
+ * WS test deployer
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 16-May-2006
+ */
+public interface TestDeployer
+{
+ /** Deploy the given archive
+ */
+ void deploy(URL archive) throws Exception;
+
+ /** Undeploy the given archive
+ */
+ void undeploy(URL archive) throws Exception;
+}
Property changes on: rest/src/test/java/org/jboss/test/rest/util/TestDeployer.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: rest/src/test/java/org/jboss/test/rest/util/TestDeployerJBoss.java
===================================================================
--- rest/src/test/java/org/jboss/test/rest/util/TestDeployerJBoss.java (rev 0)
+++ rest/src/test/java/org/jboss/test/rest/util/TestDeployerJBoss.java 2007-11-21 15:23:56 UTC (rev 5095)
@@ -0,0 +1,68 @@
+package org.jboss.test.rest.util;
+
+import javax.management.MBeanServerConnection;
+import javax.management.ObjectName;
+import java.io.Serializable;
+import java.net.URL;
+import java.security.Principal;
+
+/**
+ * A JBossWS test helper that deals with test deployment/undeployment, etc.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 14-Oct-2004
+ */
+public class TestDeployerJBoss implements TestDeployer
+{
+ private static final String MAIN_DEPLOYER = "jboss.system:service=MainDeployer";
+
+ private MBeanServerConnection server;
+ private String username;
+ private String password;
+
+ public TestDeployerJBoss(MBeanServerConnection server)
+ {
+ this.server = server;
+
+ username = System.getProperty("jmx.authentication.username");
+ if ("${jmx.authentication.username}".equals(username))
+ username = null;
+
+ password = System.getProperty("jmx.authentication.password");
+ if ("${jmx.authentication.password}".equals(password))
+ password = null;
+ }
+
+ public void deploy(URL url) throws Exception
+ {
+ invokeMainDeployer("deploy", url);
+ }
+
+ public void undeploy(URL url) throws Exception
+ {
+ invokeMainDeployer("undeploy", url);
+ }
+
+ private void invokeMainDeployer(String methodName, URL url) throws Exception
+ {
+ server.invoke(new ObjectName(MAIN_DEPLOYER), methodName,
+ new Object[] { url }, new String[] { "java.net.URL" }
+ );
+
+ }
+
+ public static class SimplePrincipal implements Principal, Serializable
+ {
+ private String name;
+
+ public SimplePrincipal(String name)
+ {
+ this.name = name;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+ }
+}
Property changes on: rest/src/test/java/org/jboss/test/rest/util/TestDeployerJBoss.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: rest/src/test/resources/rest/deployment/jbossrs.xml
===================================================================
--- rest/src/test/resources/rest/deployment/jbossrs.xml (rev 0)
+++ rest/src/test/resources/rest/deployment/jbossrs.xml 2007-11-21 15:23:56 UTC (rev 5095)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+
+<jbossrs xmlns="http://org.jboss.rest/">
+ <resource>
+ <name>Widget</name>
+ <implementation>org.jboss.test.rest.WidgetList</implementation>
+ </resource>
+</jbossrs>
Property changes on: rest/src/test/resources/rest/deployment/jbossrs.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: rest/src/test/resources/rest/deployment/web.xml
===================================================================
--- rest/src/test/resources/rest/deployment/web.xml (rev 0)
+++ rest/src/test/resources/rest/deployment/web.xml 2007-11-21 15:23:56 UTC (rev 5095)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app 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"
+ version="2.4">
+
+ <servlet>
+ <servlet-name>JBossRS</servlet-name>
+ <servlet-class>org.jboss.rest.container.wsf.ResourceServlet</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>JBossRS</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+
+</web-app>
+
Property changes on: rest/src/test/resources/rest/deployment/web.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: rest/src/test/resources/rest/media/jbossrs.xml
===================================================================
--- rest/src/test/resources/rest/media/jbossrs.xml (rev 0)
+++ rest/src/test/resources/rest/media/jbossrs.xml 2007-11-21 15:23:56 UTC (rev 5095)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+
+<jbossrs xmlns="http://org.jboss.rest/">
+ <resource>
+ <name>BookStore</name>
+ <implementation>org.jboss.test.rest.media.BookStoreResource</implementation>
+ </resource>
+</jbossrs>
Property changes on: rest/src/test/resources/rest/media/jbossrs.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: rest/src/test/resources/rest/media/web.xml
===================================================================
--- rest/src/test/resources/rest/media/web.xml (rev 0)
+++ rest/src/test/resources/rest/media/web.xml 2007-11-21 15:23:56 UTC (rev 5095)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app 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"
+ version="2.4">
+
+ <servlet>
+ <servlet-name>JBossRS</servlet-name>
+ <servlet-class>org.jboss.rest.container.wsf.ResourceServlet</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>JBossRS</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+
+</web-app>
+
Property changes on: rest/src/test/resources/rest/media/web.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: rest/src/test-framework/ant-import/build-testsuite.xml
===================================================================
--- rest/src/test-framework/ant-import/build-testsuite.xml 2007-11-21 12:01:29 UTC (rev 5094)
+++ rest/src/test-framework/ant-import/build-testsuite.xml 2007-11-21 15:23:56 UTC (rev 5095)
@@ -144,11 +144,13 @@
<pathelement location="${jboss.client}/jaxb-impl.jar"/>
<pathelement location="${jboss.client}/jaxb-xjc.jar"/>
<pathelement location="${jboss.client}/jboss-metadata.jar"/>
+ <pathelement location="${jboss.client}/jboss-logging-spi.jar"/>
<pathelement location="${jboss.client}/log4j.jar"/>
<pathelement location="${jboss.client}/mail.jar"/>
<pathelement location="${jboss.client}/stax-api.jar"/>
<pathelement location="${jboss.lib}/jboss-vfs.jar"/>
<pathelement location="${jboss.server.lib}/jboss.jar"/>
+ <pathelement location="${jboss.client}/jbossall-client.jar"/>
<pathelement location="${jboss.server.lib}/jbosssx.jar"/>
</path>
</target>
16 years, 5 months
JBossWS SVN: r5094 - in rest: src/main/java/org/jboss/rs/deployment and 12 other directories.
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2007-11-21 07:01:29 -0500 (Wed, 21 Nov 2007)
New Revision: 5094
Modified:
rest/jboss-rest.iws
rest/src/main/java/org/jboss/rs/deployment/ModelDeploymentAspect.java
rest/src/main/java/org/jboss/rs/deployment/ResourceServlet.java
rest/src/main/java/org/jboss/rs/media/ContentNegotiation.java
rest/src/main/java/org/jboss/rs/media/DefaultContentNegotiation.java
rest/src/main/java/org/jboss/rs/media/DefaultProviderFactory.java
rest/src/main/java/org/jboss/rs/media/xml/JAXBProvider.java
rest/src/main/java/org/jboss/rs/model/AbstractRegexResolveable.java
rest/src/main/java/org/jboss/rs/model/AbstractResourceOperation.java
rest/src/main/java/org/jboss/rs/model/OperationBinding.java
rest/src/main/java/org/jboss/rs/model/ParameterBinding.java
rest/src/main/java/org/jboss/rs/model/dd/DeploymentDescriptorParser.java
rest/src/main/java/org/jboss/rs/model/dd/JbossrsType.java
rest/src/main/java/org/jboss/rs/runtime/ContextAdapterBuilder.java
rest/src/main/java/org/jboss/rs/runtime/Invocation.java
rest/src/main/java/org/jboss/rs/runtime/InvocationMediator.java
rest/src/main/java/org/jboss/rs/runtime/RuntimeContext.java
rest/src/main/java/org/jboss/rs/util/Convert.java
rest/src/test/java/org/jboss/test/rs/Widget.java
rest/src/test/java/org/jboss/test/rs/WidgetList.java
rest/src/test/java/org/jboss/test/rs/deployment/DeploymentTestCase.java
rest/src/test/java/org/jboss/test/rs/invocation/InvocationBuilderTestCase.java
rest/src/test/java/org/jboss/test/rs/media/BookResource.java
rest/src/test/java/org/jboss/test/rs/media/BookStoreResource.java
rest/src/test/java/org/jboss/test/rs/model/ModelParserTestCase.java
rest/src/test/java/org/jboss/test/rs/model/ResolverTestCase.java
rest/src/test/java/org/jboss/test/rs/model/RunRegex.java
rest/src/test/java/org/jboss/test/rs/runtime/RuntimeContextTestCase.java
rest/version.properties.md5
Log:
Optimize imports
Modified: rest/jboss-rest.iws
===================================================================
--- rest/jboss-rest.iws 2007-11-21 11:57:05 UTC (rev 5093)
+++ rest/jboss-rest.iws 2007-11-21 12:01:29 UTC (rev 5094)
@@ -131,69 +131,17 @@
<component name="FavoritesProjectViewPane" />
<component name="FileEditorManager">
<leaf>
- <file leaf-file-name="build-deploy.xml" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/ant-import/build-deploy.xml">
+ <file leaf-file-name="ModelDeploymentAspect.java" pinned="false" current="true" current-in-tab="true">
+ <entry file="file://$PROJECT_DIR$/src/main/java/org/jboss/rs/deployment/ModelDeploymentAspect.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="14" column="2" selection-start="775" selection-end="775" vertical-scroll-proportion="0.3">
- <folding />
+ <state line="31" column="50" selection-start="1412" selection-end="1412" vertical-scroll-proportion="0.38348624">
+ <folding>
+ <element signature="imports" expanded="true" />
+ </folding>
</state>
</provider>
</entry>
</file>
- <file leaf-file-name="build-testsuite.xml" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/ant-import-tests/build-testsuite.xml">
- <provider selected="true" editor-type-id="text-editor">
- <state line="50" column="56" selection-start="2237" selection-end="2252" vertical-scroll-proportion="0.33211008">
- <folding />
- </state>
- </provider>
- </entry>
- </file>
- <file leaf-file-name="build-testsuite.xml" pinned="false" current="true" current-in-tab="true">
- <entry file="file://$PROJECT_DIR$/src/test-framework/ant-import/build-testsuite.xml">
- <provider selected="true" editor-type-id="text-editor">
- <state line="126" column="57" selection-start="5771" selection-end="5771" vertical-scroll-proportion="0.4754717">
- <folding />
- </state>
- </provider>
- </entry>
- </file>
- <file leaf-file-name="macros-deploy-rs.xml" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/ant-import/macros-deploy-rs.xml">
- <provider selected="true" editor-type-id="text-editor">
- <state line="428" column="52" selection-start="18146" selection-end="18146" vertical-scroll-proportion="0.5471698">
- <folding />
- </state>
- </provider>
- </entry>
- </file>
- <file leaf-file-name="build-thirdparty.xml" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/ant-import/build-thirdparty.xml">
- <provider selected="true" editor-type-id="text-editor">
- <state line="90" column="75" selection-start="6631" selection-end="6631" vertical-scroll-proportion="0.83773583">
- <folding />
- </state>
- </provider>
- </entry>
- </file>
- <file leaf-file-name="version.properties" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/version.properties">
- <provider selected="true" editor-type-id="text-editor">
- <state line="35" column="15" selection-start="913" selection-end="913" vertical-scroll-proportion="0.7816514">
- <folding />
- </state>
- </provider>
- </entry>
- </file>
- <file leaf-file-name="ResourceServlet.java" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/src/main/java/org/jboss/rs/deployment/ResourceServlet.java">
- <provider selected="true" editor-type-id="text-editor">
- <state line="60" column="60" selection-start="2401" selection-end="2401" vertical-scroll-proportion="0.59266055">
- <folding />
- </state>
- </provider>
- </entry>
- </file>
</leaf>
</component>
<component name="FindManager">
@@ -322,10 +270,6 @@
<option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test-framework" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
@@ -345,13 +289,9 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test-framework" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test-framework/ant-import" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
@@ -371,39 +311,17 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
- </PATH>
- <PATH>
<PATH_ELEMENT>
- <option name="myItemId" value="jboss-rest.ipr" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="jboss-rest" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/java" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/java/org/jboss/rs" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test/java" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test/java/org/jboss/test/rs" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
@@ -422,40 +340,20 @@
<option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
- </PATH>
- <PATH>
<PATH_ELEMENT>
- <option name="myItemId" value="jboss-rest.ipr" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="jboss-rest" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/ant-import-tests" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/java" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
- </PATH>
- <PATH>
<PATH_ELEMENT>
- <option name="myItemId" value="jboss-rest.ipr" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="jboss-rest" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/java/org/jboss/rs" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/ant-import" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/java/org/jboss/rs/deployment" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
@@ -774,48 +672,57 @@
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/ant-import/build-thirdparty.xml">
+ <entry file="file://$PROJECT_DIR$/ant-import-tests/build-testsuite.xml">
<provider selected="true" editor-type-id="text-editor">
- <state line="90" column="75" selection-start="6631" selection-end="6631" vertical-scroll-proportion="0.83773583">
+ <state line="50" column="56" selection-start="2237" selection-end="2252" vertical-scroll-proportion="0.33211008">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/src/main/java/org/jboss/rs/deployment/ResourceServlet.java">
+ <entry file="file://$PROJECT_DIR$/src/test-framework/ant-import/build-testsuite.xml">
<provider selected="true" editor-type-id="text-editor">
- <state line="60" column="60" selection-start="2401" selection-end="2401" vertical-scroll-proportion="0.59266055">
+ <state line="126" column="57" selection-start="5768" selection-end="5768" vertical-scroll-proportion="0.4754717">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/version.properties">
+ <entry file="file://$PROJECT_DIR$/ant-import/macros-deploy-rs.xml">
<provider selected="true" editor-type-id="text-editor">
- <state line="35" column="15" selection-start="913" selection-end="913" vertical-scroll-proportion="0.7816514">
+ <state line="428" column="18" selection-start="18143" selection-end="18143" vertical-scroll-proportion="0.5471698">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/ant-import-tests/build-testsuite.xml">
+ <entry file="file://$PROJECT_DIR$/ant-import/build-thirdparty.xml">
<provider selected="true" editor-type-id="text-editor">
- <state line="50" column="56" selection-start="2237" selection-end="2252" vertical-scroll-proportion="0.33211008">
+ <state line="90" column="68" selection-start="6631" selection-end="6631" vertical-scroll-proportion="0.83773583">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/ant-import/macros-deploy-rs.xml">
+ <entry file="file://$PROJECT_DIR$/version.properties">
<provider selected="true" editor-type-id="text-editor">
- <state line="428" column="52" selection-start="18146" selection-end="18146" vertical-scroll-proportion="0.5471698">
+ <state line="35" column="15" selection-start="905" selection-end="905" vertical-scroll-proportion="0.7816514">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/src/test-framework/ant-import/build-testsuite.xml">
+ <entry file="file://$PROJECT_DIR$/src/main/java/org/jboss/rs/deployment/ResourceServlet.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="126" column="57" selection-start="5771" selection-end="5771" vertical-scroll-proportion="0.4754717">
+ <state line="60" column="60" selection-start="2401" selection-end="2401" vertical-scroll-proportion="0.59266055">
<folding />
</state>
</provider>
</entry>
+ <entry file="file://$PROJECT_DIR$/src/main/java/org/jboss/rs/deployment/ModelDeploymentAspect.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="31" column="50" selection-start="1412" selection-end="1412" vertical-scroll-proportion="0.38348624">
+ <folding>
+ <element signature="imports" expanded="true" />
+ </folding>
+ </state>
+ </provider>
+ </entry>
</component>
</project>
Modified: rest/src/main/java/org/jboss/rs/deployment/ModelDeploymentAspect.java
===================================================================
--- rest/src/main/java/org/jboss/rs/deployment/ModelDeploymentAspect.java 2007-11-21 11:57:05 UTC (rev 5093)
+++ rest/src/main/java/org/jboss/rs/deployment/ModelDeploymentAspect.java 2007-11-21 12:01:29 UTC (rev 5094)
@@ -21,18 +21,15 @@
*/
package org.jboss.rs.deployment;
-import org.jboss.wsf.spi.deployment.DeploymentAspect;
-import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.deployment.Service;
-import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.rs.model.ResourceModelParser;
-import org.jboss.rs.model.ResourceModel;
import org.jboss.rs.ResourceRegistry;
import org.jboss.rs.ResourceRegistryFactory;
+import org.jboss.rs.model.ResourceModel;
+import org.jboss.rs.model.ResourceModelParser;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.DeploymentAspect;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.deployment.Service;
-import java.util.List;
-import java.util.ArrayList;
-
/**
* @author Heiko.Braun(a)jboss.com
* @version $Revision$
Modified: rest/src/main/java/org/jboss/rs/deployment/ResourceServlet.java
===================================================================
--- rest/src/main/java/org/jboss/rs/deployment/ResourceServlet.java 2007-11-21 11:57:05 UTC (rev 5093)
+++ rest/src/main/java/org/jboss/rs/deployment/ResourceServlet.java 2007-11-21 12:01:29 UTC (rev 5094)
@@ -21,6 +21,7 @@
*/
package org.jboss.rs.deployment;
+import org.jboss.logging.Logger;
import org.jboss.rs.MethodHTTP;
import org.jboss.rs.ResourceError;
import org.jboss.rs.ResourceRegistry;
@@ -29,19 +30,18 @@
import org.jboss.rs.model.ResourceModel;
import org.jboss.rs.runtime.InvocationMediator;
import org.jboss.rs.runtime.RuntimeContext;
-import org.jboss.logging.Logger;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.ext.MessageBodyWriter;
import javax.ws.rs.ext.ProviderFactory;
-import javax.ws.rs.ext.MessageBodyWriter;
-import javax.ws.rs.core.Response;
import java.io.IOException;
+import java.io.OutputStream;
import java.io.PrintWriter;
-import java.io.OutputStream;
import java.net.URI;
import java.util.ArrayList;
import java.util.List;
Modified: rest/src/main/java/org/jboss/rs/media/ContentNegotiation.java
===================================================================
--- rest/src/main/java/org/jboss/rs/media/ContentNegotiation.java 2007-11-21 11:57:05 UTC (rev 5093)
+++ rest/src/main/java/org/jboss/rs/media/ContentNegotiation.java 2007-11-21 12:01:29 UTC (rev 5094)
@@ -21,9 +21,9 @@
*/
package org.jboss.rs.media;
+import org.jboss.rs.model.NoMethodException;
+import org.jboss.rs.model.ResourceMatch;
import org.jboss.rs.model.ResourceMethod;
-import org.jboss.rs.model.ResourceMatch;
-import org.jboss.rs.model.NoMethodException;
import org.jboss.rs.runtime.RuntimeContext;
import java.util.List;
Modified: rest/src/main/java/org/jboss/rs/media/DefaultContentNegotiation.java
===================================================================
--- rest/src/main/java/org/jboss/rs/media/DefaultContentNegotiation.java 2007-11-21 11:57:05 UTC (rev 5093)
+++ rest/src/main/java/org/jboss/rs/media/DefaultContentNegotiation.java 2007-11-21 12:01:29 UTC (rev 5094)
@@ -21,16 +21,16 @@
*/
package org.jboss.rs.media;
+import org.jboss.logging.Logger;
+import org.jboss.rs.MethodHTTP;
+import org.jboss.rs.model.NoMethodException;
+import org.jboss.rs.model.ResourceMatch;
import org.jboss.rs.model.ResourceMethod;
-import org.jboss.rs.model.ResourceMatch;
-import org.jboss.rs.model.NoMethodException;
import org.jboss.rs.runtime.RuntimeContext;
-import org.jboss.rs.MethodHTTP;
-import org.jboss.logging.Logger;
import javax.activation.MimeType;
+import java.util.ArrayList;
import java.util.List;
-import java.util.ArrayList;
/**
* Matches resource methods in the following order:
Modified: rest/src/main/java/org/jboss/rs/media/DefaultProviderFactory.java
===================================================================
--- rest/src/main/java/org/jboss/rs/media/DefaultProviderFactory.java 2007-11-21 11:57:05 UTC (rev 5093)
+++ rest/src/main/java/org/jboss/rs/media/DefaultProviderFactory.java 2007-11-21 12:01:29 UTC (rev 5094)
@@ -1,15 +1,15 @@
package org.jboss.rs.media;
+import org.jboss.rs.media.simple.StringProvider;
import org.jboss.rs.media.xml.JAXBProvider;
-import org.jboss.rs.media.simple.StringProvider;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.ext.HeaderProvider;
import javax.ws.rs.ext.MessageBodyReader;
import javax.ws.rs.ext.MessageBodyWriter;
import javax.ws.rs.ext.ProviderFactory;
+import java.util.ArrayList;
import java.util.List;
-import java.util.ArrayList;
/**
Modified: rest/src/main/java/org/jboss/rs/media/xml/JAXBProvider.java
===================================================================
--- rest/src/main/java/org/jboss/rs/media/xml/JAXBProvider.java 2007-11-21 11:57:05 UTC (rev 5093)
+++ rest/src/main/java/org/jboss/rs/media/xml/JAXBProvider.java 2007-11-21 12:01:29 UTC (rev 5094)
@@ -5,8 +5,8 @@
import javax.ws.rs.ext.MessageBodyReader;
import javax.ws.rs.ext.MessageBodyWriter;
import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBElement;
import javax.xml.bind.JAXBException;
-import javax.xml.bind.JAXBElement;
import javax.xml.bind.annotation.XmlRootElement;
import java.io.IOException;
import java.io.InputStream;
Modified: rest/src/main/java/org/jboss/rs/model/AbstractRegexResolveable.java
===================================================================
--- rest/src/main/java/org/jboss/rs/model/AbstractRegexResolveable.java 2007-11-21 11:57:05 UTC (rev 5093)
+++ rest/src/main/java/org/jboss/rs/model/AbstractRegexResolveable.java 2007-11-21 12:01:29 UTC (rev 5094)
@@ -22,8 +22,8 @@
package org.jboss.rs.model;
import java.util.StringTokenizer;
+import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import java.util.regex.Matcher;
/**
* @author Heiko.Braun(a)jboss.com
Modified: rest/src/main/java/org/jboss/rs/model/AbstractResourceOperation.java
===================================================================
--- rest/src/main/java/org/jboss/rs/model/AbstractResourceOperation.java 2007-11-21 11:57:05 UTC (rev 5093)
+++ rest/src/main/java/org/jboss/rs/model/AbstractResourceOperation.java 2007-11-21 12:01:29 UTC (rev 5094)
@@ -1,8 +1,8 @@
package org.jboss.rs.model;
+import java.lang.reflect.Method;
+import java.util.HashMap;
import java.util.Map;
-import java.util.HashMap;
-import java.lang.reflect.Method;
/**
* Common base class for {@link org.jboss.rs.model.ResourceLocator}
Modified: rest/src/main/java/org/jboss/rs/model/OperationBinding.java
===================================================================
--- rest/src/main/java/org/jboss/rs/model/OperationBinding.java 2007-11-21 11:57:05 UTC (rev 5093)
+++ rest/src/main/java/org/jboss/rs/model/OperationBinding.java 2007-11-21 12:01:29 UTC (rev 5094)
@@ -21,8 +21,8 @@
*/
package org.jboss.rs.model;
+import org.jboss.rs.runtime.Invocation;
import org.jboss.rs.runtime.InvocationModel;
-import org.jboss.rs.runtime.Invocation;
import java.lang.reflect.Method;
Modified: rest/src/main/java/org/jboss/rs/model/ParameterBinding.java
===================================================================
--- rest/src/main/java/org/jboss/rs/model/ParameterBinding.java 2007-11-21 11:57:05 UTC (rev 5093)
+++ rest/src/main/java/org/jboss/rs/model/ParameterBinding.java 2007-11-21 12:01:29 UTC (rev 5094)
@@ -21,11 +21,11 @@
*/
package org.jboss.rs.model;
+import org.jboss.rs.MethodHTTP;
+import org.jboss.rs.runtime.ContextAdapterBuilder;
import org.jboss.rs.runtime.Invocation;
import org.jboss.rs.runtime.InvocationModel;
import org.jboss.rs.runtime.RuntimeContext;
-import org.jboss.rs.runtime.ContextAdapterBuilder;
-import org.jboss.rs.MethodHTTP;
import javax.ws.rs.HeaderParam;
import javax.ws.rs.UriParam;
Modified: rest/src/main/java/org/jboss/rs/model/dd/DeploymentDescriptorParser.java
===================================================================
--- rest/src/main/java/org/jboss/rs/model/dd/DeploymentDescriptorParser.java 2007-11-21 11:57:05 UTC (rev 5093)
+++ rest/src/main/java/org/jboss/rs/model/dd/DeploymentDescriptorParser.java 2007-11-21 12:01:29 UTC (rev 5094)
@@ -23,14 +23,10 @@
import com.sun.xml.bind.v2.runtime.JAXBContextImpl;
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.bind.Marshaller;
+import javax.xml.bind.*;
import javax.xml.namespace.QName;
-import java.io.InputStream;
import java.io.IOException;
+import java.io.InputStream;
import java.io.OutputStream;
/**
Modified: rest/src/main/java/org/jboss/rs/model/dd/JbossrsType.java
===================================================================
--- rest/src/main/java/org/jboss/rs/model/dd/JbossrsType.java 2007-11-21 11:57:05 UTC (rev 5093)
+++ rest/src/main/java/org/jboss/rs/model/dd/JbossrsType.java 2007-11-21 12:01:29 UTC (rev 5094)
@@ -8,12 +8,12 @@
package org.jboss.rs.model.dd;
-import java.util.ArrayList;
-import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
+import java.util.ArrayList;
+import java.util.List;
/**
Modified: rest/src/main/java/org/jboss/rs/runtime/ContextAdapterBuilder.java
===================================================================
--- rest/src/main/java/org/jboss/rs/runtime/ContextAdapterBuilder.java 2007-11-21 11:57:05 UTC (rev 5093)
+++ rest/src/main/java/org/jboss/rs/runtime/ContextAdapterBuilder.java 2007-11-21 12:01:29 UTC (rev 5094)
@@ -21,15 +21,9 @@
*/
package org.jboss.rs.runtime;
-import javax.ws.rs.core.HttpHeaders;
-import javax.ws.rs.core.UriInfo;
-import javax.ws.rs.core.PathSegment;
-import javax.ws.rs.core.UriBuilder;
-import javax.ws.rs.core.MultivaluedMap;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Cookie;
-import java.util.List;
+import javax.ws.rs.core.*;
import java.net.URI;
+import java.util.List;
/**
* Adopts 311 runtime interfaces to an internal runtime context.<br>
Modified: rest/src/main/java/org/jboss/rs/runtime/Invocation.java
===================================================================
--- rest/src/main/java/org/jboss/rs/runtime/Invocation.java 2007-11-21 11:57:05 UTC (rev 5093)
+++ rest/src/main/java/org/jboss/rs/runtime/Invocation.java 2007-11-21 12:01:29 UTC (rev 5094)
@@ -21,9 +21,9 @@
*/
package org.jboss.rs.runtime;
+import java.lang.reflect.Method;
+import java.util.LinkedList;
import java.util.List;
-import java.util.LinkedList;
-import java.lang.reflect.Method;
/**
* The visitor part of the pattern.
Modified: rest/src/main/java/org/jboss/rs/runtime/InvocationMediator.java
===================================================================
--- rest/src/main/java/org/jboss/rs/runtime/InvocationMediator.java 2007-11-21 11:57:05 UTC (rev 5093)
+++ rest/src/main/java/org/jboss/rs/runtime/InvocationMediator.java 2007-11-21 12:01:29 UTC (rev 5094)
@@ -1,9 +1,9 @@
package org.jboss.rs.runtime;
+import org.jboss.rs.ResourceError;
import org.jboss.rs.model.ResourceLocator;
+import org.jboss.rs.model.ResourceMethod;
import org.jboss.rs.model.StatefulResourceResolver;
-import org.jboss.rs.model.ResourceMethod;
-import org.jboss.rs.ResourceError;
import java.util.Stack;
Modified: rest/src/main/java/org/jboss/rs/runtime/RuntimeContext.java
===================================================================
--- rest/src/main/java/org/jboss/rs/runtime/RuntimeContext.java 2007-11-21 11:57:05 UTC (rev 5093)
+++ rest/src/main/java/org/jboss/rs/runtime/RuntimeContext.java 2007-11-21 12:01:29 UTC (rev 5094)
@@ -28,10 +28,8 @@
import javax.activation.MimeType;
import javax.activation.MimeTypeParseException;
import java.net.URI;
-import java.net.URL;
import java.util.ArrayList;
import java.util.List;
-import java.util.Stack;
/**
* Requesting a resource thorugh HTTP creates a runtime context<br>
Modified: rest/src/main/java/org/jboss/rs/util/Convert.java
===================================================================
--- rest/src/main/java/org/jboss/rs/util/Convert.java 2007-11-21 11:57:05 UTC (rev 5093)
+++ rest/src/main/java/org/jboss/rs/util/Convert.java 2007-11-21 12:01:29 UTC (rev 5094)
@@ -23,15 +23,14 @@
import org.jboss.rs.MethodHTTP;
-import javax.ws.rs.HttpMethod;
-import javax.ws.rs.ConsumeMime;
-import javax.ws.rs.ProduceMime;
import javax.activation.MimeType;
import javax.activation.MimeTypeParseException;
-import java.lang.annotation.Annotation;
+import javax.ws.rs.ConsumeMime;
+import javax.ws.rs.HttpMethod;
+import javax.ws.rs.ProduceMime;
import java.lang.reflect.Method;
-import java.util.List;
import java.util.ArrayList;
+import java.util.List;
import java.util.StringTokenizer;
/**
Modified: rest/src/test/java/org/jboss/test/rs/Widget.java
===================================================================
--- rest/src/test/java/org/jboss/test/rs/Widget.java 2007-11-21 11:57:05 UTC (rev 5093)
+++ rest/src/test/java/org/jboss/test/rs/Widget.java 2007-11-21 12:01:29 UTC (rev 5094)
@@ -22,11 +22,11 @@
package org.jboss.test.rs;
import javax.ws.rs.HttpMethod;
+import javax.ws.rs.ProduceMime;
import javax.ws.rs.UriParam;
import javax.ws.rs.UriTemplate;
-import javax.ws.rs.ProduceMime;
+import java.util.ArrayList;
import java.util.List;
-import java.util.ArrayList;
/**
* @author Heiko.Braun(a)jboss.com
Modified: rest/src/test/java/org/jboss/test/rs/WidgetList.java
===================================================================
--- rest/src/test/java/org/jboss/test/rs/WidgetList.java 2007-11-21 11:57:05 UTC (rev 5093)
+++ rest/src/test/java/org/jboss/test/rs/WidgetList.java 2007-11-21 12:01:29 UTC (rev 5094)
@@ -21,11 +21,7 @@
*/
package org.jboss.test.rs;
-import javax.ws.rs.HttpMethod;
-import javax.ws.rs.UriParam;
-import javax.ws.rs.UriTemplate;
-import javax.ws.rs.ConsumeMime;
-import javax.ws.rs.ProduceMime;
+import javax.ws.rs.*;
import javax.ws.rs.core.HttpContext;
import javax.ws.rs.core.HttpHeaders;
Modified: rest/src/test/java/org/jboss/test/rs/deployment/DeploymentTestCase.java
===================================================================
--- rest/src/test/java/org/jboss/test/rs/deployment/DeploymentTestCase.java 2007-11-21 11:57:05 UTC (rev 5093)
+++ rest/src/test/java/org/jboss/test/rs/deployment/DeploymentTestCase.java 2007-11-21 12:01:29 UTC (rev 5094)
@@ -21,16 +21,15 @@
*/
package org.jboss.test.rs.deployment;
+import junit.framework.Test;
import org.jboss.wsf.test.JBossWSTest;
import org.jboss.wsf.test.JBossWSTestSetup;
-import junit.framework.Test;
-import java.net.URL;
-import java.net.URLConnection;
-import java.net.HttpURLConnection;
-import java.io.OutputStreamWriter;
import java.io.BufferedReader;
import java.io.InputStreamReader;
+import java.io.OutputStreamWriter;
+import java.net.HttpURLConnection;
+import java.net.URL;
/**
* @author Heiko.Braun(a)jboss.com
Modified: rest/src/test/java/org/jboss/test/rs/invocation/InvocationBuilderTestCase.java
===================================================================
--- rest/src/test/java/org/jboss/test/rs/invocation/InvocationBuilderTestCase.java 2007-11-21 11:57:05 UTC (rev 5093)
+++ rest/src/test/java/org/jboss/test/rs/invocation/InvocationBuilderTestCase.java 2007-11-21 12:01:29 UTC (rev 5094)
@@ -22,16 +22,16 @@
package org.jboss.test.rs.invocation;
import junit.framework.TestCase;
+import org.jboss.rs.MethodHTTP;
import org.jboss.rs.ResourceRegistry;
-import org.jboss.rs.MethodHTTP;
+import org.jboss.rs.model.*;
import org.jboss.rs.runtime.*;
-import org.jboss.rs.model.*;
import org.jboss.test.rs.WidgetList;
import javax.ws.rs.core.HttpHeaders;
+import java.net.URI;
import java.util.List;
import java.util.Stack;
-import java.net.URI;
/**
* @author Heiko.Braun(a)jboss.com
Modified: rest/src/test/java/org/jboss/test/rs/media/BookResource.java
===================================================================
--- rest/src/test/java/org/jboss/test/rs/media/BookResource.java 2007-11-21 11:57:05 UTC (rev 5093)
+++ rest/src/test/java/org/jboss/test/rs/media/BookResource.java 2007-11-21 12:01:29 UTC (rev 5094)
@@ -1,9 +1,9 @@
package org.jboss.test.rs.media;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlElement;
import javax.ws.rs.HttpMethod;
import javax.ws.rs.UriTemplate;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement(name = "book")
public class BookResource
Modified: rest/src/test/java/org/jboss/test/rs/media/BookStoreResource.java
===================================================================
--- rest/src/test/java/org/jboss/test/rs/media/BookStoreResource.java 2007-11-21 11:57:05 UTC (rev 5093)
+++ rest/src/test/java/org/jboss/test/rs/media/BookStoreResource.java 2007-11-21 12:01:29 UTC (rev 5094)
@@ -1,11 +1,11 @@
package org.jboss.test.rs.media;
-import javax.ws.rs.UriTemplate;
import javax.ws.rs.HttpMethod;
+import javax.ws.rs.ProduceMime;
import javax.ws.rs.UriParam;
-import javax.ws.rs.ProduceMime;
+import javax.ws.rs.UriTemplate;
+import java.util.ArrayList;
import java.util.List;
-import java.util.ArrayList;
@UriTemplate("books")
public class BookStoreResource
Modified: rest/src/test/java/org/jboss/test/rs/model/ModelParserTestCase.java
===================================================================
--- rest/src/test/java/org/jboss/test/rs/model/ModelParserTestCase.java 2007-11-21 11:57:05 UTC (rev 5093)
+++ rest/src/test/java/org/jboss/test/rs/model/ModelParserTestCase.java 2007-11-21 12:01:29 UTC (rev 5094)
@@ -22,10 +22,10 @@
package org.jboss.test.rs.model;
import junit.framework.TestCase;
+import org.jboss.rs.MethodHTTP;
+import org.jboss.rs.model.ResourceMethod;
+import org.jboss.rs.model.ResourceModel;
import org.jboss.rs.model.ResourceModelParser;
-import org.jboss.rs.model.ResourceModel;
-import org.jboss.rs.model.ResourceMethod;
-import org.jboss.rs.MethodHTTP;
import org.jboss.test.rs.WidgetList;
/**
Modified: rest/src/test/java/org/jboss/test/rs/model/ResolverTestCase.java
===================================================================
--- rest/src/test/java/org/jboss/test/rs/model/ResolverTestCase.java 2007-11-21 11:57:05 UTC (rev 5093)
+++ rest/src/test/java/org/jboss/test/rs/model/ResolverTestCase.java 2007-11-21 12:01:29 UTC (rev 5094)
@@ -22,18 +22,18 @@
package org.jboss.test.rs.model;
import junit.framework.TestCase;
+import org.jboss.rs.MethodHTTP;
import org.jboss.rs.ResourceRegistry;
-import org.jboss.rs.MethodHTTP;
-import org.jboss.rs.runtime.RuntimeContext;
+import org.jboss.rs.model.ResourceMethod;
import org.jboss.rs.model.ResourceModel;
import org.jboss.rs.model.ResourceModelParser;
import org.jboss.rs.model.StatefulResourceResolver;
-import org.jboss.rs.model.ResourceMethod;
+import org.jboss.rs.runtime.RuntimeContext;
import org.jboss.test.rs.WidgetList;
-import java.util.List;
import java.lang.reflect.Method;
import java.net.URI;
+import java.util.List;
/**
* @author Heiko.Braun(a)jboss.com
Modified: rest/src/test/java/org/jboss/test/rs/model/RunRegex.java
===================================================================
--- rest/src/test/java/org/jboss/test/rs/model/RunRegex.java 2007-11-21 11:57:05 UTC (rev 5093)
+++ rest/src/test/java/org/jboss/test/rs/model/RunRegex.java 2007-11-21 12:01:29 UTC (rev 5094)
@@ -21,9 +21,9 @@
*/
package org.jboss.test.rs.model;
+import java.net.URI;
+import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import java.util.regex.Matcher;
-import java.net.URI;
/**
* @author Heiko.Braun(a)jboss.com
Modified: rest/src/test/java/org/jboss/test/rs/runtime/RuntimeContextTestCase.java
===================================================================
--- rest/src/test/java/org/jboss/test/rs/runtime/RuntimeContextTestCase.java 2007-11-21 11:57:05 UTC (rev 5093)
+++ rest/src/test/java/org/jboss/test/rs/runtime/RuntimeContextTestCase.java 2007-11-21 12:01:29 UTC (rev 5094)
@@ -1,9 +1,9 @@
package org.jboss.test.rs.runtime;
import junit.framework.TestCase;
-import org.jboss.rs.runtime.RuntimeContext;
import org.jboss.rs.MethodHTTP;
import org.jboss.rs.model.ResourceModel;
+import org.jboss.rs.runtime.RuntimeContext;
import java.net.URI;
import java.util.ArrayList;
Modified: rest/version.properties.md5
===================================================================
--- rest/version.properties.md5 2007-11-21 11:57:05 UTC (rev 5093)
+++ rest/version.properties.md5 2007-11-21 12:01:29 UTC (rev 5094)
@@ -1 +1 @@
-8526df8f198ffe8c905ea1e9c1d5da0e
+9040a6b26e3d736e1c41bc57a0f219d8
16 years, 5 months
JBossWS SVN: r5093 - rest.
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2007-11-21 06:57:05 -0500 (Wed, 21 Nov 2007)
New Revision: 5093
Modified:
rest/version.properties
Log:
Project name and id
Modified: rest/version.properties
===================================================================
--- rest/version.properties 2007-11-21 11:56:10 UTC (rev 5092)
+++ rest/version.properties 2007-11-21 11:57:05 UTC (rev 5093)
@@ -1,14 +1,14 @@
# $Id: version.properties 5074 2007-11-20 14:05:33Z heiko.braun(a)jboss.com $
-specification.title=JBossWS
+specification.title=JBossRS
specification.vendor=JBoss (http://www.jboss.org)
-specification.version=jbossws-2.0
+specification.version=jbossrs-10
-version.id=2.1.0.DEV
+version.id=1.0.DEV
repository.id=snapshot
-implementation.title=JBoss Web Services - Native
+implementation.title=JBoss RESTful services
implementation.url=http://www.jboss.org/products/jbossws
implementation.vendor=JBoss Inc.
implementation.vendor.id=http://www.jboss.org
16 years, 5 months
JBossWS SVN: r5092 - rest.
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2007-11-21 06:56:10 -0500 (Wed, 21 Nov 2007)
New Revision: 5092
Removed:
rest/thirdparty/
Log:
Remove thirdparty
16 years, 5 months