JBossWS SVN: r2659 - in trunk: jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxws and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2007-03-22 11:42:02 -0400 (Thu, 22 Mar 2007)
New Revision: 2659
Modified:
trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/JAXRPCDeployerEJB21.java
trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java
trunk/jbossws-core/src/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java
Log:
Fix WSDD portName overrides
Modified: trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/JAXRPCDeployerEJB21.java
===================================================================
--- trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/JAXRPCDeployerEJB21.java 2007-03-22 15:35:26 UTC (rev 2658)
+++ trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/JAXRPCDeployerEJB21.java 2007-03-22 15:42:02 UTC (rev 2659)
@@ -29,8 +29,12 @@
import org.jboss.virtual.VirtualFile;
import org.jboss.ws.core.server.UnifiedDeploymentInfo;
import org.jboss.ws.core.server.UnifiedDeploymentInfo.DeploymentType;
+import org.jboss.ws.core.utils.DOMUtils;
import org.jboss.ws.metadata.builder.jaxrpc.JAXRPCDeployment;
+import org.w3c.dom.Element;
+import java.io.IOException;
+
/**
* A deployer JAXRPC EJB21 Endpoints
*
@@ -39,6 +43,8 @@
*/
public class JAXRPCDeployerEJB21 extends AbstractDeployerEJB
{
+ private static final String WEBSERVICES_XML = "webservices.xml";
+
@Override
protected DeploymentType getDeploymentType()
{
@@ -57,8 +63,25 @@
@Override
public boolean isWebServiceDeployment(DeploymentUnit unit)
{
- boolean hasAppMetaData = unit.getAllMetaData(ApplicationMetaData.class).size() > 0;
- return hasAppMetaData && getWebServicesFile(unit) != null;
+ boolean isWebserviceDeployment = unit.getAllMetaData(ApplicationMetaData.class).size() > 0;
+ isWebserviceDeployment = (isWebserviceDeployment && getWebServicesFile(unit) != null);
+
+ if(isWebserviceDeployment)
+ {
+ // verify the DD namespace
+ try
+ {
+ Element root = DOMUtils.parse( unit.getMetaDataFile(WEBSERVICES_XML).openStream() );
+ isWebserviceDeployment = (isWebserviceDeployment && root.getNamespaceURI().equals("http://java.sun.com/xml/ns/j2ee"));
+ }
+ catch (IOException e)
+ {
+ throw new IllegalArgumentException("Failed to parse webservice.xml", e);
+ }
+ }
+
+ return isWebserviceDeployment;
+
}
private VirtualFile getWebServicesFile(DeploymentUnit unit)
Modified: trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java 2007-03-22 15:35:26 UTC (rev 2658)
+++ trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java 2007-03-22 15:42:02 UTC (rev 2659)
@@ -201,10 +201,28 @@
{
for(PortComponentMetaData portComp : wsDesc.getPortComponents())
{
- if(portComp.getWsdlPort().equals(sepMetaData.getPortName()))
+ // We match portComp's by SEI first and portQName second
+ // In the first case the portComp may override the portQName that derives from the annotation
+ String portCompSEI = portComp.getServiceEndpointInterface();
+ boolean doesMatch = portCompSEI != null ? portCompSEI.equals(sepMetaData.getServiceEndpointInterfaceName()) : false;
+ if(!doesMatch)
{
+ doesMatch = portComp.getWsdlPort().equals(sepMetaData.getPortName());
+ }
- log.debug("Processing 'webservices.xml' handler contributions");
+ if(doesMatch)
+ {
+
+ log.debug("Processing 'webservices.xml' contributions on EndpointMetaData");
+
+ // PortQName overrides
+ if(portComp.getWsdlPort()!=null)
+ {
+ log.debug("Override EndpointMetaData portName " + sepMetaData.getPortName() + " with " + portComp.getWsdlPort());
+ sepMetaData.setPortName(portComp.getWsdlPort());
+ }
+
+ // HandlerChain contributions
UnifiedHandlerChainsMetaData chainWrapper = portComp.getHandlerChains();
if(chainWrapper!=null)
{
@@ -214,14 +232,16 @@
{
HandlerMetaDataJAXWS handlerMetaDataJAXWS = uhmd.getHandlerMetaDataJAXWS(sepMetaData, HandlerMetaData.HandlerType.ENDPOINT);
sepMetaData.addHandler(handlerMetaDataJAXWS);
- log.debug("Handler contribution from webservices.xml: " + handlerMetaDataJAXWS.getHandlerName());
+ log.debug("Contribute handler from webservices.xml: " + handlerMetaDataJAXWS.getHandlerName());
}
}
}
- log.debug("Processing MTOM contributions");
+ // MTOM settings
if(portComp.isEnableMtom())
{
+ log.debug("Enabling MTOM");
+
String bindingId = sepMetaData.getBindingId();
if(bindingId.equals(Constants.SOAP11HTTP_BINDING))
sepMetaData.setBindingId(Constants.SOAP11HTTP_MTOM_BINDING);
Modified: trunk/jbossws-core/src/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java 2007-03-22 15:35:26 UTC (rev 2658)
+++ trunk/jbossws-core/src/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java 2007-03-22 15:42:02 UTC (rev 2659)
@@ -153,6 +153,11 @@
return portName;
}
+ public void setPortName(QName portName)
+ {
+ this.portName = portName;
+ }
+
public QName getPortTypeName()
{
return portTypeName;
17 years, 10 months
JBossWS SVN: r2658 - trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client.
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2007-03-22 11:35:26 -0400 (Thu, 22 Mar 2007)
New Revision: 2658
Modified:
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ServiceRefHandlerJAXWS.java
Log:
Fix serviceref test
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ServiceRefHandlerJAXWS.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ServiceRefHandlerJAXWS.java 2007-03-21 22:06:51 UTC (rev 2657)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ServiceRefHandlerJAXWS.java 2007-03-22 15:35:26 UTC (rev 2658)
@@ -23,6 +23,16 @@
// $Id$
+import org.jboss.logging.Logger;
+import org.jboss.util.naming.Util;
+import org.jboss.ws.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
+
+import javax.jws.HandlerChain;
+import javax.naming.Context;
+import javax.naming.NamingException;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebServiceRef;
+import javax.xml.ws.WebServiceRefs;
import java.lang.annotation.Annotation;
import java.lang.reflect.AnnotatedElement;
import java.lang.reflect.Field;
@@ -32,18 +42,6 @@
import java.util.ArrayList;
import java.util.List;
-import javax.jws.HandlerChain;
-import javax.naming.Context;
-import javax.naming.NamingException;
-import javax.xml.ws.Service;
-import javax.xml.ws.WebServiceRef;
-import javax.xml.ws.WebServiceRefs;
-
-import org.jboss.logging.Logger;
-import org.jboss.util.naming.Util;
-import org.jboss.ws.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
-import org.jboss.ws.WSException;
-
/**
* Binds a JAXWS Service object in the client's ENC
*
@@ -105,10 +103,8 @@
}
else
{
- if(null == wsref.type())
- throw new WSException("For class annotations, the WebServiceRef.type MUST be specified.");
-
- targetClass = wsref.type();
+ if( wsref!=null && (wsref.type() != Object.class) )
+ targetClass = wsref.type();
}
String targetClassName = (targetClass != null ? targetClass.getName() : null);
@@ -137,6 +133,7 @@
if (wsref != null && wsref.type() != Object.class)
targetClassName = wsref.type().getName();
+
// #2 Use the target ref type
if (targetClassName == null && targetClass != null && Service.class.isAssignableFrom(targetClass) == false)
targetClassName = targetClass.getName();
17 years, 10 months
JBossWS SVN: r2657 - in branches/jbossws-1.2.1/jbossws-core/src/java/org/jboss/ws: core and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-03-21 18:06:51 -0400 (Wed, 21 Mar 2007)
New Revision: 2657
Modified:
branches/jbossws-1.2.1/jbossws-core/src/java/org/jboss/ws/Constants.java
branches/jbossws-1.2.1/jbossws-core/src/java/org/jboss/ws/core/CommonSOAPBinding.java
Log:
Fix missing soap-env:encodingStyle
Modified: branches/jbossws-1.2.1/jbossws-core/src/java/org/jboss/ws/Constants.java
===================================================================
--- branches/jbossws-1.2.1/jbossws-core/src/java/org/jboss/ws/Constants.java 2007-03-21 20:50:59 UTC (rev 2656)
+++ branches/jbossws-1.2.1/jbossws-core/src/java/org/jboss/ws/Constants.java 2007-03-21 22:06:51 UTC (rev 2657)
@@ -54,6 +54,8 @@
static final String NS_SCHEMA_XSD = "http://www.w3.org/2001/XMLSchema";
/** XMLSchema instance namespace http://www.w3.org/2001/XMLSchema-instance */
static final String NS_SCHEMA_XSI = "http://www.w3.org/2001/XMLSchema-instance";
+ /** SOAP encoding namespace http://schemas.xmlsoap.org/soap/encoding/ */
+ static final String NS_SOAP_ENCODING = "http://schemas.xmlsoap.org/soap/encoding/";
/** SOAP-1.1 namespace http://schemas.xmlsoap.org/wsdl/soap/ */
static final String NS_SOAP11 = "http://schemas.xmlsoap.org/wsdl/soap/";
/** SOAP-1.1 envelope namespace http://schemas.xmlsoap.org/soap/envelope/ */
Modified: branches/jbossws-1.2.1/jbossws-core/src/java/org/jboss/ws/core/CommonSOAPBinding.java
===================================================================
--- branches/jbossws-1.2.1/jbossws-core/src/java/org/jboss/ws/core/CommonSOAPBinding.java 2007-03-21 20:50:59 UTC (rev 2656)
+++ branches/jbossws-1.2.1/jbossws-core/src/java/org/jboss/ws/core/CommonSOAPBinding.java 2007-03-21 22:06:51 UTC (rev 2657)
@@ -52,6 +52,7 @@
import org.jboss.ws.WSException;
import org.jboss.ws.core.jaxrpc.ParameterWrapping;
import org.jboss.ws.core.jaxrpc.Style;
+import org.jboss.ws.core.jaxrpc.Use;
import org.jboss.ws.core.jaxrpc.binding.BindingException;
import org.jboss.ws.core.jaxws.handler.MessageContextJAXWS;
import org.jboss.ws.core.soap.MessageContextAssociation;
@@ -168,8 +169,17 @@
if (log.isDebugEnabled())
log.debug("Create RPC body element: " + opName);
+
soapBodyElement = new SOAPBodyElementRpc(opName);
soapBodyElement = (SOAPBodyElement)soapBody.addChildElement(soapBodyElement);
+
+ // Add soap encodingStyle
+ if (opMetaData.getUse() == Use.ENCODED)
+ {
+ String envURI = soapEnvelope.getNamespaceURI();
+ String envPrefix = soapEnvelope.getPrefix();
+ soapBodyElement.setAttributeNS(envURI, envPrefix + ":encodingStyle", Constants.NS_SOAP_ENCODING);
+ }
}
for (ParameterMetaData paramMetaData : opMetaData.getInputParameters())
@@ -380,7 +390,16 @@
Name opName = new NameImpl(namespaceRegistry.registerQName(opQName));
soapBodyElement = new SOAPBodyElementRpc(opName);
soapBodyElement = (SOAPBodyElement)soapBody.addChildElement(soapBodyElement);
+
+ // Add soap encodingStyle
+ if (opMetaData.getUse() == Use.ENCODED)
+ {
+ String envURI = soapEnvelope.getNamespaceURI();
+ String envPrefix = soapEnvelope.getPrefix();
+ soapBodyElement.setAttributeNS(envURI, envPrefix + ":encodingStyle", Constants.NS_SOAP_ENCODING);
+ }
}
+
// Add the return to the message
ParameterMetaData retMetaData = opMetaData.getReturnParameter();
if (retMetaData != null)
17 years, 10 months
JBossWS SVN: r2656 - branches/jbossws-1.2.1/build.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-03-21 16:50:59 -0400 (Wed, 21 Mar 2007)
New Revision: 2656
Modified:
branches/jbossws-1.2.1/build/version.properties
Log:
Set version 1.2.1.GA
Modified: branches/jbossws-1.2.1/build/version.properties
===================================================================
--- branches/jbossws-1.2.1/build/version.properties 2007-03-21 20:46:27 UTC (rev 2655)
+++ branches/jbossws-1.2.1/build/version.properties 2007-03-21 20:50:59 UTC (rev 2656)
@@ -5,8 +5,8 @@
specification.vendor=JBoss (http://www.jboss.org)
specification.version=jbossws-1.2
-version.id=2.0.0.DEV
-repository.id=2.0.0.CR5
+version.id=1.2.1.GA
+repository.id=1.2.1.GA
implementation.title=JBoss Web Services (JBossWS)
implementation.url=http://www.jboss.org/products/jbossws
17 years, 10 months
JBossWS SVN: r2655 - branches.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-03-21 16:46:27 -0400 (Wed, 21 Mar 2007)
New Revision: 2655
Added:
branches/jbossws-1.2.1/
Log:
Create branch 1.2.1
Copied: branches/jbossws-1.2.1 (from rev 2654, trunk)
17 years, 10 months
JBossWS SVN: r2654 - in trunk: jbossws-core/src/java/org/jboss/ws/integration and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-03-21 16:38:32 -0400 (Wed, 21 Mar 2007)
New Revision: 2654
Modified:
trunk/build/ant-import/build-deploy.xml
trunk/build/ant-import/build-release.xml
trunk/jbossws-core/src/java/org/jboss/ws/integration/URLLoaderAdapter.java
Log:
Fix AS42 integration
Modified: trunk/build/ant-import/build-deploy.xml
===================================================================
--- trunk/build/ant-import/build-deploy.xml 2007-03-21 14:15:41 UTC (rev 2653)
+++ trunk/build/ant-import/build-deploy.xml 2007-03-21 20:38:32 UTC (rev 2654)
@@ -115,6 +115,7 @@
</copy>
<copy todir="${jboss42.home}/server/${jboss.server.instance}/lib" overwrite="true">
<fileset dir="${core.output.lib.dir}">
+ <include name="jbossws-integration.jar"/>
<include name="jboss-jaxrpc.jar"/>
<include name="jboss-jaxws.jar"/>
<include name="jboss-saaj.jar"/>
Modified: trunk/build/ant-import/build-release.xml
===================================================================
--- trunk/build/ant-import/build-release.xml 2007-03-21 14:15:41 UTC (rev 2653)
+++ trunk/build/ant-import/build-release.xml 2007-03-21 20:38:32 UTC (rev 2654)
@@ -79,6 +79,18 @@
</filterset>
</copy>
+ <!-- jboss/jbossws-jboss42 -->
+ <copy todir="${jboss.repository.dir}/jbossws-jboss42/${repository.id}/lib" overwrite="true">
+ <fileset dir="${jboss42.output.lib.dir}">
+ <include name="jbossws42.sar"/>
+ </fileset>
+ </copy>
+ <copy tofile="${jboss.repository.dir}/jbossws-jboss42/${repository.id}/component-info.xml" file="${build.etc.dir}/component-info/integration-jboss42.xml" filtering="true" overwrite="true">
+ <filterset>
+ <filtersfile file="${build.dir}/version.properties"/>
+ </filterset>
+ </copy>
+
</target>
<!-- Release to portal content -->
Modified: trunk/jbossws-core/src/java/org/jboss/ws/integration/URLLoaderAdapter.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/integration/URLLoaderAdapter.java 2007-03-21 14:15:41 UTC (rev 2653)
+++ trunk/jbossws-core/src/java/org/jboss/ws/integration/URLLoaderAdapter.java 2007-03-21 20:38:32 UTC (rev 2654)
@@ -29,8 +29,6 @@
import java.net.URL;
import java.net.URLClassLoader;
-import org.jboss.ws.integration.UnifiedVirtualFile;
-
/**
* The default file adapter loads resources through an associated classloader.
* If no classload is set, the the thread context classloader will be used.
@@ -108,9 +106,10 @@
public URL toURL()
{
- if (null == this.resourceURL)
- throw new IllegalStateException("UnifiedVirtualFile not initialized");
- return resourceURL;
+ if (resourceURL != null)
+ return resourceURL;
+ else
+ return rootURL;
}
private URLClassLoader getResourceLoader()
17 years, 10 months
JBossWS SVN: r2653 - trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client.
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2007-03-21 10:15:41 -0400 (Wed, 21 Mar 2007)
New Revision: 2653
Modified:
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ServiceRefHandlerJAXWS.java
Log:
Fix JBCTS-497
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ServiceRefHandlerJAXWS.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ServiceRefHandlerJAXWS.java 2007-03-21 14:15:15 UTC (rev 2652)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ServiceRefHandlerJAXWS.java 2007-03-21 14:15:41 UTC (rev 2653)
@@ -42,6 +42,7 @@
import org.jboss.logging.Logger;
import org.jboss.util.naming.Util;
import org.jboss.ws.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
+import org.jboss.ws.WSException;
/**
* Binds a JAXWS Service object in the client's ENC
@@ -95,11 +96,22 @@
Class targetClass = null;
if (anElement instanceof Field)
+ {
targetClass = ((Field)anElement).getType();
+ }
else if (anElement instanceof Method)
+ {
targetClass = ((Method)anElement).getParameterTypes()[0];
+ }
+ else
+ {
+ if(null == wsref.type())
+ throw new WSException("For class annotations, the WebServiceRef.type MUST be specified.");
- String targetClassName = (targetClass != null ? targetClass.getName() : null);
+ targetClass = wsref.type();
+ }
+
+ String targetClassName = (targetClass != null ? targetClass.getName() : null);
String externalName = encCtx.getNameInNamespace() + "/" + encName;
log.info("setupServiceRef [jndi=" + externalName + ",target=" + targetClassName + "]");
17 years, 10 months
JBossWS SVN: r2652 - trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client.
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2007-03-21 10:15:15 -0400 (Wed, 21 Mar 2007)
New Revision: 2652
Modified:
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ServiceObjectFactory.java
Log:
Fix typo
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ServiceObjectFactory.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ServiceObjectFactory.java 2007-03-21 12:19:10 UTC (rev 2651)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ServiceObjectFactory.java 2007-03-21 14:15:15 UTC (rev 2652)
@@ -100,7 +100,7 @@
if (serviceImplClass == null)
serviceImplClass = (String)ref.get(ServiceReferenceable.SERVICE_IMPL_CLASS).getContent();
- // If the target defaults to javax.xml.ws.Service, user the service as the target
+ // If the target defaults to javax.xml.ws.Service, use the service as the target
if (Service.class.getName().equals(targetClassName))
targetClassName = serviceImplClass;
17 years, 10 months
JBossWS SVN: r2651 - in trunk: jbossws-core/src/java/org/jboss/ws/core/jaxws/client and 2 other directories.
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2007-03-21 08:19:10 -0400 (Wed, 21 Mar 2007)
New Revision: 2651
Modified:
trunk/jbossws-core/src/java/org/jboss/ws/core/client/ServiceRefHandlerImpl.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ServiceRefHandlerJAXWS.java
trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/UnifiedPortComponentRefMetaData.java
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/serviceref/EJBClient.java
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/serviceref/ServiceRefClientTestCase.java
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/serviceref/ServiceRefEJBTestCase.java
Log:
Fix JBWS-1576
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/client/ServiceRefHandlerImpl.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/client/ServiceRefHandlerImpl.java 2007-03-20 22:24:54 UTC (rev 2650)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/client/ServiceRefHandlerImpl.java 2007-03-21 12:19:10 UTC (rev 2651)
@@ -65,7 +65,7 @@
{
if (sref.isProcessed())
{
- log.warn("Attempt to rebind service-ref: " + sref);
+ // Attempt to rebind service-ref
return;
}
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ServiceRefHandlerJAXWS.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ServiceRefHandlerJAXWS.java 2007-03-20 22:24:54 UTC (rev 2650)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ServiceRefHandlerJAXWS.java 2007-03-21 12:19:10 UTC (rev 2651)
@@ -99,7 +99,7 @@
else if (anElement instanceof Method)
targetClass = ((Method)anElement).getParameterTypes()[0];
- String targetClassName = (targetClass != null ? targetClass.getName() : null);
+ String targetClassName = (targetClass != null ? targetClass.getName() : null);
String externalName = encCtx.getNameInNamespace() + "/" + encName;
log.info("setupServiceRef [jndi=" + externalName + ",target=" + targetClassName + "]");
Modified: trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/UnifiedPortComponentRefMetaData.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/UnifiedPortComponentRefMetaData.java 2007-03-20 22:24:54 UTC (rev 2650)
+++ trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/UnifiedPortComponentRefMetaData.java 2007-03-21 12:19:10 UTC (rev 2651)
@@ -188,14 +188,20 @@
public boolean matches(String seiName, QName portName)
{
- boolean match;
- if (seiName != null && portName != null)
- match = seiName.equals(getServiceEndpointInterface()) && portName.equals(getPortQName());
- else if (seiName != null)
- match = seiName.equals(getServiceEndpointInterface());
- else
+ if(seiName==null && portName == null)
+ throw new IllegalArgumentException("Cannot match " + this + " against seiName=null && portName=null."+
+ "Looks like a broken service-ref setup");
+
+ boolean match = false;
+
+ // match against portName first
+ if(portName!=null)
match = portName.equals(getPortQName());
+ // if it fails try seiName
+ if (!match)
+ match = seiName.equals(getServiceEndpointInterface());
+
return match;
}
}
Modified: trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/serviceref/EJBClient.java
===================================================================
--- trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/serviceref/EJBClient.java 2007-03-20 22:24:54 UTC (rev 2650)
+++ trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/serviceref/EJBClient.java 2007-03-21 12:19:10 UTC (rev 2651)
@@ -26,9 +26,10 @@
import javax.ejb.Remote;
import javax.ejb.Stateless;
+import javax.naming.InitialContext;
import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Service;
import javax.xml.ws.WebServiceException;
-import javax.xml.ws.WebServiceRef;
import javax.xml.ws.soap.SOAPBinding;
import java.rmi.RemoteException;
import java.util.ArrayList;
@@ -42,31 +43,22 @@
// Provide logging
private static Logger log = Logger.getLogger(EJBClient.class);
- @WebServiceRef(name = "port1")
- TestEndpoint port1;
-
- @WebServiceRef(name = "port2")
- TestEndpoint port2;
-
public String echo(String inStr) throws RemoteException
{
log.info("echo: " + inStr);
ArrayList ports = new ArrayList(2);
- ports.add(port1);
- ports.add(port2);
- /*try
+ try
{
InitialContext iniCtx = new InitialContext();
- ports.add((TestEndpoint)((Service)iniCtx.lookup("java:comp/env/port1")).getPort(TestEndpoint.class));
- ports.add(((TestEndpointService)iniCtx.lookup("java:comp/env/port2")).getTestEndpointPort());
+ ports.add((TestEndpoint)((Service)iniCtx.lookup("java:comp/env/service1")).getPort(TestEndpoint.class));
+ ports.add(((TestEndpointService)iniCtx.lookup("java:comp/env/service2")).getTestEndpointPort());
}
catch (Exception ex)
{
- log.error("Cannot add port", ex);
- //throw new WebServiceException(ex);
- } */
+ throw new WebServiceException(ex);
+ }
for (int i = 0; i < ports.size(); i++)
{
Modified: trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/serviceref/ServiceRefClientTestCase.java
===================================================================
--- trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/serviceref/ServiceRefClientTestCase.java 2007-03-20 22:24:54 UTC (rev 2650)
+++ trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/serviceref/ServiceRefClientTestCase.java 2007-03-21 12:19:10 UTC (rev 2651)
@@ -27,6 +27,8 @@
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.soap.SOAPBinding;
import javax.naming.InitialContext;
import junit.framework.Test;
@@ -73,16 +75,17 @@
public void testApplicationClient() throws Exception
{
- System.out.println("FIXME: [JBWS-1576] Implement jaxws <service-ref> from deployment descriptor");
-
- /*InitialContext iniCtx = getInitialContext("jbossws-client");
+ InitialContext iniCtx = getInitialContext("jbossws-client");
TestEndpoint port = ((Service)iniCtx.lookup("java:comp/env/service2")).getPort(TestEndpoint.class);
assertNotNull(port);
+ BindingProvider bp = (BindingProvider)port;
+ boolean mtomEnabled = ((SOAPBinding)bp.getBinding()).isMTOMEnabled();
+ assertTrue("MTOM should be enabled on port", mtomEnabled);
+
String request = "testApplicationClient";
String response = port.echo(request);
assertEquals(response, request);
- */
}
Modified: trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/serviceref/ServiceRefEJBTestCase.java
===================================================================
--- trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/serviceref/ServiceRefEJBTestCase.java 2007-03-20 22:24:54 UTC (rev 2650)
+++ trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/serviceref/ServiceRefEJBTestCase.java 2007-03-21 12:19:10 UTC (rev 2651)
@@ -73,13 +73,7 @@
public void testEJBClient() throws Exception
- {
- if (true)
- {
- System.out.println("FIXME: [JBWS-1576] Implement jaxws <service-ref> from deployment descriptor");
- return;
- }
-
+ {
InitialContext iniCtx = getInitialContext();
EJBRemote ejbRemote = (EJBRemote)iniCtx.lookup("/ejb/EJBClient");
17 years, 10 months
JBossWS SVN: r2650 - trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-03-20 18:24:54 -0400 (Tue, 20 Mar 2007)
New Revision: 2650
Modified:
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/LogicalSourceHandler.java
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/ProtocolHandler.java
Log:
use debug
Modified: trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/LogicalSourceHandler.java
===================================================================
--- trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/LogicalSourceHandler.java 2007-03-20 22:23:25 UTC (rev 2649)
+++ trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/LogicalSourceHandler.java 2007-03-20 22:24:54 UTC (rev 2650)
@@ -81,8 +81,8 @@
String newValue = oldValue + ":" + getHandlerName();
element.setTextContent(newValue);
- log.info("oldValue: " + oldValue);
- log.info("newValue: " + newValue);
+ log.debug("oldValue: " + oldValue);
+ log.debug("newValue: " + newValue);
// Set the updated payload
source = new DOMSource(root);
Modified: trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/ProtocolHandler.java
===================================================================
--- trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/ProtocolHandler.java 2007-03-20 22:23:25 UTC (rev 2649)
+++ trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/ProtocolHandler.java 2007-03-20 22:24:54 UTC (rev 2650)
@@ -66,8 +66,8 @@
String newValue = oldValue + ":" + getHandlerName();
soapElement.setValue(newValue);
- log.info("oldValue: " + oldValue);
- log.info("newValue: " + newValue);
+ log.debug("oldValue: " + oldValue);
+ log.debug("newValue: " + newValue);
return true;
}
17 years, 10 months