Author: jim.ma
Date: 2012-07-17 02:02:10 -0400 (Tue, 17 Jul 2012)
New Revision: 16474
Added:
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/validation/LSInputImpl.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/validation/SchemaResourceResolver.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/ImportedSchemaValidatingEndpoint.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/NestedSchemaValidatingEndpoint.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws1172/WEB-INF/wsdl/NoValTestService.wsdl
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws1172/WEB-INF/wsdl/TestServiceWithImportedSchema.wsdl
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws1172/WEB-INF/wsdl/type1.xsd
Removed:
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/ValidatingEndpoint.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/MyTestService.java
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/CallImpl.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPBodyElementDoc.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/validation/SchemaExtractor.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/validation/SchemaValidationHelper.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/JBWS1172TestCase.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/NonValidatingEndpoint.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/MyTest.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/MyWSException.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/MyWSException_Exception.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/ObjectFactory.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/PerformTest.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/PerformTestResponse.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/package-info.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws1172/WEB-INF/web.xml
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws1172/WEB-INF/wsdl/TestService.wsdl
Log:
[JBPAPP-9517]:Fix multiple nested schemas in wsdl can not validate message
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/CallImpl.java
===================================================================
---
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/CallImpl.java 2012-07-16
21:45:17 UTC (rev 16473)
+++
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/CallImpl.java 2012-07-17
06:02:10 UTC (rev 16474)
@@ -69,7 +69,6 @@
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData.HandlerType;
import org.jboss.wsf.common.JavaUtils;
-import com.sun.corba.se.spi.orb.Operation;
/** Provides support for the dynamic invocation of a service endpoint.
* The javax.xml.rpc.Service interface acts as a factory for the creation of Call
instances.
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPBodyElementDoc.java
===================================================================
---
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPBodyElementDoc.java 2012-07-16
21:45:17 UTC (rev 16473)
+++
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPBodyElementDoc.java 2012-07-17
06:02:10 UTC (rev 16474)
@@ -23,6 +23,8 @@
import java.io.InputStream;
import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
import javax.xml.namespace.QName;
import javax.xml.soap.Name;
@@ -103,7 +105,7 @@
EndpointMetaData epMetaData = msgContext.getEndpointMetaData();
feature = epMetaData.getFeature(SchemaValidationFeature.class);
URL xsdURL = feature.getSchemaLocation() != null ? new
URL(feature.getSchemaLocation()) : null;
- InputStream[] xsdStreams = null;
+ Map<String, byte[]> xsdStreams = new HashMap<String, byte[]>();
if (xsdURL == null)
{
URL wsdlURL = epMetaData.getServiceMetaData().getWsdlFileOrLocation();
Added:
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/validation/LSInputImpl.java
===================================================================
---
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/validation/LSInputImpl.java
(rev 0)
+++
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/validation/LSInputImpl.java 2012-07-17
06:02:10 UTC (rev 16474)
@@ -0,0 +1,131 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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;
+
+import java.io.InputStream;
+import java.io.Reader;
+
+import org.w3c.dom.ls.LSInput;
+/**
+ * LSInput implementation
+ *
+ * @author ema(a)redhat.com
+ */
+
+public class LSInputImpl implements LSInput {
+
+ protected String publicId;
+
+ protected String systemId;
+
+ protected String baseSystemId;
+
+ protected InputStream byteStream;
+
+ protected Reader charStream;
+
+ protected String data;
+
+ protected String encoding;
+
+ protected boolean certifiedText;
+
+ public LSInputImpl() {
+ }
+
+ public LSInputImpl(String systemId, InputStream byteStream) {
+ this.systemId = systemId;
+ this.byteStream = byteStream;
+ }
+
+ public LSInputImpl(String publicId, String systemId, InputStream byteStream) {
+ this.publicId = publicId;
+ this.systemId = systemId;
+ this.byteStream = byteStream;
+ }
+
+ public InputStream getByteStream() {
+ return byteStream;
+ }
+
+ public void setByteStream(InputStream byteStream) {
+ this.byteStream = byteStream;
+ }
+
+ public Reader getCharacterStream() {
+ return charStream;
+ }
+
+ public void setCharacterStream(Reader characterStream) {
+ charStream = characterStream;
+ }
+
+ public String getStringData() {
+ return data;
+ }
+
+ public void setStringData(String stringData) {
+ data = stringData;
+ }
+
+ public String getEncoding() {
+ return encoding;
+ }
+
+ public void setEncoding(String encoding) {
+ this.encoding = encoding;
+ }
+
+ public String getPublicId() {
+ return publicId;
+ }
+
+ public void setPublicId(String publicId) {
+ this.publicId = publicId;
+ }
+
+ public String getSystemId() {
+ return systemId;
+ }
+
+ public void setSystemId(String systemId) {
+ this.systemId = systemId;
+ }
+
+ public String getBaseURI() {
+ return baseSystemId;
+ }
+
+ public void setBaseURI(String baseURI) {
+ this.baseSystemId = baseURI;
+ }
+
+ public boolean getCertifiedText() {
+ return certifiedText;
+ }
+
+ public void setCertifiedText(boolean certifiedText) {
+ this.certifiedText = certifiedText;
+ }
+
+}
+
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/validation/SchemaExtractor.java
===================================================================
---
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/validation/SchemaExtractor.java 2012-07-16
21:45:17 UTC (rev 16473)
+++
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/validation/SchemaExtractor.java 2012-07-17
06:02:10 UTC (rev 16474)
@@ -21,48 +21,61 @@
*/
package org.jboss.ws.extensions.validation;
-import java.io.File;
-import java.io.FileOutputStream;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.FileInputStream;
import java.io.IOException;
+import java.io.InputStream;
import java.io.OutputStreamWriter;
-import java.io.ByteArrayOutputStream;
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-import java.io.FileInputStream;
import java.net.URL;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
import java.util.Map;
-import java.util.List;
-import java.util.ArrayList;
+import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import java.util.regex.Matcher;
import javax.xml.namespace.QName;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
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.Attr;
import org.w3c.dom.Element;
-import org.w3c.dom.Attr;
+import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
-import org.w3c.dom.NamedNodeMap;
/**
* Extracts the schema from a given WSDL
*
* @author Thomas.Diesler(a)jboss.com
+ * @author ema(a)redhat.com
* @since 29-Feb-2008
*/
public class SchemaExtractor
{
// provide logging
private static Logger log = Logger.getLogger(SchemaExtractor.class);
+ private static Transformer transformer = null;
+ private String path;
+ static {
+ try
+ {
+ transformer = TransformerFactory.newInstance().newTransformer();
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException(e);
+ }
- private File xsdFile;
- private String path;
-
- public InputStream[] getSchemas(URL wsdlURL) throws IOException
+ }
+ public Map<String, byte[]> getSchemas(URL wsdlURL) throws IOException
{
+ Map<String, byte[]> streams = new HashMap<String, byte[]>();
//Get the path to the WSDL
Pattern p = Pattern.compile("[a-zA-Z]+\\.[a-zA-Z]+$");
Matcher m = p.matcher(wsdlURL.getFile());
@@ -90,36 +103,51 @@
log.warn("Cannot find element: " + schemaQName);
return null;
}
- if (schemaElements.size() > 1)
+
+ for (Element schemaElement : schemaElements)
{
- log.warn("Multiple schema elements not supported.");
- }
- Element schemaElement = schemaElements.get(0);
- //Add namespace declarations from root element
- for(Attr nsAttr : nsAttrs)
- {
- Attr replacedAttr = schemaElement.setAttributeNodeNS(nsAttr);
- if(replacedAttr != null) //then put it back
+ DOMSource domSource = new DOMSource(schemaElement);
+ ByteArrayOutputStream bout = new ByteArrayOutputStream();
+ StreamResult result = new StreamResult(bout);
+ Element newSchemeElement = null;
+ try
{
- schemaElement.setAttributeNodeNS(replacedAttr);
+ transformer.transform(domSource, result);
+ String content = new String(bout.toByteArray());
+ newSchemeElement = DOMUtils.parse(content);
}
- }
+ catch (Exception e)
+ {
+ log.error("Failed to parse schema with schemaElement with targetNamepace
: "
+ + schemaElement.getAttribute("targetNamespace"));
+ }
- List<InputStream> streams = new ArrayList<InputStream>();
- pullImportedSchemas(schemaElement, streams);
+
+ for (Attr nsAttr : nsAttrs)
+ {
+
+ Attr newAttr =
newSchemeElement.getOwnerDocument().createAttribute(nsAttr.getName());
+ newAttr.setNodeValue(nsAttr.getValue());
+ if (newSchemeElement.getAttribute(nsAttr.getName()).equals("")) {
+ newSchemeElement.setAttributeNodeNS(newAttr);
+ }
+ }
- //Add the WSDL schema to the schema array
- ByteArrayOutputStream outStream = new ByteArrayOutputStream();
- OutputStreamWriter outwr = new OutputStreamWriter( outStream );
- DOMWriter domWriter = new DOMWriter(outwr);
- domWriter.setPrettyprint(true);
- domWriter.print(schemaElement);
+ pullImportedSchemas(newSchemeElement, streams);
- streams.add(new ByteArrayInputStream(outStream.toByteArray()));
+ // Add the WSDL schema to the schema array
+ ByteArrayOutputStream outStream = new ByteArrayOutputStream();
+ OutputStreamWriter outwr = new OutputStreamWriter(outStream);
+ DOMWriter domWriter = new DOMWriter(outwr);
+ domWriter.setPrettyprint(true);
+ domWriter.print(newSchemeElement);
+ String tns = newSchemeElement.getAttribute("targetNamespace");
+ streams.put(tns, outStream.toByteArray());
+ }
- return streams.toArray(new InputStream[streams.size()]);
+ return streams;
}
private List<Attr> getNamespaceAttrs(Element element)
@@ -132,14 +160,14 @@
{
Node node = nodes.item(i);
Attr attr = (Attr)node;
- if(attr.getName().startsWith("xmlns"))
+ if(attr.getName().startsWith("xmlns:"))
nsAttrs.add((Attr)attr.cloneNode(true));
}
return nsAttrs;
}
- private void pullImportedSchemas(Element schemaElement, List<InputStream>
streams)
+ private void pullImportedSchemas(Element schemaElement, Map<String, byte[]>
streams)
{
QName importQName = new QName( "http://www.w3.org/2001/XMLSchema",
"import" );
List<Element> importElements = DOMUtils.getChildElementsAsList(
schemaElement, importQName );
@@ -148,7 +176,10 @@
for( Element importElement : importElements )
{
String schemaLocation = importElement.getAttribute( "schemaLocation"
);
- schemaLocations.add( schemaLocation );
+ if (!"".equals(schemaLocation))
+ {
+ schemaLocations.add(schemaLocation);
+ }
}
ByteArrayOutputStream outStream = null;
@@ -175,7 +206,8 @@
pullImportedSchemas(root, streams);
inputStream.reset();
- streams.add(inputStream);
+ String tns = root.getAttribute("targetNamespace");
+ streams.put(tns , outStream.toByteArray());
}
catch(IOException ioe)
{
Added:
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/validation/SchemaResourceResolver.java
===================================================================
---
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/validation/SchemaResourceResolver.java
(rev 0)
+++
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/validation/SchemaResourceResolver.java 2012-07-17
06:02:10 UTC (rev 16474)
@@ -0,0 +1,53 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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;
+
+import java.io.ByteArrayInputStream;
+import java.util.Map;
+
+import org.w3c.dom.ls.LSInput;
+import org.w3c.dom.ls.LSResourceResolver;
+/**
+ * SchemaResourceResolver
+ *
+ * @author ema(a)redhat.com
+ */
+
+public class SchemaResourceResolver implements LSResourceResolver {
+ private Map<String, byte[]> streamMap;
+
+ public SchemaResourceResolver(Map<String, byte[]> map) {
+ streamMap = map;
+ }
+
+ public LSInput resolveResource(String type, String namespaceURI,
+ String publicId, String systemId, String baseURI) {
+ LSInput lsInput = null;
+ if (streamMap.get(namespaceURI) != null) {
+ byte[] value = streamMap.get(namespaceURI);
+ lsInput = new LSInputImpl();
+ lsInput.setByteStream(new ByteArrayInputStream(value));
+ }
+ return lsInput;
+ }
+
+}
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/validation/SchemaValidationHelper.java
===================================================================
---
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/validation/SchemaValidationHelper.java 2012-07-16
21:45:17 UTC (rev 16473)
+++
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/validation/SchemaValidationHelper.java 2012-07-17
06:02:10 UTC (rev 16474)
@@ -21,93 +21,107 @@
*/
package org.jboss.ws.extensions.validation;
+import java.io.ByteArrayInputStream;
+import java.io.File;
import java.io.InputStream;
import java.net.URL;
-import java.io.StringReader;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
import javax.xml.XMLConstants;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.Source;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamSource;
+import javax.xml.validation.Schema;
+import javax.xml.validation.SchemaFactory;
+import javax.xml.validation.Validator;
-import org.jboss.logging.Logger;
-import org.jboss.wsf.common.DOMWriter;
import org.w3c.dom.Element;
import org.xml.sax.ErrorHandler;
import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
/**
* [JBWS-1172] Support schema validation for incoming messages
*
* @author Thomas.Diesler(a)jboss.com
+ * @author ema(a)redhat.com
* @since 28-Feb-2008
*/
-public class SchemaValidationHelper
-{
- private URL xsdURL;
- private InputStream[] xsdStreams;
+public class SchemaValidationHelper {
+
private ErrorHandler errorHandler = new StrictlyValidErrorHandler();
- private static Logger log = Logger.getLogger(SchemaValidationHelper.class);
-
- public SchemaValidationHelper(URL xsdURL)
+ private static SchemaFactory factory = null;
+
+ private Validator validator = null;
+
+ static
{
- this.xsdURL = xsdURL;
+ factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
}
- public SchemaValidationHelper(InputStream[] xsdStreams)
+ public SchemaValidationHelper(URL xsdURL) throws SAXException
{
- this.xsdStreams = xsdStreams;
+ Schema schema = factory.newSchema(new File(xsdURL.getFile()));
+ validator = schema.newValidator();
+ validator.setErrorHandler(errorHandler);
}
+ public SchemaValidationHelper(Map<String, byte[]> xsdStreams) throws
SAXException
+ {
+ SchemaResourceResolver resolver = new SchemaResourceResolver(xsdStreams);
+ factory.setResourceResolver(resolver);
+
+ List<Source> schemas = new ArrayList<Source>();
+ for (byte[] ins : xsdStreams.values())
+ {
+ StreamSource source = new StreamSource(new ByteArrayInputStream(ins));
+ schemas.add(source);
+ }
+ Source[] sources = schemas.toArray(new Source[0]);
+
+ Schema schema = factory.newSchema(sources);
+ validator = schema.newValidator();
+ validator.setErrorHandler(errorHandler);
+
+ }
+
public SchemaValidationHelper setErrorHandler(ErrorHandler errorHandler)
{
- this.errorHandler = errorHandler;
+ validator.setErrorHandler(errorHandler);
return this;
}
public void validateDocument(String inxml) throws Exception
{
- validateDocument(new InputSource(new StringReader(inxml)));
+ StreamSource source = new StreamSource(new
java.io.ByteArrayInputStream(inxml.getBytes()));
+ validateDocument(source);
+
}
+ public void validateDocument(Source xml) throws Exception
+ {
+ validator.validate(xml);
+ }
+
public void validateDocument(Element inxml) throws Exception
{
- String xmlStr = DOMWriter.printNode(inxml, false);
- validateDocument(xmlStr);
+ DOMSource domSource = new DOMSource(inxml);
+ validator.validate(domSource);
}
-
+
public void validateDocument(InputStream inxml) throws Exception
{
- DocumentBuilder builder = getDocumentBuilder();
- builder.parse(inxml);
+ StreamSource source = new StreamSource(inxml);
+ validateDocument(source);
}
-
+
public void validateDocument(InputSource inxml) throws Exception
{
- DocumentBuilder builder = getDocumentBuilder();
- builder.parse(inxml);
+ StreamSource source = new StreamSource(inxml.getByteStream());
+ validateDocument(source);
}
- private DocumentBuilder getDocumentBuilder() 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");
-
- if(xsdStreams != null)
- {
-
factory.setAttribute("http://java.sun.com/xml/jaxp/properties/schema...;,
xsdStreams);
- }
- else //use xsdURL
- {
-
factory.setAttribute("http://java.sun.com/xml/jaxp/properties/schema...;,
xsdURL.toExternalForm());
- }
-
- factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);
- DocumentBuilder builder = factory.newDocumentBuilder();
- builder.setErrorHandler(errorHandler);
- return builder;
- }
}
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml
===================================================================
---
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml 2012-07-16
21:45:17 UTC (rev 16473)
+++
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml 2012-07-17
06:02:10 UTC (rev 16474)
@@ -198,7 +198,8 @@
<war destfile="${tests.output.dir}/test-libs/jaxws-jbws1172.war"
webxml="${tests.output.dir}/test-resources/jaxws/jbws1172/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/test-classes">
<include
name="org/jboss/test/ws/jaxws/jbws1172/NonValidatingEndpoint.class" />
- <include
name="org/jboss/test/ws/jaxws/jbws1172/ValidatingEndpoint.class" />
+ <include
name="org/jboss/test/ws/jaxws/jbws1172/ImportedSchemaValidatingEndpoint.class"
/>
+ <include
name="org/jboss/test/ws/jaxws/jbws1172/NestedSchemaValidatingEndpoint.class"
/>
<include name="org/jboss/test/ws/jaxws/jbws1172/types/*.class" />
</classes>
<webinf
dir="${tests.output.dir}/test-resources/jaxws/jbws1172/WEB-INF">
Added:
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/ImportedSchemaValidatingEndpoint.java
===================================================================
---
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/ImportedSchemaValidatingEndpoint.java
(rev 0)
+++
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/ImportedSchemaValidatingEndpoint.java 2012-07-17
06:02:10 UTC (rev 16474)
@@ -0,0 +1,44 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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 javax.jws.WebService;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.annotation.SchemaValidation;
+
+@WebService(serviceName = "MyTestService", portName = "MyTestPort",
+ targetNamespace = "http://www.my-company.it/ws/my-test",
+ endpointInterface = "org.jboss.test.ws.jaxws.jbws1172.types.MyTest",
+ wsdlLocation = "WEB-INF/wsdl/TestServiceWithImportedSchema.wsdl")
+
+@SchemaValidation
+public class ImportedSchemaValidatingEndpoint
+{
+ // provide logging
+ private static Logger log = Logger.getLogger(ImportedSchemaValidatingEndpoint.class);
+
+ public void performTest(Integer code)
+ {
+ log.info(code);
+ }
+}
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/JBWS1172TestCase.java
===================================================================
---
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/JBWS1172TestCase.java 2012-07-16
21:45:17 UTC (rev 16473)
+++
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/JBWS1172TestCase.java 2012-07-17
06:02:10 UTC (rev 16474)
@@ -21,12 +21,13 @@
*/
package org.jboss.test.ws.jaxws.jbws1172;
-import java.io.InputStream;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.net.URL;
+import java.util.Map;
import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
import javax.xml.ws.Service;
import junit.framework.Test;
@@ -47,6 +48,7 @@
*
http://jira.jboss.org/jira/browse/JBWS-1172
*
* @author Thomas.Diesler(a)jboss.com
+ * @author ema(a)rehda.com
* @since 28-Feb-2008
*/
public class JBWS1172TestCase extends JBossWSTest
@@ -57,20 +59,21 @@
{
return new JBossWSTestSetup(JBWS1172TestCase.class,
"jaxws-jbws1172.war");
}
-
+
+
public void testSchemaValidationPositive() throws Exception
{
URL wsdlURL =
getResourceURL("jaxws/jbws1172/WEB-INF/wsdl/TestService.wsdl");
- InputStream[] xsdStreams = new SchemaExtractor().getSchemas(wsdlURL);
- String inxml = "<performTest
xmlns='http://www.my-company.it/ws/my-test'><Code>1000</Code></performTest>";
+ Map<String, byte[]> xsdStreams = new SchemaExtractor().getSchemas(wsdlURL);
+ String inxml = "<tns:performTest
xmlns:tns='http://www.my-company.it/ws/my-test'><Code>1000</Code></tns:performTest>";
new SchemaValidationHelper(xsdStreams).validateDocument(inxml);
}
-
+
public void testSchemaValidationNegative() throws Exception
{
URL wsdlURL =
getResourceURL("jaxws/jbws1172/WEB-INF/wsdl/TestService.wsdl");
- InputStream[] xsdStreams = new SchemaExtractor().getSchemas(wsdlURL);
- String inxml = "<performTest
xmlns='http://www.my-company.it/ws/my-test'><Code>2000</Code></performTest>";
+ Map<String, byte[]> xsdStreams = new SchemaExtractor().getSchemas(wsdlURL);
+ String inxml = "<tns:performTest
xmlns:tns='http://www.my-company.it/ws/my-test'><Code>2000</Code></tns:performTest>";
try
{
new SchemaValidationHelper(xsdStreams).validateDocument(inxml);
@@ -85,23 +88,21 @@
public void testEndpointWsdlValidation() throws Exception
{
URL wsdlURL = new URL("http://" + getServerHost() +
":8080/jaxws-jbws1172/noval?wsdl");
- InputStream[] xsdStreams = new SchemaExtractor().getSchemas(wsdlURL);
- String inxml = "<performTest
xmlns='http://www.my-company.it/ws/my-test'><Code>1000</Code></performTest>";
+ Map<String, byte[]> xsdStreams = new SchemaExtractor().getSchemas(wsdlURL);
+ String inxml = "<tns:performTest
xmlns:tns='http://www.my-company.it/ws/my-test'><Code>1000</Code></tns:performTest>";
new SchemaValidationHelper(xsdStreams).validateDocument(inxml);
}
public void testValidatingClientWithExplicitSchema() throws Exception
{
- URL wsdlURL =
getResourceURL("jaxws/jbws1172/WEB-INF/wsdl/TestService.wsdl");
- //URL xsdURL = new SchemaExtractor().getSchemaUrl(wsdlURL);
-
+ URL wsdlURL =
getResourceURL("jaxws/jbws1172/WEB-INF/wsdl/TestService.wsdl");
Service service = Service.create(wsdlURL, SERVICE_NAME);
- //SchemaValidationFeature feature = new
SchemaValidationFeature(xsdURL.toString());
SchemaValidationFeature feature = new SchemaValidationFeature();
MyTest port = service.getPort(MyTest.class, feature);
+
((BindingProvider)port).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
"http://localhost:9090/jaxws-jbws1172/doval");
try
{
- port.performTest(new Long(2000));
+ port.performTest(new Integer(2000));
}
catch (Exception ex)
{
@@ -111,22 +112,26 @@
assertTrue("Unexpectd message: " + ex.getMessage(),
msg.indexOf("Value '2000' is not facet-valid with respect to maxInclusive
'1000'") > 0);
}
}
+
public void testValidatingClientWithErrorHandler() throws Exception
{
- URL wsdlURL =
getResourceURL("jaxws/jbws1172/WEB-INF/wsdl/TestService.wsdl");
- //URL xsdURL = new SchemaExtractor().getSchemaUrl(wsdlURL);
-
+ URL wsdlURL =
getResourceURL("jaxws/jbws1172/WEB-INF/wsdl/TestService.wsdl");
Service service = Service.create(wsdlURL, SERVICE_NAME);
- //SchemaValidationFeature feature = new
SchemaValidationFeature(xsdURL.toString());
SchemaValidationFeature feature = new SchemaValidationFeature();
TestErrorHandler errorHandler = new TestErrorHandler();
feature.setErrorHandler(errorHandler);
MyTest port = service.getPort(MyTest.class, feature);
- port.performTest(new Long(2000));
-
+ try
+ {
+ port.performTest(new Integer(2000));
+ }
+ catch (Exception e)
+ {
+
+ }
String msg = errorHandler.getErrors();
assertTrue("Unexpectd message: " + msg, msg.indexOf("Value
'2000' is not facet-valid with respect to maxInclusive '1000'") >
0);
}
@@ -137,8 +142,8 @@
Service service = Service.create(wsdlURL, SERVICE_NAME);
MyTest port = service.getPort(MyTest.class);
- port.performTest(new Long(1000));
- port.performTest(new Long(2000));
+ port.performTest(new Integer(1000));
+ port.performTest(new Integer(2000));
}
public void testValidatingEndpoint() throws Exception
@@ -147,18 +152,36 @@
Service service = Service.create(wsdlURL, SERVICE_NAME);
MyTest port = service.getPort(MyTest.class);
- port.performTest(new Long(1000));
+ port.performTest(new Integer(1000));
try
{
- port.performTest(new Long(2000));
+ port.performTest(new Integer(2000));
}
catch (Exception ex)
{
String msg = ex.getMessage();
assertTrue("Unexpectd message: " + ex.getMessage(),
msg.indexOf("Value '2000' is not facet-valid with respect to maxInclusive
'1000'") > 0);
}
-}
+ }
+ public void testValidatingImportEndpoint() throws Exception
+ {
+ URL wsdlURL = new URL("http://" + getServerHost() +
":8080/jaxws-jbws1172/doval-import?wsdl");
+
+ Service service = Service.create(wsdlURL, SERVICE_NAME);
+ MyTest port = service.getPort(MyTest.class);
+ port.performTest(new Integer(1000));
+ try
+ {
+ port.performTest(new Integer(2000));
+ }
+ catch (Exception ex)
+ {
+ String msg = ex.getMessage();
+ assertTrue("Unexpectd message: " + ex.getMessage(),
msg.indexOf("Value '2000' is not facet-valid with respect to maxInclusive
'1000'") > 0);
+ }
+ }
+
private static class TestErrorHandler implements ErrorHandler
{
private StringBuilder errors = new StringBuilder();
Added:
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/NestedSchemaValidatingEndpoint.java
===================================================================
---
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/NestedSchemaValidatingEndpoint.java
(rev 0)
+++
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/NestedSchemaValidatingEndpoint.java 2012-07-17
06:02:10 UTC (rev 16474)
@@ -0,0 +1,44 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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 javax.jws.WebService;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.annotation.SchemaValidation;
+
+@WebService(serviceName = "MyTestService", portName = "MyTestPort",
+ targetNamespace = "http://www.my-company.it/ws/my-test",
+ endpointInterface = "org.jboss.test.ws.jaxws.jbws1172.types.MyTest",
+ wsdlLocation = "WEB-INF/wsdl/TestService.wsdl")
+
+@SchemaValidation
+public class NestedSchemaValidatingEndpoint
+{
+ // provide logging
+ private static Logger log = Logger.getLogger(NestedSchemaValidatingEndpoint.class);
+
+ public void performTest(Integer code)
+ {
+ log.info(code);
+ }
+}
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/NonValidatingEndpoint.java
===================================================================
---
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/NonValidatingEndpoint.java 2012-07-16
21:45:17 UTC (rev 16473)
+++
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/NonValidatingEndpoint.java 2012-07-17
06:02:10 UTC (rev 16474)
@@ -25,16 +25,17 @@
import org.jboss.logging.Logger;
-@WebService(serviceName = "MyTestService",
+@WebService(serviceName = "MyTestService", portName = "MyTestPort",
targetNamespace = "http://www.my-company.it/ws/my-test",
- endpointInterface = "org.jboss.test.ws.jaxws.jbws1172.types.MyTest")
+ endpointInterface = "org.jboss.test.ws.jaxws.jbws1172.types.MyTest",
+ wsdlLocation = "WEB-INF/wsdl/NoValTestService.wsdl")
public class NonValidatingEndpoint
{
// provide logging
private static Logger log = Logger.getLogger(NonValidatingEndpoint.class);
- public void performTest(Long code)
+ public void performTest(Integer code)
{
log.info(code);
}
Deleted:
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/ValidatingEndpoint.java
===================================================================
---
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/ValidatingEndpoint.java 2012-07-16
21:45:17 UTC (rev 16473)
+++
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/ValidatingEndpoint.java 2012-07-17
06:02:10 UTC (rev 16474)
@@ -1,44 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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 javax.jws.WebService;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.annotation.SchemaValidation;
-
-@WebService(serviceName = "MyTestService", portName = "MyTestPort",
- targetNamespace = "http://www.my-company.it/ws/my-test",
- endpointInterface = "org.jboss.test.ws.jaxws.jbws1172.types.MyTest",
- wsdlLocation = "WEB-INF/wsdl/TestService.wsdl")
-
-@SchemaValidation
-public class ValidatingEndpoint
-{
- // provide logging
- private static Logger log = Logger.getLogger(ValidatingEndpoint.class);
-
- public void performTest(Long code)
- {
- log.info(code);
- }
-}
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/MyTest.java
===================================================================
---
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/MyTest.java 2012-07-16
21:45:17 UTC (rev 16473)
+++
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/MyTest.java 2012-07-17
06:02:10 UTC (rev 16474)
@@ -1,55 +1,27 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.types;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
+import javax.xml.bind.annotation.XmlSeeAlso;
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
+ * This class was generated by Apache CXF 2.6.0-SNAPSHOT
+ * 2012-07-17T00:38:10.376+08:00
+ * Generated source version: 2.6.0-SNAPSHOT
*
*/
-@WebService(name = "MyTest", targetNamespace =
"http://www.my-company.it/ws/my-test")
+@WebService(targetNamespace = "http://www.my-company.it/ws/my-test", name =
"MyTest")
+(a)XmlSeeAlso({ObjectFactory.class})
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")
+ @WebMethod(action = "urn: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
- ;
-
+ @WebParam(name = "Code", targetNamespace = "")
+ java.lang.Integer code
+ ) throws MyWSException_Exception;
}
Deleted:
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/MyTestService.java
===================================================================
---
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/MyTestService.java 2012-07-16
21:45:17 UTC (rev 16473)
+++
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/MyTestService.java 2012-07-17
06:02:10 UTC (rev 16474)
@@ -1,73 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.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);
- }
-
-}
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/MyWSException.java
===================================================================
---
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/MyWSException.java 2012-07-16
21:45:17 UTC (rev 16473)
+++
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/MyWSException.java 2012-07-17
06:02:10 UTC (rev 16474)
@@ -1,24 +1,4 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.types;
import javax.xml.bind.annotation.XmlAccessType;
@@ -47,7 +27,7 @@
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "MyWSException", propOrder = {
+@XmlType(name = "MyWSException", namespace =
"http://www.my-company.it/ws/my-test", propOrder = {
"message"
})
public class MyWSException {
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/MyWSException_Exception.java
===================================================================
---
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/MyWSException_Exception.java 2012-07-16
21:45:17 UTC (rev 16473)
+++
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/MyWSException_Exception.java 2012-07-17
06:02:10 UTC (rev 16474)
@@ -1,74 +1,43 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.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
- *
+ * This class was generated by Apache CXF 2.6.0-SNAPSHOT
+ * 2012-07-17T00:38:10.286+08:00
+ * Generated source version: 2.6.0-SNAPSHOT
*/
+
@WebFault(name = "MyWSException", targetNamespace =
"http://www.my-company.it/ws/my-test")
-public class MyWSException_Exception
- extends Exception
-{
+public class MyWSException_Exception extends Exception {
+
+ private org.jboss.test.ws.jaxws.jbws1172.types.MyWSException myWSException;
- /**
- * Java type that goes as soapenv:Fault detail element.
- *
- */
- private MyWSException faultInfo;
+ public MyWSException_Exception() {
+ super();
+ }
+
+ public MyWSException_Exception(String message) {
+ super(message);
+ }
+
+ public MyWSException_Exception(String message, Throwable cause) {
+ super(message, cause);
+ }
- /**
- *
- * @param faultInfo
- * @param message
- */
- public MyWSException_Exception(String message, MyWSException faultInfo) {
+ public MyWSException_Exception(String message,
org.jboss.test.ws.jaxws.jbws1172.types.MyWSException myWSException) {
super(message);
- this.faultInfo = faultInfo;
+ this.myWSException = myWSException;
}
- /**
- *
- * @param faultInfo
- * @param message
- * @param cause
- */
- public MyWSException_Exception(String message, MyWSException faultInfo, Throwable
cause) {
+ public MyWSException_Exception(String message,
org.jboss.test.ws.jaxws.jbws1172.types.MyWSException myWSException, Throwable cause) {
super(message, cause);
- this.faultInfo = faultInfo;
+ this.myWSException = myWSException;
}
- /**
- *
- * @return
- * returns fault bean: org.jboss.test.ws.jaxws.jbws1172.types.MyWSException
- */
- public MyWSException getFaultInfo() {
- return faultInfo;
+ public org.jboss.test.ws.jaxws.jbws1172.types.MyWSException getFaultInfo() {
+ return this.myWSException;
}
-
}
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/ObjectFactory.java
===================================================================
---
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/ObjectFactory.java 2012-07-16
21:45:17 UTC (rev 16473)
+++
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/ObjectFactory.java 2012-07-17
06:02:10 UTC (rev 16474)
@@ -1,24 +1,4 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.types;
import javax.xml.bind.JAXBElement;
@@ -45,8 +25,8 @@
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");
+ private final static QName _MyWSException_QNAME = new
QName("http://www.my-company.it/ws/my-test", "MyWSException");
/**
* 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
@@ -56,11 +36,11 @@
}
/**
- * Create an instance of {@link MyWSException }
+ * Create an instance of {@link PerformTestResponse }
*
*/
- public MyWSException createMyWSException() {
- return new MyWSException();
+ public PerformTestResponse createPerformTestResponse() {
+ return new PerformTestResponse();
}
/**
@@ -72,11 +52,11 @@
}
/**
- * Create an instance of {@link PerformTestResponse }
+ * Create an instance of {@link MyWSException }
*
*/
- public PerformTestResponse createPerformTestResponse() {
- return new PerformTestResponse();
+ public MyWSException createMyWSException() {
+ return new MyWSException();
}
/**
@@ -89,21 +69,21 @@
}
/**
- * Create an instance of {@link JAXBElement }{@code <}{@link MyWSException }{@code
>}}
+ * Create an instance of {@link JAXBElement }{@code <}{@link PerformTestResponse
}{@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);
+ @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);
}
/**
- * Create an instance of {@link JAXBElement }{@code <}{@link PerformTestResponse
}{@code >}}
+ * Create an instance of {@link JAXBElement }{@code <}{@link MyWSException }{@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);
+ @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);
}
}
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/PerformTest.java
===================================================================
---
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/PerformTest.java 2012-07-16
21:45:17 UTC (rev 16473)
+++
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/PerformTest.java 2012-07-17
06:02:10 UTC (rev 16474)
@@ -1,24 +1,4 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.types;
import javax.xml.bind.annotation.XmlAccessType;
@@ -37,7 +17,7 @@
* <complexContent>
* <restriction
base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
- * <element name="Code"
type="{http://www.w3.org/2001/XMLSchema}long"/>
+ * <element name="Code"
type="{http://www.my-company.it/ws/my-test2}CodeType"/>
* </sequence>
* </restriction>
* </complexContent>
@@ -52,18 +32,18 @@
})
public class PerformTest {
- @XmlElement(name = "Code", required = true, type = Long.class, nillable =
true)
- protected Long code;
+ @XmlElement(name = "Code", required = true, type = Integer.class, nillable
= true)
+ protected Integer code;
/**
* Gets the value of the code property.
*
* @return
* possible object is
- * {@link Long }
+ * {@link Integer }
*
*/
- public Long getCode() {
+ public Integer getCode() {
return code;
}
@@ -72,10 +52,10 @@
*
* @param value
* allowed object is
- * {@link Long }
+ * {@link Integer }
*
*/
- public void setCode(Long value) {
+ public void setCode(Integer value) {
this.code = value;
}
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/PerformTestResponse.java
===================================================================
---
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/PerformTestResponse.java 2012-07-16
21:45:17 UTC (rev 16473)
+++
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/PerformTestResponse.java 2012-07-17
06:02:10 UTC (rev 16474)
@@ -1,24 +1,4 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.types;
import javax.xml.bind.annotation.XmlAccessType;
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/package-info.java
===================================================================
---
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/package-info.java 2012-07-16
21:45:17 UTC (rev 16473)
+++
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/types/package-info.java 2012-07-17
06:02:10 UTC (rev 16474)
@@ -1,23 +1,2 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.
- */
-(a)javax.xml.bind.annotation.XmlSchema(namespace =
"http://www.my-company.it/ws/my-test", elementFormDefault =
javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
+(a)javax.xml.bind.annotation.XmlSchema(namespace =
"http://www.my-company.it/ws/my-test2")
package org.jboss.test.ws.jaxws.jbws1172.types;
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws1172/WEB-INF/web.xml
===================================================================
---
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws1172/WEB-INF/web.xml 2012-07-16
21:45:17 UTC (rev 16473)
+++
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws1172/WEB-INF/web.xml 2012-07-17
06:02:10 UTC (rev 16474)
@@ -10,9 +10,14 @@
<servlet>
<servlet-name>ValidatingEndpoint</servlet-name>
-
<servlet-class>org.jboss.test.ws.jaxws.jbws1172.ValidatingEndpoint</servlet-class>
+
<servlet-class>org.jboss.test.ws.jaxws.jbws1172.NestedSchemaValidatingEndpoint</servlet-class>
</servlet>
+ <servlet>
+ <servlet-name>ValidatingEndpointWithImportSchema</servlet-name>
+
<servlet-class>org.jboss.test.ws.jaxws.jbws1172.ImportedSchemaValidatingEndpoint</servlet-class>
+ </servlet>
+
<servlet-mapping>
<servlet-name>NonValidatingEndpoint</servlet-name>
<url-pattern>/noval</url-pattern>
@@ -22,4 +27,10 @@
<servlet-name>ValidatingEndpoint</servlet-name>
<url-pattern>/doval</url-pattern>
</servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>ValidatingEndpointWithImportSchema</servlet-name>
+ <url-pattern>/doval-import</url-pattern>
+ </servlet-mapping>
+
</web-app>
\ No newline at end of file
Added:
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws1172/WEB-INF/wsdl/NoValTestService.wsdl
===================================================================
---
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws1172/WEB-INF/wsdl/NoValTestService.wsdl
(rev 0)
+++
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws1172/WEB-INF/wsdl/NoValTestService.wsdl 2012-07-17
06:02:10 UTC (rev 16474)
@@ -0,0 +1,70 @@
+<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:type2="http://www.my-company.it/ws/my-test2"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <types>
+ <schema 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">
+ <import namespace="http://www.my-company.it/ws/my-test2"/>
+ <complexType name="MyWSException">
+ <sequence>
+ <element name="message" nillable="true"
type="string"/>
+ </sequence>
+ </complexType>
+ <element name="MyWSException" type="tns:MyWSException"/>
+ <element name="performTest" type="type2:performTest"/>
+ <element name="performTestResponse"
type="type2:performTestResponse"/>
+ </schema>
+ <schema targetNamespace="http://www.my-company.it/ws/my-test2"
xmlns="http://www.w3.org/2001/XMLSchema"
+ xmlns:tns="http://www.my-company.it/ws/my-test2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+ <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>
+ </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://@jboss.bind.address@:9999/jaxws-jbws1172/noval"/>
+ </port>
+ </service>
+</definitions>
\ No newline at end of file
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws1172/WEB-INF/wsdl/TestService.wsdl
===================================================================
---
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws1172/WEB-INF/wsdl/TestService.wsdl 2012-07-16
21:45:17 UTC (rev 16473)
+++
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws1172/WEB-INF/wsdl/TestService.wsdl 2012-07-17
06:02:10 UTC (rev 16474)
@@ -1,12 +1,20 @@
-<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">
+<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:type2="http://www.my-company.it/ws/my-test2"
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"
+ <schema 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">
+ <import namespace="http://www.my-company.it/ws/my-test2"/>
<complexType name="MyWSException">
<sequence>
<element name="message" nillable="true"
type="string"/>
</sequence>
</complexType>
+ <element name="MyWSException" type="tns:MyWSException"/>
+ <element name="performTest" type="type2:performTest"/>
+ <element name="performTestResponse"
type="type2:performTestResponse"/>
+ </schema>
+ <schema targetNamespace="http://www.my-company.it/ws/my-test2"
xmlns="http://www.w3.org/2001/XMLSchema"
+ xmlns:tns="http://www.my-company.it/ws/my-test2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
<complexType name="performTest">
<sequence>
<element name="Code" nillable="true"
type="tns:CodeType"/>
@@ -21,9 +29,6 @@
<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">
@@ -59,7 +64,7 @@
</binding>
<service name="MyTestService">
<port binding="tns:MyTestBinding" name="MyTestPort">
- <soap:address
location="http://@jboss.bind.address@:8080/jaxws-jbws1172/noval"/>
+ <soap:address
location="http://@jboss.bind.address@:9090/jaxws-jbws1172/doval"/>
</port>
</service>
</definitions>
\ No newline at end of file
Added:
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws1172/WEB-INF/wsdl/TestServiceWithImportedSchema.wsdl
===================================================================
---
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws1172/WEB-INF/wsdl/TestServiceWithImportedSchema.wsdl
(rev 0)
+++
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws1172/WEB-INF/wsdl/TestServiceWithImportedSchema.wsdl 2012-07-17
06:02:10 UTC (rev 16474)
@@ -0,0 +1,53 @@
+<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:type2="http://www.my-company.it/ws/my-test2"
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">
+ <import namespace="http://www.my-company.it/ws/my-test2" schemaLocation
= "type1.xsd"/>
+ <complexType name="MyWSException">
+ <sequence>
+ <element name="message" nillable="true"
type="string"/>
+ </sequence>
+ </complexType>
+ <element name="MyWSException" type="tns:MyWSException"/>
+ <element name="performTest" type="type2:performTest"/>
+ <element name="performTestResponse"
type="type2: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://@jboss.bind.address@:8080/jaxws-jbws1172/noval"/>
+ </port>
+ </service>
+</definitions>
\ No newline at end of file
Added:
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws1172/WEB-INF/wsdl/type1.xsd
===================================================================
---
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws1172/WEB-INF/wsdl/type1.xsd
(rev 0)
+++
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbws1172/WEB-INF/wsdl/type1.xsd 2012-07-17
06:02:10 UTC (rev 16474)
@@ -0,0 +1,19 @@
+<schema targetNamespace="http://www.my-company.it/ws/my-test2"
+
xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:tns="http://www.my-company.it/ws/my-test2"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+ <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>
+</schema>
\ No newline at end of file