Author: thomas.diesler(a)jboss.com
Date: 2007-01-17 09:46:03 -0500 (Wed, 17 Jan 2007)
New Revision: 1988
Added:
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceObjectFactory.java
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceReferenceable.java
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/WebServiceRefHandler.java
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/WebServiceRefHandlerMBean.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/StubExt.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/ServiceConfiguration.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/SecureEndpoint.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/SecureEndpointClient.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/SecureEndpointImpl.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/SecureEndpointService.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/StubPropertyTestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/TestEndpointClient.java
trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/META-INF-secure/
trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/META-INF-secure/application-client.xml
trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/META-INF-secure/jboss-client.xml
Removed:
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/StubExt.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/ServiceDecorator.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/StubExt.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceObjectFactory.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceReferenceable.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/WebServiceRefDeployer.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/ApplicationClient.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/Echo.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/EchoResponse.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/ObjectFactory.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/package-info.java
Modified:
trunk/build/etc/jbossws-component-info.xml
trunk/integration-jboss50/src/main/resources/jbossws.deployer/META-INF/jbossws-deployer-beans.xml
trunk/jbossws-core/src/main/java/org/jboss/ws/WSException.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/CommonClient.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/CommonSOAPBinding.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/CallImpl.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/PortProxy.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/ServiceImpl.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/ServiceObjectFactory.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ClientProxy.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/UnifiedServiceRef.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPConnectionImpl.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/xop/DisableMTOMHandler.java
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/xop/XOPContext.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ServerEndpointMetaData.java
trunk/jbossws-tests/.classpath
trunk/jbossws-tests/ant-import/build-jars-jaxrpc.xml
trunk/jbossws-tests/ant-import/build-jars-jaxws.xml
trunk/jbossws-tests/build.xml
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/JBossWSTest.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/JBossWSTestHelper.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1384/JBWS1384TestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1410/JBWS1410TestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/handler/HeaderClientTestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/handler/HeaderProxyTestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/mtom/MTOMTestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/wseventing/SysmonTestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/wssecurity/SimpleEncryptTestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/wssecurity/SimpleSignTestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/wseventing/DIIClientTestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/wseventing/EventingSupport.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/wseventing/EventingTestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/xop/doclit/XOPBase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/xop/rpclit/XOPBase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/xop/shared/MTOMServiceBase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/TestEndpoint.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/TestEndpointImpl.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/TestEndpointService.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefClientTestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefEJB3TestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefServletTestCase.java
trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/META-INF/jboss-client.xml
trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/META-INF/wsdl/TestEndpoint.wsdl
Log:
Fix handling of <wsdl-location> in jaxws <service-ref>
Support StubExt on jaxws client proxies
Fix configName, configFile handling on service and client proxy
Re-enable WebServiceRef client tests
Modified: trunk/build/etc/jbossws-component-info.xml
===================================================================
--- trunk/build/etc/jbossws-component-info.xml 2007-01-16 15:32:38 UTC (rev 1987)
+++ trunk/build/etc/jbossws-component-info.xml 2007-01-17 14:46:03 UTC (rev 1988)
@@ -40,7 +40,6 @@
</import>
<export>
- <include input="jbossws-client.jar"/>
<include input="jboss-jaxrpc.jar"/>
<include input="jboss-jaxws.jar"/>
<include input="jboss-saaj.jar"/>
Added:
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceObjectFactory.java
===================================================================
---
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceObjectFactory.java
(rev 0)
+++
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceObjectFactory.java 2007-01-17
14:46:03 UTC (rev 1988)
@@ -0,0 +1,289 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+// $Id$
+package org.jboss.ws.integration.jboss50;
+
+// $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;
+
+import javax.naming.Context;
+import javax.naming.Name;
+import javax.naming.NamingException;
+import javax.naming.RefAddr;
+import javax.naming.Reference;
+import javax.naming.spi.ObjectFactory;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
+import org.jboss.logging.Logger;
+import org.jboss.virtual.VFS;
+import org.jboss.virtual.VirtualFile;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.StubExt;
+import org.jboss.ws.core.jaxws.ServiceConfiguration;
+import org.jboss.ws.core.jaxws.client.UnifiedServiceRef;
+
+/**
+ * This ServiceObjectFactory reconstructs a javax.xml.ws.Service
+ * for a given WSDL when the webservice client does a JNDI lookup
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 24-Oct-2004
+ */
+public class ServiceObjectFactory implements ObjectFactory
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(ServiceObjectFactory.class);
+
+ /**
+ * Creates an object using the location or reference information specified.
+ * <p/>
+ *
+ * @param obj The possibly null object containing location or reference
+ * information that can be used in creating an object.
+ * @param name The name of this object relative to
<code>nameCtx</code>,
+ * or null if no name is specified.
+ * @param nameCtx The context relative to which the <code>name</code>
+ * parameter is specified, or null if <code>name</code>
is
+ * relative to the default initial context.
+ * @param environment The possibly null environment that is used in
+ * creating the object.
+ * @return The object created; null if an object cannot be created.
+ * @throws Exception if this object factory encountered an exception
+ * while attempting to create an object, and no other object
factories are
+ * to be tried.
+ * @see javax.naming.spi.NamingManager#getObjectInstance
+ * @see javax.naming.spi.NamingManager#getURLContext
+ */
+ public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable
environment) throws Exception
+ {
+ try
+ {
+ Reference ref = (Reference)obj;
+
+ String serviceClassName =
(String)ref.get(ServiceReferenceable.SERVICE_CLASS_NAME).getContent();
+ String targetClassName =
(String)ref.get(ServiceReferenceable.TARGET_CLASS_NAME).getContent();
+ UnifiedServiceRef usRef = unmarshallServiceRef(ref);
+
+ ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
+ Class serviceClass = ctxLoader.loadClass(serviceClassName);
+ Class targetClass = (targetClassName != null ?
ctxLoader.loadClass(targetClassName) : null);
+
+ if (Service.class.isAssignableFrom(serviceClass) == false)
+ throw new IllegalArgumentException("WebServiceRef type '" +
serviceClass + "' is not assignable to javax.xml.ws.Service");
+
+ Object target;
+
+ URL rootURL = usRef.getRootURL();
+ URL wsdlURL = getWsdlLocationURL(rootURL, serviceClass,
usRef.getWsdlLocation());
+
+ // Generic javax.xml.ws.Service
+ if (serviceClass == Service.class)
+ {
+ if (wsdlURL != null)
+ {
+ target = Service.create(wsdlURL, null);
+ }
+ else
+ {
+ throw new IllegalArgumentException("Cannot create generic
javax.xml.ws.Service without wsdlLocation");
+ }
+ }
+ // Generated javax.xml.ws.Service subclass
+ else
+ {
+ if (wsdlURL != null)
+ {
+ Constructor ctor = serviceClass.getConstructor(new Class[] { URL.class,
QName.class });
+ target = ctor.newInstance(new Object[] { wsdlURL, null });
+ }
+ else
+ {
+ target = (Service)serviceClass.newInstance();
+ }
+ }
+
+ if (targetClassName != null && targetClassName.equals(serviceClassName)
== false)
+ {
+ try
+ {
+ Object port = null;
+ for (Method method : serviceClass.getMethods())
+ {
+ String methodName = method.getName();
+ Class retType = method.getReturnType();
+ if (methodName.startsWith("get") &&
targetClass.isAssignableFrom(retType))
+ {
+ port = method.invoke(target, new Object[0]);
+ target = port;
+ break;
+ }
+ }
+
+ if (port == null)
+ {
+ Method method = serviceClass.getMethod("getPort", new Class[]
{ Class.class });
+ port = method.invoke(target, new Object[] { targetClass });
+ target = port;
+ }
+ }
+ catch (InvocationTargetException ex)
+ {
+ throw ex.getTargetException();
+ }
+ }
+
+ configureInjectionTarget(target, usRef);
+
+ return target;
+ }
+ catch (Throwable ex)
+ {
+ WSException.rethrow("Cannot create service", ex);
+ return null;
+ }
+ }
+
+ private void configureInjectionTarget(Object target, UnifiedServiceRef usRef)
+ {
+ if (target instanceof ServiceConfiguration)
+ {
+ ServiceConfiguration service = (ServiceConfiguration)target;
+ service.setConfigName(usRef.getConfigName());
+ service.setConfigFile(usRef.getConfigFile());
+ }
+ if (target instanceof StubExt)
+ {
+ StubExt stub = (StubExt)target;
+ stub.setConfigName(usRef.getConfigName());
+ stub.setConfigFile(usRef.getConfigFile());
+ }
+ }
+
+ private UnifiedServiceRef unmarshallServiceRef(Reference ref) throws
ClassNotFoundException, NamingException
+ {
+ UnifiedServiceRef sref;
+ RefAddr refAddr = ref.get(ServiceReferenceable.UNIFIED_SERVICE_REF);
+ ByteArrayInputStream bais = new
ByteArrayInputStream((byte[])refAddr.getContent());
+ try
+ {
+ ObjectInputStream ois = new ObjectInputStream(bais);
+ sref = (UnifiedServiceRef)ois.readObject();
+ ois.close();
+ }
+ catch (IOException e)
+ {
+ throw new NamingException("Cannot unmarshall service ref meta data, cause:
" + e.toString());
+ }
+ return sref;
+ }
+
+ private URL getWsdlLocationURL(URL rootURL, Class type, String wsdlLocation)
+ {
+ 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
+ {
+ VirtualFile vfsRoot = getVirtualFile(rootURL);
+ wsdlURL = vfsRoot.findChild(wsdlLocation).toURL();
+ }
+ catch (Exception ex)
+ {
+ // ignore
+ }
+ }
+
+ // Try the filename relative to class
+ if (wsdlURL == null)
+ {
+ String packagePath = type.getPackage().getName().replace('.',
'/');
+ String wsdlPath = packagePath + "/" + wsdlLocation;
+ try
+ {
+ VirtualFile vfsRoot = getVirtualFile(rootURL);
+ wsdlURL = vfsRoot.findChild(wsdlPath).toURL();
+ }
+ catch (Exception ex)
+ {
+ // ignore
+ }
+ }
+
+ if (wsdlURL == null)
+ throw new IllegalArgumentException("Cannot get URL for: " +
wsdlLocation);
+ }
+ return wsdlURL;
+ }
+
+ /**
+ * For some reason VFS.getRoot(rootURL) fails with
+ * IOException("No context factory for " + rootURL);
+ */
+ private VirtualFile getVirtualFile(URL rootURL) throws IOException
+ {
+ URL fileURL = rootURL;
+ if (rootURL.getProtocol().equals("vfsfile"))
+ fileURL = new URL(rootURL.toExternalForm().substring(3));
+
+ VirtualFile vfsRoot = VFS.getRoot(fileURL);
+ return vfsRoot;
+ }
+}
Property changes on:
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceObjectFactory.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceReferenceable.java
===================================================================
---
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceReferenceable.java
(rev 0)
+++
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceReferenceable.java 2007-01-17
14:46:03 UTC (rev 1988)
@@ -0,0 +1,97 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+// $Id$
+package org.jboss.ws.integration.jboss50;
+
+// $Id$
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.ObjectOutputStream;
+
+import javax.naming.BinaryRefAddr;
+import javax.naming.NamingException;
+import javax.naming.Reference;
+import javax.naming.Referenceable;
+import javax.naming.StringRefAddr;
+
+import org.jboss.ws.core.jaxws.client.UnifiedServiceRef;
+
+/**
+ * A JNDI reference to a javax.xml.ws.Service
+ *
+ * It holds the information to reconstrut the javax.xml.ws.Service
+ * when the client does a JNDI lookup.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 24-Oct-2006
+ */
+public class ServiceReferenceable implements Referenceable
+{
+ public static final String UNIFIED_SERVICE_REF = "UNIFIED_SERVICE_REF";
+ 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;
+
+ public ServiceReferenceable(String serviceClassName, String targetClassName,
UnifiedServiceRef usRef)
+ {
+ this.serviceClassName = serviceClassName;
+ this.targetClassName = targetClassName;
+ this.usRef = usRef;
+ }
+
+ /**
+ * Retrieves the Reference of this object.
+ *
+ * @return The non-null Reference of this object.
+ * @throws javax.naming.NamingException If a naming exception was encountered while
retrieving the reference.
+ */
+ public Reference getReference() throws NamingException
+ {
+ Reference myRef = new Reference(ServiceReferenceable.class.getName(),
ServiceObjectFactory.class.getName(), null);
+
+ 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)));
+
+ return myRef;
+ }
+
+ private byte[] marshall(Object obj) throws NamingException
+ {
+ ByteArrayOutputStream baos = new ByteArrayOutputStream(512);
+ try
+ {
+ ObjectOutputStream oos = new ObjectOutputStream(baos);
+ oos.writeObject(obj);
+ oos.close();
+ }
+ catch (IOException e)
+ {
+ throw new NamingException("Cannot marshall object, cause: " +
e.toString());
+ }
+ return baos.toByteArray();
+ }
+}
\ No newline at end of file
Property changes on:
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceReferenceable.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/WebServiceRefHandler.java
===================================================================
---
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/WebServiceRefHandler.java
(rev 0)
+++
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/WebServiceRefHandler.java 2007-01-17
14:46:03 UTC (rev 1988)
@@ -0,0 +1,152 @@
+/*
+ * 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 javax.management.MBeanServer;
+import javax.naming.Context;
+import javax.naming.NamingException;
+import javax.xml.transform.Source;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMResult;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebServiceRef;
+
+import org.jboss.logging.Logger;
+import org.jboss.mx.util.MBeanServerLocator;
+import org.jboss.util.naming.Util;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.jaxws.client.UnifiedServiceRef;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+/**
+ * Binds a JAXWS Service object in the client's ENC
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 17-Jan-2007
+ */
+public class WebServiceRefHandler implements WebServiceRefHandlerMBean
+{
+ // logging support
+ private static Logger log = Logger.getLogger(WebServiceRefHandler.class);
+
+ public void setupWebServiceRef(Context encCtx, String encName, Class targetClass,
WebServiceRef wsref, URL rootURL, Source metadata) throws NamingException
+ {
+ String externalName = encCtx.getNameInNamespace() + "/" + encName;
+ String refTypeName = (targetClass != null ? targetClass.getName() : null);
+ log.debug("setupWebServiceRef [jndi=" + externalName +
",refType=" + refTypeName + "]");
+
+ String serviceClassName = null;
+ String targetClassName = 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
+ {
+ UnifiedServiceRef usRef = getUnifiedServiceRef(rootURL, metadata);
+
+ // Set the wsdlLocation if there is no override already
+ if (usRef.getWsdlLocation() == null && wsref.wsdlLocation().length()
> 0)
+ usRef.setWsdlLocation(wsref.wsdlLocation());
+
+ Util.rebind(encCtx, encName, new ServiceReferenceable(serviceClassName,
targetClassName, usRef));
+ }
+ catch (RuntimeException rte)
+ {
+ throw rte;
+ }
+ catch (Exception ex)
+ {
+ throw new WSException("Cannot bind web service ref: " + encName, ex);
+ }
+ }
+
+ private UnifiedServiceRef getUnifiedServiceRef(URL rootURL, Source metadata) throws
TransformerException
+ {
+ Element root = getElementFromSource(metadata);
+
+ String encName = DOMUtils.getTextContent(DOMUtils.getFirstChildElement(root,
"service-ref-name"));
+ UnifiedServiceRef ref = new UnifiedServiceRef(rootURL, encName);
+
+ Element refEl = DOMUtils.getFirstChildElement(root, "config-name");
+ if (refEl != null)
+ ref.setConfigName(DOMUtils.getTextContent(refEl));
+
+ refEl = DOMUtils.getFirstChildElement(root, "config-file");
+ if (refEl != null)
+ ref.setConfigFile(DOMUtils.getTextContent(refEl));
+
+ refEl = DOMUtils.getFirstChildElement(root, "wsdl-location");
+ if (refEl != null)
+ ref.setWsdlLocation(DOMUtils.getTextContent(refEl));
+
+ return ref;
+ }
+
+ private Element getElementFromSource(Source retObj) throws TransformerException
+ {
+ DOMResult domResult = new DOMResult();
+ TransformerFactory tf = TransformerFactory.newInstance();
+ tf.newTransformer().transform(retObj, domResult);
+ Document doc = (Document)domResult.getNode();
+ Element docElement = doc.getDocumentElement();
+ return docElement;
+ }
+
+ public void create() throws Exception
+ {
+ MBeanServer server = MBeanServerLocator.locateJBoss();
+ if (server != null)
+ server.registerMBean(this, OBJECT_NAME);
+ }
+
+ public void destroy() throws Exception
+ {
+ MBeanServer server = MBeanServerLocator.locateJBoss();
+ if (server != null)
+ server.unregisterMBean(OBJECT_NAME);
+ }
+}
Property changes on:
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/WebServiceRefHandler.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/WebServiceRefHandlerMBean.java
===================================================================
---
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/WebServiceRefHandlerMBean.java
(rev 0)
+++
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/WebServiceRefHandlerMBean.java 2007-01-17
14:46:03 UTC (rev 1988)
@@ -0,0 +1,45 @@
+/*
+* 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;
+
+import java.net.URL;
+
+import javax.management.ObjectName;
+import javax.naming.Context;
+import javax.naming.NamingException;
+import javax.xml.transform.Source;
+import javax.xml.ws.WebServiceRef;
+
+import org.jboss.ws.core.utils.ObjectNameFactory;
+
+/**
+ * MBean interface.
+ */
+public interface WebServiceRefHandlerMBean
+{
+ // default object name
+ public static final ObjectName OBJECT_NAME =
ObjectNameFactory.create("jboss.ws:service=WebServiceRefHandler");
+
+ /** Binds a JAXWS WebServiceRef into the callers ENC
+ */
+ void setupWebServiceRef(Context encCtx, String encName, Class refType, WebServiceRef
wsref, URL rootURL, Source metadata) throws NamingException;
+}
Property changes on:
trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/WebServiceRefHandlerMBean.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified:
trunk/integration-jboss50/src/main/resources/jbossws.deployer/META-INF/jbossws-deployer-beans.xml
===================================================================
---
trunk/integration-jboss50/src/main/resources/jbossws.deployer/META-INF/jbossws-deployer-beans.xml 2007-01-16
15:32:38 UTC (rev 1987)
+++
trunk/integration-jboss50/src/main/resources/jbossws.deployer/META-INF/jbossws-deployer-beans.xml 2007-01-17
14:46:03 UTC (rev 1988)
@@ -37,9 +37,12 @@
<property
name="serviceEndpointServlet">org.jboss.ws.integration.jboss50.JBossServiceEndpointServlet</property>
</bean>
- <!-- Bind JAXRPC Service objects in application client environment context -->
+ <!-- Bind JAXRPC Service objects in client environment context -->
<bean name="ServiceRefHandler"
class="org.jboss.ws.integration.jboss50.ServiceRefHandler"/>
+ <!-- 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: trunk/jbossws-core/src/main/java/org/jboss/ws/WSException.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/WSException.java 2007-01-16 15:32:38 UTC
(rev 1987)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/WSException.java 2007-01-17 14:46:03 UTC
(rev 1988)
@@ -59,4 +59,12 @@
throw new WSException(string, th);
}
+
+ public static void rethrow(Throwable th)
+ {
+ if (th instanceof WSException)
+ throw (WSException)th;
+
+ throw new WSException(th);
+ }
}
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/CommonClient.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/CommonClient.java 2007-01-16
15:32:38 UTC (rev 1987)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/CommonClient.java 2007-01-17
14:46:03 UTC (rev 1988)
@@ -25,10 +25,17 @@
import java.net.MalformedURLException;
import java.net.URL;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.List;
import java.util.Map;
import javax.xml.namespace.QName;
+import javax.xml.rpc.JAXRPCException;
import javax.xml.rpc.ParameterMode;
+import javax.xml.soap.AttachmentPart;
+import javax.xml.soap.MessageFactory;
import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPMessage;
import javax.xml.ws.addressing.AddressingProperties;
@@ -63,7 +70,7 @@
* @author Thomas.Diesler(a)jboss.org
* @since 10-Oct-2004
*/
-public abstract class CommonClient
+public abstract class CommonClient implements StubExt
{
// provide logging
private static Logger log = Logger.getLogger(CommonClient.class);
@@ -76,6 +83,10 @@
protected EndpointInvocation epInv;
// The binding provider
protected CommonBindingProvider bindingProvider;
+ // A Map<QName,UnboundHeader> of header entries
+ private Map<QName, UnboundHeader> unboundHeaders = new LinkedHashMap<QName,
UnboundHeader>();
+ // A List<AttachmentPart> of attachment parts set through the proxy
+ private List<AttachmentPart> attachmentParts = new
ArrayList<AttachmentPart>();
/** Create a call that needs to be configured manually
*/
@@ -212,7 +223,7 @@
* 6) unwrap the result using the BindingProvider
* 7) return the result
*/
- protected Object invoke(QName opName, Object[] inputParams, Map<QName,
UnboundHeader> unboundHeaders, Map<String, Object> resContext, boolean
forceOneway) throws Exception
+ protected Object invoke(QName opName, Object[] inputParams, Map<String, Object>
resContext, boolean forceOneway) throws Exception
{
if (opName.equals(operationName) == false)
setOperationName(opName);
@@ -347,7 +358,11 @@
protected void addAttachmentParts(SOAPMessage reqMessage)
{
- // By default do nothing
+ for (AttachmentPart part : attachmentParts)
+ {
+ log.debug("Adding attachment part: " + part.getContentId());
+ reqMessage.addAttachmentPart(part);
+ }
}
protected abstract CommonMessageContext processPivot(CommonMessageContext
requestContext);
@@ -405,4 +420,125 @@
return retValue;
}
+
+ /**
+ * Add a header that is not bound to an input parameter.
+ * A propriatory extension, that is not part of JAXRPC.
+ *
+ * @param xmlName The XML name of the header element
+ * @param xmlType The XML type of the header element
+ */
+ public void addUnboundHeader(QName xmlName, QName xmlType, Class javaType,
ParameterMode mode)
+ {
+ UnboundHeader unboundHeader = new UnboundHeader(xmlName, xmlType, javaType, mode);
+ unboundHeaders.put(xmlName, unboundHeader);
+ }
+
+ /**
+ * Get the header value for the given XML name.
+ * A propriatory extension, that is not part of JAXRPC.
+ *
+ * @param xmlName The XML name of the header element
+ * @return The header value, or null
+ */
+ public Object getUnboundHeaderValue(QName xmlName)
+ {
+ UnboundHeader unboundHeader = unboundHeaders.get(xmlName);
+ return (unboundHeader != null ? unboundHeader.getHeaderValue() : null);
+ }
+
+ /**
+ * Set the header value for the given XML name.
+ * A propriatory extension, that is not part of JAXRPC.
+ *
+ * @param xmlName The XML name of the header element
+ */
+ public void setUnboundHeaderValue(QName xmlName, Object value)
+ {
+ UnboundHeader unboundHeader = unboundHeaders.get(xmlName);
+ if (unboundHeader == null)
+ throw new IllegalArgumentException("Cannot find unbound header: " +
xmlName);
+
+ unboundHeader.setHeaderValue(value);
+ }
+
+ /**
+ * Clear all registered headers.
+ * A propriatory extension, that is not part of JAXRPC.
+ */
+ public void clearUnboundHeaders()
+ {
+ unboundHeaders.clear();
+ }
+
+ /**
+ * Remove the header for the given XML name.
+ * A propriatory extension, that is not part of JAXRPC.
+ */
+ public void removeUnboundHeader(QName xmlName)
+ {
+ unboundHeaders.remove(xmlName);
+ }
+
+ /**
+ * Get an Iterator over the registered header XML names.
+ * A propriatory extension, that is not part of JAXRPC.
+ */
+ public Iterator getUnboundHeaders()
+ {
+ return unboundHeaders.keySet().iterator();
+ }
+
+ /**
+ * Adds the given AttachmentPart object to the outgoing SOAPMessage.
+ * An AttachmentPart object must be created before it can be added to a message.
+ */
+ public void addAttachmentPart(AttachmentPart part)
+ {
+ attachmentParts.add(part);
+ }
+
+ /**
+ * Clears the list of attachment parts.
+ */
+ public void clearAttachmentParts()
+ {
+ attachmentParts.clear();
+ }
+
+ /**
+ * Creates a new empty AttachmentPart object.
+ */
+ public AttachmentPart createAttachmentPart()
+ {
+ try
+ {
+ MessageFactory factory = MessageFactory.newInstance();
+ return factory.createMessage().createAttachmentPart();
+ }
+ catch (SOAPException ex)
+ {
+ throw new JAXRPCException("Cannot create attachment part");
+ }
+ }
+
+ public String getConfigName()
+ {
+ EndpointMetaData epMetaData = getEndpointMetaData();
+ return epMetaData.getConfigName();
+ }
+
+ public abstract void setConfigName(String configName);
+
+ public String getConfigFile()
+ {
+ EndpointMetaData epMetaData = getEndpointMetaData();
+ return epMetaData.getConfigFile();
+ }
+
+ public void setConfigFile(String configFile)
+ {
+ EndpointMetaData epMetaData = getEndpointMetaData();
+ epMetaData.setConfigFile(configFile);
+ }
}
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/CommonSOAPBinding.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/CommonSOAPBinding.java 2007-01-16
15:32:38 UTC (rev 1987)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/CommonSOAPBinding.java 2007-01-17
14:46:03 UTC (rev 1988)
@@ -29,7 +29,6 @@
import org.jboss.ws.Constants;
import org.jboss.ws.WSException;
import org.jboss.ws.core.jaxrpc.ParameterWrapping;
-import org.jboss.ws.core.jaxrpc.StubExt;
import org.jboss.ws.core.jaxrpc.Style;
import org.jboss.ws.core.jaxrpc.binding.BindingException;
import org.jboss.ws.core.soap.*;
Copied: trunk/jbossws-core/src/main/java/org/jboss/ws/core/StubExt.java (from rev 1987,
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/StubExt.java)
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/StubExt.java
(rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/StubExt.java 2007-01-17 14:46:03
UTC (rev 1988)
@@ -0,0 +1,153 @@
+/*
+* 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;
+
+import java.util.Iterator;
+
+import javax.xml.namespace.QName;
+import javax.xml.rpc.ParameterMode;
+import javax.xml.soap.AttachmentPart;
+
+import org.jboss.ws.metadata.umdm.EndpointMetaData;
+
+// $Id$
+
+/**
+ * An extension of the standard JAXRPC/JAXWS stubs.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 17-Jan-2007
+ */
+public interface StubExt
+{
+ /** ClientTimeout property: org.jboss.ws.timeout */
+ static final String PROPERTY_CLIENT_TIMEOUT = "org.jboss.ws.timeout";
+ /** KeyStore property: org.jboss.ws.keyStore */
+ static final String PROPERTY_KEY_STORE = "org.jboss.ws.keyStore";
+ /** KeyStorePassword property: org.jboss.ws.keyStorePassword */
+ static final String PROPERTY_KEY_STORE_PASSWORD =
"org.jboss.ws.keyStorePassword";
+ /** KeyStoreType property: org.jboss.ws.keyStoreType */
+ static final String PROPERTY_KEY_STORE_TYPE = "org.jboss.ws.keyStoreType";
+ /** TrustStore property: org.jboss.ws.trustStore */
+ static final String PROPERTY_TRUST_STORE = "org.jboss.ws.trustStore";
+ /** TrustStorePassword property: org.jboss.ws.trustStorePassword */
+ static final String PROPERTY_TRUST_STORE_PASSWORD =
"org.jboss.ws.trustStorePassword";
+ /** TrustStoreType property: org.jboss.ws.trustStoreType */
+ static final String PROPERTY_TRUST_STORE_TYPE =
"org.jboss.ws.trustStoreType";
+ /** Authentication type, used to specify basic, etc) */
+ static final String PROPERTY_AUTH_TYPE = "org.jboss.ws.authType";
+ /** Authentication type, BASIC */
+ static final String PROPERTY_AUTH_TYPE_BASIC =
"org.jboss.ws.authType.basic";
+ /** Authentication type, WSEE */
+ static final String PROPERTY_AUTH_TYPE_WSSE = "org.jboss.ws.authType.wsse";
+ /** Enable MTOM on the stub */
+ static final String PROPERTY_MTOM_ENABLED= "org.jboss.ws.mtom.enabled";
+
+ /**
+ * Get the endpoint meta data for this stub
+ */
+ EndpointMetaData getEndpointMetaData();
+
+ /**
+ * Add a header that is not bound to an input parameter.
+ * A propriatory extension, that is not part of JAXRPC.
+ *
+ * @param xmlName The XML name of the header element
+ * @param xmlType The XML type of the header element
+ */
+ void addUnboundHeader(QName xmlName, QName xmlType, Class javaType, ParameterMode
mode);
+
+ /**
+ * Get the header value for the given XML name.
+ * A propriatory extension, that is not part of JAXRPC.
+ *
+ * @param xmlName The XML name of the header element
+ * @return The header value, or null
+ */
+ Object getUnboundHeaderValue(QName xmlName);
+
+ /**
+ * Set the header value for the given XML name.
+ * A propriatory extension, that is not part of JAXRPC.
+ *
+ * @param xmlName The XML name of the header element
+ */
+ void setUnboundHeaderValue(QName xmlName, Object value);
+
+ /**
+ * Clear all registered headers.
+ * A propriatory extension, that is not part of JAXRPC.
+ */
+ void clearUnboundHeaders();
+
+ /**
+ * Remove the header for the given XML name.
+ * A propriatory extension, that is not part of JAXRPC.
+ */
+ void removeUnboundHeader(QName xmlName);
+
+ /**
+ * Get an Iterator over the registered header XML names.
+ * A propriatory extension, that is not part of JAXRPC.
+ */
+ Iterator getUnboundHeaders();
+
+ /**
+ * Adds the given AttachmentPart object to the outgoing SOAPMessage.
+ * An AttachmentPart object must be created before it can be added to a message.
+ */
+ void addAttachmentPart(AttachmentPart attachmentpart);
+
+ /**
+ * Clears the list of attachment parts.
+ */
+ void clearAttachmentParts();
+
+ /**
+ * Creates a new empty AttachmentPart object.
+ */
+ AttachmentPart createAttachmentPart();
+
+ /**
+ * Get the current port configuration file
+ * A propriatory extension, that is not part of JAXRPC.
+ */
+ String getConfigFile();
+
+ /**
+ * Set the current port configuration file
+ * A propriatory extension, that is not part of JAXRPC.
+ */
+ void setConfigFile(String configFile);
+
+ /**
+ * Get the current port configuration name
+ * A propriatory extension, that is not part of JAXRPC.
+ */
+ String getConfigName();
+
+ /**
+ * Set the current port configuration name
+ * A propriatory extension, that is not part of JAXRPC.
+ */
+ void setConfigName(String configName);
+}
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/CallImpl.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/CallImpl.java 2007-01-16
15:32:38 UTC (rev 1987)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/CallImpl.java 2007-01-17
14:46:03 UTC (rev 1988)
@@ -42,10 +42,7 @@
import javax.xml.rpc.Stub;
import javax.xml.rpc.encoding.SerializerFactory;
import javax.xml.rpc.soap.SOAPFaultException;
-import javax.xml.soap.AttachmentPart;
-import javax.xml.soap.MessageFactory;
import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPMessage;
import org.jboss.logging.Logger;
import org.jboss.ws.Constants;
@@ -57,7 +54,6 @@
import org.jboss.ws.core.jaxrpc.handler.HandlerChainBaseImpl;
import org.jboss.ws.core.jaxrpc.handler.SOAPMessageContextJAXRPC;
import org.jboss.ws.core.soap.MessageContextAssociation;
-import org.jboss.ws.core.soap.UnboundHeader;
import org.jboss.ws.core.utils.JavaUtils;
import org.jboss.ws.extensions.xop.XOPContext;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
@@ -85,12 +81,8 @@
private ServiceImpl jaxrpcService;
// The port type name
private QName portType;
- // A Map<QName,UnboundHeader> of header entries
- private Map<QName, UnboundHeader> unboundHeaders = new LinkedHashMap<QName,
UnboundHeader>();
// A Map<String,Object> of Call properties
private Map<String, Object> properties = new HashMap<String, Object>();
- // A List<AttachmentPart> of attachment parts set through the proxy
- private List<AttachmentPart> attachmentParts = new
ArrayList<AttachmentPart>();
// The set of supported properties
private static final Set<String> standardProperties = new
HashSet<String>();
@@ -158,107 +150,6 @@
return properties;
}
- /**
- * Add a header that is not bound to an input parameter.
- * A propriatory extension, that is not part of JAXRPC.
- *
- * @param xmlName The XML name of the header element
- * @param xmlType The XML type of the header element
- */
- public void addUnboundHeader(QName xmlName, QName xmlType, Class javaType,
ParameterMode mode)
- {
- UnboundHeader unboundHeader = new UnboundHeader(xmlName, xmlType, javaType, mode);
- unboundHeaders.put(xmlName, unboundHeader);
- }
-
- /**
- * Get the header value for the given XML name.
- * A propriatory extension, that is not part of JAXRPC.
- *
- * @param xmlName The XML name of the header element
- * @return The header value, or null
- */
- public Object getUnboundHeaderValue(QName xmlName)
- {
- UnboundHeader unboundHeader = unboundHeaders.get(xmlName);
- return (unboundHeader != null ? unboundHeader.getHeaderValue() : null);
- }
-
- /**
- * Set the header value for the given XML name.
- * A propriatory extension, that is not part of JAXRPC.
- *
- * @param xmlName The XML name of the header element
- */
- public void setUnboundHeaderValue(QName xmlName, Object value)
- {
- UnboundHeader unboundHeader = unboundHeaders.get(xmlName);
- if (unboundHeader == null)
- throw new IllegalArgumentException("Cannot find unbound header: " +
xmlName);
-
- unboundHeader.setHeaderValue(value);
- }
-
- /**
- * Clear all registered headers.
- * A propriatory extension, that is not part of JAXRPC.
- */
- public void clearUnboundHeaders()
- {
- unboundHeaders.clear();
- }
-
- /**
- * Remove the header for the given XML name.
- * A propriatory extension, that is not part of JAXRPC.
- */
- public void removeUnboundHeader(QName xmlName)
- {
- unboundHeaders.remove(xmlName);
- }
-
- /**
- * Get an Iterator over the registered header XML names.
- * A propriatory extension, that is not part of JAXRPC.
- */
- public Iterator getUnboundHeaders()
- {
- return unboundHeaders.keySet().iterator();
- }
-
- /**
- * Adds the given AttachmentPart object to the outgoing SOAPMessage.
- * An AttachmentPart object must be created before it can be added to a message.
- */
- public void addAttachmentPart(AttachmentPart part)
- {
- attachmentParts.add(part);
- }
-
- /**
- * Clears the list of attachment parts.
- */
- public void clearAttachmentParts()
- {
- attachmentParts.clear();
- }
-
- /**
- * Creates a new empty AttachmentPart object.
- */
- public AttachmentPart createAttachmentPart()
- {
- try
- {
- MessageFactory factory = MessageFactory.newInstance();
- return factory.createMessage().createAttachmentPart();
- }
- catch (SOAPException ex)
- {
- throw new JAXRPCException("Cannot create attachment part");
- }
- }
-
/** Gets the address of a target service endpoint.
*/
public String getTargetEndpointAddress()
@@ -364,7 +255,7 @@
{
try
{
- invokeInternal(operationName, inputParams, unboundHeaders, true);
+ invokeInternal(operationName, inputParams, true);
}
catch (RemoteException ex)
{
@@ -376,14 +267,14 @@
*/
public Object invoke(Object[] inputParams) throws RemoteException
{
- return invokeInternal(operationName, inputParams, unboundHeaders, false);
+ return invokeInternal(operationName, inputParams, false);
}
/** Invokes a specific operation using a synchronous request-response interaction
mode.
*/
public Object invoke(QName operationName, Object[] inputParams) throws
RemoteException
{
- return invokeInternal(operationName, inputParams, unboundHeaders, false);
+ return invokeInternal(operationName, inputParams, false);
}
protected CommonMessageContext processPivot(CommonMessageContext requestContext) {
@@ -588,7 +479,7 @@
{
}
- private Object invokeInternal(QName opName, Object[] inputParams, Map<QName,
UnboundHeader> unboundHeaders, boolean forceOneway) throws RemoteException
+ private Object invokeInternal(QName opName, Object[] inputParams, boolean forceOneway)
throws RemoteException
{
if (opName.equals(operationName) == false)
setOperationName(opName);
@@ -604,7 +495,7 @@
Object retObj = null;
try
{
- retObj = super.invoke(opName, inputParams, unboundHeaders, properties,
forceOneway);
+ retObj = super.invoke(opName, inputParams, properties, forceOneway);
return retObj;
}
catch (SOAPFaultException ex)
@@ -633,16 +524,6 @@
}
@Override
- protected void addAttachmentParts(SOAPMessage reqMessage)
- {
- for (AttachmentPart part : attachmentParts)
- {
- log.debug("Adding attachment part: " + part.getContentId());
- reqMessage.addAttachmentPart(part);
- }
- }
-
- @Override
protected boolean callRequestHandlerChain(QName portName, HandlerType type)
{
SOAPMessageContextJAXRPC msgContext =
(SOAPMessageContextJAXRPC)MessageContextAssociation.peekMessageContext();
@@ -732,4 +613,14 @@
}
}
}
+
+ @Override
+ public void setConfigName(String configName)
+ {
+ EndpointMetaData epMetaData = getEndpointMetaData();
+ epMetaData.setConfigName(configName);
+
+ // Reinitialize the client handler chain
+ jaxrpcService.setupHandlerChain(epMetaData);
+ }
}
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/PortProxy.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/PortProxy.java 2007-01-16
15:32:38 UTC (rev 1987)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/PortProxy.java 2007-01-17
14:46:03 UTC (rev 1988)
@@ -42,6 +42,7 @@
import org.jboss.logging.Logger;
import org.jboss.ws.WSException;
+import org.jboss.ws.core.StubExt;
import org.jboss.ws.core.utils.JavaUtils;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
import org.jboss.ws.metadata.umdm.HandlerMetaData;
@@ -94,7 +95,8 @@
public PortProxy(CallImpl call)
{
this.call = call;
- this.stubMethods = Arrays.asList(StubExt.class.getMethods());
+ this.stubMethods = new ArrayList(Arrays.asList(StubExt.class.getMethods()));
+ this.stubMethods.addAll(Arrays.asList(Stub.class.getMethods()));
this.objectMethods = Arrays.asList(Object.class.getMethods());
}
@@ -119,34 +121,6 @@
setProperty((String)args[0], args[1]);
return null;
}
- else if (methodName.equals("getConfigFile"))
- {
- EndpointMetaData epMetaData = call.getEndpointMetaData();
- return epMetaData.getConfigFile();
- }
- else if (methodName.equals("setConfigFile"))
- {
- EndpointMetaData epMetaData = call.getEndpointMetaData();
- epMetaData.setConfigFile((String)args[0]);
- return null;
- }
- else if (methodName.equals("getConfigName"))
- {
- EndpointMetaData epMetaData = call.getEndpointMetaData();
- return epMetaData.getConfigName();
- }
- else if (methodName.equals("setConfigName"))
- {
- EndpointMetaData epMetaData = call.getEndpointMetaData();
- epMetaData.setConfigName((String)args[0]);
- epMetaData.configure(epMetaData);
-
- // Reinitialize the client handler chain
- ServiceImpl jaxrpcService = call.getServiceImpl();
- jaxrpcService.setupHandlerChain(epMetaData);
-
- return null;
- }
else
{
Method callMethod = CallImpl.class.getMethod(methodName,
method.getParameterTypes());
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/ServiceImpl.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/ServiceImpl.java 2007-01-16
15:32:38 UTC (rev 1987)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/ServiceImpl.java 2007-01-17
14:46:03 UTC (rev 1988)
@@ -36,12 +36,14 @@
import javax.xml.namespace.QName;
import javax.xml.rpc.Call;
import javax.xml.rpc.ServiceException;
+import javax.xml.rpc.Stub;
import javax.xml.rpc.encoding.TypeMappingRegistry;
import javax.xml.rpc.handler.HandlerChain;
import javax.xml.rpc.handler.HandlerInfo;
import javax.xml.rpc.handler.HandlerRegistry;
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.UnifiedServiceRefMetaData;
import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
@@ -392,7 +394,7 @@
PortProxy handler = new PortProxy(call);
ClassLoader cl = epMetaData.getClassLoader();
- Remote proxy = (Remote)Proxy.newProxyInstance(cl, new Class[] { seiClass,
StubExt.class }, handler);
+ Remote proxy = (Remote)Proxy.newProxyInstance(cl, new Class[] { seiClass,
Stub.class, StubExt.class }, handler);
return proxy;
}
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/ServiceObjectFactory.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/ServiceObjectFactory.java 2007-01-16
15:32:38 UTC (rev 1987)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/ServiceObjectFactory.java 2007-01-17
14:46:03 UTC (rev 1988)
@@ -49,7 +49,6 @@
import javax.xml.rpc.Service;
import org.jboss.logging.Logger;
-import org.jboss.net.protocol.URLStreamHandlerFactory;
import org.jboss.ws.Constants;
import org.jboss.ws.WSException;
import org.jboss.ws.core.server.ServiceEndpoint;
Deleted: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/StubExt.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/StubExt.java 2007-01-16
15:32:38 UTC (rev 1987)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/StubExt.java 2007-01-17
14:46:03 UTC (rev 1988)
@@ -1,153 +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.jaxrpc;
-
-import java.util.Iterator;
-
-import javax.xml.namespace.QName;
-import javax.xml.rpc.ParameterMode;
-import javax.xml.soap.AttachmentPart;
-
-import org.jboss.ws.metadata.umdm.EndpointMetaData;
-
-// $Id$
-
-/**
- * An instance of a stub class represents a client side proxy or stub instance for the
target service endpoint.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 27-Jan-2005
- */
-public interface StubExt extends javax.xml.rpc.Stub
-{
- /** ClientTimeout property: org.jboss.ws.timeout */
- static final String PROPERTY_CLIENT_TIMEOUT = "org.jboss.ws.timeout";
- /** KeyStore property: org.jboss.ws.keyStore */
- static final String PROPERTY_KEY_STORE = "org.jboss.ws.keyStore";
- /** KeyStorePassword property: org.jboss.ws.keyStorePassword */
- static final String PROPERTY_KEY_STORE_PASSWORD =
"org.jboss.ws.keyStorePassword";
- /** KeyStoreType property: org.jboss.ws.keyStoreType */
- static final String PROPERTY_KEY_STORE_TYPE = "org.jboss.ws.keyStoreType";
- /** TrustStore property: org.jboss.ws.trustStore */
- static final String PROPERTY_TRUST_STORE = "org.jboss.ws.trustStore";
- /** TrustStorePassword property: org.jboss.ws.trustStorePassword */
- static final String PROPERTY_TRUST_STORE_PASSWORD =
"org.jboss.ws.trustStorePassword";
- /** TrustStoreType property: org.jboss.ws.trustStoreType */
- static final String PROPERTY_TRUST_STORE_TYPE =
"org.jboss.ws.trustStoreType";
- /** Authentication type, used to specify basic, etc) */
- static final String PROPERTY_AUTH_TYPE = "org.jboss.ws.authType";
- /** Authentication type, BASIC */
- static final String PROPERTY_AUTH_TYPE_BASIC =
"org.jboss.ws.authType.basic";
- /** Authentication type, WSEE */
- static final String PROPERTY_AUTH_TYPE_WSSE = "org.jboss.ws.authType.wsse";
- /** Enable MTOM on the stub */
- static final String PROPERTY_MTOM_ENABLED= "org.jboss.ws.mtom.enabled";
-
- /**
- * Get the endpoint meta data for this stub
- */
- EndpointMetaData getEndpointMetaData();
-
- /**
- * Add a header that is not bound to an input parameter.
- * A propriatory extension, that is not part of JAXRPC.
- *
- * @param xmlName The XML name of the header element
- * @param xmlType The XML type of the header element
- */
- void addUnboundHeader(QName xmlName, QName xmlType, Class javaType, ParameterMode
mode);
-
- /**
- * Get the header value for the given XML name.
- * A propriatory extension, that is not part of JAXRPC.
- *
- * @param xmlName The XML name of the header element
- * @return The header value, or null
- */
- Object getUnboundHeaderValue(QName xmlName);
-
- /**
- * Set the header value for the given XML name.
- * A propriatory extension, that is not part of JAXRPC.
- *
- * @param xmlName The XML name of the header element
- */
- void setUnboundHeaderValue(QName xmlName, Object value);
-
- /**
- * Clear all registered headers.
- * A propriatory extension, that is not part of JAXRPC.
- */
- void clearUnboundHeaders();
-
- /**
- * Remove the header for the given XML name.
- * A propriatory extension, that is not part of JAXRPC.
- */
- void removeUnboundHeader(QName xmlName);
-
- /**
- * Get an Iterator over the registered header XML names.
- * A propriatory extension, that is not part of JAXRPC.
- */
- Iterator getUnboundHeaders();
-
- /**
- * Adds the given AttachmentPart object to the outgoing SOAPMessage.
- * An AttachmentPart object must be created before it can be added to a message.
- */
- void addAttachmentPart(AttachmentPart attachmentpart);
-
- /**
- * Clears the list of attachment parts.
- */
- void clearAttachmentParts();
-
- /**
- * Creates a new empty AttachmentPart object.
- */
- AttachmentPart createAttachmentPart();
-
- /**
- * Get the current port configuration file
- * A propriatory extension, that is not part of JAXRPC.
- */
- String getConfigFile();
-
- /**
- * Set the current port configuration file
- * A propriatory extension, that is not part of JAXRPC.
- */
- void setConfigFile(String configFile);
-
- /**
- * Get the current port configuration name
- * A propriatory extension, that is not part of JAXRPC.
- */
- String getConfigName();
-
- /**
- * Set the current port configuration name
- * A propriatory extension, that is not part of JAXRPC.
- */
- void setConfigName(String configName);
-}
Added: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/ServiceConfiguration.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/ServiceConfiguration.java
(rev 0)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/ServiceConfiguration.java 2007-01-17
14:46:03 UTC (rev 1988)
@@ -0,0 +1,53 @@
+/*
+ * 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$
+
+/**
+ * Service provider for ServiceDelegate and Endpoint objects.
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 17-Jan-2006
+ */
+public interface ServiceConfiguration
+{
+ /**
+ * Get the port configuration file for newly created ports
+ */
+ String getConfigFile();
+
+ /**
+ * Set the port configuration file for newly created ports
+ */
+ void setConfigFile(String configFile);
+
+ /**
+ * Get the port configuration name for newly created ports
+ */
+ String getConfigName();
+
+ /**
+ * Set the port configuration name for newly created ports
+ */
+ void setConfigName(String configName);
+}
Property changes on:
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/ServiceConfiguration.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Deleted: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/ServiceDecorator.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/ServiceDecorator.java 2007-01-16
15:32:38 UTC (rev 1987)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/ServiceDecorator.java 2007-01-17
14:46:03 UTC (rev 1988)
@@ -1,111 +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 org.jboss.ws.metadata.umdm.EndpointMetaData;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.EndpointReference;
-import javax.xml.ws.Service;
-import javax.xml.ws.WebServiceFeature;
-import java.util.HashMap;
-import java.util.Map;
-import java.net.URL;
-
-/**
- * Acts as a wrapper between clients and the JAX-WS API.
- * Allows additional, propriatary API to be injected and core API calls
- * to be decorated.
- *
- * @author Heiko.Braun(a)jboss.org
- * @version $Id$
- * @since 21.12.2006
- */
-public class ServiceDecorator extends Service {
-
- public final static String CLIENT_CONF_NAME =
"org.jboss.ws.jaxws.client.configName";
- public final static String CLIENT_CONF_FILE =
"org.jboss.ws.jaxws.client.configFile";
-
- private Map<String, Object> props = new HashMap<String, Object>();
-
- private Map getProps()
- {
- return props;
- }
-
- public void setProperty(String key, Object value)
- {
- props.put(key, value);
- }
-
- public Object getProperty(String key)
- {
- return props.get(key);
- }
-
- public static ServiceDecorator newInstance(URL wsdlDocumentLocation, QName
serviceName)
- {
- return new ServiceDecorator(wsdlDocumentLocation, serviceName);
- }
-
- // ----------------------------------------------------------------------------
- // intercepted javax.xml.ws.Service invocations
-
- protected ServiceDecorator(URL wsdlDocumentLocation, QName serviceName) {
- super(wsdlDocumentLocation, serviceName);
- }
-
- public <T> T getPort(Class<T> serviceEndpointInterface) {
- T port = super.getPort(serviceEndpointInterface);
- adjustConfig((StubExt)port);
- return port;
- }
-
- public <T> T getPort(QName portName, Class<T> serviceEndpointInterface) {
- T port = super.getPort(portName, serviceEndpointInterface);
- adjustConfig((StubExt)port);
- return port;
- }
-
- public <T> T getPort(QName portName, Class<T> serviceEndpointInterface,
WebServiceFeature... features) {
- return super.getPort(portName, serviceEndpointInterface, features);
- }
-
- public <T> T getPort(Class<T> serviceEndpointInterface,
WebServiceFeature... features) {
- return super.getPort(serviceEndpointInterface, features);
- }
-
- public <T> T getPort(EndpointReference endpointReference, Class<T>
serviceEndpointInterface, WebServiceFeature... features) {
- return super.getPort(endpointReference, serviceEndpointInterface, features);
- }
-
- private void adjustConfig(StubExt stub) {
-
- EndpointMetaData epMetaData = stub.getEndpointMetaData();
-
- if(props.containsKey(CLIENT_CONF_NAME))
- epMetaData.setConfigName((String)props.get(CLIENT_CONF_NAME));
- if(props.containsKey(CLIENT_CONF_FILE))
- epMetaData.setConfigFile((String)props.get(CLIENT_CONF_FILE));
-
- }
-}
Deleted: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/StubExt.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/StubExt.java 2007-01-16
15:32:38 UTC (rev 1987)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/StubExt.java 2007-01-17
14:46:03 UTC (rev 1988)
@@ -1,14 +0,0 @@
-package org.jboss.ws.core.jaxws;
-
-import org.jboss.ws.metadata.umdm.EndpointMetaData;
-
-/**
- * @author Heiko.Braun(a)jboss.org
- * @version $Id$
- * @since 21.12.2006
- */
-public interface StubExt {
-
- EndpointMetaData getEndpointMetaData();
-
-}
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java 2007-01-16
15:32:38 UTC (rev 1987)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java 2007-01-17
14:46:03 UTC (rev 1988)
@@ -45,17 +45,16 @@
import org.jboss.ws.core.CommonBindingProvider;
import org.jboss.ws.core.CommonClient;
import org.jboss.ws.core.CommonMessageContext;
+import org.jboss.ws.core.StubExt;
import org.jboss.ws.core.jaxws.binding.BindingExt;
import org.jboss.ws.core.jaxws.binding.BindingProviderImpl;
import org.jboss.ws.core.jaxws.handler.HandlerChainExecutor;
import org.jboss.ws.core.jaxws.handler.MessageContextJAXWS;
import org.jboss.ws.core.jaxws.handler.PortInfoImpl;
import org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS;
-import org.jboss.ws.core.jaxws.StubExt;
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
import org.jboss.ws.metadata.umdm.OperationMetaData;
-import org.jboss.ws.metadata.umdm.ServiceMetaData;
import org.jboss.ws.metadata.umdm.HandlerMetaData.HandlerType;
/**
@@ -140,7 +139,7 @@
try
{
- Object retObj = invoke(opName, args, null, resContext, false);
+ Object retObj = invoke(opName, args, resContext, false);
return retObj;
}
catch (Exception ex)
@@ -277,4 +276,12 @@
{
throw new NotImplementedException();
}
+
+ public void setConfigName(String configName)
+ {
+ EndpointMetaData epMetaData = getEndpointMetaData();
+ epMetaData.setConfigName(configName);
+ // TODO: Handlers not re-initialized
+ log.warn("Handlers not re-initialized");
+ }
}
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ClientProxy.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ClientProxy.java 2007-01-16
15:32:38 UTC (rev 1987)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ClientProxy.java 2007-01-17
14:46:03 UTC (rev 1988)
@@ -26,6 +26,7 @@
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
import java.rmi.RemoteException;
+import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
@@ -45,8 +46,8 @@
import org.jboss.logging.Logger;
import org.jboss.ws.Constants;
import org.jboss.ws.WSException;
+import org.jboss.ws.core.StubExt;
import org.jboss.ws.core.utils.JavaUtils;
-import org.jboss.ws.core.jaxws.StubExt;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
import org.jboss.ws.metadata.umdm.OperationMetaData;
@@ -68,8 +69,6 @@
// List<Method> of the Object methods
private List objectMethods;
- private List stubExtMethods;
-
// The service configured executor
private ExecutorService executor;
@@ -89,9 +88,9 @@
{
this.client = client;
this.executor = executor;
- this.stubMethods = Arrays.asList(BindingProvider.class.getMethods());
+ this.stubMethods = new
ArrayList(Arrays.asList(BindingProvider.class.getMethods()));
+ this.stubMethods.addAll(Arrays.asList(StubExt.class.getMethods()));
this.objectMethods = Arrays.asList(Object.class.getMethods());
- this.stubExtMethods = Arrays.asList(StubExt.class.getMethods());
}
/** Processes a method invocation on a proxy instance and returns the result.
@@ -113,13 +112,6 @@
return objMethod.invoke(client, args);
}
- // An invocation on StubExt interface
- else if (stubExtMethods.contains(method))
- {
- Method stubExtMethod = ClientImpl.class.getMethod(methodName,
method.getParameterTypes());
- return stubExtMethod.invoke(client, args);
- }
-
// An invocation on the service endpoint interface
else
{
Deleted:
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceObjectFactory.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceObjectFactory.java 2007-01-16
15:32:38 UTC (rev 1987)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceObjectFactory.java 2007-01-17
14:46:03 UTC (rev 1988)
@@ -1,238 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-// $Id$
-package org.jboss.ws.core.jaxws.client;
-
-// $Id$
-
-import java.io.ByteArrayInputStream;
-import java.io.File;
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.Method;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.Hashtable;
-
-import javax.naming.Context;
-import javax.naming.Name;
-import javax.naming.NamingException;
-import javax.naming.RefAddr;
-import javax.naming.Reference;
-import javax.naming.spi.ObjectFactory;
-import javax.xml.namespace.QName;
-import javax.xml.ws.Service;
-import javax.xml.ws.WebServiceException;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.core.jaxws.ServiceDecorator;
-
-/**
- * This ServiceObjectFactory reconstructs a javax.xml.ws.Service
- * for a given WSDL when the webservice client does a JNDI lookup
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 24-Oct-2004
- */
-public class ServiceObjectFactory implements ObjectFactory
-{
- // provide logging
- private static final Logger log = Logger.getLogger(ServiceObjectFactory.class);
-
- /**
- * Creates an object using the location or reference information specified.
- * <p/>
- *
- * @param obj The possibly null object containing location or reference
- * information that can be used in creating an object.
- * @param name The name of this object relative to
<code>nameCtx</code>,
- * or null if no name is specified.
- * @param nameCtx The context relative to which the <code>name</code>
- * parameter is specified, or null if <code>name</code>
is
- * relative to the default initial context.
- * @param environment The possibly null environment that is used in
- * creating the object.
- * @return The object created; null if an object cannot be created.
- * @throws Exception if this object factory encountered an exception
- * while attempting to create an object, and no other object
factories are
- * to be tried.
- * @see javax.naming.spi.NamingManager#getObjectInstance
- * @see javax.naming.spi.NamingManager#getURLContext
- */
- public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable
environment) throws Exception
- {
- try
- {
- Reference ref = (Reference)obj;
-
- String serviceTypeName =
(String)ref.get(ServiceReferenceable.SERVICE_TYPE).getContent();
- String portTypeName =
(String)ref.get(ServiceReferenceable.PORT_TYPE).getContent();
- UnifiedServiceRef serviceRef = unmarshallServiceRef(ref);
-
- ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
- Class serviceType = ctxLoader.loadClass(serviceTypeName);
- Class portType = (portTypeName != null ? ctxLoader.loadClass(portTypeName) :
null);
-
- if (Service.class.isAssignableFrom(serviceType) == false)
- throw new IllegalArgumentException("WebServiceRef type '" +
serviceType + "' is not assignable to javax.xml.ws.Service");
-
- Object target;
-
- URL wsdlURL = getWsdlLocationURL(serviceType, serviceRef.getWsdlLocation());
-
- // Generic javax.xml.ws.Service
- if (serviceType == Service.class)
- {
- if (wsdlURL != null)
- {
- target = ServiceDecorator.create(wsdlURL, null);
- }
- else
- {
- throw new IllegalArgumentException("Cannot create generic
javax.xml.ws.Service without wsdlLocation");
- }
- }
- // Generated javax.xml.ws.Service subclass
- else
- {
- if (wsdlURL != null)
- {
- Constructor ctor = serviceType.getConstructor(new Class[] { URL.class,
QName.class });
- target = (Service)ctor.newInstance(new Object[] { wsdlURL, null });
- }
- else
- {
- target = (Service)serviceType.newInstance();
- }
- }
-
- if (portTypeName != null && portTypeName.equals(serviceTypeName) ==
false)
- {
- Object port = null;
- for (Method method : serviceType.getMethods())
- {
- String methodName = method.getName();
- Class retType = method.getReturnType();
- if (methodName.startsWith("get") &&
portType.isAssignableFrom(retType))
- {
- port = method.invoke(target, new Object[0]);
- target = port;
- break;
- }
- }
-
- if (port == null)
- throw new WebServiceException("Cannot find getter for port type:
" + portTypeName);
- }
-
- // process config-name and config-file
- processConfig(target, serviceRef);
-
- return target;
- }
- catch (Exception ex)
- {
- log.error("Cannot create service", ex);
- throw ex;
- }
- }
-
- private void processConfig(Object target, UnifiedServiceRef serviceRef) {
- if(target instanceof ServiceDecorator)
- {
- ServiceDecorator service = (ServiceDecorator)target;
- service.setProperty(ServiceDecorator.CLIENT_CONF_NAME,
serviceRef.getConfigName());
- service.setProperty(ServiceDecorator.CLIENT_CONF_FILE,
serviceRef.getConfigFile());
- }
- else
- {
- log.warn("Configuration ignored for " + target.getClass().getName());
- }
- }
-
- private UnifiedServiceRef unmarshallServiceRef(Reference ref) throws
ClassNotFoundException, NamingException
- {
- UnifiedServiceRef sref;
- RefAddr refAddr = ref.get(ServiceReferenceable.SERVICE_REF);
- ByteArrayInputStream bais = new
ByteArrayInputStream((byte[])refAddr.getContent());
- try
- {
- ObjectInputStream ois = new ObjectInputStream(bais);
- sref = (UnifiedServiceRef)ois.readObject();
- ois.close();
- }
- catch (IOException e)
- {
- throw new NamingException("Cannot unmarshall service ref meta data, cause:
" + e.toString());
- }
- return sref;
- }
-
- private URL getWsdlLocationURL(Class type, String wsdlLocation)
- {
- URL wsdlURL = null;
- if (wsdlLocation != null && wsdlLocation.length() > 0)
- {
- // 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)
- {
- ClassLoader loader = Thread.currentThread().getContextClassLoader();
- wsdlURL = loader.getResource(wsdlLocation);
- }
-
- // Try the filename relative to class
- if (wsdlURL == null)
- {
- String packagePath = type.getPackage().getName().replace('.',
'/');
- ClassLoader loader = Thread.currentThread().getContextClassLoader();
- wsdlURL = loader.getResource(packagePath + "/" + wsdlLocation);
- }
- }
- return wsdlURL;
- }
-}
Deleted:
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceReferenceable.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceReferenceable.java 2007-01-16
15:32:38 UTC (rev 1987)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceReferenceable.java 2007-01-17
14:46:03 UTC (rev 1988)
@@ -1,97 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-// $Id$
-package org.jboss.ws.core.jaxws.client;
-
-// $Id$
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.ObjectOutputStream;
-
-import javax.naming.BinaryRefAddr;
-import javax.naming.NamingException;
-import javax.naming.Reference;
-import javax.naming.Referenceable;
-import javax.naming.StringRefAddr;
-
-
-
-/**
- * A JNDI reference to a javax.xml.ws.Service
- *
- * It holds the information to reconstrut the javax.xml.ws.Service
- * when the client does a JNDI lookup.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 24-Oct-2006
- */
-public class ServiceReferenceable implements Referenceable
-{
- public static final String SERVICE_REF = "SERVICE_REF";
- public static final String SERVICE_TYPE = "SERVICE_TYPE";
- public static final String PORT_TYPE = "PORT_TYPE";
-
- private String serviceType;
- private String portType;
- private UnifiedServiceRef sref;
-
- public ServiceReferenceable(String serviceType, String portType, UnifiedServiceRef
sref)
- {
- this.serviceType = serviceType;
- this.portType = portType;
- this.sref = sref;
- }
-
- /**
- * Retrieves the Reference of this object.
- *
- * @return The non-null Reference of this object.
- * @throws javax.naming.NamingException If a naming exception was encountered while
retrieving the reference.
- */
- public Reference getReference() throws NamingException
- {
- Reference myRef = new Reference(ServiceReferenceable.class.getName(),
ServiceObjectFactory.class.getName(), null);
-
- myRef.add(new StringRefAddr(SERVICE_TYPE, serviceType));
- myRef.add(new StringRefAddr(PORT_TYPE, portType));
- myRef.add(new BinaryRefAddr(SERVICE_REF, marshallServiceRef()));
-
- return myRef;
- }
-
- private byte[] marshallServiceRef() throws NamingException
- {
- ByteArrayOutputStream baos = new ByteArrayOutputStream(512);
- try
- {
- ObjectOutputStream oos = new ObjectOutputStream(baos);
- oos.writeObject(sref);
- oos.close();
- }
- catch (IOException e)
- {
- throw new NamingException("Cannot marshall service ref, cause: " +
e.toString());
- }
- return baos.toByteArray();
- }
-}
\ No newline at end of file
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/UnifiedServiceRef.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/UnifiedServiceRef.java 2007-01-16
15:32:38 UTC (rev 1987)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/UnifiedServiceRef.java 2007-01-17
14:46:03 UTC (rev 1988)
@@ -24,6 +24,7 @@
//$Id$
import java.io.Serializable;
+import java.net.URL;
/**
* Represents a <service-ref> element of the jboss.xml, jboss-web.xml,
jboss-client.xml deployment descriptor
@@ -33,20 +34,23 @@
*/
public class UnifiedServiceRef implements Serializable
{
- private static final long serialVersionUID = 223039007880052172L;
+ private static final long serialVersionUID = 7575421890971083734L;
+ private URL rootURL;
private String encName;
private String wsdlLocation;
private String configName;
private String configFile;
- public UnifiedServiceRef()
+ public UnifiedServiceRef(URL rootURL, String name)
{
+ this.rootURL = rootURL;
+ this.encName = name;
}
- public UnifiedServiceRef(String name)
+ public URL getRootURL()
{
- this.encName = name;
+ return rootURL;
}
public String getEncName()
@@ -54,11 +58,6 @@
return encName;
}
- public void setEncName(String name)
- {
- this.encName = name;
- }
-
public String getWsdlLocation()
{
return wsdlLocation;
Deleted:
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/WebServiceRefDeployer.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/WebServiceRefDeployer.java 2007-01-16
15:32:38 UTC (rev 1987)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/WebServiceRefDeployer.java 2007-01-17
14:46:03 UTC (rev 1988)
@@ -1,85 +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 javax.naming.Context;
-import javax.xml.ws.Service;
-import javax.xml.ws.WebServiceRef;
-
-import org.jboss.logging.Logger;
-import org.jboss.util.naming.Util;
-
-/**
- * Binds a JAXWS Service object into JNDI
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 24-Oct-2006
- */
-public class WebServiceRefDeployer
-{
- // provide logging
- private static Logger log = Logger.getLogger(WebServiceRefDeployer.class);
-
- private WebServiceRefDeployer()
- {
- // Hide ctor
- }
-
- public static void setupWebServiceRef(Context ctx, String jndiName, Class refType,
WebServiceRef wsref, UnifiedServiceRef sref) throws Exception
- {
- String externalName = ctx.getNameInNamespace() + "/" + jndiName;
- String refTypeName = (refType != null ? refType.getName() : null);
- String wsrefString = "[name=" + wsref.name() + ",value=" +
wsref.value() + ",type=" + wsref.type() + ",wsdl=" +
wsref.wsdlLocation() + ",mapped=" + wsref.mappedName() + "]";
- log.debug("setupWebServiceRef [jndi=" + externalName +
",refType=" + refTypeName + ",wsref=" + wsrefString +
",sref=" + sref + "]");
-
- String serviceTypeName = null;
- String portTypeName = null;
-
- // #1 Use the explicit @WebServiceRef.value
- if (wsref.value() != Object.class)
- serviceTypeName = wsref.value().getName();
-
- // #2 Use the target ref type
- if (serviceTypeName == null && refType != null &&
Service.class.isAssignableFrom(refType))
- serviceTypeName = refType.getName();
-
- // #3 Use javax.xml.ws.Service
- if (serviceTypeName == null)
- serviceTypeName = Service.class.getName();
-
- // #1 Use the explicit @WebServiceRef.type
- if (wsref.type() != Object.class)
- portTypeName = wsref.type().getName();
-
- // #2 Use the target ref type
- if (portTypeName == null && refType != null &&
Service.class.isAssignableFrom(refType) == false)
- portTypeName = refType.getName();
-
- // Set the wsdlLocation if there is no override already
- if (sref.getWsdlLocation() == null && wsref.wsdlLocation().length() >
0)
- sref.setWsdlLocation(wsref.wsdlLocation());
-
- Util.rebind(ctx, jndiName, new ServiceReferenceable(serviceTypeName, portTypeName,
sref));
- }
-}
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java 2007-01-16
15:32:38 UTC (rev 1987)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java 2007-01-17
14:46:03 UTC (rev 1988)
@@ -46,7 +46,8 @@
import org.jboss.logging.Logger;
import org.jboss.util.NotImplementedException;
-import org.jboss.ws.core.jaxws.StubExt;
+import org.jboss.ws.core.StubExt;
+import org.jboss.ws.core.jaxws.ServiceConfiguration;
import org.jboss.ws.core.jaxws.client.ClientImpl;
import org.jboss.ws.core.jaxws.client.ClientProxy;
import org.jboss.ws.core.jaxws.client.DispatchImpl;
@@ -68,7 +69,7 @@
* @author Thomas.Diesler(a)jboss.com
* @since 03-May-2006
*/
-public class ServiceDelegateImpl extends ServiceDelegate
+public class ServiceDelegateImpl extends ServiceDelegate implements ServiceConfiguration
{
// provide logging
private final Logger log = Logger.getLogger(ServiceDelegateImpl.class);
@@ -82,6 +83,10 @@
private HandlerResolver handlerResolver = new HandlerResolverImpl();
// The executor service
private ExecutorService executor;
+ // The config name for all created ports
+ private String configName;
+ // The config file for all created ports
+ private String configFile;
// A list of annotated ports
private List<QName> annotatedPorts = new ArrayList<QName>();
@@ -101,6 +106,26 @@
}
}
+ 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;
+ }
+
/**
* The getPort method returns a stub. A service client uses this stub to invoke
operations on the target service endpoint.
* The serviceEndpointInterface specifies the service endpoint interface that is
supported by the created dynamic proxy or stub instance.
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPConnectionImpl.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPConnectionImpl.java 2007-01-16
15:32:38 UTC (rev 1987)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPConnectionImpl.java 2007-01-17
14:46:03 UTC (rev 1988)
@@ -44,9 +44,8 @@
import org.jboss.remoting.Client;
import org.jboss.remoting.InvokerLocator;
import org.jboss.remoting.marshal.MarshalFactory;
-import org.jboss.ws.WSException;
+import org.jboss.ws.core.StubExt;
import org.jboss.ws.core.WSTimeoutException;
-import org.jboss.ws.core.jaxrpc.StubExt;
import org.jboss.ws.extensions.xop.XOPContext;
/**
@@ -365,7 +364,7 @@
if (metadataMap.containsKey(key))
{
String remotingKey = metadataMap.get(key);
- if (key.equals(Stub.USERNAME_PROPERTY) ||
key.equals(Stub.PASSWORD_PROPERTY))
+ if ("http.basic.username".equals(remotingKey) ||
"http.basic.password".equals(remotingKey))
{
if (authType.equals(StubExt.PROPERTY_AUTH_TYPE_BASIC))
{
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java 2007-01-16
15:32:38 UTC (rev 1987)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java 2007-01-17
14:46:03 UTC (rev 1988)
@@ -35,7 +35,7 @@
import org.jboss.logging.Logger;
import org.jboss.ws.WSException;
import org.jboss.ws.core.CommonMessageContext;
-import org.jboss.ws.core.jaxrpc.StubExt;
+import org.jboss.ws.core.StubExt;
import org.jboss.ws.core.soap.SOAPMessageImpl;
import org.jboss.ws.core.utils.DOMWriter;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/xop/DisableMTOMHandler.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/xop/DisableMTOMHandler.java 2007-01-16
15:32:38 UTC (rev 1987)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/xop/DisableMTOMHandler.java 2007-01-17
14:46:03 UTC (rev 1988)
@@ -25,7 +25,7 @@
import javax.xml.rpc.handler.GenericHandler;
import javax.xml.rpc.handler.MessageContext;
-import org.jboss.ws.core.jaxrpc.StubExt;
+import org.jboss.ws.core.StubExt;
/**
* @author Heiko Braun <heiko.braun(a)jboss.com>
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/xop/XOPContext.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/xop/XOPContext.java 2007-01-16
15:32:38 UTC (rev 1987)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/extensions/xop/XOPContext.java 2007-01-17
14:46:03 UTC (rev 1988)
@@ -25,7 +25,7 @@
import org.jboss.ws.Constants;
import org.jboss.ws.WSException;
import org.jboss.ws.core.CommonMessageContext;
-import org.jboss.ws.core.jaxrpc.StubExt;
+import org.jboss.ws.core.StubExt;
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.core.soap.NameImpl;
import org.jboss.ws.core.soap.SOAPElementImpl;
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java 2007-01-16
15:32:38 UTC (rev 1987)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java 2007-01-17
14:46:03 UTC (rev 1988)
@@ -121,13 +121,9 @@
// Process an optional @HandlerChain annotation
if (sepClass.isAnnotationPresent(HandlerChain.class))
- {
processHandlerChain(sepMetaData, sepClass);
- }
else if (seiClass.isAnnotationPresent(HandlerChain.class))
- {
processHandlerChain(sepMetaData, seiClass);
- }
// Sanity check: read the generated WSDL and initialize the schema model
WSDLDefinitions wsdlDefinitions = serviceMetaData.getWsdlDefinitions();
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ServerEndpointMetaData.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ServerEndpointMetaData.java 2007-01-16
15:32:38 UTC (rev 1987)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ServerEndpointMetaData.java 2007-01-17
14:46:03 UTC (rev 1988)
@@ -139,7 +139,7 @@
public void setURLPattern(String urlPattern)
{
if (urlPattern != null && !urlPattern.startsWith("/"))
- throw new IllegalArgumentException("url pattern should start with
'/'");
+ throw new IllegalArgumentException("URL pattern should start with
'/'");
this.urlPattern = urlPattern;
}
Modified: trunk/jbossws-tests/.classpath
===================================================================
--- trunk/jbossws-tests/.classpath 2007-01-16 15:32:38 UTC (rev 1987)
+++ trunk/jbossws-tests/.classpath 2007-01-17 14:46:03 UTC (rev 1988)
@@ -40,5 +40,6 @@
<classpathentry kind="lib"
path="/build/thirdparty/junit.jar"/>
<classpathentry kind="lib"
path="/build/thirdparty/mail.jar"/>
<classpathentry kind="lib"
path="/build/thirdparty/jbosssx-client.jar"
sourcepath="/build/thirdparty/jbosssx-src.zip"/>
+ <classpathentry kind="con"
path="org.eclipse.jdt.USER_LIBRARY/jboss-5.0.x"/>
<classpathentry kind="output" path="output-eclipse"/>
</classpath>
Modified: trunk/jbossws-tests/ant-import/build-jars-jaxrpc.xml
===================================================================
--- trunk/jbossws-tests/ant-import/build-jars-jaxrpc.xml 2007-01-16 15:32:38 UTC (rev
1987)
+++ trunk/jbossws-tests/ant-import/build-jars-jaxrpc.xml 2007-01-17 14:46:03 UTC (rev
1988)
@@ -2254,6 +2254,9 @@
<include name="jaxrpc-mapping.xml"/>
</metainf>
</jar>
+
+ <!-- Please add alphabetically -->
+
</target>
</project>
Modified: trunk/jbossws-tests/ant-import/build-jars-jaxws.xml
===================================================================
--- trunk/jbossws-tests/ant-import/build-jars-jaxws.xml 2007-01-16 15:32:38 UTC (rev
1987)
+++ trunk/jbossws-tests/ant-import/build-jars-jaxws.xml 2007-01-17 14:46:03 UTC (rev
1988)
@@ -176,6 +176,17 @@
</classes>
</war>
+ <!-- jaxws-jbws1357 -->
+ <war warfile="${tests.output.dir}/libs/jaxws-jbws1357.war"
webxml="${tests.output.dir}/resources/jaxws/jbws1357/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/classes">
+ <include
name="org/jboss/test/ws/jaxws/jbws1357/JBWS1357.class"/>
+ <include
name="org/jboss/test/ws/jaxws/jbws1357/JBWS1357Impl.class"/>
+ </classes>
+ <fileset dir="${tests.output.dir}/resources/jaxws/jbws1357">
+ <include name="hello.jsp"/>
+ </fileset>
+ </war>
+
<!-- jaxws-jsr181-complex -->
<war warfile="${tests.output.dir}/libs/jaxws-jsr181-complex.war"
webxml="${tests.output.dir}/resources/jaxws/jsr181/complex/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/classes">
@@ -518,16 +529,13 @@
<war warfile="${tests.output.dir}/libs/jaxws-webserviceref.war"
webxml="${tests.output.dir}/resources/jaxws/webserviceref/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/classes">
<include
name="org/jboss/test/ws/jaxws/webserviceref/TestEndpointImpl.class"/>
- <include
name="org/jboss/test/ws/jaxws/webserviceref/TestEndpoint.class"/>
</classes>
</war>
<jar
destfile="${tests.output.dir}/libs/jaxws-webserviceref-client.jar">
<fileset dir="${tests.output.dir}/classes">
- <include
name="org/jboss/test/ws/jaxws/webserviceref/ApplicationClient.class"/>
+ <include
name="org/jboss/test/ws/jaxws/webserviceref/TestEndpointClient.class"/>
<include
name="org/jboss/test/ws/jaxws/webserviceref/TestEndpointService.class"/>
<include
name="org/jboss/test/ws/jaxws/webserviceref/TestEndpoint.class"/>
- <include
name="org/jboss/test/ws/jaxws/webserviceref/EchoResponse.class"/>
- <include
name="org/jboss/test/ws/jaxws/webserviceref/Echo.class"/>
</fileset>
<metainf
dir="${tests.output.dir}/resources/jaxws/webserviceref/META-INF">
<include name="application-client.xml"/>
@@ -535,7 +543,7 @@
<include name="wsdl/**"/>
</metainf>
<manifest>
- <attribute name="main-class"
value="org.jboss.test.ws.jaxws.webserviceref.ApplicationClient"/>
+ <attribute name="main-class"
value="org.jboss.test.ws.jaxws.webserviceref.TestEndpointClient"/>
</manifest>
</jar>
<war
destfile="${tests.output.dir}/libs/jaxws-webserviceref-servlet-client.war"
webxml="${tests.output.dir}/resources/jaxws/webserviceref/servlet-client/WEB-INF/web.xml">
@@ -565,6 +573,25 @@
<include name="wsdl/**"/>
</metainf>
</jar>
+ <jar
destfile="${tests.output.dir}/libs/jaxws-webserviceref-secure.jar">
+ <fileset dir="${tests.output.dir}/classes">
+ <include
name="org/jboss/test/ws/jaxws/webserviceref/SecureEndpointImpl.class"/>
+ </fileset>
+ </jar>
+ <jar
destfile="${tests.output.dir}/libs/jaxws-webserviceref-secure-client.jar">
+ <fileset dir="${tests.output.dir}/classes">
+ <include
name="org/jboss/test/ws/jaxws/webserviceref/SecureEndpointClient.class"/>
+ <include
name="org/jboss/test/ws/jaxws/webserviceref/SecureEndpointService.class"/>
+ <include
name="org/jboss/test/ws/jaxws/webserviceref/SecureEndpoint.class"/>
+ </fileset>
+ <metainf
dir="${tests.output.dir}/resources/jaxws/webserviceref/META-INF-secure">
+ <include name="application-client.xml"/>
+ <include name="jboss-client.xml"/>
+ </metainf>
+ <manifest>
+ <attribute name="main-class"
value="org.jboss.test.ws.jaxws.webserviceref.SecureEndpointClient"/>
+ </manifest>
+ </jar>
<!-- jaxws-wrapped-accessor -->
<war warfile="${tests.output.dir}/libs/jaxws-wrapped-accessor.war"
webxml="${tests.output.dir}/resources/jaxws/wrapped/accessor/WEB-INF/web.xml">
@@ -668,16 +695,8 @@
</classes>
</war>
- <!-- jaxws-jbws1357 -->
- <war warfile="${tests.output.dir}/libs/jaxws-jbws1357.war"
webxml="${tests.output.dir}/resources/jaxws/jbws1357/WEB-INF/web.xml">
- <classes dir="${tests.output.dir}/classes">
- <include
name="org/jboss/test/ws/jaxws/jbws1357/JBWS1357.class"/>
- <include
name="org/jboss/test/ws/jaxws/jbws1357/JBWS1357Impl.class"/>
- </classes>
- <fileset dir="${tests.output.dir}/resources/jaxws/jbws1357">
- <include name="hello.jsp"/>
- </fileset>
- </war>
+ <!-- Please add alphabetically -->
+
</target>
</project>
Modified: trunk/jbossws-tests/build.xml
===================================================================
--- trunk/jbossws-tests/build.xml 2007-01-16 15:32:38 UTC (rev 1987)
+++ trunk/jbossws-tests/build.xml 2007-01-17 14:46:03 UTC (rev 1988)
@@ -42,15 +42,18 @@
</not>
</condition>
+ <!-- Available integration target -->
+ <property name="${jbossws.integration.target}.available"
value="true"/>
+
<!-- Define jboss.home -->
<condition property="jboss.home" value="${jboss50.home}">
- <equals arg1="${jbossws.integration.target}"
arg2="jboss50"/>
+ <isset property="jboss50.available"/>
</condition>
<condition property="jboss.home" value="${jboss42.home}">
- <equals arg1="${jbossws.integration.target}"
arg2="jboss42"/>
+ <isset property="jboss42.available"/>
</condition>
<condition property="jboss.home" value="${jboss40.home}">
- <equals arg1="${jbossws.integration.target}"
arg2="jboss40"/>
+ <isset property="jboss40.available"/>
</condition>
<!-- Integration Target Server -->
@@ -150,7 +153,7 @@
<target name="init"
depends="prepare,thirdparty,init-jboss50-classpath">
</target>
- <target name="init-jboss50-classpath" depends="prepare">
+ <target name="init-jboss50-classpath" depends="prepare"
if="jboss50.available">
<!-- The combined compile classpath -->
<path id="javac.classpath">
@@ -168,21 +171,22 @@
<pathelement location="${thirdparty.dir}/servlet-api.jar"/>
<pathelement location="${thirdparty.dir}/stax-api.jar"/>
<pathelement location="${thirdparty.dir}/xmlunit1.0.jar"/>
+ <pathelement location="${jboss.client}/jboss-ejb3-client.jar"/>
</path>
<!-- The test client classpath -->
<path id="test.client.classpath">
- <pathelement location="${jboss.client}/jbossall-client.jar"/>
+ <pathelement location="${jboss.client}/commons-logging.jar"/>
<pathelement location="${jboss.client}/jboss-ejb3-client.jar"/>
<pathelement
location="${jboss.client}/jboss-aop-jdk50-client.jar"/>
<pathelement
location="${jboss.client}/jboss-aspect-jdk50-client.jar"/>
+ <pathelement location="${jboss.client}/log4j.jar"/>
+ <pathelement location="${jboss.client}/jbossall-client.jar"/>
+ <pathelement location="${jboss.lib}/jboss-vfs.jar"/>
+ <pathelement location="${jboss.server.lib}/hibernate3.jar"/>
+ <pathelement location="${jboss.server.lib}/jboss.jar"/>
<pathelement location="${jboss.server.lib}/jbosssx.jar"/>
- <pathelement location="${jboss.lib}/jboss-vfs.jar"/>
<pathelement
location="${integration.jboss50.dir}/output/lib/jbossws-jboss50-integration.jar"/>
- <pathelement
location="${integration.jboss42.dir}/output/lib/jbossws-jboss42-integration.jar"/>
- <pathelement
location="${integration.tomcat.dir}/output/lib/jbossws-tomcat-integration.jar"/>
- <pathelement location="${thirdparty.dir}/commons-logging.jar"/>
- <pathelement location="${thirdparty.dir}/log4j.jar"/>
<path refid="javac.classpath"/>
</path>
</target>
@@ -387,7 +391,6 @@
<sysproperty key="java.security.policy"
value="${tests.etc.dir}/tst.policy"/>
<sysproperty key="jboss.home" value="${jboss.home}"/>
<sysproperty key="jbosstest.host.name"
value="${node0}"/>
- <sysproperty key="jbosstest.server.host"
value="${node0}"/>
<sysproperty key="jbossws.integration.target"
value="${jbossws.integration.target}"/>
<sysproperty key="tomcat.home" value="${tomcat.home}"/>
<sysproperty key="tomcat.manager.password"
value="${tomcat.manager.password}"/>
@@ -427,7 +430,6 @@
<sysproperty key="java.security.policy"
value="${tests.etc.dir}/tst.policy"/>
<sysproperty key="jboss.home" value="${jboss.home}"/>
<sysproperty key="jbosstest.host.name"
value="${node0}"/>
- <sysproperty key="jbosstest.server.host"
value="${node0}"/>
<sysproperty key="jbossws.integration.target"
value="${jbossws.integration.target}"/>
<sysproperty key="tomcat.home" value="${tomcat.home}"/>
<sysproperty key="tomcat.manager.password"
value="${tomcat.manager.password}"/>
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/JBossWSTest.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/JBossWSTest.java 2007-01-16
15:32:38 UTC (rev 1987)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/JBossWSTest.java 2007-01-17
14:46:03 UTC (rev 1988)
@@ -31,6 +31,7 @@
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.xml.transform.Source;
+import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMResult;
@@ -134,17 +135,12 @@
}
}
- /**
- * Get the JBoss server host from system property "jbosstest.server.host"
- * This defaults to "" + getServerHost() + ""
- */
public String getServerHost()
{
- String hostName = System.getProperty("jbosstest.server.host",
"localhost");
- return hostName;
+ return JBossWSTestHelper.getServerHost();
}
- public Element getElementFromSource(Source retObj) throws Exception
+ public Element getElementFromSource(Source retObj) throws TransformerException
{
DOMResult domResult = new DOMResult();
TransformerFactory tf = TransformerFactory.newInstance();
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/JBossWSTestHelper.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/JBossWSTestHelper.java 2007-01-16
15:32:38 UTC (rev 1987)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/JBossWSTestHelper.java 2007-01-17
14:46:03 UTC (rev 1988)
@@ -98,6 +98,16 @@
return "jboss40".equals(target);
}
+ /**
+ * Get the JBoss server host from system property "jbosstest.host.name"
+ * This defaults to "localhost"
+ */
+ public static String getServerHost()
+ {
+ String hostName = System.getProperty("jbosstest.host.name",
"localhost");
+ return hostName;
+ }
+
public static MBeanServerConnection getServer()
{
if (server == null)
Modified:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1384/JBWS1384TestCase.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1384/JBWS1384TestCase.java 2007-01-16
15:32:38 UTC (rev 1987)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1384/JBWS1384TestCase.java 2007-01-17
14:46:03 UTC (rev 1988)
@@ -34,8 +34,8 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
+import org.jboss.ws.core.StubExt;
import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
-import org.jboss.ws.core.jaxrpc.StubExt;
import org.jboss.ws.tools.WSTools;
/**
Modified:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1410/JBWS1410TestCase.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1410/JBWS1410TestCase.java 2007-01-16
15:32:38 UTC (rev 1987)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1410/JBWS1410TestCase.java 2007-01-17
14:46:03 UTC (rev 1988)
@@ -33,9 +33,9 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
+import org.jboss.ws.core.StubExt;
import org.jboss.ws.core.WSTimeoutException;
import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
-import org.jboss.ws.core.jaxrpc.StubExt;
/**
* NumberFormatException From StubExt.PROPERTY_CLIENT_TIMEOUT
Modified:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/handler/HeaderClientTestCase.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/handler/HeaderClientTestCase.java 2007-01-16
15:32:38 UTC (rev 1987)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/handler/HeaderClientTestCase.java 2007-01-17
14:46:03 UTC (rev 1988)
@@ -36,8 +36,8 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
import org.jboss.ws.Constants;
+import org.jboss.ws.core.StubExt;
import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
-import org.jboss.ws.core.jaxrpc.StubExt;
/**
* Test bound and unbound headers
Modified:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/handler/HeaderProxyTestCase.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/handler/HeaderProxyTestCase.java 2007-01-16
15:32:38 UTC (rev 1987)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/handler/HeaderProxyTestCase.java 2007-01-17
14:46:03 UTC (rev 1988)
@@ -33,9 +33,9 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
import org.jboss.ws.Constants;
+import org.jboss.ws.core.StubExt;
import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
import org.jboss.ws.core.jaxrpc.ServiceImpl;
-import org.jboss.ws.core.jaxrpc.StubExt;
/**
* Test bound and unbound headers
Modified:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/mtom/MTOMTestCase.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/mtom/MTOMTestCase.java 2007-01-16
15:32:38 UTC (rev 1987)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/mtom/MTOMTestCase.java 2007-01-17
14:46:03 UTC (rev 1988)
@@ -38,8 +38,8 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
+import org.jboss.ws.core.StubExt;
import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
-import org.jboss.ws.core.jaxrpc.StubExt;
/**
* Test SOAP with XOP through the JAXRPC dynamic proxy layer.
Modified:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/wseventing/SysmonTestCase.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/wseventing/SysmonTestCase.java 2007-01-16
15:32:38 UTC (rev 1987)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/wseventing/SysmonTestCase.java 2007-01-17
14:46:03 UTC (rev 1988)
@@ -34,6 +34,7 @@
import javax.naming.InitialContext;
import javax.xml.namespace.QName;
import javax.xml.rpc.Service;
+import javax.xml.rpc.Stub;
import javax.xml.rpc.handler.HandlerInfo;
import javax.xml.rpc.handler.HandlerRegistry;
import javax.xml.ws.addressing.AddressingProperties;
@@ -44,7 +45,6 @@
import org.jboss.test.ws.JBossWSTestSetup;
import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
import org.jboss.ws.core.jaxrpc.ServiceImpl;
-import org.jboss.ws.core.jaxrpc.StubExt;
import org.jboss.ws.extensions.addressing.AddressingClientUtil;
import org.jboss.ws.extensions.addressing.jaxrpc.WSAddressingClientHandler;
import org.jboss.ws.extensions.eventing.EventSourceEndpoint;
@@ -143,13 +143,13 @@
// addressing correlation
AddressingProperties unsubscribeProps =
SysmonUtil.buildFollowupProperties(subscribeResponse,
EventingConstants.UNSUBSCRIBE_ACTION, eventSourceURI);
- SysmonUtil.setRequestProperties((StubExt)managementPort, unsubscribeProps);
+ SysmonUtil.setRequestProperties((Stub)managementPort, unsubscribeProps);
managementPort.unsubscribe(new UnsubscribeRequest(subscriptionID));
try
{
AddressingProperties getStatusProps =
SysmonUtil.buildFollowupProperties(subscribeResponse, EventingConstants.GET_STATUS_ACTION,
eventSourceURI);
- SysmonUtil.setRequestProperties((StubExt)managementPort, getStatusProps);
+ SysmonUtil.setRequestProperties((Stub)managementPort, getStatusProps);
managementPort.getStatus(new StatusRequest());
@@ -165,7 +165,7 @@
{
AddressingProperties reqProps =
AddressingClientUtil.createDefaultProps(EventingConstants.SUBSCRIBE_ACTION,
eventSourceURI);
reqProps.setMessageID(AddressingClientUtil.createMessageID());
- SysmonUtil.setRequestProperties((StubExt)subscriptionPort, reqProps);
+ SysmonUtil.setRequestProperties((Stub)subscriptionPort, reqProps);
// build subscription payload
SubscribeRequest request = new SubscribeRequest();
@@ -194,7 +194,7 @@
SubscribeResponse subscriptionTicket = subscriptionPort.subscribe(request);
// check message constraints
- AddressingProperties resProps =
SysmonUtil.getResponseProperties((StubExt)subscriptionPort);
+ AddressingProperties resProps =
SysmonUtil.getResponseProperties((Stub)subscriptionPort);
assertEquals(reqProps.getMessageID().getURI(),
resProps.getRelatesTo()[0].getID());
return subscriptionTicket;
Modified:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/wssecurity/SimpleEncryptTestCase.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/wssecurity/SimpleEncryptTestCase.java 2007-01-16
15:32:38 UTC (rev 1987)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/wssecurity/SimpleEncryptTestCase.java 2007-01-17
14:46:03 UTC (rev 1988)
@@ -33,9 +33,9 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
+import org.jboss.ws.core.StubExt;
import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
import org.jboss.ws.core.jaxrpc.ServiceImpl;
-import org.jboss.ws.core.jaxrpc.StubExt;
/**
* Test WS-Security with RPC/Literal
@@ -86,10 +86,9 @@
ServiceImpl service = (ServiceImpl)factory.createService(wsdlURL, serviceName,
mappingURL, securityURL);
Hello port = (Hello)service.getPort(Hello.class);
- StubExt stub = (StubExt)port;
- stub._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, "http://" +
getServerHost() + ":8080/jaxrpc-samples-wssecurity-encrypt");
- stub.setConfigName("Standard WSSecurity Client");
+ ((Stub)port)._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, "http://" +
getServerHost() + ":8080/jaxrpc-samples-wssecurity-encrypt");
+ ((StubExt)port).setConfigName("Standard WSSecurity Client");
return port;
}
Modified:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/wssecurity/SimpleSignTestCase.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/wssecurity/SimpleSignTestCase.java 2007-01-16
15:32:38 UTC (rev 1987)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/wssecurity/SimpleSignTestCase.java 2007-01-17
14:46:03 UTC (rev 1988)
@@ -23,24 +23,19 @@
import java.io.File;
import java.net.URL;
-import java.util.HashMap;
-import java.util.List;
import javax.naming.InitialContext;
import javax.xml.namespace.QName;
import javax.xml.rpc.Service;
import javax.xml.rpc.Stub;
-import javax.xml.rpc.handler.HandlerInfo;
-import javax.xml.rpc.handler.HandlerRegistry;
import junit.framework.Test;
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
+import org.jboss.ws.core.StubExt;
import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
import org.jboss.ws.core.jaxrpc.ServiceImpl;
-import org.jboss.ws.core.jaxrpc.StubExt;
-import org.jboss.ws.extensions.security.jaxrpc.WSSecurityHandlerOutbound;
/**
* Test WS-Security with RPC/Literal
@@ -88,15 +83,12 @@
URL securityURL = new
File("resources/jaxrpc/samples/wssecurity/simple-sign/META-INF/jboss-wsse-client.xml").toURL();
QName serviceName = new
QName("http://org.jboss.ws/samples/wssecurity", "HelloService");
- QName portName = new QName("http://org.jboss.ws/samples/wssecurity",
"HelloPort");
-
ServiceImpl service = (ServiceImpl)factory.createService(wsdlURL, serviceName,
mappingURL, securityURL);
Hello port = (Hello)service.getPort(Hello.class);
- StubExt stub = (StubExt)port;
- stub._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, "http://" +
getServerHost() + ":8080/jaxrpc-samples-wssecurity-sign");
- stub.setConfigName("Standard WSSecurity Client");
+ ((Stub)port)._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, "http://" +
getServerHost() + ":8080/jaxrpc-samples-wssecurity-sign");
+ ((StubExt)port).setConfigName("Standard WSSecurity Client");
return port;
}
Modified:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/wseventing/DIIClientTestCase.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/wseventing/DIIClientTestCase.java 2007-01-16
15:32:38 UTC (rev 1987)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/wseventing/DIIClientTestCase.java 2007-01-17
14:46:03 UTC (rev 1988)
@@ -34,6 +34,7 @@
import javax.xml.namespace.QName;
import javax.xml.rpc.Service;
import javax.xml.rpc.ServiceFactory;
+import javax.xml.rpc.Stub;
import javax.xml.rpc.handler.HandlerInfo;
import javax.xml.rpc.handler.HandlerRegistry;
import javax.xml.ws.addressing.AddressingBuilder;
@@ -45,7 +46,6 @@
import org.jboss.test.ws.JBossWSTestSetup;
import org.jboss.ws.core.jaxrpc.ServiceExt;
import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
-import org.jboss.ws.core.jaxrpc.StubExt;
import org.jboss.ws.extensions.addressing.AddressingClientUtil;
import org.jboss.ws.extensions.addressing.jaxrpc.WSAddressingClientHandler;
import org.jboss.ws.extensions.eventing.EventSourceEndpoint;
@@ -100,7 +100,7 @@
// append message correlation headers
AddressingProperties requestProps =
AddressingClientUtil.createDefaultProps(EventingConstants.SUBSCRIBE_ACTION,
eventSourceURI.toString());
requestProps.setMessageID(AddressingClientUtil.createMessageID());
- EventingSupport.setRequestProperties((StubExt)subscribePort, requestProps);
+ EventingSupport.setRequestProperties((Stub)subscribePort, requestProps);
SubscribeRequest request = new SubscribeRequest();
DeliveryType delivery = getDefaultDelivery();
@@ -116,7 +116,7 @@
requestProps = EventingSupport.buildFollowupProperties(response,
EventingConstants.UNSUBSCRIBE_ACTION, eventSourceURI.toString());
requestProps.setTo(addrBuilder.newURI(eventSourceURI));
- EventingSupport.setRequestProperties((StubExt)managerPort, requestProps);
+ EventingSupport.setRequestProperties((Stub)managerPort, requestProps);
UnsubscribeRequest unsubscribeRequest = new UnsubscribeRequest();
managerPort.unsubscribe(unsubscribeRequest);
Modified:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/wseventing/EventingSupport.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/wseventing/EventingSupport.java 2007-01-16
15:32:38 UTC (rev 1987)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/wseventing/EventingSupport.java 2007-01-17
14:46:03 UTC (rev 1988)
@@ -35,7 +35,6 @@
import javax.xml.ws.addressing.JAXWSAConstants;
import org.jboss.test.ws.JBossWSTest;
-import org.jboss.ws.core.jaxrpc.StubExt;
import org.jboss.ws.extensions.addressing.AddressingClientUtil;
import org.jboss.ws.extensions.eventing.EventSourceEndpoint;
import org.jboss.ws.extensions.eventing.EventingConstants;
@@ -124,7 +123,7 @@
EventingConstants.SUBSCRIBE_ACTION, eventSourceURI.toString()
);
requestProps.setMessageID(AddressingClientUtil.createMessageID());
- setRequestProperties((StubExt)eventSourcePort, requestProps);
+ setRequestProperties((Stub)eventSourcePort, requestProps);
// subscription
SubscribeRequest request = new SubscribeRequest();
@@ -135,7 +134,7 @@
SubscribeResponse subscribeResponse = eventSourcePort.subscribe(request);
assertNotNull(subscribeResponse);
- AddressingProperties responseProps =
getResponseProperties((StubExt)eventSourcePort);
+ AddressingProperties responseProps =
getResponseProperties((Stub)eventSourcePort);
assertEquals(responseProps.getAction().getURI().toString(),
EventingConstants.SUBSCRIBE_RESPONSE_ACTION);
return subscribeResponse;
Modified:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/wseventing/EventingTestCase.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/wseventing/EventingTestCase.java 2007-01-16
15:32:38 UTC (rev 1987)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/wseventing/EventingTestCase.java 2007-01-17
14:46:03 UTC (rev 1988)
@@ -1,24 +1,24 @@
/*
- * 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.
- */
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
package org.jboss.test.ws.jaxrpc.wseventing;
// $Id$
@@ -27,12 +27,12 @@
import java.rmi.RemoteException;
import java.util.Date;
+import javax.xml.rpc.Stub;
import javax.xml.ws.addressing.AddressingProperties;
import junit.framework.Test;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.core.jaxrpc.StubExt;
import org.jboss.ws.extensions.addressing.AddressingClientUtil;
import org.jboss.ws.extensions.eventing.EventingConstants;
import org.jboss.ws.extensions.eventing.element.DeliveryType;
@@ -50,7 +50,8 @@
* @author heiko(a)openj.net
* @since 29-Apr-2005
*/
-public class EventingTestCase extends EventingSupport {
+public class EventingTestCase extends EventingSupport
+{
public static Test suite()
{
@@ -70,11 +71,9 @@
// that an invalid expiration time was requested.
//
- AddressingProperties requestProps = AddressingClientUtil.createDefaultProps(
- EventingConstants.SUBSCRIBE_ACTION, eventSourceURI.toString()
- );
+ AddressingProperties requestProps =
AddressingClientUtil.createDefaultProps(EventingConstants.SUBSCRIBE_ACTION,
eventSourceURI.toString());
requestProps.setMessageID(AddressingClientUtil.createMessageID());
- setRequestProperties((StubExt)eventSourcePort, requestProps);
+ setRequestProperties((Stub)eventSourcePort, requestProps);
SubscribeRequest request = new SubscribeRequest();
DeliveryType delivery = getDefaultDelivery();
@@ -86,13 +85,14 @@
try
{
SubscribeResponse subscribeResponse = eventSourcePort.subscribe(request);
- fail("Subscription should fail due to invalid lease time");
+ fail("Subscription should fail due to invalid lease time");
}
catch (RemoteException e)
{
// ignore expected exception
}
- catch(Throwable t) {
+ catch (Throwable t)
+ {
fail(t.getMessage()); // can be thrown by AddrConstraintsHandler
}
}
@@ -107,11 +107,9 @@
// wse:UnsupportedExpirationType fault indicating that an unsupported expiration
type was requested.
//
- AddressingProperties requestProps = AddressingClientUtil.createDefaultProps(
- EventingConstants.SUBSCRIBE_ACTION, eventSourceURI.toString()
- );
+ AddressingProperties requestProps =
AddressingClientUtil.createDefaultProps(EventingConstants.SUBSCRIBE_ACTION,
eventSourceURI.toString());
requestProps.setMessageID(AddressingClientUtil.createMessageID());
- setRequestProperties((StubExt)eventSourcePort, requestProps);
+ setRequestProperties((Stub)eventSourcePort, requestProps);
SubscribeRequest request = new SubscribeRequest();
DeliveryType delivery = getDefaultDelivery();
@@ -129,12 +127,14 @@
{
// ignore expected exception
}
- catch(Throwable t) {
+ catch (Throwable t)
+ {
fail(t.getMessage()); // can be thrown by AddrConstraintsHandler
}
}
- public void testRenewal() throws Exception {
+ public void testRenewal() throws Exception
+ {
assertWSDLAccess();
//
@@ -143,16 +143,15 @@
//
SubscribeResponse response = doSubscribe();
- AddressingProperties requestProps =
- buildFollowupProperties(response, EventingConstants.RENEW_ACTION,
eventSourceURI.toString());
- setRequestProperties((StubExt)managerPort, requestProps);
+ AddressingProperties requestProps = buildFollowupProperties(response,
EventingConstants.RENEW_ACTION, eventSourceURI.toString());
+ setRequestProperties((Stub)managerPort, requestProps);
Date oldLeaseTime = response.getExpires();
RenewRequest renewRequest = new RenewRequest();
RenewResponse renewResponse = managerPort.renew(renewRequest);
assertNotNull(renewResponse);
assertNotNull(renewResponse.getExpires());
- AddressingProperties responseProps = getResponseProperties((StubExt)managerPort);
+ AddressingProperties responseProps = getResponseProperties((Stub)managerPort);
assertEquals(responseProps.getAction().getURI().toString(),
EventingConstants.RENEW_RESPONSE_ACTION);
assertTrue("Lease time not increased", oldLeaseTime.getTime() <
renewResponse.getExpires().getTime());
}
@@ -165,16 +164,15 @@
//
SubscribeResponse response = doSubscribe();
- AddressingProperties requestProps =
- buildFollowupProperties(response, EventingConstants.GET_STATUS_ACTION,
eventSourceURI.toString());
- setRequestProperties((StubExt)managerPort, requestProps);
+ AddressingProperties requestProps = buildFollowupProperties(response,
EventingConstants.GET_STATUS_ACTION, eventSourceURI.toString());
+ setRequestProperties((Stub)managerPort, requestProps);
Date expectedLeaseTime = response.getExpires();
StatusRequest statusRequest = new StatusRequest();
StatusResponse statusResponse = managerPort.getStatus(statusRequest);
assertNotNull(statusResponse);
assertNotNull(statusResponse.getExpires());
- AddressingProperties responseProps = getResponseProperties((StubExt)managerPort);
+ AddressingProperties responseProps = getResponseProperties((Stub)managerPort);
assertEquals(responseProps.getAction().getURI().toString(),
EventingConstants.GET_STATUS_RESPONSE_ACTION);
assertEquals("Incorrect lease time", expectedLeaseTime,
statusResponse.getExpires());
}
@@ -189,25 +187,23 @@
SubscribeResponse response = doSubscribe();
URI identifier = subscriptionIdFromResponse(response);
- AddressingProperties requestProps =
- buildFollowupProperties(response, EventingConstants.UNSUBSCRIBE_ACTION,
eventSourceURI.toString());
- setRequestProperties((StubExt)managerPort, requestProps);
+ AddressingProperties requestProps = buildFollowupProperties(response,
EventingConstants.UNSUBSCRIBE_ACTION, eventSourceURI.toString());
+ setRequestProperties((Stub)managerPort, requestProps);
UnsubscribeRequest unsubscribeRequest = new UnsubscribeRequest();
managerPort.unsubscribe(unsubscribeRequest);
- AddressingProperties responseProps = getResponseProperties((StubExt)managerPort);
+ AddressingProperties responseProps = getResponseProperties((Stub)managerPort);
assertEquals(responseProps.getAction().getURI().toString(),
EventingConstants.UNSUBSCRIBE_RESPONSE_ACTION);
try
{
- AddressingProperties renewProps =
- buildFollowupProperties(response, EventingConstants.RENEW_ACTION,
eventSourceURI.toString());
- setRequestProperties((StubExt)managerPort, requestProps);
+ AddressingProperties renewProps = buildFollowupProperties(response,
EventingConstants.RENEW_ACTION, eventSourceURI.toString());
+ setRequestProperties((Stub)managerPort, requestProps);
RenewRequest renewRequest = new RenewRequest();
- managerPort.renew(renewRequest); // this should fail
+ managerPort.renew(renewRequest); // this should fail
fail("Subscription not removed");
}
Modified:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/xop/doclit/XOPBase.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/xop/doclit/XOPBase.java 2007-01-16
15:32:38 UTC (rev 1987)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/xop/doclit/XOPBase.java 2007-01-17
14:46:03 UTC (rev 1988)
@@ -24,7 +24,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.jaxrpc.xop.XOPTestSupport;
import org.jboss.test.ws.jaxrpc.xop.shared.*;
-import org.jboss.ws.core.jaxrpc.StubExt;
+import org.jboss.ws.core.StubExt;
import org.jboss.ws.core.utils.IOUtils;
import javax.activation.DataHandler;
Modified:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/xop/rpclit/XOPBase.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/xop/rpclit/XOPBase.java 2007-01-16
15:32:38 UTC (rev 1987)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/xop/rpclit/XOPBase.java 2007-01-17
14:46:03 UTC (rev 1988)
@@ -24,7 +24,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.jaxrpc.xop.XOPTestSupport;
import org.jboss.test.ws.jaxrpc.xop.shared.*;
-import org.jboss.ws.core.jaxrpc.StubExt;
+import org.jboss.ws.core.StubExt;
import org.jboss.ws.core.utils.IOUtils;
import javax.activation.DataHandler;
Modified:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/xop/shared/MTOMServiceBase.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/xop/shared/MTOMServiceBase.java 2007-01-16
15:32:38 UTC (rev 1987)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/xop/shared/MTOMServiceBase.java 2007-01-17
14:46:03 UTC (rev 1988)
@@ -22,7 +22,7 @@
package org.jboss.test.ws.jaxrpc.xop.shared;
import org.jboss.ws.core.CommonMessageContext;
-import org.jboss.ws.core.jaxrpc.StubExt;
+import org.jboss.ws.core.StubExt;
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.extensions.xop.XOPContext;
Deleted:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/ApplicationClient.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/ApplicationClient.java 2007-01-16
15:32:38 UTC (rev 1987)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/ApplicationClient.java 2007-01-17
14:46:03 UTC (rev 1988)
@@ -1,121 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.test.ws.jaxws.webserviceref;
-
-import java.util.ArrayList;
-
-import javax.naming.InitialContext;
-import javax.xml.ws.WebServiceException;
-import javax.xml.ws.WebServiceRef;
-import javax.xml.ws.WebServiceRefs;
-
-import org.jboss.logging.Logger;
-
-//Test on type with wsdlLocation
-@WebServiceRef(name = "service1", value = TestEndpointService.class,
wsdlLocation = "META-INF/wsdl/TestEndpoint.wsdl")
-
-// Test multiple on type
-@WebServiceRefs( {
- @WebServiceRef(name = "service2", value = TestEndpointService.class),
- @WebServiceRef(name = "port1", value = TestEndpointService.class, type =
TestEndpoint.class) })
-public class ApplicationClient
-{
- // Provide logging
- private static Logger log = Logger.getLogger(ApplicationClient.class);
-
- // Test on field with name
- @WebServiceRef(name = "TestEndpointService3")
- public static TestEndpointService service3;
-
- // Test on field without name
- @WebServiceRef
- public static TestEndpointService service4;
-
- // Test on method with value
- @WebServiceRef(name = "TestEndpointService5")
- public static void setServiceSetter5(TestEndpointService service)
- {
- ApplicationClient.service5 = service;
- }
- private static TestEndpointService service5;
-
- // Test on method without name
- @WebServiceRef
- public static void setServiceSetter6(TestEndpointService service)
- {
- ApplicationClient.service6 = service;
- }
- private static TestEndpointService service6;
-
- // Test on field with name and value
- @WebServiceRef(name = "Port2", value = TestEndpointService.class)
- public static TestEndpoint port2;
-
- // Test on field with value
- @WebServiceRef(value = TestEndpointService.class)
- public static TestEndpoint port3;
-
- public static InitialContext iniCtx;
- public static String retStr;
-
- public static void main(String[] args)
- {
- String inStr = args[0];
- log.info("echo: " + inStr);
-
- ArrayList<TestEndpoint> ports = new ArrayList<TestEndpoint>();
- try
- {
- System.out.println("FIXME: EJBTHREE-760");
-
//ports.add(((TestEndpointService)iniCtx.lookup("java:comp/env/service1")).getTestEndpointPort());
-
//ports.add(((TestEndpointService)iniCtx.lookup("java:comp/env/service2")).getTestEndpointPort());
- ports.add((TestEndpoint)service3.getPort(TestEndpoint.class));
-
//ports.add(((TestEndpointService)iniCtx.lookup("java:comp/env/TestEndpointService3")).getTestEndpointPort());
- ports.add((TestEndpoint)service4.getPort(TestEndpoint.class));
- //ports.add(((TestEndpointService)iniCtx.lookup("java:comp/env/" +
ApplicationClient.class.getName() + "/service4")).getTestEndpointPort());
- ports.add((TestEndpoint)service5.getPort(TestEndpoint.class));
-
//ports.add(((TestEndpointService)iniCtx.lookup("java:comp/env/TestEndpointService5")).getTestEndpointPort());
- ports.add((TestEndpoint)service6.getPort(TestEndpoint.class));
- //ports.add(((TestEndpointService)iniCtx.lookup("java:comp/env/" +
ApplicationClient.class.getName() + "/serviceSetter6")).getTestEndpointPort());
- //ports.add((TestEndpoint)iniCtx.lookup("java:comp/env/port1"));
- ports.add(port2);
- //ports.add((TestEndpoint)iniCtx.lookup("java:comp/env/Port2"));
- ports.add(port3);
- //ports.add((TestEndpoint)iniCtx.lookup("java:comp/env/" +
ApplicationClient.class.getName() + "/port3"));
- }
- catch (Exception ex)
- {
- log.error("Cannot add port", ex);
- throw new WebServiceException(ex);
- }
-
- for (TestEndpoint port : ports)
- {
- String outStr = port.echo(inStr);
- if (inStr.equals(outStr) == false)
- throw new WebServiceException("Invalid echo return: " + inStr);
- }
-
- retStr = inStr;
- }
-
-}
Deleted:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/Echo.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/Echo.java 2007-01-16
15:32:38 UTC (rev 1987)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/Echo.java 2007-01-17
14:46:03 UTC (rev 1988)
@@ -1,62 +0,0 @@
-
-package org.jboss.test.ws.jaxws.webserviceref;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlType;
-
-
-/**
- * <p>Java class for echo complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within
this class.
- *
- * <pre>
- * <complexType name="echo">
- * <complexContent>
- * <restriction
base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <sequence>
- * <element name="arg0"
type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
- * </sequence>
- * </restriction>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "echo", propOrder = {
- "arg0"
-})
-public class Echo {
-
- @XmlElement(namespace = "http://org.jboss.ws/wsref")
- protected String arg0;
-
- /**
- * Gets the value of the arg0 property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getArg0() {
- return arg0;
- }
-
- /**
- * Sets the value of the arg0 property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setArg0(String value) {
- this.arg0 = value;
- }
-
-}
Deleted:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/EchoResponse.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/EchoResponse.java 2007-01-16
15:32:38 UTC (rev 1987)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/EchoResponse.java 2007-01-17
14:46:03 UTC (rev 1988)
@@ -1,62 +0,0 @@
-
-package org.jboss.test.ws.jaxws.webserviceref;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlType;
-
-
-/**
- * <p>Java class for echoResponse complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within
this class.
- *
- * <pre>
- * <complexType name="echoResponse">
- * <complexContent>
- * <restriction
base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <sequence>
- * <element name="return"
type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
- * </sequence>
- * </restriction>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "echoResponse", propOrder = {
- "_return"
-})
-public class EchoResponse {
-
- @XmlElement(name = "return", namespace =
"http://org.jboss.ws/wsref")
- protected String _return;
-
- /**
- * Gets the value of the return property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getReturn() {
- return _return;
- }
-
- /**
- * Sets the value of the return property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setReturn(String value) {
- this._return = value;
- }
-
-}
Deleted:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/ObjectFactory.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/ObjectFactory.java 2007-01-16
15:32:38 UTC (rev 1987)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/ObjectFactory.java 2007-01-17
14:46:03 UTC (rev 1988)
@@ -1,71 +0,0 @@
-
-package org.jboss.test.ws.jaxws.webserviceref;
-
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.annotation.XmlElementDecl;
-import javax.xml.bind.annotation.XmlRegistry;
-import javax.xml.namespace.QName;
-
-
-/**
- * This object contains factory methods for each
- * Java content interface and Java element interface
- * generated in the org.jboss.test.ws.jaxws.webserviceref package.
- * <p>An ObjectFactory allows you to programatically
- * construct new instances of the Java representation
- * for XML content. The Java representation of XML
- * content can consist of schema derived interfaces
- * and classes representing the binding of schema
- * type definitions, element declarations and model
- * groups. Factory methods for each of these are
- * provided in this class.
- *
- */
-@XmlRegistry
-public class ObjectFactory {
-
- private final static QName _EchoResponse_QNAME = new
QName("http://org.jboss.ws/wsref", "echoResponse");
- private final static QName _Echo_QNAME = new
QName("http://org.jboss.ws/wsref", "echo");
-
- /**
- * Create a new ObjectFactory that can be used to create new instances of schema
derived classes for package: org.jboss.test.ws.jaxws.webserviceref
- *
- */
- public ObjectFactory() {
- }
-
- /**
- * Create an instance of {@link EchoResponse }
- *
- */
- public EchoResponse createEchoResponse() {
- return new EchoResponse();
- }
-
- /**
- * Create an instance of {@link Echo }
- *
- */
- public Echo createEcho() {
- return new Echo();
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link EchoResponse }{@code
>}}
- *
- */
- @XmlElementDecl(namespace = "http://org.jboss.ws/wsref", name =
"echoResponse")
- public JAXBElement<EchoResponse> createEchoResponse(EchoResponse value) {
- return new JAXBElement<EchoResponse>(_EchoResponse_QNAME,
EchoResponse.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link Echo }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "http://org.jboss.ws/wsref", name =
"echo")
- public JAXBElement<Echo> createEcho(Echo value) {
- return new JAXBElement<Echo>(_Echo_QNAME, Echo.class, null, value);
- }
-
-}
Added:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/SecureEndpoint.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/SecureEndpoint.java
(rev 0)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/SecureEndpoint.java 2007-01-17
14:46:03 UTC (rev 1988)
@@ -0,0 +1,35 @@
+
+package org.jboss.test.ws.jaxws.webserviceref;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import javax.jws.soap.SOAPBinding.Style;
+
+
+/**
+ * This class was generated by the JAXWS SI.
+ * JAX-WS RI 2.0-b26-ea3
+ * Generated source version: 2.0
+ *
+ */
+@WebService(name = "SecureEndpoint", targetNamespace =
"http://org.jboss.ws/wsref", wsdlLocation =
"http://localhost.localdomain:8080/jaxws-webserviceref-secure/SecureEndpoint?wsdl")
+@SOAPBinding(style = Style.RPC)
+public interface SecureEndpoint {
+
+
+ /**
+ *
+ * @param arg0
+ * @return
+ * returns java.lang.String
+ */
+ @WebMethod
+ @WebResult(targetNamespace = "http://org.jboss.ws/wsref", partName =
"return")
+ public String echo(
+ @WebParam(name = "arg0", partName = "arg0")
+ String arg0);
+
+}
Property changes on:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/SecureEndpoint.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/SecureEndpointClient.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/SecureEndpointClient.java
(rev 0)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/SecureEndpointClient.java 2007-01-17
14:46:03 UTC (rev 1988)
@@ -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.test.ws.jaxws.webserviceref;
+
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebServiceRef;
+
+import org.jboss.logging.Logger;
+
+public class SecureEndpointClient
+{
+ // Provide logging
+ private static Logger log = Logger.getLogger(SecureEndpointClient.class);
+
+ @WebServiceRef(name = "SecureService1")
+ public static SecureEndpointService secureService1;
+
+ @WebServiceRef(name = "SecureService2")
+ public static Service secureService2;
+
+ @WebServiceRef(name = "SecurePort1")
+ public static SecureEndpoint securePort1;
+
+ public static String retStr;
+
+ public static void main(String[] args)
+ {
+ String reqMsg = args[0];
+ log.info("echo: " + reqMsg);
+
+ String username = null;
+ if (args.length > 1)
+ username = args[1];
+
+ String password = null;
+ if (args.length > 2)
+ password = args[2];
+
+ SecureEndpoint port = secureService1.getSecureEndpointPort();
+ String retMsg = invokeEndpoint(port, reqMsg, username, password);
+
+ port = secureService2.getPort(SecureEndpoint.class);
+ retMsg += "|" + invokeEndpoint(port, reqMsg, username, password);
+
+ port = securePort1;
+ retMsg += "|" + invokeEndpoint(port, reqMsg, username, password);
+
+ retStr = retMsg;
+ }
+
+ private static String invokeEndpoint(SecureEndpoint port, String inStr, String
username, String password)
+ {
+ if (username != null && password != null)
+ {
+ BindingProvider bindingProvider = (BindingProvider)port;
+ bindingProvider.getRequestContext().put(BindingProvider.USERNAME_PROPERTY,
username);
+ bindingProvider.getRequestContext().put(BindingProvider.PASSWORD_PROPERTY,
password);
+ }
+
+ return port.echo(inStr);
+ }
+}
Property changes on:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/SecureEndpointClient.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/SecureEndpointImpl.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/SecureEndpointImpl.java
(rev 0)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/SecureEndpointImpl.java 2007-01-17
14:46:03 UTC (rev 1988)
@@ -0,0 +1,53 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.webserviceref;
+
+import javax.annotation.security.RolesAllowed;
+import javax.ejb.Stateless;
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import javax.jws.soap.SOAPBinding.Style;
+
+import org.jboss.annotation.security.SecurityDomain;
+import org.jboss.logging.Logger;
+import org.jboss.ws.annotation.WebContext;
+
+@WebService(name = "SecureEndpoint", targetNamespace =
"http://org.jboss.ws/wsref")
+@Stateless(name = "SecureEndpoint")
+@SOAPBinding(style = Style.RPC)
+@RolesAllowed("friend")
+
+@WebContext(authMethod = "BASIC", transportGuarantee = "NONE",
secureWSDLAccess = false)
+@SecurityDomain("JBossWS")
+public class SecureEndpointImpl
+{
+ // Provide logging
+ private static Logger log = Logger.getLogger(SecureEndpointImpl.class);
+
+ @WebMethod
+ public String echo(String input)
+ {
+ log.info(input);
+ return input;
+ }
+}
Property changes on:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/SecureEndpointImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/SecureEndpointService.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/SecureEndpointService.java
(rev 0)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/SecureEndpointService.java 2007-01-17
14:46:03 UTC (rev 1988)
@@ -0,0 +1,55 @@
+
+package org.jboss.test.ws.jaxws.webserviceref;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebEndpoint;
+import javax.xml.ws.WebServiceClient;
+
+/**
+ * This class was generated by the JAXWS SI.
+ * JAX-WS RI 2.0-b26-ea3
+ * Generated source version: 2.0
+ *
+ */
+@WebServiceClient(name = "SecureEndpointService", targetNamespace =
"http://org.jboss.ws/wsref", wsdlLocation =
"http://localhost.localdomain:8080/jaxws-webserviceref-secure/SecureEndpoint?wsdl")
+public class SecureEndpointService
+ extends Service
+{
+
+ private final static URL WSDL_LOCATION;
+ private final static QName SECUREENDPOINTSERVICE = new
QName("http://org.jboss.ws/wsref", "SecureEndpointService");
+ private final static QName SECUREENDPOINTPORT = new
QName("http://org.jboss.ws/wsref", "SecureEndpointPort");
+
+ static {
+ URL url = null;
+ try {
+ url = new
URL("http://localhost.localdomain:8080/jaxws-webserviceref-secure/SecureEndpoint?wsdl");
+ } catch (MalformedURLException e) {
+ e.printStackTrace();
+ }
+ WSDL_LOCATION = url;
+ }
+
+ public SecureEndpointService(URL wsdlLocation, QName serviceName) {
+ super(wsdlLocation, serviceName);
+ }
+
+ public SecureEndpointService() {
+ super(WSDL_LOCATION, SECUREENDPOINTSERVICE);
+ }
+
+ /**
+ *
+ * @return
+ * returns SecureEndpoint
+ */
+ @WebEndpoint(name = "SecureEndpointPort")
+ public SecureEndpoint getSecureEndpointPort() {
+ return (SecureEndpoint)super.getPort(SECUREENDPOINTPORT, SecureEndpoint.class);
+ }
+
+}
Property changes on:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/SecureEndpointService.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/StubPropertyTestCase.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/StubPropertyTestCase.java
(rev 0)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/StubPropertyTestCase.java 2007-01-17
14:46:03 UTC (rev 1988)
@@ -0,0 +1,84 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.webserviceref;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Service;
+
+import junit.framework.Test;
+
+import org.jboss.ejb3.client.ClientLauncher;
+import org.jboss.test.ws.JBossWSTest;
+import org.jboss.test.ws.JBossWSTestSetup;
+import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
+
+/**
+ * Test the JAXWS annotation: javax.xml.ws.WebServiceRef
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 23-Oct-2005
+ */
+public class StubPropertyTestCase extends JBossWSTest
+{
+ public final String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() +
":8080/jaxws-webserviceref-secure/SecureEndpoint";
+
+ public static Test suite()
+ {
+ return JBossWSTestSetup.newTestSetup(StubPropertyTestCase.class,
"jaxws-webserviceref-secure.jar, jaxws-webserviceref-secure-client.jar");
+ }
+
+ public void testWSDLAccess() throws MalformedURLException
+ {
+ URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
+ WSDLDefinitionsFactory factory = WSDLDefinitionsFactory.newInstance();
+ WSDLDefinitions wsdlDefinitions = factory.parse(wsdlURL);
+ assertNotNull(wsdlDefinitions);
+ }
+
+ public void testDynamicProxy() throws Exception
+ {
+ URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
+ QName qname = new QName("http://org.jboss.ws/wsref",
"SecureEndpointService");
+ Service service = Service.create(wsdlURL, qname);
+ SecureEndpoint port = (SecureEndpoint)service.getPort(SecureEndpoint.class);
+
+ BindingProvider bindingProvider = (BindingProvider)port;
+ bindingProvider.getRequestContext().put(BindingProvider.USERNAME_PROPERTY,
"kermit");
+ bindingProvider.getRequestContext().put(BindingProvider.PASSWORD_PROPERTY,
"thefrog");
+
+ String helloWorld = "Hello World";
+ Object retObj = port.echo(helloWorld);
+ assertEquals(helloWorld, retObj);
+ }
+
+ public void testUnconfiguredStub() throws Throwable
+ {
+ String reqMsg = "Hello World";
+ new ClientLauncher().launch(SecureEndpointClient.class.getName(),
"jbossws-client", new String[]{reqMsg, "kermit",
"thefrog"});
+ assertEquals("Hello World|Hello World|Hello World",
SecureEndpointClient.retStr);
+ }
+}
Property changes on:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/StubPropertyTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/TestEndpoint.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/TestEndpoint.java 2007-01-16
15:32:38 UTC (rev 1987)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/TestEndpoint.java 2007-01-17
14:46:03 UTC (rev 1988)
@@ -5,17 +5,18 @@
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
-import javax.xml.ws.RequestWrapper;
-import javax.xml.ws.ResponseWrapper;
+import javax.jws.soap.SOAPBinding;
+import javax.jws.soap.SOAPBinding.Style;
/**
* This class was generated by the JAXWS SI.
- * JAX-WS RI 2.0_01-b59-fcs
+ * JAX-WS RI 2.0-b26-ea3
* Generated source version: 2.0
*
*/
-@WebService(name = "TestEndpoint", targetNamespace =
"http://org.jboss.ws/wsref")
+@WebService(name = "TestEndpoint", targetNamespace =
"http://org.jboss.ws/wsref", wsdlLocation =
"http://localhost.localdomain:8080/jaxws-webserviceref?wsdl")
+@SOAPBinding(style = Style.RPC)
public interface TestEndpoint {
@@ -26,11 +27,9 @@
* returns java.lang.String
*/
@WebMethod
- @WebResult(targetNamespace = "http://org.jboss.ws/wsref")
- @RequestWrapper(localName = "echo", targetNamespace =
"http://org.jboss.ws/wsref", className =
"org.jboss.test.ws.jaxws.webserviceref.Echo")
- @ResponseWrapper(localName = "echoResponse", targetNamespace =
"http://org.jboss.ws/wsref", className =
"org.jboss.test.ws.jaxws.webserviceref.EchoResponse")
+ @WebResult(targetNamespace = "http://org.jboss.ws/wsref", partName =
"return")
public String echo(
- @WebParam(name = "arg0", targetNamespace =
"http://org.jboss.ws/wsref")
+ @WebParam(name = "arg0", partName = "arg0")
String arg0);
}
Copied:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/TestEndpointClient.java
(from rev 1987,
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/ApplicationClient.java)
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/TestEndpointClient.java
(rev 0)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/TestEndpointClient.java 2007-01-17
14:46:03 UTC (rev 1988)
@@ -0,0 +1,132 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.webserviceref;
+
+import java.util.ArrayList;
+
+import javax.naming.InitialContext;
+import javax.xml.ws.WebServiceException;
+import javax.xml.ws.WebServiceRef;
+import javax.xml.ws.WebServiceRefs;
+
+import org.jboss.logging.Logger;
+
+//Test on type with wsdlLocation
+@WebServiceRef(name = "service1", value = TestEndpointService.class,
wsdlLocation = "META-INF/wsdl/TestEndpoint.wsdl")
+
+// Test multiple on type
+@WebServiceRefs( {
+ @WebServiceRef(name = "service2", value = TestEndpointService.class),
+ @WebServiceRef(name = "port1", value = TestEndpointService.class, type =
TestEndpoint.class) })
+public class TestEndpointClient
+{
+ // Provide logging
+ private static Logger log = Logger.getLogger(TestEndpointClient.class);
+
+ // Test on field with name
+ @WebServiceRef(name = "TestEndpointService3")
+ public static TestEndpointService service3;
+
+ // Test on field without name
+ @WebServiceRef
+ public static TestEndpointService service4;
+
+ // Test on method with value
+ @WebServiceRef(name = "TestEndpointService5")
+ public static void setServiceSetter5(TestEndpointService service)
+ {
+ TestEndpointClient.service5 = service;
+ }
+
+ private static TestEndpointService service5;
+
+ // Test on method without name
+ @WebServiceRef
+ public static void setServiceSetter6(TestEndpointService service)
+ {
+ TestEndpointClient.service6 = service;
+ }
+
+ private static TestEndpointService service6;
+
+ // Test on field with name and value
+ @WebServiceRef(name = "Port2", value = TestEndpointService.class)
+ public static TestEndpoint port2;
+
+ // Test on field with value
+ @WebServiceRef(value = TestEndpointService.class)
+ public static TestEndpoint port3;
+
+ // Test on field
+ @WebServiceRef
+ public static TestEndpoint port4;
+
+ // Test on field with name
+ @WebServiceRef (name = "Port5")
+ public static TestEndpoint port5;
+
+ public static InitialContext iniCtx;
+ public static String retStr;
+
+ public static void main(String[] args)
+ {
+ String inStr = args[0];
+ log.info("echo: " + inStr);
+
+ ArrayList<TestEndpoint> ports = new ArrayList<TestEndpoint>();
+ try
+ {
+ System.out.println("FIXME: [EJBTHREE-760] - @WebServiceRef not bound to
java:comp/env");
+
//ports.add(((TestEndpointService)iniCtx.lookup("java:comp/env/service1")).getTestEndpointPort());
+
//ports.add(((TestEndpointService)iniCtx.lookup("java:comp/env/service2")).getTestEndpointPort());
+ ports.add((TestEndpoint)service3.getPort(TestEndpoint.class));
+
//ports.add(((TestEndpointService)iniCtx.lookup("java:comp/env/TestEndpointService3")).getTestEndpointPort());
+ ports.add((TestEndpoint)service4.getPort(TestEndpoint.class));
+ //ports.add(((TestEndpointService)iniCtx.lookup("java:comp/env/" +
ApplicationClient.class.getName() + "/service4")).getTestEndpointPort());
+ ports.add((TestEndpoint)service5.getPort(TestEndpoint.class));
+
//ports.add(((TestEndpointService)iniCtx.lookup("java:comp/env/TestEndpointService5")).getTestEndpointPort());
+ ports.add((TestEndpoint)service6.getPort(TestEndpoint.class));
+ //ports.add(((TestEndpointService)iniCtx.lookup("java:comp/env/" +
ApplicationClient.class.getName() + "/serviceSetter6")).getTestEndpointPort());
+ //ports.add((TestEndpoint)iniCtx.lookup("java:comp/env/port1"));
+ ports.add(port2);
+ //ports.add((TestEndpoint)iniCtx.lookup("java:comp/env/Port2"));
+ ports.add(port3);
+ //ports.add((TestEndpoint)iniCtx.lookup("java:comp/env/" +
ApplicationClient.class.getName() + "/port3"));
+ ports.add(port4);
+ ports.add(port5);
+ }
+ catch (Exception ex)
+ {
+ log.error("Cannot add port", ex);
+ throw new WebServiceException(ex);
+ }
+
+ for (TestEndpoint port : ports)
+ {
+ String outStr = port.echo(inStr);
+ if (inStr.equals(outStr) == false)
+ throw new WebServiceException("Invalid echo return: " + inStr);
+ }
+
+ retStr = inStr;
+ }
+}
Modified:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/TestEndpointImpl.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/TestEndpointImpl.java 2007-01-16
15:32:38 UTC (rev 1987)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/TestEndpointImpl.java 2007-01-17
14:46:03 UTC (rev 1988)
@@ -1,42 +1,41 @@
/*
- * 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.
- */
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
package org.jboss.test.ws.jaxws.webserviceref;
+import javax.jws.WebMethod;
import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import javax.jws.soap.SOAPBinding.Style;
import org.jboss.logging.Logger;
-/**
- * Test the JAXWS annotation: javax.jws.WebServiceRef
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 23-Oct-2006
- */
-(a)WebService(endpointInterface="org.jboss.test.ws.jaxws.webserviceref.TestEndpoint")
-public class TestEndpointImpl implements TestEndpoint
+@WebService(name = "TestEndpoint", targetNamespace =
"http://org.jboss.ws/wsref")
+@SOAPBinding(style = Style.RPC)
+public class TestEndpointImpl
{
// Provide logging
private static Logger log = Logger.getLogger(TestEndpointImpl.class);
+ @WebMethod
public String echo(String input)
{
log.info(input);
Modified:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/TestEndpointService.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/TestEndpointService.java 2007-01-16
15:32:38 UTC (rev 1987)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/TestEndpointService.java 2007-01-17
14:46:03 UTC (rev 1988)
@@ -3,33 +3,35 @@
import java.net.MalformedURLException;
import java.net.URL;
+
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
import javax.xml.ws.WebEndpoint;
import javax.xml.ws.WebServiceClient;
-
/**
* This class was generated by the JAXWS SI.
- * JAX-WS RI 2.0_01-b59-fcs
+ * JAX-WS RI 2.0-b26-ea3
* Generated source version: 2.0
*
*/
-@WebServiceClient(name = "TestEndpointService", targetNamespace =
"http://org.jboss.ws/wsref", wsdlLocation =
"META-INF/wsdl/TestEndpoint.wsdl")
+@WebServiceClient(name = "TestEndpointService", targetNamespace =
"http://org.jboss.ws/wsref", wsdlLocation =
"http://localhost.localdomain:8080/jaxws-webserviceref?wsdl")
public class TestEndpointService
extends Service
{
- private final static URL TESTENDPOINTSERVICE_WSDL_LOCATION;
+ private final static URL WSDL_LOCATION;
+ private final static QName TESTENDPOINTSERVICE = new
QName("http://org.jboss.ws/wsref", "TestEndpointService");
+ private final static QName TESTENDPOINTPORT = new
QName("http://org.jboss.ws/wsref", "TestEndpointPort");
static {
URL url = null;
try {
- url = new
URL("file:./resources/jaxws/webserviceref/META-INF/wsdl/TestEndpoint.wsdl");
+ url = new
URL("http://localhost.localdomain:8080/jaxws-webserviceref?wsdl");
} catch (MalformedURLException e) {
e.printStackTrace();
}
- TESTENDPOINTSERVICE_WSDL_LOCATION = url;
+ WSDL_LOCATION = url;
}
public TestEndpointService(URL wsdlLocation, QName serviceName) {
@@ -37,7 +39,7 @@
}
public TestEndpointService() {
- super(TESTENDPOINTSERVICE_WSDL_LOCATION, new
QName("http://org.jboss.ws/wsref", "TestEndpointService"));
+ super(WSDL_LOCATION, TESTENDPOINTSERVICE);
}
/**
@@ -47,7 +49,7 @@
*/
@WebEndpoint(name = "TestEndpointPort")
public TestEndpoint getTestEndpointPort() {
- return (TestEndpoint)super.getPort(new
QName("http://org.jboss.ws/wsref", "TestEndpointPort"),
TestEndpoint.class);
+ return (TestEndpoint)super.getPort(TESTENDPOINTPORT, TestEndpoint.class);
}
}
Modified:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefClientTestCase.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefClientTestCase.java 2007-01-16
15:32:38 UTC (rev 1987)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefClientTestCase.java 2007-01-17
14:46:03 UTC (rev 1988)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.webserviceref;
-import java.io.File;
import java.net.MalformedURLException;
import java.net.URL;
@@ -30,6 +29,7 @@
import junit.framework.Test;
+import org.jboss.ejb3.client.ClientLauncher;
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
@@ -60,7 +60,7 @@
public void testDynamicProxy() throws Exception
{
- URL wsdlURL = new
File("resources/jaxws/webserviceref/META-INF/wsdl/TestEndpoint.wsdl").toURL();
+ URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
QName qname = new QName("http://org.jboss.ws/wsref",
"TestEndpointService");
Service service = Service.create(wsdlURL, qname);
TestEndpoint port = (TestEndpoint)service.getPort(TestEndpoint.class);
@@ -70,15 +70,12 @@
assertEquals(helloWorld, retObj);
}
- /* externalize
public void testApplicationClient() throws Throwable
{
String helloWorld = "Hello World!";
- ApplicationClient.iniCtx = getInitialContext();
+ TestEndpointClient.iniCtx = getInitialContext();
- AppClientLauncher apl = new ClientLauncher();
- apl.launch(ApplicationClient.class.getName(), "jbossws-client", new
String[]{helloWorld});
- assertEquals(helloWorld, ApplicationClient.retStr);
+ new ClientLauncher().launch(TestEndpointClient.class.getName(),
"jbossws-client", new String[]{helloWorld});
+ assertEquals(helloWorld, TestEndpointClient.retStr);
}
- */
}
Modified:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefEJB3TestCase.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefEJB3TestCase.java 2007-01-16
15:32:38 UTC (rev 1987)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefEJB3TestCase.java 2007-01-17
14:46:03 UTC (rev 1988)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.webserviceref;
-import java.io.File;
import java.net.MalformedURLException;
import java.net.URL;
@@ -61,7 +60,7 @@
public void testDynamicProxy() throws Exception
{
- URL wsdlURL = new
File("resources/jaxws/webserviceref/META-INF/wsdl/TestEndpoint.wsdl").toURL();
+ URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
QName qname = new QName("http://org.jboss.ws/wsref",
"TestEndpointService");
Service service = Service.create(wsdlURL, qname);
TestEndpoint port = (TestEndpoint)service.getPort(TestEndpoint.class);
Modified:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefServletTestCase.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefServletTestCase.java 2007-01-16
15:32:38 UTC (rev 1987)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefServletTestCase.java 2007-01-17
14:46:03 UTC (rev 1988)
@@ -22,12 +22,10 @@
package org.jboss.test.ws.jaxws.webserviceref;
import java.io.BufferedReader;
-import java.io.File;
import java.io.InputStreamReader;
import java.net.MalformedURLException;
import java.net.URL;
-import javax.naming.InitialContext;
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
@@ -63,7 +61,7 @@
public void testDynamicProxy() throws Exception
{
- URL wsdlURL = new
File("resources/jaxws/webserviceref/META-INF/wsdl/TestEndpoint.wsdl").toURL();
+ URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
QName qname = new QName("http://org.jboss.ws/wsref",
"TestEndpointService");
Service service = Service.create(wsdlURL, qname);
TestEndpoint port = (TestEndpoint)service.getPort(TestEndpoint.class);
Deleted:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/package-info.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/package-info.java 2007-01-16
15:32:38 UTC (rev 1987)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/webserviceref/package-info.java 2007-01-17
14:46:03 UTC (rev 1988)
@@ -1,2 +0,0 @@
-(a)javax.xml.bind.annotation.XmlSchema(namespace = "http://org.jboss.ws/wsref")
-package org.jboss.test.ws.jaxws.webserviceref;
Modified:
trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/META-INF/jboss-client.xml
===================================================================
---
trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/META-INF/jboss-client.xml 2007-01-16
15:32:38 UTC (rev 1987)
+++
trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/META-INF/jboss-client.xml 2007-01-17
14:46:03 UTC (rev 1988)
@@ -33,7 +33,7 @@
@WebServiceRef
-->
<service-ref>
-
<service-ref-name>org.jboss.test.ws.jaxws.webserviceref.ApplicationClient/service4</service-ref-name>
+
<service-ref-name>org.jboss.test.ws.jaxws.webserviceref.TestEndpointClient/service4</service-ref-name>
<wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
</service-ref>
@@ -49,7 +49,7 @@
@WebServiceRef
-->
<service-ref>
-
<service-ref-name>org.jboss.test.ws.jaxws.webserviceref.ApplicationClient/serviceSetter6</service-ref-name>
+
<service-ref-name>org.jboss.test.ws.jaxws.webserviceref.TestEndpointClient/serviceSetter6</service-ref-name>
<wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
</service-ref>
@@ -73,8 +73,24 @@
@WebServiceRef(value = TestEndpointService.class)
-->
<service-ref>
-
<service-ref-name>org.jboss.test.ws.jaxws.webserviceref.ApplicationClient/port3</service-ref-name>
+
<service-ref-name>org.jboss.test.ws.jaxws.webserviceref.TestEndpointClient/port3</service-ref-name>
<wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
</service-ref>
+ <!--
+ @WebServiceRef
+ -->
+ <service-ref>
+
<service-ref-name>org.jboss.test.ws.jaxws.webserviceref.TestEndpointClient/port4</service-ref-name>
+ <wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
+ </service-ref>
+
+ <!--
+ @WebServiceRef(name = "Port5")
+ -->
+ <service-ref>
+ <service-ref-name>Port5</service-ref-name>
+ <wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
+ </service-ref>
+
</jboss-client>
\ No newline at end of file
Modified:
trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/META-INF/wsdl/TestEndpoint.wsdl
===================================================================
---
trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/META-INF/wsdl/TestEndpoint.wsdl 2007-01-16
15:32:38 UTC (rev 1987)
+++
trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/META-INF/wsdl/TestEndpoint.wsdl 2007-01-17
14:46:03 UTC (rev 1988)
@@ -2,49 +2,38 @@
wsimport -d ../../../java -keep -p org.jboss.test.ws.jaxws.webserviceref
META-INF/wsdl/TestEndpoint.wsdl
-->
<definitions name='TestEndpointService'
targetNamespace='http://org.jboss.ws/wsref'
xmlns='http://schemas.xmlsoap.org/wsdl/'
xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/'
xmlns:tns='http://org.jboss.ws/wsref'
xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
- <types>
- <xs:schema targetNamespace='http://org.jboss.ws/wsref' version='1.0'
xmlns:tns='http://org.jboss.ws/wsref'
xmlns:xs='http://www.w3.org/2001/XMLSchema'>
- <xs:element name='echo' type='tns:echo'/>
- <xs:element name='echoResponse' type='tns:echoResponse'/>
- <xs:complexType name='echo'>
- <xs:sequence>
- <xs:element form='qualified' minOccurs='0' name='arg0'
type='xs:string'/>
- </xs:sequence>
- </xs:complexType>
- <xs:complexType name='echoResponse'>
- <xs:sequence>
- <xs:element form='qualified' minOccurs='0' name='return'
type='xs:string'/>
- </xs:sequence>
- </xs:complexType>
- </xs:schema>
- </types>
+
<message name='TestEndpoint_echo'>
- <part element='tns:echo' name='echo'/>
+ <part name='arg0' type='xsd:string'/>
</message>
<message name='TestEndpoint_echoResponse'>
- <part element='tns:echoResponse' name='echoResponse'/>
+ <part name='return' type='xsd:string'/>
</message>
+
<portType name='TestEndpoint'>
- <operation name='echo' parameterOrder='echo'>
+ <operation name='echo' parameterOrder='arg0'>
<input message='tns:TestEndpoint_echo'/>
<output message='tns:TestEndpoint_echoResponse'/>
</operation>
</portType>
+
<binding name='TestEndpointBinding' type='tns:TestEndpoint'>
- <soap:binding style='document'
transport='http://schemas.xmlsoap.org/soap/http'/>
+ <soap:binding style='rpc'
transport='http://schemas.xmlsoap.org/soap/http'/>
<operation name='echo'>
<soap:operation soapAction=''/>
<input>
- <soap:body use='literal'/>
+ <soap:body namespace='http://org.jboss.ws/wsref'
use='literal'/>
</input>
<output>
- <soap:body use='literal'/>
+ <soap:body namespace='http://org.jboss.ws/wsref'
use='literal'/>
</output>
</operation>
</binding>
+
<service name='TestEndpointService'>
<port binding='tns:TestEndpointBinding' name='TestEndpointPort'>
- <soap:address
location='http://@jbosstest.host.name@:8080/jaxws-webserviceref/TestEndpoint'/>
+ <soap:address
location='http://@jbosstest.host.name@:8080/jaxws-webserviceref'/>
</port>
</service>
-</definitions>
\ No newline at end of file
+
+</definitions>
Added:
trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/META-INF-secure/application-client.xml
===================================================================
---
trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/META-INF-secure/application-client.xml
(rev 0)
+++
trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/META-INF-secure/application-client.xml 2007-01-17
14:46:03 UTC (rev 1988)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<application-client version="5"
xmlns="http://java.sun.com/xml/ns/javaee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/application-client_5.xsd">
+
+ <display-name>TestEndpointService</display-name>
+
+</application-client>
Property changes on:
trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/META-INF-secure/application-client.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/META-INF-secure/jboss-client.xml
===================================================================
---
trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/META-INF-secure/jboss-client.xml
(rev 0)
+++
trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/META-INF-secure/jboss-client.xml 2007-01-17
14:46:03 UTC (rev 1988)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE jboss-client PUBLIC "-//JBoss//DTD Application Client 5.0//EN"
"http://www.jboss.org/j2ee/dtd/jboss-client_5_0.dtd">
+
+<jboss-client>
+ <jndi-name>jbossws-client</jndi-name>
+
+ <service-ref>
+ <service-ref-name>SecureService1</service-ref-name>
+
<wsdl-override>http://@jbosstest.host.name@:8080/jaxws-webserviceref-secure/SecureEndpoint?wsdl</wsdl-override>
+ </service-ref>
+
+ <service-ref>
+ <service-ref-name>SecureService2</service-ref-name>
+
<wsdl-override>http://@jbosstest.host.name@:8080/jaxws-webserviceref-secure/SecureEndpoint?wsdl</wsdl-override>
+ </service-ref>
+
+ <service-ref>
+ <service-ref-name>SecurePort1</service-ref-name>
+
<wsdl-override>http://@jbosstest.host.name@:8080/jaxws-webserviceref-secure/SecureEndpoint?wsdl</wsdl-override>
+ </service-ref>
+
+</jboss-client>
\ No newline at end of file
Property changes on:
trunk/jbossws-tests/src/main/resources/jaxws/webserviceref/META-INF-secure/jboss-client.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF