JBossWS SVN: r2877 - in trunk/jbossws-core/src/java/org/jboss/ws: core/jaxrpc/client and 3 other directories.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-04-16 06:31:31 -0400 (Mon, 16 Apr 2007)
New Revision: 2877
Added:
trunk/jbossws-core/src/java/org/jboss/ws/core/client/ServiceObjectFactory.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/client/ServiceObjectFactoryJAXRPC.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ServiceObjectFactoryJAXWS.java
Removed:
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/client/ServiceObjectFactory.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ServiceObjectFactory.java
Modified:
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/client/ServiceReferenceable.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ServiceReferenceable.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java
trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxws/JAXWSClientMetaDataBuilder.java
Log:
Fix CTS regression
Added: trunk/jbossws-core/src/java/org/jboss/ws/core/client/ServiceObjectFactory.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/client/ServiceObjectFactory.java (rev 0)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/client/ServiceObjectFactory.java 2007-04-16 10:31:31 UTC (rev 2877)
@@ -0,0 +1,118 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+// $Id$
+package org.jboss.ws.core.client;
+
+// $Id$
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.naming.spi.ObjectFactory;
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.WSException;
+import org.jboss.ws.metadata.j2ee.serviceref.UnifiedPortComponentRefMetaData;
+import org.jboss.ws.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
+import org.jboss.ws.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.metadata.umdm.ServiceMetaData;
+
+/**
+ * This ServiceObjectFactory reconstructs a service for a given WSDL when the webservice client does a JNDI lookup
+ * <p/>
+ * It uses the information provided by the service-ref element in application-client.xml
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 15-April-2004
+ */
+public abstract class ServiceObjectFactory implements ObjectFactory
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(ServiceObjectFactory.class);
+
+ /**
+ * Narrow available endpoints by <port-component-ref> declarations.
+ * Service.getPort(SEI) must be able to retrieve a distinct port definition.
+ */
+ protected void narrowPortSelection(UnifiedServiceRefMetaData serviceRef, ServiceMetaData serviceMetaData)
+ {
+ Map<String, UnifiedPortComponentRefMetaData> pcrefs = new HashMap<String, UnifiedPortComponentRefMetaData>();
+ for (UnifiedPortComponentRefMetaData pcref : serviceRef.getPortComponentRefs())
+ {
+ String seiName = pcref.getServiceEndpointInterface();
+
+ // Constraint#1: within a service-ref it's not allowed to use a SEI across different pcref's
+ if (pcrefs.get(seiName) != null)
+ throw new WSException("Within a <service-ref> it's not allowed to use a SEI across different <port-component-ref>'s: " + seiName);
+
+ pcrefs.put(seiName, pcref);
+ }
+
+ // Constraint#2: A pcref may only match one EndpointMetaData
+ for (String sei : pcrefs.keySet())
+ {
+ // Narrow available endpoints by port-component-ref declaration
+ List<QName> narrowedEndpoints = new ArrayList<QName>();
+
+ UnifiedPortComponentRefMetaData pcref = pcrefs.get(sei);
+
+ // Constraint#3: Port selection only applies when both SEI and QName are given
+ if (pcref.getServiceEndpointInterface() != null && pcref.getPortQName() != null)
+ {
+ List<QName> pcRef2EndpointMapping = new ArrayList<QName>();
+ for (EndpointMetaData epMetaData : serviceMetaData.getEndpoints())
+ {
+ if (pcref.getServiceEndpointInterface().equals(epMetaData.getServiceEndpointInterfaceName()))
+ {
+ pcRef2EndpointMapping.add(epMetaData.getPortName());
+ }
+ }
+
+ for (QName q : pcRef2EndpointMapping)
+ {
+ EndpointMetaData mappedEndpoint = serviceMetaData.getEndpoint(q);
+ if (!pcref.getPortQName().equals(mappedEndpoint.getPortName()))
+ narrowedEndpoints.add(q);
+ }
+
+ // Constraint: Dont exclude all of them ;)
+ if (pcRef2EndpointMapping.size() > 0 && (pcRef2EndpointMapping.size() == narrowedEndpoints.size()))
+ throw new WSException("Failed to narrow available endpoints by <port-component-ref> declaration");
+
+ for (QName q : narrowedEndpoints)
+ {
+ EndpointMetaData removed = serviceMetaData.removeEndpoint(q);
+ log.debug("Narrowed endpoint " + q + "(" + removed + ")");
+ }
+ }
+ else
+ {
+ // TODO: In case there is more then one EMPD this should cause an exception
+ log.warn("Unable to narrow port selection for " + pcref);
+ }
+
+ }
+ }
+}
Property changes on: trunk/jbossws-core/src/java/org/jboss/ws/core/client/ServiceObjectFactory.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Deleted: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/client/ServiceObjectFactory.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/client/ServiceObjectFactory.java 2007-04-15 22:38:49 UTC (rev 2876)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/client/ServiceObjectFactory.java 2007-04-16 10:31:31 UTC (rev 2877)
@@ -1,366 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-// $Id$
-package org.jboss.ws.core.jaxrpc.client;
-
-// $Id$
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.Constants;
-import org.jboss.ws.WSException;
-import org.jboss.ws.core.server.ServiceEndpoint;
-import org.jboss.ws.core.server.ServiceEndpointManager;
-import org.jboss.ws.core.server.ServiceEndpointManagerFactory;
-import org.jboss.ws.metadata.j2ee.serviceref.UnifiedCallPropertyMetaData;
-import org.jboss.ws.metadata.j2ee.serviceref.UnifiedPortComponentRefMetaData;
-import org.jboss.ws.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
-import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
-import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMappingFactory;
-import org.jboss.ws.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.metadata.umdm.ServiceMetaData;
-import org.jboss.ws.metadata.wsse.WSSecurityConfiguration;
-import org.jboss.ws.tools.wsdl.WSDL11DefinitionFactory;
-
-import javax.naming.*;
-import javax.naming.spi.ObjectFactory;
-import javax.wsdl.Definition;
-import javax.xml.namespace.QName;
-import javax.xml.rpc.JAXRPCException;
-import javax.xml.rpc.Service;
-import java.io.*;
-import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.Proxy;
-import java.net.URL;
-import java.net.URLEncoder;
-import java.rmi.Remote;
-import java.util.*;
-
-/**
- * This ServiceObjectFactory reconstructs a javax.xml.rpc.Service
- * for a given WSDL when the webservice client does a JNDI lookup
- * <p/>
- * It uses the information provided by the service-ref element in application-client.xml
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 15-April-2004
- */
-public class ServiceObjectFactory implements ObjectFactory
-{
- // provide logging
- private static final Logger log = Logger.getLogger(ServiceObjectFactory.class);
-
- /**
- * Creates an object using the location or reference information specified.
- * <p/>
- *
- * @param obj The possibly null object containing location or reference
- * information that can be used in creating an object.
- * @param name The name of this object relative to <code>nameCtx</code>,
- * or null if no name is specified.
- * @param nameCtx The context relative to which the <code>name</code>
- * parameter is specified, or null if <code>name</code> is
- * relative to the default initial context.
- * @param environment The possibly null environment that is used in
- * creating the object.
- * @return The object created; null if an object cannot be created.
- * @throws Exception if this object factory encountered an exception
- * while attempting to create an object, and no other object factories are
- * to be tried.
- * @see javax.naming.spi.NamingManager#getObjectInstance
- * @see javax.naming.spi.NamingManager#getURLContext
- */
- public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable environment) throws Exception
- {
- try
- {
- Reference ref = (Reference)obj;
-
- // Unmarshall the ServiceRefMetaData
- UnifiedServiceRefMetaData serviceRef = null;
- RefAddr metaRefAddr = ref.get(ServiceReferenceable.SERVICE_REF_META_DATA);
- ByteArrayInputStream bais = new ByteArrayInputStream((byte[])metaRefAddr.getContent());
- try
- {
- ObjectInputStream ois = new ObjectInputStream(bais);
- serviceRef = (UnifiedServiceRefMetaData)ois.readObject();
- ois.close();
- }
- catch (IOException ex)
- {
- NamingException ne = new NamingException("Cannot unmarshall service ref meta data");
- ne.setRootCause(ex);
- throw ne;
- }
-
- // Unmarshall the WSSecurityConfiguration
- WSSecurityConfiguration securityConfig = null;
- RefAddr wsseRefAddr = ref.get(ServiceReferenceable.SECURITY_CONFIG);
- if (wsseRefAddr != null)
- {
- bais = new ByteArrayInputStream((byte[])wsseRefAddr.getContent());
- try
- {
- ObjectInputStream ois = new ObjectInputStream(bais);
- securityConfig = (WSSecurityConfiguration)ois.readObject();
- ois.close();
- }
- catch (IOException e)
- {
- throw new NamingException("Cannot unmarshall security config, cause: " + e.toString());
- }
- }
-
- ServiceImpl jaxrpcService = null;
- URL wsdlLocation = serviceRef.getWsdlLocation();
- if (wsdlLocation != null)
- {
- if(log.isDebugEnabled()) log.debug("Create jaxrpc service from wsdl");
-
- // Create the actual service object
- QName serviceName = serviceRef.getServiceQName();
- JavaWsdlMapping javaWsdlMapping = getJavaWsdlMapping(serviceRef);
- jaxrpcService = new ServiceImpl(serviceName, wsdlLocation, javaWsdlMapping, securityConfig, serviceRef);
- }
- else
- {
- if(log.isDebugEnabled()) log.debug("Create jaxrpc service with no wsdl");
- jaxrpcService = new ServiceImpl(new QName(Constants.NS_JBOSSWS_URI, "AnonymousService"));
- }
-
- ServiceMetaData serviceMetaData = jaxrpcService.getServiceMetaData();
-
- // Set any service level properties
- if (serviceRef.getCallProperties().size() > 0)
- {
- Properties callProps = new Properties();
- serviceMetaData.setProperties(callProps);
- for (UnifiedCallPropertyMetaData prop : serviceRef.getCallProperties())
- callProps.setProperty(prop.getPropName(), prop.getPropValue());
- }
-
- // The web service client using a port-component-link, the contet is the URL to
- // the PortComponentLinkServlet that will return the actual endpoint address
- RefAddr pcLinkRef = ref.get(ServiceReferenceable.PORT_COMPONENT_LINK);
- if (pcLinkRef != null)
- {
- String pcLink = (String)pcLinkRef.getContent();
- if(log.isDebugEnabled()) log.debug("Resolving port-component-link: " + pcLink);
-
- // First try to obtain the endpoint address loacally
- String endpointAddress = null;
- try
- {
- ServiceEndpointManagerFactory factory = ServiceEndpointManagerFactory.getInstance();
- ServiceEndpointManager epManager = factory.getServiceEndpointManager();
- ServiceEndpoint serviceEndpoint = epManager.resolvePortComponentLink(pcLink);
- if (serviceEndpoint == null)
- throw new WSException("Cannot resolve port-component-link: " + pcLink);
-
- endpointAddress = serviceEndpoint.getServiceEndpointInfo().getServerEndpointMetaData().getEndpointAddress();
- }
- catch (Throwable ex)
- {
- // ignore, we are probably a remote client
- }
-
- // We may be remote in the esoteric case where an appclient uses the port-comonent-link feature
- if (endpointAddress == null)
- {
- String servletPath = (String)ref.get(ServiceReferenceable.PORT_COMPONENT_LINK_SERVLET).getContent();
- servletPath += "?pcLink=" + URLEncoder.encode(pcLink, "UTF-8");
- InputStream is = new URL(servletPath).openStream();
- BufferedReader br = new BufferedReader(new InputStreamReader(is));
- endpointAddress = br.readLine();
- is.close();
- }
-
- if(log.isDebugEnabled()) log.debug("Resolved to: " + endpointAddress);
- if (serviceMetaData.getEndpoints().size() == 1)
- {
- EndpointMetaData epMetaData = serviceMetaData.getEndpoints().get(0);
- epMetaData.setEndpointAddress(endpointAddress);
- }
- else
- {
- log.warn("Cannot set endpoint address for port-component-link, unsuported number of endpoints");
- }
- }
-
- //narrowPortSelection(serviceRef, serviceMetaData);
-
- /********************************************************
- * Setup the Proxy that implements the service-interface
- ********************************************************/
-
- // load the service interface class
- ClassLoader contextCL = Thread.currentThread().getContextClassLoader();
- Class siClass = contextCL.loadClass(serviceRef.getServiceInterface());
- if (Service.class.isAssignableFrom(siClass) == false)
- throw new JAXRPCException("The service interface does not implement javax.xml.rpc.Service: " + siClass.getName());
-
- // load all service endpoint interface classes
- for (UnifiedPortComponentRefMetaData pcr : serviceRef.getPortComponentRefs())
- {
- Class seiClass = contextCL.loadClass(pcr.getServiceEndpointInterface());
- if (Remote.class.isAssignableFrom(seiClass) == false)
- throw new IllegalArgumentException("The SEI does not implement java.rmi.Remote: " + seiClass.getName());
- }
-
- // Setup the handler chain
- setupHandlerChain(jaxrpcService);
-
- InvocationHandler handler = new ServiceProxy(jaxrpcService, siClass);
- return Proxy.newProxyInstance(contextCL, new Class[] { siClass, ServiceExt.class }, handler);
- }
- catch (Exception ex)
- {
- log.error("Cannot create service", ex);
- throw ex;
- }
- }
-
- /**
- * Narrow port selection tries to nail down available endpoints
- * by <port-component-ref> declarations. A selection base upon
- * Service.getPort(SEI) later on needs to be distinct to an endpoint, or in this case EndpointMetaData.
- *
- * @param serviceRef
- * @param serviceMetaData
- */
- private void narrowPortSelection(UnifiedServiceRefMetaData serviceRef, ServiceMetaData serviceMetaData)
- {
- Map<String, List<UnifiedPortComponentRefMetaData>> seiGroups = new HashMap<String, List<UnifiedPortComponentRefMetaData>>();
- for(UnifiedPortComponentRefMetaData pcref : serviceRef.getPortComponentRefs())
- {
- String sei = pcref.getServiceEndpointInterface();
- if(null==seiGroups.get(sei))
- seiGroups.put(sei, new ArrayList<UnifiedPortComponentRefMetaData>());
- List<UnifiedPortComponentRefMetaData> group = seiGroups.get(sei);
- group.add(pcref);
-
- // Constraint#1: within a service-ref it's not allowed to use a SEI across different pcref's
- if(group.size()>1)
- throw new WSException("Within a <service-ref> it's not allowed to use a SEI across different <port-component-ref>'s: "+group);
- }
-
- // Constraint#2: A pcref may only match one EndpointMetaData
- for( String sei : seiGroups.keySet())
- {
- // Narrow available endpoints by port-component-ref declaration
- List<QName> narrowedEndpoints = new ArrayList<QName>();
-
- List<UnifiedPortComponentRefMetaData> group = seiGroups.get(sei);
- UnifiedPortComponentRefMetaData pcref = group.get(0); // distinct, see above Constraint#1
-
- // Constraint#3: Port selection only applies when both SEI and QName are given
- if(pcref.getServiceEndpointInterface()!=null && pcref.getPortQName()!=null)
- {
- List<QName> pcRef2EndpointMapping = new ArrayList<QName>();
- for(EndpointMetaData epMeta : serviceMetaData.getEndpoints())
- {
- if(pcref.getServiceEndpointInterface().equals(epMeta.getServiceEndpointInterfaceName()))
- {
- pcRef2EndpointMapping.add(epMeta.getPortName());
- }
-
- }
-
- for(QName q : pcRef2EndpointMapping)
- {
- EndpointMetaData mappedEndpoint = serviceMetaData.getEndpoint(q);
- if(! pcref.getPortQName().equals( mappedEndpoint.getPortName()) )
- narrowedEndpoints.add(q);
- }
-
- // Constraint: Dont exclude all of them ;)
- if(pcRef2EndpointMapping.size()>0 && (pcRef2EndpointMapping.size() == narrowedEndpoints.size()))
- throw new WSException("Failed to narrow available endpoints by <port-component-ref> declaration");
-
- for(QName q : narrowedEndpoints)
- {
- EndpointMetaData removed = serviceMetaData.removeEndpoint(q);
- log.debug("Narrowed endpoint " + q + "("+removed+")");
- }
- }
- else
- {
- // TODO: In case there is more then one EMPD this should cause an exception
- log.warn("Unable to narrow port selection for "+ pcref);
- }
-
- }
- }
-
- /**
- * Setup the handler chain(s) for this service
- */
- private void setupHandlerChain(ServiceImpl jaxrpcService) throws Exception
- {
- List<EndpointMetaData> endpoints = jaxrpcService.getServiceMetaData().getEndpoints();
- for (EndpointMetaData epMetaData : endpoints)
- {
- jaxrpcService.setupHandlerChain(epMetaData);
- }
- }
-
- private JavaWsdlMapping getJavaWsdlMapping(UnifiedServiceRefMetaData serviceRef)
- {
- JavaWsdlMapping javaWsdlMapping = null;
- if (serviceRef.getMappingFile() != null)
- {
- String mappingFile = serviceRef.getMappingFile();
- try
- {
- JavaWsdlMappingFactory mappingFactory = JavaWsdlMappingFactory.newInstance();
- URL mappingURL = serviceRef.getVfsRoot().findChild(mappingFile).toURL();
- javaWsdlMapping = mappingFactory.parse(mappingURL);
- }
- catch (Exception e)
- {
- throw new WSException("Cannot unmarshal jaxrpc-mapping-file: " + mappingFile, e);
- }
- }
- return javaWsdlMapping;
- }
-
- private Definition getWsdlDefinition(UnifiedServiceRefMetaData serviceRef)
- {
- Definition wsdlDefinition = null;
- {
- URL wsdlLocation = serviceRef.getWsdlLocation();
- if (wsdlLocation != null)
- {
- try
- {
- WSDL11DefinitionFactory factory = WSDL11DefinitionFactory.newInstance();
- wsdlDefinition = factory.parse(wsdlLocation);
- }
- catch (Exception e)
- {
- throw new WSException("Cannot unmarshall wsdl-file: " + wsdlLocation, e);
- }
- }
- }
- return wsdlDefinition;
- }
-
-}
Copied: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/client/ServiceObjectFactoryJAXRPC.java (from rev 2876, trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/client/ServiceObjectFactory.java)
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/client/ServiceObjectFactoryJAXRPC.java (rev 0)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/client/ServiceObjectFactoryJAXRPC.java 2007-04-16 10:31:31 UTC (rev 2877)
@@ -0,0 +1,286 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+// $Id$
+package org.jboss.ws.core.jaxrpc.client;
+
+// $Id$
+
+import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.ObjectInputStream;
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Proxy;
+import java.net.URL;
+import java.net.URLEncoder;
+import java.rmi.Remote;
+import java.util.Hashtable;
+import java.util.List;
+import java.util.Properties;
+
+import javax.naming.Context;
+import javax.naming.Name;
+import javax.naming.NamingException;
+import javax.naming.RefAddr;
+import javax.naming.Reference;
+import javax.xml.namespace.QName;
+import javax.xml.rpc.JAXRPCException;
+import javax.xml.rpc.Service;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.Constants;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.client.ServiceObjectFactory;
+import org.jboss.ws.core.server.ServiceEndpoint;
+import org.jboss.ws.core.server.ServiceEndpointManager;
+import org.jboss.ws.core.server.ServiceEndpointManagerFactory;
+import org.jboss.ws.metadata.j2ee.serviceref.UnifiedCallPropertyMetaData;
+import org.jboss.ws.metadata.j2ee.serviceref.UnifiedPortComponentRefMetaData;
+import org.jboss.ws.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
+import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
+import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMappingFactory;
+import org.jboss.ws.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.metadata.umdm.ServiceMetaData;
+import org.jboss.ws.metadata.wsse.WSSecurityConfiguration;
+
+/**
+ * This ServiceObjectFactory reconstructs a javax.xml.rpc.Service
+ * for a given WSDL when the webservice client does a JNDI lookup
+ * <p/>
+ * It uses the information provided by the service-ref element in application-client.xml
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 15-April-2004
+ */
+public class ServiceObjectFactoryJAXRPC extends ServiceObjectFactory
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(ServiceObjectFactoryJAXRPC.class);
+
+ /**
+ * Creates an object using the location or reference information specified.
+ * <p/>
+ *
+ * @param obj The possibly null object containing location or reference
+ * information that can be used in creating an object.
+ * @param name The name of this object relative to <code>nameCtx</code>,
+ * or null if no name is specified.
+ * @param nameCtx The context relative to which the <code>name</code>
+ * parameter is specified, or null if <code>name</code> is
+ * relative to the default initial context.
+ * @param environment The possibly null environment that is used in
+ * creating the object.
+ * @return The object created; null if an object cannot be created.
+ * @throws Exception if this object factory encountered an exception
+ * while attempting to create an object, and no other object factories are
+ * to be tried.
+ * @see javax.naming.spi.NamingManager#getObjectInstance
+ * @see javax.naming.spi.NamingManager#getURLContext
+ */
+ public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable environment) throws Exception
+ {
+ try
+ {
+ Reference ref = (Reference)obj;
+
+ // Unmarshall the ServiceRefMetaData
+ UnifiedServiceRefMetaData serviceRef = null;
+ RefAddr metaRefAddr = ref.get(ServiceReferenceable.SERVICE_REF_META_DATA);
+ ByteArrayInputStream bais = new ByteArrayInputStream((byte[])metaRefAddr.getContent());
+ try
+ {
+ ObjectInputStream ois = new ObjectInputStream(bais);
+ serviceRef = (UnifiedServiceRefMetaData)ois.readObject();
+ ois.close();
+ }
+ catch (IOException ex)
+ {
+ NamingException ne = new NamingException("Cannot unmarshall service ref meta data");
+ ne.setRootCause(ex);
+ throw ne;
+ }
+
+ // Unmarshall the WSSecurityConfiguration
+ WSSecurityConfiguration securityConfig = null;
+ RefAddr wsseRefAddr = ref.get(ServiceReferenceable.SECURITY_CONFIG);
+ if (wsseRefAddr != null)
+ {
+ bais = new ByteArrayInputStream((byte[])wsseRefAddr.getContent());
+ try
+ {
+ ObjectInputStream ois = new ObjectInputStream(bais);
+ securityConfig = (WSSecurityConfiguration)ois.readObject();
+ ois.close();
+ }
+ catch (IOException e)
+ {
+ throw new NamingException("Cannot unmarshall security config, cause: " + e.toString());
+ }
+ }
+
+ ServiceImpl jaxrpcService = null;
+ URL wsdlLocation = serviceRef.getWsdlLocation();
+ if (wsdlLocation != null)
+ {
+ if (log.isDebugEnabled())
+ log.debug("Create jaxrpc service from wsdl");
+
+ // Create the actual service object
+ QName serviceName = serviceRef.getServiceQName();
+ JavaWsdlMapping javaWsdlMapping = getJavaWsdlMapping(serviceRef);
+ jaxrpcService = new ServiceImpl(serviceName, wsdlLocation, javaWsdlMapping, securityConfig, serviceRef);
+ }
+ else
+ {
+ if (log.isDebugEnabled())
+ log.debug("Create jaxrpc service with no wsdl");
+ jaxrpcService = new ServiceImpl(new QName(Constants.NS_JBOSSWS_URI, "AnonymousService"));
+ }
+
+ ServiceMetaData serviceMetaData = jaxrpcService.getServiceMetaData();
+
+ // Set any service level properties
+ if (serviceRef.getCallProperties().size() > 0)
+ {
+ Properties callProps = new Properties();
+ serviceMetaData.setProperties(callProps);
+ for (UnifiedCallPropertyMetaData prop : serviceRef.getCallProperties())
+ callProps.setProperty(prop.getPropName(), prop.getPropValue());
+ }
+
+ // The web service client using a port-component-link, the contet is the URL to
+ // the PortComponentLinkServlet that will return the actual endpoint address
+ RefAddr pcLinkRef = ref.get(ServiceReferenceable.PORT_COMPONENT_LINK);
+ if (pcLinkRef != null)
+ {
+ String pcLink = (String)pcLinkRef.getContent();
+ if (log.isDebugEnabled())
+ log.debug("Resolving port-component-link: " + pcLink);
+
+ // First try to obtain the endpoint address loacally
+ String endpointAddress = null;
+ try
+ {
+ ServiceEndpointManagerFactory factory = ServiceEndpointManagerFactory.getInstance();
+ ServiceEndpointManager epManager = factory.getServiceEndpointManager();
+ ServiceEndpoint serviceEndpoint = epManager.resolvePortComponentLink(pcLink);
+ if (serviceEndpoint == null)
+ throw new WSException("Cannot resolve port-component-link: " + pcLink);
+
+ endpointAddress = serviceEndpoint.getServiceEndpointInfo().getServerEndpointMetaData().getEndpointAddress();
+ }
+ catch (Throwable ex)
+ {
+ // ignore, we are probably a remote client
+ }
+
+ // We may be remote in the esoteric case where an appclient uses the port-comonent-link feature
+ if (endpointAddress == null)
+ {
+ String servletPath = (String)ref.get(ServiceReferenceable.PORT_COMPONENT_LINK_SERVLET).getContent();
+ servletPath += "?pcLink=" + URLEncoder.encode(pcLink, "UTF-8");
+ InputStream is = new URL(servletPath).openStream();
+ BufferedReader br = new BufferedReader(new InputStreamReader(is));
+ endpointAddress = br.readLine();
+ is.close();
+ }
+
+ if (log.isDebugEnabled())
+ log.debug("Resolved to: " + endpointAddress);
+ if (serviceMetaData.getEndpoints().size() == 1)
+ {
+ EndpointMetaData epMetaData = serviceMetaData.getEndpoints().get(0);
+ epMetaData.setEndpointAddress(endpointAddress);
+ }
+ else
+ {
+ log.warn("Cannot set endpoint address for port-component-link, unsuported number of endpoints");
+ }
+ }
+
+ narrowPortSelection(serviceRef, serviceMetaData);
+
+ /********************************************************
+ * Setup the Proxy that implements the service-interface
+ ********************************************************/
+
+ // load the service interface class
+ ClassLoader contextCL = Thread.currentThread().getContextClassLoader();
+ Class siClass = contextCL.loadClass(serviceRef.getServiceInterface());
+ if (Service.class.isAssignableFrom(siClass) == false)
+ throw new JAXRPCException("The service interface does not implement javax.xml.rpc.Service: " + siClass.getName());
+
+ // load all service endpoint interface classes
+ for (UnifiedPortComponentRefMetaData pcr : serviceRef.getPortComponentRefs())
+ {
+ Class seiClass = contextCL.loadClass(pcr.getServiceEndpointInterface());
+ if (Remote.class.isAssignableFrom(seiClass) == false)
+ throw new IllegalArgumentException("The SEI does not implement java.rmi.Remote: " + seiClass.getName());
+ }
+
+ // Setup the handler chain
+ setupHandlerChain(jaxrpcService);
+
+ InvocationHandler handler = new ServiceProxy(jaxrpcService, siClass);
+ return Proxy.newProxyInstance(contextCL, new Class[] { siClass, ServiceExt.class }, handler);
+ }
+ catch (Exception ex)
+ {
+ log.error("Cannot create service", ex);
+ throw ex;
+ }
+ }
+
+ /**
+ * Setup the handler chain(s) for this service
+ */
+ private void setupHandlerChain(ServiceImpl jaxrpcService) throws Exception
+ {
+ List<EndpointMetaData> endpoints = jaxrpcService.getServiceMetaData().getEndpoints();
+ for (EndpointMetaData epMetaData : endpoints)
+ {
+ jaxrpcService.setupHandlerChain(epMetaData);
+ }
+ }
+
+ private JavaWsdlMapping getJavaWsdlMapping(UnifiedServiceRefMetaData serviceRef)
+ {
+ JavaWsdlMapping javaWsdlMapping = null;
+ if (serviceRef.getMappingFile() != null)
+ {
+ String mappingFile = serviceRef.getMappingFile();
+ try
+ {
+ JavaWsdlMappingFactory mappingFactory = JavaWsdlMappingFactory.newInstance();
+ URL mappingURL = serviceRef.getVfsRoot().findChild(mappingFile).toURL();
+ javaWsdlMapping = mappingFactory.parse(mappingURL);
+ }
+ catch (Exception e)
+ {
+ throw new WSException("Cannot unmarshal jaxrpc-mapping-file: " + mappingFile, e);
+ }
+ }
+ return javaWsdlMapping;
+ }
+}
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/client/ServiceReferenceable.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/client/ServiceReferenceable.java 2007-04-15 22:38:49 UTC (rev 2876)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/client/ServiceReferenceable.java 2007-04-16 10:31:31 UTC (rev 2877)
@@ -83,7 +83,7 @@
*/
public Reference getReference() throws NamingException
{
- Reference myRef = new Reference(ServiceReferenceable.class.getName(), ServiceObjectFactory.class.getName(), null);
+ Reference myRef = new Reference(ServiceReferenceable.class.getName(), ServiceObjectFactoryJAXRPC.class.getName(), null);
// Add a reference to the ServiceRefMetaData and WSDLDefinitions
myRef.add(new BinaryRefAddr(SERVICE_REF_META_DATA, marshallServiceRef()));
Deleted: 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-04-15 22:38:49 UTC (rev 2876)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ServiceObjectFactory.java 2007-04-16 10:31:31 UTC (rev 2877)
@@ -1,240 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-// $Id$
-package org.jboss.ws.core.jaxws.client;
-
-// $Id$
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.net.URL;
-import java.util.Hashtable;
-
-import javax.naming.Context;
-import javax.naming.Name;
-import javax.naming.NamingException;
-import javax.naming.RefAddr;
-import javax.naming.Reference;
-import javax.naming.spi.ObjectFactory;
-import javax.xml.namespace.QName;
-import javax.xml.ws.Service;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.WSException;
-import org.jboss.ws.core.ConfigProvider;
-import org.jboss.ws.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
-
-/**
- * This ServiceObjectFactory reconstructs a javax.xml.ws.Service
- * for a given WSDL when the webservice client does a JNDI lookup
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 24-Oct-2004
- */
-public class ServiceObjectFactory implements ObjectFactory
-{
- // provide logging
- private static final Logger log = Logger.getLogger(ServiceObjectFactory.class);
-
- // The ServiceRefMetaData association
- private static ThreadLocal<UnifiedServiceRefMetaData> serviceRefAssociation = new ThreadLocal<UnifiedServiceRefMetaData>();
-
- /**
- * Creates an object using the location or reference information specified.
- * <p/>
- *
- * @param obj The possibly null object containing location or reference
- * information that can be used in creating an object.
- * @param name The name of this object relative to <code>nameCtx</code>,
- * or null if no name is specified.
- * @param nameCtx The context relative to which the <code>name</code>
- * parameter is specified, or null if <code>name</code> is
- * relative to the default initial context.
- * @param environment The possibly null environment that is used in
- * creating the object.
- * @return The object created; null if an object cannot be created.
- * @throws Exception if this object factory encountered an exception
- * while attempting to create an object, and no other object factories are
- * to be tried.
- * @see javax.naming.spi.NamingManager#getObjectInstance
- * @see javax.naming.spi.NamingManager#getURLContext
- */
- public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable environment) throws Exception
- {
- try
- {
- Reference ref = (Reference)obj;
-
- // Get the target class name
- String targetClassName = (String)ref.get(ServiceReferenceable.TARGET_CLASS_NAME).getContent();
-
- // Unmarshall the UnifiedServiceRef
- UnifiedServiceRefMetaData serviceRef = unmarshallServiceRef(ref);
- String serviceRefName = serviceRef.getServiceRefName();
- QName serviceQName = serviceRef.getServiceQName();
-
- String serviceImplClass = serviceRef.getServiceImplClass();
- if (serviceImplClass == null)
- serviceImplClass = (String)ref.get(ServiceReferenceable.SERVICE_IMPL_CLASS).getContent();
-
- // If the target defaults to javax.xml.ws.Service, use the service as the target
- if (Service.class.getName().equals(targetClassName))
- targetClassName = serviceImplClass;
-
- log.debug("[name=" + serviceRefName + ",service=" + serviceImplClass + ",target=" + targetClassName + "]");
-
- // Load the service class
- ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
- Class serviceClass = ctxLoader.loadClass(serviceImplClass);
- Class targetClass = (targetClassName != null ? ctxLoader.loadClass(targetClassName) : null);
-
- if (Service.class.isAssignableFrom(serviceClass) == false)
- throw new IllegalArgumentException("WebServiceRef type '" + serviceClass + "' is not assignable to javax.xml.ws.Service");
-
- // Receives either a javax.xml.ws.Service or a dynamic proxy
- Object target;
-
- // Get the URL to the wsdl
- URL wsdlURL = serviceRef.getWsdlLocation();
- try
- {
- // Associate the ServiceRefMetaData with this thread
- serviceRefAssociation.set(serviceRef);
-
- // Generic javax.xml.ws.Service
- if (serviceClass == Service.class)
- {
- if (wsdlURL != null)
- {
- target = Service.create(wsdlURL, serviceQName);
- }
- else
- {
- throw new IllegalArgumentException("Cannot create generic javax.xml.ws.Service without wsdlLocation: " + serviceRefName);
- }
- }
- // Generated javax.xml.ws.Service subclass
- else
- {
- if (wsdlURL != null)
- {
- Constructor ctor = serviceClass.getConstructor(new Class[] { URL.class, QName.class });
- target = ctor.newInstance(new Object[] { wsdlURL, serviceQName });
- }
- else
- {
- target = (Service)serviceClass.newInstance();
- }
- }
- }
- finally
- {
- serviceRefAssociation.set(null);
- }
-
- // Configure the service
- configureService((Service)target, serviceRef);
-
- if (targetClassName != null && targetClassName.equals(serviceImplClass) == false)
- {
- try
- {
- Object port = null;
- if (serviceClass != Service.class)
- {
- for (Method method : serviceClass.getDeclaredMethods())
- {
- String methodName = method.getName();
- Class retType = method.getReturnType();
- if (methodName.startsWith("get") && targetClass.isAssignableFrom(retType))
- {
- port = method.invoke(target, new Object[0]);
- target = port;
- break;
- }
- }
- }
-
- if (port == null)
- {
- Method method = serviceClass.getMethod("getPort", new Class[] { Class.class });
- port = method.invoke(target, new Object[] { targetClass });
- target = port;
- }
- }
- catch (InvocationTargetException ex)
- {
- throw ex.getTargetException();
- }
- }
-
- return target;
- }
- catch (Throwable ex)
- {
- WSException.rethrow("Cannot create service", ex);
- return null;
- }
- }
-
- public static UnifiedServiceRefMetaData getServiceRefAssociation()
- {
- // The ServiceDelegateImpl get the usRef at ctor time
- return (UnifiedServiceRefMetaData)serviceRefAssociation.get();
- }
-
- private void configureService(Service service, UnifiedServiceRefMetaData serviceRef)
- {
- String configFile = serviceRef.getConfigFile();
- String configName = serviceRef.getConfigName();
- if (service instanceof ConfigProvider)
- {
- if(log.isDebugEnabled()) log.debug("Configure Service: [configName=" + configName + ",configFile=" + configFile + "]");
-
- ConfigProvider cp = (ConfigProvider)service;
- if (configName != null || configFile != null)
- cp.setConfigName(configName, configFile);
- }
- }
-
- private UnifiedServiceRefMetaData unmarshallServiceRef(Reference ref) throws ClassNotFoundException, NamingException
- {
- UnifiedServiceRefMetaData sref;
- RefAddr refAddr = ref.get(ServiceReferenceable.SERVICE_REF_META_DATA);
- ByteArrayInputStream bais = new ByteArrayInputStream((byte[])refAddr.getContent());
- try
- {
- ObjectInputStream ois = new ObjectInputStream(bais);
- sref = (UnifiedServiceRefMetaData)ois.readObject();
- ois.close();
- }
- catch (IOException e)
- {
- throw new NamingException("Cannot unmarshall service ref meta data, cause: " + e.toString());
- }
- return sref;
- }
-}
Added: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ServiceObjectFactoryJAXWS.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ServiceObjectFactoryJAXWS.java (rev 0)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ServiceObjectFactoryJAXWS.java 2007-04-16 10:31:31 UTC (rev 2877)
@@ -0,0 +1,241 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+// $Id$
+package org.jboss.ws.core.jaxws.client;
+
+// $Id$
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.net.URL;
+import java.util.Hashtable;
+
+import javax.naming.Context;
+import javax.naming.Name;
+import javax.naming.NamingException;
+import javax.naming.RefAddr;
+import javax.naming.Reference;
+import javax.naming.spi.ObjectFactory;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.ConfigProvider;
+import org.jboss.ws.core.client.ServiceObjectFactory;
+import org.jboss.ws.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
+
+/**
+ * This ServiceObjectFactory reconstructs a javax.xml.ws.Service
+ * for a given WSDL when the webservice client does a JNDI lookup
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 24-Oct-2004
+ */
+public class ServiceObjectFactoryJAXWS extends ServiceObjectFactory
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(ServiceObjectFactoryJAXWS.class);
+
+ // The ServiceRefMetaData association
+ private static ThreadLocal<UnifiedServiceRefMetaData> serviceRefAssociation = new ThreadLocal<UnifiedServiceRefMetaData>();
+
+ /**
+ * Creates an object using the location or reference information specified.
+ * <p/>
+ *
+ * @param obj The possibly null object containing location or reference
+ * information that can be used in creating an object.
+ * @param name The name of this object relative to <code>nameCtx</code>,
+ * or null if no name is specified.
+ * @param nameCtx The context relative to which the <code>name</code>
+ * parameter is specified, or null if <code>name</code> is
+ * relative to the default initial context.
+ * @param environment The possibly null environment that is used in
+ * creating the object.
+ * @return The object created; null if an object cannot be created.
+ * @throws Exception if this object factory encountered an exception
+ * while attempting to create an object, and no other object factories are
+ * to be tried.
+ * @see javax.naming.spi.NamingManager#getObjectInstance
+ * @see javax.naming.spi.NamingManager#getURLContext
+ */
+ public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable environment) throws Exception
+ {
+ try
+ {
+ Reference ref = (Reference)obj;
+
+ // Get the target class name
+ String targetClassName = (String)ref.get(ServiceReferenceable.TARGET_CLASS_NAME).getContent();
+
+ // Unmarshall the UnifiedServiceRef
+ UnifiedServiceRefMetaData serviceRef = unmarshallServiceRef(ref);
+ String serviceRefName = serviceRef.getServiceRefName();
+ QName serviceQName = serviceRef.getServiceQName();
+
+ String serviceImplClass = serviceRef.getServiceImplClass();
+ if (serviceImplClass == null)
+ serviceImplClass = (String)ref.get(ServiceReferenceable.SERVICE_IMPL_CLASS).getContent();
+
+ // If the target defaults to javax.xml.ws.Service, use the service as the target
+ if (Service.class.getName().equals(targetClassName))
+ targetClassName = serviceImplClass;
+
+ log.debug("[name=" + serviceRefName + ",service=" + serviceImplClass + ",target=" + targetClassName + "]");
+
+ // Load the service class
+ ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
+ Class serviceClass = ctxLoader.loadClass(serviceImplClass);
+ Class targetClass = (targetClassName != null ? ctxLoader.loadClass(targetClassName) : null);
+
+ if (Service.class.isAssignableFrom(serviceClass) == false)
+ throw new IllegalArgumentException("WebServiceRef type '" + serviceClass + "' is not assignable to javax.xml.ws.Service");
+
+ // Receives either a javax.xml.ws.Service or a dynamic proxy
+ Object target;
+
+ // Get the URL to the wsdl
+ URL wsdlURL = serviceRef.getWsdlLocation();
+ try
+ {
+ // Associate the ServiceRefMetaData with this thread
+ serviceRefAssociation.set(serviceRef);
+
+ // Generic javax.xml.ws.Service
+ if (serviceClass == Service.class)
+ {
+ if (wsdlURL != null)
+ {
+ target = Service.create(wsdlURL, serviceQName);
+ }
+ else
+ {
+ throw new IllegalArgumentException("Cannot create generic javax.xml.ws.Service without wsdlLocation: " + serviceRefName);
+ }
+ }
+ // Generated javax.xml.ws.Service subclass
+ else
+ {
+ if (wsdlURL != null)
+ {
+ Constructor ctor = serviceClass.getConstructor(new Class[] { URL.class, QName.class });
+ target = ctor.newInstance(new Object[] { wsdlURL, serviceQName });
+ }
+ else
+ {
+ target = (Service)serviceClass.newInstance();
+ }
+ }
+ }
+ finally
+ {
+ serviceRefAssociation.set(null);
+ }
+
+ // Configure the service
+ configureService((Service)target, serviceRef);
+
+ if (targetClassName != null && targetClassName.equals(serviceImplClass) == false)
+ {
+ try
+ {
+ Object port = null;
+ if (serviceClass != Service.class)
+ {
+ for (Method method : serviceClass.getDeclaredMethods())
+ {
+ String methodName = method.getName();
+ Class retType = method.getReturnType();
+ if (methodName.startsWith("get") && targetClass.isAssignableFrom(retType))
+ {
+ port = method.invoke(target, new Object[0]);
+ target = port;
+ break;
+ }
+ }
+ }
+
+ if (port == null)
+ {
+ Method method = serviceClass.getMethod("getPort", new Class[] { Class.class });
+ port = method.invoke(target, new Object[] { targetClass });
+ target = port;
+ }
+ }
+ catch (InvocationTargetException ex)
+ {
+ throw ex.getTargetException();
+ }
+ }
+
+ return target;
+ }
+ catch (Throwable ex)
+ {
+ WSException.rethrow("Cannot create service", ex);
+ return null;
+ }
+ }
+
+ public static UnifiedServiceRefMetaData getServiceRefAssociation()
+ {
+ // The ServiceDelegateImpl get the usRef at ctor time
+ return (UnifiedServiceRefMetaData)serviceRefAssociation.get();
+ }
+
+ private void configureService(Service service, UnifiedServiceRefMetaData serviceRef)
+ {
+ String configFile = serviceRef.getConfigFile();
+ String configName = serviceRef.getConfigName();
+ if (service instanceof ConfigProvider)
+ {
+ if(log.isDebugEnabled()) log.debug("Configure Service: [configName=" + configName + ",configFile=" + configFile + "]");
+
+ ConfigProvider cp = (ConfigProvider)service;
+ if (configName != null || configFile != null)
+ cp.setConfigName(configName, configFile);
+ }
+ }
+
+ private UnifiedServiceRefMetaData unmarshallServiceRef(Reference ref) throws ClassNotFoundException, NamingException
+ {
+ UnifiedServiceRefMetaData sref;
+ RefAddr refAddr = ref.get(ServiceReferenceable.SERVICE_REF_META_DATA);
+ ByteArrayInputStream bais = new ByteArrayInputStream((byte[])refAddr.getContent());
+ try
+ {
+ ObjectInputStream ois = new ObjectInputStream(bais);
+ sref = (UnifiedServiceRefMetaData)ois.readObject();
+ ois.close();
+ }
+ catch (IOException e)
+ {
+ throw new NamingException("Cannot unmarshall service ref meta data, cause: " + e.toString());
+ }
+ return sref;
+ }
+}
Property changes on: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ServiceObjectFactoryJAXWS.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ServiceReferenceable.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ServiceReferenceable.java 2007-04-15 22:38:49 UTC (rev 2876)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ServiceReferenceable.java 2007-04-16 10:31:31 UTC (rev 2877)
@@ -71,7 +71,7 @@
*/
public Reference getReference() throws NamingException
{
- Reference myRef = new Reference(ServiceReferenceable.class.getName(), ServiceObjectFactory.class.getName(), null);
+ Reference myRef = new Reference(ServiceReferenceable.class.getName(), ServiceObjectFactoryJAXWS.class.getName(), null);
myRef.add(new StringRefAddr(SERVICE_IMPL_CLASS, serviceImplClass));
myRef.add(new StringRefAddr(TARGET_CLASS_NAME, targetClassName));
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java 2007-04-15 22:38:49 UTC (rev 2876)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java 2007-04-16 10:31:31 UTC (rev 2877)
@@ -23,8 +23,6 @@
// $Id$
-import java.io.IOException;
-import java.io.InputStream;
import java.lang.reflect.Proxy;
import java.net.URL;
import java.util.ArrayList;
@@ -41,7 +39,6 @@
import javax.xml.ws.BindingProvider;
import javax.xml.ws.Dispatch;
import javax.xml.ws.EndpointReference;
-import javax.xml.ws.Service;
import javax.xml.ws.WebServiceException;
import javax.xml.ws.WebServiceFeature;
import javax.xml.ws.Service.Mode;
@@ -54,7 +51,7 @@
import org.jboss.ws.core.jaxws.client.ClientImpl;
import org.jboss.ws.core.jaxws.client.ClientProxy;
import org.jboss.ws.core.jaxws.client.DispatchImpl;
-import org.jboss.ws.core.jaxws.client.ServiceObjectFactory;
+import org.jboss.ws.core.jaxws.client.ServiceObjectFactoryJAXWS;
import org.jboss.ws.core.jaxws.handler.HandlerResolverImpl;
import org.jboss.ws.integration.ResourceLoaderAdapter;
import org.jboss.ws.integration.UnifiedVirtualFile;
@@ -105,35 +102,11 @@
public ServiceDelegateImpl(URL wsdlURL, QName serviceName, Class serviceClass)
{
- UnifiedVirtualFile vfsRoot;
-
// If this Service was constructed through the ServiceObjectFactory
// this thread local association should be available
- usRef = ServiceObjectFactory.getServiceRefAssociation();
- if (usRef != null)
- {
- vfsRoot = usRef.getVfsRoot();
+ usRef = ServiceObjectFactoryJAXWS.getServiceRefAssociation();
+ UnifiedVirtualFile vfsRoot = (usRef != null ? vfsRoot = usRef.getVfsRoot() : new ResourceLoaderAdapter());
- // Verify wsdl access if this is not a generic Service
- if (wsdlURL != null && serviceClass != Service.class)
- {
- try
- {
- InputStream is = wsdlURL.openStream();
- is.close();
- }
- catch (IOException e)
- {
- log.warn("Cannot access wsdlURL: " + wsdlURL);
- wsdlURL = null;
- }
- }
- }
- else
- {
- vfsRoot = new ResourceLoaderAdapter();
- }
-
if (wsdlURL != null)
{
JAXWSClientMetaDataBuilder builder = new JAXWSClientMetaDataBuilder();
@@ -182,18 +155,12 @@
if (serviceMetaData == null)
throw new WebServiceException("Service meta data not available");
+ // com/sun/ts/tests/jaxws/api/javax_xml_ws/Service
+ // GetPort1NegTest1WithWsdl_from_wsappclient
EndpointMetaData epMetaData = serviceMetaData.getEndpoint(portName);
if (epMetaData == null)
- {
- log.warn("Cannot get port meta data for: " + portName);
+ throw new WebServiceException("Cannot get port meta data for: " + portName);
- if (!seiClass.isAnnotationPresent(WebService.class))
- throw new IllegalArgumentException("Cannot find @WebService on: " + seiClass.getName());
-
- QName portType = getPortTypeName(seiClass);
- epMetaData = new ClientEndpointMetaData(serviceMetaData, portName, portType, Type.JAXWS);
- }
-
String seiClassName = seiClass.getName();
epMetaData.setServiceEndpointInterfaceName(seiClassName);
@@ -215,11 +182,11 @@
return portType;
}
- @Override
/**
* The getPort method returns a stub. A service client uses this stub to invoke operations on the target service endpoint.
* The serviceEndpointInterface specifies the service endpoint interface that is supported by the created dynamic proxy or stub instance.
*/
+ @Override
public <T> T getPort(Class<T> seiClass)
{
assertSEIConstraints(seiClass);
@@ -237,18 +204,10 @@
}
else
{
- // resolve PortType by name
- WebService ws = seiClass.getAnnotation(WebService.class);
- String ns = ws.targetNamespace();
- String name = ws.name();
-
- // TODO: default name mapping when annotations not used
- QName portTypeName = new QName(ns, name);
-
+ QName portTypeName = getPortTypeName(seiClass);
for (EndpointMetaData epmd : serviceMetaData.getEndpoints())
{
- QName interfaceQName = epmd.getPortTypeName(); // skip namespaces here
- if (interfaceQName.getLocalPart().equals(portTypeName.getLocalPart()))
+ if (portTypeName.equals(epmd.getPortTypeName()))
{
epmd.setServiceEndpointInterfaceName(seiClass.getName());
epMetaData = epmd;
Modified: trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxws/JAXWSClientMetaDataBuilder.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxws/JAXWSClientMetaDataBuilder.java 2007-04-15 22:38:49 UTC (rev 2876)
+++ trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxws/JAXWSClientMetaDataBuilder.java 2007-04-16 10:31:31 UTC (rev 2877)
@@ -34,7 +34,7 @@
import org.jboss.ws.Constants;
import org.jboss.ws.WSException;
import org.jboss.ws.core.jaxrpc.Style;
-import org.jboss.ws.core.jaxws.client.ServiceObjectFactory;
+import org.jboss.ws.core.jaxws.client.ServiceObjectFactoryJAXWS;
import org.jboss.ws.integration.ResourceLoaderAdapter;
import org.jboss.ws.integration.UnifiedVirtualFile;
import org.jboss.ws.metadata.umdm.ClientEndpointMetaData;
@@ -161,7 +161,7 @@
*/
private void bufferServiceRefContributions(EndpointMetaData epMetaData)
{
- UnifiedServiceRefMetaData serviceRefMetaData = ServiceObjectFactory.getServiceRefAssociation();
+ UnifiedServiceRefMetaData serviceRefMetaData = ServiceObjectFactoryJAXWS.getServiceRefAssociation();
if(serviceRefMetaData!=null)
{
17 years, 8 months
JBossWS SVN: r2876 - branches/dlofthouse.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2007-04-15 18:38:49 -0400 (Sun, 15 Apr 2007)
New Revision: 2876
Removed:
branches/dlofthouse/JBWS-1133-Old/
Log:
No longer required.
17 years, 8 months
JBossWS SVN: r2875 - tags and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-04-15 11:52:54 -0400 (Sun, 15 Apr 2007)
New Revision: 2875
Added:
tags/jbossws-1.2.1.GA/
Removed:
branches/jbossws-1.2.1/
Log:
Release jbossws-1.2.1.GA
Copied: tags/jbossws-1.2.1.GA (from rev 2874, branches/jbossws-1.2.1)
17 years, 8 months
JBossWS SVN: r2874 - in branches/dlofthouse/JBWS-1133: jbossws-tests/ant-import and 5 other directories.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2007-04-15 11:49:49 -0400 (Sun, 15 Apr 2007)
New Revision: 2874
Added:
branches/dlofthouse/JBWS-1133/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/ServletParamReader.java
branches/dlofthouse/JBWS-1133/jbossws-tests/src/java/org/jboss/test/ws/jaxws/jbws1133/
branches/dlofthouse/JBWS-1133/jbossws-tests/src/java/org/jboss/test/ws/jaxws/jbws1133/JBWS1133TestCase.java
branches/dlofthouse/JBWS-1133/jbossws-tests/src/java/org/jboss/test/ws/jaxws/jbws1133/TestEndpoint.java
branches/dlofthouse/JBWS-1133/jbossws-tests/src/resources/jaxws/jbws1133/
branches/dlofthouse/JBWS-1133/jbossws-tests/src/resources/jaxws/jbws1133/WEB-INF/
branches/dlofthouse/JBWS-1133/jbossws-tests/src/resources/jaxws/jbws1133/WEB-INF/web.xml
Removed:
branches/dlofthouse/JBWS-1133/jbossws-tests/src/java/org/jboss/test/ws/jaxws/jbws1133/JBWS1133TestCase.java
branches/dlofthouse/JBWS-1133/jbossws-tests/src/java/org/jboss/test/ws/jaxws/jbws1133/TestEndpoint.java
branches/dlofthouse/JBWS-1133/jbossws-tests/src/resources/jaxws/jbws1133/WEB-INF/
branches/dlofthouse/JBWS-1133/jbossws-tests/src/resources/jaxws/jbws1133/WEB-INF/web.xml
Modified:
branches/dlofthouse/JBWS-1133/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/DeployerInterceptorJSE.java
branches/dlofthouse/JBWS-1133/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/DeploymentInfoAdapter.java
branches/dlofthouse/JBWS-1133/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/WebMetaDataAdapter.java
branches/dlofthouse/JBWS-1133/jbossws-tests/ant-import/build-jars-jaxws.xml
Log:
Re-implementation for the JBoss 4.0.x and 4.2.x integration layer.
Modified: branches/dlofthouse/JBWS-1133/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/DeployerInterceptorJSE.java
===================================================================
--- branches/dlofthouse/JBWS-1133/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/DeployerInterceptorJSE.java 2007-04-15 15:30:53 UTC (rev 2873)
+++ branches/dlofthouse/JBWS-1133/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/DeployerInterceptorJSE.java 2007-04-15 15:49:49 UTC (rev 2874)
@@ -34,10 +34,12 @@
import org.jboss.metadata.WebMetaData;
import org.jboss.ws.WSException;
import org.jboss.ws.core.server.AbstractServiceEndpointPublisher;
+import org.jboss.ws.core.server.AbstractServiceEndpointServlet;
import org.jboss.ws.core.server.JAXWSDeployment;
import org.jboss.ws.core.server.UnifiedDeploymentInfo;
import org.jboss.ws.core.server.AbstractServiceEndpointPublisher.RewriteResults;
import org.jboss.ws.core.server.UnifiedDeploymentInfo.DeploymentType;
+import org.jboss.ws.core.utils.JavaUtils;
import org.jboss.ws.integration.ResourceLoaderAdapter;
import org.jboss.ws.integration.UnifiedVirtualFile;
import org.jboss.ws.metadata.builder.jaxrpc.JAXRPCDeployment;
@@ -82,7 +84,8 @@
try
{
Class servletClass = di.annotationsCl.loadClass(servletClassName);
- if (servletClass.isAnnotationPresent(WebService.class) || servletClass.isAnnotationPresent(WebServiceProvider.class))
+ if (servletClass.isAnnotationPresent(WebService.class) || servletClass.isAnnotationPresent(WebServiceProvider.class)
+ || JavaUtils.isAssignableFrom(AbstractServiceEndpointServlet.class, servletClass))
{
di.context.put("UnifiedDeploymentInfo.Type", UnifiedDeploymentInfo.DeploymentType.JAXWS_JSE);
isWebserviceDeployment = true;
@@ -102,7 +105,7 @@
protected UnifiedDeploymentInfo createUnifiedDeploymentInfo(DeploymentInfo di) throws Exception
{
UnifiedDeploymentInfo udi;
-
+
DeploymentType type = (DeploymentType)di.context.get("UnifiedDeploymentInfo.Type");
if (type == UnifiedDeploymentInfo.DeploymentType.JAXRPC_JSE)
{
@@ -115,11 +118,11 @@
udi = new JAXWSDeployment(UnifiedDeploymentInfo.DeploymentType.JAXWS_JSE);
DeploymentInfoAdapterFactory.newInstance().buildDeploymentInfo(udi, di);
}
- else
+ else
{
throw new WSException("Unexpected type: " + type);
}
-
+
return udi;
}
@@ -138,7 +141,7 @@
updateServiceEndpointTargetBeans(udi, results);
}
}
-
+
private void updateServiceEndpointTargetBeans(UnifiedDeploymentInfo udi, RewriteResults results)
{
UnifiedMetaData wsMetaData = getServiceEndpointDeployer().getUnifiedMetaData(udi);
@@ -154,7 +157,7 @@
}
}
}
-
+
private UnifiedVirtualFile getWebservicesFile(DeploymentInfo di)
{
UnifiedVirtualFile vfsRoot = new ResourceLoaderAdapter(di.localCl);
Modified: branches/dlofthouse/JBWS-1133/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/DeploymentInfoAdapter.java
===================================================================
--- branches/dlofthouse/JBWS-1133/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/DeploymentInfoAdapter.java 2007-04-15 15:30:53 UTC (rev 2873)
+++ branches/dlofthouse/JBWS-1133/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/DeploymentInfoAdapter.java 2007-04-15 15:49:49 UTC (rev 2874)
@@ -43,7 +43,7 @@
{
private WebMetaDataAdapter webMetaDataAdapter;
private AbstractApplicationMetaDataAdapter applicationMetaDataAdapter;
-
+
public void setApplicationMetaDataAdapter(AbstractApplicationMetaDataAdapter applicationMetaDataAdapter)
{
this.applicationMetaDataAdapter = applicationMetaDataAdapter;
@@ -61,16 +61,16 @@
udi.parent = new UnifiedDeploymentInfo(null);
buildDeploymentInfo(udi.parent, di.parent);
}
-
+
udi.vfRoot = new ResourceLoaderAdapter(di.localCl);
udi.name = di.getCanonicalName();
udi.simpleName = di.shortName;
udi.url = getDeploymentURL(di);
udi.classLoader = di.annotationsCl;
udi.deployedObject = di.deployedObject;
-
- buildMetaData(udi, di.metaData);
+ buildMetaData(udi, di);
+
return udi;
}
@@ -88,16 +88,16 @@
return deploymentURL;
}
- private void buildMetaData(UnifiedDeploymentInfo udi, Object metaData)
+ private void buildMetaData(UnifiedDeploymentInfo udi, DeploymentInfo di)
{
- if (metaData instanceof WebMetaData)
+ if (di.metaData instanceof WebMetaData)
{
- udi.metaData = webMetaDataAdapter.buildUnifiedWebMetaData((WebMetaData)metaData);
+ udi.metaData = webMetaDataAdapter.buildUnifiedWebMetaData(di);
udi.webappURL = udi.url;
}
- else if (metaData instanceof ApplicationMetaData)
+ else if (di.metaData instanceof ApplicationMetaData)
{
- udi.metaData = applicationMetaDataAdapter.buildUnifiedApplicationMetaData((ApplicationMetaData)metaData);
+ udi.metaData = applicationMetaDataAdapter.buildUnifiedApplicationMetaData((ApplicationMetaData)di.metaData);
}
}
}
Added: branches/dlofthouse/JBWS-1133/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/ServletParamReader.java
===================================================================
--- branches/dlofthouse/JBWS-1133/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/ServletParamReader.java (rev 0)
+++ branches/dlofthouse/JBWS-1133/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/ServletParamReader.java 2007-04-15 15:49:49 UTC (rev 2874)
@@ -0,0 +1,87 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.integration.jboss42;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.w3c.dom.Element;
+
+/**
+ * Utility class to read the init-params for servlets within the
+ * web.xml so the class name of the SEI can be obtained an a previously
+ * modified web.xml.
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since 15 Apr 2007
+ */
+public class ServletParamReader
+{
+
+ public static Map<String, String> getServletInitParam(final URL warUlr, final String requiredParameter)
+ {
+ HashMap<String, String> params = new HashMap<String, String>();
+ File webXml = new File(warUlr.getFile() + "/WEB-INF/web.xml");
+
+ if (webXml.isFile() == false)
+ throw new WSException("Unable to find web.xml: " + webXml);
+
+ try
+ {
+ Element rootElement = DOMUtils.parse(new FileInputStream(webXml));
+
+ Iterator servletElements = DOMUtils.getChildElements(rootElement, "servlet");
+ while (servletElements.hasNext())
+ {
+ Element currentServlet = (Element)servletElements.next();
+ String servletName = DOMUtils.getTextContent(DOMUtils.getFirstChildElement(currentServlet, "servlet-name"));
+ Iterator initParams = DOMUtils.getChildElements(currentServlet, "init-param");
+ while (initParams.hasNext())
+ {
+ Element currentParam = (Element)initParams.next();
+ String paramName = DOMUtils.getTextContent(DOMUtils.getFirstChildElement(currentParam, "param-name"));
+ if (requiredParameter.equals(paramName))
+ {
+ String paramValue = DOMUtils.getTextContent(DOMUtils.getFirstChildElement(currentParam, "param-value"));
+ params.put(servletName, paramValue);
+ }
+
+ }
+ }
+
+ }
+ catch (IOException e)
+ {
+ throw new WSException("Unable to read web.xml", e);
+ }
+
+ return params;
+ }
+
+}
Property changes on: branches/dlofthouse/JBWS-1133/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/ServletParamReader.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: branches/dlofthouse/JBWS-1133/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/WebMetaDataAdapter.java
===================================================================
--- branches/dlofthouse/JBWS-1133/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/WebMetaDataAdapter.java 2007-04-15 15:30:53 UTC (rev 2873)
+++ branches/dlofthouse/JBWS-1133/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/WebMetaDataAdapter.java 2007-04-15 15:49:49 UTC (rev 2874)
@@ -30,9 +30,13 @@
import java.util.Map;
import java.util.Map.Entry;
+import org.jboss.deployment.DeploymentInfo;
+import org.jboss.logging.Logger;
import org.jboss.metadata.WebMetaData;
import org.jboss.metadata.WebSecurityMetaData;
import org.jboss.metadata.WebSecurityMetaData.WebResourceCollection;
+import org.jboss.ws.core.server.AbstractServiceEndpointServlet;
+import org.jboss.ws.core.utils.JavaUtils;
import org.jboss.ws.metadata.j2ee.UnifiedWebMetaData;
import org.jboss.ws.metadata.j2ee.UnifiedWebSecurityMetaData;
import org.jboss.ws.metadata.j2ee.UnifiedWebMetaData.PublishLocationAdapter;
@@ -46,12 +50,16 @@
*/
public class WebMetaDataAdapter
{
- public UnifiedWebMetaData buildUnifiedWebMetaData(WebMetaData wmd)
+
+ private static Logger log = Logger.getLogger(WebMetaDataAdapter.class);
+
+ public UnifiedWebMetaData buildUnifiedWebMetaData(DeploymentInfo di)
{
+ WebMetaData wmd = (WebMetaData)di.metaData;
UnifiedWebMetaData umd = new UnifiedWebMetaData();
umd.setContextRoot(wmd.getContextRoot());
umd.setServletMappings(wmd.getServletMappings());
- umd.setServletClassNames(getServletClassMap(wmd));
+ umd.setServletClassNames(getServletClassMap(di));
umd.setConfigName(wmd.getConfigName());
umd.setConfigFile(wmd.getConfigFile());
umd.setSecurityDomain(wmd.getSecurityDomain());
@@ -63,8 +71,7 @@
private PublishLocationAdapter getPublishLocationAdpater(final WebMetaData wmd)
{
- return new PublishLocationAdapter ()
- {
+ return new PublishLocationAdapter() {
public String getWsdlPublishLocationByName(String name)
{
return wmd.getWsdlPublishLocationByName(name);
@@ -101,18 +108,42 @@
return unifiedsecurityMetaData;
}
- private Map<String, String> getServletClassMap(WebMetaData wmd)
+ private Map<String, String> getServletClassMap(DeploymentInfo di)
{
+ WebMetaData wmd = (WebMetaData)di.metaData;
Map<String, String> mappings = new HashMap<String, String>();
+ Map<String, String> paramSEIImpl = ServletParamReader.getServletInitParam(di.localUrl, ServiceEndpointPublisher.INIT_PARAM_SERVICE_ENDPOINT_IMPL);
+
Iterator it = wmd.getServletClassMap().entrySet().iterator();
- while(it.hasNext())
+ while (it.hasNext())
{
Map.Entry entry = (Entry)it.next();
String servletName = (String)entry.getKey();
- String servletClass = (String)entry.getValue();
+ String servletClassName = (String)entry.getValue();
+
// Skip JSPs
- if (servletClass != null)
- mappings.put(servletName, servletClass);
+ if (servletClassName != null)
+ {
+ try
+ {
+ Class servletClass = di.annotationsCl.loadClass(servletClassName);
+ if (JavaUtils.isAssignableFrom(AbstractServiceEndpointServlet.class, servletClass))
+ {
+ servletClassName = paramSEIImpl.get(servletName);
+ }
+
+ }
+ catch (ClassNotFoundException e)
+ {
+ log.warn("Unable to load class:" + servletClassName);
+ }
+
+ }
+
+ if (servletClassName != null)
+ {
+ mappings.put(servletName, servletClassName);
+ }
}
return mappings;
}
Modified: branches/dlofthouse/JBWS-1133/jbossws-tests/ant-import/build-jars-jaxws.xml
===================================================================
--- branches/dlofthouse/JBWS-1133/jbossws-tests/ant-import/build-jars-jaxws.xml 2007-04-15 15:30:53 UTC (rev 2873)
+++ branches/dlofthouse/JBWS-1133/jbossws-tests/ant-import/build-jars-jaxws.xml 2007-04-15 15:49:49 UTC (rev 2874)
@@ -199,6 +199,18 @@
</fileset>
</jar>
+ <!-- jaxws-jbws1133 -->
+ <mkdir dir="${tests.output.dir}/libs/jaxws-jbws1133.war"/>
+ <mkdir dir="${tests.output.dir}/libs/jaxws-jbws1133.war/WEB-INF"/>
+ <mkdir dir="${tests.output.dir}/libs/jaxws-jbws1133.war/WEB-INF/classes"/>
+ <copy tofile="${tests.output.dir}/libs/jaxws-jbws1133.war/WEB-INF/original-web.xml"
+ file="${tests.output.dir}/resources/jaxws/jbws1133/WEB-INF/web.xml"/>
+ <copy todir="${tests.output.dir}/libs/jaxws-jbws1133.war/WEB-INF/classes">
+ <fileset dir="${tests.output.dir}/classes">
+ <include name="org/jboss/test/ws/jaxws/jbws1133/TestEndpoint.class"/>
+ </fileset>
+ </copy>
+
<!-- jaxws-jbws1178 -->
<war destfile="${tests.output.dir}/libs/jaxws-jbws1178.war" webxml="${tests.output.dir}/resources/jaxws/jbws1178/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/classes">
Copied: branches/dlofthouse/JBWS-1133/jbossws-tests/src/java/org/jboss/test/ws/jaxws/jbws1133 (from rev 1390, branches/dlofthouse/JBWS-1133/src/test/java/org/jboss/test/ws/jaxws/jbws1133)
Deleted: branches/dlofthouse/JBWS-1133/jbossws-tests/src/java/org/jboss/test/ws/jaxws/jbws1133/JBWS1133TestCase.java
===================================================================
--- branches/dlofthouse/JBWS-1133/src/test/java/org/jboss/test/ws/jaxws/jbws1133/JBWS1133TestCase.java 2006-11-05 15:43:59 UTC (rev 1390)
+++ branches/dlofthouse/JBWS-1133/jbossws-tests/src/java/org/jboss/test/ws/jaxws/jbws1133/JBWS1133TestCase.java 2007-04-15 15:49:49 UTC (rev 2874)
@@ -1,80 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.ws.jaxws.jbws1133;
-
-import java.io.File;
-import java.io.InputStream;
-import java.net.URL;
-
-import org.apache.tools.ant.util.FileUtils;
-import org.jboss.test.ws.JBossWSTest;
-
-/**
- *
- * @author darran.lofthouse(a)jboss.com
- * @since 16-October-2006
- */
-public class JBWS1133TestCase extends JBossWSTest
-{
-
- private final String TARGET_WSDL = "http://" + getServerHost() + ":8080/jaxws-jbws1133?wsdl";
-
- public void testRedeployExploded() throws Exception
- {
- cleanWebXML();
-
- try
- {
- deploy("jaxws-jbws1133.war");
-
- checkWSDL();
-
- undeploy("jaxws-jbws1133.war");
- deploy("jaxws-jbws1133.war");
-
- checkWSDL();
- }
- finally
- {
- undeploy("jaxws-jbws1133.war");
- }
- }
-
- private void cleanWebXML() throws Exception
- {
- File webXML = new File("libs/jaxws-jbws1133.war/WEB-INF/web.xml");
- if (webXML.exists())
- {
- webXML.delete();
- }
- File originalWebXML = new File("libs/jaxws-jbws1133.war/WEB-INF/original-web.xml");
- FileUtils.getFileUtils().copyFile(originalWebXML, webXML);
- }
-
- private void checkWSDL() throws Exception
- {
- URL wsdlURL = new URL(TARGET_WSDL);
- InputStream is = wsdlURL.openStream();
- assertNotNull(is);
- }
-
-}
\ No newline at end of file
Copied: branches/dlofthouse/JBWS-1133/jbossws-tests/src/java/org/jboss/test/ws/jaxws/jbws1133/JBWS1133TestCase.java (from rev 1390, branches/dlofthouse/JBWS-1133/src/test/java/org/jboss/test/ws/jaxws/jbws1133/JBWS1133TestCase.java)
===================================================================
--- branches/dlofthouse/JBWS-1133/jbossws-tests/src/java/org/jboss/test/ws/jaxws/jbws1133/JBWS1133TestCase.java (rev 0)
+++ branches/dlofthouse/JBWS-1133/jbossws-tests/src/java/org/jboss/test/ws/jaxws/jbws1133/JBWS1133TestCase.java 2007-04-15 15:49:49 UTC (rev 2874)
@@ -0,0 +1,91 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.jbws1133;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.URL;
+
+import org.apache.tools.ant.util.FileUtils;
+import org.jboss.test.ws.JBossWSTest;
+
+/**
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since 16-October-2006
+ */
+public class JBWS1133TestCase extends JBossWSTest
+{
+
+ private final String TARGET_WSDL = "http://" + getServerHost() + ":8080/jaxws-jbws1133?wsdl";
+
+ public void testRedeployExploded() throws Exception
+ {
+ cleanWebXML();
+
+ try
+ {
+ deploy("jaxws-jbws1133.war");
+
+ checkWSDL();
+
+ undeploy("jaxws-jbws1133.war");
+ deploy("jaxws-jbws1133.war");
+
+ checkWSDL();
+ }
+ finally
+ {
+ undeploy("jaxws-jbws1133.war");
+ }
+ }
+
+ private void cleanWebXML() throws Exception
+ {
+ File webXML = new File("libs/jaxws-jbws1133.war/WEB-INF/web.xml");
+ if (webXML.exists())
+ {
+ webXML.delete();
+ }
+ File originalWebXML = new File("libs/jaxws-jbws1133.war/WEB-INF/original-web.xml");
+ FileUtils.getFileUtils().copyFile(originalWebXML, webXML);
+ }
+
+ private void checkWSDL() throws Exception
+ {
+ URL wsdlURL = new URL(TARGET_WSDL);
+ InputStream is = wsdlURL.openStream();
+ InputStreamReader isr = new InputStreamReader(is);
+ BufferedReader br = new BufferedReader(isr);
+
+ String line = br.readLine();
+ while (line != null)
+ {
+ line = br.readLine();
+ }
+
+ assertNotNull(is);
+ }
+
+}
\ No newline at end of file
Deleted: branches/dlofthouse/JBWS-1133/jbossws-tests/src/java/org/jboss/test/ws/jaxws/jbws1133/TestEndpoint.java
===================================================================
--- branches/dlofthouse/JBWS-1133/src/test/java/org/jboss/test/ws/jaxws/jbws1133/TestEndpoint.java 2006-11-05 15:43:59 UTC (rev 1390)
+++ branches/dlofthouse/JBWS-1133/jbossws-tests/src/java/org/jboss/test/ws/jaxws/jbws1133/TestEndpoint.java 2007-04-15 15:49:49 UTC (rev 2874)
@@ -1,44 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.ws.jaxws.jbws1133;
-
-import javax.jws.WebMethod;
-import javax.jws.WebService;
-import javax.jws.soap.SOAPBinding;
-
-/**
- *
- * @author darran.lofthouse(a)jboss.com
- * @since 16-October-2006
- */
-@WebService(targetNamespace = "http://org.jboss/test/ws/jbws1133")
-@SOAPBinding(style = SOAPBinding.Style.DOCUMENT)
-public class TestEndpoint
-{
-
- @WebMethod
- public String echo(final String message)
- {
- return message;
- }
-
-}
Copied: branches/dlofthouse/JBWS-1133/jbossws-tests/src/java/org/jboss/test/ws/jaxws/jbws1133/TestEndpoint.java (from rev 1390, branches/dlofthouse/JBWS-1133/src/test/java/org/jboss/test/ws/jaxws/jbws1133/TestEndpoint.java)
===================================================================
--- branches/dlofthouse/JBWS-1133/jbossws-tests/src/java/org/jboss/test/ws/jaxws/jbws1133/TestEndpoint.java (rev 0)
+++ branches/dlofthouse/JBWS-1133/jbossws-tests/src/java/org/jboss/test/ws/jaxws/jbws1133/TestEndpoint.java 2007-04-15 15:49:49 UTC (rev 2874)
@@ -0,0 +1,44 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.jbws1133;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+/**
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since 16-October-2006
+ */
+@WebService(targetNamespace = "http://org.jboss/test/ws/jbws1133")
+@SOAPBinding(style = SOAPBinding.Style.DOCUMENT)
+public class TestEndpoint
+{
+
+ @WebMethod
+ public String echo(final String message)
+ {
+ return message;
+ }
+
+}
Copied: branches/dlofthouse/JBWS-1133/jbossws-tests/src/resources/jaxws/jbws1133 (from rev 1390, branches/dlofthouse/JBWS-1133/src/test/resources/jaxws/jbws1133)
Copied: branches/dlofthouse/JBWS-1133/jbossws-tests/src/resources/jaxws/jbws1133/WEB-INF (from rev 1390, branches/dlofthouse/JBWS-1133/src/test/resources/jaxws/jbws1133/WEB-INF)
Deleted: branches/dlofthouse/JBWS-1133/jbossws-tests/src/resources/jaxws/jbws1133/WEB-INF/web.xml
===================================================================
--- branches/dlofthouse/JBWS-1133/src/test/resources/jaxws/jbws1133/WEB-INF/web.xml 2006-11-05 15:43:59 UTC (rev 1390)
+++ branches/dlofthouse/JBWS-1133/jbossws-tests/src/resources/jaxws/jbws1133/WEB-INF/web.xml 2007-04-15 15:49:49 UTC (rev 2874)
@@ -1,15 +0,0 @@
-<?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>TestEndpoint</servlet-name>
- <servlet-class>org.jboss.test.ws.jaxws.jbws1133.TestEndpoint</servlet-class>
- </servlet>
-
- <servlet-mapping>
- <servlet-name>TestEndpoint</servlet-name>
- <url-pattern>/*</url-pattern>
- </servlet-mapping>
-</web-app>
\ No newline at end of file
Copied: branches/dlofthouse/JBWS-1133/jbossws-tests/src/resources/jaxws/jbws1133/WEB-INF/web.xml (from rev 1390, branches/dlofthouse/JBWS-1133/src/test/resources/jaxws/jbws1133/WEB-INF/web.xml)
===================================================================
--- branches/dlofthouse/JBWS-1133/jbossws-tests/src/resources/jaxws/jbws1133/WEB-INF/web.xml (rev 0)
+++ branches/dlofthouse/JBWS-1133/jbossws-tests/src/resources/jaxws/jbws1133/WEB-INF/web.xml 2007-04-15 15:49:49 UTC (rev 2874)
@@ -0,0 +1,15 @@
+<?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>TestEndpoint</servlet-name>
+ <servlet-class>org.jboss.test.ws.jaxws.jbws1133.TestEndpoint</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>TestEndpoint</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+</web-app>
\ No newline at end of file
17 years, 8 months
JBossWS SVN: r2873 - branches/jbossws-1.2.1/build.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-04-15 11:30:53 -0400 (Sun, 15 Apr 2007)
New Revision: 2873
Modified:
branches/jbossws-1.2.1/build/ant.properties.example
branches/jbossws-1.2.1/build/version.properties
Log:
Set version properties
Modified: branches/jbossws-1.2.1/build/ant.properties.example
===================================================================
--- branches/jbossws-1.2.1/build/ant.properties.example 2007-04-15 15:08:23 UTC (rev 2872)
+++ branches/jbossws-1.2.1/build/ant.properties.example 2007-04-15 15:30:53 UTC (rev 2873)
@@ -5,7 +5,7 @@
# Optional JBoss Home
#jboss50.home=/home/tdiesler/svn/jbossas/trunk/build/output/jboss-5.0.0.Beta2
-#jboss42.home=/home/tdiesler/svn/jbossas/branches/Branch_4_2/build/output/jboss-4.2.0.GA
+#jboss42.home=/home/tdiesler/svn/jbossas/branches/Branch_4_2/build/output/jboss-4.2.0.CR2
#jboss40.home=/home/tdiesler/svn/jbossas/branches/Branch_4_0/build/output/jboss-4.0.5.SP1-ejb3
# The JBoss server under test. This can be [jboss50|jboss42|jboss40|tomcat]
@@ -32,15 +32,15 @@
hudson.jboss50.url=https://svn.jboss.org/repos/jbossas/trunk
hudson.jboss50.build=jboss-5.0.0.Beta2
-hudson.jboss50.rev=HEAD
+hudson.jboss50.rev=62344
hudson.jboss42.url=https://svn.jboss.org/repos/jbossas/branches/Branch_4_2
-hudson.jboss42.build=jboss-4.2.0.GA
-hudson.jboss42.rev=HEAD
+hudson.jboss42.build=jboss-4.2.0.CR2
+hudson.jboss42.rev=62316
hudson.jboss40.url=https://svn.jboss.org/repos/jbossas/branches/Branch_4_0
hudson.jboss40.build=jboss-4.0.5.SP1
-hudson.jboss40.rev=HEAD
+hudson.jboss40.rev=62321
hudson.mail.recipients=thomas.diesler(a)jboss.com, heiko.braun(a)jboss.com, alejandro.guizar(a)jboss.com
hudson.smtp.host=mail.navisite.com
Modified: branches/jbossws-1.2.1/build/version.properties
===================================================================
--- branches/jbossws-1.2.1/build/version.properties 2007-04-15 15:08:23 UTC (rev 2872)
+++ branches/jbossws-1.2.1/build/version.properties 2007-04-15 15:30:53 UTC (rev 2873)
@@ -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.DEV
+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, 8 months
JBossWS SVN: r2872 - branches.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-04-15 11:08:23 -0400 (Sun, 15 Apr 2007)
New Revision: 2872
Added:
branches/jbossws-1.2.1/
Log:
Recreate jbossws-1.2.1 from trunk -r2870
Copied: branches/jbossws-1.2.1 (from rev 2871, trunk)
17 years, 8 months
JBossWS SVN: r2871 - branches.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-04-15 11:08:05 -0400 (Sun, 15 Apr 2007)
New Revision: 2871
Removed:
branches/jbossws-1.2.1/
Log:
Recreate jbossws-1.2.1 from trunk -r2870
17 years, 8 months
JBossWS SVN: r2870 - trunk/build.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-04-15 10:54:22 -0400 (Sun, 15 Apr 2007)
New Revision: 2870
Modified:
trunk/build/ant.properties.example
Log:
Remove path to RI
Modified: trunk/build/ant.properties.example
===================================================================
--- trunk/build/ant.properties.example 2007-04-15 14:51:40 UTC (rev 2869)
+++ trunk/build/ant.properties.example 2007-04-15 14:54:22 UTC (rev 2870)
@@ -19,12 +19,6 @@
tomcat.manager.username=manager
tomcat.manager.password=manager
-# Required JAX-WS Home
-# The testsuite requires the RI tools to generate the artifacts
-# Use the RI codebase from java.net: https://jax-ws.dev.java.net/jax-ws-20-fcs/
-#
-ri.home=/usr/java/jaxws-ri
-
# Hudson QA Environment
hudson.username=changeme
hudson.password=changeme
17 years, 8 months
JBossWS SVN: r2869 - in trunk: jbossws-tests and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-04-15 10:51:40 -0400 (Sun, 15 Apr 2007)
New Revision: 2869
Modified:
trunk/jbossws-core/src/resources/samples/build.xml
trunk/jbossws-tests/build.xml
Log:
Fix tomcat samples classpath
Modified: trunk/jbossws-core/src/resources/samples/build.xml
===================================================================
--- trunk/jbossws-core/src/resources/samples/build.xml 2007-04-15 14:43:13 UTC (rev 2868)
+++ trunk/jbossws-core/src/resources/samples/build.xml 2007-04-15 14:51:40 UTC (rev 2869)
@@ -227,7 +227,7 @@
<fail message="jdk-1.5 is required for Tomcat integration" unless="HAVE_JDK_1.5"/>
<path id="test.client.classpath">
<path refid="jbossws.classpath"/>
- <pathelement location="${tomcat.common.lib}/jbossws-thirdparty.jar"/>
+ <pathelement location="${tomcat.home}/common/lib/jbossws-thirdparty.jar"/>
<path refid="javac.classpath"/>
</path>
</target>
Modified: trunk/jbossws-tests/build.xml
===================================================================
--- trunk/jbossws-tests/build.xml 2007-04-15 14:43:13 UTC (rev 2868)
+++ trunk/jbossws-tests/build.xml 2007-04-15 14:51:40 UTC (rev 2869)
@@ -234,7 +234,7 @@
<fail message="jdk-1.5 is required for Tomcat integration" unless="HAVE_JDK_1.5"/>
<path id="test.client.classpath">
<path refid="jbossws.classpath"/>
- <pathelement location="${tomcat.common.lib}/jbossws-thirdparty.jar"/>
+ <pathelement location="${tomcat.home}/common/lib/jbossws-thirdparty.jar"/>
<path refid="javac.classpath"/>
</path>
</target>
17 years, 8 months
JBossWS SVN: r2868 - trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/webserviceref.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-04-15 10:43:13 -0400 (Sun, 15 Apr 2007)
New Revision: 2868
Modified:
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/StubPropertyTestCase.java
Log:
Use explicit context-root
Modified: trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/StubPropertyTestCase.java
===================================================================
--- trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/StubPropertyTestCase.java 2007-04-15 14:26:49 UTC (rev 2867)
+++ trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/StubPropertyTestCase.java 2007-04-15 14:43:13 UTC (rev 2868)
@@ -44,7 +44,7 @@
*/
public class StubPropertyTestCase extends JBossWSTest
{
- public final String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() + ":8080/jaxws-samples-webserviceref-secure/SecureEndpointImpl";
+ public final String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() + ":8080/jaxws-samples-webserviceref-secure";
public static Test suite()
{
17 years, 8 months