JBossWS SVN: r5030 - in stack/native/branches/asoldano/trunk/src/test/java/org/jboss/test/ws/interop/nov2007: wsse and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2007-11-12 05:22:51 -0500 (Mon, 12 Nov 2007)
New Revision: 5030
Modified:
stack/native/branches/asoldano/trunk/src/test/java/org/jboss/test/ws/interop/nov2007/wsaSoap12/AddressingTestCase.java
stack/native/branches/asoldano/trunk/src/test/java/org/jboss/test/ws/interop/nov2007/wsse/TestService.java
Log:
Minor changes
Modified: stack/native/branches/asoldano/trunk/src/test/java/org/jboss/test/ws/interop/nov2007/wsaSoap12/AddressingTestCase.java
===================================================================
--- stack/native/branches/asoldano/trunk/src/test/java/org/jboss/test/ws/interop/nov2007/wsaSoap12/AddressingTestCase.java 2007-11-12 10:03:01 UTC (rev 5029)
+++ stack/native/branches/asoldano/trunk/src/test/java/org/jboss/test/ws/interop/nov2007/wsaSoap12/AddressingTestCase.java 2007-11-12 10:22:51 UTC (rev 5030)
@@ -62,10 +62,8 @@
private static Notify notifyPort;
final static String WSA_FROM = "http://example.org/node/A";
- //final static String WSA_TO = "http://example.org/node/B";
+ final static String WSA_TO = "http://example.org/node/B";
// final static String WSA_TO = "http://131.107.72.15/WSAddressingCR_Service_WCF/WSAddressing10.svc/Soap12";
- final static String WSA_TO = "http://10.10.34.79/WSAddressingCR_Service_WCF/WSAddressing10.svc/Soap12";
- final static String WSA_TO_DUPLEX = "http://10.10.34.79/WSAddressingCR_Service_WCF/WSAddressing10.svc/Soap12/D...";
private static URL wsdlLocation;
@@ -511,7 +509,7 @@
//
public void test1250() throws Exception {
AddressingProperties requestProps =
- AddressingClientUtil.createDefaultProps("http://example.org/action/echoIn", AddressingTestCase.WSA_TO_DUPLEX);
+ AddressingClientUtil.createDefaultProps("http://example.org/action/echoIn", AddressingTestCase.WSA_TO);
requestProps.setMessageID(AddressingClientUtil.createMessageID());
requestProps.setReplyTo(
AddressingTestCase.BUILDER.newEndpointReference(
Modified: stack/native/branches/asoldano/trunk/src/test/java/org/jboss/test/ws/interop/nov2007/wsse/TestService.java
===================================================================
--- stack/native/branches/asoldano/trunk/src/test/java/org/jboss/test/ws/interop/nov2007/wsse/TestService.java 2007-11-12 10:03:01 UTC (rev 5029)
+++ stack/native/branches/asoldano/trunk/src/test/java/org/jboss/test/ws/interop/nov2007/wsse/TestService.java 2007-11-12 10:22:51 UTC (rev 5030)
@@ -118,7 +118,7 @@
{
responseBody.setOrigin(parameters.getPing().getOrigin());
responseBody.setScenario(parameters.getPing().getScenario());
- responseBody.setText(parameters.getPing().getText());
+ responseBody.setText(parameters.getPing().getOrigin() + " : " + parameters.getPing().getText());
}
result.setPingResponse(responseBody);
return result;
18 years, 5 months
JBossWS SVN: r5029 - stack/native/branches/asoldano/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wsse.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2007-11-12 05:03:01 -0500 (Mon, 12 Nov 2007)
New Revision: 5029
Modified:
stack/native/branches/asoldano/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wsse/RoundTripTestCase.java
Log:
Fix test
Modified: stack/native/branches/asoldano/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wsse/RoundTripTestCase.java
===================================================================
--- stack/native/branches/asoldano/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wsse/RoundTripTestCase.java 2007-11-12 05:07:27 UTC (rev 5028)
+++ stack/native/branches/asoldano/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wsse/RoundTripTestCase.java 2007-11-12 10:03:01 UTC (rev 5029)
@@ -132,8 +132,8 @@
targets.add(new WsuIdTarget("timestamp"));
LinkedList operations = new LinkedList();
- operations.add(new OperationDescription(TimestampOperation.class, null, null, "300", null, null));
- operations.add(new OperationDescription(SignatureOperation.class, targets, "wsse", null, null, null));
+ operations.add(new OperationDescription(TimestampOperation.class, null, null, "300", null, null, null));
+ operations.add(new OperationDescription(SignatureOperation.class, targets, "wsse", null, null, null, null));
name = new QName("http://org.jboss.ws/2004", "someHeader");
target = new QNameTarget(name);
@@ -144,8 +144,8 @@
target = new QNameTarget(name, true);
targets.add(target);
- operations.add(new OperationDescription(EncryptionOperation.class, targets, "wsse", null, null, null));
- operations.add(new OperationDescription(SendUsernameOperation.class, null, "hi", "there", null, null));
+ operations.add(new OperationDescription(EncryptionOperation.class, targets, "wsse", null, null, null, null));
+ operations.add(new OperationDescription(SendUsernameOperation.class, null, "hi", "there", null, null, null));
return operations;
}
@@ -161,8 +161,8 @@
targets.add(target);
//targets.add(new WsuIdTarget("timestamp"));
LinkedList operations = new LinkedList();
- operations.add(new OperationDescription(RequireSignatureOperation.class, targets, null, null, null, null));
- operations.add(new OperationDescription(RequireEncryptionOperation.class, targets, null, null, null, null));
+ operations.add(new OperationDescription(RequireSignatureOperation.class, targets, null, null, null, null, null));
+ operations.add(new OperationDescription(RequireEncryptionOperation.class, targets, null, null, null, null, null));
return operations;
}
18 years, 5 months
JBossWS SVN: r5028 - legacy/branches.
by jbossws-commits@lists.jboss.org
Author: mageshbk(a)jboss.com
Date: 2007-11-12 00:07:27 -0500 (Mon, 12 Nov 2007)
New Revision: 5028
Added:
legacy/branches/jbossws-1.2.1.GA_CP01_JBPAPP-415/
Log:
made a copy
Copied: legacy/branches/jbossws-1.2.1.GA_CP01_JBPAPP-415 (from rev 5027, legacy/tags/jbossws-1.2.1.GA_CP01)
18 years, 5 months
JBossWS SVN: r5027 - in stack/native/branches/rest: ant-import and 10 other directories.
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2007-11-11 05:33:55 -0500 (Sun, 11 Nov 2007)
New Revision: 5027
Added:
stack/native/branches/rest/src/main/java/org/jboss/rs/ResourceRegistryFactory.java
stack/native/branches/rest/src/main/java/org/jboss/rs/deployment/
stack/native/branches/rest/src/main/java/org/jboss/rs/deployment/DescriptorDeploymentAspect.java
stack/native/branches/rest/src/main/java/org/jboss/rs/deployment/ModelDeploymentAspect.java
stack/native/branches/rest/src/main/java/org/jboss/rs/deployment/ResourceServlet.java
stack/native/branches/rest/src/main/java/org/jboss/rs/model/OperationBinding.java
stack/native/branches/rest/src/main/java/org/jboss/rs/runtime/DefaultInvocationHandler.java
stack/native/branches/rest/src/test/java/org/jboss/test/rs/deployment/DeploymentTestCase.java
stack/native/branches/rest/src/test/resources/rs/
stack/native/branches/rest/src/test/resources/rs/deployment/
stack/native/branches/rest/src/test/resources/rs/deployment/jbossrs.xml
stack/native/branches/rest/src/test/resources/rs/deployment/web.xml
Modified:
stack/native/branches/rest/ant-import-tests/build-jars-jaxws.xml
stack/native/branches/rest/ant-import/macros-deploy-native.xml
stack/native/branches/rest/build.xml
stack/native/branches/rest/src/main/java/org/jboss/rs/model/ResourceMethod.java
stack/native/branches/rest/src/main/java/org/jboss/rs/runtime/Invocation.java
stack/native/branches/rest/src/main/java/org/jboss/rs/runtime/RuntimeContext.java
stack/native/branches/rest/src/main/resources/jbossws-native-config.xml
stack/native/branches/rest/src/test/java/org/jboss/test/rs/deployment/DescriptorParserTestCase.java
Log:
Servlet invocation, first cut
Modified: stack/native/branches/rest/ant-import/macros-deploy-native.xml
===================================================================
--- stack/native/branches/rest/ant-import/macros-deploy-native.xml 2007-11-09 23:20:34 UTC (rev 5026)
+++ stack/native/branches/rest/ant-import/macros-deploy-native.xml 2007-11-11 10:33:55 UTC (rev 5027)
@@ -453,6 +453,9 @@
<include name="jboss-jaxws-ext.jar"/>
<include name="jboss-saaj.jar"/>
</fileset>
+ <fileset dir="@{thirdpartylibs}">
+ <include name="jsr311-api.jar"/>
+ </fileset>
</copy>
<mkdir dir="${jboss500.home}/server/${jboss.server.instance}/deploy/jbossws.sar"/>
Modified: stack/native/branches/rest/ant-import-tests/build-jars-jaxws.xml
===================================================================
--- stack/native/branches/rest/ant-import-tests/build-jars-jaxws.xml 2007-11-09 23:20:34 UTC (rev 5026)
+++ stack/native/branches/rest/ant-import-tests/build-jars-jaxws.xml 2007-11-11 10:33:55 UTC (rev 5027)
@@ -649,7 +649,20 @@
<include name="wsdl/**"/>
</webinf>
</war>
-
+
+ <!-- RS stuff -->
+
+ <war warfile="${tests.output.dir}/libs/jbossrs-deployment.war" webxml="${tests.output.dir}/resources/rs/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"/>
+ </classes>
+ <webinf dir="${tests.output.dir}/resources/rs/deployment">
+ <include name="jbossrs.xml"/>
+ </webinf>
+ </war>
+
<!-- Please add alphabetically -->
<antcall target="build-interop-jars"/>
Modified: stack/native/branches/rest/build.xml
===================================================================
--- stack/native/branches/rest/build.xml 2007-11-09 23:20:34 UTC (rev 5026)
+++ stack/native/branches/rest/build.xml 2007-11-11 10:33:55 UTC (rev 5027)
@@ -291,7 +291,7 @@
<include name="wsdl4j.jar"/>
<include name="xmlsec.jar"/>
<include name="wstx.jar"/>
- <include name="jboss-jaxb-intros.jar"/>
+ <include name="jboss-jaxb-intros.jar"/>
</fileset>
<metainf dir="${core.dir}/src/main/resources/standard-config">
<include name="standard-*-config.xml"/>
Added: stack/native/branches/rest/src/main/java/org/jboss/rs/ResourceRegistryFactory.java
===================================================================
--- stack/native/branches/rest/src/main/java/org/jboss/rs/ResourceRegistryFactory.java (rev 0)
+++ stack/native/branches/rest/src/main/java/org/jboss/rs/ResourceRegistryFactory.java 2007-11-11 10:33:55 UTC (rev 5027)
@@ -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.rs;
+
+import org.jboss.wsf.common.KernelAwareSPIFactory;
+
+/**
+ * @author Heiko.Braun(a)jboss.com
+ * @version $Revision$
+ */
+public class ResourceRegistryFactory
+{
+ public final static String BEAN_NAME = "RS_RESOURCE_REGISTRY";
+
+ public static ResourceRegistryFactory newInstance()
+ {
+ return new ResourceRegistryFactory();
+ }
+
+ public ResourceRegistry createResourceRegistry()
+ {
+ return new KernelAwareSPIFactory().getKernelProvidedSPI(
+ BEAN_NAME, ResourceRegistry.class
+ );
+
+ }
+
+}
Property changes on: stack/native/branches/rest/src/main/java/org/jboss/rs/ResourceRegistryFactory.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/branches/rest/src/main/java/org/jboss/rs/deployment/DescriptorDeploymentAspect.java
===================================================================
--- stack/native/branches/rest/src/main/java/org/jboss/rs/deployment/DescriptorDeploymentAspect.java (rev 0)
+++ stack/native/branches/rest/src/main/java/org/jboss/rs/deployment/DescriptorDeploymentAspect.java 2007-11-11 10:33:55 UTC (rev 5027)
@@ -0,0 +1,91 @@
+/*
+ * 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.rs.deployment;
+
+import org.jboss.rs.model.dd.DeploymentDescriptorParser;
+import org.jboss.rs.model.dd.JbossrsType;
+import org.jboss.rs.model.dd.ResourceType;
+import org.jboss.rs.ResourceRegistry;
+import org.jboss.wsf.spi.SPIProvider;
+import org.jboss.wsf.spi.SPIProviderResolver;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.DeploymentAspect;
+import org.jboss.wsf.spi.deployment.DeploymentModelFactory;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.deployment.Service;
+import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
+
+import java.io.IOException;
+
+/**
+ * Parses the jbossrs descriptor and turns it into a
+ * SPI structure for further consumption.
+ *
+ * @see org.jboss.rs.model.dd.DeploymentDescriptorParser
+ *
+ * @author Heiko.Braun(a)jboss.com
+ * @version $Revision$
+ */
+public class DescriptorDeploymentAspect extends DeploymentAspect
+{
+
+ 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)
+ {
+ return (UnifiedVirtualFile)deployment.getProperty("jbossrs.dd.pointer");
+ }
+
+ private Endpoint newEndpoint(String impl)
+ {
+ SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
+ DeploymentModelFactory deploymentModelFactory = spiProvider.getSPI(DeploymentModelFactory.class);
+ return deploymentModelFactory.newEndpoint(impl);
+ }
+}
Property changes on: stack/native/branches/rest/src/main/java/org/jboss/rs/deployment/DescriptorDeploymentAspect.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/branches/rest/src/main/java/org/jboss/rs/deployment/ModelDeploymentAspect.java
===================================================================
--- stack/native/branches/rest/src/main/java/org/jboss/rs/deployment/ModelDeploymentAspect.java (rev 0)
+++ stack/native/branches/rest/src/main/java/org/jboss/rs/deployment/ModelDeploymentAspect.java 2007-11-11 10:33:55 UTC (rev 5027)
@@ -0,0 +1,73 @@
+/*
+ * 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.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 java.util.List;
+import java.util.ArrayList;
+
+/**
+ * @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: stack/native/branches/rest/src/main/java/org/jboss/rs/deployment/ModelDeploymentAspect.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/branches/rest/src/main/java/org/jboss/rs/deployment/ResourceServlet.java
===================================================================
--- stack/native/branches/rest/src/main/java/org/jboss/rs/deployment/ResourceServlet.java (rev 0)
+++ stack/native/branches/rest/src/main/java/org/jboss/rs/deployment/ResourceServlet.java 2007-11-11 10:33:55 UTC (rev 5027)
@@ -0,0 +1,156 @@
+/*
+ * 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.rs.deployment;
+
+import org.jboss.rs.MethodHTTP;
+import org.jboss.rs.ResourceError;
+import org.jboss.rs.ResourceRegistry;
+import org.jboss.rs.ResourceRegistryFactory;
+import org.jboss.rs.model.ResourceMethod;
+import org.jboss.rs.model.ResourceModel;
+import org.jboss.rs.model.ResourceResolver;
+import org.jboss.rs.runtime.DefaultInvocationBuilder;
+import org.jboss.rs.runtime.DefaultInvocationHandler;
+import org.jboss.rs.runtime.Invocation;
+import org.jboss.rs.runtime.InvocationBuilder;
+import org.jboss.rs.runtime.RuntimeContext;
+import org.jboss.rs.runtime.InvocationHandler;
+
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+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 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);
+
+ // TODO: impement accept header parsing
+ rt.parseAcceptHeader("text/plain, text/html");
+
+ // locate the resource to be invoked
+ ResourceResolver resolver = ResourceResolver.newInstance(rt);
+ ResourceMethod resourceMethod = resolver.resolve();
+
+ // create an Invocation instance
+ InvocationBuilder builder = new DefaultInvocationBuilder();
+ builder.addInvocationModel( resourceMethod.getParameterBinding() );
+ builder.addInvocationModel( resourceMethod.getOperationBinding() );
+ Invocation invocation = builder.build(rt);
+
+ // invoke it
+ InvocationHandler invoker = new DefaultInvocationHandler();
+ Object result = invoker.invoke(invocation);
+
+ if(result instanceof String)
+ {
+ res.setContentType("text/plain");
+ PrintWriter writer = res.getWriter();
+ writer.write(result.toString());
+ writer.flush();
+ writer.close();
+ }
+ else
+ {
+ serverError(405, "Cannot marshall " + result.getClass(), res);
+ }
+
+ }
+ catch(ResourceError resourceError)
+ {
+ serverError(resourceError.status, resourceError.getMessage(), res);
+ }
+ catch (Throwable e)
+ {
+ throw new ServletException(e);
+ }
+ }
+
+ private void serverError(int status, String message, HttpServletResponse res)
+ {
+ 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: stack/native/branches/rest/src/main/java/org/jboss/rs/deployment/ResourceServlet.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/branches/rest/src/main/java/org/jboss/rs/model/OperationBinding.java
===================================================================
--- stack/native/branches/rest/src/main/java/org/jboss/rs/model/OperationBinding.java (rev 0)
+++ stack/native/branches/rest/src/main/java/org/jboss/rs/model/OperationBinding.java 2007-11-11 10:33:55 UTC (rev 5027)
@@ -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.rs.model;
+
+import org.jboss.rs.runtime.InvocationModel;
+import org.jboss.rs.runtime.Invocation;
+
+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: stack/native/branches/rest/src/main/java/org/jboss/rs/model/OperationBinding.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: stack/native/branches/rest/src/main/java/org/jboss/rs/model/ResourceMethod.java
===================================================================
--- stack/native/branches/rest/src/main/java/org/jboss/rs/model/ResourceMethod.java 2007-11-09 23:20:34 UTC (rev 5026)
+++ stack/native/branches/rest/src/main/java/org/jboss/rs/model/ResourceMethod.java 2007-11-11 10:33:55 UTC (rev 5027)
@@ -96,6 +96,11 @@
return parameterBinding;
}
+ public OperationBinding getOperationBinding()
+ {
+ return new OperationBinding(this.invocationTarget);
+ }
+
void freeze()
{
// We need to know which param belongs to what regex group
Added: stack/native/branches/rest/src/main/java/org/jboss/rs/runtime/DefaultInvocationHandler.java
===================================================================
--- stack/native/branches/rest/src/main/java/org/jboss/rs/runtime/DefaultInvocationHandler.java (rev 0)
+++ stack/native/branches/rest/src/main/java/org/jboss/rs/runtime/DefaultInvocationHandler.java 2007-11-11 10:33:55 UTC (rev 5027)
@@ -0,0 +1,56 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.rs.runtime;
+
+/**
+ * @author Heiko.Braun(a)jboss.com
+ * @version $Revision$
+ */
+public class DefaultInvocationHandler implements InvocationHandler
+{
+
+ public Object invoke(Invocation invocation)
+ {
+ try
+ {
+ Object targetInstance = invocation.getTargetBean().newInstance();
+
+ 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: stack/native/branches/rest/src/main/java/org/jboss/rs/runtime/DefaultInvocationHandler.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: stack/native/branches/rest/src/main/java/org/jboss/rs/runtime/Invocation.java
===================================================================
--- stack/native/branches/rest/src/main/java/org/jboss/rs/runtime/Invocation.java 2007-11-09 23:20:34 UTC (rev 5026)
+++ stack/native/branches/rest/src/main/java/org/jboss/rs/runtime/Invocation.java 2007-11-11 10:33:55 UTC (rev 5027)
@@ -23,6 +23,7 @@
import java.util.List;
import java.util.LinkedList;
+import java.lang.reflect.Method;
/**
* The visitor part of the pattern.
@@ -36,7 +37,14 @@
{
private RuntimeContext context;
- List parameterInstances = new LinkedList();
+ // Actual paramter instances
+ private List parameterInstances = new LinkedList();
+
+ // invocation metadata about the method
+ private Method targetMethod;
+
+ // invocation metadata about the bean
+ private Class targetBean;
public Invocation(RuntimeContext context)
{
@@ -69,4 +77,24 @@
{
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;
+ }
}
Modified: stack/native/branches/rest/src/main/java/org/jboss/rs/runtime/RuntimeContext.java
===================================================================
--- stack/native/branches/rest/src/main/java/org/jboss/rs/runtime/RuntimeContext.java 2007-11-09 23:20:34 UTC (rev 5026)
+++ stack/native/branches/rest/src/main/java/org/jboss/rs/runtime/RuntimeContext.java 2007-11-11 10:33:55 UTC (rev 5027)
@@ -28,6 +28,7 @@
import javax.activation.MimeType;
import javax.activation.MimeTypeParseException;
import java.net.URI;
+import java.net.URL;
import java.util.ArrayList;
import java.util.List;
@@ -43,6 +44,10 @@
// Request URI
private URI uri;
+ private String path;
+
+ private String webcontext;
+
// Accepted response body mime types
private List<MimeType> consumeMimeTypes = new ArrayList<MimeType>();
@@ -57,8 +62,33 @@
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;
@@ -103,14 +133,18 @@
return provideMimeType;
}
+ public String getWebcontext()
+ {
+ return webcontext;
+ }
+
/**
* @return the path info of the associated URI.
*/
public String getPath()
{
- String path = uri.getPath();
- if(path.startsWith("/"))
- path = path.substring(1);
return path;
}
+
+
}
Modified: stack/native/branches/rest/src/main/resources/jbossws-native-config.xml
===================================================================
--- stack/native/branches/rest/src/main/resources/jbossws-native-config.xml 2007-11-09 23:20:34 UTC (rev 5026)
+++ stack/native/branches/rest/src/main/resources/jbossws-native-config.xml 2007-11-11 10:33:55 UTC (rev 5027)
@@ -28,6 +28,11 @@
<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">
@@ -78,6 +83,15 @@
<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">
@@ -143,4 +157,16 @@
</property>
<depends>WSDeploymentAspectInstallerEndpointAPI</depends>
</bean>
-
\ No newline at end of file
+
+
+ <bean name="WSNativeDeploymentAspectInstallerREST" class="org.jboss.wsf.framework.deployment.DeploymentAspectInstaller">
+ <property name="manager"><inject bean="WSDeploymentAspectManagerREST"/></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>
+
Added: stack/native/branches/rest/src/test/java/org/jboss/test/rs/deployment/DeploymentTestCase.java
===================================================================
--- stack/native/branches/rest/src/test/java/org/jboss/test/rs/deployment/DeploymentTestCase.java (rev 0)
+++ stack/native/branches/rest/src/test/java/org/jboss/test/rs/deployment/DeploymentTestCase.java 2007-11-11 10:33:55 UTC (rev 5027)
@@ -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.test.rs.deployment;
+
+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.io.OutputStreamWriter;
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+
+/**
+ * @author Heiko.Braun(a)jboss.com
+ * @version $Revision$
+ */
+public class DeploymentTestCase extends JBossWSTest
+{
+ public static Test suite()
+ {
+ return new JBossWSTestSetup(DeploymentTestCase.class, "jbossrs-deployment.war");
+ }
+
+
+ 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);
+ }
+
+ private String doTextPlainRequest(URL url, String data) throws Exception
+ {
+ URLConnection conn = url.openConnection();
+ conn.setDoOutput( data!=null );
+
+ 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: stack/native/branches/rest/src/test/java/org/jboss/test/rs/deployment/DeploymentTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: stack/native/branches/rest/src/test/java/org/jboss/test/rs/deployment/DescriptorParserTestCase.java
===================================================================
--- stack/native/branches/rest/src/test/java/org/jboss/test/rs/deployment/DescriptorParserTestCase.java 2007-11-09 23:20:34 UTC (rev 5026)
+++ stack/native/branches/rest/src/test/java/org/jboss/test/rs/deployment/DescriptorParserTestCase.java 2007-11-11 10:33:55 UTC (rev 5027)
@@ -29,6 +29,8 @@
import java.io.ByteArrayInputStream;
/**
+ * Test the deployment descriptor parser.
+ *
* @author Heiko.Braun(a)jboss.com
* @version $Revision$
*/
Added: stack/native/branches/rest/src/test/resources/rs/deployment/jbossrs.xml
===================================================================
--- stack/native/branches/rest/src/test/resources/rs/deployment/jbossrs.xml (rev 0)
+++ stack/native/branches/rest/src/test/resources/rs/deployment/jbossrs.xml 2007-11-11 10:33:55 UTC (rev 5027)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+
+<jbossrs xmlns="http://org.jboss.rs/">
+ <resource>
+ <name>Widget</name>
+ <implementation>org.jboss.test.rs.WidgetList</implementation>
+ </resource>
+</jbossrs>
Property changes on: stack/native/branches/rest/src/test/resources/rs/deployment/jbossrs.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/branches/rest/src/test/resources/rs/deployment/web.xml
===================================================================
--- stack/native/branches/rest/src/test/resources/rs/deployment/web.xml (rev 0)
+++ stack/native/branches/rest/src/test/resources/rs/deployment/web.xml 2007-11-11 10:33:55 UTC (rev 5027)
@@ -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.rs.deployment.ResourceServlet</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>JBossRS</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+
+</web-app>
+
Property changes on: stack/native/branches/rest/src/test/resources/rs/deployment/web.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
18 years, 5 months
JBossWS SVN: r5026 - in projects/jbossws-wsconsume-impl: trunk and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: jason.greene(a)jboss.com
Date: 2007-11-09 18:20:34 -0500 (Fri, 09 Nov 2007)
New Revision: 5026
Added:
projects/jbossws-wsconsume-impl/trunk/.classpath
projects/jbossws-wsconsume-impl/trunk/.project
Removed:
projects/jbossws-wsconsume-impl/.classpath
projects/jbossws-wsconsume-impl/.project
Log:
Move eclipse projects files in place
Deleted: projects/jbossws-wsconsume-impl/.classpath
===================================================================
--- projects/jbossws-wsconsume-impl/.classpath 2007-11-09 23:17:18 UTC (rev 5025)
+++ projects/jbossws-wsconsume-impl/.classpath 2007-11-09 23:20:34 UTC (rev 5026)
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="sun/src/main"/>
- <classpathentry kind="src" path="jboss/src/main"/>
- <classpathentry kind="lib" path="lib/activation.jar"/>
- <classpathentry kind="lib" path="lib/jaxb-api.jar"/>
- <classpathentry kind="lib" path="lib/jaxb-impl.jar"/>
- <classpathentry kind="lib" path="lib/jaxb-xjc.jar"/>
- <classpathentry kind="lib" path="lib/jsr173_api.jar"/>
- <classpathentry kind="lib" path="lib/jsr250-api.jar"/>
- <classpathentry kind="lib" path="lib/saaj-api.jar"/>
- <classpathentry kind="lib" path="lib/servlet.jar"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="lib" path="/devel/jbossas/trunk/tools/lib/ant.jar"/>
- <classpathentry kind="lib" path="lib/sun-saaj-impl.jar"/>
- <classpathentry kind="lib" path="lib/jbossws-client.jar"/>
- <classpathentry kind="lib" path="lib/jsr181-api.jar"/>
- <classpathentry kind="lib" path="lib/jaxws-api.jar"/>
- <classpathentry kind="output" path="eclipse-output"/>
-</classpath>
Deleted: projects/jbossws-wsconsume-impl/.project
===================================================================
--- projects/jbossws-wsconsume-impl/.project 2007-11-09 23:17:18 UTC (rev 5025)
+++ projects/jbossws-wsconsume-impl/.project 2007-11-09 23:20:34 UTC (rev 5026)
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>jbossws-sun-wsimport</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
Copied: projects/jbossws-wsconsume-impl/trunk/.classpath (from rev 3759, projects/jbossws-wsconsume-impl/.classpath)
===================================================================
--- projects/jbossws-wsconsume-impl/trunk/.classpath (rev 0)
+++ projects/jbossws-wsconsume-impl/trunk/.classpath 2007-11-09 23:20:34 UTC (rev 5026)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="sun/src/main"/>
+ <classpathentry kind="src" path="jboss/src/main"/>
+ <classpathentry kind="lib" path="lib/activation.jar"/>
+ <classpathentry kind="lib" path="lib/jaxb-api.jar"/>
+ <classpathentry kind="lib" path="lib/jaxb-impl.jar"/>
+ <classpathentry kind="lib" path="lib/jaxb-xjc.jar"/>
+ <classpathentry kind="lib" path="lib/jsr173_api.jar"/>
+ <classpathentry kind="lib" path="lib/jsr250-api.jar"/>
+ <classpathentry kind="lib" path="lib/saaj-api.jar"/>
+ <classpathentry kind="lib" path="lib/servlet.jar"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="lib" path="/devel/jbossas/trunk/tools/lib/ant.jar"/>
+ <classpathentry kind="lib" path="lib/sun-saaj-impl.jar"/>
+ <classpathentry kind="lib" path="lib/jbossws-client.jar"/>
+ <classpathentry kind="lib" path="lib/jsr181-api.jar"/>
+ <classpathentry kind="lib" path="lib/jaxws-api.jar"/>
+ <classpathentry kind="output" path="eclipse-output"/>
+</classpath>
Copied: projects/jbossws-wsconsume-impl/trunk/.project (from rev 3759, projects/jbossws-wsconsume-impl/.project)
===================================================================
--- projects/jbossws-wsconsume-impl/trunk/.project (rev 0)
+++ projects/jbossws-wsconsume-impl/trunk/.project 2007-11-09 23:20:34 UTC (rev 5026)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>jbossws-sun-wsimport</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
18 years, 5 months
JBossWS SVN: r5025 - in projects/jbossws-wsconsume-impl: tags and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: jason.greene(a)jboss.com
Date: 2007-11-09 18:17:18 -0500 (Fri, 09 Nov 2007)
New Revision: 5025
Added:
projects/jbossws-wsconsume-impl/tags/
projects/jbossws-wsconsume-impl/tags/jbossws-wsconsume-impl-2.0.0/
projects/jbossws-wsconsume-impl/trunk/
projects/jbossws-wsconsume-impl/trunk/NOTES
projects/jbossws-wsconsume-impl/trunk/build.xml
projects/jbossws-wsconsume-impl/trunk/good_with_1.2.1.txt
projects/jbossws-wsconsume-impl/trunk/jboss/
projects/jbossws-wsconsume-impl/trunk/lib/
projects/jbossws-wsconsume-impl/trunk/license.txt
projects/jbossws-wsconsume-impl/trunk/sun/
Removed:
projects/jbossws-wsconsume-impl/NOTES
projects/jbossws-wsconsume-impl/build.xml
projects/jbossws-wsconsume-impl/good_with_1.2.1.txt
projects/jbossws-wsconsume-impl/jboss/
projects/jbossws-wsconsume-impl/lib/
projects/jbossws-wsconsume-impl/license.txt
projects/jbossws-wsconsume-impl/sun/
Log:
Recreate tags, create a trunk
Deleted: projects/jbossws-wsconsume-impl/NOTES
===================================================================
--- projects/jbossws-wsconsume-impl/NOTES 2007-11-09 16:26:48 UTC (rev 5024)
+++ projects/jbossws-wsconsume-impl/NOTES 2007-11-09 23:17:18 UTC (rev 5025)
@@ -1,42 +0,0 @@
-General Architecture
---------------------
-(jbossws) WebServiceImporter -> (jbossws-sun) WebServiceImporterProviderImpl -> WebServiceImporterImpl -> (sun) CompileTool
-
-Directory Layout
-----------------
-lib - compile time dependencies
-output/classes - compiled classes
-output/lib - final location for jbossws-sun-wsimport.jar
-
-sun/src/main - modified CDDL JAX-WS code
-jbossws/src/main - jbossws plugin
-
-Sun Source Tag
---------------
-The original sun source is available at:
-cvs -d :pserver:guest@cvs.dev.java.net:/cvs co -r glassfish-90ur1-09282006 jax-ws-sources
-
-It's important to correlate the glassfish tags for TCK compatibility.
-
-Recreation Steps
----i------------
-1. Grab jax-ws sources from java.net (make sure to use a glassfish tag)
-2. Merge the ri and tools tree
-3. Remove all references to http.jar (delete EndpointImpl and everything that references it)
-4. Use jarjar to rename classes in saaj-impl.jar to org/jboss/com/sun (this will ensure no runtime references to it)
-5. Rename all sun code packages to org/jboss/com/sun
-6. Edit the source comment code to include a jbossws message
-7. build jar, and verify it works (should only have jaxb dependencies and misc apis that jboss already has)
-
-Runtime Dependencies
---------------------
-1. jaxb-api.jar
-2. jaxb-impl.jar
-3. jaxb-xjc.jar
-4. stax-1.1.1.jar or wstax
-5. jdk tools.jar
-6. The usual jbossws jars
-
-Compiletime Dependencies
-------------------------
-Everything in lib
Deleted: projects/jbossws-wsconsume-impl/build.xml
===================================================================
--- projects/jbossws-wsconsume-impl/build.xml 2007-11-09 16:26:48 UTC (rev 5024)
+++ projects/jbossws-wsconsume-impl/build.xml 2007-11-09 23:17:18 UTC (rev 5025)
@@ -1,106 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- The contents of this file are subject to the terms
- of the Common Development and Distribution License
- (the License). You may not use this file except in
- compliance with the License.
-
- You can obtain a copy of the license at
- https://glassfish.dev.java.net/public/CDDLv1.0.html.
- See the License for the specific language governing
- permissions and limitations under the License.
-
- When distributing Covered Code, include this CDDL
- Header Notice in each file and include the License file
- at https://glassfish.dev.java.net/public/CDDLv1.0.html.
- If applicable, add the following below the CDDL Header,
- with the fields enclosed by brackets [] replaced by
- you own identifying information:
- "Portions Copyrighted [year] [name of copyright owner]"
-
- Copyright 2006 Sun Microsystems Inc. All Rights Reserved
--->
-
-<!--
- Build script for the source code bundle
--->
-<project name="jax-ws" default="main">
-
- <property name="Name" value="jbossws-wsconsume-impl"/>
- <property name="version" value="2.0.0"/>
- <property name="output" value="output"/>
- <property name="output.classes" value="output/classes"/>
- <property name="output.lib" value="output/lib"/>
-
- <tstamp>
- <format property="now" pattern="MM/dd/yyyy HH:mm:ss" unit="hour" locale="en_US"/>
- </tstamp>
- <property name="build.id" value="${now}(${user.name})" />
- <property name="build.version" value="${Name} ${version}-${build.id}" />
- <echo message="The build id is: ${build.version}" />
-
- <macrodef name="versionProp"
- description="generates a version property file">
- <attribute name="file" />
- <sequential>
- <echo file="@{file}"
->build-id=${build.id}
-build-version=${build.version}
-major-version=${version}
-</echo>
- </sequential>
- </macrodef>
-
- <path id="compile.classpath">
- <fileset dir="lib">
- <include name="**/*.jar"/>
- </fileset>
- </path>
-
- <target name="clean">
- <delete dir="${output}"/>
- </target>
-
- <target name="main" depends="compile, jar"/>
-
- <target name="compile">
- <mkdir dir="${output.classes}"/>
- <copy todir="${output.classes}">
- <fileset dir="sun/src/main">
- <include name="**/*.properties" />
- </fileset>
- </copy>
- <versionProp file="${output.classes}/org/jboss/com/sun/xml/ws/version.properties" />
- <versionProp file="${output.classes}/org/jboss/com/sun/tools/ws/version.properties" />
- <javac destdir="${output.classes}" debug="true">
- <src path="sun/src/main"/>
- <src path="jboss/src/main"/>
- <classpath refid="compile.classpath"/>
- </javac>
- </target>
-
- <target name="jar" depends="compile">
- <mkdir dir="${output.lib}"/>
- <jar jarfile="${output.lib}/jbossws-wsconsume-impl.jar">
- <manifest>
- <attribute name="Implementation-Title" value="jbossws-wsconsume-impl"/>
- <attribute name="Implementation-Version" value="${build.version}"/>
- <attribute name="Implementation-Vendor" value="jboss"/>
- </manifest>
- <fileset dir="${output.classes}"/>
- </jar>
- </target>
-
-<!-- Create a safe SAAJ Impl
- <target name="jarjar">
- <taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask" classpath="./jarjar.jar"/>
- <jarjar jarfile="lib/sun-saaj-impl.jar">
- <zipfileset src="lib/saaj-impl.jar">
- <include name="com/sun/**/*"/>
- </zipfileset>
- <rule pattern="com.sun.**" result="org.jboss.@0"/>
- </jarjar>
- </target>
--->
-</project>
Deleted: projects/jbossws-wsconsume-impl/good_with_1.2.1.txt
===================================================================
--- projects/jbossws-wsconsume-impl/good_with_1.2.1.txt 2007-11-09 16:26:48 UTC (rev 5024)
+++ projects/jbossws-wsconsume-impl/good_with_1.2.1.txt 2007-11-09 23:17:18 UTC (rev 5025)
@@ -1,11 +0,0 @@
-Path: .
-URL: https://svn.jboss.org/repos/jbossws/subprojects/jbossws-wsconsume-impl
-Repository Root: https://svn.jboss.org/repos/jbossws
-Repository UUID: 50344849-fb0f-0410-a53f-a94597aac05c
-Revision: 2893
-Node Kind: directory
-Schedule: normal
-Last Changed Author: jason.greene(a)jboss.com
-Last Changed Rev: 2410
-Last Changed Date: 2007-02-21 00:12:43 +0100 (Wed, 21 Feb 2007)
-
Deleted: projects/jbossws-wsconsume-impl/license.txt
===================================================================
--- projects/jbossws-wsconsume-impl/license.txt 2007-11-09 16:26:48 UTC (rev 5024)
+++ projects/jbossws-wsconsume-impl/license.txt 2007-11-09 23:17:18 UTC (rev 5025)
@@ -1,525 +0,0 @@
-COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
-
-
- 1. Definitions.
-
- 1.1. "Contributor" means each individual or entity that
- creates or contributes to the creation of Modifications.
-
- 1.2. "Contributor Version" means the combination of the
- Original Software, prior Modifications used by a
- Contributor (if any), and the Modifications made by that
- particular Contributor.
-
- 1.3. "Covered Software" means (a) the Original Software, or
- (b) Modifications, or (c) the combination of files
- containing Original Software with files containing
- Modifications, in each case including portions thereof.
-
- 1.4. "Executable" means the Covered Software in any form
- other than Source Code.
-
- 1.5. "Initial Developer" means the individual or entity
- that first makes Original Software available under this
- License.
-
- 1.6. "Larger Work" means a work which combines Covered
- Software or portions thereof with code not governed by the
- terms of this License.
-
- 1.7. "License" means this document.
-
- 1.8. "Licensable" means having the right to grant, to the
- maximum extent possible, whether at the time of the initial
- grant or subsequently acquired, any and all of the rights
- conveyed herein.
-
- 1.9. "Modifications" means the Source Code and Executable
- form of any of the following:
-
- A. Any file that results from an addition to,
- deletion from or modification of the contents of a
- file containing Original Software or previous
- Modifications;
-
- B. Any new file that contains any part of the
- Original Software or previous Modification; or
-
- C. Any new file that is contributed or otherwise made
- available under the terms of this License.
-
- 1.10. "Original Software" means the Source Code and
- Executable form of computer software code that is
- originally released under this License.
-
- 1.11. "Patent Claims" means any patent claim(s), now owned
- or hereafter acquired, including without limitation,
- method, process, and apparatus claims, in any patent
- Licensable by grantor.
-
- 1.12. "Source Code" means (a) the common form of computer
- software code in which modifications are made and (b)
- associated documentation included in or with such code.
-
- 1.13. "You" (or "Your") means an individual or a legal
- entity exercising rights under, and complying with all of
- the terms of, this License. For legal entities, "You"
- includes any entity which controls, is controlled by, or is
- under common control with You. For purposes of this
- definition, "control" means (a) the power, direct or
- indirect, to cause the direction or management of such
- entity, whether by contract or otherwise, or (b) ownership
- of more than fifty percent (50%) of the outstanding shares
- or beneficial ownership of such entity.
-
- 2. License Grants.
-
- 2.1. The Initial Developer Grant.
-
- Conditioned upon Your compliance with Section 3.1 below and
- subject to third party intellectual property claims, the
- Initial Developer hereby grants You a world-wide,
- royalty-free, non-exclusive license:
-
- (a) under intellectual property rights (other than
- patent or trademark) Licensable by Initial Developer,
- to use, reproduce, modify, display, perform,
- sublicense and distribute the Original Software (or
- portions thereof), with or without Modifications,
- and/or as part of a Larger Work; and
-
- (b) under Patent Claims infringed by the making,
- using or selling of Original Software, to make, have
- made, use, practice, sell, and offer for sale, and/or
- otherwise dispose of the Original Software (or
- portions thereof).
-
- (c) The licenses granted in Sections 2.1(a) and (b)
- are effective on the date Initial Developer first
- distributes or otherwise makes the Original Software
- available to a third party under the terms of this
- License.
-
- (d) Notwithstanding Section 2.1(b) above, no patent
- license is granted: (1) for code that You delete from
- the Original Software, or (2) for infringements
- caused by: (i) the modification of the Original
- Software, or (ii) the combination of the Original
- Software with other software or devices.
-
- 2.2. Contributor Grant.
-
- Conditioned upon Your compliance with Section 3.1 below and
- subject to third party intellectual property claims, each
- Contributor hereby grants You a world-wide, royalty-free,
- non-exclusive license:
-
- (a) under intellectual property rights (other than
- patent or trademark) Licensable by Contributor to
- use, reproduce, modify, display, perform, sublicense
- and distribute the Modifications created by such
- Contributor (or portions thereof), either on an
- unmodified basis, with other Modifications, as
- Covered Software and/or as part of a Larger Work; and
-
-
- (b) under Patent Claims infringed by the making,
- using, or selling of Modifications made by that
- Contributor either alone and/or in combination with
- its Contributor Version (or portions of such
- combination), to make, use, sell, offer for sale,
- have made, and/or otherwise dispose of: (1)
- Modifications made by that Contributor (or portions
- thereof); and (2) the combination of Modifications
- made by that Contributor with its Contributor Version
- (or portions of such combination).
-
- (c) The licenses granted in Sections 2.2(a) and
- 2.2(b) are effective on the date Contributor first
- distributes or otherwise makes the Modifications
- available to a third party.
-
- (d) Notwithstanding Section 2.2(b) above, no patent
- license is granted: (1) for any code that Contributor
- has deleted from the Contributor Version; (2) for
- infringements caused by: (i) third party
- modifications of Contributor Version, or (ii) the
- combination of Modifications made by that Contributor
- with other software (except as part of the
- Contributor Version) or other devices; or (3) under
- Patent Claims infringed by Covered Software in the
- absence of Modifications made by that Contributor.
-
- 3. Distribution Obligations.
-
- 3.1. Availability of Source Code.
-
- Any Covered Software that You distribute or otherwise make
- available in Executable form must also be made available in
- Source Code form and that Source Code form must be
- distributed only under the terms of this License. You must
- include a copy of this License with every copy of the
- Source Code form of the Covered Software You distribute or
- otherwise make available. You must inform recipients of any
- such Covered Software in Executable form as to how they can
- obtain such Covered Software in Source Code form in a
- reasonable manner on or through a medium customarily used
- for software exchange.
-
- 3.2. Modifications.
-
- The Modifications that You create or to which You
- contribute are governed by the terms of this License. You
- represent that You believe Your Modifications are Your
- original creation(s) and/or You have sufficient rights to
- grant the rights conveyed by this License.
-
- 3.3. Required Notices.
-
- You must include a notice in each of Your Modifications
- that identifies You as the Contributor of the Modification.
- You may not remove or alter any copyright, patent or
- trademark notices contained within the Covered Software, or
- any notices of licensing or any descriptive text giving
- attribution to any Contributor or the Initial Developer.
-
- 3.4. Application of Additional Terms.
-
- You may not offer or impose any terms on any Covered
- Software in Source Code form that alters or restricts the
- applicable version of this License or the recipients�
- rights hereunder. You may choose to offer, and to charge a
- fee for, warranty, support, indemnity or liability
- obligations to one or more recipients of Covered Software.
- However, you may do so only on Your own behalf, and not on
- behalf of the Initial Developer or any Contributor. You
- must make it absolutely clear that any such warranty,
- support, indemnity or liability obligation is offered by
- You alone, and You hereby agree to indemnify the Initial
- Developer and every Contributor for any liability incurred
- by the Initial Developer or such Contributor as a result of
- warranty, support, indemnity or liability terms You offer.
-
-
- 3.5. Distribution of Executable Versions.
-
- You may distribute the Executable form of the Covered
- Software under the terms of this License or under the terms
- of a license of Your choice, which may contain terms
- different from this License, provided that You are in
- compliance with the terms of this License and that the
- license for the Executable form does not attempt to limit
- or alter the recipient�s rights in the Source Code form
- from the rights set forth in this License. If You
- distribute the Covered Software in Executable form under a
- different license, You must make it absolutely clear that
- any terms which differ from this License are offered by You
- alone, not by the Initial Developer or Contributor. You
- hereby agree to indemnify the Initial Developer and every
- Contributor for any liability incurred by the Initial
- Developer or such Contributor as a result of any such terms
- You offer.
-
- 3.6. Larger Works.
-
- You may create a Larger Work by combining Covered Software
- with other code not governed by the terms of this License
- and distribute the Larger Work as a single product. In such
- a case, You must make sure the requirements of this License
- are fulfilled for the Covered Software.
-
- 4. Versions of the License.
-
- 4.1. New Versions.
-
- Sun Microsystems, Inc. is the initial license steward and
- may publish revised and/or new versions of this License
- from time to time. Each version will be given a
- distinguishing version number. Except as provided in
- Section 4.3, no one other than the license steward has the
- right to modify this License.
-
- 4.2. Effect of New Versions.
-
- You may always continue to use, distribute or otherwise
- make the Covered Software available under the terms of the
- version of the License under which You originally received
- the Covered Software. If the Initial Developer includes a
- notice in the Original Software prohibiting it from being
- distributed or otherwise made available under any
- subsequent version of the License, You must distribute and
- make the Covered Software available under the terms of the
- version of the License under which You originally received
- the Covered Software. Otherwise, You may also choose to
- use, distribute or otherwise make the Covered Software
- available under the terms of any subsequent version of the
- License published by the license steward.
-
- 4.3. Modified Versions.
-
- When You are an Initial Developer and You want to create a
- new license for Your Original Software, You may create and
- use a modified version of this License if You: (a) rename
- the license and remove any references to the name of the
- license steward (except to note that the license differs
- from this License); and (b) otherwise make it clear that
- the license contains terms which differ from this License.
-
-
- 5. DISCLAIMER OF WARRANTY.
-
- COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS"
- BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
- INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED
- SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR
- PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND
- PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY
- COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE
- INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF
- ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF
- WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
- ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS
- DISCLAIMER.
-
- 6. TERMINATION.
-
- 6.1. This License and the rights granted hereunder will
- terminate automatically if You fail to comply with terms
- herein and fail to cure such breach within 30 days of
- becoming aware of the breach. Provisions which, by their
- nature, must remain in effect beyond the termination of
- this License shall survive.
-
- 6.2. If You assert a patent infringement claim (excluding
- declaratory judgment actions) against Initial Developer or
- a Contributor (the Initial Developer or Contributor against
- whom You assert such claim is referred to as "Participant")
- alleging that the Participant Software (meaning the
- Contributor Version where the Participant is a Contributor
- or the Original Software where the Participant is the
- Initial Developer) directly or indirectly infringes any
- patent, then any and all rights granted directly or
- indirectly to You by such Participant, the Initial
- Developer (if the Initial Developer is not the Participant)
- and all Contributors under Sections 2.1 and/or 2.2 of this
- License shall, upon 60 days notice from Participant
- terminate prospectively and automatically at the expiration
- of such 60 day notice period, unless if within such 60 day
- period You withdraw Your claim with respect to the
- Participant Software against such Participant either
- unilaterally or pursuant to a written agreement with
- Participant.
-
- 6.3. In the event of termination under Sections 6.1 or 6.2
- above, all end user licenses that have been validly granted
- by You or any distributor hereunder prior to termination
- (excluding licenses granted to You by any distributor)
- shall survive termination.
-
- 7. LIMITATION OF LIABILITY.
-
- UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
- (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE
- INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF
- COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE
- LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR
- CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT
- LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK
- STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
- COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
- INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
- LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL
- INJURY RESULTING FROM SUCH PARTY�S NEGLIGENCE TO THE EXTENT
- APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO
- NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR
- CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT
- APPLY TO YOU.
-
- 8. U.S. GOVERNMENT END USERS.
-
- The Covered Software is a "commercial item," as that term is
- defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial
- computer software" (as that term is defined at 48 C.F.R. �
- 252.227-7014(a)(1)) and "commercial computer software
- documentation" as such terms are used in 48 C.F.R. 12.212 (Sept.
- 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1
- through 227.7202-4 (June 1995), all U.S. Government End Users
- acquire Covered Software with only those rights set forth herein.
- This U.S. Government Rights clause is in lieu of, and supersedes,
- any other FAR, DFAR, or other clause or provision that addresses
- Government rights in computer software under this License.
-
- 9. MISCELLANEOUS.
-
- This License represents the complete agreement concerning subject
- matter hereof. If any provision of this License is held to be
- unenforceable, such provision shall be reformed only to the
- extent necessary to make it enforceable. This License shall be
- governed by the law of the jurisdiction specified in a notice
- contained within the Original Software (except to the extent
- applicable law, if any, provides otherwise), excluding such
- jurisdiction�s conflict-of-law provisions. Any litigation
- relating to this License shall be subject to the jurisdiction of
- the courts located in the jurisdiction and venue specified in a
- notice contained within the Original Software, with the losing
- party responsible for costs, including, without limitation, court
- costs and reasonable attorneys� fees and expenses. The
- application of the United Nations Convention on Contracts for the
- International Sale of Goods is expressly excluded. Any law or
- regulation which provides that the language of a contract shall
- be construed against the drafter shall not apply to this License.
- You agree that You alone are responsible for compliance with the
- United States export administration regulations (and the export
- control laws and regulation of any other countries) when You use,
- distribute or otherwise make available any Covered Software.
-
- 10. RESPONSIBILITY FOR CLAIMS.
-
- As between Initial Developer and the Contributors, each party is
- responsible for claims and damages arising, directly or
- indirectly, out of its utilization of rights under this License
- and You agree to work with Initial Developer and Contributors to
- distribute such responsibility on an equitable basis. Nothing
- herein is intended or shall be deemed to constitute any admission
- of liability.
-
-
----------------------------------------------------------------------------
-
-
-Sun Microsystems, Inc. ("Sun") ENTITLEMENT for SOFTWARE
-
-Licensee/Company: Entity receiving Software.
-
-Effective Date: Date of delivery of the Software to You.
-
-Software: Webservices Metadata for Java Platform V2.0.
-
-License Term: Perpetual (subject to termination under the SLA).
-
-Licensed Unit: Software Copy.
-
-Licensed unit Count: Unlimited.
-
-Permitted Uses:
-
-1. You may reproduce and use the Software for Your own Individual, Commercial and Research and Instructional Use only for the purposes of designing, developing, testing, and running Your applets and applications ("Programs").
-
-2. Subject to the terms and conditions of this Agreement and restrictions and exceptions set forth in the Software's documentation, You may reproduce and distribute portions of Software identified as a redistributable in the documentation (each a "Redistributable"), provided that You comply with the following (note that You may be entitled to reproduce and distribute other portions of the Software not defined in the documentation as a Redistributable under certain other licenses as described in the THIRDPARTYLICENSEREADME):
-
-(a) You distribute Redistributable complete and unmodified and only bundled as part of Your Programs,
-
-(b) Your Programs add significant and primary functionality to the Redistributable,
-
-(c) You distribute Redistributable for the sole purpose of running Your Programs,
-
-(d) You do not distribute additional software intended to replace any
-component(s) of the Redistributable,
-
-(e) You do not remove or alter any proprietary legends or notices contained in or on the Redistributable.
-
-(f) You only distribute the Redistributable subject to a license agreement that protects Sun's interests consistent with the terms contained in this
-Agreement, and
-
-(g) You agree to defend and indemnify Sun and its licensors from and against any damages, costs, liabilities, settlement amounts and/or expenses (including attorneys' fees) incurred in connection with any claim, lawsuit or action by any third party that arises or results from the use or distribution of any and all Programs and/or Redistributable.
-
-3. Java Technology Restrictions. You may not create, modify, or change the behavior of, or authorize Your licensees to create, modify, or change the behavior of, classes, interfaces, or subpackages that are in any way identified as "java", "javax", "sun" or similar convention as specified by Sun in any naming convention designation.
-
-
-Sun Microsystems, Inc. ("Sun")
-SOFTWARE LICENSE AGREEMENT
-
-READ THE TERMS OF THIS AGREEMENT ("AGREEMENT") CAREFULLY BEFORE OPENING SOFTWARE MEDIA PACKAGE. BY OPENING SOFTWARE MEDIA PACKAGE, YOU AGREE TO THE TERMS OF THIS AGREEMENT. IF YOU ARE ACCESSING SOFTWARE ELECTRONICALLY, INDICATE YOUR ACCEPTANCE OF THESE TERMS BY SELECTING THE "ACCEPT" BUTTON AT THE END OF THIS AGREEMENT. IF YOU DO NOT AGREE TO ALL OF THE TERMS, PROMPTLY RETURN THE UNUSED SOFTWARE TO YOUR PLACE OF PURCHASE FOR A REFUND OR, IF SOFTWARE IS ACCESSED ELECTRONICALLY, SELECT THE "DECLINE" (OR "EXIT") BUTTON AT THE END OF THIS AGREEMENT. IF YOU HAVE SEPARATELY AGREED TO LICENSE TERMS ("MASTER TERMS") FOR YOUR LICENSE TO THIS SOFTWARE, THEN SECTIONS 1-5 OF THIS AGREEMENT ("SUPPLEMENTAL LICENSE TERMS") SHALL SUPPLEMENT AND SUPERSEDE THE MASTER TERMS IN RELATION TO THIS SOFTWARE.
-
-1. Definitions.
-
-(a) "Entitlement" means the collective set of applicable documents authorized by Sun evidencing your obligation to pay associated fees (if any) for the license, associated Services, and the authorized scope of use of Software under this Agreement.
-
-(b) "Licensed Unit" means the unit of measure by which your use of Software and/or Service is licensed, as described in your Entitlement.
-
-(c) "Permitted Use" means the licensed Software use(s) authorized in this Agreement as specified in your Entitlement. The Permitted Use for any bundled Sun software not specified in your Entitlement will be evaluation use as provided in Section 3.
-
-(d) "Service" means the service(s) that Sun or its delegate will provide, if any, as selected in your Entitlement and as further described in the applicable service listings at www.sun.com/service/servicelist.
-
-(e) "Software" means the Sun software described in your Entitlement. Also, certain software may be included for evaluation use under Section 3.
-
-(f) "You" and "Your" means the individual or legal entity specified in the Entitlement, or for evaluation purposes, the entity performing the evaluation.
-
-2. License Grant and Entitlement.
-
-Subject to the terms of your Entitlement, Sun grants you a nonexclusive, nontransferable limited license to use Software for its Permitted Use for the license term. Your Entitlement will specify (a) Software licensed, (b) the Permitted Use, (c) the license term, and (d) the Licensed Units.
-
-Additionally, if your Entitlement includes Services, then it will also specify the (e) Service and (f) service term.
-
-If your rights to Software or Services are limited in duration and the date such rights begin is other than the purchase date, your Entitlement will provide that beginning date(s).
-
-The Entitlement may be delivered to you in various ways depending on the manner in which you obtain Software and Services, for example, the Entitlement may be provided in your receipt, invoice or your contract with Sun or authorized Sun reseller. It may also be in electronic format if you download Software.
-
-3. Permitted Use.
-
-As selected in your Entitlement, one or more of the following Permitted Uses will apply to your use of Software. Unless you have an Entitlement that expressly permits it, you may not use Software for any of the other Permitted Uses. If you don't have an Entitlement, or if your Entitlement doesn't cover additional software delivered to you, then such software is for your Evaluation Use.
-
-(a) Evaluation Use. You may evaluate Software internally for a period of 90 days from your first use.
-
-(b) Research and Instructional Use. You may use Software internally to design, develop and test, and also to provide instruction on such uses.
-
-(c) Individual Use. You may use Software internally for personal, individual use.
-
-(d) Commercial Use. You may use Software internally for your own commercial purposes.
-
-(e) Service Provider Use. You may make Software functionality accessible (but not by providing Software itself or through outsourcing services) to your end users in an extranet deployment, but not to your affiliated companies or to government agencies.
-
-4. Licensed Units.
-
-Your Permitted Use is limited to the number of Licensed Units stated in your Entitlement. If you require additional Licensed Units, you will need additional Entitlement(s).
-
-5. Restrictions.
-
-(a) The copies of Software provided to you under this Agreement are licensed, not sold, to you by Sun. Sun reserves all rights not expressly granted. (b) You may make a single archival copy of Software, but otherwise may not copy, modify, or distribute Software. However if the Sun documentation accompanying Software lists specific portions of Software, such as header files, class libraries, reference source code, and/or redistributable files, that may be handled differently, you may do so only as provided in the Sun documentation. (c) You may not rent, lease, lend or encumber Software. (d) Unless enforcement is prohibited by applicable law, you may not decompile, or reverse engineer Software. (e) The terms and conditions of this Agreement will apply to any Software updates, provided to you at Sun's discretion, that replace and/or supplement the original Software, unless such update contains a separate license. (f) You may not publish or provide the results of any benchmark !
or comparison tests run on Software to any third party without the prior written consent of Sun. (g) Software is confidential and copyrighted. (h) Unless otherwise specified, if Software is delivered with embedded or bundled software that enables functionality of Software, you may not use such software on a stand-alone basis or use any portion of such software to interoperate with any program(s) other than Software. (i) Software may contain programs that perform automated collection of system data and/or automated software updating services. System data collected through such programs may be used by Sun, its subcontractors, and its service delivery partners for the purpose of providing you with remote system services and/or improving Sun's software and systems. (j) Software is not designed, licensed or intended for use in the design, construction, operation or maintenance of any nuclear facility and Sun and its licensors disclaim any express or implied warranty of fitness f!
or such uses. (k) No right, title or interest in or to any trademark,
service mark, logo or trade name of Sun or its licensors is granted under this Agreement.
-
-6. Term and Termination.
-
-The license and service term are set forth in your Entitlement(s). Your rights under this Agreement will terminate immediately without notice from Sun if you materially breach it or take any action in derogation of Sun's and/or its licensors' rights to Software. Sun may terminate this Agreement should any Software become, or in Sun's reasonable opinion likely to become, the subject of a claim of intellectual property infringement or trade secret misappropriation. Upon termination, you will cease use of, and destroy, Software and confirm compliance in writing to Sun. Sections 1, 5, 6, 7, and 9-15 will survive termination of the Agreement.
-
-7. Java Compatibility and Open Source.
-
-Software may contain Java technology. You may not create additional classes to, or modifications of, the Java technology, except under compatibility requirements available under a separate agreement available at www.java.net.
-
-Sun supports and benefits from the global community of open source developers, and thanks the community for its important contributions and open standards-based technology, which Sun has adopted into many of its products.
-
-Please note that portions of Software may be provided with notices and open source licenses from such communities and third parties that govern the use of those portions, and any licenses granted hereunder do not alter any rights and obligations you may have under such open source licenses, however, the disclaimer of warranty and limitation of liability provisions in this Agreement will apply to all Software in this distribution.
-
-8. Limited Warranty.
-
-Sun warrants to you that for a period of 90 days from the date of purchase, as evidenced by a copy of the receipt, the media on which Software is furnished (if any) will be free of defects in materials and workmanship under normal use. Except for the foregoing, Software is provided "AS IS". Your exclusive remedy and Sun's entire liability under this limited warranty will be at Sun's option to replace Software media or refund the fee paid for Software. Some states do not allow limitations on certain implied warranties, so the above may not apply to you. This limited warranty gives you specific legal rights. You may have others, which vary from state to state.
-
-9. Disclaimer of Warranty.
-
-UNLESS SPECIFIED IN THIS AGREEMENT, ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT ARE DISCLAIMED, EXCEPT TO THE EXTENT THAT THESE DISCLAIMERS ARE HELD TO BE LEGALLY INVALID.
-
-10. Limitation of Liability.
-
-TO THE EXTENT NOT PROHIBITED BY LAW, IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR SPECIAL, INDIRECT, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF OR RELATED TO THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. In no event will Sun's liability to you, whether in contract, tort (including negligence), or otherwise, exceed the amount paid by you for Software under this Agreement. The foregoing limitations will apply even if the above stated warranty fails of its essential purpose. Some states do not allow the exclusion of incidental or consequential damages, so some of the terms above may not be applicable to you.
-
-11. Export Regulations.
-
-All Software, documents, technical data, and any other materials delivered under this Agreement are subject to U.S. export control laws and may be subject to export or import regulations in other countries. You agree to comply strictly with these laws and regulations and acknowledge that you have the responsibility to obtain any licenses to export, re-export, or import as may be required after delivery to you.
-
-12. U.S. Government Restricted Rights.
-
-If Software is being acquired by or on behalf of the U.S. Government or by a U.S. Government prime contractor or subcontractor (at any tier), then the Government's rights in Software and accompanying documentation will be only as set forth in this Agreement; this is in accordance with 48 CFR 227.7201 through 227.7202-4 (for Department of Defense (DOD) acquisitions) and with 48 CFR 2.101 and 12.212 (for non-DOD acquisitions).
-
-13. Governing Law.
-
-Any action related to this Agreement will be governed by California law and controlling U.S. federal law. No choice of law rules of any jurisdiction will apply.
-
-14. Severability.
-
-If any provision of this Agreement is held to be unenforceable, this Agreement will remain in effect with the provision omitted, unless omission would frustrate the intent of the parties, in which case this Agreement will immediately terminate.
-
-15. Integration.
-
-This Agreement, including any terms contained in your Entitlement, is the entire agreement between you and Sun relating to its subject matter. It supersedes all prior or contemporaneous oral or written communications, proposals, representations and warranties and prevails over any conflicting or additional terms of any quote, order, acknowledgment, or other communication between the parties relating to its subject matter during the term of this Agreement. No modification of this Agreement will be binding, unless in writing and signed by an authorized representative of each party.
-
-Please contact Sun Microsystems, Inc. 4150 Network Circle, Santa Clara, California 95054 if you have questions.
-
Copied: projects/jbossws-wsconsume-impl/tags/jbossws-wsconsume-impl-2.0.0 (from rev 2410, subprojects/jbossws-wsconsume-impl)
Copied: projects/jbossws-wsconsume-impl/trunk/NOTES (from rev 3759, projects/jbossws-wsconsume-impl/NOTES)
===================================================================
--- projects/jbossws-wsconsume-impl/trunk/NOTES (rev 0)
+++ projects/jbossws-wsconsume-impl/trunk/NOTES 2007-11-09 23:17:18 UTC (rev 5025)
@@ -0,0 +1,42 @@
+General Architecture
+--------------------
+(jbossws) WebServiceImporter -> (jbossws-sun) WebServiceImporterProviderImpl -> WebServiceImporterImpl -> (sun) CompileTool
+
+Directory Layout
+----------------
+lib - compile time dependencies
+output/classes - compiled classes
+output/lib - final location for jbossws-sun-wsimport.jar
+
+sun/src/main - modified CDDL JAX-WS code
+jbossws/src/main - jbossws plugin
+
+Sun Source Tag
+--------------
+The original sun source is available at:
+cvs -d :pserver:guest@cvs.dev.java.net:/cvs co -r glassfish-90ur1-09282006 jax-ws-sources
+
+It's important to correlate the glassfish tags for TCK compatibility.
+
+Recreation Steps
+---i------------
+1. Grab jax-ws sources from java.net (make sure to use a glassfish tag)
+2. Merge the ri and tools tree
+3. Remove all references to http.jar (delete EndpointImpl and everything that references it)
+4. Use jarjar to rename classes in saaj-impl.jar to org/jboss/com/sun (this will ensure no runtime references to it)
+5. Rename all sun code packages to org/jboss/com/sun
+6. Edit the source comment code to include a jbossws message
+7. build jar, and verify it works (should only have jaxb dependencies and misc apis that jboss already has)
+
+Runtime Dependencies
+--------------------
+1. jaxb-api.jar
+2. jaxb-impl.jar
+3. jaxb-xjc.jar
+4. stax-1.1.1.jar or wstax
+5. jdk tools.jar
+6. The usual jbossws jars
+
+Compiletime Dependencies
+------------------------
+Everything in lib
Copied: projects/jbossws-wsconsume-impl/trunk/build.xml (from rev 3759, projects/jbossws-wsconsume-impl/build.xml)
===================================================================
--- projects/jbossws-wsconsume-impl/trunk/build.xml (rev 0)
+++ projects/jbossws-wsconsume-impl/trunk/build.xml 2007-11-09 23:17:18 UTC (rev 5025)
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ The contents of this file are subject to the terms
+ of the Common Development and Distribution License
+ (the License). You may not use this file except in
+ compliance with the License.
+
+ You can obtain a copy of the license at
+ https://glassfish.dev.java.net/public/CDDLv1.0.html.
+ See the License for the specific language governing
+ permissions and limitations under the License.
+
+ When distributing Covered Code, include this CDDL
+ Header Notice in each file and include the License file
+ at https://glassfish.dev.java.net/public/CDDLv1.0.html.
+ If applicable, add the following below the CDDL Header,
+ with the fields enclosed by brackets [] replaced by
+ you own identifying information:
+ "Portions Copyrighted [year] [name of copyright owner]"
+
+ Copyright 2006 Sun Microsystems Inc. All Rights Reserved
+-->
+
+<!--
+ Build script for the source code bundle
+-->
+<project name="jax-ws" default="main">
+
+ <property name="Name" value="jbossws-wsconsume-impl"/>
+ <property name="version" value="2.0.0"/>
+ <property name="output" value="output"/>
+ <property name="output.classes" value="output/classes"/>
+ <property name="output.lib" value="output/lib"/>
+
+ <tstamp>
+ <format property="now" pattern="MM/dd/yyyy HH:mm:ss" unit="hour" locale="en_US"/>
+ </tstamp>
+ <property name="build.id" value="${now}(${user.name})" />
+ <property name="build.version" value="${Name} ${version}-${build.id}" />
+ <echo message="The build id is: ${build.version}" />
+
+ <macrodef name="versionProp"
+ description="generates a version property file">
+ <attribute name="file" />
+ <sequential>
+ <echo file="@{file}"
+>build-id=${build.id}
+build-version=${build.version}
+major-version=${version}
+</echo>
+ </sequential>
+ </macrodef>
+
+ <path id="compile.classpath">
+ <fileset dir="lib">
+ <include name="**/*.jar"/>
+ </fileset>
+ </path>
+
+ <target name="clean">
+ <delete dir="${output}"/>
+ </target>
+
+ <target name="main" depends="compile, jar"/>
+
+ <target name="compile">
+ <mkdir dir="${output.classes}"/>
+ <copy todir="${output.classes}">
+ <fileset dir="sun/src/main">
+ <include name="**/*.properties" />
+ </fileset>
+ </copy>
+ <versionProp file="${output.classes}/org/jboss/com/sun/xml/ws/version.properties" />
+ <versionProp file="${output.classes}/org/jboss/com/sun/tools/ws/version.properties" />
+ <javac destdir="${output.classes}" debug="true">
+ <src path="sun/src/main"/>
+ <src path="jboss/src/main"/>
+ <classpath refid="compile.classpath"/>
+ </javac>
+ </target>
+
+ <target name="jar" depends="compile">
+ <mkdir dir="${output.lib}"/>
+ <jar jarfile="${output.lib}/jbossws-wsconsume-impl.jar">
+ <manifest>
+ <attribute name="Implementation-Title" value="jbossws-wsconsume-impl"/>
+ <attribute name="Implementation-Version" value="${build.version}"/>
+ <attribute name="Implementation-Vendor" value="jboss"/>
+ </manifest>
+ <fileset dir="${output.classes}"/>
+ </jar>
+ </target>
+
+<!-- Create a safe SAAJ Impl
+ <target name="jarjar">
+ <taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask" classpath="./jarjar.jar"/>
+ <jarjar jarfile="lib/sun-saaj-impl.jar">
+ <zipfileset src="lib/saaj-impl.jar">
+ <include name="com/sun/**/*"/>
+ </zipfileset>
+ <rule pattern="com.sun.**" result="org.jboss.@0"/>
+ </jarjar>
+ </target>
+-->
+</project>
Copied: projects/jbossws-wsconsume-impl/trunk/good_with_1.2.1.txt (from rev 3759, projects/jbossws-wsconsume-impl/good_with_1.2.1.txt)
===================================================================
--- projects/jbossws-wsconsume-impl/trunk/good_with_1.2.1.txt (rev 0)
+++ projects/jbossws-wsconsume-impl/trunk/good_with_1.2.1.txt 2007-11-09 23:17:18 UTC (rev 5025)
@@ -0,0 +1,11 @@
+Path: .
+URL: https://svn.jboss.org/repos/jbossws/subprojects/jbossws-wsconsume-impl
+Repository Root: https://svn.jboss.org/repos/jbossws
+Repository UUID: 50344849-fb0f-0410-a53f-a94597aac05c
+Revision: 2893
+Node Kind: directory
+Schedule: normal
+Last Changed Author: jason.greene(a)jboss.com
+Last Changed Rev: 2410
+Last Changed Date: 2007-02-21 00:12:43 +0100 (Wed, 21 Feb 2007)
+
Copied: projects/jbossws-wsconsume-impl/trunk/jboss (from rev 3759, projects/jbossws-wsconsume-impl/jboss)
Copied: projects/jbossws-wsconsume-impl/trunk/lib (from rev 3759, projects/jbossws-wsconsume-impl/lib)
Copied: projects/jbossws-wsconsume-impl/trunk/license.txt (from rev 3759, projects/jbossws-wsconsume-impl/license.txt)
===================================================================
--- projects/jbossws-wsconsume-impl/trunk/license.txt (rev 0)
+++ projects/jbossws-wsconsume-impl/trunk/license.txt 2007-11-09 23:17:18 UTC (rev 5025)
@@ -0,0 +1,525 @@
+COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
+
+
+ 1. Definitions.
+
+ 1.1. "Contributor" means each individual or entity that
+ creates or contributes to the creation of Modifications.
+
+ 1.2. "Contributor Version" means the combination of the
+ Original Software, prior Modifications used by a
+ Contributor (if any), and the Modifications made by that
+ particular Contributor.
+
+ 1.3. "Covered Software" means (a) the Original Software, or
+ (b) Modifications, or (c) the combination of files
+ containing Original Software with files containing
+ Modifications, in each case including portions thereof.
+
+ 1.4. "Executable" means the Covered Software in any form
+ other than Source Code.
+
+ 1.5. "Initial Developer" means the individual or entity
+ that first makes Original Software available under this
+ License.
+
+ 1.6. "Larger Work" means a work which combines Covered
+ Software or portions thereof with code not governed by the
+ terms of this License.
+
+ 1.7. "License" means this document.
+
+ 1.8. "Licensable" means having the right to grant, to the
+ maximum extent possible, whether at the time of the initial
+ grant or subsequently acquired, any and all of the rights
+ conveyed herein.
+
+ 1.9. "Modifications" means the Source Code and Executable
+ form of any of the following:
+
+ A. Any file that results from an addition to,
+ deletion from or modification of the contents of a
+ file containing Original Software or previous
+ Modifications;
+
+ B. Any new file that contains any part of the
+ Original Software or previous Modification; or
+
+ C. Any new file that is contributed or otherwise made
+ available under the terms of this License.
+
+ 1.10. "Original Software" means the Source Code and
+ Executable form of computer software code that is
+ originally released under this License.
+
+ 1.11. "Patent Claims" means any patent claim(s), now owned
+ or hereafter acquired, including without limitation,
+ method, process, and apparatus claims, in any patent
+ Licensable by grantor.
+
+ 1.12. "Source Code" means (a) the common form of computer
+ software code in which modifications are made and (b)
+ associated documentation included in or with such code.
+
+ 1.13. "You" (or "Your") means an individual or a legal
+ entity exercising rights under, and complying with all of
+ the terms of, this License. For legal entities, "You"
+ includes any entity which controls, is controlled by, or is
+ under common control with You. For purposes of this
+ definition, "control" means (a) the power, direct or
+ indirect, to cause the direction or management of such
+ entity, whether by contract or otherwise, or (b) ownership
+ of more than fifty percent (50%) of the outstanding shares
+ or beneficial ownership of such entity.
+
+ 2. License Grants.
+
+ 2.1. The Initial Developer Grant.
+
+ Conditioned upon Your compliance with Section 3.1 below and
+ subject to third party intellectual property claims, the
+ Initial Developer hereby grants You a world-wide,
+ royalty-free, non-exclusive license:
+
+ (a) under intellectual property rights (other than
+ patent or trademark) Licensable by Initial Developer,
+ to use, reproduce, modify, display, perform,
+ sublicense and distribute the Original Software (or
+ portions thereof), with or without Modifications,
+ and/or as part of a Larger Work; and
+
+ (b) under Patent Claims infringed by the making,
+ using or selling of Original Software, to make, have
+ made, use, practice, sell, and offer for sale, and/or
+ otherwise dispose of the Original Software (or
+ portions thereof).
+
+ (c) The licenses granted in Sections 2.1(a) and (b)
+ are effective on the date Initial Developer first
+ distributes or otherwise makes the Original Software
+ available to a third party under the terms of this
+ License.
+
+ (d) Notwithstanding Section 2.1(b) above, no patent
+ license is granted: (1) for code that You delete from
+ the Original Software, or (2) for infringements
+ caused by: (i) the modification of the Original
+ Software, or (ii) the combination of the Original
+ Software with other software or devices.
+
+ 2.2. Contributor Grant.
+
+ Conditioned upon Your compliance with Section 3.1 below and
+ subject to third party intellectual property claims, each
+ Contributor hereby grants You a world-wide, royalty-free,
+ non-exclusive license:
+
+ (a) under intellectual property rights (other than
+ patent or trademark) Licensable by Contributor to
+ use, reproduce, modify, display, perform, sublicense
+ and distribute the Modifications created by such
+ Contributor (or portions thereof), either on an
+ unmodified basis, with other Modifications, as
+ Covered Software and/or as part of a Larger Work; and
+
+
+ (b) under Patent Claims infringed by the making,
+ using, or selling of Modifications made by that
+ Contributor either alone and/or in combination with
+ its Contributor Version (or portions of such
+ combination), to make, use, sell, offer for sale,
+ have made, and/or otherwise dispose of: (1)
+ Modifications made by that Contributor (or portions
+ thereof); and (2) the combination of Modifications
+ made by that Contributor with its Contributor Version
+ (or portions of such combination).
+
+ (c) The licenses granted in Sections 2.2(a) and
+ 2.2(b) are effective on the date Contributor first
+ distributes or otherwise makes the Modifications
+ available to a third party.
+
+ (d) Notwithstanding Section 2.2(b) above, no patent
+ license is granted: (1) for any code that Contributor
+ has deleted from the Contributor Version; (2) for
+ infringements caused by: (i) third party
+ modifications of Contributor Version, or (ii) the
+ combination of Modifications made by that Contributor
+ with other software (except as part of the
+ Contributor Version) or other devices; or (3) under
+ Patent Claims infringed by Covered Software in the
+ absence of Modifications made by that Contributor.
+
+ 3. Distribution Obligations.
+
+ 3.1. Availability of Source Code.
+
+ Any Covered Software that You distribute or otherwise make
+ available in Executable form must also be made available in
+ Source Code form and that Source Code form must be
+ distributed only under the terms of this License. You must
+ include a copy of this License with every copy of the
+ Source Code form of the Covered Software You distribute or
+ otherwise make available. You must inform recipients of any
+ such Covered Software in Executable form as to how they can
+ obtain such Covered Software in Source Code form in a
+ reasonable manner on or through a medium customarily used
+ for software exchange.
+
+ 3.2. Modifications.
+
+ The Modifications that You create or to which You
+ contribute are governed by the terms of this License. You
+ represent that You believe Your Modifications are Your
+ original creation(s) and/or You have sufficient rights to
+ grant the rights conveyed by this License.
+
+ 3.3. Required Notices.
+
+ You must include a notice in each of Your Modifications
+ that identifies You as the Contributor of the Modification.
+ You may not remove or alter any copyright, patent or
+ trademark notices contained within the Covered Software, or
+ any notices of licensing or any descriptive text giving
+ attribution to any Contributor or the Initial Developer.
+
+ 3.4. Application of Additional Terms.
+
+ You may not offer or impose any terms on any Covered
+ Software in Source Code form that alters or restricts the
+ applicable version of this License or the recipients�
+ rights hereunder. You may choose to offer, and to charge a
+ fee for, warranty, support, indemnity or liability
+ obligations to one or more recipients of Covered Software.
+ However, you may do so only on Your own behalf, and not on
+ behalf of the Initial Developer or any Contributor. You
+ must make it absolutely clear that any such warranty,
+ support, indemnity or liability obligation is offered by
+ You alone, and You hereby agree to indemnify the Initial
+ Developer and every Contributor for any liability incurred
+ by the Initial Developer or such Contributor as a result of
+ warranty, support, indemnity or liability terms You offer.
+
+
+ 3.5. Distribution of Executable Versions.
+
+ You may distribute the Executable form of the Covered
+ Software under the terms of this License or under the terms
+ of a license of Your choice, which may contain terms
+ different from this License, provided that You are in
+ compliance with the terms of this License and that the
+ license for the Executable form does not attempt to limit
+ or alter the recipient�s rights in the Source Code form
+ from the rights set forth in this License. If You
+ distribute the Covered Software in Executable form under a
+ different license, You must make it absolutely clear that
+ any terms which differ from this License are offered by You
+ alone, not by the Initial Developer or Contributor. You
+ hereby agree to indemnify the Initial Developer and every
+ Contributor for any liability incurred by the Initial
+ Developer or such Contributor as a result of any such terms
+ You offer.
+
+ 3.6. Larger Works.
+
+ You may create a Larger Work by combining Covered Software
+ with other code not governed by the terms of this License
+ and distribute the Larger Work as a single product. In such
+ a case, You must make sure the requirements of this License
+ are fulfilled for the Covered Software.
+
+ 4. Versions of the License.
+
+ 4.1. New Versions.
+
+ Sun Microsystems, Inc. is the initial license steward and
+ may publish revised and/or new versions of this License
+ from time to time. Each version will be given a
+ distinguishing version number. Except as provided in
+ Section 4.3, no one other than the license steward has the
+ right to modify this License.
+
+ 4.2. Effect of New Versions.
+
+ You may always continue to use, distribute or otherwise
+ make the Covered Software available under the terms of the
+ version of the License under which You originally received
+ the Covered Software. If the Initial Developer includes a
+ notice in the Original Software prohibiting it from being
+ distributed or otherwise made available under any
+ subsequent version of the License, You must distribute and
+ make the Covered Software available under the terms of the
+ version of the License under which You originally received
+ the Covered Software. Otherwise, You may also choose to
+ use, distribute or otherwise make the Covered Software
+ available under the terms of any subsequent version of the
+ License published by the license steward.
+
+ 4.3. Modified Versions.
+
+ When You are an Initial Developer and You want to create a
+ new license for Your Original Software, You may create and
+ use a modified version of this License if You: (a) rename
+ the license and remove any references to the name of the
+ license steward (except to note that the license differs
+ from this License); and (b) otherwise make it clear that
+ the license contains terms which differ from this License.
+
+
+ 5. DISCLAIMER OF WARRANTY.
+
+ COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS"
+ BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
+ INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED
+ SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR
+ PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND
+ PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY
+ COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE
+ INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF
+ ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF
+ WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
+ ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS
+ DISCLAIMER.
+
+ 6. TERMINATION.
+
+ 6.1. This License and the rights granted hereunder will
+ terminate automatically if You fail to comply with terms
+ herein and fail to cure such breach within 30 days of
+ becoming aware of the breach. Provisions which, by their
+ nature, must remain in effect beyond the termination of
+ this License shall survive.
+
+ 6.2. If You assert a patent infringement claim (excluding
+ declaratory judgment actions) against Initial Developer or
+ a Contributor (the Initial Developer or Contributor against
+ whom You assert such claim is referred to as "Participant")
+ alleging that the Participant Software (meaning the
+ Contributor Version where the Participant is a Contributor
+ or the Original Software where the Participant is the
+ Initial Developer) directly or indirectly infringes any
+ patent, then any and all rights granted directly or
+ indirectly to You by such Participant, the Initial
+ Developer (if the Initial Developer is not the Participant)
+ and all Contributors under Sections 2.1 and/or 2.2 of this
+ License shall, upon 60 days notice from Participant
+ terminate prospectively and automatically at the expiration
+ of such 60 day notice period, unless if within such 60 day
+ period You withdraw Your claim with respect to the
+ Participant Software against such Participant either
+ unilaterally or pursuant to a written agreement with
+ Participant.
+
+ 6.3. In the event of termination under Sections 6.1 or 6.2
+ above, all end user licenses that have been validly granted
+ by You or any distributor hereunder prior to termination
+ (excluding licenses granted to You by any distributor)
+ shall survive termination.
+
+ 7. LIMITATION OF LIABILITY.
+
+ UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
+ (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE
+ INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF
+ COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE
+ LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR
+ CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT
+ LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK
+ STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
+ COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
+ INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
+ LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL
+ INJURY RESULTING FROM SUCH PARTY�S NEGLIGENCE TO THE EXTENT
+ APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO
+ NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR
+ CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT
+ APPLY TO YOU.
+
+ 8. U.S. GOVERNMENT END USERS.
+
+ The Covered Software is a "commercial item," as that term is
+ defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial
+ computer software" (as that term is defined at 48 C.F.R. �
+ 252.227-7014(a)(1)) and "commercial computer software
+ documentation" as such terms are used in 48 C.F.R. 12.212 (Sept.
+ 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1
+ through 227.7202-4 (June 1995), all U.S. Government End Users
+ acquire Covered Software with only those rights set forth herein.
+ This U.S. Government Rights clause is in lieu of, and supersedes,
+ any other FAR, DFAR, or other clause or provision that addresses
+ Government rights in computer software under this License.
+
+ 9. MISCELLANEOUS.
+
+ This License represents the complete agreement concerning subject
+ matter hereof. If any provision of this License is held to be
+ unenforceable, such provision shall be reformed only to the
+ extent necessary to make it enforceable. This License shall be
+ governed by the law of the jurisdiction specified in a notice
+ contained within the Original Software (except to the extent
+ applicable law, if any, provides otherwise), excluding such
+ jurisdiction�s conflict-of-law provisions. Any litigation
+ relating to this License shall be subject to the jurisdiction of
+ the courts located in the jurisdiction and venue specified in a
+ notice contained within the Original Software, with the losing
+ party responsible for costs, including, without limitation, court
+ costs and reasonable attorneys� fees and expenses. The
+ application of the United Nations Convention on Contracts for the
+ International Sale of Goods is expressly excluded. Any law or
+ regulation which provides that the language of a contract shall
+ be construed against the drafter shall not apply to this License.
+ You agree that You alone are responsible for compliance with the
+ United States export administration regulations (and the export
+ control laws and regulation of any other countries) when You use,
+ distribute or otherwise make available any Covered Software.
+
+ 10. RESPONSIBILITY FOR CLAIMS.
+
+ As between Initial Developer and the Contributors, each party is
+ responsible for claims and damages arising, directly or
+ indirectly, out of its utilization of rights under this License
+ and You agree to work with Initial Developer and Contributors to
+ distribute such responsibility on an equitable basis. Nothing
+ herein is intended or shall be deemed to constitute any admission
+ of liability.
+
+
+---------------------------------------------------------------------------
+
+
+Sun Microsystems, Inc. ("Sun") ENTITLEMENT for SOFTWARE
+
+Licensee/Company: Entity receiving Software.
+
+Effective Date: Date of delivery of the Software to You.
+
+Software: Webservices Metadata for Java Platform V2.0.
+
+License Term: Perpetual (subject to termination under the SLA).
+
+Licensed Unit: Software Copy.
+
+Licensed unit Count: Unlimited.
+
+Permitted Uses:
+
+1. You may reproduce and use the Software for Your own Individual, Commercial and Research and Instructional Use only for the purposes of designing, developing, testing, and running Your applets and applications ("Programs").
+
+2. Subject to the terms and conditions of this Agreement and restrictions and exceptions set forth in the Software's documentation, You may reproduce and distribute portions of Software identified as a redistributable in the documentation (each a "Redistributable"), provided that You comply with the following (note that You may be entitled to reproduce and distribute other portions of the Software not defined in the documentation as a Redistributable under certain other licenses as described in the THIRDPARTYLICENSEREADME):
+
+(a) You distribute Redistributable complete and unmodified and only bundled as part of Your Programs,
+
+(b) Your Programs add significant and primary functionality to the Redistributable,
+
+(c) You distribute Redistributable for the sole purpose of running Your Programs,
+
+(d) You do not distribute additional software intended to replace any
+component(s) of the Redistributable,
+
+(e) You do not remove or alter any proprietary legends or notices contained in or on the Redistributable.
+
+(f) You only distribute the Redistributable subject to a license agreement that protects Sun's interests consistent with the terms contained in this
+Agreement, and
+
+(g) You agree to defend and indemnify Sun and its licensors from and against any damages, costs, liabilities, settlement amounts and/or expenses (including attorneys' fees) incurred in connection with any claim, lawsuit or action by any third party that arises or results from the use or distribution of any and all Programs and/or Redistributable.
+
+3. Java Technology Restrictions. You may not create, modify, or change the behavior of, or authorize Your licensees to create, modify, or change the behavior of, classes, interfaces, or subpackages that are in any way identified as "java", "javax", "sun" or similar convention as specified by Sun in any naming convention designation.
+
+
+Sun Microsystems, Inc. ("Sun")
+SOFTWARE LICENSE AGREEMENT
+
+READ THE TERMS OF THIS AGREEMENT ("AGREEMENT") CAREFULLY BEFORE OPENING SOFTWARE MEDIA PACKAGE. BY OPENING SOFTWARE MEDIA PACKAGE, YOU AGREE TO THE TERMS OF THIS AGREEMENT. IF YOU ARE ACCESSING SOFTWARE ELECTRONICALLY, INDICATE YOUR ACCEPTANCE OF THESE TERMS BY SELECTING THE "ACCEPT" BUTTON AT THE END OF THIS AGREEMENT. IF YOU DO NOT AGREE TO ALL OF THE TERMS, PROMPTLY RETURN THE UNUSED SOFTWARE TO YOUR PLACE OF PURCHASE FOR A REFUND OR, IF SOFTWARE IS ACCESSED ELECTRONICALLY, SELECT THE "DECLINE" (OR "EXIT") BUTTON AT THE END OF THIS AGREEMENT. IF YOU HAVE SEPARATELY AGREED TO LICENSE TERMS ("MASTER TERMS") FOR YOUR LICENSE TO THIS SOFTWARE, THEN SECTIONS 1-5 OF THIS AGREEMENT ("SUPPLEMENTAL LICENSE TERMS") SHALL SUPPLEMENT AND SUPERSEDE THE MASTER TERMS IN RELATION TO THIS SOFTWARE.
+
+1. Definitions.
+
+(a) "Entitlement" means the collective set of applicable documents authorized by Sun evidencing your obligation to pay associated fees (if any) for the license, associated Services, and the authorized scope of use of Software under this Agreement.
+
+(b) "Licensed Unit" means the unit of measure by which your use of Software and/or Service is licensed, as described in your Entitlement.
+
+(c) "Permitted Use" means the licensed Software use(s) authorized in this Agreement as specified in your Entitlement. The Permitted Use for any bundled Sun software not specified in your Entitlement will be evaluation use as provided in Section 3.
+
+(d) "Service" means the service(s) that Sun or its delegate will provide, if any, as selected in your Entitlement and as further described in the applicable service listings at www.sun.com/service/servicelist.
+
+(e) "Software" means the Sun software described in your Entitlement. Also, certain software may be included for evaluation use under Section 3.
+
+(f) "You" and "Your" means the individual or legal entity specified in the Entitlement, or for evaluation purposes, the entity performing the evaluation.
+
+2. License Grant and Entitlement.
+
+Subject to the terms of your Entitlement, Sun grants you a nonexclusive, nontransferable limited license to use Software for its Permitted Use for the license term. Your Entitlement will specify (a) Software licensed, (b) the Permitted Use, (c) the license term, and (d) the Licensed Units.
+
+Additionally, if your Entitlement includes Services, then it will also specify the (e) Service and (f) service term.
+
+If your rights to Software or Services are limited in duration and the date such rights begin is other than the purchase date, your Entitlement will provide that beginning date(s).
+
+The Entitlement may be delivered to you in various ways depending on the manner in which you obtain Software and Services, for example, the Entitlement may be provided in your receipt, invoice or your contract with Sun or authorized Sun reseller. It may also be in electronic format if you download Software.
+
+3. Permitted Use.
+
+As selected in your Entitlement, one or more of the following Permitted Uses will apply to your use of Software. Unless you have an Entitlement that expressly permits it, you may not use Software for any of the other Permitted Uses. If you don't have an Entitlement, or if your Entitlement doesn't cover additional software delivered to you, then such software is for your Evaluation Use.
+
+(a) Evaluation Use. You may evaluate Software internally for a period of 90 days from your first use.
+
+(b) Research and Instructional Use. You may use Software internally to design, develop and test, and also to provide instruction on such uses.
+
+(c) Individual Use. You may use Software internally for personal, individual use.
+
+(d) Commercial Use. You may use Software internally for your own commercial purposes.
+
+(e) Service Provider Use. You may make Software functionality accessible (but not by providing Software itself or through outsourcing services) to your end users in an extranet deployment, but not to your affiliated companies or to government agencies.
+
+4. Licensed Units.
+
+Your Permitted Use is limited to the number of Licensed Units stated in your Entitlement. If you require additional Licensed Units, you will need additional Entitlement(s).
+
+5. Restrictions.
+
+(a) The copies of Software provided to you under this Agreement are licensed, not sold, to you by Sun. Sun reserves all rights not expressly granted. (b) You may make a single archival copy of Software, but otherwise may not copy, modify, or distribute Software. However if the Sun documentation accompanying Software lists specific portions of Software, such as header files, class libraries, reference source code, and/or redistributable files, that may be handled differently, you may do so only as provided in the Sun documentation. (c) You may not rent, lease, lend or encumber Software. (d) Unless enforcement is prohibited by applicable law, you may not decompile, or reverse engineer Software. (e) The terms and conditions of this Agreement will apply to any Software updates, provided to you at Sun's discretion, that replace and/or supplement the original Software, unless such update contains a separate license. (f) You may not publish or provide the results of any benchmark !
or comparison tests run on Software to any third party without the prior written consent of Sun. (g) Software is confidential and copyrighted. (h) Unless otherwise specified, if Software is delivered with embedded or bundled software that enables functionality of Software, you may not use such software on a stand-alone basis or use any portion of such software to interoperate with any program(s) other than Software. (i) Software may contain programs that perform automated collection of system data and/or automated software updating services. System data collected through such programs may be used by Sun, its subcontractors, and its service delivery partners for the purpose of providing you with remote system services and/or improving Sun's software and systems. (j) Software is not designed, licensed or intended for use in the design, construction, operation or maintenance of any nuclear facility and Sun and its licensors disclaim any express or implied warranty of fitness f!
or such uses. (k) No right, title or interest in or to any trademark,
service mark, logo or trade name of Sun or its licensors is granted under this Agreement.
+
+6. Term and Termination.
+
+The license and service term are set forth in your Entitlement(s). Your rights under this Agreement will terminate immediately without notice from Sun if you materially breach it or take any action in derogation of Sun's and/or its licensors' rights to Software. Sun may terminate this Agreement should any Software become, or in Sun's reasonable opinion likely to become, the subject of a claim of intellectual property infringement or trade secret misappropriation. Upon termination, you will cease use of, and destroy, Software and confirm compliance in writing to Sun. Sections 1, 5, 6, 7, and 9-15 will survive termination of the Agreement.
+
+7. Java Compatibility and Open Source.
+
+Software may contain Java technology. You may not create additional classes to, or modifications of, the Java technology, except under compatibility requirements available under a separate agreement available at www.java.net.
+
+Sun supports and benefits from the global community of open source developers, and thanks the community for its important contributions and open standards-based technology, which Sun has adopted into many of its products.
+
+Please note that portions of Software may be provided with notices and open source licenses from such communities and third parties that govern the use of those portions, and any licenses granted hereunder do not alter any rights and obligations you may have under such open source licenses, however, the disclaimer of warranty and limitation of liability provisions in this Agreement will apply to all Software in this distribution.
+
+8. Limited Warranty.
+
+Sun warrants to you that for a period of 90 days from the date of purchase, as evidenced by a copy of the receipt, the media on which Software is furnished (if any) will be free of defects in materials and workmanship under normal use. Except for the foregoing, Software is provided "AS IS". Your exclusive remedy and Sun's entire liability under this limited warranty will be at Sun's option to replace Software media or refund the fee paid for Software. Some states do not allow limitations on certain implied warranties, so the above may not apply to you. This limited warranty gives you specific legal rights. You may have others, which vary from state to state.
+
+9. Disclaimer of Warranty.
+
+UNLESS SPECIFIED IN THIS AGREEMENT, ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT ARE DISCLAIMED, EXCEPT TO THE EXTENT THAT THESE DISCLAIMERS ARE HELD TO BE LEGALLY INVALID.
+
+10. Limitation of Liability.
+
+TO THE EXTENT NOT PROHIBITED BY LAW, IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR SPECIAL, INDIRECT, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF OR RELATED TO THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. In no event will Sun's liability to you, whether in contract, tort (including negligence), or otherwise, exceed the amount paid by you for Software under this Agreement. The foregoing limitations will apply even if the above stated warranty fails of its essential purpose. Some states do not allow the exclusion of incidental or consequential damages, so some of the terms above may not be applicable to you.
+
+11. Export Regulations.
+
+All Software, documents, technical data, and any other materials delivered under this Agreement are subject to U.S. export control laws and may be subject to export or import regulations in other countries. You agree to comply strictly with these laws and regulations and acknowledge that you have the responsibility to obtain any licenses to export, re-export, or import as may be required after delivery to you.
+
+12. U.S. Government Restricted Rights.
+
+If Software is being acquired by or on behalf of the U.S. Government or by a U.S. Government prime contractor or subcontractor (at any tier), then the Government's rights in Software and accompanying documentation will be only as set forth in this Agreement; this is in accordance with 48 CFR 227.7201 through 227.7202-4 (for Department of Defense (DOD) acquisitions) and with 48 CFR 2.101 and 12.212 (for non-DOD acquisitions).
+
+13. Governing Law.
+
+Any action related to this Agreement will be governed by California law and controlling U.S. federal law. No choice of law rules of any jurisdiction will apply.
+
+14. Severability.
+
+If any provision of this Agreement is held to be unenforceable, this Agreement will remain in effect with the provision omitted, unless omission would frustrate the intent of the parties, in which case this Agreement will immediately terminate.
+
+15. Integration.
+
+This Agreement, including any terms contained in your Entitlement, is the entire agreement between you and Sun relating to its subject matter. It supersedes all prior or contemporaneous oral or written communications, proposals, representations and warranties and prevails over any conflicting or additional terms of any quote, order, acknowledgment, or other communication between the parties relating to its subject matter during the term of this Agreement. No modification of this Agreement will be binding, unless in writing and signed by an authorized representative of each party.
+
+Please contact Sun Microsystems, Inc. 4150 Network Circle, Santa Clara, California 95054 if you have questions.
+
Copied: projects/jbossws-wsconsume-impl/trunk/sun (from rev 3759, projects/jbossws-wsconsume-impl/sun)
18 years, 5 months
JBossWS SVN: r5024 - in stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/emulator: config and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2007-11-09 11:26:48 -0500 (Fri, 09 Nov 2007)
New Revision: 5024
Added:
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/Util.java
Removed:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/emulator/utils/
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/config/ObjectFactory.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/emulator/config/Request.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/emulator/config/RequestImpl.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/emulator/config/Response.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/emulator/config/ResponseImpl.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/emulator/config/View.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/emulator/config/ViewImpl.java
Log:
emulator minor refactoring
Added: 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 (rev 0)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/emulator/Constant.java 2007-11-09 16:26:48 UTC (rev 5024)
@@ -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.test.ws.jaxws.wsrm.emulator;
+
+/**
+ * Emulator framework constants
+ *
+ * @author richard.opalka(a)jboss.com
+ *
+ * @since Nov 9, 2007
+ */
+public final class Constant
+{
+
+ private Constant()
+ {
+ // forbidden inheritance
+ }
+
+ public static final String CONFIG_FILE = "config.file";
+ public static final String SEPARATOR = "|";
+ public static final String PARAGRAPH = "$";
+ public static final String LEFT_BRACKET = "{";
+ public static final String RIGHT_BRACKET = "}";
+ public static final String HTTP_POST = "POST";
+ public static final String HTTP_GET = "GET";
+ public static final String EQUAL = "=";
+ public static final String COMMA = ",";
+ public static final String SPACE = " ";
+ public static final String PROPERTIES = "properties";
+ public static final String MATCHES = "matches";
+ // XML configuration elements and attributes
+ public static final String NAMESPACES_ELEMENT = "namespaces";
+ public static final String NAMESPACE_ELEMENT = "namespace";
+ public static final String VIEW_ELEMENT = "view";
+ public static final String REQUEST_ELEMENT = "request";
+ public static final String RESPONSE_ELEMENT = "response";
+ public static final String SET_ELEMENT = "set";
+ public static final String CONTAINS_ELEMENT = "contains";
+ public static final String NODE_ELEMENT = "node";
+ public static final String ID_ATTRIBUTE = "id";
+ public static final String NAME_ATTRIBUTE = "name";
+ public static final String RESOURCE_ATTRIBUTE = "resource";
+ public static final String STATUS_CODE_ATTRIBUTE = "statusCode";
+ public static final String CONTENT_TYPE_ATTRIBUTE = "contentType";
+ public static final String PROPERTY_ATTRIBUTE = "property";
+ public static final String VALUE_ATTRIBUTE = "value";
+ public static final String HTTP_METHOD_ATTRIBUTE = "httpMethod";
+ public static final String PATH_INFO_ATTRIBUTE = "pathInfo";
+
+}
Property changes on: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/emulator/Constant.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
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-09 11:22:13 UTC (rev 5023)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/emulator/EndpointEmulator.java 2007-11-09 16:26:48 UTC (rev 5024)
@@ -21,36 +21,23 @@
*/
package org.jboss.test.ws.jaxws.wsrm.emulator;
-import java.io.BufferedReader;
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
+import static org.jboss.test.ws.jaxws.wsrm.emulator.Constant.*;
+
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedList;
import java.util.List;
import java.util.Map;
-import java.util.StringTokenizer;
import javax.servlet.ServletConfig;
+import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import javax.xml.namespace.QName;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-import org.jboss.test.ws.jaxws.wsrm.emulator.config.ObjectFactory;
import org.jboss.test.ws.jaxws.wsrm.emulator.config.View;
-import org.jboss.test.ws.jaxws.wsrm.emulator.utils.StringUtil;
-import org.w3c.dom.Document;
import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.xml.sax.SAXException;
/**
* This class represents Controller part of the MVC architectural pattern
@@ -62,7 +49,8 @@
public class EndpointEmulator extends HttpServlet
{
- private static final String CONFIG_FILE = "config.file";
+ private String configFile;
+ private ServletContext ctx;
private List<View> views;
@Override
@@ -70,268 +58,65 @@
{
super.init(config);
+ // initialize context variable
+ ctx = getServletContext();
+
// ensure there's a config.file servlet init parameter specified in web.xml
- String configFile = config.getInitParameter(CONFIG_FILE);
+ configFile = config.getInitParameter(CONFIG_FILE);
if (configFile == null)
throw new RuntimeException(CONFIG_FILE + " init parameter is missing");
// ensure this config.file points to correct resource inside war archive
- InputStream is = config.getServletContext().getResourceAsStream(configFile);
+ InputStream is = ctx.getResourceAsStream(configFile);
if (is == null)
- throw new RuntimeException("Resource '" + configFile + "' not found");
+ throw new RuntimeException("Resource " + configFile + " not found");
- Element root = getDocument(is, false).getDocumentElement();
- views = getViews(root, getNamespaces(root));
-
- System.out.println(views);
+ Element root = Util.getDocument(is, false).getDocumentElement();
+ views = Util.getViews(root, Util.getNamespaces(root));
}
@Override
- protected void doPost(HttpServletRequest req, HttpServletResponse resp)
+ protected void doPost(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException
{
- handleRequest("POST", req, resp);
+ handleRequest(HTTP_POST, req, res);
}
@Override
- protected void doGet(HttpServletRequest req, HttpServletResponse resp)
+ protected void doGet(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException
{
- handleRequest("GET", req, resp);
+ handleRequest(HTTP_GET, req, res);
}
- private static Document getDocument(InputStream is, boolean nsAware) throws ServletException
- {
- try
- {
- DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
- factory.setNamespaceAware(nsAware);
- return factory.newDocumentBuilder().parse(is);
- }
- catch (SAXException se)
- {
- throw new ServletException(se);
- }
- catch (ParserConfigurationException pce)
- {
- throw new ServletException(pce);
- }
- catch (IOException ie)
- {
- throw new ServletException(ie);
- }
- }
-
- private static Map<String, String> getNamespaces(Element root)
- {
- NodeList namespaces = ((Element)root.getElementsByTagName("namespaces").item(0)).getElementsByTagName("namespace");
- Map<String, String> retVal = new HashMap<String, String>();
- for (int i = 0; i < namespaces.getLength(); i++)
- {
- Element namespace = (Element)namespaces.item(i);
- retVal.put(namespace.getAttribute("name"), namespace.getAttribute("value"));
- }
- return retVal;
- }
-
- private static List<View> getViews(Element root, Map<String, String> namespaces)
- {
- List<View> retVal = new LinkedList<View>();
- NodeList views = root.getElementsByTagName("view");
- for (int i = 0; i < views.getLength(); i++)
- {
- retVal.add(ObjectFactory.getView((Element)views.item(i), namespaces));
- }
- return retVal;
- }
-
private void handleRequest(String httpMethod, HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException
{
- String requestMessage = getRequestMessage(req);
- View view = getView(httpMethod, requestMessage);
- System.out.println("Handling view: " + view.getId());
+ String requestMessage = Util.getRequestMessage(req);
+ View view = Util.getView(httpMethod, requestMessage, views);
+ ctx.log(configFile + SEPARATOR + view.getId());
Map<String, String> resProperties = view.getResponse().getProperties();
Map<String, String> reqProperties = view.getRequest().getProperties();
- String responseMessage = getResource(view.getResponse().getResource());
+ String responseMessage = Util.getResourceAsString(ctx, view.getResponse().getResource());
if (resProperties.size() > 0)
{
Map<String, String> initializedReqProperties = null;
if (reqProperties.size() > 0)
{
- initializedReqProperties = initializeProperties(requestMessage, reqProperties);
+ initializedReqProperties = Util.initializeProperties(requestMessage, reqProperties);
}
- Map<String, String> replaceMap = replaceProperties(initializedReqProperties, resProperties);
- responseMessage = modifyResponse(responseMessage, replaceMap);
+ Map<String, String> replaceMap = Util.prepareReplaceMap(initializedReqProperties, resProperties);
+ responseMessage = Util.replaceAll(responseMessage, replaceMap);
}
resp.setContentType(view.getResponse().getContentType());
+ resp.setStatus(Integer.valueOf(view.getResponse().getStatusCode()));
PrintWriter writer = resp.getWriter();
writer.print(responseMessage);
writer.flush();
writer.close();
}
- private Map<String, String> initializeProperties(String req, Map<String, String> map)
- throws ServletException, IOException
- {
- Document requestMessage = getDocument(new ByteArrayInputStream(req.getBytes()), true);
-
- Map<String, String> retVal = new HashMap<String, String>();
- for (Iterator<String> i = map.keySet().iterator(); i.hasNext(); )
- {
- String key = i.next();
- String val = map.get(key);
- Element e = getElement(requestMessage, val);
- retVal.put(key, e.getTextContent());
- }
-
- return retVal;
- }
-
- private static Map<String, String> replaceProperties(Map<String, String> reqM, Map<String, String> resM)
- {
- Map<String, String> retVal = new HashMap<String, String>();
-
- for (Iterator<String> i = resM.keySet().iterator(); i.hasNext(); )
- {
- String iKey = i.next();
- String iVal = resM.get(iKey);
- for (Iterator<String> j = reqM.keySet().iterator(); j.hasNext(); )
- {
- String jKey = j.next();
- String jVal = reqM.get(jKey);
- String jRef = "${" + jKey + "}";
- if (iVal.indexOf(jRef) != -1)
- {
- iVal = StringUtil.replace(jRef, jVal, iVal);
- }
- }
- retVal.put(iKey, iVal);
- }
-
- return retVal;
- }
-
- private View getView(String httpMethod, String req)
- throws ServletException, IOException
- {
- boolean isPost = "POST".equalsIgnoreCase(httpMethod);
- Document requestMessage = isPost ? getDocument(new ByteArrayInputStream(req.getBytes()), true) : null;
- for (View view : views)
- {
- if (httpMethod.equalsIgnoreCase(view.getRequest().getHttpMethod()))
- {
- if (matches(requestMessage, view))
- {
- return view;
- }
- }
- }
-
- return null;
- }
-
- private static boolean matches(Document req, View view)
- {
- List<String> matches = view.getRequest().getMatches();
- if ((matches == null) || (matches.size() == 0))
- return true;
-
- boolean match = true;
- for (String matchString : matches)
- {
- match = match && elementExists(req, matchString);
- }
-
- return match;
- }
-
- private static boolean elementExists(Document req, String match)
- {
- return getElement(req, match) != null;
- }
-
- private static Element getElement(Document req, String match)
- {
- Element e = null;
-
- StringTokenizer st = new StringTokenizer(match, "|");
- while (st.hasMoreTokens())
- {
- String toConvert = st.nextToken();
- QName nodeName = QName.valueOf(toConvert);
- e = getChildElement(e != null ? e : req, nodeName);
- if (e == null) return null;
- }
-
- return e;
- }
-
- private static Element getChildElement(Node e, QName nodeQName)
- {
- NodeList childNodes = e.getChildNodes();
- if (childNodes == null)
- return null;
-
- for (int i = 0; i < childNodes.getLength(); i++)
- {
- Node node = childNodes.item(i);
- if (node.getNodeType() == Node.ELEMENT_NODE)
- {
- Element element = (Element)node;
- boolean namespaceMatches = nodeQName.getNamespaceURI().equals(element.getNamespaceURI());
- boolean nodeNameMatches = nodeQName.getLocalPart().equals(element.getLocalName());
- if (namespaceMatches && nodeNameMatches) return element;
- }
- }
-
- return null;
- }
-
- private String modifyResponse(String response, Map<String, String> replaceMap)
- {
- if ((replaceMap != null) && (replaceMap.size() > 0))
- {
- for (Iterator<String> iterator = replaceMap.keySet().iterator(); iterator.hasNext(); )
- {
- String key = iterator.next();
- String val = replaceMap.get(key);
- response = StringUtil.replace("${" + key + "}", val, response);
- }
- }
- return response;
- }
-
- private String getResource(String resource) throws IOException
- {
- return toString(getServletContext().getResourceAsStream(resource));
- }
-
- private String getRequestMessage(HttpServletRequest req) throws IOException
- {
- BufferedReader reader = req.getReader();
- String line = null;
- StringBuilder sb = new StringBuilder();
- while ((line = reader.readLine()) != null)
- {
- sb.append(line);
- }
- return sb.toString();
- }
-
- private String toString(InputStream is) throws IOException
- {
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- byte[] buffer = new byte[1024];
- int offset = -1;
- while ((offset = is.read(buffer, 0, buffer.length)) != -1)
- {
- baos.write(buffer, 0, offset);
- }
- return baos.toString();
- }
-
}
\ No newline at end of file
Added: 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 (rev 0)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/emulator/Util.java 2007-11-09 16:26:48 UTC (rev 5024)
@@ -0,0 +1,298 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.wsrm.emulator;
+
+import static org.jboss.test.ws.jaxws.wsrm.emulator.Constant.*;
+
+import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.StringTokenizer;
+
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.xml.namespace.QName;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.jboss.test.ws.jaxws.wsrm.emulator.config.ObjectFactory;
+import org.jboss.test.ws.jaxws.wsrm.emulator.config.View;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.SAXException;
+
+/**
+ * Utility class
+ *
+ * @author richard.opalka(a)jboss.com
+ *
+ * @since Nov 7, 2007
+ */
+public final class Util
+{
+
+ private Util()
+ {
+ // forbidden inheritance
+ }
+
+ public static String replace(String oldString, String newString, String data)
+ {
+ int fromIndex = 0;
+ int index = 0;
+ StringBuilder result = new StringBuilder();
+
+ while ((index = data.indexOf(oldString, fromIndex)) >= 0)
+ {
+ result.append(data.substring(fromIndex, index));
+ result.append(newString);
+ fromIndex = index + oldString.length();
+ }
+ result.append(data.substring(fromIndex));
+ return result.toString();
+ }
+
+ public static String getResourceAsString(ServletContext ctx, String resource)
+ throws IOException
+ {
+ return toString(ctx.getResourceAsStream(resource));
+ }
+
+ public static Document getDocument(InputStream is, boolean nsAware)
+ throws ServletException
+ {
+ try
+ {
+ DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+ factory.setNamespaceAware(nsAware);
+ return factory.newDocumentBuilder().parse(is);
+ }
+ catch (SAXException se)
+ {
+ throw new ServletException(se);
+ }
+ catch (ParserConfigurationException pce)
+ {
+ throw new ServletException(pce);
+ }
+ catch (IOException ie)
+ {
+ throw new ServletException(ie);
+ }
+ }
+
+ public static Map<String, String> getNamespaces(Element root)
+ {
+ NodeList namespaces = ((Element)root.getElementsByTagName(NAMESPACES_ELEMENT).item(0)).getElementsByTagName(NAMESPACE_ELEMENT);
+ Map<String, String> retVal = new HashMap<String, String>();
+ for (int i = 0; i < namespaces.getLength(); i++)
+ {
+ Element namespace = (Element)namespaces.item(i);
+ String key = PARAGRAPH + LEFT_BRACKET + namespace.getAttribute(NAME_ATTRIBUTE) + RIGHT_BRACKET;
+ retVal.put(key, namespace.getAttribute(VALUE_ATTRIBUTE));
+ }
+ return retVal;
+ }
+
+ public static List<View> getViews(Element root, Map<String, String> namespaces)
+ {
+ List<View> retVal = new LinkedList<View>();
+ NodeList views = root.getElementsByTagName(VIEW_ELEMENT);
+ for (int i = 0; i < views.getLength(); i++)
+ {
+ retVal.add(ObjectFactory.getView((Element)views.item(i), namespaces));
+ }
+ return retVal;
+ }
+
+ public static Map<String, String> initializeProperties(String reqMsg, Map<String, String> reqMap)
+ throws ServletException, IOException
+ {
+ Document msgDoc = getDocument(new ByteArrayInputStream(reqMsg.getBytes()), true);
+
+ Map<String, String> retVal = new HashMap<String, String>();
+ for (Iterator<String> i = reqMap.keySet().iterator(); i.hasNext(); )
+ {
+ String key = i.next();
+ String val = reqMap.get(key);
+ Element e = getElement(msgDoc, val);
+ retVal.put(key, e == null ? "" : e.getTextContent());
+ }
+
+ return retVal;
+ }
+
+ public static Map<String, String> prepareReplaceMap(Map<String, String> reqM, Map<String, String> resM)
+ {
+ Map<String, String> retVal = new HashMap<String, String>();
+
+ for (Iterator<String> i = resM.keySet().iterator(); i.hasNext(); )
+ {
+ String iKey = i.next();
+ String iVal = resM.get(iKey);
+ for (Iterator<String> j = reqM.keySet().iterator(); j.hasNext(); )
+ {
+ String jKey = j.next();
+ String jVal = reqM.get(jKey);
+ String jRef = PARAGRAPH + LEFT_BRACKET + jKey + RIGHT_BRACKET;
+ if (iVal.indexOf(jRef) != -1)
+ {
+ iVal = Util.replace(jRef, jVal, iVal);
+ }
+ }
+ retVal.put(PARAGRAPH + LEFT_BRACKET + iKey + RIGHT_BRACKET, iVal);
+ }
+
+ return retVal;
+ }
+
+ public static View getView(String httpMethod, String req, List<View> views)
+ throws ServletException, IOException
+ {
+ boolean isPost = HTTP_POST.equalsIgnoreCase(httpMethod);
+ Document requestMessage = isPost ? getDocument(new ByteArrayInputStream(req.getBytes()), true) : null;
+ for (View view : views)
+ {
+ if (httpMethod.equalsIgnoreCase(view.getRequest().getHttpMethod()))
+ {
+ if (matches(requestMessage, view))
+ {
+ return view;
+ }
+ }
+ }
+
+ return null;
+ }
+
+ public static boolean matches(Document req, View view)
+ {
+ List<String> matches = view.getRequest().getMatches();
+ if ((matches == null) || (matches.size() == 0))
+ return true;
+
+ boolean match = true;
+ for (String matchString : matches)
+ {
+ match = match && elementExists(req, matchString);
+ }
+
+ return match;
+ }
+
+ public static boolean elementExists(Document doc, String match)
+ {
+ return getElement(doc, match) != null;
+ }
+
+ public static Element getElement(Document req, String match)
+ {
+ Element e = null;
+
+ StringTokenizer st = new StringTokenizer(match, SEPARATOR);
+ while (st.hasMoreTokens())
+ {
+ String toConvert = st.nextToken();
+ QName nodeName = QName.valueOf(toConvert);
+ e = getChildElement(e != null ? e : req, nodeName);
+ if (e == null) return null;
+ }
+
+ return e;
+ }
+
+ public static Element getChildElement(Node e, QName nodeQName)
+ {
+ NodeList childNodes = e.getChildNodes();
+ if (childNodes == null)
+ return null;
+
+ for (int i = 0; i < childNodes.getLength(); i++)
+ {
+ Node node = childNodes.item(i);
+ if (node.getNodeType() == Node.ELEMENT_NODE)
+ {
+ Element element = (Element)node;
+ boolean namespaceMatches = nodeQName.getNamespaceURI().equals(element.getNamespaceURI());
+ boolean localNameMatches = nodeQName.getLocalPart().equals(element.getLocalName());
+ if (namespaceMatches && localNameMatches)
+ return element;
+ }
+ }
+
+ return null;
+ }
+
+ public static String replaceAll(String response, Map<String, String> replaceMap)
+ {
+ if ((replaceMap != null) && (replaceMap.size() > 0))
+ {
+ for (Iterator<String> iterator = replaceMap.keySet().iterator(); iterator.hasNext(); )
+ {
+ String oldString = iterator.next();
+ String newString = replaceMap.get(oldString);
+ response = Util.replace(oldString, newString, response);
+ }
+ }
+ return response;
+ }
+
+ public static String getRequestMessage(HttpServletRequest req)
+ throws IOException
+ {
+ BufferedReader reader = req.getReader();
+ String line = null;
+ StringBuilder sb = new StringBuilder();
+ while ((line = reader.readLine()) != null)
+ {
+ sb.append(line);
+ }
+ return sb.toString();
+ }
+
+ public static String toString(InputStream is)
+ throws IOException
+ {
+ if (is == null)
+ return "";
+
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ byte[] buffer = new byte[1024];
+ int offset = -1;
+ while ((offset = is.read(buffer, 0, buffer.length)) != -1)
+ {
+ baos.write(buffer, 0, offset);
+ }
+ return baos.toString();
+ }
+
+}
Property changes on: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/emulator/Util.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/emulator/config/ObjectFactory.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/emulator/config/ObjectFactory.java 2007-11-09 11:22:13 UTC (rev 5023)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/emulator/config/ObjectFactory.java 2007-11-09 16:26:48 UTC (rev 5024)
@@ -26,7 +26,7 @@
import org.w3c.dom.Element;
/**
- * TODO: Add comment
+ * Factory creating configuration objects
*
* @author richard.opalka(a)jboss.com
*
Modified: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/emulator/config/Request.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/emulator/config/Request.java 2007-11-09 11:22:13 UTC (rev 5023)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/emulator/config/Request.java 2007-11-09 16:26:48 UTC (rev 5024)
@@ -25,7 +25,7 @@
import java.util.Map;
/**
- * TODO: Add comment
+ * Interface representing <b>/views/view/request</b> configuration element content
*
* @author richard.opalka(a)jboss.com
*
Modified: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/emulator/config/RequestImpl.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/emulator/config/RequestImpl.java 2007-11-09 11:22:13 UTC (rev 5023)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/emulator/config/RequestImpl.java 2007-11-09 16:26:48 UTC (rev 5024)
@@ -21,19 +21,20 @@
*/
package org.jboss.test.ws.jaxws.wsrm.emulator.config;
+import static org.jboss.test.ws.jaxws.wsrm.emulator.Constant.*;
+
import java.util.Collections;
import java.util.HashMap;
-import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
-import org.jboss.test.ws.jaxws.wsrm.emulator.utils.StringUtil;
+import org.jboss.test.ws.jaxws.wsrm.emulator.Util;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
/**
- * TODO: Add comment
+ * Immutable object implementation representing <b>/views/view/request</b> configuration element content
*
* @author richard.opalka(a)jboss.com
*
@@ -49,33 +50,34 @@
RequestImpl(Element e, Map<String, String> namespaces)
{
- this.httpMethod = e.getAttribute("httpMethod");
- this.pathInfo = e.getAttribute("pathInfo");
- NodeList contains = e.getElementsByTagName("contains");
+ this.httpMethod = e.getAttribute(HTTP_METHOD_ATTRIBUTE);
+ this.pathInfo = e.getAttribute(PATH_INFO_ATTRIBUTE);
+ NodeList contains = e.getElementsByTagName(CONTAINS_ELEMENT);
if ((contains != null) && (contains.getLength() == 1))
{
- NodeList nodes = ((Element)contains.item(0)).getElementsByTagName("node");
+ NodeList nodes = ((Element)contains.item(0)).getElementsByTagName(NODE_ELEMENT);
List<String> toFill = new LinkedList<String>();
this.matches = Collections.unmodifiableList(toFill);
for (int i = 0; i < nodes.getLength(); i++)
{
- toFill.add(replace(((Element)nodes.item(i)).getAttribute("name"), namespaces));
+ String nameAttrValue = ((Element)nodes.item(i)).getAttribute(NAME_ATTRIBUTE);
+ toFill.add(Util.replaceAll(nameAttrValue, namespaces));
}
}
else
{
this.matches = Collections.emptyList();
}
- NodeList setNodes = e.getElementsByTagName("set");
+ NodeList setNodes = e.getElementsByTagName(SET_ELEMENT);
if ((setNodes != null) && (setNodes.getLength() > 0))
{
Map<String, String> toFill = new HashMap<String, String>();
this.properties = Collections.unmodifiableMap(toFill);
for (int i = 0; i < setNodes.getLength(); i++)
{
- String key = ((Element)setNodes.item(i)).getAttribute("property");
- String val = ((Element)setNodes.item(i)).getAttribute("value");
- toFill.put(key, replace(val, namespaces));
+ String key = ((Element)setNodes.item(i)).getAttribute(PROPERTY_ATTRIBUTE);
+ String val = ((Element)setNodes.item(i)).getAttribute(VALUE_ATTRIBUTE);
+ toFill.put(key, Util.replaceAll(val, namespaces));
}
}
else
@@ -83,46 +85,35 @@
this.properties = Collections.emptyMap();
}
}
-
- private static String replace(String s, Map<String, String> namespaces)
+
+ public final String getHttpMethod()
{
- for (Iterator<String> i = namespaces.keySet().iterator(); i.hasNext(); )
- {
- String key = i.next();
- String val = namespaces.get(key);
- s = StringUtil.replace("${" + key + "}", val, s);
- }
- return s;
- }
-
- public String getHttpMethod()
- {
return this.httpMethod;
}
- public List<String> getMatches()
+ public final List<String> getMatches()
{
return this.matches;
}
- public String getPathInfo()
+ public final String getPathInfo()
{
return this.pathInfo;
}
- public Map<String, String> getProperties()
+ public final Map<String, String> getProperties()
{
return this.properties;
}
- public String toString()
+ public final String toString()
{
StringBuilder sb = new StringBuilder();
- sb.append("REQUEST {");
- sb.append("httpMethod=" + this.httpMethod + ", ");
- sb.append("pathInfo=" + this.pathInfo + ", ");
- sb.append("properties=" + this.properties + ", ");
- sb.append("matches=" + this.matches + "}");
+ sb.append(REQUEST_ELEMENT).append(EQUAL).append(LEFT_BRACKET);
+ sb.append(HTTP_METHOD_ATTRIBUTE).append(EQUAL).append(this.httpMethod).append(COMMA).append(SPACE);
+ sb.append(PATH_INFO_ATTRIBUTE).append(EQUAL).append(this.pathInfo).append(COMMA).append(SPACE);
+ sb.append(PROPERTIES).append(EQUAL).append(this.properties).append(COMMA).append(SPACE);
+ sb.append(MATCHES).append(EQUAL).append(this.matches).append(RIGHT_BRACKET);
return sb.toString();
}
Modified: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/emulator/config/Response.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/emulator/config/Response.java 2007-11-09 11:22:13 UTC (rev 5023)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/emulator/config/Response.java 2007-11-09 16:26:48 UTC (rev 5024)
@@ -24,7 +24,7 @@
import java.util.Map;
/**
- * TODO: Add comment
+ * Interface representing <b>/views/view/response</b> configuration element content
*
* @author richard.opalka(a)jboss.com
*
Modified: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/emulator/config/ResponseImpl.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/emulator/config/ResponseImpl.java 2007-11-09 11:22:13 UTC (rev 5023)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/emulator/config/ResponseImpl.java 2007-11-09 16:26:48 UTC (rev 5024)
@@ -21,17 +21,17 @@
*/
package org.jboss.test.ws.jaxws.wsrm.emulator.config;
+import static org.jboss.test.ws.jaxws.wsrm.emulator.Constant.*;
+
import java.util.Collections;
import java.util.HashMap;
-import java.util.Iterator;
import java.util.Map;
-
-import org.jboss.test.ws.jaxws.wsrm.emulator.utils.StringUtil;
+import org.jboss.test.ws.jaxws.wsrm.emulator.Util;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
/**
- * TODO: Add comment
+ * Immutable object implementation representing <b>/views/view/response</b> configuration element content
*
* @author richard.opalka(a)jboss.com
*
@@ -47,19 +47,19 @@
ResponseImpl(Element e, Map<String, String> namespaces)
{
- this.resource = e.getAttribute("resource");
- this.statusCode = e.getAttribute("statusCode");
- this.contentType = e.getAttribute("contentType");
- NodeList setNodes = e.getElementsByTagName("set");
+ this.resource = e.getAttribute(RESOURCE_ATTRIBUTE);
+ this.statusCode = e.getAttribute(STATUS_CODE_ATTRIBUTE);
+ this.contentType = e.getAttribute(CONTENT_TYPE_ATTRIBUTE);
+ NodeList setNodes = e.getElementsByTagName(SET_ELEMENT);
if ((setNodes != null) && (setNodes.getLength() > 0))
{
Map<String, String> toFill = new HashMap<String, String>();
this.properties = Collections.unmodifiableMap(toFill);
for (int i = 0; i < setNodes.getLength(); i++)
{
- String key = ((Element)setNodes.item(i)).getAttribute("property");
- String val = ((Element)setNodes.item(i)).getAttribute("value");
- toFill.put(key, replace(val, namespaces));
+ String key = ((Element)setNodes.item(i)).getAttribute(PROPERTY_ATTRIBUTE);
+ String val = ((Element)setNodes.item(i)).getAttribute(VALUE_ATTRIBUTE);
+ toFill.put(key, Util.replaceAll(val, namespaces));
}
}
else
@@ -68,45 +68,34 @@
}
}
- private static String replace(String s, Map<String, String> namespaces)
+ public final String getContentType()
{
- for (Iterator<String> i = namespaces.keySet().iterator(); i.hasNext(); )
- {
- String key = i.next();
- String val = namespaces.get(key);
- s = StringUtil.replace("${" + key + "}", val, s);
- }
- return s;
- }
-
- public String getContentType()
- {
return this.contentType;
}
- public Map<String, String> getProperties()
+ public final Map<String, String> getProperties()
{
return this.properties;
}
- public String getResource()
+ public final String getResource()
{
return this.resource;
}
- public String getStatusCode()
+ public final String getStatusCode()
{
return this.statusCode;
}
- public String toString()
+ public final String toString()
{
StringBuilder sb = new StringBuilder();
- sb.append("RESPONSE {");
- sb.append("resource=" + this.resource + ", ");
- sb.append("statusCode=" + this.statusCode + ", ");
- sb.append("contentType=" + this.contentType + ", ");
- sb.append("properties=" + this.properties + "}");
+ sb.append(RESPONSE_ELEMENT).append(EQUAL).append(LEFT_BRACKET);
+ sb.append(RESOURCE_ATTRIBUTE).append(EQUAL).append(this.resource).append(COMMA).append(SPACE);
+ sb.append(STATUS_CODE_ATTRIBUTE).append(EQUAL).append(this.statusCode).append(COMMA).append(SPACE);
+ sb.append(CONTENT_TYPE_ATTRIBUTE).append(EQUAL).append(this.contentType).append(COMMA).append(SPACE);
+ sb.append(PROPERTIES).append(EQUAL).append(this.properties).append(RIGHT_BRACKET);
return sb.toString();
}
Modified: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/emulator/config/View.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/emulator/config/View.java 2007-11-09 11:22:13 UTC (rev 5023)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/emulator/config/View.java 2007-11-09 16:26:48 UTC (rev 5024)
@@ -22,7 +22,7 @@
package org.jboss.test.ws.jaxws.wsrm.emulator.config;
/**
- * TODO: Add comment
+ * Interface representing <b>/views/view</b> configuration element content
*
* @author richard.opalka(a)jboss.com
*
Modified: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/emulator/config/ViewImpl.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/emulator/config/ViewImpl.java 2007-11-09 11:22:13 UTC (rev 5023)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/emulator/config/ViewImpl.java 2007-11-09 16:26:48 UTC (rev 5024)
@@ -21,13 +21,14 @@
*/
package org.jboss.test.ws.jaxws.wsrm.emulator.config;
+import static org.jboss.test.ws.jaxws.wsrm.emulator.Constant.*;
+
import java.util.Map;
-
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
/**
- * TODO: Add comment
+ * Immutable object implementation representing <b>/views/view</b> configuration element content
*
* @author richard.opalka(a)jboss.com
*
@@ -42,35 +43,35 @@
ViewImpl(Element e, Map<String, String> namespaces)
{
- this.id = e.getAttribute("id");
- NodeList response = e.getElementsByTagName("response");
- this.res = (response == null) ? null : ObjectFactory.getResponse((Element)response.item(0), namespaces);
- NodeList request = e.getElementsByTagName("request");
- this.req = (request == null) ? null : ObjectFactory.getRequest((Element)request.item(0), namespaces);
+ this.id = e.getAttribute(ID_ATTRIBUTE);
+ NodeList response = e.getElementsByTagName(RESPONSE_ELEMENT);
+ this.res = ObjectFactory.getResponse((Element)response.item(0), namespaces);
+ NodeList request = e.getElementsByTagName(REQUEST_ELEMENT);
+ this.req = ObjectFactory.getRequest((Element)request.item(0), namespaces);
}
- public String getId()
+ public final String getId()
{
return this.id;
}
- public Request getRequest()
+ public final Request getRequest()
{
return this.req;
}
- public Response getResponse()
+ public final Response getResponse()
{
return this.res;
}
- public String toString()
+ public final String toString()
{
StringBuilder sb = new StringBuilder();
- sb.append("VIEW {");
- sb.append("id=" + id + ", ");
- sb.append("request=" + req + ", ");
- sb.append("response=" + res + "}");
+ sb.append(VIEW_ELEMENT).append(EQUAL).append(LEFT_BRACKET);
+ sb.append(ID_ATTRIBUTE).append(EQUAL).append(id).append(COMMA).append(SPACE);
+ sb.append(REQUEST_ELEMENT).append(EQUAL).append(req).append(COMMA).append(SPACE);
+ sb.append(RESPONSE_ELEMENT).append(EQUAL).append(res).append(RIGHT_BRACKET);
return sb.toString();
}
18 years, 5 months
JBossWS SVN: r5023 - in stack/native/trunk/src/test: java/org/jboss/test/ws/tools/scripts and 2 other directories.
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2007-11-09 06:22:13 -0500 (Fri, 09 Nov 2007)
New Revision: 5023
Added:
stack/native/trunk/src/test/java/org/jboss/test/ws/tools/scripts/
stack/native/trunk/src/test/java/org/jboss/test/ws/tools/scripts/ScriptTestCase.java
stack/native/trunk/src/test/resources/tools/scripts/
stack/native/trunk/src/test/resources/tools/scripts/PhoneBook.wsdl
stack/native/trunk/src/test/resources/tools/scripts/PhoneBook_PortType.java
stack/native/trunk/src/test/resources/tools/scripts/jaxrpc-mapping.xml
stack/native/trunk/src/test/resources/tools/scripts/wstools-config.xml
Removed:
stack/native/trunk/src/test/java/org/jboss/test/ws/tools/scripts/ScriptTestCase.java
stack/native/trunk/src/test/resources/tools/scripts/PhoneBook.wsdl
stack/native/trunk/src/test/resources/tools/scripts/PhoneBook_PortType.java
stack/native/trunk/src/test/resources/tools/scripts/jaxrpc-mapping.xml
stack/native/trunk/src/test/resources/tools/scripts/wstools-config.xml
Log:
svn merge -r5018:5021 https://svn.jboss.org/repos/jbossws/stack/native/branches/jbossws-native-...
Copied: stack/native/trunk/src/test/java/org/jboss/test/ws/tools/scripts (from rev 5021, stack/native/branches/jbossws-native-2.0.2/src/test/java/org/jboss/test/ws/tools/scripts)
Deleted: stack/native/trunk/src/test/java/org/jboss/test/ws/tools/scripts/ScriptTestCase.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.2/src/test/java/org/jboss/test/ws/tools/scripts/ScriptTestCase.java 2007-11-09 11:13:07 UTC (rev 5021)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/tools/scripts/ScriptTestCase.java 2007-11-09 11:22:13 UTC (rev 5023)
@@ -1,102 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.ws.tools.scripts;
-
-import junit.framework.TestCase;
-
-import java.io.File;
-import java.io.IOException;
-
-/**
- * JBWS-1793: Provide a test case for the tools scripts that reside under JBOSS_HOME/bin
- *
- * @author Heiko.Braun(a)jboss.com
- * @version $Revision$
- */
-public class ScriptTestCase extends TestCase
-{
- private String TOOLS_CONFIG = "resources/tools/scripts/wstools-config.xml";
-
- private String JBOSS_HOME;
- private String JDK_HOME;
- private String TEST_EXEC_DIR;
- private String OS;
-
- protected void setUp() throws Exception
- {
- super.setUp();
-
- JBOSS_HOME = System.getProperty("jboss.home");
- TEST_EXEC_DIR = System.getProperty("test.execution.dir");
- JDK_HOME = System.getProperty("jdk.home");
- OS = System.getProperty("os.name").toLowerCase();
- }
-
- public void testWSToolsFromCommandLine() throws Exception
- {
- if(isWindowsOS())
- {
- fail("This test has not been verified on windows");
- }
-
- // use absolute path for the output to be re-usable
- String absToolsConfig= new File(TOOLS_CONFIG).getAbsolutePath();
- String absOutput = new File("wstools/java").getAbsolutePath();
-
- String command = JBOSS_HOME + "/bin/wstools.sh -config "+ TOOLS_CONFIG + " -dest wstools/java";
- Process p = executeCommand(command);
-
- // check status code
- assertStatusCode(p, "wstools");
-
- File javaSource = new File("wstools/java/org/jboss/test/ws/jbws810/PhoneBookService.java");
-
- assertTrue("Service endpoint interface not generated", javaSource.exists());
- }
-
- private Process executeCommand(String command)
- throws IOException
- {
- // be verbose
- System.out.println("cmd: " + command);
- System.out.println("test execution dir: " + TEST_EXEC_DIR);
-
- Process p = Runtime.getRuntime().exec(
- command,
- new String[] {"JBOSS_HOME="+ JBOSS_HOME, "JAVA_HOME="+ JDK_HOME}
- );
- return p;
- }
-
- private void assertStatusCode(Process p, String s)
- throws InterruptedException
- {
- // check status code
- int status = p.waitFor();
- assertTrue(s +" did exit with status " + status, status==0);
- }
-
- private boolean isWindowsOS()
- {
- return ( (OS.indexOf("nt") > -1) || (OS.indexOf("windows") > -1 ));
- }
-}
Copied: stack/native/trunk/src/test/java/org/jboss/test/ws/tools/scripts/ScriptTestCase.java (from rev 5021, stack/native/branches/jbossws-native-2.0.2/src/test/java/org/jboss/test/ws/tools/scripts/ScriptTestCase.java)
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/tools/scripts/ScriptTestCase.java (rev 0)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/tools/scripts/ScriptTestCase.java 2007-11-09 11:22:13 UTC (rev 5023)
@@ -0,0 +1,102 @@
+/*
+ * 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.tools.scripts;
+
+import junit.framework.TestCase;
+
+import java.io.File;
+import java.io.IOException;
+
+/**
+ * JBWS-1793: Provide a test case for the tools scripts that reside under JBOSS_HOME/bin
+ *
+ * @author Heiko.Braun(a)jboss.com
+ * @version $Revision$
+ */
+public class ScriptTestCase extends TestCase
+{
+ private String TOOLS_CONFIG = "resources/tools/scripts/wstools-config.xml";
+
+ private String JBOSS_HOME;
+ private String JDK_HOME;
+ private String TEST_EXEC_DIR;
+ private String OS;
+
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+
+ JBOSS_HOME = System.getProperty("jboss.home");
+ TEST_EXEC_DIR = System.getProperty("test.execution.dir");
+ JDK_HOME = System.getProperty("jdk.home");
+ OS = System.getProperty("os.name").toLowerCase();
+ }
+
+ public void testWSToolsFromCommandLine() throws Exception
+ {
+ if(isWindowsOS())
+ {
+ fail("This test has not been verified on windows");
+ }
+
+ // use absolute path for the output to be re-usable
+ String absToolsConfig= new File(TOOLS_CONFIG).getAbsolutePath();
+ String absOutput = new File("wstools/java").getAbsolutePath();
+
+ String command = JBOSS_HOME + "/bin/wstools.sh -config "+ TOOLS_CONFIG + " -dest wstools/java";
+ Process p = executeCommand(command);
+
+ // check status code
+ assertStatusCode(p, "wstools");
+
+ File javaSource = new File("wstools/java/org/jboss/test/ws/jbws810/PhoneBookService.java");
+
+ assertTrue("Service endpoint interface not generated", javaSource.exists());
+ }
+
+ private Process executeCommand(String command)
+ throws IOException
+ {
+ // be verbose
+ System.out.println("cmd: " + command);
+ System.out.println("test execution dir: " + TEST_EXEC_DIR);
+
+ Process p = Runtime.getRuntime().exec(
+ command,
+ new String[] {"JBOSS_HOME="+ JBOSS_HOME, "JAVA_HOME="+ JDK_HOME}
+ );
+ return p;
+ }
+
+ private void assertStatusCode(Process p, String s)
+ throws InterruptedException
+ {
+ // check status code
+ int status = p.waitFor();
+ assertTrue(s +" did exit with status " + status, status==0);
+ }
+
+ private boolean isWindowsOS()
+ {
+ return ( (OS.indexOf("nt") > -1) || (OS.indexOf("windows") > -1 ));
+ }
+}
Copied: stack/native/trunk/src/test/resources/tools/scripts (from rev 5021, stack/native/branches/jbossws-native-2.0.2/src/test/resources/tools/scripts)
Deleted: stack/native/trunk/src/test/resources/tools/scripts/PhoneBook.wsdl
===================================================================
--- stack/native/branches/jbossws-native-2.0.2/src/test/resources/tools/scripts/PhoneBook.wsdl 2007-11-09 11:13:07 UTC (rev 5021)
+++ stack/native/trunk/src/test/resources/tools/scripts/PhoneBook.wsdl 2007-11-09 11:22:13 UTC (rev 5023)
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<definitions name='PhoneBook' targetNamespace='http://test.jboss.org/ws/jbws810' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:ns1='http://test.jboss.org/ws/jbws810/types' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://test.jboss.org/ws/jbws810' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
- <types>
- <schema targetNamespace='http://test.jboss.org/ws/jbws810/types' xmlns='http://www.w3.org/2001/XMLSchema' xmlns:soap11-enc='http://schemas.xmlsoap.org/soap/encoding/' xmlns:tns='http://test.jboss.org/ws/jbws810/types' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
-
- <simpleType name="Person">
- <restriction base="string">
- <maxLength value="20"/>
- </restriction>
- </simpleType>
-
- <simpleType name="TelephoneNumber">
- <restriction base="string">
- <maxLength value="20"/>
- </restriction>
- </simpleType>
-
- <element name='lookup' type='tns:Person'/>
- <element name='lookupResponse' type='tns:TelephoneNumber'/>
- </schema>
- </types>
- <message name='PhoneBook_lookup'>
- <part element='ns1:lookup' name='parameters'/>
- </message>
- <message name='PhoneBook_lookupResponse'>
- <part element='ns1:lookupResponse' name='result'/>
- </message>
- <portType name='PhoneBook'>
- <operation name='lookup'>
- <input message='tns:PhoneBook_lookup'/>
- <output message='tns:PhoneBook_lookupResponse'/>
- </operation>
- </portType>
- <binding name='PhoneBookBinding' type='tns:PhoneBook'>
- <soap:binding style='document' transport='http://schemas.xmlsoap.org/soap/http'/>
- <operation name='lookup'>
- <soap:operation soapAction=''/>
- <input>
- <soap:body use='literal'/>
- </input>
- <output>
- <soap:body use='literal'/>
- </output>
- </operation>
- </binding>
- <service name='PhoneBook'>
- <port binding='tns:PhoneBookBinding' name='PhoneBookPort'>
- <soap:address location='REPLACE_WITH_ACTUAL_URL'/>
- </port>
- </service>
-</definitions>
\ No newline at end of file
Copied: stack/native/trunk/src/test/resources/tools/scripts/PhoneBook.wsdl (from rev 5021, stack/native/branches/jbossws-native-2.0.2/src/test/resources/tools/scripts/PhoneBook.wsdl)
===================================================================
--- stack/native/trunk/src/test/resources/tools/scripts/PhoneBook.wsdl (rev 0)
+++ stack/native/trunk/src/test/resources/tools/scripts/PhoneBook.wsdl 2007-11-09 11:22:13 UTC (rev 5023)
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions name='PhoneBook' targetNamespace='http://test.jboss.org/ws/jbws810' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:ns1='http://test.jboss.org/ws/jbws810/types' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://test.jboss.org/ws/jbws810' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
+ <types>
+ <schema targetNamespace='http://test.jboss.org/ws/jbws810/types' xmlns='http://www.w3.org/2001/XMLSchema' xmlns:soap11-enc='http://schemas.xmlsoap.org/soap/encoding/' xmlns:tns='http://test.jboss.org/ws/jbws810/types' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
+
+ <simpleType name="Person">
+ <restriction base="string">
+ <maxLength value="20"/>
+ </restriction>
+ </simpleType>
+
+ <simpleType name="TelephoneNumber">
+ <restriction base="string">
+ <maxLength value="20"/>
+ </restriction>
+ </simpleType>
+
+ <element name='lookup' type='tns:Person'/>
+ <element name='lookupResponse' type='tns:TelephoneNumber'/>
+ </schema>
+ </types>
+ <message name='PhoneBook_lookup'>
+ <part element='ns1:lookup' name='parameters'/>
+ </message>
+ <message name='PhoneBook_lookupResponse'>
+ <part element='ns1:lookupResponse' name='result'/>
+ </message>
+ <portType name='PhoneBook'>
+ <operation name='lookup'>
+ <input message='tns:PhoneBook_lookup'/>
+ <output message='tns:PhoneBook_lookupResponse'/>
+ </operation>
+ </portType>
+ <binding name='PhoneBookBinding' type='tns:PhoneBook'>
+ <soap:binding style='document' transport='http://schemas.xmlsoap.org/soap/http'/>
+ <operation name='lookup'>
+ <soap:operation soapAction=''/>
+ <input>
+ <soap:body use='literal'/>
+ </input>
+ <output>
+ <soap:body use='literal'/>
+ </output>
+ </operation>
+ </binding>
+ <service name='PhoneBook'>
+ <port binding='tns:PhoneBookBinding' name='PhoneBookPort'>
+ <soap:address location='REPLACE_WITH_ACTUAL_URL'/>
+ </port>
+ </service>
+</definitions>
\ No newline at end of file
Deleted: stack/native/trunk/src/test/resources/tools/scripts/PhoneBook_PortType.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.2/src/test/resources/tools/scripts/PhoneBook_PortType.java 2007-11-09 11:13:07 UTC (rev 5021)
+++ stack/native/trunk/src/test/resources/tools/scripts/PhoneBook_PortType.java 2007-11-09 11:22:13 UTC (rev 5023)
@@ -1,11 +0,0 @@
-// This class was generated by the JAXRPC SI, do not edit.
-// Contents subject to change without notice.
-// JAX-RPC Standard Implementation (1.1.3, build R1)
-// Generated source version: 1.1.3
-
-package org.jboss.test.ws.jbws810;
-
-public interface PhoneBook_PortType extends java.rmi.Remote {
- public java.lang.String lookup(java.lang.String parameters) throws
- java.rmi.RemoteException;
-}
Copied: stack/native/trunk/src/test/resources/tools/scripts/PhoneBook_PortType.java (from rev 5021, stack/native/branches/jbossws-native-2.0.2/src/test/resources/tools/scripts/PhoneBook_PortType.java)
===================================================================
--- stack/native/trunk/src/test/resources/tools/scripts/PhoneBook_PortType.java (rev 0)
+++ stack/native/trunk/src/test/resources/tools/scripts/PhoneBook_PortType.java 2007-11-09 11:22:13 UTC (rev 5023)
@@ -0,0 +1,11 @@
+// This class was generated by the JAXRPC SI, do not edit.
+// Contents subject to change without notice.
+// JAX-RPC Standard Implementation (1.1.3, build R1)
+// Generated source version: 1.1.3
+
+package org.jboss.test.ws.jbws810;
+
+public interface PhoneBook_PortType extends java.rmi.Remote {
+ public java.lang.String lookup(java.lang.String parameters) throws
+ java.rmi.RemoteException;
+}
Deleted: stack/native/trunk/src/test/resources/tools/scripts/jaxrpc-mapping.xml
===================================================================
--- stack/native/branches/jbossws-native-2.0.2/src/test/resources/tools/scripts/jaxrpc-mapping.xml 2007-11-09 11:13:07 UTC (rev 5021)
+++ stack/native/trunk/src/test/resources/tools/scripts/jaxrpc-mapping.xml 2007-11-09 11:22:13 UTC (rev 5023)
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<java-wsdl-mapping xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.1" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd">
- <package-mapping>
- <package-type>org.jboss.test.ws.jbws810</package-type>
- <namespaceURI>http://test.jboss.org/ws/jbws810</namespaceURI>
- </package-mapping>
- <service-interface-mapping>
- <service-interface>org.jboss.test.ws.jbws810.PhoneBook_Service</service-interface>
- <wsdl-service-name xmlns:serviceNS="http://test.jboss.org/ws/jbws810">serviceNS:PhoneBook</wsdl-service-name>
- <port-mapping>
- <port-name>PhoneBookPort</port-name>
- <java-port-name>PhoneBookPort</java-port-name>
- </port-mapping>
- </service-interface-mapping>
- <service-endpoint-interface-mapping>
- <service-endpoint-interface>org.jboss.test.ws.jbws810.PhoneBook_PortType</service-endpoint-interface>
- <wsdl-port-type xmlns:portTypeNS="http://test.jboss.org/ws/jbws810">portTypeNS:PhoneBook</wsdl-port-type>
- <wsdl-binding xmlns:bindingNS="http://test.jboss.org/ws/jbws810">bindingNS:PhoneBookBinding</wsdl-binding>
- <service-endpoint-method-mapping>
- <java-method-name>lookup</java-method-name>
- <wsdl-operation>lookup</wsdl-operation>
- <method-param-parts-mapping>
- <param-position>0</param-position>
- <param-type>java.lang.String</param-type>
- <wsdl-message-mapping>
- <wsdl-message xmlns:wsdlMsgNS="http://test.jboss.org/ws/jbws810">wsdlMsgNS:PhoneBook_lookup</wsdl-message>
- <wsdl-message-part-name>parameters</wsdl-message-part-name>
- <parameter-mode>IN</parameter-mode>
- </wsdl-message-mapping>
- </method-param-parts-mapping>
- <wsdl-return-value-mapping>
- <method-return-value>java.lang.String</method-return-value>
- <wsdl-message xmlns:wsdlMsgNS="http://test.jboss.org/ws/jbws810">wsdlMsgNS:PhoneBook_lookupResponse</wsdl-message>
- <wsdl-message-part-name>result</wsdl-message-part-name>
- </wsdl-return-value-mapping>
- </service-endpoint-method-mapping>
- </service-endpoint-interface-mapping>
-</java-wsdl-mapping>
Copied: stack/native/trunk/src/test/resources/tools/scripts/jaxrpc-mapping.xml (from rev 5021, stack/native/branches/jbossws-native-2.0.2/src/test/resources/tools/scripts/jaxrpc-mapping.xml)
===================================================================
--- stack/native/trunk/src/test/resources/tools/scripts/jaxrpc-mapping.xml (rev 0)
+++ stack/native/trunk/src/test/resources/tools/scripts/jaxrpc-mapping.xml 2007-11-09 11:22:13 UTC (rev 5023)
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<java-wsdl-mapping xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.1" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd">
+ <package-mapping>
+ <package-type>org.jboss.test.ws.jbws810</package-type>
+ <namespaceURI>http://test.jboss.org/ws/jbws810</namespaceURI>
+ </package-mapping>
+ <service-interface-mapping>
+ <service-interface>org.jboss.test.ws.jbws810.PhoneBook_Service</service-interface>
+ <wsdl-service-name xmlns:serviceNS="http://test.jboss.org/ws/jbws810">serviceNS:PhoneBook</wsdl-service-name>
+ <port-mapping>
+ <port-name>PhoneBookPort</port-name>
+ <java-port-name>PhoneBookPort</java-port-name>
+ </port-mapping>
+ </service-interface-mapping>
+ <service-endpoint-interface-mapping>
+ <service-endpoint-interface>org.jboss.test.ws.jbws810.PhoneBook_PortType</service-endpoint-interface>
+ <wsdl-port-type xmlns:portTypeNS="http://test.jboss.org/ws/jbws810">portTypeNS:PhoneBook</wsdl-port-type>
+ <wsdl-binding xmlns:bindingNS="http://test.jboss.org/ws/jbws810">bindingNS:PhoneBookBinding</wsdl-binding>
+ <service-endpoint-method-mapping>
+ <java-method-name>lookup</java-method-name>
+ <wsdl-operation>lookup</wsdl-operation>
+ <method-param-parts-mapping>
+ <param-position>0</param-position>
+ <param-type>java.lang.String</param-type>
+ <wsdl-message-mapping>
+ <wsdl-message xmlns:wsdlMsgNS="http://test.jboss.org/ws/jbws810">wsdlMsgNS:PhoneBook_lookup</wsdl-message>
+ <wsdl-message-part-name>parameters</wsdl-message-part-name>
+ <parameter-mode>IN</parameter-mode>
+ </wsdl-message-mapping>
+ </method-param-parts-mapping>
+ <wsdl-return-value-mapping>
+ <method-return-value>java.lang.String</method-return-value>
+ <wsdl-message xmlns:wsdlMsgNS="http://test.jboss.org/ws/jbws810">wsdlMsgNS:PhoneBook_lookupResponse</wsdl-message>
+ <wsdl-message-part-name>result</wsdl-message-part-name>
+ </wsdl-return-value-mapping>
+ </service-endpoint-method-mapping>
+ </service-endpoint-interface-mapping>
+</java-wsdl-mapping>
Deleted: stack/native/trunk/src/test/resources/tools/scripts/wstools-config.xml
===================================================================
--- stack/native/branches/jbossws-native-2.0.2/src/test/resources/tools/scripts/wstools-config.xml 2007-11-09 11:13:07 UTC (rev 5021)
+++ stack/native/trunk/src/test/resources/tools/scripts/wstools-config.xml 2007-11-09 11:22:13 UTC (rev 5023)
@@ -1,5 +0,0 @@
-<configuration>
- <wsdl-java location="resources/tools/scripts/PhoneBook.wsdl" parameter-style="bare">
- <mapping file="jaxrpc-mapping.xml"/>
- </wsdl-java>
-</configuration>
Copied: stack/native/trunk/src/test/resources/tools/scripts/wstools-config.xml (from rev 5021, stack/native/branches/jbossws-native-2.0.2/src/test/resources/tools/scripts/wstools-config.xml)
===================================================================
--- stack/native/trunk/src/test/resources/tools/scripts/wstools-config.xml (rev 0)
+++ stack/native/trunk/src/test/resources/tools/scripts/wstools-config.xml 2007-11-09 11:22:13 UTC (rev 5023)
@@ -0,0 +1,5 @@
+<configuration>
+ <wsdl-java location="resources/tools/scripts/PhoneBook.wsdl" parameter-style="bare">
+ <mapping file="jaxrpc-mapping.xml"/>
+ </wsdl-java>
+</configuration>
18 years, 5 months
JBossWS SVN: r5022 - framework/trunk/src/test/java/org/jboss/test/ws/jaxws/smoke/tools.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-11-09 06:18:34 -0500 (Fri, 09 Nov 2007)
New Revision: 5022
Modified:
framework/trunk/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/ScriptTestCase.java
Log:
javadoc
Modified: framework/trunk/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/ScriptTestCase.java
===================================================================
--- framework/trunk/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/ScriptTestCase.java 2007-11-09 11:13:07 UTC (rev 5021)
+++ framework/trunk/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/ScriptTestCase.java 2007-11-09 11:18:34 UTC (rev 5022)
@@ -21,18 +21,24 @@
*/
package org.jboss.test.ws.jaxws.smoke.tools;
+// $Id$
+
+
import junit.framework.TestCase;
import java.io.File;
import java.io.IOException;
/**
+ * [JBWS-1793] Provide a test case for the tools scripts that reside under JBOSS_HOME/bin
+ *
+ * http://jira.jboss.org/jira/browse/JBWS-1793
+ *
* Test the wsprovide and wsconsume scripts that reside
* under JBOSS_HOME/bin. This basically verifies all dependencies are
* met to run the shell scripts.
*
* @author Heiko.Braun(a)jboss.com
- * @version $Revision$
*/
public class ScriptTestCase extends TestCase
{
18 years, 5 months
JBossWS SVN: r5021 - in stack/native/branches/jbossws-native-2.0.2/src/test: java/org/jboss/test/ws/tools/scripts and 2 other directories.
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2007-11-09 06:13:07 -0500 (Fri, 09 Nov 2007)
New Revision: 5021
Added:
stack/native/branches/jbossws-native-2.0.2/src/test/java/org/jboss/test/ws/tools/scripts/
stack/native/branches/jbossws-native-2.0.2/src/test/java/org/jboss/test/ws/tools/scripts/ScriptTestCase.java
stack/native/branches/jbossws-native-2.0.2/src/test/resources/tools/scripts/
stack/native/branches/jbossws-native-2.0.2/src/test/resources/tools/scripts/PhoneBook.wsdl
stack/native/branches/jbossws-native-2.0.2/src/test/resources/tools/scripts/PhoneBook_PortType.java
stack/native/branches/jbossws-native-2.0.2/src/test/resources/tools/scripts/jaxrpc-mapping.xml
stack/native/branches/jbossws-native-2.0.2/src/test/resources/tools/scripts/wstools-config.xml
Log:
JBWS-1793: Added JBOSS_HOME/bin/wstools test coverage
Added: stack/native/branches/jbossws-native-2.0.2/src/test/java/org/jboss/test/ws/tools/scripts/ScriptTestCase.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.2/src/test/java/org/jboss/test/ws/tools/scripts/ScriptTestCase.java (rev 0)
+++ stack/native/branches/jbossws-native-2.0.2/src/test/java/org/jboss/test/ws/tools/scripts/ScriptTestCase.java 2007-11-09 11:13:07 UTC (rev 5021)
@@ -0,0 +1,102 @@
+/*
+ * 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.tools.scripts;
+
+import junit.framework.TestCase;
+
+import java.io.File;
+import java.io.IOException;
+
+/**
+ * JBWS-1793: Provide a test case for the tools scripts that reside under JBOSS_HOME/bin
+ *
+ * @author Heiko.Braun(a)jboss.com
+ * @version $Revision$
+ */
+public class ScriptTestCase extends TestCase
+{
+ private String TOOLS_CONFIG = "resources/tools/scripts/wstools-config.xml";
+
+ private String JBOSS_HOME;
+ private String JDK_HOME;
+ private String TEST_EXEC_DIR;
+ private String OS;
+
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+
+ JBOSS_HOME = System.getProperty("jboss.home");
+ TEST_EXEC_DIR = System.getProperty("test.execution.dir");
+ JDK_HOME = System.getProperty("jdk.home");
+ OS = System.getProperty("os.name").toLowerCase();
+ }
+
+ public void testWSToolsFromCommandLine() throws Exception
+ {
+ if(isWindowsOS())
+ {
+ fail("This test has not been verified on windows");
+ }
+
+ // use absolute path for the output to be re-usable
+ String absToolsConfig= new File(TOOLS_CONFIG).getAbsolutePath();
+ String absOutput = new File("wstools/java").getAbsolutePath();
+
+ String command = JBOSS_HOME + "/bin/wstools.sh -config "+ TOOLS_CONFIG + " -dest wstools/java";
+ Process p = executeCommand(command);
+
+ // check status code
+ assertStatusCode(p, "wstools");
+
+ File javaSource = new File("wstools/java/org/jboss/test/ws/jbws810/PhoneBookService.java");
+
+ assertTrue("Service endpoint interface not generated", javaSource.exists());
+ }
+
+ private Process executeCommand(String command)
+ throws IOException
+ {
+ // be verbose
+ System.out.println("cmd: " + command);
+ System.out.println("test execution dir: " + TEST_EXEC_DIR);
+
+ Process p = Runtime.getRuntime().exec(
+ command,
+ new String[] {"JBOSS_HOME="+ JBOSS_HOME, "JAVA_HOME="+ JDK_HOME}
+ );
+ return p;
+ }
+
+ private void assertStatusCode(Process p, String s)
+ throws InterruptedException
+ {
+ // check status code
+ int status = p.waitFor();
+ assertTrue(s +" did exit with status " + status, status==0);
+ }
+
+ private boolean isWindowsOS()
+ {
+ return ( (OS.indexOf("nt") > -1) || (OS.indexOf("windows") > -1 ));
+ }
+}
Property changes on: stack/native/branches/jbossws-native-2.0.2/src/test/java/org/jboss/test/ws/tools/scripts/ScriptTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/branches/jbossws-native-2.0.2/src/test/resources/tools/scripts/PhoneBook.wsdl
===================================================================
--- stack/native/branches/jbossws-native-2.0.2/src/test/resources/tools/scripts/PhoneBook.wsdl (rev 0)
+++ stack/native/branches/jbossws-native-2.0.2/src/test/resources/tools/scripts/PhoneBook.wsdl 2007-11-09 11:13:07 UTC (rev 5021)
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions name='PhoneBook' targetNamespace='http://test.jboss.org/ws/jbws810' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:ns1='http://test.jboss.org/ws/jbws810/types' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://test.jboss.org/ws/jbws810' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
+ <types>
+ <schema targetNamespace='http://test.jboss.org/ws/jbws810/types' xmlns='http://www.w3.org/2001/XMLSchema' xmlns:soap11-enc='http://schemas.xmlsoap.org/soap/encoding/' xmlns:tns='http://test.jboss.org/ws/jbws810/types' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
+
+ <simpleType name="Person">
+ <restriction base="string">
+ <maxLength value="20"/>
+ </restriction>
+ </simpleType>
+
+ <simpleType name="TelephoneNumber">
+ <restriction base="string">
+ <maxLength value="20"/>
+ </restriction>
+ </simpleType>
+
+ <element name='lookup' type='tns:Person'/>
+ <element name='lookupResponse' type='tns:TelephoneNumber'/>
+ </schema>
+ </types>
+ <message name='PhoneBook_lookup'>
+ <part element='ns1:lookup' name='parameters'/>
+ </message>
+ <message name='PhoneBook_lookupResponse'>
+ <part element='ns1:lookupResponse' name='result'/>
+ </message>
+ <portType name='PhoneBook'>
+ <operation name='lookup'>
+ <input message='tns:PhoneBook_lookup'/>
+ <output message='tns:PhoneBook_lookupResponse'/>
+ </operation>
+ </portType>
+ <binding name='PhoneBookBinding' type='tns:PhoneBook'>
+ <soap:binding style='document' transport='http://schemas.xmlsoap.org/soap/http'/>
+ <operation name='lookup'>
+ <soap:operation soapAction=''/>
+ <input>
+ <soap:body use='literal'/>
+ </input>
+ <output>
+ <soap:body use='literal'/>
+ </output>
+ </operation>
+ </binding>
+ <service name='PhoneBook'>
+ <port binding='tns:PhoneBookBinding' name='PhoneBookPort'>
+ <soap:address location='REPLACE_WITH_ACTUAL_URL'/>
+ </port>
+ </service>
+</definitions>
\ No newline at end of file
Property changes on: stack/native/branches/jbossws-native-2.0.2/src/test/resources/tools/scripts/PhoneBook.wsdl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/branches/jbossws-native-2.0.2/src/test/resources/tools/scripts/PhoneBook_PortType.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.2/src/test/resources/tools/scripts/PhoneBook_PortType.java (rev 0)
+++ stack/native/branches/jbossws-native-2.0.2/src/test/resources/tools/scripts/PhoneBook_PortType.java 2007-11-09 11:13:07 UTC (rev 5021)
@@ -0,0 +1,11 @@
+// This class was generated by the JAXRPC SI, do not edit.
+// Contents subject to change without notice.
+// JAX-RPC Standard Implementation (1.1.3, build R1)
+// Generated source version: 1.1.3
+
+package org.jboss.test.ws.jbws810;
+
+public interface PhoneBook_PortType extends java.rmi.Remote {
+ public java.lang.String lookup(java.lang.String parameters) throws
+ java.rmi.RemoteException;
+}
Property changes on: stack/native/branches/jbossws-native-2.0.2/src/test/resources/tools/scripts/PhoneBook_PortType.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/branches/jbossws-native-2.0.2/src/test/resources/tools/scripts/jaxrpc-mapping.xml
===================================================================
--- stack/native/branches/jbossws-native-2.0.2/src/test/resources/tools/scripts/jaxrpc-mapping.xml (rev 0)
+++ stack/native/branches/jbossws-native-2.0.2/src/test/resources/tools/scripts/jaxrpc-mapping.xml 2007-11-09 11:13:07 UTC (rev 5021)
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<java-wsdl-mapping xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.1" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd">
+ <package-mapping>
+ <package-type>org.jboss.test.ws.jbws810</package-type>
+ <namespaceURI>http://test.jboss.org/ws/jbws810</namespaceURI>
+ </package-mapping>
+ <service-interface-mapping>
+ <service-interface>org.jboss.test.ws.jbws810.PhoneBook_Service</service-interface>
+ <wsdl-service-name xmlns:serviceNS="http://test.jboss.org/ws/jbws810">serviceNS:PhoneBook</wsdl-service-name>
+ <port-mapping>
+ <port-name>PhoneBookPort</port-name>
+ <java-port-name>PhoneBookPort</java-port-name>
+ </port-mapping>
+ </service-interface-mapping>
+ <service-endpoint-interface-mapping>
+ <service-endpoint-interface>org.jboss.test.ws.jbws810.PhoneBook_PortType</service-endpoint-interface>
+ <wsdl-port-type xmlns:portTypeNS="http://test.jboss.org/ws/jbws810">portTypeNS:PhoneBook</wsdl-port-type>
+ <wsdl-binding xmlns:bindingNS="http://test.jboss.org/ws/jbws810">bindingNS:PhoneBookBinding</wsdl-binding>
+ <service-endpoint-method-mapping>
+ <java-method-name>lookup</java-method-name>
+ <wsdl-operation>lookup</wsdl-operation>
+ <method-param-parts-mapping>
+ <param-position>0</param-position>
+ <param-type>java.lang.String</param-type>
+ <wsdl-message-mapping>
+ <wsdl-message xmlns:wsdlMsgNS="http://test.jboss.org/ws/jbws810">wsdlMsgNS:PhoneBook_lookup</wsdl-message>
+ <wsdl-message-part-name>parameters</wsdl-message-part-name>
+ <parameter-mode>IN</parameter-mode>
+ </wsdl-message-mapping>
+ </method-param-parts-mapping>
+ <wsdl-return-value-mapping>
+ <method-return-value>java.lang.String</method-return-value>
+ <wsdl-message xmlns:wsdlMsgNS="http://test.jboss.org/ws/jbws810">wsdlMsgNS:PhoneBook_lookupResponse</wsdl-message>
+ <wsdl-message-part-name>result</wsdl-message-part-name>
+ </wsdl-return-value-mapping>
+ </service-endpoint-method-mapping>
+ </service-endpoint-interface-mapping>
+</java-wsdl-mapping>
Property changes on: stack/native/branches/jbossws-native-2.0.2/src/test/resources/tools/scripts/jaxrpc-mapping.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/branches/jbossws-native-2.0.2/src/test/resources/tools/scripts/wstools-config.xml
===================================================================
--- stack/native/branches/jbossws-native-2.0.2/src/test/resources/tools/scripts/wstools-config.xml (rev 0)
+++ stack/native/branches/jbossws-native-2.0.2/src/test/resources/tools/scripts/wstools-config.xml 2007-11-09 11:13:07 UTC (rev 5021)
@@ -0,0 +1,5 @@
+<configuration>
+ <wsdl-java location="resources/tools/scripts/PhoneBook.wsdl" parameter-style="bare">
+ <mapping file="jaxrpc-mapping.xml"/>
+ </wsdl-java>
+</configuration>
Property changes on: stack/native/branches/jbossws-native-2.0.2/src/test/resources/tools/scripts/wstools-config.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
18 years, 5 months