Author: thomas.diesler(a)jboss.com
Date: 2007-10-17 09:00:58 -0400 (Wed, 17 Oct 2007)
New Revision: 4784
Added:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1797/
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1797/IWebsvc.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1797/IWebsvcImpl.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1797/JBWS1797TestCase.java
stack/native/trunk/src/test/resources/jaxws/jbws1797/
stack/native/trunk/src/test/resources/jaxws/jbws1797/WEB-INF/
stack/native/trunk/src/test/resources/jaxws/jbws1797/WEB-INF/web.xml
Modified:
stack/native/trunk/.classpath
stack/native/trunk/ant-import-tests/build-jars-jaxws.xml
stack/native/trunk/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSProviderMetaDataBuilder.java
stack/native/trunk/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSServerMetaDataBuilder.java
stack/native/trunk/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java
stack/native/trunk/src/main/java/org/jboss/wsf/stack/jbws/EndpointServlet.java
stack/native/trunk/src/test/resources/test-excludes-jboss40.no.ejb3.txt
stack/native/trunk/src/test/resources/test-excludes-jboss40.txt
stack/native/trunk/src/test/resources/test-excludes-jboss42.txt
Log:
[JBWS-1797] Setting .NET friendly Endpoint in web.xml
Modified: stack/native/trunk/.classpath
===================================================================
--- stack/native/trunk/.classpath 2007-10-17 11:51:37 UTC (rev 4783)
+++ stack/native/trunk/.classpath 2007-10-17 13:00:58 UTC (rev 4784)
@@ -39,6 +39,6 @@
<classpathentry kind="lib" path="thirdparty/junit.jar"/>
<classpathentry kind="lib"
path="thirdparty/jboss-jaxb-intros.jar"/>
<classpathentry kind="lib"
path="thirdparty/jbossws-common.jar"/>
- <classpathentry kind="lib"
path="thirdparty/jbossws-spi.jar"/>
+ <classpathentry kind="lib" path="thirdparty/jbossws-spi.jar"
sourcepath="thirdparty/jbossws-spi-src.zip"/>
<classpathentry kind="output" path="output/eclipse"/>
</classpath>
Modified: stack/native/trunk/ant-import-tests/build-jars-jaxws.xml
===================================================================
--- stack/native/trunk/ant-import-tests/build-jars-jaxws.xml 2007-10-17 11:51:37 UTC (rev
4783)
+++ stack/native/trunk/ant-import-tests/build-jars-jaxws.xml 2007-10-17 13:00:58 UTC (rev
4784)
@@ -380,6 +380,14 @@
</fileset>
</copy>
+ <!-- jaxws-jbws1797 -->
+ <war destfile="${tests.output.dir}/libs/jaxws-jbws1797.war"
webxml="${tests.output.dir}/resources/jaxws/jbws1797/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/classes">
+ <include name="org/jboss/test/ws/jaxws/jbws1797/*.class"/>
+ <exclude
name="org/jboss/test/ws/jaxws/jbws1797/*TestCase.class"/>
+ </classes>
+ </war>
+
<!-- jaxws-jbws1798 -->
<war warfile="${tests.output.dir}/libs/jaxws-jbws1798.war"
webxml="${tests.output.dir}/resources/jaxws/jbws1798/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/classes">
Modified:
stack/native/trunk/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSProviderMetaDataBuilder.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSProviderMetaDataBuilder.java 2007-10-17
11:51:37 UTC (rev 4783)
+++
stack/native/trunk/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSProviderMetaDataBuilder.java 2007-10-17
13:00:58 UTC (rev 4784)
@@ -134,7 +134,7 @@
processHandlerChain(sepMetaData, sepClass);
// process config
- processEndpointConfig(sepClass, linkName, sepMetaData);
+ processEndpointConfig(dep, sepMetaData, sepClass, linkName);
// Set the endpoint address
processWebContext(dep, sepClass, linkName, sepMetaData);
Modified:
stack/native/trunk/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSServerMetaDataBuilder.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSServerMetaDataBuilder.java 2007-10-17
11:51:37 UTC (rev 4783)
+++
stack/native/trunk/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSServerMetaDataBuilder.java 2007-10-17
13:00:58 UTC (rev 4784)
@@ -1,24 +1,24 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
package org.jboss.ws.metadata.builder.jaxws;
// $Id$
@@ -33,6 +33,8 @@
import org.jboss.wsf.spi.deployment.ArchiveDeployment;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
+import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.JSEArchiveMetaData;
/**
* Builds ServiceEndpointMetaData for a JAX-WS endpoint.
@@ -56,22 +58,39 @@
}
}
- protected void processEndpointConfig(Class<?> wsClass, String linkName,
ServerEndpointMetaData sepMetaData)
+ protected void processEndpointConfig(Deployment dep, ServerEndpointMetaData
sepMetaData, Class<?> wsClass, String linkName)
{
- EndpointConfig anEndpointConfig = wsClass.getAnnotation(EndpointConfig.class);
-
- if (anEndpointConfig== null)
- return;
-
String configName = null;
String configFile = null;
- if (anEndpointConfig.configName().length() > 0)
- configName = anEndpointConfig.configName();
+ EndpointConfig anEndpointConfig = wsClass.getAnnotation(EndpointConfig.class);
+ if (anEndpointConfig != null)
+ {
+ if (anEndpointConfig.configName().length() > 0)
+ configName = anEndpointConfig.configName();
- if (anEndpointConfig.configFile().length() > 0)
- configFile = anEndpointConfig.configFile();
-
+ if (anEndpointConfig.configFile().length() > 0)
+ configFile = anEndpointConfig.configFile();
+ }
+
+ JSEArchiveMetaData jseMetaData = dep.getAttachment(JSEArchiveMetaData.class);
+ if (jseMetaData != null)
+ {
+ if (jseMetaData.getConfigName() != null)
+ configName = jseMetaData.getConfigName();
+ if (jseMetaData.getConfigFile() != null)
+ configFile = jseMetaData.getConfigFile();
+ }
+
+ EJBArchiveMetaData ejbMetaData = dep.getAttachment(EJBArchiveMetaData.class);
+ if (ejbMetaData != null)
+ {
+ if (ejbMetaData.getConfigName() != null)
+ configName = ejbMetaData.getConfigName();
+ if (ejbMetaData.getConfigFile() != null)
+ configFile = ejbMetaData.getConfigFile();
+ }
+
if (configName != null || configFile != null)
sepMetaData.setConfigName(configName, configFile);
}
@@ -82,7 +101,7 @@
if (anWebContext == null)
return;
-
+
boolean isJSEEndpoint = (dep.getType() == DeploymentType.JAXWS_JSE);
// context-root
@@ -143,7 +162,7 @@
sepMetaData.setTransportGuarantee(transportGuarantee);
}
}
-
+
// secure wsdl access
sepMetaData.setSecureWSDLAccess(anWebContext.secureWSDLAccess());
Modified:
stack/native/trunk/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java 2007-10-17
11:51:37 UTC (rev 4783)
+++
stack/native/trunk/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java 2007-10-17
13:00:58 UTC (rev 4784)
@@ -134,7 +134,7 @@
processBindingType(sepMetaData, seiClass);
// process config
- processEndpointConfig(sepClass, linkName, sepMetaData);
+ processEndpointConfig(dep, sepMetaData, sepClass, linkName);
// Process web methods
processWebMethods(sepMetaData, seiClass);
Modified: stack/native/trunk/src/main/java/org/jboss/wsf/stack/jbws/EndpointServlet.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/wsf/stack/jbws/EndpointServlet.java 2007-10-17
11:51:37 UTC (rev 4783)
+++
stack/native/trunk/src/main/java/org/jboss/wsf/stack/jbws/EndpointServlet.java 2007-10-17
13:00:58 UTC (rev 4784)
@@ -23,31 +23,31 @@
// $Id$
+import java.io.IOException;
+
+import javax.management.ObjectName;
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.xml.ws.WebServiceException;
+
import org.jboss.logging.Logger;
import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
-import org.jboss.ws.metadata.umdm.UnifiedMetaData;
import org.jboss.wsf.common.ObjectNameFactory;
-import org.jboss.wsf.spi.invocation.EndpointAssociation;
import org.jboss.wsf.spi.SPIProvider;
import org.jboss.wsf.spi.SPIProviderResolver;
-import org.jboss.wsf.spi.invocation.RequestHandler;
import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
import org.jboss.wsf.spi.deployment.Endpoint.EndpointState;
+import org.jboss.wsf.spi.invocation.EndpointAssociation;
+import org.jboss.wsf.spi.invocation.RequestHandler;
import org.jboss.wsf.spi.management.EndpointRegistry;
import org.jboss.wsf.spi.management.EndpointRegistryFactory;
-import javax.management.ObjectName;
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletContext;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.xml.ws.WebServiceException;
-import java.io.IOException;
-
/**
* A servlet that is installed for every web service endpoint.
*
@@ -67,16 +67,14 @@
super.init(servletConfig);
SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
epRegistry =
spiProvider.getSPI(EndpointRegistryFactory.class).getEndpointRegistry();
+
+ servletConfig.getServletContext().getContextPath();
+ String contextPath = servletConfig.getServletContext().getContextPath();
+ initServiceEndpoint(contextPath);
}
public void service(HttpServletRequest req, HttpServletResponse res) throws
ServletException, IOException
{
- if (endpoint == null)
- {
- String contextPath = req.getContextPath();
- initServiceEndpoint(contextPath);
- }
-
try
{
EndpointAssociation.setEndpoint(endpoint);
@@ -124,7 +122,7 @@
log.debug("Updating service endpoint config\n config-name: " +
configName + "\n config-file: " + configFile);
epMetaData.setConfigName(configName, configFile);
}
- }
+ }
private void initEndpoint(String contextPath, String servletName)
{
@@ -133,10 +131,8 @@
if (this.endpoint == null)
{
- ObjectName oname = ObjectNameFactory.create(Endpoint.SEPID_DOMAIN +
":" +
- Endpoint.SEPID_PROPERTY_CONTEXT + "=" + contextPath + ","
+
- Endpoint.SEPID_PROPERTY_ENDPOINT + "=" + getServletName()
- );
+ ObjectName oname = ObjectNameFactory.create(Endpoint.SEPID_DOMAIN +
":" + Endpoint.SEPID_PROPERTY_CONTEXT + "=" + contextPath +
","
+ + Endpoint.SEPID_PROPERTY_ENDPOINT + "=" + getServletName());
throw new WebServiceException("Cannot obtain endpoint for: " +
oname);
}
Added: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1797/IWebsvc.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1797/IWebsvc.java
(rev 0)
+++
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1797/IWebsvc.java 2007-10-17
13:00:58 UTC (rev 4784)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.jbws1797;
+
+import javax.jws.WebParam;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+@WebService
+@SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL,
parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)
+public interface IWebsvc
+{
+ public String submit(@WebParam(name = "foo") String foo);
+
+ public String cancel(@WebParam(name = "foo") String foo, @WebParam(name =
"bar", header=true) String bar);
+}
Added: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1797/IWebsvcImpl.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1797/IWebsvcImpl.java
(rev 0)
+++
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1797/IWebsvcImpl.java 2007-10-17
13:00:58 UTC (rev 4784)
@@ -0,0 +1,39 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.jbws1797;
+
+import javax.jws.WebParam;
+import javax.jws.WebService;
+
+@WebService(endpointInterface = "org.jboss.test.ws.jaxws.jbws1797.IWebsvc",
serviceName = "JBWS1797Service")
+public class IWebsvcImpl implements IWebsvc
+{
+ public String submit(@WebParam(name = "foo") String foo)
+ {
+ return "submit-" + foo;
+ }
+
+ public String cancel(@WebParam(name = "foo") String foo, @WebParam(name =
"bar", header = true) String bar)
+ {
+ return "cancel-" + foo + bar;
+ }
+}
Added:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1797/JBWS1797TestCase.java
===================================================================
---
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1797/JBWS1797TestCase.java
(rev 0)
+++
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1797/JBWS1797TestCase.java 2007-10-17
13:00:58 UTC (rev 4784)
@@ -0,0 +1,146 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.jbws1797;
+
+// $Id: JBWS1797TestCase.java 3729 2007-06-26 19:38:00Z thomas.diesler(a)jboss.com $
+
+import java.net.URL;
+import java.util.List;
+
+import javax.wsdl.Binding;
+import javax.wsdl.BindingOperation;
+import javax.wsdl.Definition;
+import javax.wsdl.Message;
+import javax.wsdl.extensions.ExtensibilityElement;
+import javax.wsdl.extensions.soap.SOAPBody;
+import javax.wsdl.extensions.soap.SOAPHeader;
+import javax.wsdl.factory.WSDLFactory;
+import javax.wsdl.xml.WSDLReader;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
+import junit.framework.Test;
+
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ * [JBWS-1797] Setting .NET friendly Endpoint in web.xml
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 17-Oct-2007
+ */
+public class JBWS1797TestCase extends JBossWSTest
+{
+ private static final String TARGET_NAMESPACE =
"http://jbws1797.jaxws.ws.test.jboss.org/";
+ private static URL wsdlURL;
+ private static IWebsvc port;
+
+ public static Test suite()
+ {
+ return new JBossWSTestSetup(JBWS1797TestCase.class,
"jaxws-jbws1797.war");
+ }
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ if (port == null)
+ {
+ QName serviceName = new QName(TARGET_NAMESPACE, "JBWS1797Service");
+ wsdlURL = new URL("http://" + getServerHost() +
":8080/jaxws-jbws1797/IWebsvcImpl?wsdl");
+
+ Service service = Service.create(wsdlURL, serviceName);
+ port = service.getPort(IWebsvc.class);
+ }
+ }
+
+ public void testSubmit() throws Exception
+ {
+ String result = port.submit("foo");
+ assertEquals("submit-foo", result);
+ }
+
+ public void testCancel() throws Exception
+ {
+ String result = port.cancel("foo", "bar");
+ assertEquals("cancel-foobar", result);
+ }
+
+ public void testMessagePartNames() throws Exception
+ {
+ Definition wsdl = getWSDLDefinition(wsdlURL.toExternalForm());
+
+ Message wsdlReqMessage = wsdl.getMessage(new QName(TARGET_NAMESPACE,
"IWebsvc_cancel"));
+ assertNotNull("Expected part with name 'parameters' in: " +
wsdlReqMessage, wsdlReqMessage.getPart("parameters"));
+ assertNotNull("Expected part with name 'bar' in: " +
wsdlReqMessage, wsdlReqMessage.getPart("bar"));
+
+ Message wsdlResMessage = wsdl.getMessage(new QName(TARGET_NAMESPACE,
"IWebsvc_cancelResponse"));
+ assertNotNull("Expected part with name 'parameters' in: " +
wsdlResMessage, wsdlResMessage.getPart("parameters"));
+
+ /*
+ <binding name='IWebsvcBinding' type='tns:IWebsvc'>
+ <soap:binding style='document'
transport='http://schemas.xmlsoap.org/soap/http'/>
+ <operation name='cancel'>
+ <soap:operation soapAction=''/>
+ <input>
+ <soap:body parts='parameters' use='literal'/>
+ <soap:header message='tns:IWebsvc_cancel' part='bar'
use='literal'></soap:header>
+ </input>
+ <output>
+ <soap:body use='literal'/>
+ </output>
+ </operation>
+ */
+ Binding wsdlBinding = wsdl.getBinding(new QName(TARGET_NAMESPACE,
"IWebsvcBinding"));
+ BindingOperation bindingOperation =
wsdlBinding.getBindingOperation("cancel", null, null);
+
+ boolean foundBody = false;
+ boolean foundHeader = false;
+ List<ExtensibilityElement> extList =
bindingOperation.getBindingInput().getExtensibilityElements();
+ for (ExtensibilityElement extElement : extList)
+ {
+ if (extElement instanceof SOAPBody)
+ {
+ SOAPBody body = (SOAPBody)extElement;
+ assertEquals("parameters", body.getParts().get(0));
+ foundBody = true;
+ }
+ if (extElement instanceof SOAPHeader)
+ {
+ SOAPHeader header = (SOAPHeader)extElement;
+ assertEquals("bar", header.getPart());
+ foundHeader = true;
+ }
+ }
+ assertTrue("Found soap:body", foundBody);
+ assertTrue("Found soap:header", foundHeader);
+ }
+
+ private Definition getWSDLDefinition(String wsdlLocation) throws Exception
+ {
+ WSDLFactory wsdlFactory = WSDLFactory.newInstance();
+ WSDLReader wsdlReader = wsdlFactory.newWSDLReader();
+
+ Definition definition = wsdlReader.readWSDL(null, wsdlLocation);
+ return definition;
+ }
+}
Added: stack/native/trunk/src/test/resources/jaxws/jbws1797/WEB-INF/web.xml
===================================================================
--- stack/native/trunk/src/test/resources/jaxws/jbws1797/WEB-INF/web.xml
(rev 0)
+++ stack/native/trunk/src/test/resources/jaxws/jbws1797/WEB-INF/web.xml 2007-10-17
13:00:58 UTC (rev 4784)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+
+ <context-param>
+ <param-name>jbossws-config-name</param-name>
+ <
param-value>.NET friendly Endpoint</param-value>
+ </context-param>
+
+ <servlet>
+ <servlet-name>WebService</servlet-name>
+
<servlet-class>org.jboss.test.ws.jaxws.jbws1797.IWebsvcImpl</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>WebService</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+</web-app>
\ No newline at end of file
Modified: stack/native/trunk/src/test/resources/test-excludes-jboss40.no.ejb3.txt
===================================================================
--- stack/native/trunk/src/test/resources/test-excludes-jboss40.no.ejb3.txt 2007-10-17
11:51:37 UTC (rev 4783)
+++ stack/native/trunk/src/test/resources/test-excludes-jboss40.no.ejb3.txt 2007-10-17
13:00:58 UTC (rev 4784)
@@ -57,3 +57,6 @@
org/jboss/test/ws/jaxws/wsaddressing/action/AddressingActionTestCase*
org/jboss/test/ws/jaxws/wsaddressing/replyto/AddressingReplyToTestCase*
org/jboss/test/ws/jaxws/handlerscope/HandlerScopeTestCase*
+
+# [JBWS-1797] Setting .NET friendly Endpoint in web.xml
+org/jboss/test/ws/jaxws/jbws1797/**
Modified: stack/native/trunk/src/test/resources/test-excludes-jboss40.txt
===================================================================
--- stack/native/trunk/src/test/resources/test-excludes-jboss40.txt 2007-10-17 11:51:37
UTC (rev 4783)
+++ stack/native/trunk/src/test/resources/test-excludes-jboss40.txt 2007-10-17 13:00:58
UTC (rev 4784)
@@ -7,3 +7,6 @@
org/jboss/test/ws/jaxws/samples/retail/**
org/jboss/test/ws/jaxws/samples/webserviceref/**
org/jboss/test/ws/jaxws/webserviceref/**
+
+# [JBWS-1797] Setting .NET friendly Endpoint in web.xml
+org/jboss/test/ws/jaxws/jbws1797/**
Modified: stack/native/trunk/src/test/resources/test-excludes-jboss42.txt
===================================================================
--- stack/native/trunk/src/test/resources/test-excludes-jboss42.txt 2007-10-17 11:51:37
UTC (rev 4783)
+++ stack/native/trunk/src/test/resources/test-excludes-jboss42.txt 2007-10-17 13:00:58
UTC (rev 4784)
@@ -1,3 +1,6 @@
# EJB3/Injection excludes
org/jboss/test/ws/jaxws/samples/webserviceref/**
org/jboss/test/ws/jaxws/webserviceref/**
+
+# [JBWS-1797] Setting .NET friendly Endpoint in web.xml
+org/jboss/test/ws/jaxws/jbws1797/**