Author: alessio.soldano(a)jboss.com
Date: 2009-11-25 14:21:33 -0500 (Wed, 25 Nov 2009)
New Revision: 11157
Added:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/config/WSDLRequestHandlerTestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/common/config/schema1.xsd
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/common/config/test.wsdl
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/common/config/testUndefinedHost.wsdl
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/WSDLRequestHandler.java
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java
Log:
[JBWS-2842] Adding testcase, fixing issue, refactoring WSDLRequestHandler to make it
testable
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/WSDLRequestHandler.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/WSDLRequestHandler.java 2009-11-25
15:47:27 UTC (rev 11156)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/WSDLRequestHandler.java 2009-11-25
19:21:33 UTC (rev 11157)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2009, 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.
*
@@ -23,12 +23,12 @@
import java.io.File;
import java.io.IOException;
+import java.io.InputStream;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import org.jboss.logging.Logger;
-import org.jboss.ws.metadata.umdm.EndpointMetaData;
import org.jboss.wsf.common.DOMUtils;
import org.jboss.wsf.spi.SPIProvider;
import org.jboss.wsf.spi.SPIProviderResolver;
@@ -49,6 +49,8 @@
* For a discussion of this topic.
*
* @author Thomas.Diesler(a)jboss.org
+ * @author alessio.soldano(a)jboss.com
+ *
* @since 23-Mar-2005
*/
public class WSDLRequestHandler
@@ -56,38 +58,77 @@
// provide logging
private static Logger log = Logger.getLogger(WSDLRequestHandler.class);
- private final EndpointMetaData epMetaData;
+ private final URL wsdlLocation;
+ private final String wsdlPublishLoc;
private final ServerConfig config;
- public WSDLRequestHandler(EndpointMetaData epMetaData)
+ public WSDLRequestHandler(URL wsdlLocationFromMetadata, String
wsdlPublishLocationFromMetadata, ServerConfig config)
{
- this.epMetaData = epMetaData;
- SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- this.config = spiProvider.getSPI(ServerConfigFactory.class).getServerConfig();
+ this.wsdlLocation = wsdlLocationFromMetadata;
+ this.wsdlPublishLoc = wsdlPublishLocationFromMetadata;
+ this.config = config;
}
+
+ public Document getDocumentForPath(URL reqURL, String resPath) throws IOException
+ {
+ String wsdlHost = reqURL.getHost();
+ boolean rewriteUsingCalledURL =
ServerConfig.UNDEFINED_HOSTNAME.equals(config.getWebServiceHost());
+ if (!rewriteUsingCalledURL)
+ {
+ wsdlHost = config.getWebServiceHost();
+ }
+
+ if (log.isDebugEnabled())
+ log.debug("WSDL request, using host: " + wsdlHost);
+
+ return getDocumentForPath(reqURL, wsdlHost, rewriteUsingCalledURL, resPath);
+ }
+
+ protected InputStream openStreamToWSDL() throws IOException
+ {
+ return wsdlLocation.openStream();
+ }
+
/**
* Get the WSDL resource for a given resource path
* <p/>
* Use path value of null to get the root document
*
+ * @param reqURL The full request url
+ * @param wsdlHost The host to be used for address rewrite in the wsdl
+ * @param rewriteUsingCalledURL True if the called url is being used to get the
wsdlHost (and the port to use for relative addresses in import/include elements)
* @param resPath The wsdl resource to get, can be null for the top level wsdl
* @return A wsdl document, or null if it cannot be found
*/
- public Document getDocumentForPath(URL reqURL, String wsdlHost, String resPath) throws
IOException
+ private Document getDocumentForPath(URL reqURL, String wsdlHost, boolean
rewriteUsingCalledURL, String resPath) throws IOException
{
Document wsdlDoc;
- // The WSDLFilePublisher should set the location to an URL
- URL wsdlLocation = epMetaData.getServiceMetaData().getWsdlLocation();
if (wsdlLocation == null)
throw new IllegalStateException("Cannot obtain wsdl location");
// get the root wsdl
if (resPath == null)
{
- Element wsdlElement = DOMUtils.parse(wsdlLocation.openStream());
- wsdlDoc = wsdlElement.getOwnerDocument();
+ InputStream is = null;
+ try
+ {
+ is = openStreamToWSDL();
+ Element wsdlElement = DOMUtils.parse(is);
+ wsdlDoc = wsdlElement.getOwnerDocument();
+ }
+ finally
+ {
+ try
+ {
+ is.close();
+ }
+ catch (Exception e)
+ {
+ //ignore
+ }
+ }
}
// get some imported resource
@@ -96,7 +137,6 @@
File wsdlLocFile = new File(wsdlLocation.getPath());
String impResourcePath = wsdlLocFile.getParent() + File.separatorChar +
resPath;
File impResourceFile = new File(impResourcePath);
- String wsdlPublishLoc =
epMetaData.getServiceMetaData().getWsdlPublishLocation();
if (log.isDebugEnabled())
log.debug("Importing resource file: " +
impResourceFile.getCanonicalPath());
@@ -122,14 +162,14 @@
}
}
- modifyAddressReferences(reqURL, wsdlHost, resPath, wsdlDoc.getDocumentElement());
+ modifyAddressReferences(reqURL, wsdlHost, rewriteUsingCalledURL, resPath,
wsdlDoc.getDocumentElement());
return wsdlDoc;
}
/**
* Modify the location of wsdl and schema imports
*/
- private void modifyAddressReferences(URL reqURL, String wsdlHost, String resPath,
Element element) throws IOException
+ private void modifyAddressReferences(URL reqURL, String wsdlHost, boolean
rewriteUsingCalledURL, String resPath, Element element) throws IOException
{
// map wsdl definition imports
NodeList nlist = element.getChildNodes();
@@ -189,13 +229,10 @@
String reqPath = reqURL.getPath();
String completeHost = wsdlHost;
- if (!(wsdlHost.startsWith("http://") ||
wsdlHost.startsWith("https://")))
- {
- String reqProtocol = reqURL.getProtocol();
- int reqPort = reqURL.getPort();
- String hostAndPort = wsdlHost + (reqPort > 0 ? ":" +
reqPort : "");
- completeHost = reqProtocol + "://" + hostAndPort;
- }
+ String reqProtocol = reqURL.getProtocol();
+ int reqPort = rewriteUsingCalledURL ? reqURL.getPort() :
getPortForProtocol(reqProtocol);
+ String hostAndPort = wsdlHost + (reqPort > 0 ? ":" +
reqPort : "");
+ completeHost = reqProtocol + "://" + hostAndPort;
String newLocation = completeHost + reqPath +
"?wsdl&resource=" + newResourcePath;
locationAttr.setNodeValue(newLocation);
@@ -229,7 +266,15 @@
boolean confidential =
"https".equalsIgnoreCase(orgProtocol);
String reqProtocol = reqURL.getProtocol();
- int port = confidential ? getPortForProtocol("https") :
getPortForProtocol(reqProtocol);
+ int port;
+ if (rewriteUsingCalledURL)
+ {
+ port = reqURL.getPort();
+ }
+ else
+ {
+ port = confidential ? getPortForProtocol("https") :
getPortForProtocol(reqProtocol);
+ }
String path = orgURL.getPath();
String newLocation = new URL(confidential ? "https" :
reqProtocol, wsdlHost, port, path).toString();
if (!newLocation.equals(orgLocation))
@@ -244,12 +289,13 @@
}
else
{
- modifyAddressReferences(reqURL, wsdlHost, resPath, childElement);
+ modifyAddressReferences(reqURL, wsdlHost, rewriteUsingCalledURL, resPath,
childElement);
}
}
}
}
+
private static boolean isHttp(String orgLocation)
{
try
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java 2009-11-25
15:47:27 UTC (rev 11156)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java 2009-11-25
19:21:33 UTC (rev 11157)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2009, 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.
*
@@ -51,8 +51,6 @@
import javax.xml.ws.http.HTTPBinding;
import org.jboss.logging.Logger;
-import org.jboss.netty.handler.codec.http.HttpMessage;
-import org.jboss.netty.handler.codec.http.HttpRequest;
import org.jboss.ws.Constants;
import org.jboss.ws.WSException;
import org.jboss.ws.core.CommonBinding;
@@ -234,6 +232,7 @@
}
}
+ @SuppressWarnings("unchecked")
public void handleRequest(Endpoint endpoint, InputStream inStream, OutputStream
outStream, InvocationContext invContext)
{
if (log.isDebugEnabled())
@@ -691,18 +690,14 @@
ServerEndpointMetaData epMetaData =
endpoint.getAttachment(ServerEndpointMetaData.class);
if (epMetaData == null)
throw new IllegalStateException("Cannot obtain endpoint meta data");
+
+ //The WSDLFilePublisher should set the location to an URL
+ URL wsdlLocation = epMetaData.getServiceMetaData().getWsdlLocation();
+ String wsdlPublishLoc = epMetaData.getServiceMetaData().getWsdlPublishLocation();
- String wsdlHost = reqURL.getHost();
+ WSDLRequestHandler wsdlRequestHandler = new WSDLRequestHandler(wsdlLocation,
wsdlPublishLoc, serverConfig);
+ Document document = wsdlRequestHandler.getDocumentForPath(reqURL, resPath);
- if (ServerConfig.UNDEFINED_HOSTNAME.equals(serverConfig.getWebServiceHost()) ==
false)
- wsdlHost = serverConfig.getWebServiceHost();
-
- if (log.isDebugEnabled())
- log.debug("WSDL request, using host: " + wsdlHost);
-
- WSDLRequestHandler wsdlRequestHandler = new WSDLRequestHandler(epMetaData);
- Document document = wsdlRequestHandler.getDocumentForPath(reqURL, wsdlHost,
resPath);
-
OutputStreamWriter writer = new OutputStreamWriter(outputStream);
new DOMWriter(writer,
Constants.DEFAULT_XML_CHARSET).setPrettyprint(true).print(document);
}
Added:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/config/WSDLRequestHandlerTestCase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/config/WSDLRequestHandlerTestCase.java
(rev 0)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/config/WSDLRequestHandlerTestCase.java 2009-11-25
19:21:33 UTC (rev 11157)
@@ -0,0 +1,256 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, 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.common.config;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.net.UnknownHostException;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.ws.core.server.WSDLRequestHandler;
+import org.jboss.wsf.common.DOMUtils;
+import org.jboss.wsf.spi.management.ServerConfig;
+import org.jboss.wsf.test.JBossWSTest;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+/**
+ * Comprehensive testcase for WSDLRequestHandler's address rewrite rules
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 25-Nov-2009
+ */
+public class WSDLRequestHandlerTestCase extends JBossWSTest
+{
+ private static final String wsdlPublishLocation = "/foo/bar";
+
+ public void testNoAlwaysModifyWithValidSoapAddress() throws Exception
+ {
+ File wsdl = getResourceFile("common/config/test.wsdl");
+ ServerConfig config = new TestConfig(false, "myHost", 8080, 8443);
+
+ URL wsdlLocation = new
URL("http://www.foo.org/c/d");
+ WSDLRequestHandler handler = new TestWSDLRequestHandler(wsdlLocation, wsdl,
config);
+ Document doc = handler.getDocumentForPath(new
URL("http://localhost:80/a/b"), null); //null resPath for getting the wsdl
document
+ assertEquals("http://blah/blah", getSoapAddressLocation(doc)); //no
rewrite because the modifySoapAddress is false (and the soap:address in the wsdl is
"valid")
+ assertEquals("http://myHost:8080/a/b?wsdl&resource=schema1.xsd",
getXsdImportSchemaLocation(doc)); //relative imports locations are always rewritten
+
+ //test with rewrite based on called uri (for multiple virtual host support, see
JBWS-1178 and subsequent jira issues)
+ config = new TestConfig(false, ServerConfig.UNDEFINED_HOSTNAME, 8080, 8443);
+ handler = new TestWSDLRequestHandler(wsdlLocation, wsdl, config);
+ doc = handler.getDocumentForPath(new URL("http://localhost:80/a/b"),
null); //null resPath for getting the wsdl document
+ assertEquals("http://blah/blah", getSoapAddressLocation(doc)); //no
rewrite because the modifySoapAddress is false (and the soap:address in the wsdl is
"valid")
+ assertEquals("http://localhost:80/a/b?wsdl&resource=schema1.xsd",
getXsdImportSchemaLocation(doc)); //relative imports rewritten with caller data because
UNDEFINED_HOSTNAME
+
//was specified (required for multiple virtual host support)
+ }
+
+ public void testAlwaysModifyValidSoapAddress() throws Exception
+ {
+ File wsdl = getResourceFile("common/config/test.wsdl");
+ ServerConfig config = new TestConfig(true, "myHost", 8080, 8443);
+
+ URL wsdlLocation = new URL("http://www.foo.org");
+ WSDLRequestHandler handler = new TestWSDLRequestHandler(wsdlLocation, wsdl,
config);
+ Document doc = handler.getDocumentForPath(new
URL("http://localhost:80/a/b"), null); //null resPath for getting the wsdl
document
+ assertEquals("http://myHost:8080/blah", getSoapAddressLocation(doc));
//rewrite with provided host and port (always modify is true)
+ assertEquals("http://myHost:8080/a/b?wsdl&resource=schema1.xsd",
getXsdImportSchemaLocation(doc)); //relative imports locations are always rewritten
+
+ //test with rewrite based on called uri (for multiple virtual host support, see
JBWS-1178 and subsequent jira issues)
+ config = new TestConfig(true, ServerConfig.UNDEFINED_HOSTNAME, 8080, 8443);
+
+ handler = new TestWSDLRequestHandler(wsdlLocation, wsdl, config);
+ doc = handler.getDocumentForPath(new URL("http://localhost:80/a/b"),
null); //null resPath for getting the wsdl document
+ assertEquals("http://localhost:80/blah", getSoapAddressLocation(doc));
//rewrite with called host and port (always modify is true)
+ assertEquals("http://localhost:80/a/b?wsdl&resource=schema1.xsd",
getXsdImportSchemaLocation(doc)); //relative imports rewritten with all caller data
because UNDEFINED_HOSTNAME
+
//was specified (required for multiple virtual host support)
+ }
+
+ public void testNoAlwaysModifyWithUndefinedSoapAddress() throws Exception
+ {
+ File wsdl = getResourceFile("common/config/testUndefinedHost.wsdl");
+ ServerConfig config = new TestConfig(false, "myHost", 8080, 8443);
+
+ URL wsdlLocation = new
URL("http://www.foo.org/c/d");
+ WSDLRequestHandler handler = new TestWSDLRequestHandler(wsdlLocation, wsdl,
config);
+ Document doc = handler.getDocumentForPath(new
URL("http://localhost:80/a/b"), null); //null resPath for getting the wsdl
document
+ assertEquals("http://myHost:8080/zzzz", getSoapAddressLocation(doc));
//rewrite because the soap:address in the wsdl has "jbossws.undefined.host"
host
+ assertEquals("http://myHost:8080/a/b?wsdl&resource=schema1.xsd",
getXsdImportSchemaLocation(doc)); //relative imports locations are always rewritten
+
+ //test with rewrite based on called uri (for multiple virtual host support, see
JBWS-1178 and subsequent jira issues)
+ config = new TestConfig(false, ServerConfig.UNDEFINED_HOSTNAME, 8080, 8443);
+
+ handler = new TestWSDLRequestHandler(wsdlLocation, wsdl, config);
+ doc = handler.getDocumentForPath(new URL("http://localhost:80/a/b"),
null); //null resPath for getting the wsdl document
+ assertEquals("http://localhost:80/zzzz", getSoapAddressLocation(doc));
//rewrite because the soap:address in the wsdl has "jbossws.undefined.host"
host
+ assertEquals("http://localhost:80/a/b?wsdl&resource=schema1.xsd",
getXsdImportSchemaLocation(doc)); //relative imports rewritten with caller data because
UNDEFINED_HOSTNAME
+
//was specified (required for multiple virtual host support)
+ }
+
+ public void testAlwaysModifyUndefinedSoapAddress() throws Exception
+ {
+ File wsdl = getResourceFile("common/config/testUndefinedHost.wsdl");
+ ServerConfig config = new TestConfig(true, "myHost", 8080, 8443);
+
+ URL wsdlLocation = new URL("http://www.foo.org");
+ WSDLRequestHandler handler = new TestWSDLRequestHandler(wsdlLocation, wsdl,
config);
+ Document doc = handler.getDocumentForPath(new
URL("http://localhost:80/a/b"), null); //null resPath for getting the wsdl
document
+ assertEquals("http://myHost:8080/zzzz", getSoapAddressLocation(doc));
//rewrite with provided host and port (always modify is true)
+ assertEquals("http://myHost:8080/a/b?wsdl&resource=schema1.xsd",
getXsdImportSchemaLocation(doc)); //relative imports locations are always rewritten
+
+ //test with rewrite based on called uri (for multiple virtual host support, see
JBWS-1178 and subsequent jira issues)
+ config = new TestConfig(true, ServerConfig.UNDEFINED_HOSTNAME, 8080, 8443);
+
+ handler = new TestWSDLRequestHandler(wsdlLocation, wsdl, config);
+ doc = handler.getDocumentForPath(new URL("http://localhost:80/a/b"),
null); //null resPath for getting the wsdl document
+ assertEquals("http://localhost:80/zzzz", getSoapAddressLocation(doc));
//rewrite with called host and port (always modify is true)
+ assertEquals("http://localhost:80/a/b?wsdl&resource=schema1.xsd",
getXsdImportSchemaLocation(doc)); //relative imports rewritten with caller data because
UNDEFINED_HOSTNAME
+
//was specified (required for multiple virtual host support)
+ }
+
+ // --------- Helper methods --------
+
+ private static String getSoapAddressLocation(Document doc)
+ {
+ Element docElement = doc.getDocumentElement();
+ Element el = (Element)DOMUtils.getChildElements(docElement, new
QName("http://schemas.xmlsoap.org/wsdl/soap/","address"),
true).next();
+ return el.getAttribute("location");
+ }
+
+ private static String getXsdImportSchemaLocation(Document doc)
+ {
+ Element docElement = doc.getDocumentElement();
+ Element el = (Element)DOMUtils.getChildElements(docElement, new
QName("http://www.w3.org/2001/XMLSchema","import"), true).next();
+ return el.getAttribute("schemaLocation");
+ }
+
+ // --------- Test helper classes --------
+
+ private class TestWSDLRequestHandler extends WSDLRequestHandler
+ {
+ private File testWsdl;
+
+ public TestWSDLRequestHandler(URL wsdlLocationFromMetadata, File testWsdl,
ServerConfig config)
+ {
+ super(wsdlLocationFromMetadata, wsdlPublishLocation, config);
+ this.testWsdl = testWsdl;
+ }
+
+ @Override
+ protected InputStream openStreamToWSDL() throws IOException
+ {
+ return testWsdl.toURL().openStream();
+ }
+
+ }
+
+ private class TestConfig implements ServerConfig
+ {
+ private boolean modifySoapAddress;
+ private String webServiceHost;
+ private int webServicePort;
+ private int webServiceSecurePort;
+
+ public TestConfig(boolean modifySoapAddress, String webServiceHost, int
webServicePort, int webServiceSecurePort)
+ {
+ super();
+ this.modifySoapAddress = modifySoapAddress;
+ this.webServiceHost = webServiceHost;
+ this.webServicePort = webServicePort;
+ this.webServiceSecurePort = webServiceSecurePort;
+ }
+
+ public String getWebServiceHost()
+ {
+ return webServiceHost;
+ }
+
+ public int getWebServicePort()
+ {
+ return webServicePort;
+ }
+
+ public int getWebServiceSecurePort()
+ {
+ return webServiceSecurePort;
+ }
+
+ public boolean isModifySOAPAddress()
+ {
+ return modifySoapAddress;
+ }
+
+ public void setModifySOAPAddress(boolean flag)
+ {
+ this.modifySoapAddress = flag;
+ }
+
+ public void setWebServiceHost(String host) throws UnknownHostException
+ {
+ this.webServiceHost = host;
+ }
+
+ public void setWebServicePort(int port)
+ {
+ this.webServicePort = port;
+ }
+
+ public void setWebServiceSecurePort(int port)
+ {
+ this.webServiceSecurePort = port;
+ }
+
+ public File getHomeDir()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public String getImplementationTitle()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public String getImplementationVersion()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public File getServerDataDir()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public File getServerTempDir()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ }
+
+}
Property changes on:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/config/WSDLRequestHandlerTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/common/config/schema1.xsd
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/common/config/schema1.xsd
(rev 0)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/common/config/schema1.xsd 2009-11-25
19:21:33 UTC (rev 11157)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"
standalone="yes"?>
+<xs:schema version="1.0" targetNamespace="http://foo/bar"
xmlns:tns="http://foo/bar"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <xs:complexType name="foo">
+ <xs:sequence>
+ <xs:element name="bar" type="xs:string"
minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
+
Property changes on:
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/common/config/schema1.xsd
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/common/config/test.wsdl
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/common/config/test.wsdl
(rev 0)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/common/config/test.wsdl 2009-11-25
19:21:33 UTC (rev 11157)
@@ -0,0 +1,44 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<wsdl:definitions name="EndpointService"
targetNamespace="http://org.jboss.ws/jbws1178"
xmlns:ns1="http://schemas.xmlsoap.org/wsdl/soap/http"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://org.jboss.ws/jbws1178"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <wsdl:types>
+ <xsd:schema>
+ <xsd:import namespace="http://foo/bar"
schemaLocation="schema1.xsd"/>
+ </xsd:schema>
+ </wsdl:types>
+ <wsdl:message name="echoResponse">
+ <wsdl:part name="return" type="xsd:string">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="echo">
+ <wsdl:part name="arg0" type="xsd:string">
+ </wsdl:part>
+ </wsdl:message>
+
+ <wsdl:portType name="Endpoint">
+ <wsdl:operation name="echo">
+ <wsdl:input message="tns:echo" name="echo">
+ </wsdl:input>
+ <wsdl:output message="tns:echoResponse"
name="echoResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="EndpointServiceSoapBinding"
type="tns:Endpoint">
+
+ <soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http" />
+ <wsdl:operation name="echo">
+ <soap:operation soapAction="" style="rpc" />
+ <wsdl:input name="echo">
+ <soap:body namespace="http://org.jboss.ws/jbws1178"
use="literal" />
+ </wsdl:input>
+ <wsdl:output name="echoResponse">
+ <soap:body namespace="http://org.jboss.ws/jbws1178"
use="literal" />
+ </wsdl:output>
+
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="EndpointService">
+ <wsdl:port binding="tns:EndpointServiceSoapBinding"
name="EndpointPort">
+ <soap:address location="http://blah/blah" />
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
\ No newline at end of file
Property changes on:
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/common/config/test.wsdl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/common/config/testUndefinedHost.wsdl
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/common/config/testUndefinedHost.wsdl
(rev 0)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/common/config/testUndefinedHost.wsdl 2009-11-25
19:21:33 UTC (rev 11157)
@@ -0,0 +1,44 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<wsdl:definitions name="EndpointService"
targetNamespace="http://org.jboss.ws/jbws1178"
xmlns:ns1="http://schemas.xmlsoap.org/wsdl/soap/http"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://org.jboss.ws/jbws1178"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <wsdl:types>
+ <xsd:schema>
+ <xsd:import namespace="http://foo/bar"
schemaLocation="schema1.xsd"/>
+ </xsd:schema>
+ </wsdl:types>
+ <wsdl:message name="echoResponse">
+ <wsdl:part name="return" type="xsd:string">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="echo">
+ <wsdl:part name="arg0" type="xsd:string">
+ </wsdl:part>
+ </wsdl:message>
+
+ <wsdl:portType name="Endpoint">
+ <wsdl:operation name="echo">
+ <wsdl:input message="tns:echo" name="echo">
+ </wsdl:input>
+ <wsdl:output message="tns:echoResponse"
name="echoResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="EndpointServiceSoapBinding"
type="tns:Endpoint">
+
+ <soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http" />
+ <wsdl:operation name="echo">
+ <soap:operation soapAction="" style="rpc" />
+ <wsdl:input name="echo">
+ <soap:body namespace="http://org.jboss.ws/jbws1178"
use="literal" />
+ </wsdl:input>
+ <wsdl:output name="echoResponse">
+ <soap:body namespace="http://org.jboss.ws/jbws1178"
use="literal" />
+ </wsdl:output>
+
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="EndpointService">
+ <wsdl:port binding="tns:EndpointServiceSoapBinding"
name="EndpointPort">
+ <soap:address location="http://jbossws.undefined.host/zzzz" />
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
\ No newline at end of file
Property changes on:
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/common/config/testUndefinedHost.wsdl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF