Author: thomas.diesler(a)jboss.com
Date: 2007-03-06 10:20:12 -0500 (Tue, 06 Mar 2007)
New Revision: 2536
Added:
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/CallPropertyMetaData.java
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/HandlerChainMetaData.java
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/HandlerChainsMetaData.java
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/HandlerMetaData.java
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/InitParamMetaData.java
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/PortComponentRefMetaData.java
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/ServiceRefMetaData.java
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/ServiceRefObjectFactory.java
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/StubPropertyMetaData.java
Removed:
branches/tdiesler/trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/ServiceRefMetaDataAdaptor.java
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/ServiceRefHandlerJAXWS.java
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/UnifiedServiceRefObjectFactory.java
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/PortInfo.java
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/UnifiedServiceRef.java
Modified:
branches/tdiesler/trunk/build/ant-import/build-thirdparty.xml
branches/tdiesler/trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/ServiceRefHandler.java
branches/tdiesler/trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/ServiceRefHandlerMBean.java
branches/tdiesler/trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/WebServiceRefHandler.java
branches/tdiesler/trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/WebServiceRefHandlerMBean.java
branches/tdiesler/trunk/integration-jboss50/src/resources/jbossws.deployer/META-INF/jbossws-deployer-beans.xml
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/client/ServiceImpl.java
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/client/ServiceObjectFactory.java
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/client/ServiceReferenceable.java
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/handler/HandlerDelegateJAXRPC.java
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ServiceObjectFactory.java
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ServiceReferenceable.java
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCClientMetaDataBuilder.java
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/config/binding/OMFactoryJAXRPC.java
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/UnifiedHandlerMetaData.java
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/UnifiedPortComponentRefMetaData.java
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/jsr181/HandlerChainFactory.java
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/umdm/HandlerMetaData.java
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/webservices/WebservicesFactory.java
branches/tdiesler/trunk/jbossws-tests/src/resources/jaxws/samples/handlerchain/META-INF/jboss-client.xml
branches/tdiesler/trunk/jbossws-tests/src/resources/jaxws/samples/webserviceref/META-INF-override/jboss-client.xml
branches/tdiesler/trunk/jbossws-tests/src/resources/jaxws/samples/webserviceref/META-INF-secure/jboss-client.xml
branches/tdiesler/trunk/jbossws-tests/src/resources/jaxws/samples/webserviceref/META-INF/jboss-client.xml
branches/tdiesler/trunk/jbossws-tests/src/resources/jaxws/samples/webserviceref/META-INF/jboss-web.xml
branches/tdiesler/trunk/jbossws-tests/src/resources/jaxws/samples/webserviceref/META-INF/jboss.xml
Log:
partial commit
Modified: branches/tdiesler/trunk/build/ant-import/build-thirdparty.xml
===================================================================
--- branches/tdiesler/trunk/build/ant-import/build-thirdparty.xml 2007-03-06 13:45:43 UTC
(rev 2535)
+++ branches/tdiesler/trunk/build/ant-import/build-thirdparty.xml 2007-03-06 15:20:12 UTC
(rev 2536)
@@ -90,6 +90,7 @@
<pathelement
location="${thirdparty.dir}/ejb3.deployer/jboss-ejb3x.jar"/>
<pathelement location="${thirdparty.dir}/javassist.jar"/>
<pathelement location="${thirdparty.dir}/jaxb-api.jar"/>
+ <pathelement location="${thirdparty.dir}/jaxb-impl.jar"/>
<pathelement location="${thirdparty.dir}/jaxb-xjc.jar"/>
<pathelement location="${thirdparty.dir}/jboss-common.jar"/>
<pathelement location="${thirdparty.dir}/jboss-dependency.jar"/>
Modified:
branches/tdiesler/trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/ServiceRefHandler.java
===================================================================
---
branches/tdiesler/trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/ServiceRefHandler.java 2007-03-06
13:45:43 UTC (rev 2535)
+++
branches/tdiesler/trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/ServiceRefHandler.java 2007-03-06
15:20:12 UTC (rev 2536)
@@ -23,25 +23,22 @@
// $Id$
+import java.lang.reflect.AnnotatedElement;
import java.net.URL;
-import java.util.Iterator;
import javax.management.MBeanServer;
import javax.naming.Context;
+import javax.naming.NamingException;
import javax.wsdl.Definition;
-import javax.wsdl.WSDLException;
-import javax.xml.rpc.JAXRPCException;
-import org.jboss.deployers.spi.deployer.DeploymentUnit;
import org.jboss.logging.Logger;
import org.jboss.mx.util.MBeanServerLocator;
import org.jboss.util.naming.Util;
-import org.jboss.metadata.serviceref.ServiceRefMetaData;
+import org.jboss.virtual.VirtualFile;
import org.jboss.ws.WSException;
import org.jboss.ws.core.jaxrpc.client.ServiceReferenceable;
-import org.jboss.ws.core.server.UnifiedDeploymentInfo;
-import org.jboss.ws.metadata.builder.jaxrpc.JAXRPCClientDeployment;
-import org.jboss.ws.metadata.j2ee.UnifiedServiceRefMetaData;
+import org.jboss.ws.metadata.j2ee.serviceref.ServiceRefMetaData;
+import org.jboss.ws.metadata.j2ee.serviceref.ServiceRefObjectFactory;
import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMappingFactory;
import org.jboss.ws.tools.wsdl.WSDL11DefinitionFactory;
@@ -59,40 +56,30 @@
private static Logger log = Logger.getLogger(ServiceRefHandler.class);
/**
- * This binds a jaxrpc Service into the callers ENC for every service-ref element
- *
- * @param envCtx ENC to bind the javax.rpc.xml.Service object to
- * @param serviceRefs An iterator of the service-ref elements in the client deployment
descriptor
- * @param unit The client deployment
+ * Binds a Service into the callers ENC for every service-ref element
*/
- public void bindServiceRefs(Context envCtx, Iterator serviceRefs, DeploymentUnit
unit)
+ public void setupServiceRef(Context encCtx, String encName, AnnotatedElement
anElement, VirtualFile vfsRoot, String xmlFragment) throws NamingException
{
try
{
- while (serviceRefs.hasNext())
- {
- ServiceRefMetaData serviceRef = (ServiceRefMetaData)serviceRefs.next();
- String serviceRefName = serviceRef.getServiceRefName();
+ ServiceRefObjectFactory factory = ServiceRefObjectFactory.newInstance();
+ ServiceRefMetaData serviceRef = factory.parse(xmlFragment);
+ serviceRef.setVfsRoot(new VirtualFileAdaptor(vfsRoot));
+
+ String serviceRefName = serviceRef.getServiceRefName();
- // Build the container independent deployment info
- UnifiedDeploymentInfo udi = new
JAXRPCClientDeployment(UnifiedDeploymentInfo.DeploymentType.JAXRPC_Client);
- DeploymentInfoAdaptor.buildDeploymentInfo(udi, unit);
+ JavaWsdlMapping javaWsdlMapping = getJavaWsdlMapping(serviceRef);
+ serviceRef.setJavaWsdlMapping(javaWsdlMapping);
- UnifiedServiceRefMetaData wsServiceRef =
ServiceRefMetaDataAdaptor.buildUnifiedServiceRefMetaData(udi, serviceRef);
+ Definition wsdlDefinition = getWsdlDefinition(serviceRef);
+ serviceRef.setWsdlDefinition(wsdlDefinition);
- JavaWsdlMapping javaWsdlMapping = getJavaWsdlMapping(wsServiceRef);
- wsServiceRef.setJavaWsdlMapping(javaWsdlMapping);
+ ServiceReferenceable ref = new ServiceReferenceable(serviceRef);
- Definition wsdlDefinition = getWsdlDefinition(wsServiceRef);
- wsServiceRef.setWsdlDefinition(wsdlDefinition);
+ // Do not use rebind, the binding should be unique
+ Util.bind(encCtx, encName, ref);
- ServiceReferenceable ref = new ServiceReferenceable(wsServiceRef, udi);
-
- // Do not use rebind, the binding should be unique
- Util.bind(envCtx, serviceRefName, ref);
-
- log.debug("<service-ref> bound to: java:comp/env/" +
serviceRefName);
- }
+ log.debug("<service-ref> bound to: java:comp/env/" +
serviceRefName);
}
catch (RuntimeException rte)
{
@@ -104,41 +91,41 @@
}
}
- private JavaWsdlMapping getJavaWsdlMapping(UnifiedServiceRefMetaData serviceRef)
+ private JavaWsdlMapping getJavaWsdlMapping(ServiceRefMetaData serviceRef)
{
JavaWsdlMapping javaWsdlMapping = null;
- URL mappingURL = serviceRef.getMappingLocation();
- if (mappingURL != 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 JAXRPCException("Cannot unmarshal jaxrpc-mapping-file: "
+ mappingURL, e);
+ throw new WSException("Cannot unmarshal jaxrpc-mapping-file: " +
mappingFile, e);
}
}
return javaWsdlMapping;
}
- private Definition getWsdlDefinition(UnifiedServiceRefMetaData serviceRef)
+ private Definition getWsdlDefinition(ServiceRefMetaData serviceRef)
{
Definition wsdlDefinition = null;
{
- URL wsdlOverride = serviceRef.getWsdlOverride();
- URL wsdlURL = serviceRef.getWsdlLocation();
- if (wsdlOverride == null && wsdlURL != null)
+ URL wsdlLocation = serviceRef.getWsdlLocation();
+ if (wsdlLocation != null)
{
try
{
WSDL11DefinitionFactory factory = WSDL11DefinitionFactory.newInstance();
- wsdlDefinition = factory.parse(wsdlURL);
+ wsdlDefinition = factory.parse(wsdlLocation);
}
- catch (WSDLException e)
+ catch (Exception e)
{
- throw new WSException("Cannot unmarshall wsdl, cause: " +
e.toString());
+ throw new WSException("Cannot unmarshall wsdl-file: " +
wsdlLocation, e);
}
}
}
Modified:
branches/tdiesler/trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/ServiceRefHandlerMBean.java
===================================================================
---
branches/tdiesler/trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/ServiceRefHandlerMBean.java 2007-03-06
13:45:43 UTC (rev 2535)
+++
branches/tdiesler/trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/ServiceRefHandlerMBean.java 2007-03-06
15:20:12 UTC (rev 2536)
@@ -21,13 +21,13 @@
*/
package org.jboss.ws.integration.jboss50;
-import java.util.Iterator;
+import java.lang.reflect.AnnotatedElement;
import javax.management.ObjectName;
import javax.naming.Context;
+import javax.naming.NamingException;
-import org.jboss.deployers.spi.DeploymentException;
-import org.jboss.deployers.spi.deployer.DeploymentUnit;
+import org.jboss.virtual.VirtualFile;
import org.jboss.ws.core.utils.ObjectNameFactory;
/**
@@ -39,12 +39,7 @@
public static final ObjectName OBJECT_NAME =
ObjectNameFactory.create("jboss.ws:service=ServiceRefHandler");
/**
- * Binds a JAXRPC Service into the callers ENC for every service-ref element
- *
- * @param envCtx ENC to bind the javax.rpc.xml.Service object to
- * @param serviceRefs An iterator of the service-ref elements in the client deployment
descriptor
- * @param unit The client's deployment unit
- * @throws DeploymentException if it goes wrong
+ * Binds a Service into the callers ENC for every service-ref element
*/
- void bindServiceRefs(Context envCtx, Iterator serviceRefs, DeploymentUnit unit);
+ void setupServiceRef(Context encCtx, String encName, AnnotatedElement anElement,
VirtualFile vfsRoot, String xmlFragment) throws NamingException;
}
Deleted:
branches/tdiesler/trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/ServiceRefMetaDataAdaptor.java
===================================================================
---
branches/tdiesler/trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/ServiceRefMetaDataAdaptor.java 2007-03-06
13:45:43 UTC (rev 2535)
+++
branches/tdiesler/trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/ServiceRefMetaDataAdaptor.java 2007-03-06
15:20:12 UTC (rev 2536)
@@ -1,112 +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.ws.integration.jboss50;
-
-// $Id$
-
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.LinkedHashMap;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.metadata.serviceref.HandlerMetaData;
-import org.jboss.metadata.serviceref.InitParamMetaData;
-import org.jboss.metadata.serviceref.PortComponentRefMetaData;
-import org.jboss.metadata.serviceref.ServiceRefMetaData;
-import org.jboss.ws.core.server.UnifiedDeploymentInfo;
-import org.jboss.ws.metadata.j2ee.UnifiedHandlerMetaData;
-import org.jboss.ws.metadata.j2ee.UnifiedPortComponentRefMetaData;
-import org.jboss.ws.metadata.j2ee.UnifiedServiceRefMetaData;
-import org.jboss.ws.metadata.umdm.HandlerMetaData.HandlerInitParam;
-
-/**
- * Build container independent service ref meta data
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 05-May-2006
- */
-public class ServiceRefMetaDataAdaptor
-{
- public static UnifiedServiceRefMetaData
buildUnifiedServiceRefMetaData(UnifiedDeploymentInfo udi, ServiceRefMetaData srmd) throws
Exception
- {
- UnifiedServiceRefMetaData usrmd = new UnifiedServiceRefMetaData();
- usrmd.setServiceRefName(srmd.getServiceRefName());
- usrmd.setServiceInterface(srmd.getServiceInterface());
- usrmd.setWsdlLocation(getWsdlLocation(udi, srmd));
- usrmd.setMappingLocation(udi.getMetaDataFileURL(srmd.getMappingFile()));
- usrmd.setServiceQName(srmd.getServiceQName());
-
- LinkedHashMap<String, UnifiedPortComponentRefMetaData> pcrefs = new
LinkedHashMap<String, UnifiedPortComponentRefMetaData>();
- for (PortComponentRefMetaData pcmd : srmd.getPortComponentRefs())
- {
- UnifiedPortComponentRefMetaData upcmd = new UnifiedPortComponentRefMetaData();
- upcmd.setServiceEndpointInterface(pcmd.getServiceEndpointInterface());
- upcmd.setPortComponentLink(pcmd.getPortComponentLink());
- upcmd.setCallProperties(pcmd.getCallProperties());
- pcrefs.put(pcmd.getServiceEndpointInterface(), upcmd);
- }
- usrmd.setPortComponentRefs(pcrefs);
-
- ArrayList<UnifiedHandlerMetaData> handlers = new
ArrayList<UnifiedHandlerMetaData>();
- for (HandlerMetaData hmd : srmd.getHandlers())
- {
- UnifiedHandlerMetaData uhmd = new UnifiedHandlerMetaData(null);
- uhmd.setHandlerName(hmd.getHandlerName());
- uhmd.setHandlerClass(hmd.getHandlerClass());
- for(QName soapHeader : hmd.getSoapHeaders())
- {
- uhmd.addSoapHeader(soapHeader);
- }
- for(String portname : hmd.getPortNames())
- {
- uhmd.addPortName(portname);
- }
- for (InitParamMetaData ipmd : hmd.getInitParams())
- {
- HandlerInitParam ip = new HandlerInitParam();
- ip.setParamName(ipmd.getParamName());
- ip.setParamValue(ipmd.getParamValue());
- uhmd.addInitParam(ip);
- }
- handlers.add(uhmd);
- }
- usrmd.setHandlers(handlers);
-
- usrmd.setConfigName(srmd.getConfigName());
- usrmd.setConfigFile(srmd.getConfigFile());
- usrmd.setWsdlOverride(srmd.getWsdlOverride());
- usrmd.setCallProperties(srmd.getCallProperties());
-
- return usrmd;
- }
-
- private static URL getWsdlLocation(UnifiedDeploymentInfo udi, ServiceRefMetaData srmd)
throws Exception
- {
- URL wsdlLocation = srmd.getWsdlOverride();
- if (wsdlLocation == null && srmd.getWsdlFile() != null)
- {
- wsdlLocation = udi.getMetaDataFileURL(srmd.getWsdlFile());
- }
- return wsdlLocation;
- }
-}
Modified:
branches/tdiesler/trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/WebServiceRefHandler.java
===================================================================
---
branches/tdiesler/trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/WebServiceRefHandler.java 2007-03-06
13:45:43 UTC (rev 2535)
+++
branches/tdiesler/trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/WebServiceRefHandler.java 2007-03-06
15:20:12 UTC (rev 2536)
@@ -28,7 +28,6 @@
import javax.management.MBeanServer;
import javax.naming.Context;
import javax.naming.NamingException;
-import javax.xml.transform.Source;
import org.jboss.mx.util.MBeanServerLocator;
import org.jboss.virtual.VirtualFile;
@@ -42,9 +41,9 @@
*/
public class WebServiceRefHandler extends UnifiedWebServiceRefHandler implements
WebServiceRefHandlerMBean
{
- public void setupWebServiceRef(Context encCtx, String encName, AnnotatedElement
anElement, VirtualFile vfsRoot, Source metadata) throws NamingException
+ public void setupServiceRef(Context encCtx, String encName, AnnotatedElement
anElement, VirtualFile vfsRoot, String xmlFragment) throws NamingException
{
- setupWebServiceRef(encCtx, encName, anElement, new VirtualFileAdaptor(vfsRoot),
metadata);
+ setupServiceRef(encCtx, encName, anElement, new VirtualFileAdaptor(vfsRoot),
xmlFragment);
}
public void create() throws Exception
Modified:
branches/tdiesler/trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/WebServiceRefHandlerMBean.java
===================================================================
---
branches/tdiesler/trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/WebServiceRefHandlerMBean.java 2007-03-06
13:45:43 UTC (rev 2535)
+++
branches/tdiesler/trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/WebServiceRefHandlerMBean.java 2007-03-06
15:20:12 UTC (rev 2536)
@@ -27,7 +27,6 @@
import javax.management.ObjectName;
import javax.naming.Context;
import javax.naming.NamingException;
-import javax.xml.transform.Source;
import org.jboss.virtual.VirtualFile;
import org.jboss.ws.core.utils.ObjectNameFactory;
@@ -38,9 +37,9 @@
public interface WebServiceRefHandlerMBean
{
// default object name
- public static final ObjectName OBJECT_NAME =
ObjectNameFactory.create("jboss.ws:service=WebServiceRefHandler");
+ public static final ObjectName OBJECT_NAME =
ObjectNameFactory.create("jboss.ws:service=ServiceRefHandler");
/** Binds a JAXWS WebServiceRef into the callers ENC
*/
- void setupWebServiceRef(Context encCtx, String encName, AnnotatedElement enElement,
VirtualFile vfsRoot, Source metadata) throws NamingException;
+ void setupServiceRef(Context encCtx, String encName, AnnotatedElement enElement,
VirtualFile vfsRoot, String xmlFragment) throws NamingException;
}
Modified:
branches/tdiesler/trunk/integration-jboss50/src/resources/jbossws.deployer/META-INF/jbossws-deployer-beans.xml
===================================================================
---
branches/tdiesler/trunk/integration-jboss50/src/resources/jbossws.deployer/META-INF/jbossws-deployer-beans.xml 2007-03-06
13:45:43 UTC (rev 2535)
+++
branches/tdiesler/trunk/integration-jboss50/src/resources/jbossws.deployer/META-INF/jbossws-deployer-beans.xml 2007-03-06
15:20:12 UTC (rev 2536)
@@ -47,12 +47,9 @@
<property
name="serviceEndpointServlet">org.jboss.ws.integration.jboss50.JBossServiceEndpointServlet</property>
</bean>
- <!-- Bind JAXRPC Service objects in client environment context -->
- <bean name="ServiceRefHandler"
class="org.jboss.ws.integration.jboss50.ServiceRefHandler"/>
+ <!-- Bind Service objects in client environment context -->
+ <bean name="ServiceRefHandler"
class="org.jboss.ws.integration.jboss50.WebServiceRefHandler"/>
- <!-- Bind JAXWS Service objects in client environment context -->
- <bean name="WebServiceRefHandler"
class="org.jboss.ws.integration.jboss50.WebServiceRefHandler"/>
-
<!-- A subscription manager for WS-Eventing -->
<bean name="SubscriptionManager"
class="org.jboss.ws.extensions.eventing.mgmt.SubscriptionManager"/>
Modified:
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/client/ServiceImpl.java
===================================================================
---
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/client/ServiceImpl.java 2007-03-06
13:45:43 UTC (rev 2535)
+++
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/client/ServiceImpl.java 2007-03-06
15:20:12 UTC (rev 2536)
@@ -27,12 +27,10 @@
import java.net.URL;
import java.rmi.Remote;
import java.util.ArrayList;
-import java.util.Enumeration;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
-import java.util.Properties;
import java.util.Set;
import javax.xml.namespace.QName;
@@ -47,8 +45,10 @@
import org.jboss.logging.Logger;
import org.jboss.ws.core.StubExt;
import org.jboss.ws.metadata.builder.jaxrpc.JAXRPCClientMetaDataBuilder;
-import org.jboss.ws.metadata.j2ee.UnifiedPortComponentRefMetaData;
-import org.jboss.ws.metadata.j2ee.UnifiedServiceRefMetaData;
+import org.jboss.ws.metadata.j2ee.serviceref.CallPropertyMetaData;
+import org.jboss.ws.metadata.j2ee.serviceref.InitParamMetaData;
+import org.jboss.ws.metadata.j2ee.serviceref.PortComponentRefMetaData;
+import org.jboss.ws.metadata.j2ee.serviceref.ServiceRefMetaData;
import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
import org.jboss.ws.metadata.umdm.HandlerMetaData;
@@ -57,7 +57,6 @@
import org.jboss.ws.metadata.umdm.ResourceLoaderAdapter;
import org.jboss.ws.metadata.umdm.ServiceMetaData;
import org.jboss.ws.metadata.umdm.UnifiedMetaData;
-import org.jboss.ws.metadata.umdm.HandlerMetaData.HandlerInitParam;
import org.jboss.ws.metadata.umdm.HandlerMetaData.HandlerType;
import org.jboss.ws.metadata.wsse.WSSecurityConfiguration;
@@ -83,7 +82,7 @@
// The optional WSDL location
private URL wsdlLocation;
// The <service-ref> meta data
- private UnifiedServiceRefMetaData usrMetaData;
+ private ServiceRefMetaData usrMetaData;
// The handler registry
private HandlerRegistryImpl handlerRegistry;
@@ -115,14 +114,14 @@
/**
* Construct a Service that has access to some WSDL meta data
*/
- ServiceImpl(QName serviceName, URL wsdlURL, JavaWsdlMapping mappingURL,
WSSecurityConfiguration securityConfig, UnifiedServiceRefMetaData usrMetaData)
+ ServiceImpl(QName serviceName, URL wsdlURL, JavaWsdlMapping mappingURL,
WSSecurityConfiguration securityConfig, ServiceRefMetaData usrMetaData)
{
this.wsdlLocation = wsdlURL;
this.usrMetaData = usrMetaData;
JAXRPCClientMetaDataBuilder builder = new JAXRPCClientMetaDataBuilder();
ClassLoader ctxClassLoader = Thread.currentThread().getContextClassLoader();
-
+
serviceMetaData = builder.buildMetaData(serviceName, wsdlURL, mappingURL,
securityConfig, usrMetaData, ctxClassLoader);
handlerRegistry = new HandlerRegistryImpl(serviceMetaData);
}
@@ -419,37 +418,19 @@
// nothing to do
if (usrMetaData == null)
return;
-
+
// General properties
- Properties callProps = usrMetaData.getCallProperties();
- if (callProps != null)
- {
- Enumeration<?> names = callProps.propertyNames();
- while (names.hasMoreElements())
- {
- String name = (String)names.nextElement();
- String value = callProps.getProperty(name);
- call.setProperty(name, value);
- }
- }
-
+ for (CallPropertyMetaData prop : usrMetaData.getCallProperties())
+ call.setProperty(prop.getPropName(), prop.getPropValue());
+
if (seiName != null)
{
- for (UnifiedPortComponentRefMetaData upcRef :
usrMetaData.getPortComponentRefs())
+ for (PortComponentRefMetaData upcRef : usrMetaData.getPortComponentRefs())
{
if (seiName.equals(upcRef.getServiceEndpointInterface()))
{
- callProps = upcRef.getCallProperties();
- if (callProps != null)
- {
- Enumeration<?> names = callProps.propertyNames();
- while (names.hasMoreElements())
- {
- String name = (String)names.nextElement();
- String value = callProps.getProperty(name);
- call.setProperty(name, value);
- }
- }
+ for (CallPropertyMetaData prop : upcRef.getCallProperties())
+ call.setProperty(prop.getPropName(), prop.getPropValue());
}
}
}
@@ -482,7 +463,7 @@
handlerRoles.addAll(jaxrpcMetaData.getSoapRoles());
HashMap hConfig = new HashMap();
- for (HandlerInitParam param : jaxrpcMetaData.getInitParams())
+ for (InitParamMetaData param : jaxrpcMetaData.getInitParams())
{
hConfig.put(param.getParamName(), param.getParamValue());
}
@@ -495,7 +476,8 @@
hConfig.put(HandlerType.class.getName(), jaxrpcMetaData.getHandlerType());
HandlerInfo info = new HandlerInfo(hClass, hConfig, headerArr);
- if(log.isDebugEnabled()) log.debug("Adding client side handler to endpoint
'" + portName + "': " + info);
+ if (log.isDebugEnabled())
+ log.debug("Adding client side handler to endpoint '" + portName
+ "': " + info);
handlerInfos.add(info);
// register the handlers with the client engine
Modified:
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/client/ServiceObjectFactory.java
===================================================================
---
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/client/ServiceObjectFactory.java 2007-03-06
13:45:43 UTC (rev 2535)
+++
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/client/ServiceObjectFactory.java 2007-03-06
15:20:12 UTC (rev 2536)
@@ -37,6 +37,7 @@
import java.rmi.Remote;
import java.util.Hashtable;
import java.util.List;
+import java.util.Properties;
import javax.naming.Context;
import javax.naming.Name;
@@ -54,8 +55,9 @@
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.UnifiedPortComponentRefMetaData;
-import org.jboss.ws.metadata.j2ee.UnifiedServiceRefMetaData;
+import org.jboss.ws.metadata.j2ee.serviceref.CallPropertyMetaData;
+import org.jboss.ws.metadata.j2ee.serviceref.PortComponentRefMetaData;
+import org.jboss.ws.metadata.j2ee.serviceref.ServiceRefMetaData;
import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
import org.jboss.ws.metadata.umdm.ServiceMetaData;
@@ -102,13 +104,13 @@
Reference ref = (Reference)obj;
// Unmarshall the ServiceRefMetaData
- UnifiedServiceRefMetaData usrMetaData = null;
+ ServiceRefMetaData serviceRefMetaData = null;
RefAddr metaRefAddr = ref.get(ServiceReferenceable.SERVICE_REF_META_DATA);
ByteArrayInputStream bais = new
ByteArrayInputStream((byte[])metaRefAddr.getContent());
try
{
ObjectInputStream ois = new ObjectInputStream(bais);
- usrMetaData = (UnifiedServiceRefMetaData)ois.readObject();
+ serviceRefMetaData = (ServiceRefMetaData)ois.readObject();
ois.close();
}
catch (IOException ex)
@@ -137,15 +139,15 @@
}
ServiceImpl jaxrpcService = null;
- URL wsdlLocation = usrMetaData.getWsdlLocation();
+ URL wsdlLocation = serviceRefMetaData.getWsdlLocation();
if (wsdlLocation != null)
{
if(log.isDebugEnabled()) log.debug("Create jaxrpc service from
wsdl");
// Create the actual service object
- QName serviceName = usrMetaData.getServiceQName();
- JavaWsdlMapping javaWsdlMapping =
(JavaWsdlMapping)usrMetaData.getJavaWsdlMapping();
- jaxrpcService = new ServiceImpl(serviceName, wsdlLocation, javaWsdlMapping,
securityConfig, usrMetaData);
+ QName serviceName = serviceRefMetaData.getServiceQName();
+ JavaWsdlMapping javaWsdlMapping =
(JavaWsdlMapping)serviceRefMetaData.getJavaWsdlMapping();
+ jaxrpcService = new ServiceImpl(serviceName, wsdlLocation, javaWsdlMapping,
securityConfig, serviceRefMetaData);
}
else
{
@@ -153,9 +155,16 @@
jaxrpcService = new ServiceImpl(new QName(Constants.NS_JBOSSWS_URI,
"AnonymousService"));
}
+ ServiceMetaData serviceMetaData = jaxrpcService.getServiceMetaData();
+
// Set any service level properties
- ServiceMetaData serviceMetaData = jaxrpcService.getServiceMetaData();
- serviceMetaData.setProperties(usrMetaData.getCallProperties());
+ if (serviceRefMetaData.getCallProperties().size() > 0)
+ {
+ Properties callProps = new Properties();
+ serviceMetaData.setProperties(callProps);
+ for (CallPropertyMetaData prop : serviceRefMetaData.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
@@ -211,15 +220,13 @@
// load the service interface class
ClassLoader contextCL = Thread.currentThread().getContextClassLoader();
- Class siClass = contextCL.loadClass(usrMetaData.getServiceInterface());
+ Class siClass = contextCL.loadClass(serviceRefMetaData.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
- UnifiedPortComponentRefMetaData[] pcrArray =
usrMetaData.getPortComponentRefs();
- for (int i = 0; i < pcrArray.length; i++)
+ for (PortComponentRefMetaData pcr : serviceRefMetaData.getPortComponentRefs())
{
- UnifiedPortComponentRefMetaData pcr = pcrArray[i];
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());
Modified:
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/client/ServiceReferenceable.java
===================================================================
---
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/client/ServiceReferenceable.java 2007-03-06
13:45:43 UTC (rev 2535)
+++
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/client/ServiceReferenceable.java 2007-03-06
15:20:12 UTC (rev 2536)
@@ -26,7 +26,6 @@
import java.io.ByteArrayOutputStream;
import java.io.IOException;
-import java.io.InputStream;
import java.io.ObjectOutputStream;
import java.net.URL;
@@ -37,12 +36,11 @@
import javax.naming.StringRefAddr;
import org.jboss.logging.Logger;
+import org.jboss.ws.core.UnifiedVirtualFile;
import org.jboss.ws.core.server.ServiceEndpointManager;
import org.jboss.ws.core.server.ServiceEndpointManagerFactory;
-import org.jboss.ws.core.server.UnifiedDeploymentInfo;
-import org.jboss.ws.metadata.j2ee.UnifiedPortComponentRefMetaData;
-import org.jboss.ws.metadata.j2ee.UnifiedServiceRefMetaData;
-import org.jboss.ws.metadata.j2ee.UnifiedWebMetaData;
+import org.jboss.ws.metadata.j2ee.serviceref.PortComponentRefMetaData;
+import org.jboss.ws.metadata.j2ee.serviceref.ServiceRefMetaData;
import org.jboss.ws.metadata.wsse.WSSecurityConfiguration;
import org.jboss.ws.metadata.wsse.WSSecurityOMFactory;
@@ -61,25 +59,20 @@
private static Logger log = Logger.getLogger(ServiceReferenceable.class);
public static final String SERVICE_REF_META_DATA = "SERVICE_REF_META_DATA";
- public static final String DEPLOYMENT_URL = "DEPLOYMENT_URL";
public static final String SECURITY_CONFIG = "SECURITY_CONFIG";
- public static final String DESCRIPTOR_LOC = "DESCRIPTOR_LOC";
public static final String PORT_COMPONENT_LINK = "PORT_COMPONENT_LINK";
public static final String PORT_COMPONENT_LINK_SERVLET =
"PORT_COMPONENT_LINK_SERVLET";
- private UnifiedServiceRefMetaData refMetaData;
- private UnifiedDeploymentInfo udi;
+ private ServiceRefMetaData refMetaData;
+ private UnifiedVirtualFile vfsRoot;
/**
* A service referenceable for a WSDL document that is part of the deployment
- *
- * @param refMetaData The service-ref meta data
- * @param udi The client DeploymentInfo
*/
- public ServiceReferenceable(UnifiedServiceRefMetaData refMetaData,
UnifiedDeploymentInfo udi)
+ public ServiceReferenceable(ServiceRefMetaData refMetaData)
{
this.refMetaData = refMetaData;
- this.udi = udi;
+ this.vfsRoot = refMetaData.getVfsRoot();
}
/**
@@ -92,11 +85,6 @@
{
Reference myRef = new Reference(ServiceReferenceable.class.getName(),
ServiceObjectFactory.class.getName(), null);
- // The deployment URL of the web service client deployment
- // Add a reference to the client deployment URL
- String deploymentID = udi.name;
- myRef.add(new StringRefAddr(DEPLOYMENT_URL, deploymentID));
-
// Add a reference to the ServiceRefMetaData and WSDLDefinitions
myRef.add(new BinaryRefAddr(SERVICE_REF_META_DATA, marshallServiceRef()));
@@ -105,10 +93,8 @@
myRef.add(new BinaryRefAddr(SECURITY_CONFIG, marshallSecurityConfig()));
// Add references to port component links
- UnifiedPortComponentRefMetaData[] pcrArr = refMetaData.getPortComponentRefs();
- for (int i = 0; i < pcrArr.length; i++)
+ for (PortComponentRefMetaData pcr : refMetaData.getPortComponentRefs())
{
- UnifiedPortComponentRefMetaData pcr = pcrArr[i];
String pcLink = pcr.getPortComponentLink();
if (pcLink != null)
{
@@ -161,8 +147,8 @@
try
{
ObjectOutputStream oos = new ObjectOutputStream(baos);
- URL vfConfig = getSecurityConfig();
- WSSecurityConfiguration securityConfig =
WSSecurityOMFactory.newInstance().parse(vfConfig);
+ WSSecurityOMFactory factory = WSSecurityOMFactory.newInstance();
+ WSSecurityConfiguration securityConfig = factory.parse(getSecurityConfig());
oos.writeObject(securityConfig);
oos.close();
}
@@ -175,19 +161,23 @@
private URL getSecurityConfig()
{
- String descriptorPath = udi.metaData instanceof UnifiedWebMetaData ?
"WEB-INF" : "META-INF";
- descriptorPath = descriptorPath + "/" +
WSSecurityOMFactory.CLIENT_RESOURCE_NAME;
+ URL securityConfigURL = null;
try
{
- URL vfConfig = udi.getMetaDataFileURL(descriptorPath);
- InputStream inputStream = vfConfig.openStream();
- inputStream.close();
- return vfConfig;
+ vfsRoot.findChild("WEB-INF/" +
WSSecurityOMFactory.CLIENT_RESOURCE_NAME);
}
catch (IOException ex)
{
- if(log.isDebugEnabled()) log.debug("Cannot find security config: " +
descriptorPath);
- return null;
+ // ignore
}
+ try
+ {
+ vfsRoot.findChild("META-INF/" +
WSSecurityOMFactory.CLIENT_RESOURCE_NAME);
+ }
+ catch (IOException ex)
+ {
+ // ignore
+ }
+ return securityConfigURL;
}
}
\ No newline at end of file
Modified:
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/handler/HandlerDelegateJAXRPC.java
===================================================================
---
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/handler/HandlerDelegateJAXRPC.java 2007-03-06
13:45:43 UTC (rev 2535)
+++
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/handler/HandlerDelegateJAXRPC.java 2007-03-06
15:20:12 UTC (rev 2536)
@@ -38,10 +38,10 @@
import org.jboss.ws.core.server.ServiceEndpointInfo;
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.extensions.xop.XOPContext;
+import org.jboss.ws.metadata.j2ee.serviceref.InitParamMetaData;
import org.jboss.ws.metadata.umdm.HandlerMetaData;
import org.jboss.ws.metadata.umdm.HandlerMetaDataJAXRPC;
import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
-import org.jboss.ws.metadata.umdm.HandlerMetaData.HandlerInitParam;
import org.jboss.ws.metadata.umdm.HandlerMetaData.HandlerType;
/** Delegates to JAXRPC handlers
@@ -158,7 +158,7 @@
handlerRoles.addAll(jaxrpcMetaData.getSoapRoles());
HashMap<String, Object> hConfig = new HashMap<String, Object>();
- for (HandlerInitParam param : jaxrpcMetaData.getInitParams())
+ for (InitParamMetaData param : jaxrpcMetaData.getInitParams())
{
hConfig.put(param.getParamName(), param.getParamValue());
}
Deleted:
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/ServiceRefHandlerJAXWS.java
===================================================================
---
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/ServiceRefHandlerJAXWS.java 2007-03-06
13:45:43 UTC (rev 2535)
+++
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/ServiceRefHandlerJAXWS.java 2007-03-06
15:20:12 UTC (rev 2536)
@@ -1,185 +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.ws.core.jaxws;
-
-// $Id$
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.AnnotatedElement;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.net.MalformedURLException;
-import java.net.URL;
-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.WSException;
-import org.jboss.ws.core.UnifiedVirtualFile;
-import org.jboss.ws.core.jaxws.client.ServiceReferenceable;
-import org.jboss.ws.core.jaxws.client.UnifiedServiceRef;
-
-/**
- * Binds a JAXWS Service object in the client's ENC
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 17-Jan-2007
- */
-public class ServiceRefHandlerJAXWS
-{
- // logging support
- private static Logger log = Logger.getLogger(ServiceRefHandlerJAXWS.class);
-
- public void setupServiceRef(Context encCtx, String encName, AnnotatedElement
anElement, UnifiedVirtualFile vfsRoot, String xmlFragment) throws NamingException
- {
- WebServiceRef wsref = null;
-
- // Build the list of @WebServiceRef relevant annotations
- List<WebServiceRef> wsrefList = new ArrayList<WebServiceRef>();
- for (Annotation an : anElement.getAnnotations())
- {
- if (an instanceof WebServiceRef)
- wsrefList.add((WebServiceRef)an);
-
- if (an instanceof WebServiceRefs)
- {
- WebServiceRefs wsrefs = (WebServiceRefs)an;
- for (WebServiceRef aux : wsrefs.value())
- wsrefList.add(aux);
- }
- }
-
- // Use the single @WebServiceRef
- if (wsrefList.size() == 1)
- {
- wsref = wsrefList.get(0);
- }
- else
- {
- for (WebServiceRef aux : wsrefList)
- {
- if (encName.endsWith("/" + aux.name()))
- {
- wsref = aux;
- break;
- }
- }
- }
-
- if (wsref == null)
- throw new IllegalArgumentException("@WebServiceRef must be present on:
" + anElement);
-
- Class targetClass = null;
- if (anElement instanceof Field)
- targetClass = ((Field)anElement).getType();
- else if (anElement instanceof Method)
- targetClass = ((Method)anElement).getParameterTypes()[0];
-
- String externalName = encCtx.getNameInNamespace() + "/" + encName;
- String targetClassName = (targetClass != null ? targetClass.getName() : null);
- log.debug("setupWebServiceRef [jndi=" + externalName +
",target=" + targetClassName + "]");
-
- String serviceClassName = null;
-
- // #1 Use the explicit @WebServiceRef.value
- if (wsref.value() != Object.class)
- serviceClassName = wsref.value().getName();
-
- // #2 Use the target ref type
- if (serviceClassName == null && targetClass != null &&
Service.class.isAssignableFrom(targetClass))
- serviceClassName = targetClass.getName();
-
- // #3 Use javax.xml.ws.Service
- if (serviceClassName == null)
- serviceClassName = Service.class.getName();
-
- // #1 Use the explicit @WebServiceRef.type
- if (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();
-
- try
- {
- UnifiedServiceRefObjectFactory factory =
UnifiedServiceRefObjectFactory.newInstance();
- UnifiedServiceRef usRef = factory.parse(xmlFragment);
- usRef.setRootFile(vfsRoot);
-
- // Set the wsdlLocation if there is no override already
- if (usRef.getWsdlLocation() == null && wsref.wsdlLocation().length()
> 0)
- usRef.setWsdlLocation(wsref.wsdlLocation());
-
- // Set the handlerChain from @HandlerChain on the annotated element
- String handlerChain = usRef.getHandlerChain();
- HandlerChain anHandlerChain = anElement.getAnnotation(HandlerChain.class);
- if (handlerChain == null && anHandlerChain != null &&
anHandlerChain.file().length() > 0)
- handlerChain = anHandlerChain.file();
-
- // Resolve path to handler chain
- if (handlerChain != null)
- {
- try
- {
- new URL(handlerChain);
- }
- catch (MalformedURLException ex)
- {
- Class declaringClass = null;
- if (anElement instanceof Field)
- declaringClass = ((Field)anElement).getDeclaringClass();
- else if (anElement instanceof Method)
- declaringClass = ((Method)anElement).getDeclaringClass();
- else if (anElement instanceof Class)
- declaringClass = (Class)anElement;
-
- handlerChain = declaringClass.getPackage().getName().replace('.',
'/') + "/" + handlerChain;
- }
-
- usRef.setHandlerChain(handlerChain);
- }
-
- // Do not use rebind, the binding should be unique
- // [JBWS-1499] - Revisit WebServiceRefHandler JNDI rebind
- Util.rebind(encCtx, encName, new ServiceReferenceable(serviceClassName,
targetClassName, usRef));
-
- log.debug("<service-ref> bound to: java:comp/env/" + encName);
- }
- catch (RuntimeException rte)
- {
- throw rte;
- }
- catch (Exception ex)
- {
- throw new WSException("Cannot bind web service ref: " + encName, ex);
- }
- }
-}
Deleted:
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/UnifiedServiceRefObjectFactory.java
===================================================================
---
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/UnifiedServiceRefObjectFactory.java 2007-03-06
13:45:43 UTC (rev 2535)
+++
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/UnifiedServiceRefObjectFactory.java 2007-03-06
15:20:12 UTC (rev 2536)
@@ -1,173 +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.ws.core.jaxws;
-
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.ws.WSException;
-import org.jboss.ws.core.jaxws.client.NameValuePair;
-import org.jboss.ws.core.jaxws.client.PortInfo;
-import org.jboss.ws.core.jaxws.client.UnifiedServiceRef;
-import org.jboss.xb.binding.ObjectModelFactory;
-import org.jboss.xb.binding.Unmarshaller;
-import org.jboss.xb.binding.UnmarshallerFactory;
-import org.jboss.xb.binding.UnmarshallingContext;
-import org.xml.sax.Attributes;
-
-/**
- * An ObjectModelFactory for UnifiedServiceRef
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 17-Jan-2007
- */
-public class UnifiedServiceRefObjectFactory implements ObjectModelFactory
-{
- // Hide constructor
- private UnifiedServiceRefObjectFactory()
- {
- }
-
- public static UnifiedServiceRefObjectFactory newInstance()
- {
- return new UnifiedServiceRefObjectFactory();
- }
-
- public UnifiedServiceRef parse(String xmlFragment)
- {
- try
- {
- InputStream is = new ByteArrayInputStream(xmlFragment.getBytes());
- Unmarshaller unmarshaller =
UnmarshallerFactory.newInstance().newUnmarshaller();
- return (UnifiedServiceRef)unmarshaller.unmarshal(is, this, null);
- }
- catch (Exception ex)
- {
- WSException.rethrow(ex);
- return null;
- }
- }
-
- public Object newRoot(Object root, UnmarshallingContext navigator, String
namespaceURI, String localName, Attributes attrs)
- {
- return new UnifiedServiceRef();
- }
-
- public Object completeRoot(Object root, UnmarshallingContext ctx, String uri, String
name)
- {
- return root;
- }
-
- public void setValue(UnifiedServiceRef ref, UnmarshallingContext navigator, String
namespaceURI, String localName, String value)
- {
- if (localName.equals("service-ref-name"))
- {
- ref.setServiceRefName(value);
- }
- else if (localName.equals("service-class-name"))
- {
- ref.setServiceClassName(value);
- }
- else if (localName.equals("service-qname"))
- {
- ref.setServiceQName(QName.valueOf(value));
- }
- else if (localName.equals("config-name"))
- {
- ref.setConfigName(value);
- }
- else if (localName.equals("config-file"))
- {
- ref.setConfigFile(value);
- }
- else if (localName.equals("handler-chain"))
- {
- ref.setHandlerChain(value);
- }
- else if (localName.equals("wsdl-override"))
- {
- ref.setWsdlLocation(value);
- }
- }
-
- public Object newChild(UnifiedServiceRef parent, UnmarshallingContext navigator,
String namespaceURI, String localName, Attributes attrs)
- {
- Object child = null;
-
- if (localName.equals("port-info"))
- child = new PortInfo(parent);
-
- return child;
- }
-
- public void addChild(UnifiedServiceRef parent, PortInfo portInfo, UnmarshallingContext
navigator, String namespaceURI, String localName)
- {
- parent.getPortInfos().add(portInfo);
- }
-
- public void setValue(PortInfo portInfo, UnmarshallingContext navigator, String
namespaceURI, String localName, String value)
- {
- if (localName.equals("service-endpoint-interface"))
- {
- portInfo.setServiceEndpointInterface(value);
- }
- else if (localName.equals("port-qname"))
- {
- portInfo.setPortQName(QName.valueOf(value));
- }
- else if (localName.equals("config-name"))
- {
- portInfo.setConfigName(value);
- }
- else if (localName.equals("config-file"))
- {
- portInfo.setConfigFile(value);
- }
- }
-
- public Object newChild(PortInfo portInfo, UnmarshallingContext navigator, String
namespaceURI, String localName, Attributes attrs)
- {
- Object child = null;
- if (localName.equals("stub-property"))
- child = new NameValuePair();
- return child;
- }
-
- public void addChild(PortInfo parent, NameValuePair stubProp, UnmarshallingContext
navigator, String namespaceURI, String localName)
- {
- parent.getStubProperties().add(stubProp);
- }
-
- public void setValue(NameValuePair nvPair, UnmarshallingContext navigator, String
namespaceURI, String localName, String value)
- {
- if (localName.equals("name"))
- {
- nvPair.setName(value);
- }
- else if (localName.equals("value"))
- {
- nvPair.setValue(value);
- }
- }
-}
Deleted:
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/PortInfo.java
===================================================================
---
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/PortInfo.java 2007-03-06
13:45:43 UTC (rev 2535)
+++
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/PortInfo.java 2007-03-06
15:20:12 UTC (rev 2536)
@@ -1,102 +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.ws.core.jaxws.client;
-
-//$Id$
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.namespace.QName;
-
-/**
- * Represents a <port-info> element in <service-ref>
- *
- * @author Thomas.Diesler(a)jboss.com
- */
-public class PortInfo implements Serializable
-{
- private static final long serialVersionUID = -5517739021682888778L;
-
- private UnifiedServiceRef serviceRef;
- private String serviceEndpointInterface;
- private QName portQName;
- private String configName;
- private String configFile;
- private List<NameValuePair> stubProperties = new
ArrayList<NameValuePair>();
-
- public PortInfo(UnifiedServiceRef serviceRef)
- {
- this.serviceRef = serviceRef;
- }
-
- public UnifiedServiceRef getServiceRef()
- {
- return serviceRef;
- }
-
- public QName getPortQName()
- {
- return portQName;
- }
-
- public void setPortQName(QName portName)
- {
- this.portQName = portName;
- }
-
- public String getServiceEndpointInterface()
- {
- return serviceEndpointInterface;
- }
-
- public void setServiceEndpointInterface(String serviceEndpointInterface)
- {
- this.serviceEndpointInterface = serviceEndpointInterface;
- }
-
- public String getConfigFile()
- {
- return configFile;
- }
-
- public void setConfigFile(String configFile)
- {
- this.configFile = configFile;
- }
-
- public String getConfigName()
- {
- return configName;
- }
-
- public void setConfigName(String configName)
- {
- this.configName = configName;
- }
-
- public List<NameValuePair> getStubProperties()
- {
- return stubProperties;
- }
-}
Modified:
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ServiceObjectFactory.java
===================================================================
---
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ServiceObjectFactory.java 2007-03-06
13:45:43 UTC (rev 2535)
+++
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ServiceObjectFactory.java 2007-03-06
15:20:12 UTC (rev 2536)
@@ -25,13 +25,11 @@
// $Id$
import java.io.ByteArrayInputStream;
-import java.io.File;
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.MalformedURLException;
import java.net.URL;
import java.util.Hashtable;
@@ -47,7 +45,7 @@
import org.jboss.logging.Logger;
import org.jboss.ws.WSException;
import org.jboss.ws.core.ConfigProvider;
-import org.jboss.ws.core.UnifiedVirtualFile;
+import org.jboss.ws.metadata.j2ee.serviceref.ServiceRefMetaData;
/**
* This ServiceObjectFactory reconstructs a javax.xml.ws.Service
@@ -61,8 +59,8 @@
// provide logging
private static final Logger log = Logger.getLogger(ServiceObjectFactory.class);
- // The UnifiedServiceRef association
- private static ThreadLocal serviceRefAssociation = new ThreadLocal();
+ // The ServiceRefMetaData association
+ private static ThreadLocal<ServiceRefMetaData> serviceRefAssociation = new
ThreadLocal<ServiceRefMetaData>();
/**
* Creates an object using the location or reference information specified.
@@ -94,23 +92,23 @@
String targetClassName =
(String)ref.get(ServiceReferenceable.TARGET_CLASS_NAME).getContent();
// Unmarshall the UnifiedServiceRef
- UnifiedServiceRef usRef = unmarshallServiceRef(ref);
- String serviceRefName = usRef.getServiceRefName();
- QName serviceQName = usRef.getServiceQName();
+ ServiceRefMetaData serviceRef = unmarshallServiceRef(ref);
+ String serviceRefName = serviceRef.getServiceRefName();
+ QName serviceQName = serviceRef.getServiceQName();
- String serviceClassName = usRef.getServiceClassName();
- if (serviceClassName == null)
- serviceClassName =
(String)ref.get(ServiceReferenceable.SERVICE_CLASS_NAME).getContent();
+ String serviceInterface = serviceRef.getServiceInterface();
+ if (serviceInterface == null)
+ serviceInterface =
(String)ref.get(ServiceReferenceable.SERVICE_CLASS_NAME).getContent();
// If the target defaults to javax.xml.ws.Service, user the service as the
target
if (Service.class.getName().equals(targetClassName))
- targetClassName = serviceClassName;
+ targetClassName = serviceInterface;
- if(log.isDebugEnabled()) log.debug("[name=" + serviceRefName +
",service=" + serviceClassName + ",target=" + targetClassName +
"]");
+ if(log.isDebugEnabled()) log.debug("[name=" + serviceRefName +
",service=" + serviceInterface + ",target=" + targetClassName +
"]");
// Load the service class
ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
- Class serviceClass = ctxLoader.loadClass(serviceClassName);
+ Class serviceClass = ctxLoader.loadClass(serviceInterface);
Class targetClass = (targetClassName != null ?
ctxLoader.loadClass(targetClassName) : null);
if (Service.class.isAssignableFrom(serviceClass) == false)
@@ -120,12 +118,11 @@
Object target;
// Get the URL to the wsdl
- URL wsdlURL = getWsdlLocationURL(targetClass != null ? targetClass :
serviceClass, usRef);
-
+ URL wsdlURL = serviceRef.getWsdlLocation();
try
{
- // Associate the UnifiedServiceRef with this thread
- serviceRefAssociation.set(usRef);
+ // Associate the ServiceRefMetaData with this thread
+ serviceRefAssociation.set(serviceRef);
// Generic javax.xml.ws.Service
if (serviceClass == Service.class)
@@ -159,9 +156,9 @@
}
// Configure the service
- configureService((Service)target, usRef);
+ configureService((Service)target, serviceRef);
- if (targetClassName != null && targetClassName.equals(serviceClassName)
== false)
+ if (targetClassName != null && targetClassName.equals(serviceInterface)
== false)
{
try
{
@@ -203,16 +200,16 @@
}
}
- public static UnifiedServiceRef getUnifiedServiceRefAssociation()
+ public static ServiceRefMetaData getServiceRefAssociation()
{
// The ServiceDelegateImpl get the usRef at ctor time
- return (UnifiedServiceRef)serviceRefAssociation.get();
+ return (ServiceRefMetaData)serviceRefAssociation.get();
}
- private void configureService(Service service, UnifiedServiceRef usRef)
+ private void configureService(Service service, ServiceRefMetaData serviceRef)
{
- String configFile = usRef.getConfigFile();
- String configName = usRef.getConfigName();
+ String configFile = serviceRef.getConfigFile();
+ String configName = serviceRef.getConfigName();
if (service instanceof ConfigProvider)
{
if(log.isDebugEnabled()) log.debug("Configure Service: [configName=" +
configName + ",configFile=" + configFile + "]");
@@ -223,15 +220,15 @@
}
}
- private UnifiedServiceRef unmarshallServiceRef(Reference ref) throws
ClassNotFoundException, NamingException
+ private ServiceRefMetaData unmarshallServiceRef(Reference ref) throws
ClassNotFoundException, NamingException
{
- UnifiedServiceRef sref;
- RefAddr refAddr = ref.get(ServiceReferenceable.UNIFIED_SERVICE_REF);
+ ServiceRefMetaData sref;
+ RefAddr refAddr = ref.get(ServiceReferenceable.SERVICE_REF_META_DATA);
ByteArrayInputStream bais = new
ByteArrayInputStream((byte[])refAddr.getContent());
try
{
ObjectInputStream ois = new ObjectInputStream(bais);
- sref = (UnifiedServiceRef)ois.readObject();
+ sref = (ServiceRefMetaData)ois.readObject();
ois.close();
}
catch (IOException e)
@@ -240,71 +237,4 @@
}
return sref;
}
-
- private URL getWsdlLocationURL(Class userClass, UnifiedServiceRef usRef)
- {
- UnifiedVirtualFile vfsRoot = usRef.getRootFile();
- String wsdlLocation = usRef.getWsdlLocation();
-
- URL wsdlURL = null;
- if (wsdlLocation != null)
- {
- // Try the wsdlLocation as URL
- try
- {
- wsdlURL = new URL(wsdlLocation);
- }
- catch (MalformedURLException ex)
- {
- // ignore
- }
-
- // Try the filename as File
- if (wsdlURL == null)
- {
- try
- {
- File file = new File(wsdlLocation);
- if (file.exists())
- wsdlURL = file.toURL();
- }
- catch (MalformedURLException e)
- {
- // ignore
- }
- }
-
- // Try the filename as Resource
- if (wsdlURL == null)
- {
- try
- {
- wsdlURL = vfsRoot.findChild(wsdlLocation).toURL();
- }
- catch (Exception ex)
- {
- // ignore
- }
- }
-
- // Try the filename relative to class
- if (wsdlURL == null)
- {
- String packagePath = userClass.getPackage().getName().replace('.',
'/');
- String wsdlPath = packagePath + "/" + wsdlLocation;
- try
- {
- wsdlURL = vfsRoot.findChild(wsdlPath).toURL();
- }
- catch (Exception ex)
- {
- // ignore
- }
- }
-
- if (wsdlURL == null)
- throw new IllegalArgumentException("Cannot get URL for: " +
wsdlLocation);
- }
- return wsdlURL;
- }
}
Modified:
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ServiceReferenceable.java
===================================================================
---
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ServiceReferenceable.java 2007-03-06
13:45:43 UTC (rev 2535)
+++
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ServiceReferenceable.java 2007-03-06
15:20:12 UTC (rev 2536)
@@ -34,7 +34,9 @@
import javax.naming.Referenceable;
import javax.naming.StringRefAddr;
+import org.jboss.ws.metadata.j2ee.serviceref.ServiceRefMetaData;
+
/**
* A JNDI reference to a javax.xml.ws.Service
*
@@ -46,19 +48,19 @@
*/
public class ServiceReferenceable implements Referenceable
{
- public static final String UNIFIED_SERVICE_REF = "UNIFIED_SERVICE_REF";
+ public static final String SERVICE_REF_META_DATA = "SERVICE_REF_META_DATA";
public static final String SERVICE_CLASS_NAME = "SERVICE_CLASS_NAME";
public static final String TARGET_CLASS_NAME = "TARGET_CLASS_NAME";
private String serviceClassName;
private String targetClassName;
- private UnifiedServiceRef usRef;
+ private ServiceRefMetaData serviceRef;
- public ServiceReferenceable(String serviceClassName, String targetClassName,
UnifiedServiceRef usRef)
+ public ServiceReferenceable(String serviceClassName, String targetClassName,
ServiceRefMetaData serviceRef)
{
this.serviceClassName = serviceClassName;
this.targetClassName = targetClassName;
- this.usRef = usRef;
+ this.serviceRef = serviceRef;
}
/**
@@ -73,7 +75,7 @@
myRef.add(new StringRefAddr(SERVICE_CLASS_NAME, serviceClassName));
myRef.add(new StringRefAddr(TARGET_CLASS_NAME, targetClassName));
- myRef.add(new BinaryRefAddr(UNIFIED_SERVICE_REF, marshall(usRef)));
+ myRef.add(new BinaryRefAddr(SERVICE_REF_META_DATA, marshall(serviceRef)));
return myRef;
}
Deleted:
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/UnifiedServiceRef.java
===================================================================
---
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/UnifiedServiceRef.java 2007-03-06
13:45:43 UTC (rev 2535)
+++
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/UnifiedServiceRef.java 2007-03-06
15:20:12 UTC (rev 2536)
@@ -1,147 +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.ws.core.jaxws.client;
-
-//$Id$
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.ws.core.UnifiedVirtualFile;
-
-/**
- * Represents a <service-ref> element of the jboss.xml, jboss-web.xml,
jboss-client.xml
- *
- * @author Thomas.Diesler(a)jboss.com
- * @since 16-Dec-2006
- */
-public class UnifiedServiceRef implements Serializable
-{
- private static final long serialVersionUID = -6242639118713373752L;
-
- private UnifiedVirtualFile vfsRoot;
- private String serviceRefName;
- private String serviceClassName;
- private QName serviceQName;
- private String configName;
- private String configFile;
- private String handlerChain;
- private List<PortInfo> portInfos = new ArrayList<PortInfo>();
- private String wsdlLocation;
-
- public UnifiedVirtualFile getRootFile()
- {
- return vfsRoot;
- }
-
- public void setRootFile(UnifiedVirtualFile vfsRoot)
- {
- this.vfsRoot = vfsRoot;
- }
-
- public String getServiceRefName()
- {
- return serviceRefName;
- }
-
- public void setServiceRefName(String name)
- {
- this.serviceRefName = name;
- }
-
- public String getServiceClassName()
- {
- return serviceClassName;
- }
-
- public void setServiceClassName(String serviceClassName)
- {
- this.serviceClassName = serviceClassName;
- }
-
- public QName getServiceQName()
- {
- return serviceQName;
- }
-
- public void setServiceQName(QName serviceQName)
- {
- this.serviceQName = serviceQName;
- }
-
- public String getConfigFile()
- {
- return configFile;
- }
-
- public void setConfigFile(String configFile)
- {
- this.configFile = configFile;
- }
-
- public String getConfigName()
- {
- return configName;
- }
-
- public void setConfigName(String configName)
- {
- this.configName = configName;
- }
-
- public String getHandlerChain()
- {
- return handlerChain;
- }
-
- public void setHandlerChain(String handlerChain)
- {
- this.handlerChain = handlerChain;
- }
-
- public List<PortInfo> getPortInfos()
- {
- return portInfos;
- }
-
- public String getWsdlLocation()
- {
- return wsdlLocation;
- }
-
- public void setWsdlLocation(String wsdlLocation)
- {
- this.wsdlLocation = wsdlLocation;
- }
-
- public String toString()
- {
- StringBuffer sb = new StringBuffer(100);
- sb.append("[");
- sb.append("name=").append(serviceRefName);
- sb.append("]");
- return sb.toString();
- }
-}
Modified:
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java
===================================================================
---
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java 2007-03-06
13:45:43 UTC (rev 2535)
+++
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java 2007-03-06
15:20:12 UTC (rev 2536)
@@ -52,12 +52,12 @@
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.NameValuePair;
-import org.jboss.ws.core.jaxws.client.PortInfo;
import org.jboss.ws.core.jaxws.client.ServiceObjectFactory;
-import org.jboss.ws.core.jaxws.client.UnifiedServiceRef;
import org.jboss.ws.core.jaxws.handler.HandlerResolverImpl;
import org.jboss.ws.metadata.builder.jaxws.JAXWSClientMetaDataBuilder;
+import org.jboss.ws.metadata.j2ee.serviceref.PortComponentRefMetaData;
+import org.jboss.ws.metadata.j2ee.serviceref.ServiceRefMetaData;
+import org.jboss.ws.metadata.j2ee.serviceref.StubPropertyMetaData;
import org.jboss.ws.metadata.umdm.ClientEndpointMetaData;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
import org.jboss.ws.metadata.umdm.ResourceLoaderAdapter;
@@ -83,8 +83,8 @@
private static ExecutorService defaultExecutor = Executors.newCachedThreadPool();
// The service meta data that is associated with this JAXWS Service
private ServiceMetaData serviceMetaData;
- // The UnifiedServiceRef supplied by the ServiceObjectFactory
- private UnifiedServiceRef usRef;
+ // The ServiceRefMetaData supplied by the ServiceObjectFactory
+ private ServiceRefMetaData usRef;
// The handler resolver
private HandlerResolver handlerResolver = new HandlerResolverImpl();
// The executor service
@@ -95,11 +95,11 @@
public ServiceDelegateImpl(URL wsdlURL, QName serviceName)
{
- usRef = ServiceObjectFactory.getUnifiedServiceRefAssociation();
+ usRef = ServiceObjectFactory.getServiceRefAssociation();
UnifiedVirtualFile vfsRoot;
if(usRef!=null)
- vfsRoot = usRef.getRootFile();
+ vfsRoot = usRef.getVfsRoot();
else
vfsRoot = new ResourceLoaderAdapter();
@@ -351,7 +351,7 @@
String seiName = epMetaData.getServiceEndpointInterfaceName();
QName portName = epMetaData.getPortName();
- if(usRef == null || usRef.getPortInfos().size() == 0)
+ if(usRef == null || usRef.getPortComponentRefs().size() == 0)
{
if(log.isDebugEnabled()) log.debug("No port configuration for: " +
portName);
return;
@@ -361,7 +361,7 @@
String configName = usRef.getConfigName();
boolean match = false;
- for (PortInfo pi : usRef.getPortInfos())
+ for (PortComponentRefMetaData pi : usRef.getPortComponentRefs())
{
String piSEI = pi.getServiceEndpointInterface();
QName piPort = pi.getPortQName();
@@ -382,10 +382,10 @@
BindingProvider bp = (BindingProvider)stub;
Map<String, Object> reqCtx = bp.getRequestContext();
- for (NameValuePair nvp : pi.getStubProperties())
+ for (StubPropertyMetaData prop : pi.getStubProperties())
{
- if(log.isDebugEnabled()) log.debug("Set stub property: " +
nvp);
- reqCtx.put(nvp.getName(), nvp.getValue());
+ log.debug("Set stub property: " + prop);
+ reqCtx.put(prop.getPropName(), prop.getPropValue());
}
break;
}
Modified:
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCClientMetaDataBuilder.java
===================================================================
---
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCClientMetaDataBuilder.java 2007-03-06
13:45:43 UTC (rev 2535)
+++
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCClientMetaDataBuilder.java 2007-03-06
15:20:12 UTC (rev 2536)
@@ -33,8 +33,8 @@
import org.jboss.ws.Constants;
import org.jboss.ws.WSException;
import org.jboss.ws.core.UnifiedVirtualFile;
-import org.jboss.ws.metadata.j2ee.UnifiedHandlerMetaData;
-import org.jboss.ws.metadata.j2ee.UnifiedServiceRefMetaData;
+import org.jboss.ws.metadata.j2ee.serviceref.HandlerMetaData;
+import org.jboss.ws.metadata.j2ee.serviceref.ServiceRefMetaData;
import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMappingFactory;
import org.jboss.ws.metadata.jaxrpcmapping.ServiceEndpointInterfaceMapping;
@@ -66,7 +66,7 @@
/** Build from WSDL and jaxrpc-mapping.xml
*/
public ServiceMetaData buildMetaData(QName serviceQName, URL wsdlURL, URL mappingURL,
URL securityURL,
- UnifiedServiceRefMetaData serviceRefMetaData, ClassLoader loader)
+ ServiceRefMetaData serviceRefMetaData, ClassLoader loader)
{
try
{
@@ -98,7 +98,7 @@
/** Build from WSDL and jaxrpc-mapping.xml
*/
public ServiceMetaData buildMetaData(QName serviceQName, URL wsdlURL, JavaWsdlMapping
javaWsdlMapping, WSSecurityConfiguration securityConfig,
- UnifiedServiceRefMetaData usrMetaData, ClassLoader loader)
+ ServiceRefMetaData usrMetaData, ClassLoader loader)
{
if(log.isDebugEnabled()) log.debug("START buildMetaData: [service=" +
serviceQName + "]");
try
@@ -150,7 +150,7 @@
}
private void buildMetaDataInternal(ServiceMetaData serviceMetaData, WSDLDefinitions
wsdlDefinitions, JavaWsdlMapping javaWsdlMapping,
- UnifiedServiceRefMetaData serviceRefMetaData) throws IOException
+ ServiceRefMetaData serviceRefMetaData) throws IOException
{
QName serviceQName = serviceMetaData.getServiceName();
@@ -219,12 +219,12 @@
}
}
- private void setupHandlers(UnifiedServiceRefMetaData serviceRefMetaData, QName
portName, EndpointMetaData epMetaData)
+ private void setupHandlers(ServiceRefMetaData serviceRefMetaData, QName portName,
EndpointMetaData epMetaData)
{
// Setup the endpoint handlers
if (serviceRefMetaData != null)
{
- for (UnifiedHandlerMetaData uhmd : serviceRefMetaData.getHandlers())
+ for (HandlerMetaData uhmd : serviceRefMetaData.getHandlers())
{
Set<String> portNames = uhmd.getPortNames();
if (portNames.size() == 0 || portNames.contains(portName.getLocalPart()))
Modified:
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/config/binding/OMFactoryJAXRPC.java
===================================================================
---
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/config/binding/OMFactoryJAXRPC.java 2007-03-06
13:45:43 UTC (rev 2535)
+++
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/config/binding/OMFactoryJAXRPC.java 2007-03-06
15:20:12 UTC (rev 2536)
@@ -32,8 +32,8 @@
import org.jboss.ws.metadata.config.jaxrpc.ConfigRootJAXRPC;
import org.jboss.ws.metadata.config.jaxrpc.EndpointConfigJAXRPC;
import org.jboss.ws.metadata.j2ee.UnifiedHandlerMetaData;
+import org.jboss.ws.metadata.j2ee.serviceref.InitParamMetaData;
import org.jboss.ws.metadata.jsr181.HandlerChainMetaData;
-import org.jboss.ws.metadata.umdm.HandlerMetaData.HandlerInitParam;
import org.jboss.xb.binding.ObjectModelFactory;
import org.jboss.xb.binding.UnmarshallingContext;
import org.xml.sax.Attributes;
@@ -167,7 +167,7 @@
/**
* Called when a new simple child element with text value was read from the XML
content.
*/
- public void setValue(HandlerInitParam param, UnmarshallingContext navigator, String
namespaceURI, String localName, String value)
+ public void setValue(InitParamMetaData param, UnmarshallingContext navigator, String
namespaceURI, String localName, String value)
{
if (log.isTraceEnabled())
log.trace("UnifiedInitParamMetaData setValue: nuri=" + namespaceURI +
" localName=" + localName + " value=" + value);
Modified:
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/UnifiedHandlerMetaData.java
===================================================================
---
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/UnifiedHandlerMetaData.java 2007-03-06
13:45:43 UTC (rev 2535)
+++
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/UnifiedHandlerMetaData.java 2007-03-06
15:20:12 UTC (rev 2536)
@@ -31,11 +31,11 @@
import javax.xml.namespace.QName;
+import org.jboss.ws.metadata.j2ee.serviceref.InitParamMetaData;
import org.jboss.ws.metadata.jsr181.HandlerChainMetaData;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
import org.jboss.ws.metadata.umdm.HandlerMetaDataJAXRPC;
import org.jboss.ws.metadata.umdm.HandlerMetaDataJAXWS;
-import org.jboss.ws.metadata.umdm.HandlerMetaData.HandlerInitParam;
import org.jboss.ws.metadata.umdm.HandlerMetaData.HandlerType;
/**
@@ -55,7 +55,7 @@
// The required <handler-class> element
private String handlerClass;
// The optional <init-param> elements
- private ArrayList<HandlerInitParam> initParams = new
ArrayList<HandlerInitParam>();
+ private ArrayList<InitParamMetaData> initParams = new
ArrayList<InitParamMetaData>();
// The optional <soap-header> elements
private Set<QName> soapHeaders = new HashSet<QName>();
// The optional <soap-role> elements
@@ -88,12 +88,12 @@
return handlerClass;
}
- public void addInitParam(HandlerInitParam param)
+ public void addInitParam(InitParamMetaData param)
{
initParams.add(param);
}
- public List<HandlerInitParam> getInitParams()
+ public List<InitParamMetaData> getInitParams()
{
return initParams;
}
Modified:
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/UnifiedPortComponentRefMetaData.java
===================================================================
---
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/UnifiedPortComponentRefMetaData.java 2007-03-06
13:45:43 UTC (rev 2535)
+++
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/UnifiedPortComponentRefMetaData.java 2007-03-06
15:20:12 UTC (rev 2536)
@@ -41,7 +41,7 @@
// The optional <port-component-link> element
private String portComponentLink;
// Arbitrary proxy properties given by <call-property>
- private Properties callProperties;
+ private Properties callProperties = new Properties();
public String getPortComponentLink()
{
Added:
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/CallPropertyMetaData.java
===================================================================
---
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/CallPropertyMetaData.java
(rev 0)
+++
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/CallPropertyMetaData.java 2007-03-06
15:20:12 UTC (rev 2536)
@@ -0,0 +1,63 @@
+/*
+* 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.ws.metadata.j2ee.serviceref;
+
+// $Id$
+
+import java.io.Serializable;
+
+/**
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 06-May-2004
+ */
+public class CallPropertyMetaData implements Serializable
+{
+ // The required <prop-name> element
+ private String propName;
+ // The required <prop-value> element
+ private String propValue;
+
+ public String getPropName()
+ {
+ return propName;
+ }
+
+ public void setPropName(String paramName)
+ {
+ this.propName = paramName;
+ }
+
+ public String getPropValue()
+ {
+ return propValue;
+ }
+
+ public void setPropValue(String paramValue)
+ {
+ this.propValue = paramValue;
+ }
+
+ public String toString()
+ {
+ return "[name=" + propName + ",value=" + propValue +
"]";
+ }
+}
Property changes on:
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/CallPropertyMetaData.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/HandlerChainMetaData.java
===================================================================
---
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/HandlerChainMetaData.java
(rev 0)
+++
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/HandlerChainMetaData.java 2007-03-06
15:20:12 UTC (rev 2536)
@@ -0,0 +1,82 @@
+/*
+ * 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.ws.metadata.j2ee.serviceref;
+
+// $Id$
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+
+/** The unified metdata data for a handler chain element
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ */
+public class HandlerChainMetaData implements Serializable
+{
+ private QName serviceNamePattern;
+ private QName portNamePattern;
+ private String protocolBindings;
+ private List<HandlerMetaData> handlers = new
ArrayList<HandlerMetaData>();
+
+ public QName getPortNamePattern()
+ {
+ return portNamePattern;
+ }
+
+ public void setPortNamePattern(QName portNamePattern)
+ {
+ this.portNamePattern = portNamePattern;
+ }
+
+ public QName getServiceNamePattern()
+ {
+ return serviceNamePattern;
+ }
+
+ public void setServiceNamePattern(QName serviceNamePattern)
+ {
+ this.serviceNamePattern = serviceNamePattern;
+ }
+
+ public String getProtocolBindings()
+ {
+ return protocolBindings;
+ }
+
+ public void setProtocolBindings(String protocolBindings)
+ {
+ this.protocolBindings = protocolBindings;
+ }
+
+ public List<HandlerMetaData> getHandlers()
+ {
+ return handlers;
+ }
+
+ public void addHandler(HandlerMetaData handler)
+ {
+ handlers.add(handler);
+ }
+}
Property changes on:
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/HandlerChainMetaData.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/HandlerChainsMetaData.java
===================================================================
---
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/HandlerChainsMetaData.java
(rev 0)
+++
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/HandlerChainsMetaData.java 2007-03-06
15:20:12 UTC (rev 2536)
@@ -0,0 +1,47 @@
+/*
+ * 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.ws.metadata.j2ee.serviceref;
+
+// $Id$
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+/** The unified metdata data for a handler chains element
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ */
+public class HandlerChainsMetaData implements Serializable
+{
+ private List<HandlerChainMetaData> handlerChains = new
ArrayList<HandlerChainMetaData>();
+
+ public List<HandlerChainMetaData> getHandlerChains()
+ {
+ return handlerChains;
+ }
+
+ public void addHandlerChain(HandlerChainMetaData handlerChain)
+ {
+ handlerChains.add(handlerChain);
+ }
+}
Property changes on:
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/HandlerChainsMetaData.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/HandlerMetaData.java
===================================================================
---
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/HandlerMetaData.java
(rev 0)
+++
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/HandlerMetaData.java 2007-03-06
15:20:12 UTC (rev 2536)
@@ -0,0 +1,148 @@
+/*
+ * 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.ws.metadata.j2ee.serviceref;
+
+// $Id$
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.ws.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.metadata.umdm.HandlerMetaDataJAXRPC;
+import org.jboss.ws.metadata.umdm.HandlerMetaDataJAXWS;
+import org.jboss.ws.metadata.umdm.HandlerMetaData.HandlerType;
+
+/** The unified metdata data for a handler element
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @version $Revision$
+ */
+public class HandlerMetaData implements Serializable
+{
+ private HandlerChainMetaData handlerChain;
+
+ // The required <handler-name> element
+ private String handlerName;
+ // The required <handler-class> element
+ private String handlerClass;
+ // The optional <init-param> elements
+ private List<InitParamMetaData> initParams = new
ArrayList<InitParamMetaData>();
+ // The optional <soap-header> elements
+ private Set<QName> soapHeaders = new HashSet<QName>();
+ // The optional <soap-role> elements
+ private Set<String> soapRoles = new HashSet<String>();
+ // The optional <port-name> elements, these only apply to webserve clients
+ private Set<String> portNames = new HashSet<String>();
+
+
+ public void setHandlerName(String value)
+ {
+ this.handlerName = value;
+ }
+
+ public String getHandlerName()
+ {
+ return handlerName;
+ }
+
+ public void setHandlerClass(String handlerClass)
+ {
+ this.handlerClass = handlerClass;
+ }
+
+ public String getHandlerClass()
+ {
+ return handlerClass;
+ }
+
+ public void addInitParam(InitParamMetaData param)
+ {
+ initParams.add(param);
+ }
+
+ public List<InitParamMetaData> getInitParams()
+ {
+ return initParams;
+ }
+
+ public void addSoapHeader(QName qName)
+ {
+ soapHeaders.add(qName);
+ }
+
+ public Set<QName> getSoapHeaders()
+ {
+ return soapHeaders;
+ }
+
+ public void addSoapRole(String value)
+ {
+ soapRoles.add(value);
+ }
+
+ public Set<String> getSoapRoles()
+ {
+ return soapRoles;
+ }
+
+ public Set<String> getPortNames()
+ {
+ return portNames;
+ }
+
+ public void addPortName(String value)
+ {
+ portNames.add(value);
+ }
+
+ public HandlerMetaDataJAXRPC getHandlerMetaDataJAXRPC (EndpointMetaData epMetaData,
HandlerType type)
+ {
+ HandlerMetaDataJAXRPC hmd = new HandlerMetaDataJAXRPC(epMetaData, type);
+ hmd.setHandlerName(getHandlerName());
+ hmd.setHandlerClassName(getHandlerClass());
+ hmd.seiInitParams(getInitParams());
+ hmd.setSoapHeaders(getSoapHeaders());
+ hmd.setSoapRoles(getSoapRoles());
+ hmd.setPortNames(getPortNames());
+ return hmd;
+ }
+
+ public HandlerMetaDataJAXWS getHandlerMetaDataJAXWS (EndpointMetaData epMetaData,
HandlerType type)
+ {
+ HandlerMetaDataJAXWS hmd = new HandlerMetaDataJAXWS(epMetaData, type);
+ hmd.setHandlerName(getHandlerName());
+ hmd.setHandlerClassName(getHandlerClass());
+ hmd.seiInitParams(getInitParams());
+ if (handlerChain != null)
+ {
+ hmd.setProtocolBindings(handlerChain.getProtocolBindings());
+ hmd.setServiceNamePattern(handlerChain.getServiceNamePattern());
+ hmd.setPortNamePattern(handlerChain.getPortNamePattern());
+ }
+ return hmd;
+ }
+}
Property changes on:
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/HandlerMetaData.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/InitParamMetaData.java
===================================================================
---
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/InitParamMetaData.java
(rev 0)
+++
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/InitParamMetaData.java 2007-03-06
15:20:12 UTC (rev 2536)
@@ -0,0 +1,63 @@
+/*
+* 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.ws.metadata.j2ee.serviceref;
+
+// $Id$
+
+import java.io.Serializable;
+
+/**
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 06-May-2004
+ */
+public class InitParamMetaData implements Serializable
+{
+ // The required <param-name> element
+ private String paramName;
+ // The required <param-value> element
+ private String paramValue;
+
+ public String getParamName()
+ {
+ return paramName;
+ }
+
+ public void setParamName(String paramName)
+ {
+ this.paramName = paramName;
+ }
+
+ public String getParamValue()
+ {
+ return paramValue;
+ }
+
+ public void setParamValue(String paramValue)
+ {
+ this.paramValue = paramValue;
+ }
+
+ public String toString()
+ {
+ return "[name=" + paramName + ",value=" + paramValue +
"]";
+ }
+}
Property changes on:
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/InitParamMetaData.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/PortComponentRefMetaData.java
===================================================================
---
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/PortComponentRefMetaData.java
(rev 0)
+++
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/PortComponentRefMetaData.java 2007-03-06
15:20:12 UTC (rev 2536)
@@ -0,0 +1,168 @@
+/*
+ * 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.ws.metadata.j2ee.serviceref;
+
+// $Id$
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+
+/** The metdata data from service-ref/port-component-ref element in web.xml, ejb-jar.xml,
and application-client.xml.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ */
+public class PortComponentRefMetaData implements Serializable
+{
+ // The parent service-ref
+ private ServiceRefMetaData serviceRefMetaData;
+
+ // The required <service-endpoint-interface> element
+ private String serviceEndpointInterface;
+ // The optional <enable-mtom> element
+ private Boolean enableMTOM;
+ // The optional <port-component-link> element
+ private String portComponentLink;
+ // The optional <port-qname> element
+ private QName portQName;
+ // Arbitrary proxy properties given by <call-property>
+ private List<CallPropertyMetaData> callProperties = new
ArrayList<CallPropertyMetaData>();
+ // Arbitrary proxy properties given by <stub-property>
+ private List<StubPropertyMetaData> stubProperties = new
ArrayList<StubPropertyMetaData>();
+ // The optional JBossWS config-name
+ private String configName;
+ // The optional JBossWS config-file
+ private String configFile;
+
+ public PortComponentRefMetaData(ServiceRefMetaData serviceRefMetaData)
+ {
+ this.serviceRefMetaData = serviceRefMetaData;
+ }
+
+ public ServiceRefMetaData getServiceRefMetaData()
+ {
+ return serviceRefMetaData;
+ }
+
+ public Boolean getEnableMTOM()
+ {
+ return enableMTOM;
+ }
+
+ public void setEnableMTOM(Boolean enableMTOM)
+ {
+ this.enableMTOM = enableMTOM;
+ }
+
+ /**
+ * The port-component-link element links a port-component-ref
+ * to a specific port-component required to be made available
+ * by a service reference.
+ *
+ * The value of a port-component-link must be the
+ * port-component-name of a port-component in the same module
+ * or another module in the same application unit. The syntax
+ * for specification follows the syntax defined for ejb-link
+ * in the EJB 2.0 specification.
+ */
+ public String getPortComponentLink()
+ {
+ return portComponentLink;
+ }
+
+ public void setPortComponentLink(String portComponentLink)
+ {
+ this.portComponentLink = portComponentLink;
+ }
+
+ public String getServiceEndpointInterface()
+ {
+ return serviceEndpointInterface;
+ }
+
+ public void setServiceEndpointInterface(String serviceEndpointInterface)
+ {
+ this.serviceEndpointInterface = serviceEndpointInterface;
+ }
+
+ public QName getPortQName()
+ {
+ return portQName;
+ }
+
+ public void setPortQName(QName portQName)
+ {
+ this.portQName = portQName;
+ }
+
+ public List<CallPropertyMetaData> getCallProperties()
+ {
+ return callProperties;
+ }
+
+ public void setCallProperties(List<CallPropertyMetaData> callProps)
+ {
+ callProperties = callProps;
+ }
+
+ public void addCallProperty(CallPropertyMetaData callProp)
+ {
+ callProperties.add(callProp);
+ }
+
+ public List<StubPropertyMetaData> getStubProperties()
+ {
+ return stubProperties;
+ }
+
+ public void setStubProperties(List<StubPropertyMetaData> stubProps)
+ {
+ stubProperties = stubProps;
+ }
+
+ public void addStubProperty(StubPropertyMetaData stubProp)
+ {
+ stubProperties.add(stubProp);
+ }
+
+ public String getConfigFile()
+ {
+ return configFile;
+ }
+
+ public void setConfigFile(String configFile)
+ {
+ this.configFile = configFile;
+ }
+
+ public String getConfigName()
+ {
+ return configName;
+ }
+
+ public void setConfigName(String configName)
+ {
+ this.configName = configName;
+ }
+}
Property changes on:
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/PortComponentRefMetaData.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/ServiceRefMetaData.java
===================================================================
---
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/ServiceRefMetaData.java
(rev 0)
+++
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/ServiceRefMetaData.java 2007-03-06
15:20:12 UTC (rev 2536)
@@ -0,0 +1,321 @@
+/*
+ * 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.ws.metadata.j2ee.serviceref;
+
+// $Id$
+
+import java.io.Serializable;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.wsdl.Definition;
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.UnifiedVirtualFile;
+import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
+import org.jboss.ws.tools.wsdl.WSDL11DefinitionFactory;
+
+/**
+ * The metdata data from service-ref element in web.xml, ejb-jar.xml, and
+ * application-client.xml.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ */
+public class ServiceRefMetaData implements Serializable
+{
+ // provide logging
+ private static Logger log = Logger.getLogger(ServiceRefMetaData.class);
+
+ // The required <service-ref-name> element
+ private String serviceRefName;
+ // The required <service-interface> element
+ private String serviceInterface;
+ // service-res-type
+ private String serviceRefType;
+ // The optional <wsdl-file> element
+ private String wsdlFile;
+ // The optional <jaxrpc-mapping-file> element
+ private String mappingFile;
+ // The optional <service-qname> element
+ private QName serviceQName;
+ // The LinkedHashMap<String, PortComponentRefMetaData> for
<port-component-ref> elements
+ private Map<String, PortComponentRefMetaData> portComponentRefs = new
LinkedHashMap<String, PortComponentRefMetaData>();
+ // The optional <handler> elements. JAX-RPC handlers declared in the standard
J2EE1.4 descriptor
+ private List<HandlerMetaData> handlers = new
ArrayList<HandlerMetaData>();
+ // The optional <handler-chains> elements. JAX-WS handlers declared in the
standard JavaEE5 descriptor
+ private HandlerChainsMetaData handlerChains;
+ // The optional <handler-chain> element. JAX-WS handler chain declared in the
JBoss JavaEE5 descriptor
+ private String handlerChain;
+ // The optional JBossWS config-name
+ private String configName;
+ // The optional JBossWS config-file
+ private String configFile;
+ // The optional URL of the actual WSDL to use, <wsdl-override>
+ private URL wsdlOverride;
+ // Arbitrary proxy properties given by <call-property>
+ private List<CallPropertyMetaData> callProperties = new
ArrayList<CallPropertyMetaData>();
+
+ private UnifiedVirtualFile vfsRoot;
+ // derived from jaxrpc-mapping-file
+ private JavaWsdlMapping javaWsdlMapping;
+ // derived from wsdl-override, wsdl-file
+ private URL wsdlLocation;
+ // derived from wsdl-override, wsdl-file
+ private Definition wsdlDefinition;
+
+ public UnifiedVirtualFile getVfsRoot()
+ {
+ return vfsRoot;
+ }
+
+ public void setVfsRoot(UnifiedVirtualFile vfsRoot)
+ {
+ this.vfsRoot = vfsRoot;
+ }
+
+ public String getServiceRefName()
+ {
+ return serviceRefName;
+ }
+
+ public void setServiceRefName(String serviceRefName)
+ {
+ this.serviceRefName = serviceRefName;
+ }
+
+ public String getMappingFile()
+ {
+ return mappingFile;
+ }
+
+ public void setMappingFile(String mappingFile)
+ {
+ this.mappingFile = mappingFile;
+ }
+
+ public JavaWsdlMapping getJavaWsdlMapping()
+ {
+ return javaWsdlMapping;
+ }
+
+ public void setJavaWsdlMapping(JavaWsdlMapping javaWsdlMapping)
+ {
+ this.javaWsdlMapping = javaWsdlMapping;
+ }
+
+ public URL getMappingLocation()
+ {
+ URL mappingLocation = null;
+ if (mappingFile != null)
+ {
+ try
+ {
+ mappingLocation = vfsRoot.findChild(mappingFile).toURL();
+ }
+ catch (Exception e)
+ {
+ throw new WSException("Cannot find jaxrcp-mapping-file: " +
mappingFile, e);
+ }
+ }
+ return mappingLocation;
+ }
+
+ public Collection<PortComponentRefMetaData> getPortComponentRefs()
+ {
+ return portComponentRefs.values();
+ }
+
+ public PortComponentRefMetaData getPortComponentRef(String seiName)
+ {
+ PortComponentRefMetaData ref = portComponentRefs.get(seiName);
+ return ref;
+ }
+
+ public void addPortComponentRef(PortComponentRefMetaData pcRef)
+ {
+ portComponentRefs.put(pcRef.getServiceEndpointInterface(), pcRef);
+ }
+
+ public List<HandlerMetaData> getHandlers()
+ {
+ return handlers;
+ }
+
+ public void addHandler(HandlerMetaData handler)
+ {
+ handlers.add(handler);
+ }
+
+ public String getServiceInterface()
+ {
+ return serviceInterface;
+ }
+
+ public void setServiceInterface(String serviceInterface)
+ {
+ this.serviceInterface = serviceInterface;
+ }
+
+ public QName getServiceQName()
+ {
+ return serviceQName;
+ }
+
+ public void setServiceQName(QName serviceQName)
+ {
+ this.serviceQName = serviceQName;
+ }
+
+ public String getServiceRefType()
+ {
+ return serviceRefType;
+ }
+
+ public void setServiceRefType(String serviceResType)
+ {
+ this.serviceRefType = serviceResType;
+ }
+
+ public String getWsdlFile()
+ {
+ return wsdlFile;
+ }
+
+ public void setWsdlFile(String wsdlFile)
+ {
+ this.wsdlFile = wsdlFile;
+ }
+
+ public URL getWsdlLocation()
+ {
+ if (wsdlLocation != null)
+ return wsdlLocation;
+
+ wsdlLocation = wsdlOverride;
+ if (wsdlLocation == null && wsdlFile != null)
+ {
+ try
+ {
+ wsdlLocation = vfsRoot.findChild(wsdlFile).toURL();
+ }
+ catch (Exception e)
+ {
+ throw new WSException("Cannot find wsdl-file: " + wsdlFile, e);
+ }
+ }
+ return wsdlLocation;
+ }
+
+ public void setWsdlLocation(URL wsdlLocation)
+ {
+ this.wsdlLocation = wsdlLocation;
+ }
+
+ public Definition getWsdlDefinition()
+ {
+ return wsdlDefinition;
+ }
+
+ public void setWsdlDefinition(Definition wsdlDefinition)
+ {
+ this.wsdlDefinition = wsdlDefinition;
+ }
+
+ public String getConfigFile()
+ {
+ return configFile;
+ }
+
+ public void setConfigFile(String configFile)
+ {
+ this.configFile = configFile;
+ }
+
+ public String getConfigName()
+ {
+ return configName;
+ }
+
+ public void setConfigName(String configName)
+ {
+ this.configName = configName;
+ }
+
+ public URL getWsdlOverride()
+ {
+ return wsdlOverride;
+ }
+
+ public void setWsdlOverride(String wsdlOverride)
+ {
+ try
+ {
+ this.wsdlOverride = new URL(wsdlOverride);
+ }
+ catch (MalformedURLException e)
+ {
+ throw new IllegalArgumentException("Invalid wsdl-override: " +
wsdlOverride);
+ }
+ }
+
+ public List<CallPropertyMetaData> getCallProperties()
+ {
+ return callProperties;
+ }
+
+ public void setCallProperties(List<CallPropertyMetaData> callProps)
+ {
+ callProperties = callProps;
+ }
+
+ public void addCallProperty(CallPropertyMetaData callProp)
+ {
+ callProperties.add(callProp);
+ }
+
+ public HandlerChainsMetaData getHandlerChains()
+ {
+ return handlerChains;
+ }
+
+ public void setHandlerChains(HandlerChainsMetaData handlerChains)
+ {
+ this.handlerChains = handlerChains;
+ }
+
+ public String getHandlerChain()
+ {
+ return handlerChain;
+ }
+
+ public void setHandlerChain(String handlerChain)
+ {
+ this.handlerChain = handlerChain;
+ }
+}
Property changes on:
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/ServiceRefMetaData.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/ServiceRefObjectFactory.java
===================================================================
---
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/ServiceRefObjectFactory.java
(rev 0)
+++
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/ServiceRefObjectFactory.java 2007-03-06
15:20:12 UTC (rev 2536)
@@ -0,0 +1,302 @@
+/*
+ * 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.ws.metadata.j2ee.serviceref;
+
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.ws.WSException;
+import org.jboss.xb.binding.ObjectModelFactory;
+import org.jboss.xb.binding.Unmarshaller;
+import org.jboss.xb.binding.UnmarshallerFactory;
+import org.jboss.xb.binding.UnmarshallingContext;
+import org.xml.sax.Attributes;
+
+/**
+ * An ObjectModelFactory for ServiceRefMetaData
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 17-Jan-2007
+ */
+public class ServiceRefObjectFactory implements ObjectModelFactory
+{
+ // Hide constructor
+ private ServiceRefObjectFactory()
+ {
+ }
+
+ public static ServiceRefObjectFactory newInstance()
+ {
+ return new ServiceRefObjectFactory();
+ }
+
+ public ServiceRefMetaData parse(String xmlFragment)
+ {
+ try
+ {
+ InputStream is = new ByteArrayInputStream(xmlFragment.getBytes());
+
+ Unmarshaller unmarshaller =
UnmarshallerFactory.newInstance().newUnmarshaller();
+ return (ServiceRefMetaData)unmarshaller.unmarshal(is, this, null);
+ }
+ catch (Exception ex)
+ {
+ WSException.rethrow(ex);
+ return null;
+ }
+ }
+
+ public Object newRoot(Object root, UnmarshallingContext navigator, String
namespaceURI, String localName, Attributes attrs)
+ {
+ return new ServiceRefMetaData();
+ }
+
+ public Object completeRoot(Object root, UnmarshallingContext ctx, String uri, String
name)
+ {
+ return root;
+ }
+
+ // ********************************************************
+ // START ServiceRefMetaData
+
+ public void setValue(ServiceRefMetaData ref, UnmarshallingContext navigator, String
namespaceURI, String localName, String value)
+ {
+ /* Standard properties */
+ if (localName.equals("service-ref-name"))
+ {
+ ref.setServiceRefName(value);
+ }
+ else if (localName.equals("service-interface"))
+ {
+ ref.setServiceInterface(value);
+ }
+ else if (localName.equals("service-ref-type"))
+ {
+ ref.setServiceRefType(value);
+ }
+ else if (localName.equals("wsdl-file"))
+ {
+ ref.setWsdlFile(value);
+ }
+ else if (localName.equals("jaxrpc-mapping-file"))
+ {
+ ref.setMappingFile(value);
+ }
+ else if (localName.equals("service-qname"))
+ {
+ ref.setServiceQName(QName.valueOf(value));
+ }
+
+ /* JBoss properties */
+ else if (localName.equals("config-name"))
+ {
+ ref.setConfigName(value);
+ }
+ else if (localName.equals("config-file"))
+ {
+ ref.setConfigFile(value);
+ }
+ else if (localName.equals("wsdl-override"))
+ {
+ ref.setWsdlOverride(value);
+ }
+ else if (localName.equals("handler-chain"))
+ {
+ ref.setHandlerChain(value);
+ }
+ }
+
+ public Object newChild(ServiceRefMetaData ref, UnmarshallingContext navigator, String
namespaceURI, String localName, Attributes attrs)
+ {
+ Object child = null;
+ if (localName.equals("port-component-ref"))
+ child = new PortComponentRefMetaData(ref);
+ else if (localName.equals("handler"))
+ child = new HandlerMetaData();
+ else if (localName.equals("handler-chains"))
+ child = new HandlerChainsMetaData();
+
+ else if (localName.equals("call-property"))
+ child = new CallPropertyMetaData();
+
+ return child;
+ }
+
+ public Object newChild(HandlerChainsMetaData ref, UnmarshallingContext navigator,
String namespaceURI, String localName, Attributes attrs)
+ {
+ Object child = null;
+ if (localName.equals("handler-chain"))
+ child = new HandlerChainMetaData();
+
+ return child;
+ }
+
+ public void addChild(ServiceRefMetaData parent, PortComponentRefMetaData pcRef,
UnmarshallingContext navigator, String namespaceURI, String localName)
+ {
+ parent.addPortComponentRef(pcRef);
+ }
+
+ public void addChild(ServiceRefMetaData parent, HandlerMetaData handler,
UnmarshallingContext navigator, String namespaceURI, String localName)
+ {
+ parent.addHandler(handler);
+ }
+
+ public void addChild(ServiceRefMetaData parent, HandlerChainsMetaData handlerChains,
UnmarshallingContext navigator, String namespaceURI, String localName)
+ {
+ parent.setHandlerChains(handlerChains);
+ }
+
+ public void addChild(ServiceRefMetaData parent, CallPropertyMetaData callProp,
UnmarshallingContext navigator, String namespaceURI, String localName)
+ {
+ parent.addCallProperty(callProp);
+ }
+
+ public void addChild(HandlerChainsMetaData parent, HandlerChainMetaData handlerChain,
UnmarshallingContext navigator, String namespaceURI, String localName)
+ {
+ parent.addHandlerChain(handlerChain);
+ }
+
+ public void setValue(PortComponentRefMetaData ref, UnmarshallingContext navigator,
String namespaceURI, String localName, String value)
+ {
+ if (localName.equals("service-endpoint-interface"))
+ {
+ ref.setServiceEndpointInterface(value);
+ }
+ else if (localName.equals("enable-mtom"))
+ {
+ ref.setEnableMTOM(Boolean.valueOf(value));
+ }
+ else if (localName.equals("port-component-link"))
+ {
+ ref.setPortComponentLink(value);
+ }
+ else if (localName.equals("port-qname"))
+ {
+ ref.setPortComponentLink(value);
+ }
+ }
+
+ public Object newChild(PortComponentRefMetaData ref, UnmarshallingContext navigator,
String namespaceURI, String localName, Attributes attrs)
+ {
+ Object child = null;
+ if (localName.equals("call-property"))
+ child = new CallPropertyMetaData();
+ if (localName.equals("stub-property"))
+ child = new StubPropertyMetaData();
+ return child;
+ }
+
+ public void setValue(HandlerChainMetaData ref, UnmarshallingContext navigator, String
namespaceURI, String localName, String value)
+ {
+ if (localName.equals("service-name-pattern"))
+ {
+ ref.setServiceNamePattern(QName.valueOf(value));
+ }
+ else if (localName.equals("port-name-pattern"))
+ {
+ ref.setPortNamePattern(QName.valueOf(value));
+ }
+ else if (localName.equals("protocol-binding"))
+ {
+ ref.setProtocolBindings(value);
+ }
+ }
+
+ public void setValue(HandlerMetaData ref, UnmarshallingContext navigator, String
namespaceURI, String localName, String value)
+ {
+ if (localName.equals("handler-name"))
+ {
+ ref.setHandlerName(value);
+ }
+ else if (localName.equals("handler-class"))
+ {
+ ref.setHandlerClass(value);
+ }
+ else if (localName.equals("soap-header"))
+ {
+ ref.addSoapHeader(QName.valueOf(value));
+ }
+ else if (localName.equals("soap-role"))
+ {
+ ref.addSoapRole(value);
+ }
+ else if (localName.equals("port-name"))
+ {
+ ref.addPortName(value);
+ }
+ }
+
+ public Object newChild(HandlerMetaData ref, UnmarshallingContext navigator, String
namespaceURI, String localName, Attributes attrs)
+ {
+ Object child = null;
+ if (localName.equals("init-param"))
+ child = new InitParamMetaData();
+
+ return child;
+ }
+
+ public void addChild(HandlerMetaData parent, InitParamMetaData param,
UnmarshallingContext navigator, String namespaceURI, String localName)
+ {
+ parent.addInitParam(param);
+ }
+
+ public void setValue(InitParamMetaData ref, UnmarshallingContext navigator, String
namespaceURI, String localName, String value)
+ {
+ if (localName.equals("param-name"))
+ {
+ ref.setParamName(value);
+ }
+ else if (localName.equals("param-value"))
+ {
+ ref.setParamValue(value);
+ }
+ }
+
+ public void setValue(CallPropertyMetaData ref, UnmarshallingContext navigator, String
namespaceURI, String localName, String value)
+ {
+ if (localName.equals("prop-name"))
+ {
+ ref.setPropName(value);
+ }
+ else if (localName.equals("prop-value"))
+ {
+ ref.setPropValue(value);
+ }
+ }
+
+ public void setValue(StubPropertyMetaData ref, UnmarshallingContext navigator, String
namespaceURI, String localName, String value)
+ {
+ if (localName.equals("prop-name"))
+ {
+ ref.setPropName(value);
+ }
+ else if (localName.equals("prop-value"))
+ {
+ ref.setPropValue(value);
+ }
+ }
+
+ // END ServiceRefMetaData
+ // ********************************************************
+}
Property changes on:
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/ServiceRefObjectFactory.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/StubPropertyMetaData.java
===================================================================
---
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/StubPropertyMetaData.java
(rev 0)
+++
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/StubPropertyMetaData.java 2007-03-06
15:20:12 UTC (rev 2536)
@@ -0,0 +1,63 @@
+/*
+* 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.ws.metadata.j2ee.serviceref;
+
+// $Id$
+
+import java.io.Serializable;
+
+/**
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 06-May-2004
+ */
+public class StubPropertyMetaData implements Serializable
+{
+ // The required <prop-name> element
+ private String propName;
+ // The required <prop-value> element
+ private String propValue;
+
+ public String getPropName()
+ {
+ return propName;
+ }
+
+ public void setPropName(String paramName)
+ {
+ this.propName = paramName;
+ }
+
+ public String getPropValue()
+ {
+ return propValue;
+ }
+
+ public void setPropValue(String paramValue)
+ {
+ this.propValue = paramValue;
+ }
+
+ public String toString()
+ {
+ return "[name=" + propName + ",value=" + propValue +
"]";
+ }
+}
Property changes on:
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/StubPropertyMetaData.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified:
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/jsr181/HandlerChainFactory.java
===================================================================
---
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/jsr181/HandlerChainFactory.java 2007-03-06
13:45:43 UTC (rev 2535)
+++
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/jsr181/HandlerChainFactory.java 2007-03-06
15:20:12 UTC (rev 2536)
@@ -25,7 +25,7 @@
import org.jboss.logging.Logger;
import org.jboss.ws.metadata.j2ee.UnifiedHandlerMetaData;
-import org.jboss.ws.metadata.umdm.HandlerMetaData.HandlerInitParam;
+import org.jboss.ws.metadata.j2ee.serviceref.InitParamMetaData;
import org.jboss.ws.metadata.umdm.HandlerMetaData.HandlerType;
import org.jboss.xb.binding.ObjectModelFactory;
import org.jboss.xb.binding.UnmarshallingContext;
@@ -106,14 +106,14 @@
public Object newChild(UnifiedHandlerMetaData handler, UnmarshallingContext navigator,
String namespaceURI, String localName, Attributes attrs)
{
if ("init-param".equals(localName))
- return new HandlerInitParam();
+ return new InitParamMetaData();
else return null;
}
/**
* Called when parsing character is complete.
*/
- public void addChild(UnifiedHandlerMetaData handler, HandlerInitParam param,
UnmarshallingContext navigator, String namespaceURI, String localName)
+ public void addChild(UnifiedHandlerMetaData handler, InitParamMetaData param,
UnmarshallingContext navigator, String namespaceURI, String localName)
{
handler.addInitParam(param);
}
@@ -151,7 +151,7 @@
/**
* Called when a new simple child element with text value was read from the XML
content.
*/
- public void setValue(HandlerInitParam param, UnmarshallingContext navigator, String
namespaceURI, String localName, String value)
+ public void setValue(InitParamMetaData param, UnmarshallingContext navigator, String
namespaceURI, String localName, String value)
{
if (log.isTraceEnabled())
log.trace("UnifiedInitParamMetaData setValue: nuri=" + namespaceURI +
" localName=" + localName + " value=" + value);
Modified:
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/umdm/HandlerMetaData.java
===================================================================
---
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/umdm/HandlerMetaData.java 2007-03-06
13:45:43 UTC (rev 2535)
+++
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/umdm/HandlerMetaData.java 2007-03-06
15:20:12 UTC (rev 2536)
@@ -33,6 +33,7 @@
import org.jboss.logging.Logger;
import org.jboss.ws.WSException;
+import org.jboss.ws.metadata.j2ee.serviceref.InitParamMetaData;
/**
* The common metdata data for a handler element
@@ -61,7 +62,7 @@
// The optional <soap-header> elements
private Set<QName> soapHeaders = new HashSet<QName>();
// The optional <init-param> elements
- private List<HandlerInitParam> initParams = new
ArrayList<HandlerInitParam>();
+ private List<InitParamMetaData> initParams = new
ArrayList<InitParamMetaData>();
// The cached handler class
private Class handlerClass;
@@ -137,12 +138,12 @@
return soapHeaders;
}
- public void seiInitParams(List<HandlerInitParam> initParams)
+ public void seiInitParams(List<InitParamMetaData> initParams)
{
this.initParams = initParams;
}
- public List<HandlerInitParam> getInitParams()
+ public List<InitParamMetaData> getInitParams()
{
return initParams;
}
@@ -166,39 +167,4 @@
{
handlerClass = getHandlerClass();
}
-
- public static class HandlerInitParam implements Serializable
- {
- private static final long serialVersionUID = -8687875291620457318L;
-
- // The required <handler-name> element
- private String paramName;
- // The required <handler-class> element
- private String paramValue;
-
- public String getParamName()
- {
- return paramName;
- }
-
- public void setParamName(String paramName)
- {
- this.paramName = paramName;
- }
-
- public String getParamValue()
- {
- return paramValue;
- }
-
- public void setParamValue(String paramValue)
- {
- this.paramValue = paramValue;
- }
-
- public String toString()
- {
- return "[name=" + paramName + ",value=" + paramValue +
"]";
- }
- }
}
Modified:
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/webservices/WebservicesFactory.java
===================================================================
---
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/webservices/WebservicesFactory.java 2007-03-06
13:45:43 UTC (rev 2535)
+++
branches/tdiesler/trunk/jbossws-core/src/java/org/jboss/ws/metadata/webservices/WebservicesFactory.java 2007-03-06
15:20:12 UTC (rev 2536)
@@ -27,7 +27,7 @@
import org.jboss.logging.Logger;
import org.jboss.ws.metadata.j2ee.UnifiedHandlerMetaData;
-import org.jboss.ws.metadata.umdm.HandlerMetaData.HandlerInitParam;
+import org.jboss.ws.metadata.j2ee.serviceref.InitParamMetaData;
import org.jboss.xb.binding.ObjectModelFactory;
import org.jboss.xb.binding.UnmarshallingContext;
import org.xml.sax.Attributes;
@@ -129,14 +129,14 @@
public Object newChild(UnifiedHandlerMetaData handler, UnmarshallingContext navigator,
String namespaceURI, String localName, Attributes attrs)
{
if ("init-param".equals(localName))
- return new HandlerInitParam();
+ return new InitParamMetaData();
else return null;
}
/**
* Called when parsing character is complete.
*/
- public void addChild(UnifiedHandlerMetaData handler, HandlerInitParam param,
UnmarshallingContext navigator, String namespaceURI, String localName)
+ public void addChild(UnifiedHandlerMetaData handler, InitParamMetaData param,
UnmarshallingContext navigator, String namespaceURI, String localName)
{
handler.addInitParam(param);
}
@@ -200,7 +200,7 @@
/**
* Called when a new simple child element with text value was read from the XML
content.
*/
- public void setValue(HandlerInitParam param, UnmarshallingContext navigator, String
namespaceURI, String localName, String value)
+ public void setValue(InitParamMetaData param, UnmarshallingContext navigator, String
namespaceURI, String localName, String value)
{
if (log.isTraceEnabled())
log.trace("UnifiedInitParamMetaData setValue: nuri=" + namespaceURI +
" localName=" + localName + " value=" + value);
Modified:
branches/tdiesler/trunk/jbossws-tests/src/resources/jaxws/samples/handlerchain/META-INF/jboss-client.xml
===================================================================
---
branches/tdiesler/trunk/jbossws-tests/src/resources/jaxws/samples/handlerchain/META-INF/jboss-client.xml 2007-03-06
13:45:43 UTC (rev 2535)
+++
branches/tdiesler/trunk/jbossws-tests/src/resources/jaxws/samples/handlerchain/META-INF/jboss-client.xml 2007-03-06
15:20:12 UTC (rev 2536)
@@ -5,20 +5,20 @@
<jboss-client>
<jndi-name>jbossws-client</jndi-name>
- <webservice-ref>
+ <service-ref>
<service-ref-name>Service1</service-ref-name>
<wsdl-override>http://@jbosstest.host.name@:8080/jaxws-samples-handlerchain/TestService?wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
- <webservice-ref>
+ <service-ref>
<service-ref-name>Service2</service-ref-name>
<wsdl-override>http://@jbosstest.host.name@:8080/jaxws-samples-handlerchain/TestService?wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
- <webservice-ref>
+ <service-ref>
<service-ref-name>Service3</service-ref-name>
<handler-chain>jaxws-handlers.xml</handler-chain>
<wsdl-override>http://@jbosstest.host.name@:8080/jaxws-samples-handlerchain/TestService?wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
</jboss-client>
\ No newline at end of file
Modified:
branches/tdiesler/trunk/jbossws-tests/src/resources/jaxws/samples/webserviceref/META-INF/jboss-client.xml
===================================================================
---
branches/tdiesler/trunk/jbossws-tests/src/resources/jaxws/samples/webserviceref/META-INF/jboss-client.xml 2007-03-06
13:45:43 UTC (rev 2535)
+++
branches/tdiesler/trunk/jbossws-tests/src/resources/jaxws/samples/webserviceref/META-INF/jboss-client.xml 2007-03-06
15:20:12 UTC (rev 2536)
@@ -7,90 +7,90 @@
<!--
@WebServiceRef(name = "service1", value = TestEndpointService.class,
wsdlLocation = "META-INF/wsdl/TestEndpoint.wsdl")
- <webservice-ref>
+ <service-ref>
<service-ref-name>service1</service-ref-name>
<wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
-->
<!--
@WebServiceRef(name = "service2", value = TestEndpointService.class)
-->
- <webservice-ref>
+ <service-ref>
<service-ref-name>service2</service-ref-name>
<wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
<!--
@WebServiceRef(name = "TestEndpointService3")
-->
- <webservice-ref>
+ <service-ref>
<service-ref-name>TestEndpointService3</service-ref-name>
<wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
<!--
@WebServiceRef
-->
- <webservice-ref>
+ <service-ref>
<service-ref-name>org.jboss.test.ws.jaxws.samples.webserviceref.TestEndpointClientOne/service4</service-ref-name>
<wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
<!--
@WebServiceRef(name = "TestEndpointService5")
-->
- <webservice-ref>
+ <service-ref>
<service-ref-name>TestEndpointService5</service-ref-name>
<wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
<!--
@WebServiceRef
-->
- <webservice-ref>
+ <service-ref>
<service-ref-name>org.jboss.test.ws.jaxws.samples.webserviceref.TestEndpointClientOne/service6</service-ref-name>
<wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
<!--
@WebServiceRef(name = "port1", value = TestEndpointService.class, type =
TestEndpoint.class)
-->
- <webservice-ref>
+ <service-ref>
<service-ref-name>port1</service-ref-name>
<wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
<!--
@WebServiceRef(name = "Port2", value = TestEndpointService.class)
-->
- <webservice-ref>
+ <service-ref>
<service-ref-name>Port2</service-ref-name>
<wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
<!--
@WebServiceRef(value = TestEndpointService.class)
-->
- <webservice-ref>
+ <service-ref>
<service-ref-name>org.jboss.test.ws.jaxws.samples.webserviceref.TestEndpointClientOne/port3</service-ref-name>
<wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
<!--
@WebServiceRef
-->
- <webservice-ref>
+ <service-ref>
<service-ref-name>org.jboss.test.ws.jaxws.samples.webserviceref.TestEndpointClientOne/port4</service-ref-name>
<wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
<!--
@WebServiceRef(name = "Port5")
-->
- <webservice-ref>
+ <service-ref>
<service-ref-name>Port5</service-ref-name>
<wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
</jboss-client>
\ No newline at end of file
Modified:
branches/tdiesler/trunk/jbossws-tests/src/resources/jaxws/samples/webserviceref/META-INF/jboss-web.xml
===================================================================
---
branches/tdiesler/trunk/jbossws-tests/src/resources/jaxws/samples/webserviceref/META-INF/jboss-web.xml 2007-03-06
13:45:43 UTC (rev 2535)
+++
branches/tdiesler/trunk/jbossws-tests/src/resources/jaxws/samples/webserviceref/META-INF/jboss-web.xml 2007-03-06
15:20:12 UTC (rev 2536)
@@ -7,74 +7,74 @@
<!--
@WebServiceRef(name = "service1", value = TestEndpointService.class,
wsdlLocation = "WEB-INF/wsdl/TestEndpoint.wsdl")
- <webservice-ref>
+ <service-ref>
<service-ref-name>service1</service-ref-name>
<wsdl-override>WEB-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
-->
<!--
@WebServiceRef(name = "service2", value = TestEndpointService.class)
-->
- <webservice-ref>
+ <service-ref>
<service-ref-name>service2</service-ref-name>
<wsdl-override>WEB-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
<!--
@WebServiceRef(name = "TestEndpointService3")
-->
- <webservice-ref>
+ <service-ref>
<service-ref-name>TestEndpointService3</service-ref-name>
<wsdl-override>WEB-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
<!--
@WebServiceRef
-->
- <webservice-ref>
+ <service-ref>
<service-ref-name>org.jboss.test.ws.jaxws.samples.webserviceref.ServletClient/service4</service-ref-name>
<wsdl-override>WEB-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
<!--
@WebServiceRef(name = "TestEndpointService5")
-->
- <webservice-ref>
+ <service-ref>
<service-ref-name>TestEndpointService5</service-ref-name>
<wsdl-override>WEB-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
<!--
@WebServiceRef
-->
- <webservice-ref>
+ <service-ref>
<service-ref-name>org.jboss.test.ws.jaxws.samples.webserviceref.ServletClient/service6</service-ref-name>
<wsdl-override>WEB-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
<!--
@WebServiceRef(name = "port1", value = TestEndpointService.class, type =
TestEndpoint.class)
-->
- <webservice-ref>
+ <service-ref>
<service-ref-name>port1</service-ref-name>
<wsdl-override>WEB-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
<!--
@WebServiceRef(name = "Port2", value = TestEndpointService.class)
-->
- <webservice-ref>
+ <service-ref>
<service-ref-name>Port2</service-ref-name>
<wsdl-override>WEB-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
<!--
@WebServiceRef(value = TestEndpointService.class)
-->
- <webservice-ref>
+ <service-ref>
<service-ref-name>org.jboss.test.ws.jaxws.samples.webserviceref.ServletClient/port3</service-ref-name>
<wsdl-override>WEB-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
</jboss-web>
\ No newline at end of file
Modified:
branches/tdiesler/trunk/jbossws-tests/src/resources/jaxws/samples/webserviceref/META-INF/jboss.xml
===================================================================
---
branches/tdiesler/trunk/jbossws-tests/src/resources/jaxws/samples/webserviceref/META-INF/jboss.xml 2007-03-06
13:45:43 UTC (rev 2535)
+++
branches/tdiesler/trunk/jbossws-tests/src/resources/jaxws/samples/webserviceref/META-INF/jboss.xml 2007-03-06
15:20:12 UTC (rev 2536)
@@ -10,75 +10,75 @@
<!--
@WebServiceRef(name = "service1", value = TestEndpointService.class,
wsdlLocation = "META-INF/wsdl/TestEndpoint.wsdl")
- <webservice-ref>
+ <service-ref>
<service-ref-name>service1</service-ref-name>
<wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
-->
<!--
@WebServiceRef(name = "service2", value = TestEndpointService.class)
-->
- <webservice-ref>
+ <service-ref>
<service-ref-name>service2</service-ref-name>
<wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
<!--
@WebServiceRef(name = "TestEndpointService3")
-->
- <webservice-ref>
+ <service-ref>
<service-ref-name>TestEndpointService3</service-ref-name>
<wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
<!--
@WebServiceRef
-->
- <webservice-ref>
+ <service-ref>
<service-ref-name>org.jboss.test.ws.jaxws.samples.webserviceref.EJB3Client/service4</service-ref-name>
<wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
<!--
@WebServiceRef(name = "TestEndpointService5")
-->
- <webservice-ref>
+ <service-ref>
<service-ref-name>TestEndpointService5</service-ref-name>
<wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
<!--
@WebServiceRef
-->
- <webservice-ref>
+ <service-ref>
<service-ref-name>org.jboss.test.ws.jaxws.samples.webserviceref.EJB3Client/service6</service-ref-name>
<wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
<!--
@WebServiceRef(name = "port1", value = TestEndpointService.class, type =
TestEndpoint.class)
-->
- <webservice-ref>
+ <service-ref>
<service-ref-name>port1</service-ref-name>
<wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
<!--
@WebServiceRef(name = "Port2", value = TestEndpointService.class)
-->
- <webservice-ref>
+ <service-ref>
<service-ref-name>Port2</service-ref-name>
<wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
<!--
@WebServiceRef(value = TestEndpointService.class)
-->
- <webservice-ref>
+ <service-ref>
<service-ref-name>org.jboss.test.ws.jaxws.samples.webserviceref.EJB3Client/port3</service-ref-name>
<wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
</session>
</enterprise-beans>
Modified:
branches/tdiesler/trunk/jbossws-tests/src/resources/jaxws/samples/webserviceref/META-INF-override/jboss-client.xml
===================================================================
---
branches/tdiesler/trunk/jbossws-tests/src/resources/jaxws/samples/webserviceref/META-INF-override/jboss-client.xml 2007-03-06
13:45:43 UTC (rev 2535)
+++
branches/tdiesler/trunk/jbossws-tests/src/resources/jaxws/samples/webserviceref/META-INF-override/jboss-client.xml 2007-03-06
15:20:12 UTC (rev 2536)
@@ -8,78 +8,78 @@
<!--
@WebServiceRef(name = "Service1")
-->
- <webservice-ref>
+ <service-ref>
<service-ref-name>Service1</service-ref-name>
-
<service-class-name>org.jboss.test.ws.jaxws.samples.webserviceref.TestEndpointService</service-class-name>
+
<service-interface>org.jboss.test.ws.jaxws.samples.webserviceref.TestEndpointService</service-interface>
<service-qname>{http://org.jboss.ws/wsref}TestEndpointService</service-qname>
<wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
<!--
@WebServiceRef(name = "Service2")
-->
- <webservice-ref>
+ <service-ref>
<service-ref-name>Service2</service-ref-name>
<config-name>Custom Client</config-name>
<config-file>META-INF/jbossws-client-config.xml</config-file>
<wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
<!--
@WebServiceRef(name = "Service3")
-->
- <webservice-ref>
+ <service-ref>
<service-ref-name>Service3</service-ref-name>
-
<service-class-name>org.jboss.test.ws.jaxws.samples.webserviceref.TestEndpointService</service-class-name>
+
<service-interface>org.jboss.test.ws.jaxws.samples.webserviceref.TestEndpointService</service-interface>
<service-qname>{http://org.jboss.ws/wsref}TestEndpointService</service-qname>
<wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
<!--
@WebServiceRef(name = "Service4")
-->
- <webservice-ref>
+ <service-ref>
<service-ref-name>Service4</service-ref-name>
- <port-info>
+ <port-component-ref>
<service-endpoint-interface>org.jboss.test.ws.jaxws.samples.webserviceref.TestEndpoint</service-endpoint-interface>
<config-name>Custom Client</config-name>
<config-file>META-INF/jbossws-client-config.xml</config-file>
- </port-info>
+ </port-component-ref>
<wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
<!--
@WebServiceRef(name = "Port1", type = TestEndpoint.class)
-->
- <webservice-ref>
+ <service-ref>
<service-ref-name>Port1</service-ref-name>
- <port-info>
+ <port-component-ref>
<port-qname>{http://org.jboss.ws/wsref}TestEndpointPort</port-qname>
<config-name>Custom Client</config-name>
<config-file>META-INF/jbossws-client-config.xml</config-file>
- </port-info>
+ </port-component-ref>
<wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
<!--
@WebServiceRef(name = "Port2")
-->
- <webservice-ref>
+ <service-ref>
<service-ref-name>Port2</service-ref-name>
- <port-info>
+ <port-component-ref>
<service-endpoint-interface>org.jboss.test.ws.jaxws.samples.webserviceref.TestEndpoint</service-endpoint-interface>
<config-name>Custom Client</config-name>
<config-file>META-INF/jbossws-client-config.xml</config-file>
- </port-info>
+ </port-component-ref>
<wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
<!--
@WebServiceRef(name = "Port3")
-->
- <webservice-ref>
+ <service-ref>
<service-ref-name>Port3</service-ref-name>
- <port-info>
+ <port-component-ref>
<service-endpoint-interface>org.jboss.test.ws.jaxws.samples.webserviceref.TestEndpoint</service-endpoint-interface>
<port-qname>{http://org.jboss.ws/wsref}TestEndpointPort</port-qname>
<stub-property>
@@ -90,8 +90,8 @@
<name>javax.xml.ws.security.auth.password</name>
<value>thefrog</value>
</stub-property>
- </port-info>
+ </port-component-ref>
<wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
</jboss-client>
\ No newline at end of file
Modified:
branches/tdiesler/trunk/jbossws-tests/src/resources/jaxws/samples/webserviceref/META-INF-secure/jboss-client.xml
===================================================================
---
branches/tdiesler/trunk/jbossws-tests/src/resources/jaxws/samples/webserviceref/META-INF-secure/jboss-client.xml 2007-03-06
13:45:43 UTC (rev 2535)
+++
branches/tdiesler/trunk/jbossws-tests/src/resources/jaxws/samples/webserviceref/META-INF-secure/jboss-client.xml 2007-03-06
15:20:12 UTC (rev 2536)
@@ -5,11 +5,11 @@
<jboss-client>
<jndi-name>jbossws-client</jndi-name>
- <webservice-ref>
+ <service-ref>
<service-ref-name>SecureService1</service-ref-name>
-
<service-class-name>org.jboss.test.ws.jaxws.samples.webserviceref.SecureEndpointService</service-class-name>
+
<service-interface>org.jboss.test.ws.jaxws.samples.webserviceref.SecureEndpointService</service-interface>
<service-qname>{http://org.jboss.ws/wsref}SecureEndpointService</service-qname>
- <port-info>
+ <port-component-ref>
<service-endpoint-interface>org.jboss.test.ws.jaxws.samples.webserviceref.SecureEndpoint</service-endpoint-interface>
<port-qname>{http://org.jboss.ws/wsref}SecureEndpointPort</port-qname>
<stub-property>
@@ -20,13 +20,13 @@
<name>javax.xml.ws.security.auth.password</name>
<value>thefrog</value>
</stub-property>
- </port-info>
+ </port-component-ref>
<wsdl-override>http://@jbosstest.host.name@:8080/jaxws-samples-webserviceref-secure/SecureEndpoint?wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
- <webservice-ref>
+ <service-ref>
<service-ref-name>SecureService2</service-ref-name>
- <port-info>
+ <port-component-ref>
<port-qname>{http://org.jboss.ws/wsref}SecureEndpointPort</port-qname>
<stub-property>
<name>javax.xml.ws.security.auth.username</name>
@@ -36,13 +36,13 @@
<name>javax.xml.ws.security.auth.password</name>
<value>thefrog</value>
</stub-property>
- </port-info>
+ </port-component-ref>
<wsdl-override>http://@jbosstest.host.name@:8080/jaxws-samples-webserviceref-secure/SecureEndpoint?wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
- <webservice-ref>
+ <service-ref>
<service-ref-name>SecurePort1</service-ref-name>
- <port-info>
+ <port-component-ref>
<service-endpoint-interface>org.jboss.test.ws.jaxws.samples.webserviceref.SecureEndpoint</service-endpoint-interface>
<stub-property>
<name>javax.xml.ws.security.auth.username</name>
@@ -52,8 +52,8 @@
<name>javax.xml.ws.security.auth.password</name>
<value>thefrog</value>
</stub-property>
- </port-info>
+ </port-component-ref>
<wsdl-override>http://@jbosstest.host.name@:8080/jaxws-samples-webserviceref-secure/SecureEndpoint?wsdl</wsdl-override>
- </webservice-ref>
+ </service-ref>
</jboss-client>
\ No newline at end of file