JBossWS SVN: r12354 - in stack/native/trunk/modules/core/src/main/java/org/jboss/ws: core/jaxws/spi and 3 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-05-27 06:24:59 -0400 (Thu, 27 May 2010)
New Revision: 12354
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/CommonBindingProvider.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSClientMetaDataBuilder.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Reader.java
Log:
[JBWS-3041] implemented support for EPR specified in WSDL
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/CommonBindingProvider.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/CommonBindingProvider.java 2010-05-27 10:19:44 UTC (rev 12353)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/CommonBindingProvider.java 2010-05-27 10:24:59 UTC (rev 12354)
@@ -129,18 +129,20 @@
{
throw new UnsupportedOperationException("Cannot get epr for BindingProvider instances using the XML/HTTP binding");
}
- W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder();
- if (epMetaData != null)
+ if (epMetaData == null)
+ throw new IllegalStateException("Cannot get endpoint reference info from endpoint metadata!");
+
+ if (epMetaData.getEndpointReference() != null)
{
- builder.address(epMetaData.getEndpointAddress());
- builder.serviceName(epMetaData.getServiceMetaData().getServiceName());
- builder.endpointName(epMetaData.getPortName());
- builder.wsdlDocumentLocation(epMetaData.getEndpointAddress() + "?wsdl");
+ return EndpointReferenceUtil.transform(clazz, epMetaData.getEndpointReference());
}
- else
- {
- log.warn("Cannot get endpoint reference info from endpoint metadata!");
- }
+
+ W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder();
+ builder.address(epMetaData.getEndpointAddress());
+ builder.serviceName(epMetaData.getServiceMetaData().getServiceName());
+ builder.endpointName(epMetaData.getPortName());
+ builder.wsdlDocumentLocation(epMetaData.getEndpointAddress() + "?wsdl");
+
return EndpointReferenceUtil.transform(clazz, builder.build());
}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java 2010-05-27 10:19:44 UTC (rev 12353)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java 2010-05-27 10:24:59 UTC (rev 12354)
@@ -235,7 +235,12 @@
}
}
- T port = (T)createProxy(seiClass, epMetaData);
+ T port = (T)createProxy(seiClass, epMetaData);
+ EndpointReference epr = epMetaData.getEndpointReference();
+ if (epr != null)
+ {
+ initAddressingProperties((BindingProvider)port, epr);
+ }
initWebserviceFeatures(port, epMetaData.getFeatures().getFeatures());
return port;
}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSClientMetaDataBuilder.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSClientMetaDataBuilder.java 2010-05-27 10:19:44 UTC (rev 12353)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSClientMetaDataBuilder.java 2010-05-27 10:24:59 UTC (rev 12354)
@@ -23,30 +23,32 @@
import java.io.IOException;
import java.net.URL;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
import javax.jws.soap.SOAPBinding;
import javax.xml.namespace.QName;
+import javax.xml.transform.dom.DOMSource;
import javax.xml.ws.BindingType;
+import javax.xml.ws.EndpointReference;
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
import org.jboss.ws.Constants;
import org.jboss.ws.WSException;
+import org.jboss.ws.annotation.EndpointConfig;
import org.jboss.ws.core.jaxws.client.ServiceObjectFactoryJAXWS;
-import org.jboss.ws.core.soap.Style;
import org.jboss.ws.extensions.policy.metadata.PolicyMetaDataBuilder;
import org.jboss.ws.extensions.wsrm.common.RMHelper;
import org.jboss.ws.metadata.umdm.ClientEndpointMetaData;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.metadata.umdm.OperationMetaData;
import org.jboss.ws.metadata.umdm.ServiceMetaData;
import org.jboss.ws.metadata.umdm.UnifiedMetaData;
import org.jboss.ws.metadata.umdm.EndpointMetaData.Type;
import org.jboss.ws.metadata.wsdl.WSDLBinding;
-import org.jboss.ws.metadata.wsdl.WSDLBindingOperation;
import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
import org.jboss.ws.metadata.wsdl.WSDLEndpoint;
-import org.jboss.ws.metadata.wsdl.WSDLInterface;
-import org.jboss.ws.metadata.wsdl.WSDLInterfaceOperation;
+import org.jboss.ws.metadata.wsdl.WSDLExtensibilityElement;
import org.jboss.ws.metadata.wsdl.WSDLService;
import org.jboss.ws.metadata.wsdl.WSDLUtils;
import org.jboss.ws.metadata.wsdl.xmlschema.JBossXSModel;
@@ -56,7 +58,7 @@
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedPortComponentRefMetaData;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedStubPropertyMetaData;
-import org.jboss.ws.annotation.EndpointConfig;
+import org.w3c.dom.Element;
/**
* A client side meta data builder.
@@ -71,7 +73,8 @@
return this.buildMetaData(serviceName, wsdlURL, vfsRoot, null);
}
- public ServiceMetaData buildMetaData(QName serviceName, URL wsdlURL, UnifiedVirtualFile vfsRoot, ClassLoader classLoader)
+ public ServiceMetaData buildMetaData(QName serviceName, URL wsdlURL, UnifiedVirtualFile vfsRoot,
+ ClassLoader classLoader)
{
if (wsdlURL == null)
throw new IllegalArgumentException("Invalid wsdlURL: " + wsdlURL);
@@ -80,7 +83,9 @@
log.debug("START buildMetaData: [service=" + serviceName + "]");
try
{
- UnifiedMetaData wsMetaData = classLoader != null ? new UnifiedMetaData(vfsRoot, classLoader) : new UnifiedMetaData(vfsRoot);
+ UnifiedMetaData wsMetaData = classLoader != null
+ ? new UnifiedMetaData(vfsRoot, classLoader)
+ : new UnifiedMetaData(vfsRoot);
ServiceMetaData serviceMetaData = new ServiceMetaData(wsMetaData, serviceName);
wsMetaData.addService(serviceMetaData);
@@ -90,13 +95,14 @@
buildMetaDataInternal(serviceMetaData, wsdlDefinitions);
- //Setup policies for each endpoint
+ //Setup policies and EPRs for each endpoint
for (EndpointMetaData epMetaData : serviceMetaData.getEndpoints())
{
PolicyMetaDataBuilder policyBuilder = PolicyMetaDataBuilder.getClientSidePolicyMetaDataBuilder();
policyBuilder.processPolicyExtensions(epMetaData, wsdlDefinitions);
+ processEPRs(epMetaData, wsdlDefinitions);
}
-
+
// Read the WSDL and initialize the schema model
// This should only be needed for debuging purposes of the UMDM
JBossXSModel schemaModel = WSDLUtils.getSchemaModel(wsdlDefinitions.getWsdlTypes());
@@ -116,6 +122,29 @@
}
}
+ private void processEPRs(EndpointMetaData endpointMD, WSDLDefinitions wsdlDefinitions)
+ {
+ WSDLService wsdlService = wsdlDefinitions.getService(endpointMD.getServiceMetaData().getServiceName());
+ if (wsdlService != null)
+ {
+ WSDLEndpoint wsdlEndpoint = wsdlService.getEndpoint(endpointMD.getPortName());
+ if (wsdlEndpoint != null)
+ {
+ List<WSDLExtensibilityElement> portEPRs = wsdlEndpoint.getExtensibilityElements(Constants.WSDL_ELEMENT_EPR);
+ if (portEPRs != null && portEPRs.size() != 0)
+ {
+ if (portEPRs.size() > 1)
+ throw new IllegalStateException("Only one EPR can be specified on port");
+
+ Element eprElement = portEPRs.get(0).getElement();
+ DOMSource eprInfoset = new DOMSource(eprElement);
+ EndpointReference epr = W3CEndpointReference.readFrom(eprInfoset);
+ endpointMD.setEndpointReference(epr);
+ }
+ }
+ }
+ }
+
/** Build from WSDL and service name
*/
public ServiceMetaData buildMetaData(QName serviceName, URL wsdlURL)
@@ -123,7 +152,8 @@
return buildMetaData(serviceName, wsdlURL, new ResourceLoaderAdapter());
}
- private void buildMetaDataInternal(ServiceMetaData serviceMetaData, WSDLDefinitions wsdlDefinitions) throws IOException
+ private void buildMetaDataInternal(ServiceMetaData serviceMetaData, WSDLDefinitions wsdlDefinitions)
+ throws IOException
{
QName serviceName = serviceMetaData.getServiceName();
@@ -146,7 +176,7 @@
List<QName> serviceNames = new ArrayList<QName>();
for (WSDLService wsdls : wsdlDefinitions.getServices())
serviceNames.add(wsdls.getName());
-
+
throw new IllegalArgumentException("Cannot obtain wsdl service: " + serviceName + " we have " + serviceNames);
}
@@ -161,7 +191,8 @@
{
QName portName = wsdlEndpoint.getName();
QName interfaceQName = wsdlEndpoint.getInterface().getName();
- ClientEndpointMetaData epMetaData = new ClientEndpointMetaData(serviceMetaData, portName, interfaceQName, Type.JAXWS);
+ ClientEndpointMetaData epMetaData = new ClientEndpointMetaData(serviceMetaData, portName, interfaceQName,
+ Type.JAXWS);
epMetaData.setEndpointAddress(wsdlEndpoint.getAddress());
serviceMetaData.addEndpoint(epMetaData);
@@ -188,9 +219,9 @@
{
UnifiedServiceRefMetaData serviceRefMetaData = ServiceObjectFactoryJAXWS.getServiceRefAssociation();
- if(serviceRefMetaData!=null)
+ if (serviceRefMetaData != null)
{
- for(UnifiedPortComponentRefMetaData portComp : serviceRefMetaData.getPortComponentRefs())
+ for (UnifiedPortComponentRefMetaData portComp : serviceRefMetaData.getPortComponentRefs())
{
epMetaData.getServiceRefContrib().add(portComp);
}
@@ -206,37 +237,37 @@
Iterator<UnifiedPortComponentRefMetaData> it = epMetaData.getServiceRefContrib().iterator();
- while(it.hasNext())
+ while (it.hasNext())
{
UnifiedPortComponentRefMetaData portComp = it.next();
- if(epMetaData.matches(portComp))
+ if (epMetaData.matches(portComp))
{
if (log.isDebugEnabled())
- log.debug("Processing service-ref contribution on portType: "+epMetaData.getPortTypeName());
+ log.debug("Processing service-ref contribution on portType: " + epMetaData.getPortTypeName());
// process MTOM overrides
- if(portComp.getEnableMTOM())
+ if (portComp.getEnableMTOM())
{
String bindingId = epMetaData.getBindingId();
- if(bindingId.equals(Constants.SOAP11HTTP_BINDING))
+ if (bindingId.equals(Constants.SOAP11HTTP_BINDING))
epMetaData.setBindingId(Constants.SOAP11HTTP_MTOM_BINDING);
- else if(bindingId.equals(Constants.SOAP12HTTP_BINDING))
+ else if (bindingId.equals(Constants.SOAP12HTTP_BINDING))
epMetaData.setBindingId(Constants.SOAP12HTTP_MTOM_BINDING);
}
// process stub properties
- for(UnifiedStubPropertyMetaData stubProp: portComp.getStubProperties())
+ for (UnifiedStubPropertyMetaData stubProp : portComp.getStubProperties())
{
- epMetaData.getProperties().put(stubProp.getPropName(), stubProp.getPropValue());
+ epMetaData.getProperties().put(stubProp.getPropName(), stubProp.getPropValue());
}
// process call properties
- for(UnifiedCallPropertyMetaData callProp: portComp.getCallProperties())
+ for (UnifiedCallPropertyMetaData callProp : portComp.getCallProperties())
{
epMetaData.getProperties().put(callProp.getPropName(), callProp.getPropValue());
}
-
+
}
}
@@ -245,7 +276,8 @@
public void rebuildEndpointMetaData(EndpointMetaData epMetaData, Class<?> wsClass)
{
- if(log.isDebugEnabled()) log.debug("START: rebuildMetaData");
+ if (log.isDebugEnabled())
+ log.debug("START: rebuildMetaData");
// Clear the java types, etc.
resetMetaDataBuilder(epMetaData.getClassLoader());
@@ -267,7 +299,7 @@
// Process @WebMethod
processWebMethods(epMetaData, wsClass);
-
+
processXmlSeeAlso(wsClass);
// Initialize types
@@ -290,7 +322,8 @@
RMHelper.setupRMOperations(epMetaData);
}
- if(log.isDebugEnabled()) log.debug("END: rebuildMetaData\n" + epMetaData.getServiceMetaData());
+ if (log.isDebugEnabled())
+ log.debug("END: rebuildMetaData\n" + epMetaData.getServiceMetaData());
}
/**
@@ -299,7 +332,7 @@
* @param wsClass - the service endpoint interface
*/
private void processEndpointConfig(EndpointMetaData epMetaData, Class<?> wsClass)
- {
+ {
if (wsClass.isAnnotationPresent(EndpointConfig.class))
{
EndpointConfig anConfig = wsClass.getAnnotation(EndpointConfig.class);
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java 2010-05-27 10:19:44 UTC (rev 12353)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java 2010-05-27 10:24:59 UTC (rev 12354)
@@ -43,6 +43,7 @@
import javax.xml.bind.annotation.XmlElementDecl;
import javax.xml.namespace.QName;
import javax.xml.rpc.ParameterMode;
+import javax.xml.ws.EndpointReference;
import javax.xml.ws.WebServiceFeature;
import javax.xml.ws.Service.Mode;
@@ -147,6 +148,8 @@
private FeatureSet features = new FeatureSet();
// The documentation edfined through the @Documentation annotation
private String documentation;
+
+ private EndpointReference epr;
private ConfigObservable configObservable = new ConfigObservable();
@@ -182,6 +185,16 @@
this.portName = portName;
}
+ public EndpointReference getEndpointReference()
+ {
+ return epr;
+ }
+
+ public void setEndpointReference(final EndpointReference epr)
+ {
+ this.epr = epr;
+ }
+
public QName getPortTypeName()
{
return portTypeName;
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Reader.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Reader.java 2010-05-27 10:19:44 UTC (rev 12353)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Reader.java 2010-05-27 10:24:59 UTC (rev 12354)
@@ -319,7 +319,7 @@
UnknownExtensibilityElement uee = (UnknownExtensibilityElement)extElement;
boolean understood = false;
understood = understood || processPolicyElements(uee, dest);
- understood = understood || processUseAddressing(uee, dest);
+ understood = understood || processEPR(uee, dest);
//add processing of further extensibility element types below
if (!understood)
@@ -378,10 +378,25 @@
* @param dest
* @return
*/
- private boolean processUseAddressing(UnknownExtensibilityElement extElement, Extendable dest)
+ private boolean processEPR(UnknownExtensibilityElement extElement, Extendable dest)
{
- log.warn("UsingAddressing extensibility element not supported yet.");
- return false;
+ final Element srcElement = extElement.getElement();
+ final boolean isWSANamespace = AddressingConstants.Core.NS.equals(srcElement.getNamespaceURI());
+ final boolean isEPRLocalName = AddressingConstants.Core.Elements.ENDPOINTREFERENCE.equals(srcElement.getLocalName());
+ boolean result = false;
+
+ if (isWSANamespace && isEPRLocalName)
+ {
+ Element element = (Element) srcElement.cloneNode(true);
+ copyMissingNamespaceDeclarations(element, srcElement);
+
+ WSDLExtensibilityElement el = new WSDLExtensibilityElement(Constants.WSDL_ELEMENT_EPR, element);
+ el.setRequired(true);
+ dest.addExtensibilityElement(el);
+ result = true;
+ }
+
+ return result;
}
private void processNotUnderstoodExtesibilityElement(UnknownExtensibilityElement extElement, Extendable dest)
15 years, 11 months
JBossWS SVN: r12353 - in framework/trunk/testsuite/test: java/org/jboss/test/ws/jaxws and 6 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-05-27 06:19:44 -0400 (Thu, 27 May 2010)
New Revision: 12353
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/DataType.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/EPRInWsdlTestService.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/JBWS3041TestCase.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/ObjectFactory.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/Test1.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/package-info.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/DataType.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/EPRInWsdlTestService.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/EPRInWsdlTestService_handler.xml
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/ObjectFactory.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/ServerSOAPHandler.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/Test1.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/Test1_handler.xml
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/TestImpl1.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/package-info.java
framework/trunk/testsuite/test/resources/jaxws/jbws3041/
framework/trunk/testsuite/test/resources/jaxws/jbws3041/WEB-INF/
framework/trunk/testsuite/test/resources/jaxws/jbws3041/WEB-INF/jboss-web.xml
framework/trunk/testsuite/test/resources/jaxws/jbws3041/WEB-INF/web.xml
framework/trunk/testsuite/test/resources/jaxws/jbws3041/WEB-INF/wsdl/
framework/trunk/testsuite/test/resources/jaxws/jbws3041/WEB-INF/wsdl/EPRInWsdlTestService.wsdl
framework/trunk/testsuite/test/resources/jaxws/jbws3041/custom-client.xml
framework/trunk/testsuite/test/resources/jaxws/jbws3041/custom-server.xml
Modified:
framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml
Log:
[JBWS-3041] providing EPR in WSDL test case
Modified: framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml
===================================================================
--- framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml 2010-05-27 10:18:36 UTC (rev 12352)
+++ framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml 2010-05-27 10:19:44 UTC (rev 12353)
@@ -977,6 +977,19 @@
</webinf>
</war>
+ <!-- jaxws-jbws3041 -->
+ <war warfile="${tests.output.dir}/test-libs/jaxws-jbws3041.war" webxml="${tests.output.dir}/test-resources/jaxws/jbws3041/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/jbws3041/service/*.class"/>
+ <include name="org/jboss/test/ws/jaxws/jbws3041/service/*.xml" />
+ <include name="org/jboss/test/ws/jaxws/common/*.class"/>
+ </classes>
+ <webinf dir="${tests.output.dir}/test-resources/jaxws/jbws3041/WEB-INF">
+ <include name="wsdl/**" />
+ <include name="jboss-web.xml"/>
+ </webinf>
+ </war>
+
<!-- jaxws namespace -->
<war warfile="${tests.output.dir}/test-libs/jaxws-namespace.war" webxml="${tests.output.dir}/test-resources/jaxws/namespace/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/test-classes">
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/DataType.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/DataType.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/DataType.java 2010-05-27 10:19:44 UTC (rev 12353)
@@ -0,0 +1,83 @@
+/*
+ * 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.jbws3041;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * <p>Java class for DataType complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="DataType">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="param" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "DataType", propOrder =
+{"param"})
+public class DataType
+{
+
+ @XmlElement(required = true)
+ protected String param;
+
+ /**
+ * Gets the value of the param property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getParam()
+ {
+ return param;
+ }
+
+ /**
+ * Sets the value of the param property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setParam(String value)
+ {
+ this.param = value;
+ }
+
+}
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/EPRInWsdlTestService.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/EPRInWsdlTestService.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/EPRInWsdlTestService.java 2010-05-27 10:19:44 UTC (rev 12353)
@@ -0,0 +1,131 @@
+/*
+ * 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.jbws3041;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebEndpoint;
+import javax.xml.ws.WebServiceClient;
+import javax.xml.ws.WebServiceException;
+import javax.xml.ws.WebServiceFeature;
+
+/**
+ * This class was generated by the JAX-WS RI.
+ * JAX-WS RI 2.2-12/14/2009 02:16 PM(ramkris)-
+ * Generated source version: 2.2
+ *
+ */
+@WebServiceClient(name = "EPRInWsdlTestService", targetNamespace = "http://eprinwsdltestservice.org/wsdl", wsdlLocation = "file:/opt/svn/jbossas/tags/6.0.0.20100429-M3/build/target/jboss-6.0.0.20100429-M3/bin/EPRInWsdlTestService.wsdl")
+public class EPRInWsdlTestService extends Service
+{
+
+ private final static URL EPRINWSDLTESTSERVICE_WSDL_LOCATION;
+
+ private final static WebServiceException EPRINWSDLTESTSERVICE_EXCEPTION;
+
+ private final static QName EPRINWSDLTESTSERVICE_QNAME = new QName("http://eprinwsdltestservice.org/wsdl",
+ "EPRInWsdlTestService");
+
+ static
+ {
+ URL url = null;
+ WebServiceException e = null;
+ try
+ {
+ url = new URL(
+ "file:/opt/svn/jbossas/tags/6.0.0.20100429-M3/build/target/jboss-6.0.0.20100429-M3/bin/EPRInWsdlTestService.wsdl");
+ }
+ catch (MalformedURLException ex)
+ {
+ e = new WebServiceException(ex);
+ }
+ EPRINWSDLTESTSERVICE_WSDL_LOCATION = url;
+ EPRINWSDLTESTSERVICE_EXCEPTION = e;
+ }
+
+ public EPRInWsdlTestService()
+ {
+ super(__getWsdlLocation(), EPRINWSDLTESTSERVICE_QNAME);
+ }
+
+ public EPRInWsdlTestService(WebServiceFeature... features)
+ {
+ super(__getWsdlLocation(), EPRINWSDLTESTSERVICE_QNAME, features);
+ }
+
+ public EPRInWsdlTestService(URL wsdlLocation)
+ {
+ super(wsdlLocation, EPRINWSDLTESTSERVICE_QNAME);
+ }
+
+ public EPRInWsdlTestService(URL wsdlLocation, WebServiceFeature... features)
+ {
+ super(wsdlLocation, EPRINWSDLTESTSERVICE_QNAME, features);
+ }
+
+ public EPRInWsdlTestService(URL wsdlLocation, QName serviceName)
+ {
+ super(wsdlLocation, serviceName);
+ }
+
+ public EPRInWsdlTestService(URL wsdlLocation, QName serviceName, WebServiceFeature... features)
+ {
+ super(wsdlLocation, serviceName, features);
+ }
+
+ /**
+ *
+ * @return
+ * returns Test1
+ */
+ @WebEndpoint(name = "Test1Port")
+ public Test1 getTest1Port()
+ {
+ return super.getPort(new QName("http://eprinwsdltestservice.org/wsdl", "Test1Port"), Test1.class);
+ }
+
+ /**
+ *
+ * @param features
+ * A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy. Supported features not in the <code>features</code> parameter will have their default values.
+ * @return
+ * returns Test1
+ */
+ @WebEndpoint(name = "Test1Port")
+ public Test1 getTest1Port(WebServiceFeature... features)
+ {
+ return super.getPort(new QName("http://eprinwsdltestservice.org/wsdl", "Test1Port"), Test1.class, features);
+ }
+
+ private static URL __getWsdlLocation()
+ {
+ if (EPRINWSDLTESTSERVICE_EXCEPTION != null)
+ {
+ throw EPRINWSDLTESTSERVICE_EXCEPTION;
+ }
+ return EPRINWSDLTESTSERVICE_WSDL_LOCATION;
+ }
+
+}
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/JBWS3041TestCase.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/JBWS3041TestCase.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/JBWS3041TestCase.java 2010-05-27 10:19:44 UTC (rev 12353)
@@ -0,0 +1,146 @@
+/*
+ * 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.jbws3041;
+
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.transform.dom.DOMResult;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.EndpointReference;
+import javax.xml.ws.Holder;
+import javax.xml.ws.WebServiceFeature;
+import javax.xml.ws.soap.AddressingFeature;
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+
+import junit.framework.Test;
+
+import org.jboss.wsf.common.DOMUtils;
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+/**
+ * [JBWS-3041] support for EPRs specified in WSDL.
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+public class JBWS3041TestCase extends JBossWSTest
+{
+
+ private static final WebServiceFeature[] ADDRESSING_ENABLED = { new AddressingFeature(true) };
+ private EPRInWsdlTestService service;
+ private W3CEndpointReference epr;
+ private Test1 port;
+
+ public static Test suite()
+ {
+ return new JBossWSTestSetup(JBWS3041TestCase.class, "jaxws-jbws3041.war");
+ }
+
+ public void setUp() throws Exception
+ {
+ if (this.port == null)
+ {
+ URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-jbws3041/Endpoint?wsdl");
+ this.service = new EPRInWsdlTestService(wsdlURL);
+ this.port = (Test1) this.service.getPort(Test1.class, ADDRESSING_ENABLED);
+ final BindingProvider bp = (BindingProvider) this.port;
+ this.epr = (W3CEndpointReference) bp.getEndpointReference();
+ }
+ }
+
+ public void testGetEPRAndVerifyMetaDataAndRefParamsTest1() throws Exception
+ {
+ final Holder<DataType> holder = this.newHolder("GetEPRAndVerifyMetaDataAndRefParamsTest1");
+
+ this.port.testOperation(holder);
+ }
+
+ public void testGetPortAndVerifyRefParamsAreSentTest1() throws Exception
+ {
+ final Holder<DataType> holder = this.newHolder("GetPortAndVerifyRefParamsAreSentTest1");
+ final Test1 testPort = (Test1) this.service.getPort(Test1.class, ADDRESSING_ENABLED);
+
+ testPort.testOperation(holder);
+ }
+
+ public void testGetPortAndVerifyRefParamsAreSentTest2() throws Exception
+ {
+ final Holder<DataType> holder = this.newHolder("GetPortAndVerifyRefParamsAreSentTest2");
+ final Test1 testPort = (Test1) this.service.getPort(this.epr, Test1.class, ADDRESSING_ENABLED);
+
+ testPort.testOperation(holder);
+ }
+
+ public void testGetPortAndVerifyModifiedRefParamsAreSentTest3() throws Exception
+ {
+ final Holder<DataType> holder = this.newHolder("GetPortAndVerifyModifiedRefParamsAreSentTest3");
+ final W3CEndpointReference epr = this.newModifiedEPR();
+ final Test1 testPort = (Test1) this.service.getPort(epr, Test1.class, ADDRESSING_ENABLED);
+
+ testPort.testOperation(holder);
+ }
+
+ private W3CEndpointReference newModifiedEPR()
+ {
+ final DOMResult temp = new DOMResult();
+ this.epr.writeTo(temp);
+ final Node eprElement = temp.getNode();
+ this.changeNodeValue(eprElement, new QName("http://eprinwsdltestservice.org/myns1", "MyParam1"), "MyValue1");
+ this.changeNodeValue(eprElement, new QName("http://eprinwsdltestservice.org/myns2", "MyParam2"), "MyValue2");
+
+ return (W3CEndpointReference) EndpointReference.readFrom(new DOMSource(eprElement));
+ }
+
+ private Holder<DataType> newHolder(final String param)
+ {
+ final DataType datatype = new DataType();
+ datatype.setParam(param);
+ final Holder<DataType> data = new Holder<DataType>();
+ data.value = datatype;
+
+ return data;
+ }
+
+ private void changeNodeValue(Node eprElement, QName paramQName, String newValue)
+ {
+ final Element paramElement = DOMUtils.getFirstChildElement(eprElement, paramQName, true);
+
+ if (paramElement != null)
+ {
+ NodeList nl = paramElement.getChildNodes();
+ for (int i = 0; i < nl.getLength(); i++)
+ {
+ Node node = nl.item(i);
+ if (node.getNodeType() == Node.TEXT_NODE)
+ {
+ node.setNodeValue(newValue);
+ break;
+ }
+ }
+ }
+ }
+}
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/ObjectFactory.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/ObjectFactory.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/ObjectFactory.java 2010-05-27 10:19:44 UTC (rev 12353)
@@ -0,0 +1,76 @@
+/*
+ * 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.jbws3041;
+
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.annotation.XmlElementDecl;
+import javax.xml.bind.annotation.XmlRegistry;
+import javax.xml.namespace.QName;
+
+/**
+ * This object contains factory methods for each
+ * Java content interface and Java element interface
+ * generated in the org.jboss.test.ws.jaxws.jbws3041 package.
+ * <p>An ObjectFactory allows you to programatically
+ * construct new instances of the Java representation
+ * for XML content. The Java representation of XML
+ * content can consist of schema derived interfaces
+ * and classes representing the binding of schema
+ * type definitions, element declarations and model
+ * groups. Factory methods for each of these are
+ * provided in this class.
+ *
+ */
+@XmlRegistry
+public class ObjectFactory
+{
+
+ private final static QName _DataType_QNAME = new QName("http://eprinwsdltestservice.org/xsd", "DataType");
+
+ /**
+ * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.jboss.test.ws.jaxws.jbws3041
+ *
+ */
+ public ObjectFactory()
+ {
+ }
+
+ /**
+ * Create an instance of {@link DataType }
+ *
+ */
+ public DataType createDataType()
+ {
+ return new DataType();
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link DataType }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://eprinwsdltestservice.org/xsd", name = "DataType")
+ public JAXBElement<DataType> createDataType(DataType value)
+ {
+ return new JAXBElement<DataType>(_DataType_QNAME, DataType.class, null, value);
+ }
+
+}
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/Test1.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/Test1.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/Test1.java 2010-05-27 10:19:44 UTC (rev 12353)
@@ -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.jbws3041;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import javax.xml.bind.annotation.XmlSeeAlso;
+import javax.xml.ws.Holder;
+
+/**
+ * This class was generated by the JAX-WS RI.
+ * JAX-WS RI 2.2-12/14/2009 02:16 PM(ramkris)-
+ * Generated source version: 2.2
+ *
+ */
+@WebService(name = "Test1", targetNamespace = "http://eprinwsdltestservice.org/wsdl")
+@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
+@XmlSeeAlso(
+{ObjectFactory.class})
+public interface Test1
+{
+
+ /**
+ *
+ * @param data
+ */
+ @WebMethod(operationName = "TestOperation")
+ public void testOperation(
+ @WebParam(name = "DataType", targetNamespace = "http://eprinwsdltestservice.org/xsd", mode = WebParam.Mode.INOUT, partName = "data") Holder<DataType> data);
+
+}
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/package-info.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/package-info.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/package-info.java 2010-05-27 10:19:44 UTC (rev 12353)
@@ -0,0 +1,24 @@
+/*
+ * 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.
+ */
+(a)javax.xml.bind.annotation.XmlSchema(namespace = "http://eprinwsdltestservice.org/xsd", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
+package org.jboss.test.ws.jaxws.jbws3041;
+
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/DataType.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/DataType.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/DataType.java 2010-05-27 10:19:44 UTC (rev 12353)
@@ -0,0 +1,83 @@
+/*
+ * 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.jbws3041.service;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * <p>Java class for DataType complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="DataType">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="param" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "DataType", propOrder =
+{"param"})
+public class DataType
+{
+
+ @XmlElement(required = true)
+ protected String param;
+
+ /**
+ * Gets the value of the param property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getParam()
+ {
+ return param;
+ }
+
+ /**
+ * Sets the value of the param property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setParam(String value)
+ {
+ this.param = value;
+ }
+
+}
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/EPRInWsdlTestService.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/EPRInWsdlTestService.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/EPRInWsdlTestService.java 2010-05-27 10:19:44 UTC (rev 12353)
@@ -0,0 +1,133 @@
+/*
+ * 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.jbws3041.service;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import javax.jws.HandlerChain;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebEndpoint;
+import javax.xml.ws.WebServiceClient;
+import javax.xml.ws.WebServiceException;
+import javax.xml.ws.WebServiceFeature;
+
+/**
+ * This class was generated by the JAX-WS RI.
+ * JAX-WS RI 2.2-12/14/2009 02:16 PM(ramkris)-
+ * Generated source version: 2.2
+ *
+ */
+@WebServiceClient(name = "EPRInWsdlTestService", targetNamespace = "http://eprinwsdltestservice.org/wsdl", wsdlLocation = "file:/opt/svn/jbossas/tags/6.0.0.20100429-M3/build/target/jboss-6.0.0.20100429-M3/bin/EPRInWsdlTestService.wsdl")
+@HandlerChain(file = "EPRInWsdlTestService_handler.xml")
+public class EPRInWsdlTestService extends Service
+{
+
+ private final static URL EPRINWSDLTESTSERVICE_WSDL_LOCATION;
+
+ private final static WebServiceException EPRINWSDLTESTSERVICE_EXCEPTION;
+
+ private final static QName EPRINWSDLTESTSERVICE_QNAME = new QName("http://eprinwsdltestservice.org/wsdl",
+ "EPRInWsdlTestService");
+
+ static
+ {
+ URL url = null;
+ WebServiceException e = null;
+ try
+ {
+ url = new URL(
+ "file:/opt/svn/jbossas/tags/6.0.0.20100429-M3/build/target/jboss-6.0.0.20100429-M3/bin/EPRInWsdlTestService.wsdl");
+ }
+ catch (MalformedURLException ex)
+ {
+ e = new WebServiceException(ex);
+ }
+ EPRINWSDLTESTSERVICE_WSDL_LOCATION = url;
+ EPRINWSDLTESTSERVICE_EXCEPTION = e;
+ }
+
+ public EPRInWsdlTestService()
+ {
+ super(__getWsdlLocation(), EPRINWSDLTESTSERVICE_QNAME);
+ }
+
+ public EPRInWsdlTestService(WebServiceFeature... features)
+ {
+ super(__getWsdlLocation(), EPRINWSDLTESTSERVICE_QNAME, features);
+ }
+
+ public EPRInWsdlTestService(URL wsdlLocation)
+ {
+ super(wsdlLocation, EPRINWSDLTESTSERVICE_QNAME);
+ }
+
+ public EPRInWsdlTestService(URL wsdlLocation, WebServiceFeature... features)
+ {
+ super(wsdlLocation, EPRINWSDLTESTSERVICE_QNAME, features);
+ }
+
+ public EPRInWsdlTestService(URL wsdlLocation, QName serviceName)
+ {
+ super(wsdlLocation, serviceName);
+ }
+
+ public EPRInWsdlTestService(URL wsdlLocation, QName serviceName, WebServiceFeature... features)
+ {
+ super(wsdlLocation, serviceName, features);
+ }
+
+ /**
+ *
+ * @return
+ * returns Test1
+ */
+ @WebEndpoint(name = "Test1Port")
+ public Test1 getTest1Port()
+ {
+ return super.getPort(new QName("http://eprinwsdltestservice.org/wsdl", "Test1Port"), Test1.class);
+ }
+
+ /**
+ *
+ * @param features
+ * A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy. Supported features not in the <code>features</code> parameter will have their default values.
+ * @return
+ * returns Test1
+ */
+ @WebEndpoint(name = "Test1Port")
+ public Test1 getTest1Port(WebServiceFeature... features)
+ {
+ return super.getPort(new QName("http://eprinwsdltestservice.org/wsdl", "Test1Port"), Test1.class, features);
+ }
+
+ private static URL __getWsdlLocation()
+ {
+ if (EPRINWSDLTESTSERVICE_EXCEPTION != null)
+ {
+ throw EPRINWSDLTESTSERVICE_EXCEPTION;
+ }
+ return EPRINWSDLTESTSERVICE_WSDL_LOCATION;
+ }
+
+}
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/EPRInWsdlTestService_handler.xml
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/EPRInWsdlTestService_handler.xml (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/EPRInWsdlTestService_handler.xml 2010-05-27 10:19:44 UTC (rev 12353)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?><handler-chains xmlns="http://java.sun.com/xml/ns/javaee">
+ <handler-chain>
+ <handler>
+ <handler-name>ServerSOAPHandler</handler-name>
+ <handler-class>org.jboss.test.ws.jaxws.jbws3041.service.ServerSOAPHandler</handler-class>
+ </handler>
+ </handler-chain>
+</handler-chains>
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/ObjectFactory.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/ObjectFactory.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/ObjectFactory.java 2010-05-27 10:19:44 UTC (rev 12353)
@@ -0,0 +1,76 @@
+/*
+ * 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.jbws3041.service;
+
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.annotation.XmlElementDecl;
+import javax.xml.bind.annotation.XmlRegistry;
+import javax.xml.namespace.QName;
+
+/**
+ * This object contains factory methods for each
+ * Java content interface and Java element interface
+ * generated in the org.jboss.test.ws.jaxws.jbws3041.service package.
+ * <p>An ObjectFactory allows you to programatically
+ * construct new instances of the Java representation
+ * for XML content. The Java representation of XML
+ * content can consist of schema derived interfaces
+ * and classes representing the binding of schema
+ * type definitions, element declarations and model
+ * groups. Factory methods for each of these are
+ * provided in this class.
+ *
+ */
+@XmlRegistry
+public class ObjectFactory
+{
+
+ private final static QName _DataType_QNAME = new QName("http://eprinwsdltestservice.org/xsd", "DataType");
+
+ /**
+ * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.jboss.test.ws.jaxws.jbws3041.service
+ *
+ */
+ public ObjectFactory()
+ {
+ }
+
+ /**
+ * Create an instance of {@link DataType }
+ *
+ */
+ public DataType createDataType()
+ {
+ return new DataType();
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link DataType }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://eprinwsdltestservice.org/xsd", name = "DataType")
+ public JAXBElement<DataType> createDataType(DataType value)
+ {
+ return new JAXBElement<DataType>(_DataType_QNAME, DataType.class, null, value);
+ }
+
+}
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/ServerSOAPHandler.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/ServerSOAPHandler.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/ServerSOAPHandler.java 2010-05-27 10:19:44 UTC (rev 12353)
@@ -0,0 +1,112 @@
+/*
+ * 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.jbws3041.service;
+
+import java.util.List;
+
+import javax.xml.soap.SOAPMessage;
+import javax.xml.ws.handler.MessageContext;
+import javax.xml.ws.handler.soap.SOAPMessageContext;
+
+import org.jboss.test.ws.jaxws.common.Handler_Util;
+import org.jboss.test.ws.jaxws.common.JAXWS_Util;
+import org.jboss.wsf.common.DOMUtils;
+import org.jboss.wsf.common.handler.GenericSOAPHandler;
+import org.w3c.dom.Element;
+
+@SuppressWarnings("unchecked")
+public class ServerSOAPHandler extends GenericSOAPHandler
+{
+
+ public boolean handleInbound(MessageContext context)
+ {
+ SOAPMessage msg = ((SOAPMessageContext) context).getMessage();
+ JAXWS_Util.dumpSOAPMessage(msg, true);
+ JAXWS_Util.dumpSOAPMessage(msg, false);
+
+ if (Handler_Util.checkForMsg(context, "GetEPRAndVerifyMetaDataAndRefParamsTest1")
+ || Handler_Util.checkForMsg(context, "GetPortAndVerifyRefParamsAreSentTest1")
+ || Handler_Util.checkForMsg(context, "GetPortAndVerifyRefParamsAreSentTest2")
+ || Handler_Util.checkForMsg(context, "GetPortAndVerifyModifiedRefParamsAreSentTest3"))
+ {
+ List<Element> rp = (List<Element>) context.get(MessageContext.REFERENCE_PARAMETERS);
+ boolean result1 = false;
+ boolean result2 = false;
+ if (Handler_Util.checkForMsg(context, "GetPortAndVerifyModifiedRefParamsAreSentTest3"))
+ {
+ result1 = assertReferenceParameter(rp, "MyParam1", "MyValue1");
+ result2 = assertReferenceParameter(rp, "MyParam2", "MyValue2");
+ }
+ else
+ {
+ result1 = assertReferenceParameter(rp, "MyParam1", "Hello");
+ result2 = assertReferenceParameter(rp, "MyParam2", "There");
+ }
+
+ if ((!result1) && (!result2))
+ {
+ throw new RuntimeException(
+ "Reference Parameter MyParam1 and MyParam2 were either not found or their values were wrong");
+ }
+ else if (!result1)
+ {
+ throw new RuntimeException("Reference Parameter MyParam1 was not found or it's value was wrong");
+ }
+ else if (!result2)
+ {
+ throw new RuntimeException("Reference Parameter MyParam2 was not found or it's value was wrong");
+ }
+ }
+
+ return true;
+ }
+
+ private boolean assertReferenceParameter(final List<Element> refParams, final String paramName,
+ final String expectedValue)
+ {
+ System.out.println("Searching for Reference Parameter '" + paramName + "' with value '" + expectedValue + "'");
+
+ for (int i = 0; i < refParams.size(); i++)
+ {
+ final Element paramElement = (Element) refParams.get(i);
+ boolean found = this.assertReferenceParameterValue(paramElement, paramName, expectedValue);
+ if (found)
+ {
+ System.out.println("Found Reference Parameter '" + paramName + "' with value '" + expectedValue + "'");
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ private boolean assertReferenceParameterValue(final Element paramElement, final String refParamName,
+ final String expectedValue)
+ {
+ if (!paramElement.getLocalName().equals(refParamName))
+ return false;
+
+ final String actualValue = DOMUtils.getTextContent(paramElement);
+
+ return expectedValue.equals(actualValue);
+ }
+}
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/Test1.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/Test1.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/Test1.java 2010-05-27 10:19:44 UTC (rev 12353)
@@ -0,0 +1,54 @@
+/*
+ * 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.jbws3041.service;
+
+import javax.jws.HandlerChain;
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import javax.xml.bind.annotation.XmlSeeAlso;
+import javax.xml.ws.Holder;
+
+/**
+ * This class was generated by the JAX-WS RI.
+ * JAX-WS RI 2.2-12/14/2009 02:16 PM(ramkris)-
+ * Generated source version: 2.2
+ *
+ */
+@WebService(name = "Test1", targetNamespace = "http://eprinwsdltestservice.org/wsdl")
+@HandlerChain(file = "Test1_handler.xml")
+@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
+@XmlSeeAlso(
+{ObjectFactory.class})
+public interface Test1
+{
+
+ /**
+ *
+ * @param data
+ */
+ @WebMethod(operationName = "TestOperation")
+ public void testOperation(
+ @WebParam(name = "DataType", targetNamespace = "http://eprinwsdltestservice.org/xsd", mode = WebParam.Mode.INOUT, partName = "data") Holder<DataType> data);
+
+}
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/Test1_handler.xml
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/Test1_handler.xml (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/Test1_handler.xml 2010-05-27 10:19:44 UTC (rev 12353)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?><handler-chains xmlns="http://java.sun.com/xml/ns/javaee">
+ <handler-chain>
+ <handler>
+ <handler-name>ServerSOAPHandler</handler-name>
+ <handler-class>org.jboss.test.ws.jaxws.jbws3041.service.ServerSOAPHandler</handler-class>
+ </handler>
+ </handler-chain>
+</handler-chains>
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/TestImpl1.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/TestImpl1.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/TestImpl1.java 2010-05-27 10:19:44 UTC (rev 12353)
@@ -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.jaxws.jbws3041.service;
+
+import javax.jws.WebService;
+import javax.xml.ws.BindingType;
+import javax.xml.ws.Holder;
+import javax.xml.ws.soap.Addressing;
+import javax.xml.ws.soap.SOAPBinding;
+
+@WebService(portName = "Test1Port", serviceName = "EPRInWsdlTestService", targetNamespace = "http://eprinwsdltestservice.org/wsdl", wsdlLocation = "WEB-INF/wsdl/EPRInWsdlTestService.wsdl", endpointInterface = "org.jboss.test.ws.jaxws.jbws3041.service.Test1")
+@BindingType(value = SOAPBinding.SOAP11HTTP_BINDING)
+@Addressing(enabled = true, required = false)
+public class TestImpl1 implements Test1
+{
+
+ public void testOperation(Holder<DataType> data)
+ {
+ System.out.println("Test operation invoked");
+ }
+}
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/package-info.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/package-info.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3041/service/package-info.java 2010-05-27 10:19:44 UTC (rev 12353)
@@ -0,0 +1,24 @@
+/*
+ * 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.
+ */
+(a)javax.xml.bind.annotation.XmlSchema(namespace = "http://eprinwsdltestservice.org/xsd", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
+package org.jboss.test.ws.jaxws.jbws3041.service;
+
Added: framework/trunk/testsuite/test/resources/jaxws/jbws3041/WEB-INF/jboss-web.xml
===================================================================
--- framework/trunk/testsuite/test/resources/jaxws/jbws3041/WEB-INF/jboss-web.xml (rev 0)
+++ framework/trunk/testsuite/test/resources/jaxws/jbws3041/WEB-INF/jboss-web.xml 2010-05-27 10:19:44 UTC (rev 12353)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.4//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">
+
+<jboss-web>
+ <context-root>/jaxws-jbws3041</context-root>
+</jboss-web>
\ No newline at end of file
Added: framework/trunk/testsuite/test/resources/jaxws/jbws3041/WEB-INF/web.xml
===================================================================
--- framework/trunk/testsuite/test/resources/jaxws/jbws3041/WEB-INF/web.xml (rev 0)
+++ framework/trunk/testsuite/test/resources/jaxws/jbws3041/WEB-INF/web.xml 2010-05-27 10:19:44 UTC (rev 12353)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+
+ <servlet>
+ <servlet-name>Endpoint</servlet-name>
+ <servlet-class>org.jboss.test.ws.jaxws.jbws3041.service.TestImpl1</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Endpoint</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+
+</web-app>
\ No newline at end of file
Added: framework/trunk/testsuite/test/resources/jaxws/jbws3041/WEB-INF/wsdl/EPRInWsdlTestService.wsdl
===================================================================
--- framework/trunk/testsuite/test/resources/jaxws/jbws3041/WEB-INF/wsdl/EPRInWsdlTestService.wsdl (rev 0)
+++ framework/trunk/testsuite/test/resources/jaxws/jbws3041/WEB-INF/wsdl/EPRInWsdlTestService.wsdl 2010-05-27 10:19:44 UTC (rev 12353)
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<definitions
+ name="EPRInWsdlTestService"
+ targetNamespace="http://eprinwsdltestservice.org/wsdl"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:tns="http://eprinwsdltestservice.org/wsdl"
+ xmlns:s="http://eprinwsdltestservice.org/xsd"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:wsp="http://www.w3.org/ns/ws-policy"
+ xmlns:wsa="http://www.w3.org/2005/08/addressing"
+ xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata">
+
+ <types>
+ <schema xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://eprinwsdltestservice.org/xsd"
+ xmlns:xmime="http://www.w3.org/2005/05/xmlmime"
+ elementFormDefault="qualified">
+
+ <complexType name="DataType">
+ <sequence>
+ <element name="param" type="string"/>
+ </sequence>
+ </complexType>
+ <element name="DataType" type="s:DataType"/>
+ </schema>
+ </types>
+ <message name="Request">
+ <part name="data" element="s:DataType"/>
+ </message>
+ <message name="Response">
+ <part name="data" element="s:DataType"/>
+ </message>
+
+ <portType name="Test1">
+ <operation name="TestOperation">
+ <input message="tns:Request" />
+ <output message="tns:Response" />
+ </operation>
+ </portType>
+
+ <binding name="Test1Binding" type="tns:Test1">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="TestOperation">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+
+ <service name="EPRInWsdlTestService">
+ <port name="Test1Port" binding="tns:Test1Binding">
+ <soap:address location="http://foo:9999/bar"/>
+ <wsa:EndpointReference
+ xmlns:wsa="http://www.w3.org/2005/08/addressing"
+ xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata"
+ xmlns:tns="http://eprinwsdltestservice.org/wsdl">
+ <wsa:Address>http://www.w3.org/2005/08/addressing/none</wsa:Address>
+ <wsa:ReferenceParameters>
+ <myns1:MyParam1 xmlns:myns1="http://eprinwsdltestservice.org/myns1">Hello</myns1:MyParam1>
+ <myns2:MyParam2 xmlns:myns2="http://eprinwsdltestservice.org/myns2">There</myns2:MyParam2>
+ </wsa:ReferenceParameters>
+ <wsa:Metadata>
+ <wsam:ServiceName EndpointName="Test1Port">tns:EPRInWsdlTestService</wsam:ServiceName>
+ <wsam:InterfaceName>tns:Test1</wsam:InterfaceName>
+ </wsa:Metadata>
+ </wsa:EndpointReference>
+ </port>
+ </service>
+</definitions>
Added: framework/trunk/testsuite/test/resources/jaxws/jbws3041/custom-client.xml
===================================================================
--- framework/trunk/testsuite/test/resources/jaxws/jbws3041/custom-client.xml (rev 0)
+++ framework/trunk/testsuite/test/resources/jaxws/jbws3041/custom-client.xml 2010-05-27 10:19:44 UTC (rev 12353)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+
+<bindings wsdlLocation="EPRInWsdlTestService.wsdl"
+ xmlns="http://java.sun.com/xml/ns/jaxws"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb">
+
+ <bindings node="wsdl:definitions" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+ <package name="org.jboss.test.ws.jaxws.jbws3041"/>
+ </bindings>
+
+ <bindings node="wsdl:definitions/wsdl:types/xs:schema[@targetNamespace='http://eprinwsdltestservice.org/xsd']"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+ <jxb:schemaBindings xmlns:jxb="http://java.sun.com/xml/ns/jaxb">
+ <jxb:package name="org.jboss.test.ws.jaxws.jbws3041"/>
+ </jxb:schemaBindings>
+ </bindings>
+
+</bindings>
Added: framework/trunk/testsuite/test/resources/jaxws/jbws3041/custom-server.xml
===================================================================
--- framework/trunk/testsuite/test/resources/jaxws/jbws3041/custom-server.xml (rev 0)
+++ framework/trunk/testsuite/test/resources/jaxws/jbws3041/custom-server.xml 2010-05-27 10:19:44 UTC (rev 12353)
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+
+<bindings wsdlLocation="EPRInWsdlTestService.wsdl"
+ xmlns="http://java.sun.com/xml/ns/jaxws"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb">
+
+ <bindings node="wsdl:definitions" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+ <package name="org.jboss.test.ws.jaxws.jbws3041.service"/>
+ </bindings>
+
+ <bindings node="wsdl:definitions/wsdl:types/xs:schema[@targetNamespace='http://eprinwsdltestservice.org/xsd']"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+ <jxb:schemaBindings xmlns:jxb="http://java.sun.com/xml/ns/jaxb">
+ <jxb:package name="org.jboss.test.ws.jaxws.jbws3041.service"/>
+ </jxb:schemaBindings>
+ </bindings>
+
+ <bindings>
+ <handler-chains xmlns="http://java.sun.com/xml/ns/javaee">
+ <handler-chain>
+ <handler>
+ <handler-name>ServerSOAPHandler</handler-name>
+ <handler-class>org.jboss.test.ws.jaxws.jbws3041.service.ServerSOAPHandler</handler-class>
+ </handler>
+ </handler-chain>
+ </handler-chains>
+ </bindings>
+
+</bindings>
+
15 years, 11 months
JBossWS SVN: r12352 - stack/metro/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-05-27 06:18:36 -0400 (Thu, 27 May 2010)
New Revision: 12352
Modified:
stack/metro/trunk/modules/testsuite/test-excludes-jboss501.txt
stack/metro/trunk/modules/testsuite/test-excludes-jboss510.txt
stack/metro/trunk/modules/testsuite/test-excludes-jboss600.txt
stack/metro/trunk/modules/testsuite/test-excludes-jboss601.txt
Log:
[JBWS-3041] excluding test for Metro
Modified: stack/metro/trunk/modules/testsuite/test-excludes-jboss501.txt
===================================================================
--- stack/metro/trunk/modules/testsuite/test-excludes-jboss501.txt 2010-05-27 10:17:27 UTC (rev 12351)
+++ stack/metro/trunk/modules/testsuite/test-excludes-jboss501.txt 2010-05-27 10:18:36 UTC (rev 12352)
@@ -73,6 +73,7 @@
org/jboss/test/ws/jaxws/jbws3022/**
org/jboss/test/ws/jaxws/jbws3027/**
org/jboss/test/ws/jaxws/jbws3031/**
+org/jboss/test/ws/jaxws/jbws3041/**
# [JBWS-2998] Complete integration development for JSR109 requirements
org/jboss/test/ws/jaxws/jbws2307/JBWS2307MTOMTestCase.*
Modified: stack/metro/trunk/modules/testsuite/test-excludes-jboss510.txt
===================================================================
--- stack/metro/trunk/modules/testsuite/test-excludes-jboss510.txt 2010-05-27 10:17:27 UTC (rev 12351)
+++ stack/metro/trunk/modules/testsuite/test-excludes-jboss510.txt 2010-05-27 10:18:36 UTC (rev 12352)
@@ -73,6 +73,7 @@
org/jboss/test/ws/jaxws/jbws3022/**
org/jboss/test/ws/jaxws/jbws3027/**
org/jboss/test/ws/jaxws/jbws3031/**
+org/jboss/test/ws/jaxws/jbws3041/**
# [JBWS-2998] Complete integration development for JSR109 requirements
org/jboss/test/ws/jaxws/jbws2307/JBWS2307MTOMTestCase.*
Modified: stack/metro/trunk/modules/testsuite/test-excludes-jboss600.txt
===================================================================
--- stack/metro/trunk/modules/testsuite/test-excludes-jboss600.txt 2010-05-27 10:17:27 UTC (rev 12351)
+++ stack/metro/trunk/modules/testsuite/test-excludes-jboss600.txt 2010-05-27 10:18:36 UTC (rev 12352)
@@ -67,6 +67,7 @@
org/jboss/test/ws/jaxws/jbws3022/**
org/jboss/test/ws/jaxws/jbws3027/**
org/jboss/test/ws/jaxws/jbws3031/**
+org/jboss/test/ws/jaxws/jbws3041/**
org/jboss/test/ws/jaxws/endpointReference/EndpointReferenceBuilderTestCase.*
# [JBWS-2998] Complete integration development for JSR109 requirements
Modified: stack/metro/trunk/modules/testsuite/test-excludes-jboss601.txt
===================================================================
--- stack/metro/trunk/modules/testsuite/test-excludes-jboss601.txt 2010-05-27 10:17:27 UTC (rev 12351)
+++ stack/metro/trunk/modules/testsuite/test-excludes-jboss601.txt 2010-05-27 10:18:36 UTC (rev 12352)
@@ -67,6 +67,7 @@
org/jboss/test/ws/jaxws/jbws3022/**
org/jboss/test/ws/jaxws/jbws3027/**
org/jboss/test/ws/jaxws/jbws3031/**
+org/jboss/test/ws/jaxws/jbws3041/**
org/jboss/test/ws/jaxws/endpointReference/EndpointReferenceBuilderTestCase.*
# [JBWS-2998] Complete integration development for JSR109 requirements
15 years, 11 months
JBossWS SVN: r12351 - stack/cxf/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-05-27 06:17:27 -0400 (Thu, 27 May 2010)
New Revision: 12351
Modified:
stack/cxf/trunk/modules/testsuite/test-excludes-jboss501.txt
stack/cxf/trunk/modules/testsuite/test-excludes-jboss510.txt
stack/cxf/trunk/modules/testsuite/test-excludes-jboss600.txt
stack/cxf/trunk/modules/testsuite/test-excludes-jboss601.txt
Log:
[JBWS-3041] excluding test for CXF
Modified: stack/cxf/trunk/modules/testsuite/test-excludes-jboss501.txt
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-excludes-jboss501.txt 2010-05-27 09:30:17 UTC (rev 12350)
+++ stack/cxf/trunk/modules/testsuite/test-excludes-jboss501.txt 2010-05-27 10:17:27 UTC (rev 12351)
@@ -57,6 +57,7 @@
org/jboss/test/ws/jaxws/jbws3022/**
org/jboss/test/ws/jaxws/jbws3027/**
org/jboss/test/ws/jaxws/jbws3031/**
+org/jboss/test/ws/jaxws/jbws3041/**
# [JBWS-2987] Review JMS integration
org/jboss/test/ws/jaxws/samples/jmstransport/**
Modified: stack/cxf/trunk/modules/testsuite/test-excludes-jboss510.txt
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-excludes-jboss510.txt 2010-05-27 09:30:17 UTC (rev 12350)
+++ stack/cxf/trunk/modules/testsuite/test-excludes-jboss510.txt 2010-05-27 10:17:27 UTC (rev 12351)
@@ -57,6 +57,7 @@
org/jboss/test/ws/jaxws/jbws3022/**
org/jboss/test/ws/jaxws/jbws3027/**
org/jboss/test/ws/jaxws/jbws3031/**
+org/jboss/test/ws/jaxws/jbws3041/**
# [JBWS-2987] Review JMS integration
org/jboss/test/ws/jaxws/samples/jmstransport/**
Modified: stack/cxf/trunk/modules/testsuite/test-excludes-jboss600.txt
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-excludes-jboss600.txt 2010-05-27 09:30:17 UTC (rev 12350)
+++ stack/cxf/trunk/modules/testsuite/test-excludes-jboss600.txt 2010-05-27 10:17:27 UTC (rev 12351)
@@ -50,6 +50,7 @@
org/jboss/test/ws/jaxws/jbws3022/**
org/jboss/test/ws/jaxws/jbws3027/**
org/jboss/test/ws/jaxws/jbws3031/**
+org/jboss/test/ws/jaxws/jbws3041/**
org/jboss/test/ws/jaxws/endpointReference/EndpointReferenceBuilderTestCase.*
# [JBWS-2987] Review JMS integration
Modified: stack/cxf/trunk/modules/testsuite/test-excludes-jboss601.txt
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-excludes-jboss601.txt 2010-05-27 09:30:17 UTC (rev 12350)
+++ stack/cxf/trunk/modules/testsuite/test-excludes-jboss601.txt 2010-05-27 10:17:27 UTC (rev 12351)
@@ -50,6 +50,7 @@
org/jboss/test/ws/jaxws/jbws3022/**
org/jboss/test/ws/jaxws/jbws3027/**
org/jboss/test/ws/jaxws/jbws3031/**
+org/jboss/test/ws/jaxws/jbws3041/**
org/jboss/test/ws/jaxws/endpointReference/EndpointReferenceBuilderTestCase.*
# [JBWS-2987] Review JMS integration
15 years, 11 months
JBossWS SVN: r12350 - stack/metro/trunk/src/main/distro.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-05-27 05:30:17 -0400 (Thu, 27 May 2010)
New Revision: 12350
Modified:
stack/metro/trunk/src/main/distro/build-project-gen.xml
Log:
Updating doc link
Modified: stack/metro/trunk/src/main/distro/build-project-gen.xml
===================================================================
--- stack/metro/trunk/src/main/distro/build-project-gen.xml 2010-05-27 09:29:34 UTC (rev 12349)
+++ stack/metro/trunk/src/main/distro/build-project-gen.xml 2010-05-27 09:30:17 UTC (rev 12350)
@@ -72,7 +72,7 @@
<target name="create-project" depends="validate-settings, configure-project" description="Create a new user project">
<echo message="A basic webservice project named '${project.name}' has been created in the ${workspace.home} directory."/>
<echo message="It includes a simple Ant build file and references the required libraries."/>
- <echo message="Please refer to http://jbws.dyndns.org/mediawiki/index.php?title=JBossWS for the authoritative documentation."/>
+ <echo message="Please refer to http://community.jboss.org/wiki/JBossWS for the authoritative documentation."/>
<echo message=""/>
<echo message="If you are an Eclipse user, import the project into Eclipse: right click in "/>
<echo message="'Package Explorer -> Import...' and select 'General -> Existing Projects into Workspace'."/>
15 years, 11 months
JBossWS SVN: r12349 - stack/native/trunk/src/main/distro.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-05-27 05:29:34 -0400 (Thu, 27 May 2010)
New Revision: 12349
Modified:
stack/native/trunk/src/main/distro/build-project-gen.xml
Log:
Updating doc link
Modified: stack/native/trunk/src/main/distro/build-project-gen.xml
===================================================================
--- stack/native/trunk/src/main/distro/build-project-gen.xml 2010-05-27 09:29:12 UTC (rev 12348)
+++ stack/native/trunk/src/main/distro/build-project-gen.xml 2010-05-27 09:29:34 UTC (rev 12349)
@@ -72,7 +72,7 @@
<target name="create-project" depends="validate-settings, configure-project" description="Create a new user project">
<echo message="A basic webservice project named '${project.name}' has been created in the ${workspace.home} directory."/>
<echo message="It includes a simple Ant build file and references the required libraries."/>
- <echo message="Please refer to http://jbws.dyndns.org/mediawiki/index.php?title=JBossWS for the authoritative documentation."/>
+ <echo message="Please refer to http://community.jboss.org/wiki/JBossWS for the authoritative documentation."/>
<echo message=""/>
<echo message="If you are an Eclipse user, import the project into Eclipse: right click in "/>
<echo message="'Package Explorer -> Import...' and select 'General -> Existing Projects into Workspace'."/>
15 years, 11 months
JBossWS SVN: r12348 - stack/cxf/trunk/src/main/distro.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-05-27 05:29:12 -0400 (Thu, 27 May 2010)
New Revision: 12348
Modified:
stack/cxf/trunk/src/main/distro/build-project-gen.xml
Log:
Updating doc link
Modified: stack/cxf/trunk/src/main/distro/build-project-gen.xml
===================================================================
--- stack/cxf/trunk/src/main/distro/build-project-gen.xml 2010-05-26 15:00:05 UTC (rev 12347)
+++ stack/cxf/trunk/src/main/distro/build-project-gen.xml 2010-05-27 09:29:12 UTC (rev 12348)
@@ -72,7 +72,7 @@
<target name="create-project" depends="validate-settings, configure-project" description="Create a new user project">
<echo message="A basic webservice project named '${project.name}' has been created in the ${workspace.home} directory."/>
<echo message="It includes a simple Ant build file and references the required libraries."/>
- <echo message="Please refer to http://jbws.dyndns.org/mediawiki/index.php?title=JBossWS for the authoritative documentation."/>
+ <echo message="Please refer to http://community.jboss.org/wiki/JBossWS for the authoritative documentation."/>
<echo message=""/>
<echo message="If you are an Eclipse user, import the project into Eclipse: right click in "/>
<echo message="'Package Explorer -> Import...' and select 'General -> Existing Projects into Workspace'."/>
15 years, 11 months
JBossWS SVN: r12347 - stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-05-26 11:00:05 -0400 (Wed, 26 May 2010)
New Revision: 12347
Modified:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/JBossWSServerCXFConfigurer.java
Log:
[JBWS-3033] Make sure the server configurer also recurses to the client one
Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/JBossWSServerCXFConfigurer.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/JBossWSServerCXFConfigurer.java 2010-05-26 14:41:56 UTC (rev 12346)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/JBossWSServerCXFConfigurer.java 2010-05-26 15:00:05 UTC (rev 12347)
@@ -50,6 +50,7 @@
{
configureEndpoint((EndpointImpl)beanInstance);
}
+ super.customConfigure(beanInstance);
}
protected synchronized void configureEndpoint(EndpointImpl endpoint)
15 years, 11 months
JBossWS SVN: r12346 - stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-05-26 10:41:56 -0400 (Wed, 26 May 2010)
New Revision: 12346
Modified:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/JBossWSServerCXFConfigurer.java
Log:
[JBWS-3033] Fixing broken build
Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/JBossWSServerCXFConfigurer.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/JBossWSServerCXFConfigurer.java 2010-05-26 14:02:55 UTC (rev 12345)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/JBossWSServerCXFConfigurer.java 2010-05-26 14:41:56 UTC (rev 12346)
@@ -21,11 +21,6 @@
*/
package org.jboss.wsf.stack.cxf.configuration;
-import org.apache.cxf.configuration.Configurer;
-import org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory;
-import org.apache.cxf.frontend.ClientProxyFactoryBean;
-import org.apache.cxf.transport.http.HTTPConduit;
-import org.jboss.wsf.stack.cxf.client.configuration.DelegatingConfigurer;
import org.jboss.wsf.stack.cxf.client.configuration.JBossWSCXFConfigurer;
import org.jboss.wsf.stack.cxf.deployment.EndpointImpl;
import org.jboss.wsf.stack.cxf.deployment.WSDLFilePublisher;
@@ -35,6 +30,7 @@
* A JBossWS CXF Configurer to be used on server side
*
* @author alessio.soldano(a)jboss.com
+ * @author ema(a)redhat.com
* @since 31-Mar-2010
*/
public class JBossWSServerCXFConfigurer extends JBossWSCXFConfigurer
15 years, 11 months
JBossWS SVN: r12345 - in stack/cxf/trunk/modules: server/src/main/java/org/jboss/wsf/stack/cxf/configuration and 6 other directories.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2010-05-26 10:02:55 -0400 (Wed, 26 May 2010)
New Revision: 12345
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/configuration/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/configuration/ChangeRequestnterceptor.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/configuration/Endpoint.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/configuration/EndpointImpl.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/configuration/JBossWSCXFConfigurerTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/configuration/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/configuration/WEB-INF/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/configuration/WEB-INF/jbossws-cxf.xml
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/configuration/WEB-INF/web.xml
Removed:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/DelegatingConfigurer.java
Modified:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/BusHolder.java
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/JBossWSServerCXFConfigurer.java
stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml
Log:
[JBWS-3033]:JBossWSServerCXFConfigurer inherits from ConfigurerImpl to enable the configuration by bean name; Provided test
Deleted: stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/DelegatingConfigurer.java
===================================================================
--- stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/DelegatingConfigurer.java 2010-05-26 13:27:20 UTC (rev 12344)
+++ stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/DelegatingConfigurer.java 2010-05-26 14:02:55 UTC (rev 12345)
@@ -1,72 +0,0 @@
-/*
- * 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.stack.cxf.client.configuration;
-
-import org.apache.cxf.configuration.Configurer;
-
-/**
- * A CXF configurer that allows for custom configuration before delegating to another configurer;
- * this is installed by JBossWS' {@see org.jboss.wsf.stack.cxf.client.configuration.ConfigurerInstaller}
- * (see cxf-extension-jbossws.xml) to allow for custom client side configuration while leaving
- * Apache CXF the freedom of setting the initial configurer.
- *
- * @author alessio.soldano(a)jboss.com
- * @since 04-May-2010
- */
-public abstract class DelegatingConfigurer implements Configurer
-{
- protected Configurer delegate;
-
- public DelegatingConfigurer(Configurer delegate)
- {
- this.delegate = delegate;
- }
-
- @Override
- public void configureBean(Object beanInstance)
- {
- internalConfigure(beanInstance);
- if (delegate != null)
- {
- delegate.configureBean(beanInstance);
- }
- }
-
- @Override
- public void configureBean(String name, Object beanInstance)
- {
- internalConfigure(beanInstance);
- if (delegate != null)
- {
- delegate.configureBean(name, beanInstance);
- }
- }
-
- /**
- * Performs custom configurations on the provided bean instance
- * before delegating to the other configurer.
- *
- * @param beanInstance
- */
- protected abstract void internalConfigure(Object beanInstance);
-
-}
Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/BusHolder.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/BusHolder.java 2010-05-26 13:27:20 UTC (rev 12344)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/BusHolder.java 2010-05-26 14:02:55 UTC (rev 12345)
@@ -140,9 +140,11 @@
public Configurer createServerConfigurer(BindingCustomization customization, WSDLFilePublisher wsdlPublisher)
{
//the JBossWSCXFConfigurer should already be set through cxf-extensions-jbossws.xml
- JBossWSCXFConfigurer delegate = (JBossWSCXFConfigurer)bus.getExtension(Configurer.class);
- delegate.setBindingCustomization(customization);
- return new JBossWSServerCXFConfigurer(delegate, wsdlPublisher);
+ ApplicationContext ctx = bus.getExtension(BusApplicationContext.class);
+ JBossWSServerCXFConfigurer serverConfigurer = new JBossWSServerCXFConfigurer(ctx);
+ serverConfigurer.setBindingCustomization(customization);
+ serverConfigurer.setWsdlPublisher(wsdlPublisher);
+ return serverConfigurer;
}
/**
Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/JBossWSServerCXFConfigurer.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/JBossWSServerCXFConfigurer.java 2010-05-26 13:27:20 UTC (rev 12344)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/JBossWSServerCXFConfigurer.java 2010-05-26 14:02:55 UTC (rev 12345)
@@ -22,9 +22,14 @@
package org.jboss.wsf.stack.cxf.configuration;
import org.apache.cxf.configuration.Configurer;
+import org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory;
+import org.apache.cxf.frontend.ClientProxyFactoryBean;
+import org.apache.cxf.transport.http.HTTPConduit;
import org.jboss.wsf.stack.cxf.client.configuration.DelegatingConfigurer;
+import org.jboss.wsf.stack.cxf.client.configuration.JBossWSCXFConfigurer;
import org.jboss.wsf.stack.cxf.deployment.EndpointImpl;
import org.jboss.wsf.stack.cxf.deployment.WSDLFilePublisher;
+import org.springframework.context.ApplicationContext;
/**
* A JBossWS CXF Configurer to be used on server side
@@ -32,30 +37,25 @@
* @author alessio.soldano(a)jboss.com
* @since 31-Mar-2010
*/
-public class JBossWSServerCXFConfigurer extends DelegatingConfigurer
+public class JBossWSServerCXFConfigurer extends JBossWSCXFConfigurer
{
private WSDLFilePublisher wsdlPublisher;
- public JBossWSServerCXFConfigurer(Configurer delegate)
+ public JBossWSServerCXFConfigurer(ApplicationContext ctx)
{
- super(delegate);
+ setApplicationContext(ctx);
+
}
-
- public JBossWSServerCXFConfigurer(Configurer delegate, WSDLFilePublisher wsdlPublisher)
- {
- super(delegate);
- this.wsdlPublisher = wsdlPublisher;
- }
-
+
@Override
- protected void internalConfigure(Object beanInstance)
+ protected void customConfigure(Object beanInstance)
{
if (beanInstance instanceof EndpointImpl)
{
configureEndpoint((EndpointImpl)beanInstance);
}
}
-
+
protected synchronized void configureEndpoint(EndpointImpl endpoint)
{
//Configure wsdl file publisher
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml 2010-05-26 13:27:20 UTC (rev 12344)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml 2010-05-26 14:02:55 UTC (rev 12345)
@@ -45,6 +45,20 @@
<include name="org/jboss/test/ws/jaxws/cxf/aegis/Member.class"/>
</classes>
</war>
+
+ <!-- jaxws-cxf-configuration -->
+ <war
+ warfile="${tests.output.dir}/test-libs/jaxws-cxf-configuration.war"
+ webxml="${tests.output.dir}/test-resources/jaxws/cxf/configuration/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/cxf/configuration/ChangeRequestnterceptor.class"/>
+ <include name="org/jboss/test/ws/jaxws/cxf/configuration/Endpoint.class"/>
+ <include name="org/jboss/test/ws/jaxws/cxf/configuration/EndpointImpl.class"/>
+ </classes>
+ <webinf dir="${tests.output.dir}/test-resources/jaxws/cxf/configuration/WEB-INF">
+ <include name="jbossws-cxf.xml"/>
+ </webinf>
+ </war>
<!-- jaxws-cxf-descriptor -->
<war warfile="${tests.output.dir}/test-libs/jaxws-cxf-descriptor.war" webxml="${tests.output.dir}/test-resources/jaxws/cxf/descriptor/WEB-INF/web.xml">
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/configuration/ChangeRequestnterceptor.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/configuration/ChangeRequestnterceptor.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/configuration/ChangeRequestnterceptor.java 2010-05-26 14:02:55 UTC (rev 12345)
@@ -0,0 +1,50 @@
+/*
+ * 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.cxf.configuration;
+
+import java.util.List;
+
+import org.apache.cxf.binding.soap.interceptor.RPCInInterceptor;
+import org.apache.cxf.message.Message;
+import org.apache.cxf.message.MessageContentsList;
+import org.apache.cxf.phase.AbstractPhaseInterceptor;
+import org.apache.cxf.phase.Phase;
+
+/**
+ * The cxf interceptor to change the request "Hello" to "ChangedRequest"
+ *
+ * @author <a href="ema(a)redhat.com">Jim Ma</a>
+ */
+public class ChangeRequestnterceptor extends AbstractPhaseInterceptor<Message>
+{
+ public ChangeRequestnterceptor()
+ {
+ super(Phase.UNMARSHAL);
+ addAfter(RPCInInterceptor.class.getName());
+ }
+
+ public void handleMessage(final Message message) {
+ MessageContentsList parameters = (MessageContentsList)message.getContent(List.class);
+ parameters.set(0, "ChangedRequest");
+ }
+
+}
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/configuration/Endpoint.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/configuration/Endpoint.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/configuration/Endpoint.java 2010-05-26 14:02:55 UTC (rev 12345)
@@ -0,0 +1,38 @@
+/*
+ * 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.cxf.configuration;
+
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+/**
+ * Endpoint.
+ *
+ * @author <a href="ema(a)redhat.com">Jim Ma</a>
+ */
+@WebService(name = "Endpoint", targetNamespace = "http://ws.jboss.org/jbws3033")
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+public interface Endpoint
+{
+ public String echo(final String message);
+
+}
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/configuration/EndpointImpl.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/configuration/EndpointImpl.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/configuration/EndpointImpl.java 2010-05-26 14:02:55 UTC (rev 12345)
@@ -0,0 +1,41 @@
+/*
+ * 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.cxf.configuration;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+
+/**
+ * EndpointImpl.
+ *
+ * @author <a href="ema(a)redhat.com">Jim Ma</a>
+ */
+@WebService(name = "Endpoint", serviceName = "EndpointService", targetNamespace = "http://org.jboss.ws/jbws3033", endpointInterface = "org.jboss.test.ws.jaxws.cxf.configuration.Endpoint")
+
+public class EndpointImpl implements Endpoint
+{
+ @WebMethod
+ public String echo(String input)
+ {
+ return input;
+ }
+}
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/configuration/JBossWSCXFConfigurerTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/configuration/JBossWSCXFConfigurerTestCase.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/configuration/JBossWSCXFConfigurerTestCase.java 2010-05-26 14:02:55 UTC (rev 12345)
@@ -0,0 +1,61 @@
+/*
+ * 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.cxf.configuration;
+
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
+import junit.framework.Test;
+
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ * To test configure bean by name auto wire
+ *
+ * @author <a href="ema(a)redhat.com">Jim Ma</a>
+ */
+public class JBossWSCXFConfigurerTestCase extends JBossWSTest
+{
+ private String endpointURL = "http://" + getServerHost() + ":8080/jaxws-cxf-configuration";
+ private String targetNS = "http://org.jboss.ws/jbws3033";
+
+ public static Test suite()
+ {
+ return new JBossWSTestSetup(JBossWSCXFConfigurerTestCase.class, "jaxws-cxf-configuration.war");
+ }
+
+ //JBWS-3033
+ public void testConfiguration() throws Exception
+ {
+ URL wsdlURL = new URL(endpointURL + "?wsdl");
+ QName serviceName = new QName(targetNS, "EndpointService");
+
+ Service service = Service.create(wsdlURL, serviceName);
+ Endpoint port = (Endpoint)service.getPort(Endpoint.class);
+
+ Object retObj = port.echo("Hello");
+ assertEquals("ChangedRequest", retObj);
+ }
+}
\ No newline at end of file
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/configuration/WEB-INF/jbossws-cxf.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/configuration/WEB-INF/jbossws-cxf.xml (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/configuration/WEB-INF/jbossws-cxf.xml 2010-05-26 14:02:55 UTC (rev 12345)
@@ -0,0 +1,30 @@
+<beans xmlns='http://www.springframework.org/schema/beans' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:beans='http://www.springframework.org/schema/beans'
+ xmlns:jaxws='http://cxf.apache.org/jaxws'
+ xsi:schemaLocation='http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+ http://www.w3.org/2006/07/ws-policy http://www.w3.org/2006/07/ws-policy.xsd
+ http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd'>
+
+<bean name="{http://org.jboss.ws/jbws3033}EndpointPort.jaxws-endpoint" abstract="true">
+ <property name="inInterceptors">
+ <list>
+ <bean class="org.jboss.test.ws.jaxws.cxf.configuration.ChangeRequestnterceptor"/>
+ <bean class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
+ </list>
+ </property>
+
+ <property name="outInterceptors">
+ <list>
+ <bean class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
+ </list>
+ </property>
+
+</bean>
+
+<bean id ="logIn" class="org.apache.cxf.interceptor.LoggingInInterceptor">
+</bean>
+
+
+<jaxws:endpoint implementor="org.jboss.test.ws.jaxws.cxf.configuration.EndpointImpl" address="http://@jboss.bind.address@:8080/jaxws-cxf-configuration">
+</jaxws:endpoint>
+
+</beans>
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/configuration/WEB-INF/web.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/configuration/WEB-INF/web.xml (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/configuration/WEB-INF/web.xml 2010-05-26 14:02:55 UTC (rev 12345)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+ version="2.4">
+
+ <servlet>
+ <servlet-name>EndpointService</servlet-name>
+ <servlet-class>org.jboss.test.ws.jaxws.cxf.configuration.EndpointImpl</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>EndpointService</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+
+</web-app>
+
15 years, 11 months