Author: thomas.diesler(a)jboss.com
Date: 2008-02-29 10:02:05 -0500 (Fri, 29 Feb 2008)
New Revision: 5869
Added:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/validation/
stack/native/trunk/src/main/java/org/jboss/ws/extensions/validation/SchemaExtractor.java
stack/native/trunk/src/main/java/org/jboss/ws/extensions/validation/ValidationErrorHandler.java
stack/native/trunk/src/main/java/org/jboss/ws/feature/
stack/native/trunk/src/main/java/org/jboss/ws/feature/SchemaValidationFeature.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1172/
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1172/JBWS1172TestCase.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1172/MyTestImpl.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/MyTest.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/MyTestService.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/MyWSException.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/MyWSException_Exception.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/ObjectFactory.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/PerformTest.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/PerformTestResponse.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/package-info.java
stack/native/trunk/src/test/resources/jaxws/jbws1172/
stack/native/trunk/src/test/resources/jaxws/jbws1172/TestService.wsdl
stack/native/trunk/src/test/resources/jaxws/jbws1172/TestService.xsd
stack/native/trunk/src/test/resources/jaxws/jbws1172/WEB-INF/
stack/native/trunk/src/test/resources/jaxws/jbws1172/WEB-INF/web.xml
Modified:
stack/native/trunk/ant-import-tests/build-jars-jaxws.xml
stack/native/trunk/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java
stack/native/trunk/src/main/java/org/jboss/ws/core/soap/SOAPBodyElementDoc.java
stack/native/trunk/src/main/java/org/jboss/ws/core/soap/SOAPContentElement.java
stack/native/trunk/src/main/java/org/jboss/ws/metadata/umdm/ClientEndpointMetaData.java
stack/native/trunk/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java
stack/native/trunk/src/main/java/org/jboss/ws/tools/metadata/ToolsEndpointMetaData.java
Log:
[JBWS-1172] Support schema validation for incoming/outgoing messages (WIP)
Modified: stack/native/trunk/ant-import-tests/build-jars-jaxws.xml
===================================================================
--- stack/native/trunk/ant-import-tests/build-jars-jaxws.xml 2008-02-29 14:53:27 UTC (rev
5868)
+++ stack/native/trunk/ant-import-tests/build-jars-jaxws.xml 2008-02-29 15:02:05 UTC (rev
5869)
@@ -210,6 +210,14 @@
</fileset>
</jar>
+ <!-- jaxws-jbws1172 -->
+ <war destfile="${tests.output.dir}/libs/jaxws-jbws1172.war"
webxml="${tests.output.dir}/resources/jaxws/jbws1172/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/classes">
+ <include
name="org/jboss/test/ws/jaxws/jbws1172/MyTestImpl.class"/>
+ <include name="org/jboss/test/ws/jaxws/jbws1172/types/*.class"/>
+ </classes>
+ </war>
+
<!-- jaxws-jbws1178 -->
<war destfile="${tests.output.dir}/libs/jaxws-jbws1178.war"
webxml="${tests.output.dir}/resources/jaxws/jbws1178/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/classes">
Modified:
stack/native/trunk/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java 2008-02-29
14:53:27 UTC (rev 5868)
+++
stack/native/trunk/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java 2008-02-29
15:02:05 UTC (rev 5869)
@@ -29,9 +29,11 @@
import java.net.URISyntaxException;
import java.net.URL;
import java.util.ArrayList;
+import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
+import java.util.Set;
import java.util.concurrent.Executor;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
@@ -467,6 +469,7 @@
log.warn("WebServiceFeature not implemented");
Dispatch<T> dispatch = createDispatch(portName, type, mode);
+ initWebserviceFeatures(dispatch, features);
return dispatch;
}
@@ -485,6 +488,7 @@
Dispatch<T> dispatch = createDispatch(portName, type, mode);
initAddressingProperties(dispatch, epr);
+ initWebserviceFeatures(dispatch, features);
return dispatch;
}
@@ -495,6 +499,7 @@
log.warn("WebServiceFeature not implemented");
Dispatch<Object> dispatch = createDispatch(portName, context, mode);
+ initWebserviceFeatures(dispatch, features);
return dispatch;
}
@@ -513,6 +518,7 @@
Dispatch<Object> dispatch = createDispatch(portName, context, mode);
initAddressingProperties(dispatch, epr);
+ initWebserviceFeatures(dispatch, features);
return dispatch;
}
@@ -523,6 +529,7 @@
log.warn("WebServiceFeature not implemented");
T port = getPort(portName, sei);
+ initWebserviceFeatures(port, features);
return port;
}
@@ -534,6 +541,7 @@
T port = getPort(sei);
initAddressingProperties((BindingProvider)port, epr);
+ initWebserviceFeatures(port, features);
return port;
}
@@ -544,9 +552,23 @@
log.warn("WebServiceFeature not implemented");
T port = getPort(sei);
+ initWebserviceFeatures(port, features);
return port;
}
+ private <T> void initWebserviceFeatures(T stub, WebServiceFeature... features)
+ {
+ if (features != null)
+ {
+ Set<WebServiceFeature> featureSet = new
HashSet<WebServiceFeature>();
+ for (WebServiceFeature feature : features)
+ featureSet.add(feature);
+
+ EndpointMetaData epMetaData = ((StubExt)stub).getEndpointMetaData();
+ epMetaData.setFeatures(featureSet);
+ }
+ }
+
// Workaround for [JBWS-2015] Modify addressing handlers to work with the JAXWS-2.1
API
private void initAddressingProperties(BindingProvider bindingProvider,
EndpointReference epr)
{
Modified: stack/native/trunk/src/main/java/org/jboss/ws/core/soap/SOAPBodyElementDoc.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/core/soap/SOAPBodyElementDoc.java 2008-02-29
14:53:27 UTC (rev 5868)
+++
stack/native/trunk/src/main/java/org/jboss/ws/core/soap/SOAPBodyElementDoc.java 2008-02-29
15:02:05 UTC (rev 5869)
@@ -25,6 +25,11 @@
import javax.xml.soap.Name;
import javax.xml.soap.SOAPBodyElement;
+import org.jboss.logging.Logger;
+import org.jboss.ws.core.CommonMessageContext;
+import org.jboss.ws.core.soap.SOAPContent.State;
+import org.jboss.ws.feature.SchemaValidationFeature;
+
/**
* An abstract implemenation of the SOAPBodyElement
* <p/>
@@ -35,6 +40,12 @@
*/
public class SOAPBodyElementDoc extends SOAPContentElement implements SOAPBodyElement
{
+ // provide logging
+ private static Logger log = Logger.getLogger(SOAPBodyElementDoc.class);
+
+ private SchemaValidationFeature feature;
+ private boolean validated;
+
public SOAPBodyElementDoc(Name name)
{
super(name);
@@ -50,4 +61,36 @@
super(element);
}
+ @Override
+ protected State transitionTo(State nextState)
+ {
+ State prevState = soapContent.getState();
+ if (nextState != prevState)
+ {
+ if (doValidation() && nextState == State.OBJECT_VALID)
+ {
+ log.info("Validating: " + prevState);
+ validated = true;
+ }
+
+ log.info(prevState + "=>" + nextState);
+ prevState = super.transitionTo(nextState);
+
+ if (doValidation() && prevState == State.OBJECT_VALID)
+ {
+ log.info("Validating: " + nextState);
+ validated = true;
+ }
+ }
+ return prevState;
+ }
+
+ private boolean doValidation()
+ {
+ CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
+ if (msgContext != null)
+ feature =
msgContext.getEndpointMetaData().getFeature(SchemaValidationFeature.class);
+
+ return feature != null && validated == false;
+ }
}
Modified: stack/native/trunk/src/main/java/org/jboss/ws/core/soap/SOAPContentElement.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/core/soap/SOAPContentElement.java 2008-02-29
14:53:27 UTC (rev 5868)
+++
stack/native/trunk/src/main/java/org/jboss/ws/core/soap/SOAPContentElement.java 2008-02-29
15:02:05 UTC (rev 5869)
@@ -81,7 +81,7 @@
private ParameterMetaData paramMetaData;
// content soapContent
- private SOAPContent soapContent;
+ protected SOAPContent soapContent;
// while transitioning DOM expansion needs to be locked
private boolean lockDOMExpansion = false;
@@ -129,12 +129,13 @@
return getParamMetaData().getJavaType();
}
- private void transitionTo(State nextState)
+ protected State transitionTo(State nextState)
{
- if (nextState != soapContent.getState())
+ State prevState = soapContent.getState();
+ if (nextState != prevState)
{
log.debug("-----------------------------------");
- log.debug("Transitioning from " + soapContent.getState() + " to
" + nextState);
+ log.debug("Transitioning from " + prevState + " to " +
nextState);
lockDOMExpansion = true;
soapContent = soapContent.transitionTo(nextState);
@@ -142,6 +143,7 @@
lockDOMExpansion = false;
log.debug("-----------------------------------");
}
+ return prevState;
}
/** Get the payload as source.
Added:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/validation/SchemaExtractor.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/extensions/validation/SchemaExtractor.java
(rev 0)
+++
stack/native/trunk/src/main/java/org/jboss/ws/extensions/validation/SchemaExtractor.java 2008-02-29
15:02:05 UTC (rev 5869)
@@ -0,0 +1,92 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.extensions.validation;
+
+//$Id$
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.net.URL;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+import org.jboss.wsf.common.DOMUtils;
+import org.jboss.wsf.common.DOMWriter;
+import org.jboss.wsf.common.IOUtils;
+import org.w3c.dom.Element;
+
+/**
+ * Extracts the schema from a given WSDL
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 29-Feb-2008
+ */
+public class SchemaExtractor
+{
+ // provide logging
+ private static Logger log = Logger.getLogger(SchemaExtractor.class);
+
+ public URL getSchemaUrl(URL wsdlURL) throws IOException
+ {
+ // parse the wsdl
+ Element root = DOMUtils.parse(wsdlURL.openStream());
+
+ // get the types element
+ QName typesQName = new QName(root.getNamespaceURI(), "types");
+ Element typesEl = DOMUtils.getFirstChildElement(root, typesQName);
+ if (typesEl == null)
+ {
+ log.warn("Cannot find element: " + typesQName);
+ return null;
+ }
+
+ // get the schema element
+ QName schemaQName = new
QName("http://www.w3.org/2001/XMLSchema",
"schema");
+ List<Element> schemaElements = DOMUtils.getChildElementsAsList(typesEl,
schemaQName);
+ if (schemaElements.size() == 0)
+ {
+ log.warn("Cannot find element: " + schemaQName);
+ return null;
+ }
+ if (schemaElements.size() > 1)
+ {
+ log.warn("Multiple schema elements not supported.");
+ }
+ Element schemaElement = schemaElements.get(0);
+
+ File tmpdir = IOUtils.createTempDirectory();
+ File tmpFile = File.createTempFile("jbossws_schema", ".xsd",
tmpdir);
+ tmpFile.deleteOnExit();
+
+ OutputStreamWriter outwr = new OutputStreamWriter(new FileOutputStream(tmpFile));
+ DOMWriter domWriter = new DOMWriter(outwr);
+ domWriter.setPrettyprint(true);
+ domWriter.print(schemaElement);
+ outwr.close();
+
+ return tmpFile.toURL();
+ }
+}
Property changes on:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/validation/SchemaExtractor.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/validation/ValidationErrorHandler.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/extensions/validation/ValidationErrorHandler.java
(rev 0)
+++
stack/native/trunk/src/main/java/org/jboss/ws/extensions/validation/ValidationErrorHandler.java 2008-02-29
15:02:05 UTC (rev 5869)
@@ -0,0 +1,58 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.extensions.validation;
+
+//$Id$
+
+import org.jboss.logging.Logger;
+import org.xml.sax.ErrorHandler;
+import org.xml.sax.SAXException;
+import org.xml.sax.SAXParseException;
+
+/**
+ * Extracts the schema from a given WSDL
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 29-Feb-2008
+ */
+public class ValidationErrorHandler implements ErrorHandler
+{
+ // provide logging
+ private static Logger log = Logger.getLogger(ValidationErrorHandler.class);
+
+ public void error(SAXParseException ex) throws SAXException
+ {
+ log.error(ex.toString());
+ throw new SAXException(ex.getMessage());
+ }
+
+ public void fatalError(SAXParseException ex) throws SAXException
+ {
+ log.fatal(ex.toString());
+ throw new SAXException(ex.getMessage());
+ }
+
+ public void warning(SAXParseException ex) throws SAXException
+ {
+ log.warn(ex.toString());
+ }
+}
Property changes on:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/validation/ValidationErrorHandler.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/trunk/src/main/java/org/jboss/ws/feature/SchemaValidationFeature.java
===================================================================
--- stack/native/trunk/src/main/java/org/jboss/ws/feature/SchemaValidationFeature.java
(rev 0)
+++
stack/native/trunk/src/main/java/org/jboss/ws/feature/SchemaValidationFeature.java 2008-02-29
15:02:05 UTC (rev 5869)
@@ -0,0 +1,118 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.feature;
+
+// $Id$
+
+import javax.xml.ws.WebServiceFeature;
+
+import org.jboss.ws.Constants;
+import org.jboss.ws.extensions.validation.ValidationErrorHandler;
+import org.xml.sax.ErrorHandler;
+
+/**
+ * This feature represents the use of schema validation with a
+ * web service.
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 29-Feb-2008
+ */
+public final class SchemaValidationFeature extends WebServiceFeature
+{
+ /**
+ * Constant value identifying the SchemaValidationFeature
+ */
+ public static final String ID = Constants.NS_JBOSSWS_URI +
"/features/schema-validation";
+
+ /**
+ * Optional property for the schema location. If this is not specified the schema
+ * will be attempted to extract from the WSDL.
+ *
+ * The syntax is the same as for schemaLocation attributes in instance documents: e.g,
"http://www.example.com file_name.xsd".
+ */
+ protected String schemaLocation;
+
+ /**
+ * Optional property for the error handler.
+ * If this is not specified the @{ValidationErrorHandler} will be used.
+ */
+ protected ErrorHandler errorHandler = new ValidationErrorHandler();
+
+ /**
+ * Create an <code>SchemaValidationFeature</code>.
+ * The instance created will be enabled.
+ */
+ public SchemaValidationFeature()
+ {
+ this.enabled = true;
+ }
+
+ /**
+ * Creates an <code>SchemaValidationFeature</code>.
+ *
+ * @param enabled specifies if this feature should be enabled or not
+ */
+ public SchemaValidationFeature(boolean enabled)
+ {
+ this.enabled = enabled;
+ }
+
+ /**
+ * Creates an <code>SchemaValidationFeature</code>.
+ *
+ * @param schemaLocation specifies the schema location for this feature
+ */
+ public SchemaValidationFeature(String schemaLocation)
+ {
+ this.schemaLocation = schemaLocation;
+ }
+
+ /**
+ * Creates an <code>SchemaValidationFeature</code>.
+ *
+ * @param enabled specifies if this feature should be enabled or not
+ * @param schemaLocation specifies the schema location for this feature
+ */
+ public SchemaValidationFeature(boolean enabled, String schemaLocation)
+ {
+ this.enabled = enabled;
+ this.schemaLocation = schemaLocation;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getID()
+ {
+ return ID;
+ }
+
+ public ErrorHandler getErrorHandler()
+ {
+ return errorHandler;
+ }
+
+ public void setErrorHandler(ErrorHandler errorHandler)
+ {
+ this.errorHandler = errorHandler;
+ }
+}
Property changes on:
stack/native/trunk/src/main/java/org/jboss/ws/feature/SchemaValidationFeature.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified:
stack/native/trunk/src/main/java/org/jboss/ws/metadata/umdm/ClientEndpointMetaData.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/metadata/umdm/ClientEndpointMetaData.java 2008-02-29
14:53:27 UTC (rev 5868)
+++
stack/native/trunk/src/main/java/org/jboss/ws/metadata/umdm/ClientEndpointMetaData.java 2008-02-29
15:02:05 UTC (rev 5869)
@@ -40,6 +40,7 @@
{
// The endpoint address
private String endpointAddress;
+ private String documentation;
public ClientEndpointMetaData(ServiceMetaData service, QName qname, QName
portTypeName, Type type)
{
Modified:
stack/native/trunk/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java 2008-02-29
14:53:27 UTC (rev 5868)
+++
stack/native/trunk/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java 2008-02-29
15:02:05 UTC (rev 5869)
@@ -41,6 +41,7 @@
import javax.jws.soap.SOAPBinding.ParameterStyle;
import javax.xml.namespace.QName;
import javax.xml.rpc.ParameterMode;
+import javax.xml.ws.WebServiceFeature;
import javax.xml.ws.Service.Mode;
import org.jboss.logging.Logger;
@@ -148,6 +149,10 @@
private Map<Method, OperationMetaData> opMetaDataCache = new HashMap<Method,
OperationMetaData>();
// All of the registered types
private List<Class> registeredTypes = new ArrayList<Class>();
+ // The features defined for this endpoint
+ private Set<WebServiceFeature> features = new
HashSet<WebServiceFeature>();
+ // The documentation edfined through the @Documentation annotation
+ private String documentation;
private ConfigObservable configObservable = new ConfigObservable();
@@ -157,8 +162,6 @@
private List<BindingCustomization> bindingCustomization = new
ArrayList<BindingCustomization>();
- private String documentation;
-
public EndpointMetaData(ServiceMetaData service, QName portName, QName portTypeName,
Type type)
{
this.serviceMetaData = service;
@@ -360,6 +363,36 @@
this.properties = properties;
}
+ public <T extends WebServiceFeature> T getFeature(Class<T> key)
+ {
+ for (WebServiceFeature feature : features)
+ {
+ if (key.isAssignableFrom(feature.getClass()))
+ return (T)feature;
+ }
+ return null;
+ }
+
+ public Set<WebServiceFeature> getFeatures()
+ {
+ return features;
+ }
+
+ public void setFeatures(Set<WebServiceFeature> features)
+ {
+ this.features = features;
+ }
+
+ public String getDocumentation()
+ {
+ return documentation;
+ }
+
+ public void setDocumentation(String documentation)
+ {
+ this.documentation = documentation;
+ }
+
public List<OperationMetaData> getOperations()
{
return new ArrayList<OperationMetaData>(operations);
@@ -922,14 +955,4 @@
}
return match;
}
-
- public String getDocumentation()
- {
- return documentation;
- }
-
- public void setDocumentation(String documentation)
- {
- this.documentation = documentation;
- }
}
Modified:
stack/native/trunk/src/main/java/org/jboss/ws/tools/metadata/ToolsEndpointMetaData.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/tools/metadata/ToolsEndpointMetaData.java 2008-02-29
14:53:27 UTC (rev 5868)
+++
stack/native/trunk/src/main/java/org/jboss/ws/tools/metadata/ToolsEndpointMetaData.java 2008-02-29
15:02:05 UTC (rev 5869)
@@ -38,6 +38,7 @@
{
public String typeNamespace;
private String endpointAddress;
+ private String documentation;
public ToolsEndpointMetaData(ServiceMetaData service, QName portName, QName
portTypeName)
{
Added:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1172/JBWS1172TestCase.java
===================================================================
---
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1172/JBWS1172TestCase.java
(rev 0)
+++
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1172/JBWS1172TestCase.java 2008-02-29
15:02:05 UTC (rev 5869)
@@ -0,0 +1,135 @@
+/*
+ * 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.jbws1172;
+
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.ws.Service;
+import javax.xml.ws.Service21;
+
+import junit.framework.Test;
+
+import org.jboss.test.ws.jaxws.jbws1172.types.MyTest;
+import org.jboss.ws.extensions.validation.SchemaExtractor;
+import org.jboss.ws.extensions.validation.ValidationErrorHandler;
+import org.jboss.ws.feature.SchemaValidationFeature;
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+import org.xml.sax.SAXException;
+
+/**
+ * [JBWS-1172] Support schema validation for incoming messages
+ *
+ *
http://jira.jboss.org/jira/browse/JBWS-1172
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 28-Feb-2008
+ */
+public class JBWS1172TestCase extends JBossWSTest
+{
+ public static Test suite()
+ {
+ return new JBossWSTestSetup(JBWS1172TestCase.class,
"jaxws-jbws1172.war");
+ }
+
+ public void testSchemaValidationPositive() throws Exception
+ {
+ URL xsdURL = new
File("resources/jaxws/jbws1172/TestService.xsd").toURL();
+ String inxml = "<performTest
xmlns='http://www.my-company.it/ws/my-test'><Code>1000</Code></performTest>";
+ parseDocument(inxml, xsdURL);
+ }
+
+ public void testSchemaValidationNegative() throws Exception
+ {
+ URL xsdURL = new
File("resources/jaxws/jbws1172/TestService.xsd").toURL();
+ String inxml = "<performTest
xmlns='http://www.my-company.it/ws/my-test'><Code>2000</Code></performTest>";
+ try
+ {
+ parseDocument(inxml, xsdURL);
+ }
+ catch (SAXException ex)
+ {
+ String msg = ex.getMessage();
+ assertTrue("Unexpectd message: " + msg, msg.indexOf("Value
'2000' is not facet-valid with respect to maxInclusive '1000'") >
0);
+ }
+ }
+
+ public void testSchemaExtractor() throws Exception
+ {
+ URL wsdlURL = new
File("resources/jaxws/jbws1172/TestService.wsdl").toURL();
+ URL xsdURL = new SchemaExtractor().getSchemaUrl(wsdlURL);
+ String inxml = "<performTest
xmlns='http://www.my-company.it/ws/my-test'><Code>1000</Code></performTest>";
+ parseDocument(inxml, xsdURL);
+ }
+
+ public void testEndpointWsdlValidation() throws Exception
+ {
+ URL wsdlURL = new URL("http://" + getServerHost() +
":8080/jaxws-jbws1172?wsdl");
+ URL xsdURL = new SchemaExtractor().getSchemaUrl(wsdlURL);
+ String inxml = "<performTest
xmlns='http://www.my-company.it/ws/my-test'><Code>1000</Code></performTest>";
+ parseDocument(inxml, xsdURL);
+ }
+
+ public void testNonValidatingClient() throws Exception
+ {
+ URL wsdlURL = new URL("http://" + getServerHost() +
":8080/jaxws-jbws1172?wsdl");
+ QName serviceName = new QName("http://www.my-company.it/ws/my-test",
"MyTestService");
+ Service service = Service.create(wsdlURL, serviceName);
+ MyTest port = service.getPort(MyTest.class);
+ port.performTest(new Long(1000));
+ }
+
+ public void testValidatingClientWithExplicitSchema() throws Exception
+ {
+ URL wsdlURL = new URL("http://" + getServerHost() +
":8080/jaxws-jbws1172?wsdl");
+ URL xsdURL = new SchemaExtractor().getSchemaUrl(wsdlURL);
+ QName serviceName = new QName("http://www.my-company.it/ws/my-test",
"MyTestService");
+ Service21 service = Service21.create(wsdlURL, serviceName);
+ MyTest port = service.getPort(MyTest.class, new
SchemaValidationFeature(xsdURL.toString()));
+ port.performTest(new Long(1000));
+ }
+
+ private void parseDocument(String inxml, URL xsdURL) throws Exception
+ {
+ DocumentBuilder builder = getDocumentBuilder(xsdURL);
+ ByteArrayInputStream bais = new ByteArrayInputStream(inxml.getBytes());
+ builder.parse(bais);
+ }
+
+ private DocumentBuilder getDocumentBuilder(URL xsdURL) throws
ParserConfigurationException
+ {
+ DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+ factory.setValidating(true);
+ factory.setNamespaceAware(true);
+
factory.setAttribute("http://java.sun.com/xml/jaxp/properties/schema...;,
"http://www.w3.org/2001/XMLSchema");
+
factory.setAttribute("http://java.sun.com/xml/jaxp/properties/schema...;,
xsdURL.toExternalForm());
+ DocumentBuilder builder = factory.newDocumentBuilder();
+ builder.setErrorHandler(new ValidationErrorHandler());
+ return builder;
+ }
+}
Property changes on:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1172/JBWS1172TestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1172/MyTestImpl.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1172/MyTestImpl.java
(rev 0)
+++
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1172/MyTestImpl.java 2008-02-29
15:02:05 UTC (rev 5869)
@@ -0,0 +1,19 @@
+package org.jboss.test.ws.jaxws.jbws1172;
+
+import javax.jws.WebService;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.annotation.EndpointConfig;
+
+@WebService(serviceName="MyTestService",
targetNamespace="http://www.my-company.it/ws/my-test", endpointInterface =
"org.jboss.test.ws.jaxws.jbws1172.types.MyTest")
+@EndpointConfig
+public class MyTestImpl
+{
+ // provide logging
+ private static Logger log = Logger.getLogger(MyTestImpl.class);
+
+ public void performTest(Long code)
+ {
+ log.info(code);
+ }
+}
Property changes on:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1172/MyTestImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/MyTest.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/MyTest.java
(rev 0)
+++
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/MyTest.java 2008-02-29
15:02:05 UTC (rev 5869)
@@ -0,0 +1,35 @@
+
+package org.jboss.test.ws.jaxws.jbws1172.types;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebService;
+import javax.xml.ws.RequestWrapper;
+import javax.xml.ws.ResponseWrapper;
+
+
+/**
+ * This class was generated by the JAX-WS RI.
+ * JAX-WS RI 2.1.1-b03-
+ * Generated source version: 2.0
+ *
+ */
+@WebService(name = "MyTest", targetNamespace =
"http://www.my-company.it/ws/my-test")
+public interface MyTest {
+
+
+ /**
+ *
+ * @param code
+ * @throws MyWSException_Exception
+ */
+ @WebMethod(action = "urn:performTest")
+ @RequestWrapper(localName = "performTest", targetNamespace =
"http://www.my-company.it/ws/my-test", className =
"org.jboss.test.ws.jaxws.jbws1172.types.PerformTest")
+ @ResponseWrapper(localName = "performTestResponse", targetNamespace =
"http://www.my-company.it/ws/my-test", className =
"org.jboss.test.ws.jaxws.jbws1172.types.PerformTestResponse")
+ public void performTest(
+ @WebParam(name = "Code", targetNamespace =
"http://www.my-company.it/ws/my-test")
+ Long code)
+ throws MyWSException_Exception
+ ;
+
+}
Property changes on:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/MyTest.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/MyTestService.java
===================================================================
---
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/MyTestService.java
(rev 0)
+++
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/MyTestService.java 2008-02-29
15:02:05 UTC (rev 5869)
@@ -0,0 +1,53 @@
+
+package org.jboss.test.ws.jaxws.jbws1172.types;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebEndpoint;
+import javax.xml.ws.WebServiceClient;
+
+
+/**
+ * This class was generated by the JAX-WS RI.
+ * JAX-WS RI 2.1.1-b03-
+ * Generated source version: 2.0
+ *
+ */
+@WebServiceClient(name = "MyTestService", targetNamespace =
"http://www.my-company.it/ws/my-test", wsdlLocation =
"file:/home/tdiesler/svn/jbossws/stack/native/trunk/src/test/resources/jaxws/jbws1172/TestService.wsdl")
+public class MyTestService
+ extends Service
+{
+
+ private final static URL MYTESTSERVICE_WSDL_LOCATION;
+
+ static {
+ URL url = null;
+ try {
+ url = new
URL("file:/home/tdiesler/svn/jbossws/stack/native/trunk/src/test/resources/jaxws/jbws1172/TestService.wsdl");
+ } catch (MalformedURLException e) {
+ e.printStackTrace();
+ }
+ MYTESTSERVICE_WSDL_LOCATION = url;
+ }
+
+ public MyTestService(URL wsdlLocation, QName serviceName) {
+ super(wsdlLocation, serviceName);
+ }
+
+ public MyTestService() {
+ super(MYTESTSERVICE_WSDL_LOCATION, new
QName("http://www.my-company.it/ws/my-test", "MyTestService"));
+ }
+
+ /**
+ *
+ * @return
+ * returns MyTest
+ */
+ @WebEndpoint(name = "MyTestPort")
+ public MyTest getMyTestPort() {
+ return (MyTest)super.getPort(new
QName("http://www.my-company.it/ws/my-test", "MyTestPort"),
MyTest.class);
+ }
+
+}
Property changes on:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/MyTestService.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/MyWSException.java
===================================================================
---
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/MyWSException.java
(rev 0)
+++
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/MyWSException.java 2008-02-29
15:02:05 UTC (rev 5869)
@@ -0,0 +1,62 @@
+
+package org.jboss.test.ws.jaxws.jbws1172.types;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for MyWSException complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within
this class.
+ *
+ * <pre>
+ * <complexType name="MyWSException">
+ * <complexContent>
+ * <restriction
base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="message"
type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "MyWSException", propOrder = {
+ "message"
+})
+public class MyWSException {
+
+ @XmlElement(required = true, nillable = true)
+ protected String message;
+
+ /**
+ * Gets the value of the message property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getMessage() {
+ return message;
+ }
+
+ /**
+ * Sets the value of the message property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setMessage(String value) {
+ this.message = value;
+ }
+
+}
Property changes on:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/MyWSException.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/MyWSException_Exception.java
===================================================================
---
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/MyWSException_Exception.java
(rev 0)
+++
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/MyWSException_Exception.java 2008-02-29
15:02:05 UTC (rev 5869)
@@ -0,0 +1,54 @@
+
+package org.jboss.test.ws.jaxws.jbws1172.types;
+
+import javax.xml.ws.WebFault;
+
+
+/**
+ * This class was generated by the JAX-WS RI.
+ * JAX-WS RI 2.1.1-b03-
+ * Generated source version: 2.0
+ *
+ */
+@WebFault(name = "MyWSException", targetNamespace =
"http://www.my-company.it/ws/my-test")
+public class MyWSException_Exception
+ extends Exception
+{
+
+ /**
+ * Java type that goes as soapenv:Fault detail element.
+ *
+ */
+ private MyWSException faultInfo;
+
+ /**
+ *
+ * @param faultInfo
+ * @param message
+ */
+ public MyWSException_Exception(String message, MyWSException faultInfo) {
+ super(message);
+ this.faultInfo = faultInfo;
+ }
+
+ /**
+ *
+ * @param faultInfo
+ * @param message
+ * @param cause
+ */
+ public MyWSException_Exception(String message, MyWSException faultInfo, Throwable
cause) {
+ super(message, cause);
+ this.faultInfo = faultInfo;
+ }
+
+ /**
+ *
+ * @return
+ * returns fault bean: org.jboss.test.ws.jaxws.jbws1172.types.MyWSException
+ */
+ public MyWSException getFaultInfo() {
+ return faultInfo;
+ }
+
+}
Property changes on:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/MyWSException_Exception.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/ObjectFactory.java
===================================================================
---
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/ObjectFactory.java
(rev 0)
+++
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/ObjectFactory.java 2008-02-29
15:02:05 UTC (rev 5869)
@@ -0,0 +1,89 @@
+
+package org.jboss.test.ws.jaxws.jbws1172.types;
+
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.annotation.XmlElementDecl;
+import javax.xml.bind.annotation.XmlRegistry;
+import javax.xml.namespace.QName;
+
+
+/**
+ * This object contains factory methods for each
+ * Java content interface and Java element interface
+ * generated in the org.jboss.test.ws.jaxws.jbws1172.types package.
+ * <p>An ObjectFactory allows you to programatically
+ * construct new instances of the Java representation
+ * for XML content. The Java representation of XML
+ * content can consist of schema derived interfaces
+ * and classes representing the binding of schema
+ * type definitions, element declarations and model
+ * groups. Factory methods for each of these are
+ * provided in this class.
+ *
+ */
+@XmlRegistry
+public class ObjectFactory {
+
+ private final static QName _PerformTest_QNAME = new
QName("http://www.my-company.it/ws/my-test", "performTest");
+ private final static QName _MyWSException_QNAME = new
QName("http://www.my-company.it/ws/my-test", "MyWSException");
+ private final static QName _PerformTestResponse_QNAME = new
QName("http://www.my-company.it/ws/my-test", "performTestResponse");
+
+ /**
+ * Create a new ObjectFactory that can be used to create new instances of schema
derived classes for package: org.jboss.test.ws.jaxws.jbws1172.types
+ *
+ */
+ public ObjectFactory() {
+ }
+
+ /**
+ * Create an instance of {@link MyWSException }
+ *
+ */
+ public MyWSException createMyWSException() {
+ return new MyWSException();
+ }
+
+ /**
+ * Create an instance of {@link PerformTest }
+ *
+ */
+ public PerformTest createPerformTest() {
+ return new PerformTest();
+ }
+
+ /**
+ * Create an instance of {@link PerformTestResponse }
+ *
+ */
+ public PerformTestResponse createPerformTestResponse() {
+ return new PerformTestResponse();
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link PerformTest }{@code
>}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://www.my-company.it/ws/my-test", name =
"performTest")
+ public JAXBElement<PerformTest> createPerformTest(PerformTest value) {
+ return new JAXBElement<PerformTest>(_PerformTest_QNAME, PerformTest.class,
null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link MyWSException }{@code
>}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://www.my-company.it/ws/my-test", name =
"MyWSException")
+ public JAXBElement<MyWSException> createMyWSException(MyWSException value) {
+ return new JAXBElement<MyWSException>(_MyWSException_QNAME,
MyWSException.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link PerformTestResponse
}{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://www.my-company.it/ws/my-test", name =
"performTestResponse")
+ public JAXBElement<PerformTestResponse>
createPerformTestResponse(PerformTestResponse value) {
+ return new JAXBElement<PerformTestResponse>(_PerformTestResponse_QNAME,
PerformTestResponse.class, null, value);
+ }
+
+}
Property changes on:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/ObjectFactory.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/PerformTest.java
===================================================================
---
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/PerformTest.java
(rev 0)
+++
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/PerformTest.java 2008-02-29
15:02:05 UTC (rev 5869)
@@ -0,0 +1,62 @@
+
+package org.jboss.test.ws.jaxws.jbws1172.types;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for performTest complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within
this class.
+ *
+ * <pre>
+ * <complexType name="performTest">
+ * <complexContent>
+ * <restriction
base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="Code"
type="{http://www.w3.org/2001/XMLSchema}long"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "performTest", propOrder = {
+ "code"
+})
+public class PerformTest {
+
+ @XmlElement(name = "Code", required = true, type = Long.class, nillable =
true)
+ protected Long code;
+
+ /**
+ * Gets the value of the code property.
+ *
+ * @return
+ * possible object is
+ * {@link Long }
+ *
+ */
+ public Long getCode() {
+ return code;
+ }
+
+ /**
+ * Sets the value of the code property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Long }
+ *
+ */
+ public void setCode(Long value) {
+ this.code = value;
+ }
+
+}
Property changes on:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/PerformTest.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/PerformTestResponse.java
===================================================================
---
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/PerformTestResponse.java
(rev 0)
+++
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/PerformTestResponse.java 2008-02-29
15:02:05 UTC (rev 5869)
@@ -0,0 +1,32 @@
+
+package org.jboss.test.ws.jaxws.jbws1172.types;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for performTestResponse complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within
this class.
+ *
+ * <pre>
+ * <complexType name="performTestResponse">
+ * <complexContent>
+ * <restriction
base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "performTestResponse")
+public class PerformTestResponse {
+
+
+}
Property changes on:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/PerformTestResponse.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/package-info.java
===================================================================
---
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/package-info.java
(rev 0)
+++
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/package-info.java 2008-02-29
15:02:05 UTC (rev 5869)
@@ -0,0 +1,2 @@
+(a)javax.xml.bind.annotation.XmlSchema(namespace =
"http://www.my-company.it/ws/my-test", elementFormDefault =
javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
+package org.jboss.test.ws.jaxws.jbws1172.types;
Property changes on:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/package-info.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/trunk/src/test/resources/jaxws/jbws1172/TestService.wsdl
===================================================================
--- stack/native/trunk/src/test/resources/jaxws/jbws1172/TestService.wsdl
(rev 0)
+++ stack/native/trunk/src/test/resources/jaxws/jbws1172/TestService.wsdl 2008-02-29
15:02:05 UTC (rev 5869)
@@ -0,0 +1,65 @@
+<definitions name="MyTestService"
targetNamespace="http://www.my-company.it/ws/my-test"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://www.my-company.it/ws/my-test"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <types>
+ <schema elementFormDefault="qualified"
targetNamespace="http://www.my-company.it/ws/my-test"
xmlns="http://www.w3.org/2001/XMLSchema"
+ xmlns:tns="http://www.my-company.it/ws/my-test"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <complexType name="MyWSException">
+ <sequence>
+ <element name="message" nillable="true"
type="string"/>
+ </sequence>
+ </complexType>
+ <complexType name="performTest">
+ <sequence>
+ <element name="Code" nillable="true"
type="tns:CodeType"/>
+ </sequence>
+ </complexType>
+ <complexType name="performTestResponse">
+ <sequence/>
+ </complexType>
+ <simpleType name="CodeType">
+ <restriction base="integer">
+ <minInclusive value="0"/>
+ <maxInclusive value="1000"/>
+ </restriction>
+ </simpleType>
+ <element name="MyWSException" type="tns:MyWSException"/>
+ <element name="performTest" type="tns:performTest"/>
+ <element name="performTestResponse"
type="tns:performTestResponse"/>
+ </schema>
+ </types>
+ <message name="MyTest_performTestResponse">
+ <part element="tns:performTestResponse" name="result"/>
+ </message>
+ <message name="MyTest_performTest">
+ <part element="tns:performTest" name="parameters"/>
+ </message>
+ <message name="MyWSException">
+ <part element="tns:MyWSException" name="MyWSException"/>
+ </message>
+ <portType name="MyTest">
+ <operation name="performTest">
+ <input message="tns:MyTest_performTest"/>
+ <output message="tns:MyTest_performTestResponse"/>
+ <fault message="tns:MyWSException" name="MyWSException"/>
+ </operation>
+ </portType>
+ <binding name="MyTestBinding" type="tns:MyTest">
+ <soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="performTest">
+ <soap:operation soapAction="urn:performTest"/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="MyWSException">
+ <soap:fault name="MyWSException" use="literal"/>
+ </fault>
+ </operation>
+ </binding>
+ <service name="MyTestService">
+ <port binding="tns:MyTestBinding" name="MyTestPort">
+ <soap:address
location="http://my-company.it/my-context/my-endpoint"/>
+ </port>
+ </service>
+</definitions>
\ No newline at end of file
Property changes on:
stack/native/trunk/src/test/resources/jaxws/jbws1172/TestService.wsdl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/trunk/src/test/resources/jaxws/jbws1172/TestService.xsd
===================================================================
--- stack/native/trunk/src/test/resources/jaxws/jbws1172/TestService.xsd
(rev 0)
+++ stack/native/trunk/src/test/resources/jaxws/jbws1172/TestService.xsd 2008-02-29
15:02:05 UTC (rev 5869)
@@ -0,0 +1,25 @@
+<schema elementFormDefault="qualified"
targetNamespace="http://www.my-company.it/ws/my-test"
xmlns="http://www.w3.org/2001/XMLSchema"
+ xmlns:tns="http://www.my-company.it/ws/my-test"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <complexType name="MyWSException">
+ <sequence>
+ <element name="message" nillable="true"
type="string"/>
+ </sequence>
+ </complexType>
+ <complexType name="performTest">
+ <sequence>
+ <element name="Code" nillable="true"
type="tns:CodeType"/>
+ </sequence>
+ </complexType>
+ <complexType name="performTestResponse">
+ <sequence/>
+ </complexType>
+ <simpleType name="CodeType">
+ <restriction base="integer">
+ <minInclusive value="0"/>
+ <maxInclusive value="1000"/>
+ </restriction>
+ </simpleType>
+ <element name="MyWSException" type="tns:MyWSException"/>
+ <element name="performTest" type="tns:performTest"/>
+ <element name="performTestResponse"
type="tns:performTestResponse"/>
+</schema>
Property changes on: stack/native/trunk/src/test/resources/jaxws/jbws1172/TestService.xsd
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/trunk/src/test/resources/jaxws/jbws1172/WEB-INF/web.xml
===================================================================
--- stack/native/trunk/src/test/resources/jaxws/jbws1172/WEB-INF/web.xml
(rev 0)
+++ stack/native/trunk/src/test/resources/jaxws/jbws1172/WEB-INF/web.xml 2008-02-29
15:02:05 UTC (rev 5869)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+
+ <servlet>
+ <servlet-name>TestEndpoint</servlet-name>
+
<servlet-class>org.jboss.test.ws.jaxws.jbws1172.MyTestImpl</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>TestEndpoint</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+</web-app>
\ No newline at end of file
Property changes on: stack/native/trunk/src/test/resources/jaxws/jbws1172/WEB-INF/web.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF