JBossWS SVN: r11803 - stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-03-18 06:15:16 -0400 (Thu, 18 Mar 2010)
New Revision: 11803
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/SchemaBindingBuilder.java
Log:
[JBWS-2965]
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/SchemaBindingBuilder.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/SchemaBindingBuilder.java 2010-03-18 09:37:09 UTC (rev 11802)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/SchemaBindingBuilder.java 2010-03-18 10:15:16 UTC (rev 11803)
@@ -455,7 +455,10 @@
if (typeBinding != null)
{
if(!isAnonymousType)
- schemaBinding.addElement(xmlName, typeBinding);
+ {
+ ElementBinding eb = schemaBinding.addElement(xmlName, typeBinding);
+ eb.setNillable(true);
+ }
}
else if (xmlType.equals(Constants.TYPE_LITERAL_ANYTYPE) == false)
{
14 years, 3 months
JBossWS SVN: r11802 - in stack/native/branches/jbossws-native-3.1.2/modules: testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2010-03-18 05:37:09 -0400 (Thu, 18 Mar 2010)
New Revision: 11802
Added:
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2964/
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2964/JBWS2964TestCase.java
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPMessageImpl.java
Log:
[JBPAPP-3941]:Create new mimeHeaders to avoid changing the referenced mimeHeaders
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPMessageImpl.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPMessageImpl.java 2010-03-18 09:32:32 UTC (rev 11801)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPMessageImpl.java 2010-03-18 09:37:09 UTC (rev 11802)
@@ -299,8 +299,15 @@
contentType = multipartRelatedEncoder.getContentType();
}
}
-
- mimeHeaders.setHeader(MimeConstants.CONTENT_TYPE, contentType);
+ //JBWS-2964:Create a new mimeHeaders to avoid changing another referenced mimeHeaders
+ MimeHeaders newMimeHeaders = new MimeHeaders();
+ Iterator iterator = mimeHeaders.getAllHeaders();
+ while (iterator.hasNext()) {
+ MimeHeader mimeHeader = (MimeHeader)iterator.next();
+ newMimeHeaders.addHeader(mimeHeader.getName(), mimeHeader.getValue());
+ }
+ newMimeHeaders.setHeader(MimeConstants.CONTENT_TYPE, contentType);
+ setMimeHeaders(newMimeHeaders);
}
catch (MessagingException ex)
{
Added: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2964/JBWS2964TestCase.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2964/JBWS2964TestCase.java (rev 0)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2964/JBWS2964TestCase.java 2010-03-18 09:37:09 UTC (rev 11802)
@@ -0,0 +1,49 @@
+/*
+ * 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.jaxws.jbws2964;
+
+import javax.xml.soap.MimeHeaders;
+
+import org.jboss.ws.core.soap.MessageFactoryImpl;
+import org.jboss.ws.core.soap.SOAPMessageImpl;
+import org.jboss.ws.core.soap.attachment.MimeConstants;
+
+import junit.framework.TestCase;
+
+public class JBWS2964TestCase extends TestCase
+{
+ public void testSaveChanges() throws Exception
+ {
+ MessageFactoryImpl mf = new MessageFactoryImpl();
+ SOAPMessageImpl soapMessage = (SOAPMessageImpl)mf.createMessage();
+ MimeHeaders mimeHeaders = new MimeHeaders();
+ mimeHeaders.setHeader(MimeConstants.CONTENT_TYPE,MimeConstants.TYPE_MULTIPART_RELATED);
+ soapMessage.setMimeHeaders(mimeHeaders);
+
+ SOAPMessageImpl tmp = (SOAPMessageImpl)mf.createMessage();
+ tmp.setMimeHeaders(soapMessage.getMimeHeaders());
+ tmp.saveChanges();
+
+ assertEquals(MimeConstants.TYPE_MULTIPART_RELATED, soapMessage.getMimeHeaders().getHeader(MimeConstants.CONTENT_TYPE)[0]);
+ }
+
+}
14 years, 3 months
JBossWS SVN: r11801 - in stack/native/trunk/modules: testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2010-03-18 05:32:32 -0400 (Thu, 18 Mar 2010)
New Revision: 11801
Added:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2964/
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2964/JBWS2964TestCase.java
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPMessageImpl.java
Log:
[JBWS-2964]:Create new mimeHeaders to avoid changing the referenced mimeHeaders
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPMessageImpl.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPMessageImpl.java 2010-03-17 18:05:44 UTC (rev 11800)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPMessageImpl.java 2010-03-18 09:32:32 UTC (rev 11801)
@@ -346,8 +346,16 @@
contentType = multipartRelatedEncoder.getContentType();
}
}
-
- mimeHeaders.setHeader(MimeConstants.CONTENT_TYPE, contentType);
+ //JBWS-2964:Create a new mimeHeaders to avoid changing another referenced mimeHeaders
+ MimeHeaders newMimeHeaders = new MimeHeaders();
+ Iterator iterator = mimeHeaders.getAllHeaders();
+ while (iterator.hasNext())
+ {
+ MimeHeader mimeHeader = (MimeHeader) iterator.next();
+ newMimeHeaders.addHeader(mimeHeader.getName(), mimeHeader.getValue());
+ }
+ newMimeHeaders.setHeader(MimeConstants.CONTENT_TYPE, contentType);
+ setMimeHeaders(newMimeHeaders);
}
catch (MessagingException ex)
{
Added: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2964/JBWS2964TestCase.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2964/JBWS2964TestCase.java (rev 0)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2964/JBWS2964TestCase.java 2010-03-18 09:32:32 UTC (rev 11801)
@@ -0,0 +1,49 @@
+/*
+ * 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.jaxws.jbws2964;
+
+import javax.xml.soap.MimeHeaders;
+
+import org.jboss.ws.core.soap.MessageFactoryImpl;
+import org.jboss.ws.core.soap.SOAPMessageImpl;
+import org.jboss.ws.core.soap.attachment.MimeConstants;
+
+import junit.framework.TestCase;
+
+public class JBWS2964TestCase extends TestCase
+{
+ public void testSaveChanges() throws Exception
+ {
+ MessageFactoryImpl mf = new MessageFactoryImpl();
+ SOAPMessageImpl soapMessage = (SOAPMessageImpl)mf.createMessage();
+ MimeHeaders mimeHeaders = new MimeHeaders();
+ mimeHeaders.setHeader(MimeConstants.CONTENT_TYPE,MimeConstants.TYPE_MULTIPART_RELATED);
+ soapMessage.setMimeHeaders(mimeHeaders);
+
+ SOAPMessageImpl tmp = (SOAPMessageImpl)mf.createMessage();
+ tmp.setMimeHeaders(soapMessage.getMimeHeaders());
+ tmp.saveChanges();
+
+ assertEquals(MimeConstants.TYPE_MULTIPART_RELATED, soapMessage.getMimeHeaders().getHeader(MimeConstants.CONTENT_TYPE)[0]);
+ }
+
+}
14 years, 3 months
JBossWS SVN: r11800 - stack/native/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-03-17 14:05:44 -0400 (Wed, 17 Mar 2010)
New Revision: 11800
Modified:
stack/native/trunk/modules/testsuite/test-excludes-jboss601.txt
Log:
[JBXB-242] Excluding tests
Modified: stack/native/trunk/modules/testsuite/test-excludes-jboss601.txt
===================================================================
--- stack/native/trunk/modules/testsuite/test-excludes-jboss601.txt 2010-03-17 15:06:32 UTC (rev 11799)
+++ stack/native/trunk/modules/testsuite/test-excludes-jboss601.txt 2010-03-17 18:05:44 UTC (rev 11800)
@@ -6,3 +6,7 @@
# [JBWS-2718] Loading artifacts from WEB-INF/wsdl1 fails
org/jboss/test/ws/jaxws/jbws2718/**
+
+# [JBXB-243]
+org/jboss/test/ws/jaxrpc/jbws434/**
+org/jboss/test/ws/jaxrpc/jbws720/**
14 years, 3 months
JBossWS SVN: r11799 - in stack/native/trunk/modules: core/src/main/java/org/jboss/ws/metadata/builder/jaxws and 9 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-03-17 11:06:32 -0400 (Wed, 17 Mar 2010)
New Revision: 11799
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/addressing/metadata/AddressingOpMetaExt.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/WSDLInterfaceMessageReference.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/WSDLInterfaceOperationOutfault.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Writer.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDLGenerator.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/interop/wsa/EchoImpl.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/epr/TestEndpointImpl.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsrm/service/SimpleServiceImpl.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/wsaddressing/action/ActionRpcEndpointImpl.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/wsaddressing/replyto/FaultToEndpointImpl.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/wsaddressing/replyto/InitialEndpointImpl.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/wsaddressing/replyto/ReplyToEndpointImpl.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/wsrm/services/OneWayServiceImpl.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/wsrm/services/ReqResServiceImpl.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/wsrm/services/SecuredOneWayServiceImpl.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/wsrm/services/SecuredReqResServiceImpl.java
stack/native/trunk/modules/testsuite/test-excludes-jboss501.txt
stack/native/trunk/modules/testsuite/test-excludes-jboss510.txt
stack/native/trunk/modules/testsuite/test-excludes-jboss600.txt
stack/native/trunk/modules/testsuite/test-excludes-jboss601.txt
Log:
[JBWS-2960] generating addressing policy in WSDL for @Addressing enabled endpoints
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/addressing/metadata/AddressingOpMetaExt.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/addressing/metadata/AddressingOpMetaExt.java 2010-03-17 14:43:56 UTC (rev 11798)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/addressing/metadata/AddressingOpMetaExt.java 2010-03-17 15:06:32 UTC (rev 11799)
@@ -21,6 +21,9 @@
*/
package org.jboss.ws.extensions.addressing.metadata;
+import java.util.HashMap;
+import java.util.Map;
+
import org.jboss.ws.metadata.umdm.MetaDataExtension;
/**
@@ -35,6 +38,7 @@
{
private String inboundAction;
private String outboundAction;
+ private Map<String, String> faultAction = new HashMap<String, String>();
public AddressingOpMetaExt(String extensionNameSpace)
{
@@ -60,5 +64,15 @@
{
this.outboundAction = outboundAction;
}
+
+ public void setFaultAction(String beanName, String action)
+ {
+ this.faultAction.put(beanName, action);
+ }
+
+ public String getFaultAction(String beanName)
+ {
+ return this.faultAction.get(beanName);
+ }
}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java 2010-03-17 14:43:56 UTC (rev 11798)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java 2010-03-17 15:06:32 UTC (rev 11799)
@@ -50,11 +50,13 @@
import javax.xml.namespace.QName;
import javax.xml.rpc.ParameterMode;
import javax.xml.ws.BindingType;
+import javax.xml.ws.FaultAction;
import javax.xml.ws.RequestWrapper;
import javax.xml.ws.ResponseWrapper;
import javax.xml.ws.WebFault;
import javax.xml.ws.Action;
import javax.xml.ws.addressing.AddressingProperties;
+import javax.xml.ws.soap.AddressingFeature;
import org.jboss.logging.Logger;
import org.jboss.ws.Constants;
@@ -553,42 +555,145 @@
return (namespace != null) ? new QName(namespace, name) : new QName(name);
}
+
+ /*
+ * 1. A non-default @Action(input=...) or @WebMethod(action=...) value on a SEI method
+ * MUST result into wsdl:input[@wsam:Action] attribute in the corresponding wsdl:operation.
+ * Also, @Action(input=...) and @WebMethod(action=...) annotation element values MUST
+ * be same, if present.
+ * 2. If wsdl:input[@wsam:Action] cannot be mapped from the above steps, then wsam:Action
+ * is generated using the metadata defaulting algorithm as if wsdl:input[@name] is
+ * not present in WSDL.
+ */
+ private String getInputActionName(final Method method, final EndpointMetaData endpointMD, final OperationMetaData operationMD)
+ {
+ String actionInput = null;
+ Action actionAnn = method.getAnnotation(Action.class);
+ if ((actionAnn != null) && (!"".equals(actionAnn.input())))
+ actionInput = actionAnn.input();
+
+ String webMethodAction = null;
+ WebMethod webMethodAnn = method.getAnnotation(WebMethod.class);
+ if ((webMethodAnn != null) && (!"".equals(webMethodAnn.action())))
+ webMethodAction = webMethodAnn.action();
+
+ if ((actionInput != null) && (webMethodAction != null) && !actionInput.equals(webMethodAction))
+ throw new RuntimeException("@Action.input and @WebMethod.action must have same value if both specified: " + method);
+
+ if (actionInput != null)
+ return actionInput;
+
+ if (webMethodAction != null)
+ return webMethodAction;
+ if (endpointMD.isFeatureEnabled(AddressingFeature.class))
+ {
+ String tns = endpointMD.getPortTypeName().getNamespaceURI();
+ String portTypeName = endpointMD.getPortTypeName().getLocalPart();
+ String opName = operationMD.getQName().getLocalPart();
+
+ return tns + portTypeName + "/" + opName + "Request";
+ }
+
+ return null;
+ }
+
+ /*
+ * 2. A non-default @Action(output=...) value on a SEI method MUST result into wsdl:output-
+ * [@wsam:Action] attribute in the corresponding wsdl:operation.
+ * 5. If wsdl:output[@wsam:Action] cannot be mapped from the above steps, then wsam:Action
+ * is generated using the metadata defaulting algorithm as if wsdl:output[@name] is not present in
+ * WSDL.
+ */
+ private String getOutputActionName(final Method method, final EndpointMetaData endpointMD, final OperationMetaData operationMD)
+ {
+ if (operationMD.isOneWay())
+ return null;
+
+ Action actionAnn = method.getAnnotation(Action.class);
+ if ((actionAnn != null) && (!"".equals(actionAnn.output())))
+ return actionAnn.output();
+
+ if (endpointMD.isFeatureEnabled(AddressingFeature.class))
+ {
+ String tns = endpointMD.getPortTypeName().getNamespaceURI();
+ String portTypeName = endpointMD.getPortTypeName().getLocalPart();
+ String opName = operationMD.getQName().getLocalPart();
+
+ return tns + portTypeName + "/" + opName + "Response";
+ }
+
+ return null;
+ }
+
+ /*
+ * 3. A non-default @Action(@FaultAction=...) value on a SEI method MUST result into wsdl:fault-
+ * [@wsam:Action] attribute in the corresponding wsdl:operation. The wsdl:fault element
+ * MUST correspond to the exception specified by className annotated element value.
+ * 6. If wsdl:fault[@wsam:Action] cannot be mapped from the above steps, then wsam:Action is
+ * generated using the metadata defaulting algorithm as if wsdl:fault[@name] is the corresponding
+ * exception class name.
+ */
+ private String getFaultActionName(final Method method, final EndpointMetaData endpointMD, final OperationMetaData operationMD, final FaultMetaData faultMD)
+ {
+ if (operationMD.isOneWay())
+ return null;
+
+ String faultBeanName = faultMD.getJavaTypeName();
+ Action actionAnn = method.getAnnotation(Action.class);
+ FaultAction faultActionAnn = null;
+ if (actionAnn != null)
+ {
+ for (FaultAction faultAction : actionAnn.fault())
+ {
+ if (faultAction.className().getName().equals(faultBeanName))
+ {
+ faultActionAnn = faultAction;
+ break;
+ }
+ }
+ }
+
+ if ((faultActionAnn != null) && (!"".equals(faultActionAnn.value())))
+ return faultActionAnn.value();
+
+ if (endpointMD.isFeatureEnabled(AddressingFeature.class))
+ {
+ String tns = endpointMD.getPortTypeName().getNamespaceURI();
+ String portTypeName = endpointMD.getPortTypeName().getLocalPart();
+ String opName = operationMD.getQName().getLocalPart();
+ int dotIndex = faultBeanName.lastIndexOf('.');
+ String excetionClassName = dotIndex == -1 ? faultBeanName : faultBeanName.substring(dotIndex + 1);
+
+ return tns + portTypeName + "/" + opName + "/Fault/" + excetionClassName;
+ }
+
+ return null;
+ }
+
/**
* Process operation meta data extensions.
*/
- private void processMetaExtensions(Method method, EndpointMetaData epMetaData, OperationMetaData opMetaData)
+ private void processMetaExtensions(Method method, EndpointMetaData endpointMD, OperationMetaData operationMD)
{
AddressingProperties ADDR = new AddressingPropertiesImpl();
AddressingOpMetaExt addrExt = new AddressingOpMetaExt(ADDR.getNamespaceURI());
- Action anAction = method.getAnnotation(Action.class);
- if (anAction != null)
+ addrExt.setInboundAction(this.getInputActionName(method, endpointMD, operationMD));
+ addrExt.setOutboundAction(this.getOutputActionName(method, endpointMD, operationMD));
+ for (FaultMetaData faultMD : operationMD.getFaults())
{
- addrExt.setInboundAction(anAction.input());
- addrExt.setOutboundAction(anAction.output());
+ addrExt.setFaultAction(faultMD.getFaultBeanName(), this.getFaultActionName(method, endpointMD, operationMD, faultMD));
}
- else
- // default action values
- {
- String tns = epMetaData.getPortName().getNamespaceURI();
- String portTypeName = epMetaData.getPortName().getLocalPart();
- String opName = opMetaData.getQName().getLocalPart();
- addrExt.setInboundAction(tns + "/" + portTypeName + "/" + opName + "Request");
- if (!opMetaData.isOneWay())
- addrExt.setOutboundAction(tns + "/" + portTypeName + "/" + opName + "Response");
- }
-
- opMetaData.addExtension(addrExt);
+ operationMD.addExtension(addrExt);
}
private void processWebMethod(EndpointMetaData epMetaData, Method method)
{
String javaName = method.getName();
-
// skip async methods, they dont need meta data representation
- if (method.getName().endsWith(Constants.ASYNC_METHOD_SUFFIX))
+ if (javaName.endsWith(Constants.ASYNC_METHOD_SUFFIX))
return;
// reflection defaults
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/WSDLInterfaceMessageReference.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/WSDLInterfaceMessageReference.java 2010-03-17 14:43:56 UTC (rev 11798)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/WSDLInterfaceMessageReference.java 2010-03-17 15:06:32 UTC (rev 11799)
@@ -76,6 +76,11 @@
* Used for WSDL 1.1
*/
private QName messageName;
+
+ /**
+ * wsam:Action
+ */
+ private String action;
public WSDLInterfaceMessageReference(WSDLInterfaceOperation wsdlOperation)
{
@@ -218,6 +223,26 @@
}
/**
+ * Sets wsam:Action
+ *
+ * @param action action
+ */
+ public void setAction(String action)
+ {
+ this.action = action;
+ }
+
+ /**
+ * Gets wsam:Action
+ *
+ * return action
+ */
+ public String getAction()
+ {
+ return this.action;
+ }
+
+ /**
* Sets the WSDL 1.1 part name.
*
* @param partName The part name
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/WSDLInterfaceOperationOutfault.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/WSDLInterfaceOperationOutfault.java 2010-03-17 14:43:56 UTC (rev 11798)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/WSDLInterfaceOperationOutfault.java 2010-03-17 15:06:32 UTC (rev 11799)
@@ -49,6 +49,20 @@
*/
private String messageLabel;
+ /** An OPTIONAL wsam:Action
+ */
+ private String action;
+
+ public String getAction()
+ {
+ return this.action;
+ }
+
+ public void setAction(String action)
+ {
+ this.action = action;
+ }
+
public WSDLInterfaceOperationOutfault(WSDLInterfaceOperation wsdlInterfaceOperation)
{
this.wsdlInterfaceOperation = wsdlInterfaceOperation;
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Writer.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Writer.java 2010-03-17 14:43:56 UTC (rev 11798)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Writer.java 2010-03-17 15:06:32 UTC (rev 11799)
@@ -59,6 +59,7 @@
import org.jboss.ws.metadata.wsdl.WSDLRPCSignatureItem.Direction;
import org.jboss.wsf.common.DOMUtils;
import org.jboss.wsf.common.DOMWriter;
+import org.jboss.wsf.common.addressing.AddressingConstants;
import org.w3c.dom.Attr;
import org.w3c.dom.Element;
import org.w3c.dom.NamedNodeMap;
@@ -185,6 +186,7 @@
for (WSDLExtensibilityElement ext : extendable.getAllExtensibilityElements())
{
appendPolicyElements(builder, ext);
+ appendAddressingPolicyElements(builder, ext);
appendJAXWSCustomizationElements(builder, ext);
//add processing of further extensibility element types below
}
@@ -199,6 +201,14 @@
}
}
+ private void appendAddressingPolicyElements(StringBuilder builder, WSDLExtensibilityElement extElem)
+ {
+ if (WSDLGenerator.WSP_NS.equalsIgnoreCase(extElem.getUri()))
+ {
+ appendElementSkippingKnownNs(builder, extElem.getElement());
+ }
+ }
+
private void appendJAXWSCustomizationElements(StringBuilder builder, WSDLExtensibilityElement extElem)
{
if (Constants.URI_JAXWS_WSDL_CUSTOMIZATIONS.equalsIgnoreCase(extElem.getUri()))
@@ -427,6 +437,8 @@
protected void appendPortOperations(StringBuilder buffer, WSDLInterface intf)
{
String prefix = wsdl.getPrefix(intf.getName().getNamespaceURI());
+ String wsamPrefix = wsdl.getPrefix(AddressingConstants.Metadata.NS);
+
WSDLInterfaceOperation[] operations = intf.getSortedOperations();
for (int i = 0; i < operations.length; i++)
{
@@ -449,20 +461,45 @@
String interfaceName = operation.getWsdlInterface().getName().getLocalPart();
String msgEl = prefix + ":" + interfaceName + "_" + opname;
- buffer.append("<input message='" + msgEl + "'>").append("</input>");
+ String inputAction = operation.getInputs()[0].getAction();
+ if (inputAction == null)
+ {
+ buffer.append("<input message='" + msgEl + "'>").append("</input>");
+ }
+ else
+ {
+ buffer.append("<input message='" + msgEl + "' " + wsamPrefix + ":" + AddressingConstants.Metadata.Attributes.ACTION + "='" + inputAction + "'/>");
+ }
if (! Constants.WSDL20_PATTERN_IN_ONLY.equals(operation.getPattern()))
{
- buffer.append("<output message='" + msgEl + "Response'>");
- buffer.append("</output>");
+ String outputAction = operation.getOutputs()[0].getAction();
+ if (outputAction == null)
+ {
+ buffer.append("<output message='" + msgEl + "Response'>").append("</output>");
+ }
+ else
+ {
+ buffer.append("<output message='" + msgEl + "Response' " + wsamPrefix + ":" + AddressingConstants.Metadata.Attributes.ACTION + "='" + outputAction + "'/>");
+ }
}
//Append the Faults
for (WSDLInterfaceOperationOutfault fault : operation.getOutfaults())
{
QName element = fault.getRef();
- buffer.append("<fault message='" + prefix + ":" + element.getLocalPart());
- buffer.append("' name='" + element.getLocalPart() + "'/>");
+ String faultAction = fault.getAction();
+ if (faultAction == null)
+ {
+ buffer.append("<fault message='" + prefix + ":" + element.getLocalPart());
+ buffer.append("' name='" + element.getLocalPart() + "'/>");
+ }
+ else
+ {
+ buffer.append("<fault message='" + prefix + ":" + element.getLocalPart());
+ buffer.append("' name='" + element.getLocalPart() + "' ");
+ buffer.append(wsamPrefix + ":" + AddressingConstants.Metadata.Attributes.ACTION + "='" + faultAction + "'/>");
+ }
}
buffer.append("</operation>");
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDLGenerator.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDLGenerator.java 2010-03-17 14:43:56 UTC (rev 11798)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDLGenerator.java 2010-03-17 15:06:32 UTC (rev 11799)
@@ -30,6 +30,8 @@
import javax.xml.namespace.QName;
import javax.xml.rpc.ParameterMode;
+import javax.xml.ws.addressing.AddressingProperties;
+import javax.xml.ws.soap.AddressingFeature;
import javax.xml.ws.soap.SOAPBinding;
import org.apache.ws.policy.Policy;
@@ -38,6 +40,8 @@
import org.jboss.ws.Constants;
import org.jboss.ws.WSException;
import org.jboss.ws.core.soap.Style;
+import org.jboss.ws.extensions.addressing.AddressingPropertiesImpl;
+import org.jboss.ws.extensions.addressing.metadata.AddressingOpMetaExt;
import org.jboss.ws.extensions.policy.PolicyScopeLevel;
import org.jboss.ws.extensions.policy.metadata.PolicyMetaExtension;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
@@ -70,6 +74,8 @@
import org.jboss.ws.metadata.wsdl.WSDLService;
import org.jboss.ws.metadata.wsdl.WSDLRPCSignatureItem.Direction;
import org.jboss.wsf.common.DOMUtils;
+import org.jboss.wsf.common.addressing.AddressingConstants;
+import org.jboss.wsf.common.utils.UUIDGenerator;
import org.w3c.dom.Element;
/**
@@ -79,6 +85,10 @@
*/
public abstract class WSDLGenerator
{
+ private static final AddressingProperties WSA_PROPERTIES = new AddressingPropertiesImpl();
+ public static final String WSU_NS = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utilit...";
+ public static final String WSAM_NS = AddressingConstants.Metadata.NS;
+ public static final String WSP_NS = "http://www.w3.org/ns/ws-policy";
protected WSDLDefinitions wsdl;
protected boolean extension;
@@ -116,6 +126,14 @@
wsdlBinding.setType(endpoint.getBindingId());
wsdl.addBinding(wsdlBinding);
wsdlEndpoint.setBinding(bindingQName);
+ if (endpoint.isFeatureEnabled(AddressingFeature.class))
+ {
+ // register WSAM namespace
+ if (wsdl.getPrefix(WSAM_NS) == null)
+ {
+ wsdl.registerNamespaceURI(WSAM_NS, "wsa");
+ }
+ }
if (endpoint.getDocumentation() != null)
{
@@ -164,6 +182,16 @@
addPolicyReference(policy, wsdlBinding);
}
}
+
+ // Addressing policies - http://ws.apache.org/commons/neethi/ is not usable thus hacking the code ATM :(
+ // TODO: implement WS-P facade?
+ if (endpoint.isFeatureEnabled(AddressingFeature.class))
+ {
+ AddressingFeature addressingFeature = endpoint.getFeature(AddressingFeature.class);
+
+ String policyId = this.addAddressingPolicyDefinition(addressingFeature);
+ this.addAddressingPolicyReference(policyId, wsdlBinding);
+ }
}
protected void addPolicyDefinition(Policy policy)
@@ -189,6 +217,37 @@
}
}
+ /*
+ * <wsp:Policy wsu:Id="SOME_ID">
+ * <wsam:Addressing wsp:Optional="true">
+ * <wsp:Policy/>
+ * </wsam:Addressing>
+ * </wsp:Policy>
+ */
+ private String addAddressingPolicyDefinition(final AddressingFeature addressing)
+ {
+ // construct addressing policy
+ String policyId = UUIDGenerator.generateRandomUUIDString();
+ Element policyElement = DOMUtils.createElement(new QName(WSP_NS, "Policy", "wsp"));
+ policyElement.setAttribute("xmlns:wsu", WSU_NS);
+ policyElement.setAttribute("xmlns:wsp", WSP_NS);
+ policyElement.setAttribute("wsu:Id", policyId);
+ Element addressingElement = DOMUtils.createElement(new QName(WSAM_NS, "Addressing", "wsam"));
+ addressingElement.setAttribute("xmlns:wsam", WSAM_NS);
+ policyElement.appendChild(addressingElement);
+ if (!addressing.isRequired())
+ {
+ addressingElement.setAttributeNS(WSP_NS, "wsp:Optional", "true");
+ }
+ Element nestedPolicyElement = DOMUtils.createElement(new QName(WSP_NS, "Policy", "wsp"));
+ addressingElement.appendChild(nestedPolicyElement);
+
+ // bind policy to WSDL
+ wsdl.addExtensibilityElement(new WSDLExtensibilityElement(WSP_NS, policyElement));
+
+ return policyId;
+ }
+
protected void addPolicyReference(Policy policy, Extendable extendable)
{
QName policyRefQName = Constants.WSDL_ELEMENT_WSP_POLICYREFERENCE;
@@ -205,6 +264,17 @@
extendable.addExtensibilityElement(ext);
}
+ /*
+ * <wsp:PolicyReference URI="#SOME_ID"/>
+ */
+ protected void addAddressingPolicyReference(String policyId, Extendable extendable)
+ {
+ Element policyReferenceElement = DOMUtils.createElement(new QName(WSP_NS, "PolicyReference", "wsp"));
+ policyReferenceElement.setAttribute("xmlns:wsp", WSP_NS);
+ policyReferenceElement.setAttribute("URI", "#" + policyId);
+ extendable.addExtensibilityElement(new WSDLExtensibilityElement(WSP_NS, policyReferenceElement));
+ }
+
protected void addPolicyURIAttribute(Policy policy, Extendable extendable)
{
//TODO!! we need to understand if the policy is local or not...
@@ -248,6 +318,7 @@
String ns = getNamespace(fault.getJavaType(), operation.getQName().getNamespaceURI());
QName outFaultName = new QName(ns, fault.getXmlName().getLocalPart());
outfault.setRef(outFaultName);
+ this.setAddressingAction(outfault, fault, operation);
interfaceOperation.addOutfault(outfault);
WSDLBindingFault bindingFault = new WSDLBindingFault(wsdlBinding);
@@ -342,6 +413,7 @@
// If there is no return parameter, it will most likely be set later with an INOUT or OUT parameter.
// Otherwise, a null element means there is a 0 body element part, which is allowed by BP 1.0
interfaceOperation.addOutput(output);
+ this.setAddressingAction(output, operation);
bindingOperation.addOutput(bindingOutput);
}
@@ -373,6 +445,7 @@
}
interfaceOperation.addInput(input);
+ this.setAddressingAction(input, operation);
bindingOperation.addInput(bindingInput);
}
@@ -419,6 +492,7 @@
}
interfaceOperation.addOutput(output);
+ this.setAddressingAction(output, operation);
bindingOperation.addOutput(bindingOutput);
}
@@ -449,9 +523,45 @@
}
interfaceOperation.addInput(input);
+ this.setAddressingAction(input, operation);
bindingOperation.addInput(bindingInput);
}
+ private void setAddressingAction(WSDLInterfaceOperationInput input, OperationMetaData operationMD)
+ {
+ AddressingOpMetaExt addrExt = this.getAddressingMD(operationMD);
+ if (addrExt != null)
+ {
+ input.setAction(addrExt.getInboundAction());
+ }
+ }
+
+ private void setAddressingAction(WSDLInterfaceOperationOutput output, OperationMetaData operationMD)
+ {
+ AddressingOpMetaExt addrExt = this.getAddressingMD(operationMD);
+ if (addrExt != null)
+ {
+ output.setAction(addrExt.getOutboundAction());
+ }
+ }
+
+ private void setAddressingAction(WSDLInterfaceOperationOutfault fault, FaultMetaData faultMD, OperationMetaData operationMD)
+ {
+ AddressingOpMetaExt addrExt = this.getAddressingMD(operationMD);
+ if (addrExt != null)
+ {
+ fault.setAction(addrExt.getFaultAction(faultMD.getFaultBeanName()));
+ }
+ }
+
+ private AddressingOpMetaExt getAddressingMD(OperationMetaData operationMD)
+ {
+ if (operationMD.getEndpointMetaData().isFeatureEnabled(AddressingFeature.class))
+ return (AddressingOpMetaExt)operationMD.getExtension(WSA_PROPERTIES.getNamespaceURI());
+
+ return null;
+ }
+
protected void processService(ServiceMetaData service)
{
Modified: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/interop/wsa/EchoImpl.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/interop/wsa/EchoImpl.java 2010-03-17 14:43:56 UTC (rev 11798)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/interop/wsa/EchoImpl.java 2010-03-17 15:06:32 UTC (rev 11799)
@@ -21,13 +21,12 @@
*/
package org.jboss.test.ws.interop.wsa;
-import org.jboss.ws.annotation.EndpointConfig;
-
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
+import javax.xml.ws.soap.Addressing;
/**
* @author Heiko Braun <heiko.braun(a)jboss.com>
@@ -41,7 +40,7 @@
portName = "EchoPort"
)
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
-@EndpointConfig(configName = "Standard WSAddressing Endpoint")
+@Addressing
public class EchoImpl implements EchoPortType {
@WebMethod(operationName = "EchoOp", action = "http://example.org/action/echoIn")
Modified: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/epr/TestEndpointImpl.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/epr/TestEndpointImpl.java 2010-03-17 14:43:56 UTC (rev 11798)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/epr/TestEndpointImpl.java 2010-03-17 15:06:32 UTC (rev 11799)
@@ -35,14 +35,14 @@
import javax.xml.ws.addressing.ReferenceParameters;
import javax.xml.ws.addressing.soap.SOAPAddressingProperties;
import javax.xml.ws.handler.soap.SOAPMessageContext;
+import javax.xml.ws.soap.Addressing;
import org.jboss.logging.Logger;
-import org.jboss.ws.annotation.EndpointConfig;
@WebService(serviceName = "TestEndpointService", name = "TestEndpoint", targetNamespace = "http://org.jboss.ws/epr")
@SOAPBinding(style = SOAPBinding.Style.RPC)
@Stateless
-@EndpointConfig(configName = "Standard WSAddressing Endpoint")
+@Addressing
public class TestEndpointImpl implements TestEndpoint
{
// provide logging
Modified: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsrm/service/SimpleServiceImpl.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsrm/service/SimpleServiceImpl.java 2010-03-17 14:43:56 UTC (rev 11798)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsrm/service/SimpleServiceImpl.java 2010-03-17 15:06:32 UTC (rev 11799)
@@ -24,6 +24,7 @@
import javax.jws.Oneway;
import javax.jws.WebMethod;
import javax.jws.WebService;
+import javax.xml.ws.soap.Addressing;
import org.jboss.ws.annotation.EndpointConfig;
@@ -39,6 +40,7 @@
configFile = "META-INF/wsrm-jaxws-endpoint-config.xml",
configName = "Standard WSRM Endpoint"
)
+@Addressing
public class SimpleServiceImpl
{
@Oneway
Modified: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/wsaddressing/action/ActionRpcEndpointImpl.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/wsaddressing/action/ActionRpcEndpointImpl.java 2010-03-17 14:43:56 UTC (rev 11798)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/wsaddressing/action/ActionRpcEndpointImpl.java 2010-03-17 15:06:32 UTC (rev 11799)
@@ -26,9 +26,9 @@
import javax.jws.WebResult;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
+import javax.xml.ws.soap.Addressing;
import org.jboss.logging.Logger;
-import org.jboss.ws.annotation.EndpointConfig;
/**
* WS-Addressing service endpoint
@@ -43,7 +43,7 @@
targetNamespace = "http://org.jboss.ws/addressing/action",
endpointInterface = "org.jboss.test.ws.jaxws.wsaddressing.action.ActionEndpoint"
)
-@EndpointConfig(configName = "Standard WSAddressing Endpoint")
+@Addressing
public class ActionRpcEndpointImpl implements ActionEndpoint
{
// provide logging
Modified: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/wsaddressing/replyto/FaultToEndpointImpl.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/wsaddressing/replyto/FaultToEndpointImpl.java 2010-03-17 14:43:56 UTC (rev 11798)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/wsaddressing/replyto/FaultToEndpointImpl.java 2010-03-17 15:06:32 UTC (rev 11799)
@@ -28,6 +28,7 @@
import javax.jws.WebParam;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
+import javax.xml.ws.soap.Addressing;
import org.jboss.logging.Logger;
@@ -41,6 +42,7 @@
*/
@SOAPBinding(style = SOAPBinding.Style.DOCUMENT, parameterStyle = SOAPBinding.ParameterStyle.BARE)
@WebService(name = "FaultToEndpoint", serviceName = "FaultToEndpointService", targetNamespace = "http://org.jboss.ws/addressing/replyto")
+@Addressing
public class FaultToEndpointImpl
{
// provide logging
Modified: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/wsaddressing/replyto/InitialEndpointImpl.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/wsaddressing/replyto/InitialEndpointImpl.java 2010-03-17 14:43:56 UTC (rev 11798)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/wsaddressing/replyto/InitialEndpointImpl.java 2010-03-17 15:06:32 UTC (rev 11799)
@@ -26,9 +26,9 @@
import javax.jws.WebResult;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
+import javax.xml.ws.soap.Addressing;
import org.jboss.logging.Logger;
-import org.jboss.ws.annotation.EndpointConfig;
/**
* WS-Addressing service endpoint
@@ -39,7 +39,7 @@
*/
@SOAPBinding(style = SOAPBinding.Style.RPC)
@WebService(name = "InitialEndpoint", serviceName = "InitialEndpointService", targetNamespace = "http://org.jboss.ws/addressing/replyto")
-@EndpointConfig(configName = "Standard WSAddressing Endpoint")
+@Addressing
public class InitialEndpointImpl implements InitialEndpoint
{
// provide logging
Modified: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/wsaddressing/replyto/ReplyToEndpointImpl.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/wsaddressing/replyto/ReplyToEndpointImpl.java 2010-03-17 14:43:56 UTC (rev 11798)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/wsaddressing/replyto/ReplyToEndpointImpl.java 2010-03-17 15:06:32 UTC (rev 11799)
@@ -29,6 +29,7 @@
import javax.jws.WebResult;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
+import javax.xml.ws.soap.Addressing;
import org.jboss.logging.Logger;
@@ -41,6 +42,7 @@
*/
@SOAPBinding(style = SOAPBinding.Style.RPC)
@WebService(name = "ReplyToEndpoint", serviceName = "ReplyToEndpointService", targetNamespace = "http://org.jboss.ws/addressing/replyto")
+@Addressing
public class ReplyToEndpointImpl implements ReplyToEndpoint
{
// provide logging
Modified: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/wsrm/services/OneWayServiceImpl.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/wsrm/services/OneWayServiceImpl.java 2010-03-17 14:43:56 UTC (rev 11798)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/wsrm/services/OneWayServiceImpl.java 2010-03-17 15:06:32 UTC (rev 11799)
@@ -23,6 +23,8 @@
import javax.jws.Oneway;
import javax.jws.WebService;
+import javax.xml.ws.soap.Addressing;
+
import java.util.Arrays;
@WebService
@@ -33,6 +35,7 @@
targetNamespace = "http://www.jboss.org/jbossws/ws-extensions/wsrm",
endpointInterface = "org.jboss.test.ws.jaxws.wsrm.services.OneWayServiceIface"
)
+@Addressing
public class OneWayServiceImpl implements OneWayServiceIface
{
@Oneway
Modified: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/wsrm/services/ReqResServiceImpl.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/wsrm/services/ReqResServiceImpl.java 2010-03-17 14:43:56 UTC (rev 11798)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/wsrm/services/ReqResServiceImpl.java 2010-03-17 15:06:32 UTC (rev 11799)
@@ -23,6 +23,7 @@
import javax.jws.WebMethod;
import javax.jws.WebService;
+import javax.xml.ws.soap.Addressing;
@WebService
(
@@ -32,6 +33,7 @@
targetNamespace = "http://www.jboss.org/jbossws/ws-extensions/wsrm",
endpointInterface = "org.jboss.test.ws.jaxws.wsrm.services.ReqResServiceIface"
)
+@Addressing
public class ReqResServiceImpl
{
@WebMethod
Modified: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/wsrm/services/SecuredOneWayServiceImpl.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/wsrm/services/SecuredOneWayServiceImpl.java 2010-03-17 14:43:56 UTC (rev 11798)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/wsrm/services/SecuredOneWayServiceImpl.java 2010-03-17 15:06:32 UTC (rev 11799)
@@ -24,6 +24,7 @@
import java.util.Arrays;
import javax.jws.Oneway;
import javax.jws.WebService;
+import javax.xml.ws.soap.Addressing;
@WebService
(
@@ -33,6 +34,7 @@
targetNamespace = "http://www.jboss.org/jbossws/ws-extensions/wsrm",
endpointInterface = "org.jboss.test.ws.jaxws.wsrm.services.SecuredOneWayServiceIface"
)
+@Addressing
public class SecuredOneWayServiceImpl implements SecuredOneWayServiceIface
{
@Oneway
Modified: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/wsrm/services/SecuredReqResServiceImpl.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/wsrm/services/SecuredReqResServiceImpl.java 2010-03-17 14:43:56 UTC (rev 11798)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/wsrm/services/SecuredReqResServiceImpl.java 2010-03-17 15:06:32 UTC (rev 11799)
@@ -23,6 +23,7 @@
import javax.jws.WebMethod;
import javax.jws.WebService;
+import javax.xml.ws.soap.Addressing;
@WebService
(
@@ -32,6 +33,7 @@
targetNamespace = "http://www.jboss.org/jbossws/ws-extensions/wsrm",
endpointInterface = "org.jboss.test.ws.jaxws.wsrm.services.SecuredReqResServiceIface"
)
+@Addressing
public class SecuredReqResServiceImpl
{
@WebMethod
Modified: stack/native/trunk/modules/testsuite/test-excludes-jboss501.txt
===================================================================
--- stack/native/trunk/modules/testsuite/test-excludes-jboss501.txt 2010-03-17 14:43:56 UTC (rev 11798)
+++ stack/native/trunk/modules/testsuite/test-excludes-jboss501.txt 2010-03-17 15:06:32 UTC (rev 11799)
@@ -13,7 +13,3 @@
org/jboss/test/ws/jaxws/jbws2942/**
org/jboss/test/ws/jaxws/endpointReference/**
org/jboss/test/ws/jaxws/epr/NativeEndpointReferenceTestCase.*
-
-# [JBWS-2960] TODO
-org/jboss/test/ws/jaxws/jbws2960/*TestCase.*
-
Modified: stack/native/trunk/modules/testsuite/test-excludes-jboss510.txt
===================================================================
--- stack/native/trunk/modules/testsuite/test-excludes-jboss510.txt 2010-03-17 14:43:56 UTC (rev 11798)
+++ stack/native/trunk/modules/testsuite/test-excludes-jboss510.txt 2010-03-17 15:06:32 UTC (rev 11799)
@@ -13,7 +13,3 @@
org/jboss/test/ws/jaxws/jbws2942/**
org/jboss/test/ws/jaxws/endpointReference/**
org/jboss/test/ws/jaxws/epr/NativeEndpointReferenceTestCase.*
-
-# [JBWS-2960] TODO
-org/jboss/test/ws/jaxws/jbws2960/*TestCase.*
-
Modified: stack/native/trunk/modules/testsuite/test-excludes-jboss600.txt
===================================================================
--- stack/native/trunk/modules/testsuite/test-excludes-jboss600.txt 2010-03-17 14:43:56 UTC (rev 11798)
+++ stack/native/trunk/modules/testsuite/test-excludes-jboss600.txt 2010-03-17 15:06:32 UTC (rev 11799)
@@ -13,7 +13,3 @@
org/jboss/test/ws/jaxws/jbws2942/**
org/jboss/test/ws/jaxws/endpointReference/**
org/jboss/test/ws/jaxws/epr/NativeEndpointReferenceTestCase.*
-
-# [JBWS-2960] TODO
-org/jboss/test/ws/jaxws/jbws2960/*TestCase.*
-
Modified: stack/native/trunk/modules/testsuite/test-excludes-jboss601.txt
===================================================================
--- stack/native/trunk/modules/testsuite/test-excludes-jboss601.txt 2010-03-17 14:43:56 UTC (rev 11798)
+++ stack/native/trunk/modules/testsuite/test-excludes-jboss601.txt 2010-03-17 15:06:32 UTC (rev 11799)
@@ -6,7 +6,3 @@
# [JBWS-2718] Loading artifacts from WEB-INF/wsdl1 fails
org/jboss/test/ws/jaxws/jbws2718/**
-
-# [JBWS-2960] TODO
-org/jboss/test/ws/jaxws/jbws2960/*TestCase.*
-
14 years, 3 months
JBossWS SVN: r11798 - framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2960.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-03-17 10:43:56 -0400 (Wed, 17 Mar 2010)
New Revision: 11798
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2960/JBWS2960TestCase.java
Log:
[JBWS-2960] fixing test to be generic and stack agnostic
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2960/JBWS2960TestCase.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2960/JBWS2960TestCase.java 2010-03-17 10:49:39 UTC (rev 11797)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2960/JBWS2960TestCase.java 2010-03-17 14:43:56 UTC (rev 11798)
@@ -26,6 +26,7 @@
import javax.wsdl.Definition;
import javax.wsdl.Operation;
+import javax.wsdl.Port;
import javax.wsdl.PortType;
import javax.wsdl.extensions.UnknownExtensibilityElement;
import javax.wsdl.factory.WSDLFactory;
@@ -84,8 +85,9 @@
{
Definition wsdl = getWSDLDefinition(wsdlFile.getAbsolutePath());
List definitionExtElements = wsdl.getExtensibilityElements();
- QName bindingQName = new QName("http://foobar.org/", "AddNumbersPortBinding");
- List bindingExtElements = wsdl.getBinding(bindingQName).getExtensibilityElements();
+ QName serviceQName = new QName("http://foobar.org/", "AddNumbersService");
+ Port wsdlPort = wsdl.getService(serviceQName).getPort("AddNumbersPort");
+ List bindingExtElements = wsdlPort.getBinding().getExtensibilityElements();
Element policyElement = this.getRequiredElement(definitionExtElements, POLICY_QNAME);
Element policyReferenceElement = this.getRequiredElement(bindingExtElements, POLICY_REFERENCE_QNAME);
String wsuIdAttrValue = policyElement.getAttributeNS("http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utilit...", "Id");
14 years, 3 months
JBossWS SVN: r11797 - common/trunk/src/main/java/org/jboss/wsf/common/addressing.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-03-17 06:49:39 -0400 (Wed, 17 Mar 2010)
New Revision: 11797
Added:
common/trunk/src/main/java/org/jboss/wsf/common/addressing/AddressingConstants.java
Log:
[JBWS-2961] providing initial prototype version - it will be properly intergrated with native javax.xml.ws.addressing.AddressingConstants later and moved to SPI
Added: common/trunk/src/main/java/org/jboss/wsf/common/addressing/AddressingConstants.java
===================================================================
--- common/trunk/src/main/java/org/jboss/wsf/common/addressing/AddressingConstants.java (rev 0)
+++ common/trunk/src/main/java/org/jboss/wsf/common/addressing/AddressingConstants.java 2010-03-17 10:49:39 UTC (rev 11797)
@@ -0,0 +1,272 @@
+/*
+ * 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.wsf.common.addressing;
+
+import javax.xml.namespace.QName;
+
+/**
+ * TODO: see javax.xml.ws.addressing - merge it properly
+ * Addressing constants.
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+public final class AddressingConstants
+{
+ /**
+ * Constructor.
+ */
+ private AddressingConstants()
+ {
+ // forbidden inheritance
+ }
+
+ /**
+ * <a href="http://www.w3.org/2005/08/addressing">WSA</a> constants.
+ */
+ public static final class Core
+ {
+ /**
+ * Constructor.
+ */
+ private Core()
+ {
+ // forbidden inheritance
+ }
+
+ // WSA namespace
+ public static final String NS = "http://www.w3.org/2005/08/addressing";
+
+ // WSA prefix
+ public static final String NS_PREFIX = "wsa";
+
+ public static final class Elements
+ {
+ /**
+ * Constructor.
+ */
+ private Elements()
+ {
+ // forbidden inheritance
+ }
+
+ // WSA 'EndpointReference' element
+ public static final String ENDPOINTREFERENCE = "EndpointReference";
+ public static final QName ENDPOINTREFERENCE_QNAME = new QName(NS, ENDPOINTREFERENCE, NS_PREFIX);
+
+ // WSA 'ReferenceParameters' element
+ public static final String REFERENCEPARAMETERS = "ReferenceParameters";
+ public static final QName REFERENCEPARAMETERS_QNAME = new QName(NS, REFERENCEPARAMETERS, NS_PREFIX);
+
+ // WSA 'Metadata' element
+ public static final String METADATA = "Metadata";
+ public static final QName METADATA_QNAME = new QName(NS, METADATA, NS_PREFIX);
+
+ // WSA 'Address' element
+ public static final String ADDRESS = "Address";
+ public static final QName ADDRESS_QNAME = new QName(NS, ADDRESS, NS_PREFIX);
+
+ // WSA 'MessageID' element
+ public static final String MESSAGEID = "MessageID";
+ public static final QName MESSAGEID_QNAME = new QName(NS, MESSAGEID, NS_PREFIX);
+
+ // WSA 'RelatesTo' element
+ public static final String RELATESTO = "RelatesTo";
+ public static final QName RELATESTO_QNAME = new QName(NS, RELATESTO, NS_PREFIX);
+
+ // WSA 'ReplyTo' element
+ public static final String REPLYTO = "ReplyTo";
+ public static final QName REPLYTO_QNAME = new QName(NS, REPLYTO, NS_PREFIX);
+
+ // WSA 'From' element
+ public static final String FROM = "From";
+ public static final QName FROM_QNAME = new QName(NS, FROM, NS_PREFIX);
+
+ // WSA 'FaultTo' element
+ public static final String FAULTTO = "FaultTo";
+ public static final QName FAULTTO_QNAME = new QName(NS, FAULTTO, NS_PREFIX);
+
+ // WSA 'To' element
+ public static final String TO = "To";
+ public static final QName TO_QNAME = new QName(NS, TO, NS_PREFIX);
+
+ // WSA 'Action' element
+ public static final String ACTION = "Action";
+ public static final QName ACTION_QNAME = new QName(NS, ACTION, NS_PREFIX);
+
+ // WSA 'RetryAfter' element
+ public static final String RETRYAFTER = "RetryAfter";
+ public static final QName RETRYAFTER_QNAME = new QName(NS, RETRYAFTER, NS_PREFIX);
+
+ // WSA 'ProblemHeaderQName' element
+ public static final String PROBLEMHEADERQNAME = "ProblemHeaderQName";
+ public static final QName PROBLEMHEADERQNAME_QNAME = new QName(NS, PROBLEMHEADERQNAME, NS_PREFIX);
+
+ // WSA 'ProblemIRI' element
+ public static final String PROBLEMIRI = "ProblemIRI";
+ public static final QName PROBLEMIRI_QNAME = new QName(NS, PROBLEMIRI, NS_PREFIX);
+
+ // WSA 'ProblemAction' element
+ public static final String PROBLEMACTION = "ProblemAction";
+ public static final QName PROBLEMACTION_QNAME = new QName(NS, PROBLEMACTION, NS_PREFIX);
+
+ // WSA 'SoapAction' element
+ public static final String SOAPACTION = "SoapAction";
+ public static final QName SOAPACTION_QNAME = new QName(NS, SOAPACTION, NS_PREFIX);
+ }
+
+ public static final class Attributes
+ {
+ /**
+ * Constructor.
+ */
+ private Attributes()
+ {
+ // forbidden inheritance
+ }
+
+ // WSA 'RelationshipType' attribute
+ public static final String RELATIONSHIPTYPE = "RelationshipType";
+ public static final QName RELATIONSHIPTYPE_QNAME = new QName(NS, RELATIONSHIPTYPE, NS_PREFIX);
+
+ // WSA 'IsReferenceParameter' attribute
+ public static final String ISREFERENCEPARAMETER = "IsReferenceParameter";
+ public static final QName ISREFERENCEPARAMETER_QNAME = new QName(NS, ISREFERENCEPARAMETER, NS_PREFIX);
+
+ }
+
+ public static final class Faults
+ {
+ /**
+ * Constructor.
+ */
+ private Faults()
+ {
+ // forbidden inheritance
+ }
+
+ // WSA 'InvalidAddressingHeader' fault
+ public static final QName INVALIDADDRESSINGHEADER_QNAME = new QName(NS, "InvalidAddressingHeader", NS_PREFIX);
+
+ // WSA 'InvalidAddress' fault
+ public static final QName INVALIDADDRESS_QNAME = new QName(NS, "InvalidAddress", NS_PREFIX);
+
+ // WSA 'InvalidEPR' fault
+ public static final QName INVALIDEPR_QNAME = new QName(NS, "InvalidEPR", NS_PREFIX);
+
+ // WSA 'InvalidCardinality' fault
+ public static final QName INVALIDCARDINALITY_QNAME = new QName(NS, "InvalidCardinality", NS_PREFIX);
+
+ // WSA 'MissingAddressInEPR' fault
+ public static final QName MISSINGADDRESSINEPR_QNAME = new QName(NS, "MissingAddressInEPR", NS_PREFIX);
+
+ // WSA 'DuplicateMessageID' fault
+ public static final QName DUPLICATEMESSAGEID_QNAME = new QName(NS, "DuplicateMessageID", NS_PREFIX);
+
+ // WSA 'ActionMismatch' fault
+ public static final QName ACTIONMISMATCH_QNAME = new QName(NS, "ActionMismatch", NS_PREFIX);
+
+ // WSA 'MessageAddressingHeaderRequired' fault
+ public static final QName MESSAGEADDRESSINGHEADERREQUIRED_QNAME = new QName(NS, "MessageAddressingHeaderRequired", NS_PREFIX);
+
+ // WSA 'DestinationUnreachable' fault
+ public static final QName DESTINATIONUNREACHABLE_QNAME = new QName(NS, "DestinationUnreachable", NS_PREFIX);
+
+ // WSA 'ActionNotSupported' fault
+ public static final QName ACTIONNOTSUPPORTED_QNAME = new QName(NS, "ActionNotSupported", NS_PREFIX);
+
+ // WSA 'EndpointUnavailable' fault
+ public static final QName ENDPOINTUNAVAILABLE_QNAME = new QName(NS, "EndpointUnavailable", NS_PREFIX);
+ }
+ }
+
+ /**
+ * <a href="http://www.w3.org/2007/05/addressing/metadata">WSAM</a> constants.
+ */
+ public static final class Metadata
+ {
+ /**
+ * Constructor.
+ */
+ private Metadata()
+ {
+ // forbidden inheritance
+ }
+
+ // WSAM namespace
+ public static final String NS = "http://www.w3.org/2007/05/addressing/metadata";
+
+ // WSAM prefix
+ public static final String NS_PREFIX = "wsam";
+
+ public static final class Elements
+ {
+ /**
+ * Constructor.
+ */
+ private Elements()
+ {
+ // forbidden inheritance
+ }
+
+ // WSAM 'ServiceName' element
+ public static final String SERVICENAME = "ServiceName";
+ public static final QName SERVICENAME_QNAME = new QName(NS, SERVICENAME, NS_PREFIX);
+
+ // WSAM 'InterfaceName' element
+ public static final String INTERFACENAME = "InterfaceName";
+ public static final QName INTERFACENAME_QNAME = new QName(NS, INTERFACENAME, NS_PREFIX);
+
+ // WSAM 'Addressing' element
+ public static final String ADDRESSING = "Addressing";
+ public static final QName ADDRESSING_QNAME = new QName(NS, ADDRESSING, NS_PREFIX);
+
+ // WSAM 'AnonymousResponses' element
+ public static final String ANONYMOUSRESPONSES = "AnonymousResponses";
+ public static final QName ANONYMOUSRESPONSES_QNAME = new QName(NS, ANONYMOUSRESPONSES, NS_PREFIX);
+
+ // WSAM 'NonAnonymousResponses' element
+ public static final String NONANONYMOUSRESPONSES = "NonAnonymousResponses";
+ public static final QName NONANONYMOUSRESPONSES_QNAME = new QName(NS, NONANONYMOUSRESPONSES, NS_PREFIX);
+ }
+
+ public static final class Attributes
+ {
+ /**
+ * Constructor.
+ */
+ private Attributes()
+ {
+ // forbidden inheritance
+ }
+
+ // WSAM 'EndpointName' attribute
+ public static final String ENDPOINTNAME = "EndpointName";
+ public static final QName ENDPOINTNAME_QNAME = new QName(NS, ENDPOINTNAME, NS_PREFIX);
+
+ // WSAM 'Action' attribute
+ public static final String ACTION = "Action";
+ public static final QName ACTION_QNAME = new QName(NS, ACTION, NS_PREFIX);
+
+ }
+ }
+
+}
14 years, 3 months
JBossWS SVN: r11796 - in stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests: src/test/java/org/jboss/test/ws/jaxws/samples/dar and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-03-17 06:28:48 -0400 (Wed, 17 Mar 2010)
New Revision: 11796
Added:
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/XMLGregorianCalendarHelper.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/news/XMLGregorianCalendarHelper.java
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/scripts/build-samples-jaxws.xml
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/ClientHelper.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/ReplyConverter.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/news/Agency.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/news/Printer.java
Log:
[JBPAPP-3930] removing dependency on Sun proprietary classes
Modified: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/scripts/build-samples-jaxws.xml
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/scripts/build-samples-jaxws.xml 2010-03-16 20:29:41 UTC (rev 11795)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/scripts/build-samples-jaxws.xml 2010-03-17 10:28:48 UTC (rev 11796)
@@ -36,6 +36,7 @@
<fileset dir="${tests.output.dir}/test-classes">
<include name="org/jboss/test/ws/jaxws/samples/dar/generated/*.class"/>
<include name="org/jboss/test/ws/jaxws/samples/dar/ClientHelper.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/dar/XMLGregorianCalendarHelper.class"/>
<include name="org/jboss/test/ws/jaxws/samples/dar/Client.class"/>
</fileset>
</jar>
@@ -49,6 +50,7 @@
<include name="org/jboss/test/ws/jaxws/samples/dar/DarRequest.class"/>
<include name="org/jboss/test/ws/jaxws/samples/dar/DarResponse.class"/>
<include name="org/jboss/test/ws/jaxws/samples/dar/ReplyConverter.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/dar/XMLGregorianCalendarHelper.class"/>
<include name="org/jboss/test/ws/jaxws/samples/dar/Route.class"/>
<include name="org/jboss/test/ws/jaxws/samples/dar/ServiceRequest.class"/>
<include name="org/jboss/test/ws/jaxws/samples/dar/Stop.class"/>
@@ -62,6 +64,7 @@
<fileset dir="${tests.output.dir}/test-classes">
<include name="org/jboss/test/ws/jaxws/samples/dar/generated/*.class"/>
<include name="org/jboss/test/ws/jaxws/samples/dar/ClientHelper.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/dar/XMLGregorianCalendarHelper.class"/>
<include name="org/jboss/test/ws/jaxws/samples/dar/AddressingClient.class"/>
</fileset>
</jar>
@@ -92,6 +95,7 @@
<classes dir="${tests.output.dir}/test-classes">
<include name="org/jboss/test/ws/jaxws/samples/dar/generated/*.class"/>
<include name="org/jboss/test/ws/jaxws/samples/dar/ClientHelper.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/dar/XMLGregorianCalendarHelper.class"/>
<include name="org/jboss/test/ws/jaxws/samples/dar/JMSClient.class"/>
</classes>
<webinf dir="${tests.output.dir}/test-resources/jaxws/samples/dar/WEB-INF-jms">
@@ -161,12 +165,14 @@
<fileset dir="${tests.output.dir}/test-classes">
<include name="org/jboss/test/ws/jaxws/samples/news/generated/agency/*.class"/>
<include name="org/jboss/test/ws/jaxws/samples/news/Agency.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/news/XMLGregorianCalendarHelper.class"/>
</fileset>
</jar>
<jar jarfile="${tests.output.dir}/test-libs/jaxws-samples-news-step1-printer.jar">
<fileset dir="${tests.output.dir}/test-classes">
<include name="org/jboss/test/ws/jaxws/samples/news/generated/printer/**/*.class"/>
<include name="org/jboss/test/ws/jaxws/samples/news/Printer.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/news/XMLGregorianCalendarHelper.class"/>
</fileset>
</jar>
<jar jarfile="${tests.output.dir}/test-libs/jaxws-samples-news-step2-newspaper.jar">
@@ -194,6 +200,7 @@
<fileset dir="${tests.output.dir}/test-classes">
<include name="org/jboss/test/ws/jaxws/samples/news/generated/agency/*.class"/>
<include name="org/jboss/test/ws/jaxws/samples/news/Agency.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/news/XMLGregorianCalendarHelper.class"/>
<include name="org/jboss/test/ws/jaxws/samples/news/SecureAgency.class"/>
</fileset>
<metainf dir="${tests.output.dir}/test-resources/jaxws/samples/news/META-INF">
@@ -206,6 +213,7 @@
<fileset dir="${tests.output.dir}/test-classes">
<include name="org/jboss/test/ws/jaxws/samples/news/generated/printer/**/*.class"/>
<include name="org/jboss/test/ws/jaxws/samples/news/Printer.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/news/XMLGregorianCalendarHelper.class"/>
<include name="org/jboss/test/ws/jaxws/samples/news/SecurePrinter.class"/>
</fileset>
</jar>
Modified: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/ClientHelper.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/ClientHelper.java 2010-03-16 20:29:41 UTC (rev 11795)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/ClientHelper.java 2010-03-17 10:28:48 UTC (rev 11796)
@@ -34,8 +34,6 @@
import org.jboss.test.ws.jaxws.samples.dar.generated.ServiceRequest;
import org.jboss.test.ws.jaxws.samples.dar.generated.Stop;
-import com.sun.org.apache.xerces.internal.jaxp.datatype.XMLGregorianCalendarImpl;
-
public class ClientHelper
{
public static void setUsernamePassword(BindingProvider bp, String username, String password)
@@ -53,10 +51,10 @@
ServiceRequest serviceRequest = new ServiceRequest();
Stop up = new Stop();
up.setNode(new Double(Math.random()*1000).intValue());
- up.setTime(new XMLGregorianCalendarImpl(new GregorianCalendar()));
+ up.setTime(XMLGregorianCalendarHelper.convert(new GregorianCalendar()));
Stop down = new Stop();
down.setNode(new Double(Math.random()*1000).intValue());
- down.setTime(new XMLGregorianCalendarImpl(new GregorianCalendar()));
+ down.setTime(XMLGregorianCalendarHelper.convert(new GregorianCalendar()));
serviceRequest.setFrom(up);
serviceRequest.setTo(down);
serviceRequest.setPeople(new Double(Math.random()*3).intValue()+1);
Modified: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/ReplyConverter.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/ReplyConverter.java 2010-03-16 20:29:41 UTC (rev 11795)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/ReplyConverter.java 2010-03-17 10:28:48 UTC (rev 11796)
@@ -23,7 +23,8 @@
import java.util.GregorianCalendar;
-import com.sun.org.apache.xerces.internal.jaxp.datatype.XMLGregorianCalendarImpl;
+import javax.xml.datatype.DatatypeConfigurationException;
+import javax.xml.datatype.DatatypeFactory;
public class ReplyConverter
{
@@ -76,7 +77,7 @@
s.setNode(stop.getNode());
GregorianCalendar cal = new GregorianCalendar();
cal.setTime(stop.getTime());
- s.setTime(new XMLGregorianCalendarImpl(cal));
+ s.setTime(XMLGregorianCalendarHelper.convert(cal));
return s;
}
}
Copied: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/XMLGregorianCalendarHelper.java (from rev 11540, stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/XMLGregorianCalendarHelper.java)
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/XMLGregorianCalendarHelper.java (rev 0)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/XMLGregorianCalendarHelper.java 2010-03-17 10:28:48 UTC (rev 11796)
@@ -0,0 +1,52 @@
+/*
+ * 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.jaxws.samples.dar;
+
+import java.util.GregorianCalendar;
+
+import javax.xml.datatype.DatatypeFactory;
+import javax.xml.datatype.XMLGregorianCalendar;
+
+/**
+ * Helper class translating GregorianCalendar instances to XMLGregorianCalendar instances.
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+public final class XMLGregorianCalendarHelper
+{
+ private XMLGregorianCalendarHelper()
+ {
+ // forbidden inheritance
+ }
+
+ public static XMLGregorianCalendar convert(final GregorianCalendar cal)
+ {
+ try
+ {
+ return DatatypeFactory.newInstance().newXMLGregorianCalendar(cal);
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException(e);
+ }
+ }
+}
Modified: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/news/Agency.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/news/Agency.java 2010-03-16 20:29:41 UTC (rev 11795)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/news/Agency.java 2010-03-17 10:28:48 UTC (rev 11796)
@@ -26,12 +26,11 @@
import javax.xml.namespace.QName;
+import org.jboss.test.ws.jaxws.samples.dar.XMLGregorianCalendarHelper;
import org.jboss.test.ws.jaxws.samples.news.generated.agency.PressRelease;
import org.jboss.test.ws.jaxws.samples.news.generated.agency.PressReleaseEndpoint;
import org.jboss.test.ws.jaxws.samples.news.generated.agency.PressReleaseService;
-import com.sun.org.apache.xerces.internal.jaxp.datatype.XMLGregorianCalendarImpl;
-
/**
* The press agency client
*
@@ -55,7 +54,7 @@
pressRelease.setAgencyId("agency01");
pressRelease.setTitle(title);
pressRelease.setBody(body);
- pressRelease.setDate(new XMLGregorianCalendarImpl(new GregorianCalendar()));
+ pressRelease.setDate(XMLGregorianCalendarHelper.convert(new GregorianCalendar()));
endpoint.submitPressRelease(pressRelease);
}
Modified: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/news/Printer.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/news/Printer.java 2010-03-16 20:29:41 UTC (rev 11795)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/news/Printer.java 2010-03-17 10:28:48 UTC (rev 11796)
@@ -32,6 +32,7 @@
import javax.xml.ws.BindingProvider;
import javax.xml.ws.soap.SOAPBinding;
+import org.jboss.test.ws.jaxws.samples.dar.XMLGregorianCalendarHelper;
import org.jboss.test.ws.jaxws.samples.news.generated.printer.mtom.EditionMTOM;
import org.jboss.test.ws.jaxws.samples.news.generated.printer.mtom.NewspaperMTOMService;
import org.jboss.test.ws.jaxws.samples.news.generated.printer.mtom.NewspaperMTOMEndpoint;
@@ -39,8 +40,6 @@
import org.jboss.test.ws.jaxws.samples.news.generated.printer.swa.NewspaperSWAService;
import org.jboss.test.ws.jaxws.samples.news.generated.printer.swa.NewspaperSWAEndpoint;
-import com.sun.org.apache.xerces.internal.jaxp.datatype.XMLGregorianCalendarImpl;
-
/**
* The printer client
*
@@ -70,8 +69,8 @@
public void run() throws IOException
{
- XMLGregorianCalendar from = new XMLGregorianCalendarImpl(new GregorianCalendar(2008,1,10));
- XMLGregorianCalendar to = new XMLGregorianCalendarImpl(new GregorianCalendar(2008,1,14));
+ XMLGregorianCalendar from = XMLGregorianCalendarHelper.convert(new GregorianCalendar(2008,1,10));
+ XMLGregorianCalendar to = XMLGregorianCalendarHelper.convert(new GregorianCalendar(2008,1,14));
if (mtom)
{
((SOAPBinding)(((BindingProvider)mtomEndpoint).getBinding())).setMTOMEnabled(true);
Copied: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/news/XMLGregorianCalendarHelper.java (from rev 11540, stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/news/XMLGregorianCalendarHelper.java)
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/news/XMLGregorianCalendarHelper.java (rev 0)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/news/XMLGregorianCalendarHelper.java 2010-03-17 10:28:48 UTC (rev 11796)
@@ -0,0 +1,52 @@
+/*
+ * 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.jaxws.samples.news;
+
+import java.util.GregorianCalendar;
+
+import javax.xml.datatype.DatatypeFactory;
+import javax.xml.datatype.XMLGregorianCalendar;
+
+/**
+ * Helper class translating GregorianCalendar instances to XMLGregorianCalendar instances.
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+public final class XMLGregorianCalendarHelper
+{
+ private XMLGregorianCalendarHelper()
+ {
+ // forbidden inheritance
+ }
+
+ public static XMLGregorianCalendar convert(final GregorianCalendar cal)
+ {
+ try
+ {
+ return DatatypeFactory.newInstance().newXMLGregorianCalendar(cal);
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException(e);
+ }
+ }
+}
14 years, 3 months
JBossWS SVN: r11795 - framework/trunk/hudson/hudson-home/jobs/AS-TESTS-AS-6.0.1.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-03-16 16:29:41 -0400 (Tue, 16 Mar 2010)
New Revision: 11795
Modified:
framework/trunk/hudson/hudson-home/jobs/AS-TESTS-AS-6.0.1/config.xml
Log:
Also run tests-ws on hudson
Modified: framework/trunk/hudson/hudson-home/jobs/AS-TESTS-AS-6.0.1/config.xml
===================================================================
--- framework/trunk/hudson/hudson-home/jobs/AS-TESTS-AS-6.0.1/config.xml 2010-03-16 17:51:42 UTC (rev 11794)
+++ framework/trunk/hudson/hudson-home/jobs/AS-TESTS-AS-6.0.1/config.xml 2010-03-16 20:29:41 UTC (rev 11795)
@@ -55,7 +55,7 @@
#
# execute tests
#
-./build.sh -Dnode0=$JBOSS_BIND_ADDRESS init tests-webservice tests-report 2>&1 | tee $WORKSPACE/tests.log
+./build.sh -Dnode0=$JBOSS_BIND_ADDRESS init tests-webservice tests-ws tests-report 2>&1 | tee $WORKSPACE/tests.log
cat $WORKSPACE/tests.log | egrep FIXME\|FAILED | sort -u | tee $WORKSPACE/fixme.txt
cat $STACK_DIR/modules/testsuite/test-excludes-$JBOSS_TARGET.txt $WORKSPACE/fixme.txt | egrep "\[\S*]" > $WORKSPACE/errata-$JBOSS_TARGET.txt
14 years, 3 months
JBossWS SVN: r11794 - framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-03-16 13:51:42 -0400 (Tue, 16 Mar 2010)
New Revision: 11794
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSConsumerPlugin.java
Log:
All WSConsumerPlugin tests can now run in src dist with native stack
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSConsumerPlugin.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSConsumerPlugin.java 2010-03-16 17:36:32 UTC (rev 11793)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSConsumerPlugin.java 2010-03-16 17:51:42 UTC (rev 11794)
@@ -277,37 +277,30 @@
consumer.setTarget("2.1");
consumer.setNoCompile(false);
- //with Native stack, this test is run in binary distribution mode only because the way Maven builds classpath doesn't allow
- //to run the wsimport tool in Native stack from a Surefire test (the jaxws classes are of course loaded from the included
- //jaxws source module and that causes the Sun's ParallelWorldClassLoader to throw an exception as EndpointReference
- //is not loaded from a jar resource)
- if (!getIsNative() || Boolean.getBoolean("binary.distribution"))
+ consumeWSDL();
+ ClassLoader loader = getArtefactClassLoader();
+ Class<?> service = loader.loadClass("org.jboss.test.ws.tools.testTarget.TestService");
+
+ boolean featureSig = false;
+ for (Method m : service.getDeclaredMethods())
{
- consumeWSDL();
- ClassLoader loader = getArtefactClassLoader();
- Class<?> service = loader.loadClass("org.jboss.test.ws.tools.testTarget.TestService");
-
- boolean featureSig = false;
- for (Method m : service.getDeclaredMethods())
+ if (m.getName().equals("getEndpointInterfacePort"))
{
- if (m.getName().equals("getEndpointInterfacePort"))
+ for (Class<?> c : m.getParameterTypes())
{
- for (Class<?> c : m.getParameterTypes())
+ if (c.isArray() && c.getComponentType().equals(WebServiceFeature.class))
{
- if (c.isArray() && c.getComponentType().equals(WebServiceFeature.class))
- {
- featureSig = true;
- break;
- }
+ featureSig = true;
+ break;
}
}
}
-
- assertTrue("JAX-WS 2.1 extensions not generated with 'target=2.1'", featureSig);
-
- Class<?> sei = loader.loadClass("org.jboss.test.ws.tools.testTarget.EndpointInterface");
- assertTrue("@XmlSeeAlso expected on SEI (types not referenced by the Port in the wsdl)", sei.isAnnotationPresent(XmlSeeAlso.class));
}
+
+ assertTrue("JAX-WS 2.1 extensions not generated with 'target=2.1'", featureSig);
+
+ Class<?> sei = loader.loadClass("org.jboss.test.ws.tools.testTarget.EndpointInterface");
+ assertTrue("@XmlSeeAlso expected on SEI (types not referenced by the Port in the wsdl)", sei.isAnnotationPresent(XmlSeeAlso.class));
}
/**
14 years, 3 months