JBossWS SVN: r5764 - stack/native/trunk/src/main/java/org/jboss/wsf/stack/jbws.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2008-02-22 04:36:46 -0500 (Fri, 22 Feb 2008)
New Revision: 5764
Modified:
stack/native/trunk/src/main/java/org/jboss/wsf/stack/jbws/WSDLFilePublisher.java
Log:
[JBWS-2009] fixing FileNotFoundException when schema files are not in wsdl directory
Modified: stack/native/trunk/src/main/java/org/jboss/wsf/stack/jbws/WSDLFilePublisher.java
===================================================================
--- stack/native/trunk/src/main/java/org/jboss/wsf/stack/jbws/WSDLFilePublisher.java 2008-02-22 05:50:09 UTC (rev 5763)
+++ stack/native/trunk/src/main/java/org/jboss/wsf/stack/jbws/WSDLFilePublisher.java 2008-02-22 09:36:46 UTC (rev 5764)
@@ -235,6 +235,10 @@
resourcePath = resourcePath.substring(0, resourcePath.lastIndexOf("/") + 1);
resourcePath = expLocation + resourcePath + schemaLocation;
+ while (resourcePath.indexOf("//") != -1)
+ {
+ resourcePath = resourcePath.replace("//", "/");
+ }
URL resourceURL = dep.getMetaDataFileURL(resourcePath);
InputStream is = new ResourceURL(resourceURL).openStream();
if (is == null)
16 years, 9 months
JBossWS SVN: r5763 - in stack/native/trunk: src/test/java/org/jboss/test/ws/jaxws and 6 other directories.
by jbossws-commits@lists.jboss.org
Author: mageshbk(a)jboss.com
Date: 2008-02-22 00:50:09 -0500 (Fri, 22 Feb 2008)
New Revision: 5763
Added:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1969/
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1969/JBWS1969TestCase.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1969/TestEndpoint.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1969/TestEndpointImpl.java
stack/native/trunk/src/test/resources/jaxws/jbws1969/
stack/native/trunk/src/test/resources/jaxws/jbws1969/META-INF/
stack/native/trunk/src/test/resources/jaxws/jbws1969/META-INF/wsdl/
stack/native/trunk/src/test/resources/jaxws/jbws1969/META-INF/wsdl/echo/
stack/native/trunk/src/test/resources/jaxws/jbws1969/META-INF/wsdl/echo/TestService.wsdl
stack/native/trunk/src/test/resources/jaxws/jbws1969/META-INF/wsdl/echo/TestService.xsd
Modified:
stack/native/trunk/ant-import-tests/build-jars-jaxws.xml
Log:
[JBWS-1969] Added Testcase
Modified: stack/native/trunk/ant-import-tests/build-jars-jaxws.xml
===================================================================
--- stack/native/trunk/ant-import-tests/build-jars-jaxws.xml 2008-02-22 05:44:23 UTC (rev 5762)
+++ stack/native/trunk/ant-import-tests/build-jars-jaxws.xml 2008-02-22 05:50:09 UTC (rev 5763)
@@ -625,6 +625,17 @@
</fileset>
</jar>
+ <!-- jaxws-jbws1969 -->
+ <jar destfile="${tests.output.dir}/libs/jaxws-jbws1969.jar">
+ <fileset dir="${tests.output.dir}/classes">
+ <include name="org/jboss/test/ws/jaxws/jbws1969/*.class"/>
+ <exclude name="org/jboss/test/ws/jaxws/jbws1969/*TestCase.class"/>
+ </fileset>
+ <metainf dir="${tests.output.dir}/resources/jaxws/jbws1969/META-INF">
+ <include name="wsdl/**"/>
+ </metainf>
+ </jar>
+
<!-- jaxws-jbws2000 -->
<jar destfile="${tests.output.dir}/libs/jaxws-jbws2000.jar">
<fileset dir="${tests.output.dir}/classes">
Added: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1969/JBWS1969TestCase.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1969/JBWS1969TestCase.java (rev 0)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1969/JBWS1969TestCase.java 2008-02-22 05:50:09 UTC (rev 5763)
@@ -0,0 +1,60 @@
+/*
+ * 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.jbws1969;
+
+import java.net.URL;
+
+import junit.framework.Test;
+
+import org.apache.xerces.xs.XSTypeDefinition;
+import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.metadata.wsdl.WSDLUtils;
+import org.jboss.ws.metadata.wsdl.xmlschema.JBossXSModel;
+import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ * Testcase for load/import of resources under nested directory
+ * other than toplevel "META-INF/wsdl" directory
+ *
+ * http://jira.jboss.org/jira/browse/JBWS-1969
+ *
+ * @author <a href="mailto:mageshbk@jboss.com">Magesh Kumar B</a>
+ * @since 21-Feb-2008
+ */
+public class JBWS1969TestCase extends JBossWSTest
+{
+ public static Test suite()
+ {
+ return new JBossWSTestSetup(JBWS1969TestCase.class, "jaxws-jbws1969.jar");
+ }
+
+ public void testSubDirectory() throws Exception
+ {
+ //wsdl and schema loaded from META-INF/wsdl/echo
+ URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-jbws1969?wsdl");
+ WSDLDefinitionsFactory factory = WSDLDefinitionsFactory.newInstance();
+ WSDLDefinitions wsdlDefinitions = factory.parse(wsdlURL);
+ assertNotNull(wsdlDefinitions);
+ }
+}
Property changes on: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1969/JBWS1969TestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1969/TestEndpoint.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1969/TestEndpoint.java (rev 0)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1969/TestEndpoint.java 2008-02-22 05:50:09 UTC (rev 5763)
@@ -0,0 +1,36 @@
+/*
+ * 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.jbws1969;
+
+import javax.jws.WebService;
+
+/**
+ * The SEI
+ *
+ * @author <a href="mailto:mageshbk@jboss.com">Magesh Kumar B</a>
+ * @since 21-Feb-2008
+ */
+@WebService(name = "TestEndpoint", targetNamespace = "http://org.jboss.ws/jbws1969")
+public interface TestEndpoint
+{
+ String echo(String input);
+}
Property changes on: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1969/TestEndpoint.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1969/TestEndpointImpl.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1969/TestEndpointImpl.java (rev 0)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1969/TestEndpointImpl.java 2008-02-22 05:50:09 UTC (rev 5763)
@@ -0,0 +1,50 @@
+/*
+ * 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.jbws1969;
+
+import javax.ejb.Stateless;
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+import org.jboss.wsf.spi.annotation.WebContext;
+
+/**
+ * The SEI implementation used by the JBWS1969TestCase
+ *
+ * @author <a href="mailto:mageshbk@jboss.com">Magesh Kumar B</a>
+ * @since 21-Feb-2008
+ */
+@WebService(serviceName = "TestEndpointService",
+ name = "TestEndpoint",
+ targetNamespace = "http://org.jboss.ws/jbws1969",
+ wsdlLocation = "/META-INF/wsdl/echo/TestService.wsdl")
+@Stateless
+@WebContext(contextRoot="jaxws-jbws1969", urlPattern="/*")
+public class TestEndpointImpl implements TestEndpoint
+{
+ @WebMethod
+ public String echo(String input)
+ {
+ return input;
+ }
+}
Property changes on: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1969/TestEndpointImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/trunk/src/test/resources/jaxws/jbws1969/META-INF/wsdl/echo/TestService.wsdl
===================================================================
--- stack/native/trunk/src/test/resources/jaxws/jbws1969/META-INF/wsdl/echo/TestService.wsdl (rev 0)
+++ stack/native/trunk/src/test/resources/jaxws/jbws1969/META-INF/wsdl/echo/TestService.wsdl 2008-02-22 05:50:09 UTC (rev 5763)
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions name="TestEndpointService"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:tns="http://org.jboss.ws/jbws1969"
+ targetNamespace="http://org.jboss.ws/jbws1969">
+
+ <types>
+ <xsd:schema>
+ <xsd:import namespace="http://org.jboss.ws/jbws1969" schemaLocation="TestService.xsd" />
+ </xsd:schema>
+ </types>
+
+ <message name='TestEndpoint_echo'>
+ <part element='tns:echo' name='echo'></part>
+ </message>
+ <message name='TestEndpoint_echoResponse'>
+ <part element='tns:echoResponse' name='echoResponse'></part>
+ </message>
+ <portType name='TestEndpoint'>
+ <operation name='echo' parameterOrder='echo'>
+ <input message='tns:TestEndpoint_echo'></input>
+ <output message='tns:TestEndpoint_echoResponse'></output>
+ </operation>
+ </portType>
+ <binding name='TestEndpointBinding' type='tns:TestEndpoint'>
+ <soap:binding style='document' transport='http://schemas.xmlsoap.org/soap/http'/>
+ <operation name='echo'>
+ <soap:operation soapAction=''/>
+ <input>
+ <soap:body use='literal'/>
+ </input>
+ <output>
+ <soap:body use='literal'/>
+ </output>
+ </operation>
+ </binding>
+ <service name='TestEndpointService'>
+ <port binding='tns:TestEndpointBinding' name='TestEndpointPort'>
+ <soap:address location='http://127.0.0.1:8080/jaxws-jbws1969'/>
+ </port>
+ </service>
+</definitions>
Property changes on: stack/native/trunk/src/test/resources/jaxws/jbws1969/META-INF/wsdl/echo/TestService.wsdl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/trunk/src/test/resources/jaxws/jbws1969/META-INF/wsdl/echo/TestService.xsd
===================================================================
--- stack/native/trunk/src/test/resources/jaxws/jbws1969/META-INF/wsdl/echo/TestService.xsd (rev 0)
+++ stack/native/trunk/src/test/resources/jaxws/jbws1969/META-INF/wsdl/echo/TestService.xsd 2008-02-22 05:50:09 UTC (rev 5763)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<schema version="1.0" xmlns="http://www.w3.org/2001/XMLSchema"
+ elementFormDefault="qualified" attributeFormDefault="unqualified"
+ targetNamespace="http://org.jboss.ws/jbws1969"
+ xmlns:tns="http://org.jboss.ws/jbws1969">
+
+ <element name='echo' type='tns:echo'/>
+ <element name='echoResponse' type='tns:echoResponse'/>
+ <complexType name='echo'>
+ <sequence>
+ <element minOccurs='0' name='arg0' type='string'/>
+ </sequence>
+ </complexType>
+ <complexType name='echoResponse'>
+ <sequence>
+ <element minOccurs='0' name='return' type='string'/>
+ </sequence>
+ </complexType>
+</schema>
\ No newline at end of file
Property changes on: stack/native/trunk/src/test/resources/jaxws/jbws1969/META-INF/wsdl/echo/TestService.xsd
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
16 years, 9 months
JBossWS SVN: r5762 - stack/native/trunk/src/main/java/org/jboss/wsf/stack/jbws.
by jbossws-commits@lists.jboss.org
Author: mageshbk(a)jboss.com
Date: 2008-02-22 00:44:23 -0500 (Fri, 22 Feb 2008)
New Revision: 5762
Modified:
stack/native/trunk/src/main/java/org/jboss/wsf/stack/jbws/WSDLFilePublisher.java
Log:
[JBWS-1969] Removed SOP
Modified: stack/native/trunk/src/main/java/org/jboss/wsf/stack/jbws/WSDLFilePublisher.java
===================================================================
--- stack/native/trunk/src/main/java/org/jboss/wsf/stack/jbws/WSDLFilePublisher.java 2008-02-22 05:42:14 UTC (rev 5761)
+++ stack/native/trunk/src/main/java/org/jboss/wsf/stack/jbws/WSDLFilePublisher.java 2008-02-22 05:44:23 UTC (rev 5762)
@@ -319,9 +319,6 @@
File locationFile = null;
if (predefinedLocation == false)
{
- System.out.println("serverConfig -> "+ serverConfig);
- System.out.println("serverConfig.getServerDataDir() -> "+ serverConfig.getServerDataDir());
- System.out.println("serverConfig.getServerDataDir().getCanonicalPath() -> "+ serverConfig.getServerDataDir().getCanonicalPath());
locationFile = new File(serverConfig.getServerDataDir().getCanonicalPath() + "/wsdl/" + archiveName);
}
else
16 years, 9 months
JBossWS SVN: r5761 - stack/native/trunk/src/main/java/org/jboss/wsf/stack/jbws.
by jbossws-commits@lists.jboss.org
Author: mageshbk(a)jboss.com
Date: 2008-02-22 00:42:14 -0500 (Fri, 22 Feb 2008)
New Revision: 5761
Modified:
stack/native/trunk/src/main/java/org/jboss/wsf/stack/jbws/WSDLFilePublisher.java
Log:
[JBWS-1969] Cannot publish wsdl with imported schema files, using bottom up approach
Modified: stack/native/trunk/src/main/java/org/jboss/wsf/stack/jbws/WSDLFilePublisher.java
===================================================================
--- stack/native/trunk/src/main/java/org/jboss/wsf/stack/jbws/WSDLFilePublisher.java 2008-02-21 15:40:58 UTC (rev 5760)
+++ stack/native/trunk/src/main/java/org/jboss/wsf/stack/jbws/WSDLFilePublisher.java 2008-02-22 05:42:14 UTC (rev 5761)
@@ -60,6 +60,7 @@
/** A helper class that publishes the wsdl files and their imports to the server/data/wsdl directory.
*
+ * @author <a href="mailto:mageshbk@jboss.com">Magesh Kumar B</a>
* @author Thomas.Diesler(a)jboss.org
* @since 02-June-2004
*/
@@ -181,8 +182,7 @@
wsdlWriter.writeWSDL(subdef, fw);
fw.close();
- if (log.isDebugEnabled())
- log.debug("WSDL import published to: " + targetURL);
+ log.debug("WSDL import published to: " + targetURL);
// recursively publish imports
publishWsdlImports(targetURL, subdef, published);
@@ -228,12 +228,11 @@
String deploymentName = dep.getCanonicalName();
- // get the resource path
- int index = baseURI.indexOf(deploymentName);
+ // get the resource path including the separator
+ int index = baseURI.indexOf(deploymentName) + 1;
String resourcePath = baseURI.substring(index + deploymentName.length());
- resourcePath = resourcePath.substring(0, resourcePath.lastIndexOf("/"));
- if (resourcePath.length() > 0)
- resourcePath = resourcePath + "/";
+ //check for sub-directories
+ resourcePath = resourcePath.substring(0, resourcePath.lastIndexOf("/") + 1);
resourcePath = expLocation + resourcePath + schemaLocation;
URL resourceURL = dep.getMetaDataFileURL(resourcePath);
@@ -246,8 +245,7 @@
fos.close();
is.close();
- if (log.isDebugEnabled())
- log.debug("XMLSchema import published to: " + xsdURL);
+ log.debug("XMLSchema import published to: " + xsdURL);
// recursivly publish imports
Element subdoc = DOMUtils.parse(xsdURL.openStream());
@@ -312,8 +310,7 @@
if (wsdlLocation == null)
throw new IllegalStateException("Cannot obtain wsdl location for: " + serviceMetaData.getServiceName());
- if (log.isDebugEnabled())
- log.debug("Publish WSDL file: " + wsdlLocation);
+ log.debug("Publish WSDL file: " + wsdlLocation);
// Only file URLs are supported in <wsdl-publish-location>
String publishLocation = serviceMetaData.getWsdlPublishLocation();
@@ -322,6 +319,9 @@
File locationFile = null;
if (predefinedLocation == false)
{
+ System.out.println("serverConfig -> "+ serverConfig);
+ System.out.println("serverConfig.getServerDataDir() -> "+ serverConfig.getServerDataDir());
+ System.out.println("serverConfig.getServerDataDir().getCanonicalPath() -> "+ serverConfig.getServerDataDir().getCanonicalPath());
locationFile = new File(serverConfig.getServerDataDir().getCanonicalPath() + "/wsdl/" + archiveName);
}
else
16 years, 9 months
JBossWS SVN: r5760 - stack/native/trunk/src/main/java/org/jboss/ws/extensions/security.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2008-02-21 10:40:58 -0500 (Thu, 21 Feb 2008)
New Revision: 5760
Modified:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java
Log:
[JBWS-1948] Fixing issue
Modified: stack/native/trunk/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java
===================================================================
--- stack/native/trunk/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java 2008-02-21 15:40:16 UTC (rev 5759)
+++ stack/native/trunk/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java 2008-02-21 15:40:58 UTC (rev 5760)
@@ -114,7 +114,7 @@
SOAPHeader soapHeader = soapMessage.getSOAPHeader();
QName secQName = new QName(Constants.WSSE_NS, "Security");
- Element secHeaderElement = Util.findElement(soapHeader, secQName);
+ Element secHeaderElement = (soapHeader != null) ? Util.findElement(soapHeader, secQName) : null;
if (secHeaderElement == null)
{
16 years, 9 months
JBossWS SVN: r5759 - stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2008-02-21 10:40:16 -0500 (Thu, 21 Feb 2008)
New Revision: 5759
Added:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/MissingSecurityTestCase.java
Log:
[JBWS-1948] Adding test case
Added: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/MissingSecurityTestCase.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/MissingSecurityTestCase.java (rev 0)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/MissingSecurityTestCase.java 2008-02-21 15:40:16 UTC (rev 5759)
@@ -0,0 +1,116 @@
+/*
+ * 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.samples.wssecurity;
+
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.net.URL;
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+import javax.xml.soap.MessageFactory;
+import javax.xml.soap.SOAPConnection;
+import javax.xml.soap.SOAPConnectionFactory;
+import javax.xml.soap.SOAPFault;
+import javax.xml.soap.SOAPMessage;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Service;
+import javax.xml.ws.soap.SOAPFaultException;
+
+import junit.framework.Test;
+
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ * Test WS-Security server implementation behavior
+ * when WS-Security is not used on client side
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 21-Feb-2008
+ */
+public class MissingSecurityTestCase extends JBossWSTest
+{
+ private String endpointUrl = "http://" + getServerHost() + ":8080/jaxws-samples-wssecurity-sign";
+
+ /** Deploy the test */
+ public static Test suite() throws Exception
+ {
+ return new JBossWSTestSetup(MissingSecurityTestCase.class, "jaxws-samples-wssecurity-sign.war");
+ }
+
+ public void testNoSOAPHeader() throws Exception
+ {
+ MessageFactory msgFactory = MessageFactory.newInstance();
+ SOAPConnection con = SOAPConnectionFactory.newInstance().createConnection();
+
+ String reqEnv =
+ "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" +
+ " <env:Body>" +
+ " <ns1:echoUserType xmlns:ns1='http://org.jboss.ws/samples/wssecurity'>" +
+ " <user><msg>Kermit</msg></user>" +
+ " </ns1:echoUserType>" +
+ " </env:Body>" +
+ "</env:Envelope>";
+ SOAPMessage reqMsg = msgFactory.createMessage(null, new ByteArrayInputStream(reqEnv.getBytes()));
+
+ URL epURL = new URL(endpointUrl);
+ SOAPMessage resMsg = con.call(reqMsg, epURL);
+
+ SOAPFault fault = resMsg.getSOAPBody().getFault();
+ assertTrue(fault.getFaultString().contains("This service requires <wsse:Security>, which is missing."));
+ }
+
+ public void testNoSecurityHeader() throws Exception
+ {
+ Hello hello = getPort();
+ UserType in0 = new UserType();
+ in0.setMsg("Kermit");
+ try
+ {
+ hello.echoUserType(in0);
+ fail("Exception about missing security header expected");
+ }
+ catch (SOAPFaultException e)
+ {
+ assertTrue(e.getMessage().contains("This service requires <wsse:Security>, which is missing."));
+ }
+ catch (Exception e)
+ {
+ fail("Exception about missing security header expected");
+ }
+ }
+
+ private Hello getPort() throws Exception
+ {
+ URL wsdlURL = new File("wsprovide/resources/jaxws/samples/wssecurity/HelloService.wsdl").toURL();
+ QName serviceName = new QName("http://org.jboss.ws/samples/wssecurity", "HelloService");
+
+ Service service = Service.create(wsdlURL, serviceName);
+ Hello port = (Hello)service.getPort(Hello.class);
+
+ Map<String, Object> reqContext = ((BindingProvider)port).getRequestContext();
+ reqContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, endpointUrl);
+
+ return port;
+ }
+}
Property changes on: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/MissingSecurityTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
16 years, 9 months
JBossWS SVN: r5758 - in stack/native/trunk: src/test/java/org/jboss/test/ws/jaxws and 4 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2008-02-21 09:22:18 -0500 (Thu, 21 Feb 2008)
New Revision: 5758
Added:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/webfault/
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/webfault/CustomException.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/webfault/SimpleException.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/webfault/TestEndpoint.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/webfault/TestEndpointImpl.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/webfault/WebFaultTestCase.java
stack/native/trunk/src/test/resources/jaxws/webfault/
stack/native/trunk/src/test/resources/jaxws/webfault/WEB-INF/
stack/native/trunk/src/test/resources/jaxws/webfault/WEB-INF/web.xml
Modified:
stack/native/trunk/ant-import-tests/build-jars-jaxws.xml
Log:
[JBWS-1211] Adding required test case
Modified: stack/native/trunk/ant-import-tests/build-jars-jaxws.xml
===================================================================
--- stack/native/trunk/ant-import-tests/build-jars-jaxws.xml 2008-02-21 10:42:56 UTC (rev 5757)
+++ stack/native/trunk/ant-import-tests/build-jars-jaxws.xml 2008-02-21 14:22:18 UTC (rev 5758)
@@ -659,6 +659,16 @@
<include name="org/jboss/test/ws/jaxws/holder/HolderServiceImpl.class"/>
</classes>
</war>
+
+ <!-- jaxws-samples-webfault -->
+ <war warfile="${tests.output.dir}/libs/jaxws-webfault.war" webxml="${tests.output.dir}/resources/jaxws/webfault/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/classes">
+ <include name="org/jboss/test/ws/jaxws/webfault/TestEndpoint.class"/>
+ <include name="org/jboss/test/ws/jaxws/webfault/TestEndpointImpl.class"/>
+ <include name="org/jboss/test/ws/jaxws/webfault/CustomException.class"/>
+ <include name="org/jboss/test/ws/jaxws/webfault/SimpleException.class"/>
+ </classes>
+ </war>
<!-- jaxws-wsdd -->
<war warfile="${tests.output.dir}/libs/jaxws-wsdd.war" webxml="${tests.output.dir}/resources/jaxws/wsdd/WEB-INF/web.xml">
Added: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/webfault/CustomException.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/webfault/CustomException.java (rev 0)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/webfault/CustomException.java 2008-02-21 14:22:18 UTC (rev 5758)
@@ -0,0 +1,52 @@
+/*
+ * 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.webfault;
+
+import javax.xml.ws.WebFault;
+
+/**
+ * A custom exception
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 21-Feb-2008
+ */
+@WebFault(name = "myCustomFault", targetNamespace= "org.jboss.test.ws.jaxws.webfault.exceptions")
+public class CustomException extends Exception
+{
+ private Integer number;
+
+ public CustomException(String message, Integer number)
+ {
+ super(message);
+ this.number = number;
+ }
+
+ public Integer getNumber()
+ {
+ return number;
+ }
+
+ public void setNumber(Integer number)
+ {
+ this.number = number;
+ }
+}
Property changes on: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/webfault/CustomException.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/webfault/SimpleException.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/webfault/SimpleException.java (rev 0)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/webfault/SimpleException.java 2008-02-21 14:22:18 UTC (rev 5758)
@@ -0,0 +1,52 @@
+/*
+ * 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.webfault;
+
+import javax.xml.ws.WebFault;
+
+/**
+ * A simple exception using @WebFault defaults
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 21-Feb-2008
+ */
+@WebFault
+public class SimpleException extends Exception
+{
+ private Integer number;
+
+ public SimpleException(String message, Integer number)
+ {
+ super(message);
+ this.number = number;
+ }
+
+ public Integer getNumber()
+ {
+ return number;
+ }
+
+ public void setNumber(Integer number)
+ {
+ this.number = number;
+ }
+}
Property changes on: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/webfault/SimpleException.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/webfault/TestEndpoint.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/webfault/TestEndpoint.java (rev 0)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/webfault/TestEndpoint.java 2008-02-21 14:22:18 UTC (rev 5758)
@@ -0,0 +1,34 @@
+/*
+ * 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.webfault;
+
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+@WebService (name="TestEndpoint")
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+public interface TestEndpoint
+{
+ public void throwCustomException(String input) throws CustomException;
+
+ public void throwSimpleException(String input) throws SimpleException;
+}
Property changes on: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/webfault/TestEndpoint.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/webfault/TestEndpointImpl.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/webfault/TestEndpointImpl.java (rev 0)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/webfault/TestEndpointImpl.java 2008-02-21 14:22:18 UTC (rev 5758)
@@ -0,0 +1,51 @@
+/*
+ * 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.webfault;
+
+import javax.jws.WebService;
+
+import org.jboss.logging.Logger;
+
+/**
+ * Test the JSR-181 annotation: javax.jws.WebFault
+ *
+ * @author alessio.soldano(a)jboss.org
+ * @since 21-Feb-2008
+ */
+@WebService(name="TestEndpoint", serviceName="TestEndpointService", endpointInterface = "org.jboss.test.ws.jaxws.webfault.TestEndpoint")
+public class TestEndpointImpl
+{
+ // Provide logging
+ private static Logger log = Logger.getLogger(TestEndpointImpl.class);
+
+ public void throwCustomException(String input) throws CustomException
+ {
+ log.info("throwCustomException: " + input);
+ throw new CustomException("This is a @WebFault test", (input != null ? input.length() : 0));
+ }
+
+ public void throwSimpleException(String input) throws SimpleException
+ {
+ log.info("throwSimpleException: " + input);
+ throw new SimpleException("This is a @WebFault test", (input != null ? input.length() : 0));
+ }
+}
Property changes on: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/webfault/TestEndpointImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/webfault/WebFaultTestCase.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/webfault/WebFaultTestCase.java (rev 0)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/webfault/WebFaultTestCase.java 2008-02-21 14:22:18 UTC (rev 5758)
@@ -0,0 +1,118 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.webfault;
+
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
+import junit.framework.Test;
+
+import org.apache.xerces.xs.XSElementDeclaration;
+import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.metadata.wsdl.WSDLUtils;
+import org.jboss.ws.metadata.wsdl.xmlschema.JBossXSModel;
+import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ * Test the JSR-181 annotation: javax.jws.WebFault
+ *
+ * @author alessio.soldano(a)jboss.org
+ * @since 21-Feb-2008
+ */
+public class WebFaultTestCase extends JBossWSTest
+{
+ private String endpointURL = "http://" + getServerHost() + ":8080/jaxws-webfault";
+ private static final String TARGET_NS = "http://webfault.jaxws.ws.test.jboss.org/";
+ private static final String CUSTOM_FAULT_NS = "org.jboss.test.ws.jaxws.webfault.exceptions";
+
+ public static Test suite()
+ {
+ return new JBossWSTestSetup(WebFaultTestCase.class, "jaxws-webfault.war");
+ }
+
+ /**
+ * Tests whether the @WebFault annotation correctly sets the fault element's name and namespace
+ * (the type doesn't depend on @WebFault, see [JBWS-1904] about this)
+ *
+ * @throws Exception
+ */
+ public void testWebFaultElement() throws Exception
+ {
+ JBossXSModel xsModel = getSchemaModel();
+ XSElementDeclaration myCustomFaultElement = xsModel.getElementDeclaration("myCustomFault", CUSTOM_FAULT_NS);
+ assertNotNull(myCustomFaultElement);
+ myCustomFaultElement = xsModel.getElementDeclaration("myCustomFault", TARGET_NS);
+ assertNull(myCustomFaultElement);
+ myCustomFaultElement = xsModel.getElementDeclaration("CustomException", CUSTOM_FAULT_NS);
+ assertNull(myCustomFaultElement);
+ XSElementDeclaration simpleExceptiontElement = xsModel.getElementDeclaration("SimpleException", TARGET_NS); //default to exception simple class name
+ assertNotNull(simpleExceptiontElement);
+ }
+
+ private JBossXSModel getSchemaModel() throws Exception
+ {
+ URL wsdlURL = new URL(endpointURL + "?wsdl");
+ WSDLDefinitionsFactory factory = WSDLDefinitionsFactory.newInstance();
+ WSDLDefinitions wsdlDefinitions = factory.parse(wsdlURL);
+ return WSDLUtils.getSchemaModel(wsdlDefinitions.getWsdlTypes());
+ }
+
+ public void testInvocation() throws Exception
+ {
+ URL wsdlURL = new URL(endpointURL + "?wsdl");
+ QName serviceName = new QName(TARGET_NS, "TestEndpointService");
+
+ Service service = Service.create(wsdlURL, serviceName);
+ TestEndpoint port = (TestEndpoint)service.getPort(TestEndpoint.class);
+
+ try
+ {
+ port.throwCustomException("Hello");
+ fail("Exception expected!");
+ }
+ catch (CustomException e)
+ {
+ assertEquals(new Integer(5), e.getNumber());
+ }
+ catch (Exception e)
+ {
+ fail("Wrong exception catched!");
+ }
+ try
+ {
+ port.throwSimpleException("World");
+ fail("Exception expected!");
+ }
+ catch (SimpleException e)
+ {
+ assertEquals(new Integer(5), e.getNumber());
+ }
+ catch (Exception e)
+ {
+ fail("Wrong exception catched!");
+ }
+ }
+}
\ No newline at end of file
Property changes on: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/webfault/WebFaultTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/trunk/src/test/resources/jaxws/webfault/WEB-INF/web.xml
===================================================================
--- stack/native/trunk/src/test/resources/jaxws/webfault/WEB-INF/web.xml (rev 0)
+++ stack/native/trunk/src/test/resources/jaxws/webfault/WEB-INF/web.xml 2008-02-21 14:22:18 UTC (rev 5758)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+ version="2.4">
+
+ <servlet>
+ <servlet-name>TestService</servlet-name>
+ <servlet-class>org.jboss.test.ws.jaxws.webfault.TestEndpointImpl</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>TestService</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+</web-app>
\ No newline at end of file
Property changes on: stack/native/trunk/src/test/resources/jaxws/webfault/WEB-INF/web.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
16 years, 9 months
JBossWS SVN: r5757 - stack/native/trunk/src/main/java/org/jboss/ws/core/jaxws/handler.
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2008-02-21 05:42:56 -0500 (Thu, 21 Feb 2008)
New Revision: 5757
Modified:
stack/native/trunk/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerDelegateJAXWS.java
Log:
Fix JBWS-1973: MTOM/XOP attachments not inlined when using JAX-WS handlers
Modified: stack/native/trunk/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerDelegateJAXWS.java
===================================================================
--- stack/native/trunk/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerDelegateJAXWS.java 2008-02-21 09:42:52 UTC (rev 5756)
+++ stack/native/trunk/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerDelegateJAXWS.java 2008-02-21 10:42:56 UTC (rev 5757)
@@ -31,12 +31,16 @@
import javax.xml.ws.handler.Handler;
import javax.xml.ws.handler.MessageContext;
import javax.xml.ws.handler.PortInfo;
+import javax.xml.soap.SOAPMessage;
import org.jboss.logging.Logger;
import org.jboss.ws.core.server.ServerHandlerDelegate;
import org.jboss.ws.core.soap.MessageContextAssociation;
+import org.jboss.ws.core.MessageAbstraction;
+import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
+import org.jboss.ws.extensions.xop.XOPContext;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData.HandlerType;
/**
@@ -92,7 +96,13 @@
log.debug("callResponseHandlerChain: " + type);
HandlerChainExecutor executor = getExecutor(type);
MessageContext msgContext = (MessageContext)MessageContextAssociation.peekMessageContext();
- return (executor != null ? executor.handleMessage(msgContext) : true);
+ boolean status = (executor != null ? executor.handleMessage(msgContext) : true);
+
+ MessageAbstraction msg = ((CommonMessageContext)msgContext).getMessageAbstraction();
+ if (type == HandlerType.ENDPOINT && (msg instanceof SOAPMessage))
+ XOPContext.visitAndRestoreXOPData();
+
+ return status;
}
public void closeHandlerChain(ServerEndpointMetaData sepMetaData, HandlerType type)
@@ -112,7 +122,13 @@
log.debug("callFaultHandlerChain: " + type);
HandlerChainExecutor executor = getExecutor(type);
MessageContext msgContext = (MessageContext)MessageContextAssociation.peekMessageContext();
- return (executor != null ? executor.handleFault(msgContext, ex) : true);
+ boolean status = (executor != null ? executor.handleFault(msgContext, ex) : true);
+
+ MessageAbstraction msg = ((CommonMessageContext)msgContext).getMessageAbstraction();
+ if (type == HandlerType.ENDPOINT && (msg instanceof SOAPMessage))
+ XOPContext.visitAndRestoreXOPData();
+
+ return status;
}
private List<Handler> getHandlerChain(EndpointMetaData epMetaData, HandlerType type)
16 years, 9 months
JBossWS SVN: r5756 - stack/native/trunk/src/main/java/org/jboss/ws/metadata/builder/jaxws.
by jbossws-commits@lists.jboss.org
Author: mageshbk(a)jboss.com
Date: 2008-02-21 04:42:52 -0500 (Thu, 21 Feb 2008)
New Revision: 5756
Modified:
stack/native/trunk/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java
Log:
[JBWS-1938] Removed the TODO
Modified: stack/native/trunk/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java
===================================================================
--- stack/native/trunk/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java 2008-02-21 08:13:55 UTC (rev 5755)
+++ stack/native/trunk/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java 2008-02-21 09:42:52 UTC (rev 5756)
@@ -545,7 +545,6 @@
else
// default action values
{
- // TODO: figure out a way to assign message name instead of IN and OUT
String tns = epMetaData.getPortName().getNamespaceURI();
String portTypeName = epMetaData.getPortName().getLocalPart();
String opName = opMetaData.getQName().getLocalPart();
16 years, 9 months
JBossWS SVN: r5755 - stack/native/trunk/ant-import-tests.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-02-21 03:13:55 -0500 (Thu, 21 Feb 2008)
New Revision: 5755
Modified:
stack/native/trunk/ant-import-tests/build-jars-interop.xml
stack/native/trunk/ant-import-tests/build-testsuite.xml
Log:
resurect build-jars-interop
Modified: stack/native/trunk/ant-import-tests/build-jars-interop.xml
===================================================================
--- stack/native/trunk/ant-import-tests/build-jars-interop.xml 2008-02-20 18:59:33 UTC (rev 5754)
+++ stack/native/trunk/ant-import-tests/build-jars-interop.xml 2008-02-21 08:13:55 UTC (rev 5755)
@@ -16,7 +16,7 @@
<!-- Building -->
<!-- ================================================================== -->
- <target name="build-interop-jars">
+ <target name="build-jars-interop">
<mkdir dir="${tests.output.dir}/libs"/>
Modified: stack/native/trunk/ant-import-tests/build-testsuite.xml
===================================================================
--- stack/native/trunk/ant-import-tests/build-testsuite.xml 2008-02-20 18:59:33 UTC (rev 5754)
+++ stack/native/trunk/ant-import-tests/build-testsuite.xml 2008-02-21 08:13:55 UTC (rev 5755)
@@ -211,6 +211,7 @@
</target>
<target name="tests-jars" depends="wsconsume,tests-compile,tests-copy-resources,tests-compile-generated-resources" description="Build the deployments.">
+ <ant antfile="${core.dir}/ant-import-tests/build-jars-interop.xml" target="build-jars-interop"/>
<ant antfile="${core.dir}/ant-import-tests/build-jars-jaxrpc.xml" target="build-jars-jaxrpc"/>
<ant antfile="${core.dir}/ant-import-tests/build-samples-jaxrpc.xml" target="build-samples-jaxrpc"/>
<ant antfile="${core.dir}/ant-import-tests/build-jars-jaxws.xml" target="build-jars-jaxws"/>
16 years, 9 months