Author: richard.opalka(a)jboss.com
Date: 2012-11-16 09:08:31 -0500 (Fri, 16 Nov 2012)
New Revision: 17007
Added:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/NativeServiceRefFactoryFactoryImpl.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/NativeServiceRefFactoryImpl.java
stack/native/trunk/modules/services/src/main/resources/META-INF/services/org.jboss.wsf.spi.serviceref.ServiceRefFactoryFactory
Removed:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/NativeServiceRefBinderFactoryImpl.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/serviceref/NativeServiceRefBinderJAXRPC.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/serviceref/NativeServiceReferenceableJAXRPC.java
stack/native/trunk/modules/services/src/main/resources/META-INF/services/org.jboss.wsf.spi.serviceref.ServiceRefBinderFactory
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/jbws637/
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/jbws723/
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxrpc/jbws637/
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxrpc/jbws723/
Modified:
stack/native/trunk/
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/NativeMessages.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceImpl.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/serviceref/NativeServiceObjectFactoryJAXRPC.java
stack/native/trunk/modules/testsuite/native-tests/scripts/build-jars-jaxrpc.xml
stack/native/trunk/pom.xml
Log:
[JBWS-3565] WS ref optimization
Property changes on: stack/native/trunk
___________________________________________________________________
Modified: svn:mergeinfo
- /stack/native/branches/asoldano:14057,14069
/stack/native/branches/ropalka:13836-13879
/stack/native/branches/ropalka_JBWS-3550:16746-16753
+ /stack/native/branches/asoldano:14057,14069
/stack/native/branches/ropalka:13836-13879,16969-17006
/stack/native/branches/ropalka_JBWS-3550:16746-16753
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/NativeMessages.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/NativeMessages.java 2012-11-16
13:59:51 UTC (rev 17006)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/NativeMessages.java 2012-11-16
14:08:31 UTC (rev 17007)
@@ -29,7 +29,6 @@
import java.util.Collection;
import javax.management.ObjectName;
-import javax.naming.NamingException;
import javax.wsdl.Part;
import javax.xml.namespace.QName;
import javax.xml.rpc.JAXRPCException;
@@ -687,7 +686,7 @@
JAXRPCException outputParamsNotAvailable();
@Message(id = 25268, value = "Cannot obtain path to
PortComponentLinkServlet")
- NamingException cannotObtainPathToPCLServlet(@Cause Throwable cause);
+ Exception cannotObtainPathToPCLServlet(@Cause Throwable cause);
@Message(id = 25270, value = "The service interface does not implement
javax.xml.rpc.Service: %s")
JAXRPCException interfaceDoesNotImplementJAXRPCService(String intf);
Deleted:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/NativeServiceRefBinderFactoryImpl.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/NativeServiceRefBinderFactoryImpl.java 2012-11-16
13:59:51 UTC (rev 17006)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/NativeServiceRefBinderFactoryImpl.java 2012-11-16
14:08:31 UTC (rev 17007)
@@ -1,44 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2010, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.core.client;
-
-import org.jboss.ws.core.jaxrpc.client.serviceref.NativeServiceRefBinderJAXRPC;
-import org.jboss.wsf.spi.serviceref.ServiceRefBinder;
-import org.jboss.wsf.spi.serviceref.ServiceRefBinderFactory;
-import org.jboss.wsf.spi.serviceref.ServiceRefHandler.Type;
-
-/**
- * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
- */
-public final class NativeServiceRefBinderFactoryImpl implements ServiceRefBinderFactory
-{
- private static final ServiceRefBinder JAXRPC_BINDER = new
NativeServiceRefBinderJAXRPC();
-
- public ServiceRefBinder newServiceRefBinder(final Type type)
- {
- if (type == Type.JAXRPC)
- {
- return JAXRPC_BINDER;
- }
- throw new UnsupportedOperationException();
- }
-}
Copied:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/NativeServiceRefFactoryFactoryImpl.java
(from rev 17006,
stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/client/NativeServiceRefFactoryFactoryImpl.java)
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/NativeServiceRefFactoryFactoryImpl.java
(rev 0)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/NativeServiceRefFactoryFactoryImpl.java 2012-11-16
14:08:31 UTC (rev 17007)
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.core.client;
+
+import org.jboss.wsf.spi.serviceref.ServiceRefFactory;
+import org.jboss.wsf.spi.serviceref.ServiceRefFactoryFactory;
+
+/**
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+public final class NativeServiceRefFactoryFactoryImpl implements
ServiceRefFactoryFactory
+{
+ public ServiceRefFactory newServiceRefFactory()
+ {
+ return new NativeServiceRefFactoryImpl();
+ }
+}
Copied:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/NativeServiceRefFactoryImpl.java
(from rev 17006,
stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/client/NativeServiceRefFactoryImpl.java)
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/NativeServiceRefFactoryImpl.java
(rev 0)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/NativeServiceRefFactoryImpl.java 2012-11-16
14:08:31 UTC (rev 17007)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.core.client;
+
+import org.jboss.ws.core.jaxrpc.client.serviceref.NativeServiceObjectFactoryJAXRPC;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
+import org.jboss.wsf.spi.serviceref.ServiceRefFactory;
+import org.jboss.wsf.spi.serviceref.ServiceRefType;
+
+/**
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+final class NativeServiceRefFactoryImpl implements ServiceRefFactory
+{
+ public Object newServiceRef(final UnifiedServiceRefMetaData serviceRefMD)
+ {
+ if (serviceRefMD.getType() == ServiceRefType.JAXRPC) {
+ return new NativeServiceObjectFactoryJAXRPC().getObjectInstance(serviceRefMD);
+ }
+ throw new UnsupportedOperationException();
+ }
+}
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceImpl.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceImpl.java 2012-11-16
13:59:51 UTC (rev 17006)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceImpl.java 2012-11-16
14:08:31 UTC (rev 17007)
@@ -58,7 +58,6 @@
import org.jboss.ws.metadata.umdm.OperationMetaData;
import org.jboss.ws.metadata.umdm.ServiceMetaData;
import org.jboss.ws.metadata.umdm.UnifiedMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedCallPropertyMetaData;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData.HandlerType;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedInitParamMetaData;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedPortComponentRefMetaData;
@@ -204,7 +203,6 @@
String nsURI = portName.getNamespaceURI();
serviceMetaData.assertTargetNamespace(nsURI);
CallImpl call = new CallImpl(this, portName, null);
- initCallProperties(call, null);
return call;
}
@@ -226,7 +224,6 @@
serviceMetaData.assertTargetNamespace(nsURI);
QName opName = new QName(nsURI, operationName);
CallImpl call = new CallImpl(this, portName, opName);
- initCallProperties(call, null);
return call;
}
@@ -247,7 +244,6 @@
serviceMetaData.assertTargetNamespace(portName.getNamespaceURI());
serviceMetaData.assertTargetNamespace(opName.getNamespaceURI());
CallImpl call = new CallImpl(this, portName, opName);
- initCallProperties(call, null);
return call;
}
@@ -263,7 +259,6 @@
public Call createCall() throws ServiceException
{
CallImpl call = new CallImpl(this);
- initCallProperties(call, null);
return call;
}
@@ -445,10 +440,6 @@
CallImpl call = new CallImpl(this, epMetaData);
initStubProperties(call, seiClass.getName());
- // JBoss-4.0.x does not support <stub-properties>
- if (initCallProperties(call, seiClass.getName()) > 0)
- NativeLoggers.JAXRPC_LOGGER.deprecatedUseOfCallPropsOnJAXRPCStub();
-
PortProxy handler = new PortProxy(call);
ClassLoader cl = epMetaData.getClassLoader();
Remote proxy = (Remote)Proxy.newProxyInstance(cl, new Class[] { seiClass,
Stub.class, StubExt.class }, handler);
@@ -480,41 +471,6 @@
return propCount;
}
- private int initCallProperties(CallImpl call, String seiName)
- {
- setupHandlerChain(call.getEndpointMetaData());
-
- // nothing to do
- if (usrMetaData == null)
- return 0;
-
- int propCount = 0;
-
- // General properties
- for (UnifiedCallPropertyMetaData prop : usrMetaData.getCallProperties())
- {
- call.setProperty(prop.getPropName(), prop.getPropValue());
- propCount++;
- }
-
- if (seiName != null)
- {
- for (UnifiedPortComponentRefMetaData upcRef :
usrMetaData.getPortComponentRefs())
- {
- if (seiName.equals(upcRef.getServiceEndpointInterface()))
- {
- for (UnifiedCallPropertyMetaData prop : upcRef.getCallProperties())
- {
- call.setProperty(prop.getPropName(), prop.getPropValue());
- propCount++;
- }
- }
- }
- }
-
- return propCount;
- }
-
/**
* Get the handler chain for the given endpoint name, maybe null.
*/
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/serviceref/NativeServiceObjectFactoryJAXRPC.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/serviceref/NativeServiceObjectFactoryJAXRPC.java 2012-11-16
13:59:51 UTC (rev 17006)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/serviceref/NativeServiceObjectFactoryJAXRPC.java 2012-11-16
14:08:31 UTC (rev 17007)
@@ -24,11 +24,8 @@
import static org.jboss.ws.NativeMessages.MESSAGES;
import java.io.BufferedReader;
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
-import java.io.ObjectInputStream;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Proxy;
import java.net.URL;
@@ -36,22 +33,15 @@
import java.rmi.Remote;
import java.util.ArrayList;
import java.util.HashMap;
-import java.util.Hashtable;
import java.util.List;
import java.util.Map;
-import java.util.Properties;
-import javax.naming.Context;
-import javax.naming.Name;
-import javax.naming.NamingException;
-import javax.naming.RefAddr;
-import javax.naming.Reference;
-import javax.naming.spi.ObjectFactory;
import javax.xml.namespace.QName;
import javax.xml.rpc.Service;
import org.jboss.logging.Logger;
import org.jboss.ws.NativeLoggers;
+import org.jboss.ws.NativeMessages;
import org.jboss.ws.common.Constants;
import org.jboss.ws.core.jaxrpc.client.ServiceExt;
import org.jboss.ws.core.jaxrpc.client.ServiceImpl;
@@ -67,7 +57,8 @@
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.management.EndpointRegistry;
import org.jboss.wsf.spi.management.EndpointRegistryFactory;
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedCallPropertyMetaData;
+import org.jboss.wsf.spi.management.ServerConfig;
+import org.jboss.wsf.spi.management.ServerConfigFactory;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedPortComponentRefMetaData;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
@@ -80,54 +71,15 @@
* @author Thomas.Diesler(a)jboss.org
* @since 15-April-2004
*/
-public final class NativeServiceObjectFactoryJAXRPC implements ObjectFactory
+public final class NativeServiceObjectFactoryJAXRPC
{
// provide logging
private static final Logger log =
Logger.getLogger(NativeServiceObjectFactoryJAXRPC.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
+ public Object getObjectInstance(final UnifiedServiceRefMetaData serviceRef)
{
try
{
- Reference ref = (Reference)obj;
-
- // Unmarshall the ServiceRefMetaData
- UnifiedServiceRefMetaData serviceRef = null;
- RefAddr metaRefAddr =
ref.get(NativeServiceReferenceableJAXRPC.SERVICE_REF_META_DATA);
- ByteArrayInputStream bais = new
ByteArrayInputStream((byte[])metaRefAddr.getContent());
- try
- {
- ObjectInputStream ois = new ObjectInputStream(bais);
- serviceRef = (UnifiedServiceRefMetaData)ois.readObject();
- ois.close();
- }
- catch (IOException ex)
- {
- NamingException ne = new NamingException();
- ne.setRootCause(ex);
- throw ne;
- }
-
ServiceImpl jaxrpcService = null;
URL wsdlLocation = serviceRef.getWsdlLocation();
if (wsdlLocation != null)
@@ -149,21 +101,11 @@
ServiceMetaData serviceMetaData = jaxrpcService.getServiceMetaData();
- // Set any service level properties
- if (serviceRef.getCallProperties().size() > 0)
- {
- Properties callProps = new Properties();
- serviceMetaData.setProperties(callProps);
- for (UnifiedCallPropertyMetaData prop : serviceRef.getCallProperties())
- callProps.setProperty(prop.getPropName(), prop.getPropValue());
- }
-
// The web service client using a port-component-link, the contet is the URL to
// the PortComponentLinkServlet that will return the actual endpoint address
- RefAddr pcLinkRef =
ref.get(NativeServiceReferenceableJAXRPC.PORT_COMPONENT_LINK);
- if (pcLinkRef != null)
+ String pcLink = getPortComponentLink(serviceRef);
+ if (pcLink != null)
{
- String pcLink = (String)pcLinkRef.getContent();
log.debug("Resolving port-component-link: " + pcLink);
// First try to obtain the endpoint address loacally
@@ -187,7 +129,7 @@
// We may be remote in the esoteric case where an appclient uses the
port-comonent-link feature
if (endpointAddress == null)
{
- String servletPath =
(String)ref.get(NativeServiceReferenceableJAXRPC.PORT_COMPONENT_LINK_SERVLET).getContent();
+ String servletPath = getPortComponentLinkServlet();
servletPath += "?pcLink=" + URLEncoder.encode(pcLink,
"UTF-8");
InputStream is = new URL(servletPath).openStream();
BufferedReader br = new BufferedReader(new InputStreamReader(is));
@@ -242,10 +184,33 @@
catch (Exception ex)
{
NativeLoggers.JAXRPC_LOGGER.cannotCreateService(ex);
- throw ex;
+ throw new RuntimeException(ex);
}
}
+ private String getPortComponentLink(UnifiedServiceRefMetaData refMetaData) {
+ for (UnifiedPortComponentRefMetaData pcr : refMetaData.getPortComponentRefs())
+ {
+ return pcr.getPortComponentLink();
+ }
+ return null;
+ }
+
+ private String getPortComponentLinkServlet() throws Exception {
+ try {
+ SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
+ ServerConfig config =
spiProvider.getSPI(ServerConfigFactory.class).getServerConfig();
+
+ String host = config.getWebServiceHost();
+ int port = config.getWebServicePort();
+
+ String servletURL = "http://" + host + ":" + port +
"/jbossws/pclink";
+ return servletURL;
+ } catch (Exception ex) {
+ throw NativeMessages.MESSAGES.cannotObtainPathToPCLServlet(ex);
+ }
+ }
+
/**
* Narrow available endpoints by <port-component-ref> declarations.
* Service.getPort(SEI) must be able to retrieve a distinct port definition.
Deleted:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/serviceref/NativeServiceRefBinderJAXRPC.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/serviceref/NativeServiceRefBinderJAXRPC.java 2012-11-16
13:59:51 UTC (rev 17006)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/serviceref/NativeServiceRefBinderJAXRPC.java 2012-11-16
14:08:31 UTC (rev 17007)
@@ -1,41 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2010, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.core.jaxrpc.client.serviceref;
-
-import javax.naming.Referenceable;
-
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
-import org.jboss.wsf.spi.serviceref.ServiceRefBinder;
-
-/**
- * Binds a JAXRPC Service object to the client's ENC.
- *
- * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
- */
-public final class NativeServiceRefBinderJAXRPC implements ServiceRefBinder
-{
- @Override
- public Referenceable createReferenceable(final UnifiedServiceRefMetaData
serviceRefMD)
- {
- return new NativeServiceReferenceableJAXRPC(serviceRefMD);
- }
-}
Deleted:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/serviceref/NativeServiceReferenceableJAXRPC.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/serviceref/NativeServiceReferenceableJAXRPC.java 2012-11-16
13:59:51 UTC (rev 17006)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/serviceref/NativeServiceReferenceableJAXRPC.java 2012-11-16
14:08:31 UTC (rev 17007)
@@ -1,126 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.core.jaxrpc.client.serviceref;
-
-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.NativeMessages;
-import org.jboss.wsf.spi.SPIProvider;
-import org.jboss.wsf.spi.SPIProviderResolver;
-import org.jboss.wsf.spi.management.ServerConfig;
-import org.jboss.wsf.spi.management.ServerConfigFactory;
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedPortComponentRefMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
-
-/**
- * A JNDI reference to a javax.xml.rpc.Service
- * <p/>
- * It holds the information to reconstrut the javax.xml.rpc.Service
- * when the client does a JNDI lookup.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 15-April-2004
- */
-public final class NativeServiceReferenceableJAXRPC implements Referenceable
-{
- public static final String SERVICE_REF_META_DATA = "SERVICE_REF_META_DATA";
- public static final String PORT_COMPONENT_LINK = "PORT_COMPONENT_LINK";
- public static final String PORT_COMPONENT_LINK_SERVLET =
"PORT_COMPONENT_LINK_SERVLET";
-
- private UnifiedServiceRefMetaData refMetaData;
-
- /**
- * A service referenceable for a WSDL document that is part of the deployment
- */
- public NativeServiceReferenceableJAXRPC(UnifiedServiceRefMetaData refMetaData)
- {
- this.refMetaData = refMetaData;
- }
-
- /**
- * 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(NativeServiceReferenceableJAXRPC.class.getName(),
NativeServiceObjectFactoryJAXRPC.class.getName(), null);
-
- // Add a reference to the ServiceRefMetaData and WSDLDefinitions
- myRef.add(new BinaryRefAddr(SERVICE_REF_META_DATA, marshallServiceRef()));
-
- // Add references to port component links
- for (UnifiedPortComponentRefMetaData pcr : refMetaData.getPortComponentRefs())
- {
- String pcLink = pcr.getPortComponentLink();
- if (pcLink != null)
- {
- myRef.add(new StringRefAddr(PORT_COMPONENT_LINK, pcLink));
- try
- {
- SPIProvider spiProvider =
SPIProviderResolver.getInstance().getProvider();
- ServerConfig config =
spiProvider.getSPI(ServerConfigFactory.class).getServerConfig();
-
- String host = config.getWebServiceHost();
- int port = config.getWebServicePort();
-
- String servletURL = "http://" + host + ":" + port +
"/jbossws/pclink";
- myRef.add(new StringRefAddr(PORT_COMPONENT_LINK_SERVLET, servletURL));
- }
- catch (Exception ex)
- {
- throw NativeMessages.MESSAGES.cannotObtainPathToPCLServlet(ex);
- }
- }
- }
-
- return myRef;
- }
-
- /** Marshall the ServiceRefMetaData to an byte array
- */
- private byte[] marshallServiceRef() throws NamingException
- {
- ByteArrayOutputStream baos = new ByteArrayOutputStream(512);
- try
- {
- ObjectOutputStream oos = new ObjectOutputStream(baos);
- oos.writeObject(refMetaData);
- oos.close();
- }
- catch (IOException e)
- {
- throw new NamingException(e.toString());
- }
- return baos.toByteArray();
- }
-
-}
Deleted:
stack/native/trunk/modules/services/src/main/resources/META-INF/services/org.jboss.wsf.spi.serviceref.ServiceRefBinderFactory
===================================================================
---
stack/native/trunk/modules/services/src/main/resources/META-INF/services/org.jboss.wsf.spi.serviceref.ServiceRefBinderFactory 2012-11-16
13:59:51 UTC (rev 17006)
+++
stack/native/trunk/modules/services/src/main/resources/META-INF/services/org.jboss.wsf.spi.serviceref.ServiceRefBinderFactory 2012-11-16
14:08:31 UTC (rev 17007)
@@ -1 +0,0 @@
-org.jboss.ws.core.client.NativeServiceRefBinderFactoryImpl
\ No newline at end of file
Copied:
stack/native/trunk/modules/services/src/main/resources/META-INF/services/org.jboss.wsf.spi.serviceref.ServiceRefFactoryFactory
(from rev 17006,
stack/native/branches/ropalka/modules/services/src/main/resources/META-INF/services/org.jboss.wsf.spi.serviceref.ServiceRefFactoryFactory)
===================================================================
---
stack/native/trunk/modules/services/src/main/resources/META-INF/services/org.jboss.wsf.spi.serviceref.ServiceRefFactoryFactory
(rev 0)
+++
stack/native/trunk/modules/services/src/main/resources/META-INF/services/org.jboss.wsf.spi.serviceref.ServiceRefFactoryFactory 2012-11-16
14:08:31 UTC (rev 17007)
@@ -0,0 +1 @@
+org.jboss.ws.core.client.NativeServiceRefFactoryFactoryImpl
\ No newline at end of file
Modified: stack/native/trunk/modules/testsuite/native-tests/scripts/build-jars-jaxrpc.xml
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/scripts/build-jars-jaxrpc.xml 2012-11-16
13:59:51 UTC (rev 17006)
+++
stack/native/trunk/modules/testsuite/native-tests/scripts/build-jars-jaxrpc.xml 2012-11-16
14:08:31 UTC (rev 17007)
@@ -1652,28 +1652,6 @@
</fileset>
</jar>
- <!-- jaxrpc-jbws637 -->
- <jar
destfile="${tests.output.dir}/test-libs/jaxrpc-jbws637-appclient.jar">
- <fileset dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxrpc/jbws637/*.class"/>
- <exclude
name="org/jboss/test/ws/jaxrpc/jbws637/*TestCase.class"/>
- <include
name="org/jboss/test/ws/appclient/AppclientKiller.class"/>
- </fileset>
- <manifest>
- <attribute name="main-class"
value="org.jboss.test.ws.appclient.AppclientKiller"/>
- </manifest>
- <metainf
dir="${tests.output.dir}/test-resources/jaxrpc/jbws637/META-INF">
- <include name="jaxrpc-mapping.xml"/>
- <include name="application-client.xml"/>
- <include name="wsdl/**"/>
- </metainf>
- </jar>
- <jar
destfile="${tests.output.dir}/test-libs/jaxrpc-jbws637-appclient.ear">
- <fileset dir="${tests.output.dir}/test-libs">
- <include name="jaxrpc-jbws637-appclient.jar"/>
- </fileset>
- </jar>
-
<!-- jaxrpc-jbws643 -->
<war warfile="${tests.output.dir}/test-libs/jaxrpc-jbws643.war"
webxml="${tests.output.dir}/test-resources/jaxrpc/jbws643/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/test-classes">
@@ -2005,47 +1983,6 @@
</fileset>
</jar>
- <!-- jaxrpc-jbws723 -->
- <jar jarfile="${tests.output.dir}/test-libs/jaxrpc-jbws723.jar">
- <fileset dir="${tests.output.dir}/test-classes">
- <include
name="org/jboss/test/ws/jaxrpc/jbws723/OrganizationService.class"/>
- <include
name="org/jboss/test/ws/jaxrpc/jbws723/OrganizationHome.class"/>
- <include
name="org/jboss/test/ws/jaxrpc/jbws723/OrganizationRemote.class"/>
- <include
name="org/jboss/test/ws/jaxrpc/jbws723/OrganizationImpl.class"/>
- </fileset>
- <metainf
dir="${tests.output.dir}/test-resources/jaxrpc/jbws723/META-INF">
- <include name="jaxrpc-mapping.xml"/>
- <include name="webservices.xml"/>
- <include name="ejb-jar.xml"/>
- <include name="jboss-ejb3.xml"/>
- <include name="jboss.xml"/>
- <include name="jboss-webservices.xml"/>
- <include name="wsdl/**"/>
- </metainf>
- </jar>
- <jar
jarfile="${tests.output.dir}/test-libs/jaxrpc-jbws723-appclient.jar">
- <fileset dir="${tests.output.dir}/test-classes">
- <include
name="org/jboss/test/ws/jaxrpc/jbws723/OrganizationService.class"/>
- <include
name="org/jboss/test/ws/jaxrpc/jbws723/OrganizationHome.class"/>
- <include
name="org/jboss/test/ws/jaxrpc/jbws723/OrganizationRemote.class"/>
- <include
name="org/jboss/test/ws/appclient/AppclientKiller.class"/>
- </fileset>
- <manifest>
- <attribute name="main-class"
value="org.jboss.test.ws.appclient.AppclientKiller"/>
- </manifest>
- <metainf
dir="${tests.output.dir}/test-resources/jaxrpc/jbws723/META-INF">
- <include name="application-client.xml"/>
- <include name="jboss-client.xml"/>
- <include name="jaxrpc-mapping.xml"/>
- <include name="wsdl/**"/>
- </metainf>
- </jar>
- <jar
destfile="${tests.output.dir}/test-libs/jaxrpc-jbws723-appclient.ear">
- <fileset dir="${tests.output.dir}/test-libs">
- <include name="jaxrpc-jbws723-appclient.jar"/>
- </fileset>
- </jar>
-
<!-- jaxrpc-jbws732 -->
<war warfile="${tests.output.dir}/test-libs/jaxrpc-jbws732.war"
webxml="${tests.output.dir}/test-resources/jaxrpc/jbws732/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/test-classes">
Modified: stack/native/trunk/pom.xml
===================================================================
--- stack/native/trunk/pom.xml 2012-11-16 13:59:51 UTC (rev 17006)
+++ stack/native/trunk/pom.xml 2012-11-16 14:08:31 UTC (rev 17007)
@@ -57,8 +57,8 @@
<!-- Properties -->
<properties>
<jbossws.api.version>1.0.1.Final</jbossws.api.version>
- <jbossws.spi.version>2.1.0.Final</jbossws.spi.version>
- <jbossws.common.version>2.1.0.Final</jbossws.common.version>
+ <jbossws.spi.version>2.1.1-SNAPSHOT</jbossws.spi.version>
+ <jbossws.common.version>2.1.1-SNAPSHOT</jbossws.common.version>
<jbossws.common.tools.version>1.1.0.Final</jbossws.common.tools.version>
<jbossws.shared.testsuite.version>4.1.0.Final</jbossws.shared.testsuite.version>
<jbossws.jboss713.version>4.1.1-SNAPSHOT</jbossws.jboss713.version>