JBossWS SVN: r11700 - stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2927.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2010-02-27 06:54:43 -0500 (Sat, 27 Feb 2010)
New Revision: 11700
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2927/JBWS2927TestCase.java
Log:
[JBPAPP-3808]:Added the missing content in previous commit
Modified: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2927/JBWS2927TestCase.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2927/JBWS2927TestCase.java 2010-02-27 11:37:19 UTC (rev 11699)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2927/JBWS2927TestCase.java 2010-02-27 11:54:43 UTC (rev 11700)
@@ -21,13 +21,43 @@
*/
package org.jboss.test.ws.jaxws.jbws2927;
+import java.net.URL;
+import javax.xml.soap.MessageFactory;
+import javax.xml.soap.SOAPMessage;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.handler.MessageContext;
+import javax.xml.ws.addressing.JAXWSAConstants;
+
+import org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS;
+import org.jboss.ws.extensions.addressing.jaxws.WSAddressingClientHandler;
+import org.jboss.ws.extensions.addressing.soap.SOAPAddressingPropertiesImpl;
+
+import org.jboss.wsf.test.JBossWSTest;
+
/**
- * JBWS2927TestCase.
+ * A JBWS2927TestCase.
*
* @author <a href="ema(a)redhat.com">Jim Ma</a>
*/
-public class JBWS2927TestCase extends TestCase
+public class JBWS2927TestCase extends JBossWSTest
{
+ public void testHandleInboundMessage() throws Exception
+ {
+ WSAddressingClientHandler wsHandler = new WSAddressingClientHandler();
+ SOAPMessageContextJAXWS context = new SOAPMessageContextJAXWS();
+ context.put(MessageContext.MESSAGE_OUTBOUND_PROPERTY, new Boolean(false));
+ context.put(BindingProvider.SOAPACTION_URI_PROPERTY, "inputAction");
+ context.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES, new SOAPAddressingPropertiesImpl());
+ context.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, new SOAPAddressingPropertiesImpl());
+ MessageFactory factory = MessageFactory.newInstance();
+
+ URL reqMessage = getResourceFile("jaxws/jbws2927/request-message.xml").toURL();
+ MessageFactory msgFactory = MessageFactory.newInstance();
+ SOAPMessage soapMsg = msgFactory.createMessage(null, reqMessage.openStream());
+ context.setMessage(soapMsg);
+
+ wsHandler.handleMessage(context);
+ }
}
14 years, 10 months
JBossWS SVN: r11699 - in stack/native/branches/jbossws-native-3.1.2/modules: core/src/main/java/org/jboss/ws/extensions/addressing and 5 other directories.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2010-02-27 06:37:19 -0500 (Sat, 27 Feb 2010)
New Revision: 11699
Added:
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2927/
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2927/JBWS2927TestCase.java
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxws/SOAPFaultHelperJAXWS.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/addressing/AddressingConstantsImpl.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/addressing/jaxws/WSAddressingClientHandler.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/addressing/soap/SOAPAddressingPropertiesImpl.java
stack/native/branches/jbossws-native-3.1.2/modules/jaxws-ext/src/main/java/javax/xml/ws/addressing/MapRequiredException.java
Log:
[JBPAPP-3808]:Fixed the jaxws2.1 standalone tck test failures in com/sun/ts/tests/jaxws/wsa/j2w/document/literal/addressingfeature module
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxws/SOAPFaultHelperJAXWS.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxws/SOAPFaultHelperJAXWS.java 2010-02-27 11:34:52 UTC (rev 11698)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxws/SOAPFaultHelperJAXWS.java 2010-02-27 11:37:19 UTC (rev 11699)
@@ -38,6 +38,7 @@
import javax.xml.transform.Source;
import javax.xml.transform.dom.DOMSource;
import javax.xml.ws.WebServiceException;
+import javax.xml.ws.addressing.MapRequiredException;
import javax.xml.ws.soap.SOAPBinding;
import javax.xml.ws.soap.SOAPFaultException;
@@ -257,7 +258,16 @@
SOAPBody soapBody = soapMessage.getSOAPBody();
- SOAPFault soapFault = soapBody.addFault(getFallbackFaultCode(), getFallbackFaultString(ex));
+ SOAPFault soapFault = null;
+ if(ex instanceof MapRequiredException)
+ {
+ MapRequiredException addrException = (MapRequiredException)ex;
+ soapFault = soapBody.addFault(addrException.getSubcode(), addrException.getMessage());
+ }
+ else
+ {
+ soapFault = soapBody.addFault(getFallbackFaultCode(), getFallbackFaultString(ex));
+ }
CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
SerializationContext serContext = msgContext.getSerializationContext();
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/addressing/AddressingConstantsImpl.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/addressing/AddressingConstantsImpl.java 2010-02-27 11:34:52 UTC (rev 11698)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/addressing/AddressingConstantsImpl.java 2010-02-27 11:37:19 UTC (rev 11699)
@@ -155,7 +155,7 @@
public QName getMapRequiredQName()
{
- return new QName(URI_ADDRESSING, "MessageInformationHeaderRequired", PREFIX_ADDRESSING);
+ return new QName(URI_ADDRESSING, "MessageAddressingHeaderRequired", PREFIX_ADDRESSING);
}
public QName getDestinationUnreachableQName()
@@ -200,6 +200,6 @@
public String getMapRequiredText()
{
- return "Map Required";
+ return "A required header representing a Message Addressing Property is not present";
}
}
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/addressing/jaxws/WSAddressingClientHandler.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/addressing/jaxws/WSAddressingClientHandler.java 2010-02-27 11:34:52 UTC (rev 11698)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/addressing/jaxws/WSAddressingClientHandler.java 2010-02-27 11:37:19 UTC (rev 11699)
@@ -137,7 +137,8 @@
{
SOAPAddressingBuilder builder = (SOAPAddressingBuilder)SOAPAddressingBuilder.getAddressingBuilder();
SOAPAddressingProperties addrProps = (SOAPAddressingProperties)builder.newAddressingProperties();
- addrProps.readHeaders(soapMessage);
+ soapMessage.setProperty("isClientInbound", "true");
+ addrProps.readHeaders(soapMessage);
msgContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES, addrProps);
msgContext.setScope(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES, Scope.APPLICATION);
msgContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_INBOUND, addrProps);
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/addressing/soap/SOAPAddressingPropertiesImpl.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/addressing/soap/SOAPAddressingPropertiesImpl.java 2010-02-27 11:34:52 UTC (rev 11698)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/extensions/addressing/soap/SOAPAddressingPropertiesImpl.java 2010-02-27 11:37:19 UTC (rev 11699)
@@ -39,6 +39,7 @@
import javax.xml.ws.addressing.AddressingConstants;
import javax.xml.ws.addressing.AddressingException;
import javax.xml.ws.addressing.AttributedURI;
+import javax.xml.ws.addressing.MapRequiredException;
import javax.xml.ws.addressing.ReferenceParameters;
import javax.xml.ws.addressing.Relationship;
import javax.xml.ws.addressing.soap.SOAPAddressingBuilder;
@@ -76,10 +77,10 @@
private String getRequiredHeaderContent(SOAPHeader soapHeader, QName qname)
{
Element element = DOMUtils.getFirstChildElement(soapHeader, qname);
- if(null == element) throw new AddressingException("Required element "+qname+" is missing");
+ if(null == element) throw new MapRequiredException(qname);
String value = DOMUtils.getTextContent(element);
- if(null == value || value.equals("")) throw new AddressingException("Required element "+qname+" is missing");
+ if(null == value || value.equals("")) throw new MapRequiredException(qname);
return value;
}
@@ -146,8 +147,19 @@
// wsa:Action
// This REQUIRED element of type xs:anyURI conveys the [action] property.
// The [children] of this element convey the value of this property.
- String action = getRequiredHeaderContent(soapHeader, ADDR.getActionQName());
- setAction(builder.newURI(action));
+ if (message.getProperty("isClientInbound") != null)
+ {
+ String action = getOptionalHeaderContent(soapHeader, ADDR.getActionQName());
+ if (action != null)
+ {
+ setAction(builder.newURI(action));
+ }
+ }
+ else
+ {
+ String action = getRequiredHeaderContent(soapHeader, ADDR.getActionQName());
+ setAction(builder.newURI(action));
+ }
// Read wsa:MessageID
// This OPTIONAL element (whose content is of type xs:anyURI) conveys the [message id] property.
Modified: stack/native/branches/jbossws-native-3.1.2/modules/jaxws-ext/src/main/java/javax/xml/ws/addressing/MapRequiredException.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/jaxws-ext/src/main/java/javax/xml/ws/addressing/MapRequiredException.java 2010-02-27 11:34:52 UTC (rev 11698)
+++ stack/native/branches/jbossws-native-3.1.2/modules/jaxws-ext/src/main/java/javax/xml/ws/addressing/MapRequiredException.java 2010-02-27 11:37:19 UTC (rev 11699)
@@ -38,7 +38,9 @@
public MapRequiredException(QName name)
{
- super(fMessage + ": " + name);
+ //TODO:Add the exact missing header qname in soap header
+ super(fMessage);
+
}
public QName getSubcode()
Added: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2927/JBWS2927TestCase.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2927/JBWS2927TestCase.java (rev 0)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2927/JBWS2927TestCase.java 2010-02-27 11:37:19 UTC (rev 11699)
@@ -0,0 +1,33 @@
+/*
+ * 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.jaxws.jbws2927;
+
+
+/**
+ * JBWS2927TestCase.
+ *
+ * @author <a href="ema(a)redhat.com">Jim Ma</a>
+ */
+public class JBWS2927TestCase extends TestCase
+{
+
+}
14 years, 10 months
JBossWS SVN: r11698 - in stack/native/trunk/modules/core/src/main/java: org/jboss/ws/core/jaxws and 2 other directories.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2010-02-27 06:34:52 -0500 (Sat, 27 Feb 2010)
New Revision: 11698
Modified:
stack/native/trunk/modules/core/src/main/java/javax/xml/ws/addressing/MapRequiredException.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/SOAPFaultHelperJAXWS.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/addressing/AddressingConstantsImpl.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/addressing/soap/SOAPAddressingPropertiesImpl.java
Log:
[JBWS-2944]:throw MapRequriedException instead when required element is missing
Modified: stack/native/trunk/modules/core/src/main/java/javax/xml/ws/addressing/MapRequiredException.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/javax/xml/ws/addressing/MapRequiredException.java 2010-02-27 10:36:18 UTC (rev 11697)
+++ stack/native/trunk/modules/core/src/main/java/javax/xml/ws/addressing/MapRequiredException.java 2010-02-27 11:34:52 UTC (rev 11698)
@@ -38,7 +38,8 @@
public MapRequiredException(QName name)
{
- super(fMessage + ": " + name);
+ //TODO:Add the exact missing header qname in soap header
+ super(fMessage);
}
public QName getSubcode()
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/SOAPFaultHelperJAXWS.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/SOAPFaultHelperJAXWS.java 2010-02-27 10:36:18 UTC (rev 11697)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/SOAPFaultHelperJAXWS.java 2010-02-27 11:34:52 UTC (rev 11698)
@@ -38,6 +38,7 @@
import javax.xml.transform.Source;
import javax.xml.transform.dom.DOMSource;
import javax.xml.ws.WebServiceException;
+import javax.xml.ws.addressing.MapRequiredException;
import javax.xml.ws.soap.SOAPBinding;
import javax.xml.ws.soap.SOAPFaultException;
@@ -263,8 +264,17 @@
SOAPBody soapBody = soapMessage.getSOAPBody();
- SOAPFault soapFault = soapBody.addFault(getFallbackFaultCode(), getFallbackFaultString(ex));
-
+ SOAPFault soapFault = null;
+ if(ex instanceof MapRequiredException)
+ {
+ MapRequiredException addrException = (MapRequiredException)ex;
+ soapFault = soapBody.addFault(addrException.getSubcode(), addrException.getMessage());
+ }
+ else
+ {
+ soapFault = soapBody.addFault(getFallbackFaultCode(), getFallbackFaultString(ex));
+ }
+
CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
SerializationContext serContext = msgContext.getSerializationContext();
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/addressing/AddressingConstantsImpl.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/addressing/AddressingConstantsImpl.java 2010-02-27 10:36:18 UTC (rev 11697)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/addressing/AddressingConstantsImpl.java 2010-02-27 11:34:52 UTC (rev 11698)
@@ -155,7 +155,7 @@
public QName getMapRequiredQName()
{
- return new QName(URI_ADDRESSING, "MessageInformationHeaderRequired", PREFIX_ADDRESSING);
+ return new QName(URI_ADDRESSING, "MessageAddressingHeaderRequired", PREFIX_ADDRESSING);
}
public QName getDestinationUnreachableQName()
@@ -200,6 +200,6 @@
public String getMapRequiredText()
{
- return "Map Required";
+ return "A required header representing a Message Addressing Property is not present";
}
}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/addressing/soap/SOAPAddressingPropertiesImpl.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/addressing/soap/SOAPAddressingPropertiesImpl.java 2010-02-27 10:36:18 UTC (rev 11697)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/addressing/soap/SOAPAddressingPropertiesImpl.java 2010-02-27 11:34:52 UTC (rev 11698)
@@ -39,6 +39,7 @@
import javax.xml.ws.addressing.AddressingConstants;
import javax.xml.ws.addressing.AddressingException;
import javax.xml.ws.addressing.AttributedURI;
+import javax.xml.ws.addressing.MapRequiredException;
import javax.xml.ws.addressing.ReferenceParameters;
import javax.xml.ws.addressing.Relationship;
import javax.xml.ws.addressing.soap.SOAPAddressingBuilder;
@@ -79,10 +80,10 @@
private String getRequiredHeaderContent(SOAPHeader soapHeader, QName qname)
{
Element element = DOMUtils.getFirstChildElement(soapHeader, qname);
- if(null == element) throw new AddressingException("Required element "+qname+" is missing");
+ if(null == element) throw new MapRequiredException(qname);
String value = DOMUtils.getTextContent(element);
- if(null == value || value.equals("")) throw new AddressingException("Required element "+qname+" is missing");
+ if(null == value || value.equals("")) throw new MapRequiredException(qname);
return value;
}
14 years, 10 months
JBossWS SVN: r11697 - in stack/native/trunk/modules: core/src/main/java/org/jboss/ws/extensions/addressing/soap and 4 other directories.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2010-02-27 05:36:18 -0500 (Sat, 27 Feb 2010)
New Revision: 11697
Added:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2927/
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2927/JBWS2927TestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2927/
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2927/request-message.xml
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/addressing/jaxws/WSAddressingClientHandler.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/addressing/soap/SOAPAddressingPropertiesImpl.java
Log:
[JBWS-2927]:WSAddressingClientHandler gets wsa action as optional element
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/addressing/jaxws/WSAddressingClientHandler.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/addressing/jaxws/WSAddressingClientHandler.java 2010-02-26 15:53:01 UTC (rev 11696)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/addressing/jaxws/WSAddressingClientHandler.java 2010-02-27 10:36:18 UTC (rev 11697)
@@ -137,6 +137,7 @@
{
SOAPAddressingBuilder builder = (SOAPAddressingBuilder)SOAPAddressingBuilder.getAddressingBuilder();
SOAPAddressingProperties addrProps = (SOAPAddressingProperties)builder.newAddressingProperties();
+ soapMessage.setProperty("isClientInbound", "true");
addrProps.readHeaders(soapMessage);
msgContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES, addrProps);
msgContext.setScope(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES, Scope.APPLICATION);
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/addressing/soap/SOAPAddressingPropertiesImpl.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/addressing/soap/SOAPAddressingPropertiesImpl.java 2010-02-26 15:53:01 UTC (rev 11696)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/addressing/soap/SOAPAddressingPropertiesImpl.java 2010-02-27 10:36:18 UTC (rev 11697)
@@ -149,8 +149,19 @@
// wsa:Action
// This REQUIRED element of type xs:anyURI conveys the [action] property.
// The [children] of this element convey the value of this property.
- String action = getRequiredHeaderContent(soapHeader, ADDR.getActionQName());
- setAction(builder.newURI(action));
+ if (message.getProperty("isClientInbound") != null)
+ {
+ String action = getOptionalHeaderContent(soapHeader, ADDR.getActionQName());
+ if (action != null)
+ {
+ setAction(builder.newURI(action));
+ }
+ }
+ else
+ {
+ String action = getRequiredHeaderContent(soapHeader, ADDR.getActionQName());
+ setAction(builder.newURI(action));
+ }
// Read wsa:MessageID
// This OPTIONAL element (whose content is of type xs:anyURI) conveys the [message id] property.
Added: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2927/JBWS2927TestCase.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2927/JBWS2927TestCase.java (rev 0)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2927/JBWS2927TestCase.java 2010-02-27 10:36:18 UTC (rev 11697)
@@ -0,0 +1,63 @@
+/*
+ * 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.jaxws.jbws2927;
+
+import java.net.URL;
+
+import javax.xml.soap.MessageFactory;
+import javax.xml.soap.SOAPMessage;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.handler.MessageContext;
+import javax.xml.ws.addressing.JAXWSAConstants;
+
+import org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS;
+import org.jboss.ws.extensions.addressing.jaxws.WSAddressingClientHandler;
+import org.jboss.ws.extensions.addressing.soap.SOAPAddressingPropertiesImpl;
+
+import org.jboss.wsf.test.JBossWSTest;
+
+/**
+ * A JBWS2927TestCase.
+ *
+ * @author <a href="ema(a)redhat.com">Jim Ma</a>
+ */
+public class JBWS2927TestCase extends JBossWSTest
+{
+ public void testHandleInboundMessage() throws Exception
+ {
+ WSAddressingClientHandler wsHandler = new WSAddressingClientHandler();
+ SOAPMessageContextJAXWS context = new SOAPMessageContextJAXWS();
+ context.put(MessageContext.MESSAGE_OUTBOUND_PROPERTY, new Boolean(false));
+ context.put(BindingProvider.SOAPACTION_URI_PROPERTY, "inputAction");
+ context.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES, new SOAPAddressingPropertiesImpl());
+ context.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, new SOAPAddressingPropertiesImpl());
+ MessageFactory factory = MessageFactory.newInstance();
+
+ URL reqMessage = getResourceFile("jaxws/jbws2927/request-message.xml").toURL();
+ MessageFactory msgFactory = MessageFactory.newInstance();
+
+ SOAPMessage soapMsg = msgFactory.createMessage(null, reqMessage.openStream());
+ context.setMessage(soapMsg);
+
+ wsHandler.handleMessage(context);
+ }
+}
Added: stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2927/request-message.xml
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2927/request-message.xml (rev 0)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2927/request-message.xml 2010-02-27 10:36:18 UTC (rev 11697)
@@ -0,0 +1,6 @@
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:jbw="http://ws.jboss.org/jbws2927">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <jbw:addNumbersResponse><return>20</return><arg0>ClientEnabledServerNotEnabled</arg0></jbw:addNumbersResponse>
+ </soapenv:Body>
+</soapenv:Envelope>
14 years, 10 months
JBossWS SVN: r11696 - in projects/plugins/maven/jaxws-tools/trunk: src/main/java/org/jboss/ws/plugins/tools and 4 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-02-26 10:53:01 -0500 (Fri, 26 Feb 2010)
New Revision: 11696
Modified:
projects/plugins/maven/jaxws-tools/trunk/pom.xml
projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/AbstractWsConsumeMojo.java
projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/AbstractWsProvideMojo.java
projects/plugins/maven/jaxws-tools/trunk/src/test/java/org/jboss/test/ws/plugins/tools/ArgumentTest.java
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-argument/wsconsume-plugin-config.xml
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-argument/wsprovide-plugin-config.xml
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsConsume/pom-cxf.xml
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsConsume/pom-metro.xml
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsConsume/pom.xml
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsProvide/pom-cxf.xml
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsProvide/pom-metro.xml
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsProvide/pom.xml
Log:
[JBWS-2650] Adding more tests + conforming to maven convention on plugin naming
Modified: projects/plugins/maven/jaxws-tools/trunk/pom.xml
===================================================================
--- projects/plugins/maven/jaxws-tools/trunk/pom.xml 2010-02-26 15:23:31 UTC (rev 11695)
+++ projects/plugins/maven/jaxws-tools/trunk/pom.xml 2010-02-26 15:53:01 UTC (rev 11696)
@@ -3,8 +3,8 @@
<modelVersion>4.0.0</modelVersion>
<name>JBoss Web Services - JAX-WS Tools Maven Plugin</name>
- <groupId>org.jboss.ws.plugins.maven</groupId>
- <artifactId>jaxws-tools-plugin</artifactId>
+ <groupId>org.jboss.ws.plugins</groupId>
+ <artifactId>maven-jaxws-tools-plugin</artifactId>
<packaging>maven-plugin</packaging>
<version>1.0.0-SNAPSHOT</version>
Modified: projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/AbstractWsConsumeMojo.java
===================================================================
--- projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/AbstractWsConsumeMojo.java 2010-02-26 15:23:31 UTC (rev 11695)
+++ projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/AbstractWsConsumeMojo.java 2010-02-26 15:53:01 UTC (rev 11696)
@@ -37,7 +37,7 @@
* @since 24-Feb-2010
*
*/
-abstract class AbstractWsConsumeMojo extends AbstractToolsMojo
+public abstract class AbstractWsConsumeMojo extends AbstractToolsMojo
{
/**
* The list of wsdl urls / files to consume
Modified: projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/AbstractWsProvideMojo.java
===================================================================
--- projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/AbstractWsProvideMojo.java 2010-02-26 15:23:31 UTC (rev 11695)
+++ projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/AbstractWsProvideMojo.java 2010-02-26 15:53:01 UTC (rev 11696)
@@ -34,7 +34,7 @@
* @since 25-Feb-2010
*
*/
-abstract class AbstractWsProvideMojo extends AbstractToolsMojo
+public abstract class AbstractWsProvideMojo extends AbstractToolsMojo
{
/**
* Enables/Disables WSDL generation.
Modified: projects/plugins/maven/jaxws-tools/trunk/src/test/java/org/jboss/test/ws/plugins/tools/ArgumentTest.java
===================================================================
--- projects/plugins/maven/jaxws-tools/trunk/src/test/java/org/jboss/test/ws/plugins/tools/ArgumentTest.java 2010-02-26 15:23:31 UTC (rev 11695)
+++ projects/plugins/maven/jaxws-tools/trunk/src/test/java/org/jboss/test/ws/plugins/tools/ArgumentTest.java 2010-02-26 15:53:01 UTC (rev 11696)
@@ -25,6 +25,10 @@
import static org.junit.matchers.JUnitMatchers.hasItems;
import org.jboss.test.ws.plugins.tools.utils.AbstractToolsMojoTestCase;
+import org.jboss.ws.plugins.tools.AbstractWsConsumeMojo;
+import org.jboss.ws.plugins.tools.AbstractWsProvideMojo;
+import org.jboss.ws.plugins.tools.TestWsConsumeMojo;
+import org.jboss.ws.plugins.tools.TestWsProvideMojo;
import org.jboss.ws.plugins.tools.WsConsumeMojo;
import org.jboss.ws.plugins.tools.WsProvideMojo;
import org.junit.Test;
@@ -44,7 +48,12 @@
{
final String pluginConfig = "target/test-classes/test-argument/wsconsume-plugin-config.xml";
- WsConsumeMojo mojo = getMojo(WsConsumeMojo.class, "wsconsume", pluginConfig);
+ internalWsConsumeTest(getMojo(WsConsumeMojo.class, "wsconsume", pluginConfig));
+ internalWsConsumeTest(getMojo(TestWsConsumeMojo.class, "wsconsume", pluginConfig));
+ }
+
+ private static void internalWsConsumeTest(AbstractWsConsumeMojo mojo)
+ {
assertEquals("t", mojo.getTarget());
assertEquals("output", mojo.getOutputDirectory().getName());
assertEquals("tp", mojo.getTargetPackage());
@@ -63,7 +72,12 @@
{
final String pluginConfig = "target/test-classes/test-argument/wsprovide-plugin-config.xml";
- WsProvideMojo mojo = getMojo(WsProvideMojo.class, "wsprovide", pluginConfig);
+ internalWsProvideTest(getMojo(WsProvideMojo.class, "wsprovide", pluginConfig));
+ internalWsProvideTest(getMojo(TestWsProvideMojo.class, "wsprovide", pluginConfig));
+ }
+
+ private static void internalWsProvideTest(AbstractWsProvideMojo mojo)
+ {
assertEquals("output", mojo.getOutputDirectory().getName());
assertEquals("endpoint", mojo.getEndpointClass());
assertEquals("resource", mojo.getResourceDirectory().getName());
Modified: projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-argument/wsconsume-plugin-config.xml
===================================================================
--- projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-argument/wsconsume-plugin-config.xml 2010-02-26 15:23:31 UTC (rev 11695)
+++ projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-argument/wsconsume-plugin-config.xml 2010-02-26 15:53:01 UTC (rev 11696)
@@ -2,8 +2,8 @@
<build>
<plugins>
<plugin>
- <groupId>org.jboss.ws.plugins.maven</groupId>
- <artifactId>jaxws-tools-plugin</artifactId>
+ <groupId>org.jboss.ws.plugins</groupId>
+ <artifactId>maven-jaxws-tools-plugin</artifactId>
<configuration>
<outputDirectory>output</outputDirectory>
<classpathElements>
Modified: projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-argument/wsprovide-plugin-config.xml
===================================================================
--- projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-argument/wsprovide-plugin-config.xml 2010-02-26 15:23:31 UTC (rev 11695)
+++ projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-argument/wsprovide-plugin-config.xml 2010-02-26 15:53:01 UTC (rev 11696)
@@ -2,8 +2,8 @@
<build>
<plugins>
<plugin>
- <groupId>org.jboss.ws.plugins.maven</groupId>
- <artifactId>jaxws-tools-plugin</artifactId>
+ <groupId>org.jboss.ws.plugins</groupId>
+ <artifactId>maven-jaxws-tools-plugin</artifactId>
<configuration>
<outputDirectory>output</outputDirectory>
<classpathElements>
Modified: projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsConsume/pom-cxf.xml
===================================================================
--- projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsConsume/pom-cxf.xml 2010-02-26 15:23:31 UTC (rev 11695)
+++ projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsConsume/pom-cxf.xml 2010-02-26 15:53:01 UTC (rev 11696)
@@ -27,8 +27,8 @@
</pluginManagement>
<plugins>
<plugin>
- <groupId>org.jboss.ws.plugins.maven</groupId>
- <artifactId>jaxws-tools-plugin</artifactId>
+ <groupId>org.jboss.ws.plugins</groupId>
+ <artifactId>maven-jaxws-tools-plugin</artifactId>
<version>@pom.version@</version>
<configuration>
<verbose>true</verbose>
Modified: projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsConsume/pom-metro.xml
===================================================================
--- projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsConsume/pom-metro.xml 2010-02-26 15:23:31 UTC (rev 11695)
+++ projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsConsume/pom-metro.xml 2010-02-26 15:53:01 UTC (rev 11696)
@@ -27,8 +27,8 @@
</pluginManagement>
<plugins>
<plugin>
- <groupId>org.jboss.ws.plugins.maven</groupId>
- <artifactId>jaxws-tools-plugin</artifactId>
+ <groupId>org.jboss.ws.plugins</groupId>
+ <artifactId>maven-jaxws-tools-plugin</artifactId>
<version>@pom.version@</version>
<configuration>
<verbose>true</verbose>
Modified: projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsConsume/pom.xml
===================================================================
--- projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsConsume/pom.xml 2010-02-26 15:23:31 UTC (rev 11695)
+++ projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsConsume/pom.xml 2010-02-26 15:53:01 UTC (rev 11696)
@@ -27,8 +27,8 @@
</pluginManagement>
<plugins>
<plugin>
- <groupId>org.jboss.ws.plugins.maven</groupId>
- <artifactId>jaxws-tools-plugin</artifactId>
+ <groupId>org.jboss.ws.plugins</groupId>
+ <artifactId>maven-jaxws-tools-plugin</artifactId>
<version>@pom.version@</version>
<configuration>
<verbose>true</verbose>
Modified: projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsProvide/pom-cxf.xml
===================================================================
--- projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsProvide/pom-cxf.xml 2010-02-26 15:23:31 UTC (rev 11695)
+++ projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsProvide/pom-cxf.xml 2010-02-26 15:53:01 UTC (rev 11696)
@@ -27,8 +27,8 @@
</pluginManagement>
<plugins>
<plugin>
- <groupId>org.jboss.ws.plugins.maven</groupId>
- <artifactId>jaxws-tools-plugin</artifactId>
+ <groupId>org.jboss.ws.plugins</groupId>
+ <artifactId>maven-jaxws-tools-plugin</artifactId>
<version>@pom.version@</version>
<configuration>
<verbose>true</verbose>
Modified: projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsProvide/pom-metro.xml
===================================================================
--- projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsProvide/pom-metro.xml 2010-02-26 15:23:31 UTC (rev 11695)
+++ projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsProvide/pom-metro.xml 2010-02-26 15:53:01 UTC (rev 11696)
@@ -27,8 +27,8 @@
</pluginManagement>
<plugins>
<plugin>
- <groupId>org.jboss.ws.plugins.maven</groupId>
- <artifactId>jaxws-tools-plugin</artifactId>
+ <groupId>org.jboss.ws.plugins</groupId>
+ <artifactId>maven-jaxws-tools-plugin</artifactId>
<version>@pom.version@</version>
<configuration>
<verbose>true</verbose>
Modified: projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsProvide/pom.xml
===================================================================
--- projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsProvide/pom.xml 2010-02-26 15:23:31 UTC (rev 11695)
+++ projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsProvide/pom.xml 2010-02-26 15:53:01 UTC (rev 11696)
@@ -27,8 +27,8 @@
</pluginManagement>
<plugins>
<plugin>
- <groupId>org.jboss.ws.plugins.maven</groupId>
- <artifactId>jaxws-tools-plugin</artifactId>
+ <groupId>org.jboss.ws.plugins</groupId>
+ <artifactId>maven-jaxws-tools-plugin</artifactId>
<version>@pom.version@</version>
<configuration>
<verbose>true</verbose>
14 years, 10 months
JBossWS SVN: r11695 - in projects/plugins/maven/jaxws-tools/trunk: src/main/java/org/jboss/ws/plugins/tools and 13 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-02-26 10:23:31 -0500 (Fri, 26 Feb 2010)
New Revision: 11695
Added:
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsProvide/src/test/
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsProvide/src/test/java/
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsProvide/src/test/java/org/
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsProvide/src/test/java/org/jboss/
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsProvide/src/test/java/org/jboss/test/
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsProvide/src/test/java/org/jboss/test/ws/
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsProvide/src/test/java/org/jboss/test/ws/plugins/
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsProvide/src/test/java/org/jboss/test/ws/plugins/tools/
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsProvide/src/test/java/org/jboss/test/ws/plugins/tools/wsprovide/
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsProvide/src/test/java/org/jboss/test/ws/plugins/tools/wsprovide/TestEndpoint2.java
Modified:
projects/plugins/maven/jaxws-tools/trunk/pom.xml
projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/TestWsConsumeMojo.java
projects/plugins/maven/jaxws-tools/trunk/src/test/java/org/jboss/test/ws/plugins/tools/helpers/TestWsConsumeHelper.java
projects/plugins/maven/jaxws-tools/trunk/src/test/java/org/jboss/test/ws/plugins/tools/helpers/TestWsProvideHelper.java
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsConsume/pom-cxf.xml
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsConsume/pom-metro.xml
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsConsume/pom.xml
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsProvide/pom-cxf.xml
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsProvide/pom-metro.xml
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsProvide/pom.xml
Log:
[JBWS-2650] Adding tests for test mojos
Modified: projects/plugins/maven/jaxws-tools/trunk/pom.xml
===================================================================
--- projects/plugins/maven/jaxws-tools/trunk/pom.xml 2010-02-26 14:59:58 UTC (rev 11694)
+++ projects/plugins/maven/jaxws-tools/trunk/pom.xml 2010-02-26 15:23:31 UTC (rev 11695)
@@ -29,6 +29,13 @@
<maven.project.version>2.0.4</maven.project.version>
<maven.plugin.api.version>2.0.4</maven.plugin.api.version>
<maven.invoker.plugin.version>1.5</maven.invoker.plugin.version>
+ <!-- For test -->
+ <junit.version>4.7</junit.version>
+ <maven.plugin.testing.harness.version>1.1</maven.plugin.testing.harness.version>
+ <jbossws.cxf.client.version>3.3.0.Beta1</jbossws.cxf.client.version>
+ <jbossws.metro.client.version>3.3.0.Beta1</jbossws.metro.client.version>
+ <jbossws.native.client.version>3.3.0.Beta4</jbossws.native.client.version>
+ <jbossxb.version>2.0.1.GA</jbossxb.version>
</properties>
<!-- Dependencies -->
@@ -53,14 +60,14 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
- <version>4.7</version>
+ <version>${junit.version}</version>
<type>jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.shared</groupId>
<artifactId>maven-plugin-testing-harness</artifactId>
- <version>1.1</version>
+ <version>${maven.plugin.testing.harness.version}</version>
<scope>test</scope>
</dependency>
@@ -68,25 +75,25 @@
<dependency>
<groupId>org.jboss.ws.native</groupId>
<artifactId>jbossws-native-client</artifactId>
- <version>3.3.0.Beta4</version>
+ <version>${jbossws.native.client.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.ws.cxf</groupId>
<artifactId>jbossws-cxf-client</artifactId>
- <version>3.3.0.Beta1</version>
+ <version>${jbossws.cxf.client.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.ws.metro</groupId>
<artifactId>jbossws-metro-client</artifactId>
- <version>3.3.0.Beta1</version>
+ <version>${jbossws.metro.client.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss</groupId>
<artifactId>jbossxb</artifactId>
- <version>2.0.1.GA</version>
+ <version>${jbossxb.version}</version>
<optional>true</optional>
<!-- <scope>test</scope> --> <!-- TODO Move this to test scope instead of making it optional; currently messes up classloader in wsprovide test with Native stack -->
</dependency>
Modified: projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/TestWsConsumeMojo.java
===================================================================
--- projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/TestWsConsumeMojo.java 2010-02-26 14:59:58 UTC (rev 11694)
+++ projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/TestWsConsumeMojo.java 2010-02-26 15:23:31 UTC (rev 11695)
@@ -27,10 +27,15 @@
/**
* Run wsconsume tool (for tests)
*
+ * @goal wsconsume-test
+ * @phase generate-test-sources
+ * @requiresDependencyResolution
+ * @description JBossWS WSConsume (Test) Maven Plugin.
+ *
* @author alessio.soldano(a)jboss.com
* @since 24-Feb-2010
*/
-public class TestWsConsumeMojo extends WsConsumeMojo
+public class TestWsConsumeMojo extends AbstractWsConsumeMojo
{
/**
* Sets the main output directory. If the directory does not exist, it will be created.
Modified: projects/plugins/maven/jaxws-tools/trunk/src/test/java/org/jboss/test/ws/plugins/tools/helpers/TestWsConsumeHelper.java
===================================================================
--- projects/plugins/maven/jaxws-tools/trunk/src/test/java/org/jboss/test/ws/plugins/tools/helpers/TestWsConsumeHelper.java 2010-02-26 14:59:58 UTC (rev 11694)
+++ projects/plugins/maven/jaxws-tools/trunk/src/test/java/org/jboss/test/ws/plugins/tools/helpers/TestWsConsumeHelper.java 2010-02-26 15:23:31 UTC (rev 11695)
@@ -74,6 +74,12 @@
{
return false;
}
+ File testClassesOrg = new File(basedir.getAbsolutePath() + File.separator + "target" + File.separator + "test-classes" + File.separator + "org");
+ File testClassesFoo = new File(basedir.getAbsolutePath() + File.separator + "target" + File.separator + "test-classes" + File.separator + "foo");
+ if (!testClassesFoo.exists() || !testClassesOrg.exists())
+ {
+ return false;
+ }
return true;
}
Modified: projects/plugins/maven/jaxws-tools/trunk/src/test/java/org/jboss/test/ws/plugins/tools/helpers/TestWsProvideHelper.java
===================================================================
--- projects/plugins/maven/jaxws-tools/trunk/src/test/java/org/jboss/test/ws/plugins/tools/helpers/TestWsProvideHelper.java 2010-02-26 14:59:58 UTC (rev 11694)
+++ projects/plugins/maven/jaxws-tools/trunk/src/test/java/org/jboss/test/ws/plugins/tools/helpers/TestWsProvideHelper.java 2010-02-26 15:23:31 UTC (rev 11695)
@@ -34,6 +34,7 @@
public class TestWsProvideHelper implements VerifyScriptHelper, SetupScriptHelper
{
private Long wsdlLastModificationTime = null;
+ private Long wsdlLastModificationTime2 = null;
private Long wrapperClassLastModificationTime = null;
@Override
@@ -42,30 +43,29 @@
File wrapper = new File(basedir.getAbsolutePath() + File.separator + "target" + File.separator + "wsprovide" + File.separator + "java" +
File.separator + "org" + File.separator + "jboss" + File.separator + "test" + File.separator + "ws" + File.separator + "plugins" +
File.separator + "tools" + File.separator + "wsprovide" + File.separator + "jaxws" + File.separator + "Test.java");
- if (!wrapper.exists())
- {
- System.out.println(wrapper + " not found!");
- return false;
- }
- if (wrapperClassLastModificationTime != null && wrapper.lastModified() == wrapperClassLastModificationTime)
- {
- System.out.println(wrapper + " was not modified by the plugin!");
- return false;
- }
-
File wsdl = new File(basedir.getAbsolutePath() + File.separator + "target" + File.separator + "wsprovide" + File.separator + "resources" +
File.separator + "TestEndpointService.wsdl");
- if (!wsdl.exists())
+ File wsdl2 = new File(basedir.getAbsolutePath() + File.separator + "target" + File.separator + "wsprovide" + File.separator + "resources" +
+ File.separator + "TestEndpoint2Service.wsdl");
+
+ final boolean firstCheck = internalVerify(wrapper, wrapperClassLastModificationTime);
+ final boolean secondCheck = internalVerify(wsdl, wsdlLastModificationTime);
+ final boolean thirdCheck = internalVerify(wsdl2, wsdlLastModificationTime2);
+ return firstCheck && secondCheck && thirdCheck;
+ }
+
+ private static boolean internalVerify(File file, Long modificationTime)
+ {
+ if (!file.exists())
{
- System.out.println(wsdl + " not found!");
+ System.out.println(file + " not found!");
return false;
}
- if (wsdlLastModificationTime != null && wsdl.lastModified() == wsdlLastModificationTime)
+ if (modificationTime != null && file.lastModified() == modificationTime)
{
- System.out.println(wsdl + " was not modified by the plugin!");
+ System.out.println(file + " was not modified by the plugin!");
return false;
}
-
return true;
}
@@ -86,6 +86,13 @@
{
this.wsdlLastModificationTime = wsdl.lastModified();
}
+
+ File wsdl2 = new File(basedir.getAbsolutePath() + File.separator + "target" + File.separator + "wsprovide" + File.separator + "resources" +
+ File.separator + "TestEndpointService2.wsdl");
+ if (wsdl2.exists())
+ {
+ this.wsdlLastModificationTime2 = wsdl2.lastModified();
+ }
}
}
Modified: projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsConsume/pom-cxf.xml
===================================================================
--- projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsConsume/pom-cxf.xml 2010-02-26 14:59:58 UTC (rev 11694)
+++ projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsConsume/pom-cxf.xml 2010-02-26 15:23:31 UTC (rev 11695)
@@ -72,6 +72,18 @@
</wsdls>
</configuration>
</execution>
+ <execution>
+ <id>Forth execution</id>
+ <goals>
+ <goal>wsconsume-test</goal>
+ </goals>
+ <configuration>
+ <wsdls>
+ <wsdl>${basedir}/test.wsdl</wsdl>
+ <wsdl>${basedir}/test2.wsdl</wsdl>
+ </wsdls>
+ </configuration>
+ </execution>
</executions>
</plugin>
</plugins>
Modified: projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsConsume/pom-metro.xml
===================================================================
--- projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsConsume/pom-metro.xml 2010-02-26 14:59:58 UTC (rev 11694)
+++ projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsConsume/pom-metro.xml 2010-02-26 15:23:31 UTC (rev 11695)
@@ -72,6 +72,18 @@
</wsdls>
</configuration>
</execution>
+ <execution>
+ <id>Forth execution</id>
+ <goals>
+ <goal>wsconsume-test</goal>
+ </goals>
+ <configuration>
+ <wsdls>
+ <wsdl>${basedir}/test.wsdl</wsdl>
+ <wsdl>${basedir}/test2.wsdl</wsdl>
+ </wsdls>
+ </configuration>
+ </execution>
</executions>
</plugin>
</plugins>
Modified: projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsConsume/pom.xml
===================================================================
--- projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsConsume/pom.xml 2010-02-26 14:59:58 UTC (rev 11694)
+++ projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsConsume/pom.xml 2010-02-26 15:23:31 UTC (rev 11695)
@@ -72,6 +72,18 @@
</wsdls>
</configuration>
</execution>
+ <execution>
+ <id>Forth execution</id>
+ <goals>
+ <goal>wsconsume-test</goal>
+ </goals>
+ <configuration>
+ <wsdls>
+ <wsdl>${basedir}/test.wsdl</wsdl>
+ <wsdl>${basedir}/test2.wsdl</wsdl>
+ </wsdls>
+ </configuration>
+ </execution>
</executions>
</plugin>
</plugins>
Modified: projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsProvide/pom-cxf.xml
===================================================================
--- projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsProvide/pom-cxf.xml 2010-02-26 14:59:58 UTC (rev 11694)
+++ projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsProvide/pom-cxf.xml 2010-02-26 15:23:31 UTC (rev 11695)
@@ -44,6 +44,16 @@
<generateWsdl>true</generateWsdl>
</configuration>
</execution>
+ <execution>
+ <id>Second execution</id>
+ <goals>
+ <goal>wsprovide-test</goal>
+ </goals>
+ <configuration>
+ <endpointClass>org.jboss.test.ws.plugins.tools.wsprovide.TestEndpoint2</endpointClass>
+ <generateWsdl>true</generateWsdl>
+ </configuration>
+ </execution>
</executions>
</plugin>
</plugins>
Modified: projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsProvide/pom-metro.xml
===================================================================
--- projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsProvide/pom-metro.xml 2010-02-26 14:59:58 UTC (rev 11694)
+++ projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsProvide/pom-metro.xml 2010-02-26 15:23:31 UTC (rev 11695)
@@ -44,6 +44,16 @@
<generateWsdl>true</generateWsdl>
</configuration>
</execution>
+ <execution>
+ <id>Second execution</id>
+ <goals>
+ <goal>wsprovide-test</goal>
+ </goals>
+ <configuration>
+ <endpointClass>org.jboss.test.ws.plugins.tools.wsprovide.TestEndpoint2</endpointClass>
+ <generateWsdl>true</generateWsdl>
+ </configuration>
+ </execution>
</executions>
</plugin>
</plugins>
Modified: projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsProvide/pom.xml
===================================================================
--- projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsProvide/pom.xml 2010-02-26 14:59:58 UTC (rev 11694)
+++ projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsProvide/pom.xml 2010-02-26 15:23:31 UTC (rev 11695)
@@ -44,6 +44,16 @@
<generateWsdl>true</generateWsdl>
</configuration>
</execution>
+ <execution>
+ <id>Second execution</id>
+ <goals>
+ <goal>wsprovide-test</goal>
+ </goals>
+ <configuration>
+ <endpointClass>org.jboss.test.ws.plugins.tools.wsprovide.TestEndpoint2</endpointClass>
+ <generateWsdl>true</generateWsdl>
+ </configuration>
+ </execution>
</executions>
</plugin>
</plugins>
Added: projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsProvide/src/test/java/org/jboss/test/ws/plugins/tools/wsprovide/TestEndpoint2.java
===================================================================
--- projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsProvide/src/test/java/org/jboss/test/ws/plugins/tools/wsprovide/TestEndpoint2.java (rev 0)
+++ projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsProvide/src/test/java/org/jboss/test/ws/plugins/tools/wsprovide/TestEndpoint2.java 2010-02-26 15:23:31 UTC (rev 11695)
@@ -0,0 +1,40 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.plugins.tools.wsprovide;
+
+import javax.jws.WebService;
+
+/**
+ * A simple test endpoint service implementation
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 26-Feb-2010
+ *
+ */
+@WebService
+public class TestEndpoint2
+{
+ public String test(String s)
+ {
+ return s;
+ }
+}
\ No newline at end of file
Property changes on: projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsProvide/src/test/java/org/jboss/test/ws/plugins/tools/wsprovide/TestEndpoint2.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
14 years, 10 months
JBossWS SVN: r11694 - stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2010-02-26 09:59:58 -0500 (Fri, 26 Feb 2010)
New Revision: 11694
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSServerMetaDataBuilder.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java
Log:
[JBPAPP-3803] Inconsistent / Incomplete handling of CONFIDENTIAL transport-guarantee defined in jboss.xml compared to @WebContext annotation.
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSServerMetaDataBuilder.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSServerMetaDataBuilder.java 2010-02-26 14:46:53 UTC (rev 11693)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSServerMetaDataBuilder.java 2010-02-26 14:59:58 UTC (rev 11694)
@@ -33,6 +33,8 @@
import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
import org.jboss.wsf.spi.metadata.j2ee.JSEArchiveMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.EJBMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.EJBSecurityMetaData;
/**
* Builds ServiceEndpointMetaData for a JAX-WS endpoint.
@@ -87,6 +89,14 @@
configName = ejbMetaData.getConfigName();
if (ejbMetaData.getConfigFile() != null)
configFile = ejbMetaData.getConfigFile();
+
+ EJBMetaData ejbMD = ejbMetaData.getBeanByEjbName(linkName);
+ EJBSecurityMetaData ejbSecurityMD = ejbMD != null ? ejbMD.getSecurityMetaData() : null;
+
+ if (ejbSecurityMD != null)
+ {
+ sepMetaData.setTransportGuarantee(ejbSecurityMD.getTransportGuarantee());
+ }
}
if (configName != null || configFile != null)
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java 2010-02-26 14:46:53 UTC (rev 11693)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java 2010-02-26 14:59:58 UTC (rev 11694)
@@ -56,6 +56,7 @@
import org.jboss.wsf.common.IOUtils;
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.deployment.Endpoint;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerChainMetaData;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerChainsMetaData;
@@ -144,8 +145,9 @@
// Process web methods
processWebMethods(sepMetaData, seiClass);
- // Init the transport guarantee
- initTransportGuaranteeJSE(dep, sepMetaData, linkName);
+ // Init the transport guarantee for JSE deployments.
+ if (dep.getType() == DeploymentType.JAXWS_JSE)
+ initTransportGuaranteeJSE(dep, sepMetaData, linkName);
// Initialize types
createJAXBContext(sepMetaData);
14 years, 10 months
JBossWS SVN: r11693 - stack/cxf/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-02-26 09:46:53 -0500 (Fri, 26 Feb 2010)
New Revision: 11693
Modified:
stack/cxf/trunk/modules/testsuite/test-excludes-jboss601.txt
Log:
[JBWS-2945][JBWS-2917] updating excludes for CXF stack
Modified: stack/cxf/trunk/modules/testsuite/test-excludes-jboss601.txt
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-excludes-jboss601.txt 2010-02-26 14:05:48 UTC (rev 11692)
+++ stack/cxf/trunk/modules/testsuite/test-excludes-jboss601.txt 2010-02-26 14:46:53 UTC (rev 11693)
@@ -42,8 +42,7 @@
# [JBWS-2397] Fix jbws1797 testcase
org/jboss/test/ws/jaxws/jbws1797/**
-# [JBWS-2917] We're using buggy xalan version causing namespaces issues
-org/jboss/test/ws/jaxws/jbws2917/**
+# [JBWS-2945] JAX-WS 2.2 implementation not yet available for CXF stack
org/jboss/test/ws/jaxws/jbws2937/**
org/jboss/test/ws/jaxws/jbws2942/**
org/jboss/test/ws/jaxws/endpointReference/EndpointReferenceBuilderTestCase.*
14 years, 10 months
JBossWS SVN: r11692 - in stack/native/trunk: modules/testsuite and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-02-26 09:05:48 -0500 (Fri, 26 Feb 2010)
New Revision: 11692
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/epr/NativeEndpointReferenceTestCase.java
stack/native/trunk/modules/testsuite/pom.xml
stack/native/trunk/modules/testsuite/test-excludes-jboss601.txt
stack/native/trunk/pom.xml
Log:
[JBWS-2917] using patched xalan + dependencies cleanup
Modified: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/epr/NativeEndpointReferenceTestCase.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/epr/NativeEndpointReferenceTestCase.java 2010-02-26 12:36:15 UTC (rev 11691)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/epr/NativeEndpointReferenceTestCase.java 2010-02-26 14:05:48 UTC (rev 11692)
@@ -115,10 +115,10 @@
private static void assertNamespaces(final Element e)
{
String myNamespace = e.lookupNamespaceURI(MY_PREFIX);
- assertNotNull("namespace is null for prefix " + MY_PREFIX + ", isn't xalan in endorsed directory?", myNamespace);
+ assertNotNull("namespace is null for prefix " + MY_PREFIX + ", are you using our patched xalan?", myNamespace);
assertEquals("namespace mismatch", myNamespace, MY_NS);
String wsamNamespace = e.lookupNamespaceURI(WSAM_PREFIX);
- assertNotNull("namespace is null for prefix " + WSAM_PREFIX + ", isn't xalan in endorsed directory?", wsamNamespace);
+ assertNotNull("namespace is null for prefix " + WSAM_PREFIX + ", are you using our patched xalan?", wsamNamespace);
assertEquals("namespace mismatch", wsamNamespace, WSAM_NS);
}
}
Modified: stack/native/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/native/trunk/modules/testsuite/pom.xml 2010-02-26 12:36:15 UTC (rev 11691)
+++ stack/native/trunk/modules/testsuite/pom.xml 2010-02-26 14:05:48 UTC (rev 11692)
@@ -41,10 +41,6 @@
<artifactId>jbossws-framework</artifactId>
</dependency>
<dependency>
- <groupId>xalan</groupId>
- <artifactId>xalan</artifactId>
- </dependency>
- <dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
</dependency>
Modified: stack/native/trunk/modules/testsuite/test-excludes-jboss601.txt
===================================================================
--- stack/native/trunk/modules/testsuite/test-excludes-jboss601.txt 2010-02-26 12:36:15 UTC (rev 11691)
+++ stack/native/trunk/modules/testsuite/test-excludes-jboss601.txt 2010-02-26 14:05:48 UTC (rev 11692)
@@ -6,10 +6,3 @@
# [JBWS-2718] Loading artifacts from WEB-INF/wsdl1 fails
org/jboss/test/ws/jaxws/jbws2718/**
-
-# [JBWS-2917] We're using buggy xalan version causing namespaces issues
-org/jboss/test/ws/jaxws/jbws2917/**
-org/jboss/test/ws/jaxws/jbws2937/**
-org/jboss/test/ws/jaxws/jbws2942/**
-org/jboss/test/ws/jaxws/endpointReference/**
-org/jboss/test/ws/jaxws/epr/NativeEndpointReferenceTestCase.*
Modified: stack/native/trunk/pom.xml
===================================================================
--- stack/native/trunk/pom.xml 2010-02-26 12:36:15 UTC (rev 11691)
+++ stack/native/trunk/pom.xml 2010-02-26 14:05:48 UTC (rev 11692)
@@ -79,8 +79,7 @@
<wscommons.policy.version>1.0</wscommons.policy.version>
<wsdl4j.version>1.6.1</wsdl4j.version>
<xmlsec.version>1.4.3</xmlsec.version>
- <xalan.version>2.7.0</xalan.version>
- <xerces.version>2.8.1</xerces.version>
+ <xerces.version>2.9.1</xerces.version>
</properties>
<!-- DependencyManagement -->
@@ -404,11 +403,6 @@
<version>${wsdl4j.version}</version>
</dependency>
<dependency>
- <groupId>xalan</groupId>
- <artifactId>xalan</artifactId>
- <version>${xalan.version}</version>
- </dependency>
- <dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<version>${xerces.version}</version>
14 years, 10 months
JBossWS SVN: r11691 - in framework/trunk: testsuite/test/java/org/jboss/test/ws/jaxws/jbws2419 and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2010-02-26 07:36:15 -0500 (Fri, 26 Feb 2010)
New Revision: 11691
Modified:
framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/EndpointAddressDeploymentAspect.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2419/SOAP11EndpointBean.java
Log:
[JBWS-2943] Inconsistent / Incomplete handling of CONFIDENTIAL transport-guarantee defined in jboss.xml compared to @WebContext annotation.
Modified: framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/EndpointAddressDeploymentAspect.java
===================================================================
--- framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/EndpointAddressDeploymentAspect.java 2010-02-26 12:18:02 UTC (rev 11690)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/EndpointAddressDeploymentAspect.java 2010-02-26 12:36:15 UTC (rev 11691)
@@ -25,6 +25,7 @@
import java.util.Map;
import org.jboss.wsf.common.integration.AbstractDeploymentAspect;
+import org.jboss.wsf.common.integration.WSHelper;
import org.jboss.wsf.spi.SPIProvider;
import org.jboss.wsf.spi.SPIProviderResolver;
import org.jboss.wsf.spi.annotation.WebContext;
@@ -36,6 +37,9 @@
import org.jboss.wsf.spi.metadata.j2ee.JSEArchiveMetaData;
import org.jboss.wsf.spi.metadata.j2ee.JSESecurityMetaData;
import org.jboss.wsf.spi.metadata.j2ee.JSESecurityMetaData.JSEResourceCollection;
+import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.EJBMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.EJBSecurityMetaData;
/**
* A deployer that assigns the endpoint address.
@@ -119,7 +123,7 @@
}
}
}
- else
+ else if (DeploymentType.JAXWS_EJB3 == dep.getType())
{
//TODO Unify annotation scans
Class implClass = ep.getTargetBeanClass();
@@ -128,6 +132,18 @@
{
transportGuarantee = anWebContext.transportGuarantee();
}
+ if (anWebContext == null || transportGuarantee == null || transportGuarantee.length() == 0)
+ {
+ String ejbName = ep.getShortName();
+ EJBArchiveMetaData ejbArchiveMD = dep.getAttachment(EJBArchiveMetaData.class);
+ EJBMetaData ejbMD = ejbArchiveMD != null ? ejbArchiveMD.getBeanByEjbName(ejbName) : null;
+ EJBSecurityMetaData ejbSecurityMD = ejbMD != null ? ejbMD.getSecurityMetaData() : null;
+
+ if (ejbSecurityMD != null)
+ {
+ transportGuarantee = ejbSecurityMD.getTransportGuarantee();
+ }
+ }
}
return "CONFIDENTIAL".equals(transportGuarantee);
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2419/SOAP11EndpointBean.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2419/SOAP11EndpointBean.java 2010-02-26 12:18:02 UTC (rev 11690)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2419/SOAP11EndpointBean.java 2010-02-26 12:36:15 UTC (rev 11691)
@@ -34,7 +34,6 @@
import javax.jws.WebService;
import javax.xml.bind.annotation.XmlMimeType;
import javax.xml.ws.BindingType;
-import javax.xml.ws.spi.Provider;
import javax.xml.ws.WebServiceException;
import org.jboss.logging.Logger;
@@ -68,7 +67,7 @@
{
Object content = dh.getContent();
- // Metro returns an ByteArrayInputStream
+ // Metro returns a ByteArrayInputStream
if (content instanceof InputStream)
{
try
14 years, 10 months