JBossWS SVN: r8749 - stack/native/branches/asoldano/modules/core/src/main/java/org/jboss/ws/core/soap.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2008-11-18 03:43:48 -0500 (Tue, 18 Nov 2008)
New Revision: 8749
Added:
stack/native/branches/asoldano/modules/core/src/main/java/org/jboss/ws/core/soap/AbstractSOAPMessage.java
Modified:
stack/native/branches/asoldano/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPMessageImpl.java
Log:
Externalize basic SOAPMessage impl to core
Added: stack/native/branches/asoldano/modules/core/src/main/java/org/jboss/ws/core/soap/AbstractSOAPMessage.java
===================================================================
--- stack/native/branches/asoldano/modules/core/src/main/java/org/jboss/ws/core/soap/AbstractSOAPMessage.java (rev 0)
+++ stack/native/branches/asoldano/modules/core/src/main/java/org/jboss/ws/core/soap/AbstractSOAPMessage.java 2008-11-18 08:43:48 UTC (rev 8749)
@@ -0,0 +1,323 @@
+/*
+ * 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.soap;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.HashMap;
+import java.util.Iterator;
+
+import javax.activation.DataHandler;
+import javax.xml.soap.AttachmentPart;
+import javax.xml.soap.MimeHeaders;
+import javax.xml.soap.SOAPBody;
+import javax.xml.soap.SOAPElement;
+import javax.xml.soap.SOAPEnvelope;
+import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPHeader;
+import javax.xml.soap.SOAPMessage;
+import javax.xml.soap.SOAPPart;
+
+/** The root class for all SOAP messages. As transmitted on the "wire", a SOAP message is an XML document or a
+ * MIME message whose first body part is an XML/SOAP document.
+ *
+ * A SOAPMessage object consists of a SOAP part and optionally one or more attachment parts.
+ * The SOAP part for a SOAPMessage object is a SOAPPart object, which contains information used for message routing and
+ * identification, and which can contain application-specific content. All data in the SOAP Part of a message must be in XML format.
+ *
+ * A new SOAPMessage object contains the following by default:
+ *
+ * A SOAPPart object
+ * A SOAPEnvelope object
+ * A SOAPBody object
+ * A SOAPHeader object
+ *
+ * The SOAP part of a message can be retrieved by calling the method SOAPMessage.getSOAPPart().
+ * The SOAPEnvelope object is retrieved from the SOAPPart object, and the SOAPEnvelope object is used to retrieve the
+ * SOAPBody and SOAPHeader objects.
+ *
+ * SOAPPart sp = message.getSOAPPart();
+ * SOAPEnvelope se = sp.getEnvelope();
+ * SOAPBody sb = se.getBody();
+ * SOAPHeader sh = se.getHeader();
+ *
+ * In addition to the mandatory SOAPPart object, a SOAPMessage object may contain zero or more AttachmentPart objects,
+ * each of which contains application-specific data. The SOAPMessage interface provides methods for creating AttachmentPart
+ * objects and also for adding them to a SOAPMessage object. A party that has received a SOAPMessage object can examine
+ * its contents by retrieving individual attachment parts.
+ *
+ * Unlike the rest of a SOAP message, an attachment is not required to be in XML format and can therefore be anything from
+ * simple text to an image file. Consequently, any message content that is not in XML format must be in an AttachmentPart object.
+ *
+ * A MessageFactory object may create SOAPMessage objects with behavior that is specialized to a particular
+ * implementation or application of SAAJ. For instance, a MessageFactory object may produce SOAPMessage objects that
+ * conform to a particular Profile such as ebXML. In this case a MessageFactory object might produce SOAPMessage
+ * objects that are initialized with ebXML headers.
+ *
+ * In order to ensure backward source compatibility, methods that are added to this class after version 1.1 of the SAAJ
+ * specification are all concrete instead of abstract and they all have default implementations.
+ * Unless otherwise noted in the JavaDocs for those methods the default implementations simply throw an
+ * UnsupportedOperationException and the SAAJ implementation code must override them with methods that provide
+ * the specified behavior. Legacy client code does not have this restriction, however, so long as there is no claim
+ * made that it conforms to some later version of the specification than it was originally written for.
+ * A legacy class that extends the SOAPMessage class can be compiled and/or run against succeeding versions of
+ * the SAAJ API without modification. If such a class was correctly implemented then it will continue to behave
+ * correctly relative the the version of the specification against which it was written.
+ *
+ * @author Scott.Stark(a)jboss.org
+ */
+public abstract class AbstractSOAPMessage extends SOAPMessage
+{
+ private HashMap properties = new HashMap();
+
+ /** Specifies the character type encoding for the SOAP Message. Valid values include "utf-8" and "utf-16". The default is "utf-8". */
+ public static final String CHARACTER_SET_ENCODING = "javax.xml.soap.character-set-encoding";
+ /** Specifies whether the SOAP Message will contain an XML declaration when it is sent. The default is "false". */
+ public static final String WRITE_XML_DECLARATION = "javax.xml.soap.write-xml-declaration";
+
+ /**
+ * Adds the given AttachmentPart object to this SOAPMessage object.
+ * An AttachmentPart object must be created before it can be added to a message.
+ * @param attachmentpart an AttachmentPart object that is to become part of this SOAPMessage object
+ */
+ public abstract void addAttachmentPart(AttachmentPart attachmentpart);
+
+ /**
+ * Creates a new empty AttachmentPart object. Note that the method addAttachmentPart must be called with this new
+ * AttachmentPart object as the parameter in order for it to become an attachment to this SOAPMessage object.
+ * @return a new AttachmentPart object that can be populated and added to this SOAPMessage object
+ */
+ public abstract AttachmentPart createAttachmentPart();
+
+ /**
+ * Creates an AttachmentPart object and populates it using the given DataHandler object.
+ * @param datahandler the javax.activation.DataHandler object that will generate the content for this SOAPMessage object
+ * @return a new AttachmentPart object that contains data generated by the given DataHandler object
+ */
+ public AttachmentPart createAttachmentPart(DataHandler datahandler)
+ {
+ AttachmentPart part = createAttachmentPart();
+ part.setDataHandler(datahandler);
+ return part;
+ }
+
+ /**
+ * Creates an AttachmentPart object and populates it with the specified data of the specified content type.
+ * @param content an Object containing the content for this SOAPMessage object
+ * @param contentType a String object giving the type of content; examples are "text/xml", "text/plain", and "image/jpeg"
+ * @return a new AttachmentPart object that contains the given data
+ */
+ public AttachmentPart createAttachmentPart(Object content, String contentType)
+ {
+ AttachmentPart part = createAttachmentPart();
+ part.setContent(content, contentType);
+ return part;
+ }
+
+ /**
+ * Retrieves value of the specified property.
+ * @param property the name of the property to retrieve
+ * @return the value associated with the named property or null if no such property exists.
+ * @throws SOAPException if the property name is not recognized.
+ */
+ public Object getProperty(String property) throws SOAPException
+ {
+ return properties.get(property);
+ }
+
+ /**
+ * Associates the specified value with the specified property. If there was already a value associated with this
+ * property, the old value is replaced.
+ *
+ * The valid property names include WRITE_XML_DECLARATION and CHARACTER_SET_ENCODING.
+ * All of these standard SAAJ properties are prefixed by "javax.xml.soap".
+ * Vendors may also add implementation specific properties.
+ * These properties must be prefixed with package names that are unique to the vendor.
+ *
+ * Setting the property WRITE_XML_DECLARATION to "true" will cause an XML Declaration to be written out at the start
+ * of the SOAP message. The default value of "false" suppresses this declaration.
+ *
+ * The property CHARACTER_SET_ENCODING defaults to the value "utf-8" which causes the SOAP message to be
+ * encoded using UTF-8. Setting CHARACTER_SET_ENCODING to "utf-16" causes the SOAP message to be encoded using UTF-16.
+ *
+ * Some implementations may allow encodings in addition to UTF-8 and UTF-16. Refer to your vendor's documentation for details.
+ *
+ * @param property the property with which the specified value is to be associated.
+ * @param value the value to be associated with the specified property
+ * @throws SOAPException if the property name is not recognized
+ */
+ public void setProperty(String property, Object value) throws SOAPException
+ {
+ properties.put(property, value);
+ }
+
+ /**
+ * Gets the SOAP Body contained in this SOAPMessage object.
+ * @return the SOAPBody object contained by this SOAPMessage object
+ * @throws SOAPException if the SOAP Body does not exist or cannot be retrieved
+ */
+ public SOAPBody getSOAPBody() throws SOAPException
+ {
+ SOAPPart soapPart = getSOAPPart();
+ if (soapPart != null)
+ {
+ SOAPEnvelope soapEnvelope = soapPart.getEnvelope();
+ if (soapEnvelope != null)
+ {
+ SOAPBody soapBody = soapEnvelope.getBody();
+ return soapBody;
+ }
+ }
+ throw new SOAPException("Cannot obtain SOAPBody from SOAPMessage");
+ }
+
+ /**
+ * Gets the SOAP Header contained in this SOAPMessage object.
+ * @return the SOAPHeader object contained by this SOAPMessage object
+ * @throws SOAPException if the SOAP Header does not exist or cannot be retrieved
+ */
+ public SOAPHeader getSOAPHeader() throws SOAPException
+ {
+ SOAPPart soapPart = getSOAPPart();
+ if (soapPart != null)
+ {
+ SOAPEnvelope soapEnvelope = soapPart.getEnvelope();
+ if (soapEnvelope != null)
+ {
+ SOAPHeader soapHeader = soapEnvelope.getHeader();
+ return soapHeader;
+ }
+ }
+ throw new SOAPException("Cannot obtain SOAPHeader from SOAPMessage");
+ }
+
+ /**
+ * Retrieves a description of this SOAPMessage object's content.
+ * @return a String describing the content of this message or null if no description has been set
+ */
+ public abstract String getContentDescription();
+
+ /**
+ * Sets the description of this SOAPMessage object's content with the given description.
+ * @param description a String describing the content of this message
+ */
+ public abstract void setContentDescription(String description);
+
+ /**
+ * Returns all the transport-specific MIME headers for this SOAPMessage object in a transport-independent fashion.
+ * @return a MimeHeaders object containing the MimeHeader objects
+ */
+ public abstract MimeHeaders getMimeHeaders();
+
+ /**
+ * Gets the SOAP part of this SOAPMessage object.
+ *
+ * SOAPMessage object contains one or more attachments, the SOAP Part must be the first MIME body part in the message.
+ *
+ * @return the SOAPPart object for this SOAPMessage object
+ */
+ public abstract SOAPPart getSOAPPart();
+
+ /**
+ * Removes all AttachmentPart objects that have been added to this SOAPMessage object.
+ *
+ * This method does not touch the SOAP part.
+ */
+ public abstract void removeAllAttachments();
+
+ /**
+ * Removes all the AttachmentPart objects that have header entries that match the specified headers.
+ * Note that the removed attachment could have headers in addition to those specified.
+ * @param headers a MimeHeaders object containing the MIME headers for which to search
+ * @since SAAJ 1.3
+ */
+ public abstract void removeAttachments(MimeHeaders headers);
+
+ /**
+ * Gets a count of the number of attachments in this message. This count does not include the SOAP part.
+ * @return the number of AttachmentPart objects that are part of this SOAPMessage object
+ */
+ public abstract int countAttachments();
+
+ /**
+ * Retrieves all the AttachmentPart objects that are part of this SOAPMessage object.
+ * @return an iterator over all the attachments in this message
+ */
+ public abstract Iterator getAttachments();
+
+ /**
+ * Returns an AttachmentPart object that is associated with an attachment that is referenced by this SOAPElement or null
+ * if no such attachment exists. References can be made via an href attribute as described in SOAP Messages with Attachments,
+ * or via a single Text child node containing a URI as described in the WS-I Attachments Profile 1.0 for elements of
+ * schema type ref:swaRef(ref:swaRef). These two mechanisms must be supported.
+ * The support for references via href attribute also implies that this method should also be supported on an element that
+ * is an xop:Include element ( XOP). other reference mechanisms may be supported by individual implementations of this standard.
+ * Contact your vendor for details.
+ * @param element The SOAPElement containing the reference to an Attachment
+ * @return the referenced AttachmentPart or null if no such AttachmentPart exists or no reference can be found in this SOAPElement.
+ * @throws SOAPException if there is an error in the attempt to access the attachment
+ * @since SAAJ 1.3
+ */
+ public abstract AttachmentPart getAttachment(SOAPElement element) throws SOAPException;
+
+ /**
+ * Retrieves all the AttachmentPart objects that have header entries that match the specified headers.
+ * Note that a returned attachment could have headers in addition to those specified.
+ * @param mimeheaders a MimeHeaders object containing the MIME headers for which to search
+ * @return an iterator over all attachments that have a header that matches one of the given headers
+ */
+ public abstract Iterator getAttachments(MimeHeaders mimeheaders);
+
+ /**
+ * Updates this SOAPMessage object with all the changes that have been made to it.
+ * This method is called automatically when writeTo(OutputStream) is called.
+ * However, if changes are made to a message that was received or to one that has already been sent, the method
+ * saveChanges needs to be called explicitly in order to save the changes.
+ * The method saveChanges also generates any changes that can be read back (for example,
+ * a MessageId in profiles that support a message id). All MIME headers in a message that is created for sending
+ * purposes are guaranteed to have valid values only after saveChanges has been called.
+ *
+ * In addition, this method marks the point at which the data from all constituent AttachmentPart objects are pulled into the message.
+ *
+ * @throws SOAPException if there was a problem saving changes to this message.
+ */
+ public abstract void saveChanges() throws SOAPException;
+
+ /**
+ * Indicates whether this SOAPMessage object needs to have the method saveChanges called on it.
+ * @return true if saveChanges needs to be called; false otherwise.
+ */
+ public abstract boolean saveRequired();
+
+ /**
+ * Writes this SOAPMessage object to the given output stream. The externalization format is as defined by the
+ * SOAP 1.1 with Attachments specification.
+ *
+ * If there are no attachments, just an XML stream is written out. For those messages that have attachments,
+ * writeTo writes a MIME-encoded byte stream.
+ *
+ * @param outputstream the OutputStream object to which this SOAPMessage object will be written
+ * @throws SOAPException if there was a problem in externalizing this SOAP message
+ * @throws IOException if an I/O error occurs
+ */
+ public abstract void writeTo(OutputStream outputstream) throws SOAPException, IOException;
+}
Property changes on: stack/native/branches/asoldano/modules/core/src/main/java/org/jboss/ws/core/soap/AbstractSOAPMessage.java
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: stack/native/branches/asoldano/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPMessageImpl.java
===================================================================
--- stack/native/branches/asoldano/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPMessageImpl.java 2008-11-18 08:42:58 UTC (rev 8748)
+++ stack/native/branches/asoldano/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPMessageImpl.java 2008-11-18 08:43:48 UTC (rev 8749)
@@ -61,7 +61,7 @@
* @author Thomas.Diesler(a)jboss.org
* @author <a href="mailto:jason@stacksmash.com">Jason T. Greene</a>
*/
-public class SOAPMessageImpl extends SOAPMessage implements SOAPMessageAbstraction
+public class SOAPMessageImpl extends AbstractSOAPMessage implements SOAPMessageAbstraction
{
private boolean saveRequired = true;
private MimeHeaders mimeHeaders = new MimeHeaders();
16 years, 1 month
JBossWS SVN: r8748 - stack/native/branches/asoldano/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2008-11-18 03:42:58 -0500 (Tue, 18 Nov 2008)
New Revision: 8748
Modified:
stack/native/branches/asoldano/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/HandlerRegistryImpl.java
Log:
Prevent NPE
Modified: stack/native/branches/asoldano/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/HandlerRegistryImpl.java
===================================================================
--- stack/native/branches/asoldano/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/HandlerRegistryImpl.java 2008-11-18 08:42:38 UTC (rev 8747)
+++ stack/native/branches/asoldano/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/HandlerRegistryImpl.java 2008-11-18 08:42:58 UTC (rev 8748)
@@ -117,8 +117,11 @@
// copy headers
Set<QName> headers = new HashSet<QName>();
- for (QName header : info.getHeaders())
- headers.add(header);
+ if (info.getHeaders() != null)
+ {
+ for (QName header : info.getHeaders())
+ headers.add(header);
+ }
handler.setSoapHeaders(headers);
// copy init params
16 years, 1 month
JBossWS SVN: r8747 - stack/native/branches/asoldano/modules/core/src/main/java/org/jboss/ws/core.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2008-11-18 03:42:38 -0500 (Tue, 18 Nov 2008)
New Revision: 8747
Modified:
stack/native/branches/asoldano/modules/core/src/main/java/org/jboss/ws/core/CommonMessageContext.java
Log:
Rebuild message when not a message abstraction
Modified: stack/native/branches/asoldano/modules/core/src/main/java/org/jboss/ws/core/CommonMessageContext.java
===================================================================
--- stack/native/branches/asoldano/modules/core/src/main/java/org/jboss/ws/core/CommonMessageContext.java 2008-11-18 08:40:52 UTC (rev 8746)
+++ stack/native/branches/asoldano/modules/core/src/main/java/org/jboss/ws/core/CommonMessageContext.java 2008-11-18 08:42:38 UTC (rev 8747)
@@ -23,16 +23,23 @@
import org.jboss.logging.Logger;
import org.jboss.ws.core.binding.SerializationContext;
+import org.jboss.ws.core.soap.MessageFactoryImpl;
import org.jboss.ws.core.soap.attachment.SwapableMemoryDataSource;
import org.jboss.ws.extensions.xop.XOPContext;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
import org.jboss.ws.metadata.umdm.OperationMetaData;
+import org.jboss.wsf.common.DOMUtils;
import org.jboss.xb.binding.NamespaceRegistry;
+import org.w3c.dom.Element;
import javax.xml.soap.AttachmentPart;
+import javax.xml.soap.SOAPElement;
import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPMessage;
import javax.xml.ws.handler.MessageContext.Scope;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
@@ -122,15 +129,45 @@
public SOAPMessage getSOAPMessage()
{
if(message!=null && ((message instanceof SOAPMessage) == false))
- throw new UnsupportedOperationException("No SOAPMessage avilable. Current message context carries " + message.getClass());
+ throw new UnsupportedOperationException("No SOAPMessage available. Current message context carries " + message.getClass());
return (SOAPMessage)message;
}
public void setSOAPMessage(SOAPMessage soapMessage)
{
- this.message = (MessageAbstraction)soapMessage;
+ if (soapMessage instanceof MessageAbstraction)
+ {
+ this.message = (MessageAbstraction)soapMessage;
+ }
+ else
+ {
+ try
+ {
+ this.message = rebuild(soapMessage);
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ throw new RuntimeException();
+ }
+
+ }
+// this.message = (MessageAbstraction)soapMessage;
this.setModified(true);
}
+
+ private static MessageAbstraction rebuild(SOAPMessage message) throws Exception
+ {
+ if (message == null)
+ return null;
+ //TODO!!!! do this better...
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ message.writeTo(baos);
+ MessageFactoryImpl factory = new MessageFactoryImpl();
+ String mex = baos.toString("UTF-8");
+ System.out.println("REBUILDO!!!");
+ return (MessageAbstraction)factory.createMessage(message.getMimeHeaders(), new ByteArrayInputStream(mex.getBytes("UTF-8")));
+ }
public MessageAbstraction getMessageAbstraction()
{
16 years, 1 month
JBossWS SVN: r8746 - stack/native/branches/asoldano/modules/core/src/main/java/org/jboss/ws/extensions/addressing/soap.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2008-11-18 03:40:52 -0500 (Tue, 18 Nov 2008)
New Revision: 8746
Modified:
stack/native/branches/asoldano/modules/core/src/main/java/org/jboss/ws/extensions/addressing/soap/SOAPAddressingPropertiesImpl.java
Log:
Using SOAP Factory
Modified: stack/native/branches/asoldano/modules/core/src/main/java/org/jboss/ws/extensions/addressing/soap/SOAPAddressingPropertiesImpl.java
===================================================================
--- stack/native/branches/asoldano/modules/core/src/main/java/org/jboss/ws/extensions/addressing/soap/SOAPAddressingPropertiesImpl.java 2008-11-18 08:40:13 UTC (rev 8745)
+++ stack/native/branches/asoldano/modules/core/src/main/java/org/jboss/ws/extensions/addressing/soap/SOAPAddressingPropertiesImpl.java 2008-11-18 08:40:52 UTC (rev 8746)
@@ -219,7 +219,8 @@
{
try
{
- SOAPFactoryImpl factory = (SOAPFactoryImpl)SOAPFactory.newInstance();
+// SOAPFactoryImpl factory = (SOAPFactoryImpl)SOAPFactory.newInstance();
+ SOAPFactory factory = SOAPFactory.newInstance();
SOAPHeader soapHeader = message.getSOAPHeader();
// Add the xmlns:wsa declaration
16 years, 1 month
JBossWS SVN: r8745 - stack/native/branches/asoldano/modules/core/src/main/java/org/jboss/wsf/stack/jbws.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2008-11-18 03:40:13 -0500 (Tue, 18 Nov 2008)
New Revision: 8745
Modified:
stack/native/branches/asoldano/modules/core/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java
Log:
Temporary changing accessor
Modified: stack/native/branches/asoldano/modules/core/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java
===================================================================
--- stack/native/branches/asoldano/modules/core/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java 2008-11-18 08:29:51 UTC (rev 8744)
+++ stack/native/branches/asoldano/modules/core/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java 2008-11-18 08:40:13 UTC (rev 8745)
@@ -116,7 +116,7 @@
private ServerConfig serverConfig;
private MessageFactoryImpl msgFactory;
- RequestHandlerImpl()
+ public RequestHandlerImpl()
{
SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
serverConfig = spiProvider.getSPI(ServerConfigFactory.class).getServerConfig();
16 years, 1 month
JBossWS SVN: r8744 - in stack/metro/branches/asoldano: modules/client and 4 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2008-11-18 03:29:51 -0500 (Tue, 18 Nov 2008)
New Revision: 8744
Modified:
stack/metro/branches/asoldano/modules/client/pom.xml
stack/metro/branches/asoldano/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml
stack/metro/branches/asoldano/modules/server/pom.xml
stack/metro/branches/asoldano/modules/testsuite/pom.xml
stack/metro/branches/asoldano/pom.xml
stack/metro/branches/asoldano/src/main/scripts/assembly-deploy-artifacts.xml
Log:
Fix dependencies and deploy macros to use native jaxrpc
Modified: stack/metro/branches/asoldano/modules/client/pom.xml
===================================================================
--- stack/metro/branches/asoldano/modules/client/pom.xml 2008-11-18 08:29:00 UTC (rev 8743)
+++ stack/metro/branches/asoldano/modules/client/pom.xml 2008-11-18 08:29:51 UTC (rev 8744)
@@ -71,6 +71,11 @@
<groupId>org.codehaus.woodstox</groupId>
<artifactId>wstx-lgpl</artifactId>
</dependency>
+
+ <dependency>
+ <groupId>org.jboss.ws.native</groupId>
+ <artifactId>jbossws-native-client</artifactId>
+ </dependency>
<!-- jboss provided -->
<dependency>
Modified: stack/metro/branches/asoldano/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml
===================================================================
--- stack/metro/branches/asoldano/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml 2008-11-18 08:29:00 UTC (rev 8743)
+++ stack/metro/branches/asoldano/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml 2008-11-18 08:29:51 UTC (rev 8744)
@@ -46,6 +46,10 @@
<include name="**/stax-api.jar"/>
<include name="**/wsdl4j.jar"/>
<include name="**/wstx.jar"/>
+ <include name="**/jbossws-native-client.jar"/>
+ <include name="**/jbossws-native-core.jar"/>
+ <include name="**/jbossws-native-jaxrpc.jar"/>
+ <include name="**/apache-xmlsec.jar"/>
</patternset>
<patternset id="jbossws.lib.patternset">
@@ -99,6 +103,11 @@
<include name="**/wstx.jar"/>
<include name="**/xmlsec.jar"/>
<include name="**/xws-security.jar"/>
+ <include name="**/jbossws-native-client.jar"/>
+ <include name="**/jbossws-native-core.jar"/>
+ <include name="**/jbossws-native-jaxrpc.jar"/>
+ <include name="**/jbossws-native-jaxws-ext.jar"/>
+ <include name="**/apache-xmlsec.jar"/>
</patternset>
<!-- ================================================================== -->
Modified: stack/metro/branches/asoldano/modules/server/pom.xml
===================================================================
--- stack/metro/branches/asoldano/modules/server/pom.xml 2008-11-18 08:29:00 UTC (rev 8743)
+++ stack/metro/branches/asoldano/modules/server/pom.xml 2008-11-18 08:29:51 UTC (rev 8744)
@@ -93,6 +93,11 @@
<groupId>org.codehaus.woodstox</groupId>
<artifactId>wstx-lgpl</artifactId>
</dependency>
+
+ <dependency>
+ <groupId>org.jboss.ws.native</groupId>
+ <artifactId>jbossws-native-client</artifactId>
+ </dependency>
<!-- jboss provided -->
<dependency>
Modified: stack/metro/branches/asoldano/modules/testsuite/pom.xml
===================================================================
--- stack/metro/branches/asoldano/modules/testsuite/pom.xml 2008-11-18 08:29:00 UTC (rev 8743)
+++ stack/metro/branches/asoldano/modules/testsuite/pom.xml 2008-11-18 08:29:51 UTC (rev 8744)
@@ -74,6 +74,12 @@
<artifactId>wsit-rt</artifactId>
<scope>test</scope>
</dependency>
+
+ <dependency>
+ <groupId>org.jboss.ws.native</groupId>
+ <artifactId>jbossws-native-client</artifactId>
+ </dependency>
+
<!-- JAXR samples -->
<dependency>
<groupId>apache-scout</groupId>
Modified: stack/metro/branches/asoldano/pom.xml
===================================================================
--- stack/metro/branches/asoldano/pom.xml 2008-11-18 08:29:00 UTC (rev 8743)
+++ stack/metro/branches/asoldano/pom.xml 2008-11-18 08:29:51 UTC (rev 8744)
@@ -72,6 +72,7 @@
<sun.saaj.impl.version>1.3</sun.saaj.impl.version>
<woodstox.version>3.2.6</woodstox.version>
<wsdl4j.version>1.6.1</wsdl4j.version>
+ <jbossws.native.version>3.0.5-SNAPSHOT</jbossws.native.version>
</properties>
<!-- DependencyManagement -->
@@ -261,7 +262,25 @@
<artifactId>wstx-lgpl</artifactId>
<version>${woodstox.version}</version>
</dependency>
-
+
+ <!-- Native dependencies for JAX-RPC -->
+ <dependency>
+ <groupId>org.jboss.ws.native</groupId>
+ <artifactId>jbossws-native-client</artifactId>
+ <version>${jbossws.native.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.jboss.ws.native</groupId>
+ <artifactId>jbossws-native-saaj</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.jboss.ws.native</groupId>
+ <artifactId>jbossws-native-jaxws</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+
<!-- jboss provided -->
<dependency>
<groupId>jboss.common</groupId>
Modified: stack/metro/branches/asoldano/src/main/scripts/assembly-deploy-artifacts.xml
===================================================================
--- stack/metro/branches/asoldano/src/main/scripts/assembly-deploy-artifacts.xml 2008-11-18 08:29:00 UTC (rev 8743)
+++ stack/metro/branches/asoldano/src/main/scripts/assembly-deploy-artifacts.xml 2008-11-18 08:29:51 UTC (rev 8744)
@@ -49,6 +49,10 @@
<include>com.sun.xml.wsit:xws-security:jar</include>
<include>wsdl4j:wsdl4j:jar</include>
<include>junit:junit:jar</include>
+ <include>org.jboss.ws.native:jbossws-native-client:jar</include>
+ <include>org.jboss.ws.native:jbossws-native-core:jar</include>
+ <include>org.jboss.ws.native:jbossws-native-jaxrpc:jar</include>
+ <include>org.jboss.ws.native:jbossws-native-jaxws-ext:jar</include>
</includes>
</dependencySet>
<dependencySet>
@@ -58,6 +62,13 @@
<include>org.codehaus.woodstox:wstx-lgpl:jar</include>
</includes>
</dependencySet>
+ <dependencySet>
+ <outputFileNameMapping>apache-xmlsec.jar</outputFileNameMapping>
+ <useStrictFiltering>true</useStrictFiltering>
+ <includes>
+ <include>xml-security:xmlsec:jar</include>
+ </includes>
+ </dependencySet>
</dependencySets>
</binaries>
</moduleSet>
16 years, 1 month
JBossWS SVN: r8743 - stack/metro/branches/asoldano/modules/server/src/main/resources.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2008-11-18 03:29:00 -0500 (Tue, 18 Nov 2008)
New Revision: 8743
Modified:
stack/metro/branches/asoldano/modules/server/src/main/resources/jbossws-metro-config.xml
Log:
Modifing metro config xml to use new deployment aspects
Modified: stack/metro/branches/asoldano/modules/server/src/main/resources/jbossws-metro-config.xml
===================================================================
--- stack/metro/branches/asoldano/modules/server/src/main/resources/jbossws-metro-config.xml 2008-11-18 08:27:15 UTC (rev 8742)
+++ stack/metro/branches/asoldano/modules/server/src/main/resources/jbossws-metro-config.xml 2008-11-18 08:29:00 UTC (rev 8743)
@@ -54,12 +54,14 @@
<property name="provides">ContextProperties</property>
<property name="contextProperties">
<map keyClass="java.lang.String" valueClass="java.lang.String">
- <entry><key>org.jboss.ws.webapp.ServletClass</key><value>org.jboss.wsf.stack.metro.EndpointServlet</value></entry>
+ <entry><key>org.jboss.ws.webapp.jaxws.ServletClass</key><value>org.jboss.wsf.stack.metro.EndpointServlet</value></entry>
+ <entry><key>org.jboss.ws.webapp.jaxrpc.ServletClass</key><value>org.jboss.wsf.stack.jbws.EndpointServlet</value></entry>
</map>
</property>
</bean>
- <bean name="WSMetroEndpointHandlerDeploymentAspect" class="org.jboss.wsf.framework.deployment.EndpointHandlerDeploymentAspect">
+ <!-- <bean name="WSMetroEndpointHandlerDeploymentAspect" class="org.jboss.wsf.framework.deployment.EndpointHandlerDeploymentAspect"> -->
+ <bean name="WSMetroEndpointHandlerDeploymentAspect" class="org.jboss.wsf.stack.metro.MixEndpointHandlerDeploymentAspect">
<property name="requires">ContainerEndpointHandler</property>
<property name="provides">StackEndpointHandler</property>
</bean>
@@ -85,6 +87,45 @@
<property name="requires">RuntimeLoader, StackDescriptor</property>
<property name="provides">RuntimeModel</property>
</bean>
+
+ <!-- Native deployment aspects required for JAX-RPC support -->
+
+ <bean name="WSNativeEagerInitializeDeploymentAspect" class="org.jboss.wsf.stack.jbws.EagerInitializeDeploymentAspect">
+ <property name="requires">UnifiedMetaDataModel</property>
+ <property name="provides">InitializedMetaDataModel</property>
+ </bean>
+
+ <bean name="WSNativePublishContractDeploymentAspect" class="org.jboss.wsf.stack.jbws.PublishContractDeploymentAspect">
+ <property name="requires">UnifiedMetaDataModel</property>
+ <property name="provides">PublishedContract</property>
+ </bean>
+
+ <bean name="WSNativeServiceEndpointInvokerDeploymentAspect" class="org.jboss.wsf.stack.jbws.ServiceEndpointInvokerDeploymentAspect">
+ <property name="requires">UnifiedMetaDataModel</property>
+ </bean>
+
+ <bean name="WSNativeUnifiedMetaDataDeploymentAspect" class="org.jboss.wsf.stack.jbws.UnifiedMetaDataDeploymentAspect">
+ <property name="requires">RuntimeLoader, ContainerMetaData, URLPattern, VFSRoot</property>
+ <property name="provides">UnifiedMetaDataModel</property>
+ </bean>
+
+ <bean name="WSMetroEagerInitializeDeploymentAspect" class="org.jboss.wsf.stack.metro.JAXRPCDelegateDeploymentAspect">
+ <property name="delegate"><inject bean="WSNativeEagerInitializeDeploymentAspect"/></property>
+ </bean>
+
+ <bean name="WSMetroPublishContractDeploymentAspect" class="org.jboss.wsf.stack.metro.JAXRPCDelegateDeploymentAspect">
+ <property name="delegate"><inject bean="WSNativePublishContractDeploymentAspect"/></property>
+ </bean>
+
+ <bean name="WSMetroServiceEndpointInvokerDeploymentAspect" class="org.jboss.wsf.stack.metro.JAXRPCDelegateDeploymentAspect">
+ <property name="delegate"><inject bean="WSNativeServiceEndpointInvokerDeploymentAspect"/></property>
+ </bean>
+
+ <bean name="WSMetroUnifiedMetaDataDeploymentAspect" class="org.jboss.wsf.stack.metro.JAXRPCDelegateDeploymentAspect">
+ <property name="delegate"><inject bean="WSNativeUnifiedMetaDataDeploymentAspect"/></property>
+ </bean>
+
+
<!-- Deployment aspect installers -->
<!-- Phase 1 -->
@@ -109,6 +150,12 @@
<inject bean="WSMetroEndpointHandlerDeploymentAspect"/>
<inject bean="WSMetroEndpointRecordProcessorDeploymentAspect"/>
<inject bean="WSRuntimeModelDeploymentAspect"/>
+
+ <inject bean="WSMetroPublishContractDeploymentAspect"/>
+ <inject bean="WSMetroServiceEndpointInvokerDeploymentAspect"/>
+ <inject bean="WSMetroUnifiedMetaDataDeploymentAspect"/>
+ <inject bean="WSMetroEagerInitializeDeploymentAspect"/>
+
</set>
</property>
<depends>WSDeploymentAspectInstallerPostJSE</depends>
@@ -124,6 +171,12 @@
<inject bean="WSMetroEndpointRecordProcessorDeploymentAspect"/>
<inject bean="WSMetroDescriptorDeploymentAspect"/>
<inject bean="WSRuntimeModelDeploymentAspect"/>
+
+ <inject bean="WSMetroEagerInitializeDeploymentAspect"/>
+ <inject bean="WSMetroPublishContractDeploymentAspect"/>
+ <inject bean="WSMetroServiceEndpointInvokerDeploymentAspect"/>
+ <inject bean="WSMetroUnifiedMetaDataDeploymentAspect"/>
+
</set>
</property>
<depends>WSDeploymentAspectInstallerEJB</depends>
16 years, 1 month
JBossWS SVN: r8742 - stack/metro/branches/asoldano/modules/server/src/main/java/org/jboss/wsf/stack/metro.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2008-11-18 03:27:15 -0500 (Tue, 18 Nov 2008)
New Revision: 8742
Added:
stack/metro/branches/asoldano/modules/server/src/main/java/org/jboss/wsf/stack/metro/JAXRPCDelegateDeploymentAspect.java
stack/metro/branches/asoldano/modules/server/src/main/java/org/jboss/wsf/stack/metro/MixEndpointHandlerDeploymentAspect.java
Log:
Add deployment aspect for adapting native stuff to metro
Added: stack/metro/branches/asoldano/modules/server/src/main/java/org/jboss/wsf/stack/metro/JAXRPCDelegateDeploymentAspect.java
===================================================================
--- stack/metro/branches/asoldano/modules/server/src/main/java/org/jboss/wsf/stack/metro/JAXRPCDelegateDeploymentAspect.java (rev 0)
+++ stack/metro/branches/asoldano/modules/server/src/main/java/org/jboss/wsf/stack/metro/JAXRPCDelegateDeploymentAspect.java 2008-11-18 08:27:15 UTC (rev 8742)
@@ -0,0 +1,83 @@
+package org.jboss.wsf.stack.metro;
+
+import java.util.Set;
+
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.DeploymentAspect;
+import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
+
+public class JAXRPCDelegateDeploymentAspect extends DeploymentAspect
+{
+ private DeploymentAspect delegate;
+
+ private boolean canRun(Deployment dep)
+ {
+ DeploymentType dt = dep.getType();
+ return (!DeploymentType.JAXWS_JSE.equals(dt) && !DeploymentType.JAXWS_EJB3.equals(dt));
+ }
+
+ public String getProvides()
+ {
+ return delegate.getProvides();
+ }
+
+ public void setProvides(String provides)
+ {
+ delegate.setProvides(provides);
+ }
+
+ public String getRequires()
+ {
+ return delegate.getRequires();
+ }
+
+ public void setRequires(String requires)
+ {
+ delegate.setRequires(requires);
+ }
+
+ public void create(Deployment dep)
+ {
+ if (canRun(dep))
+ delegate.create(dep);
+ }
+
+ public void destroy(Deployment dep)
+ {
+ if (canRun(dep))
+ delegate.destroy(dep);
+ }
+
+ public void start(Deployment dep)
+ {
+ if (canRun(dep))
+ delegate.start(dep);
+ }
+
+ public void stop(Deployment dep)
+ {
+ if (canRun(dep))
+ delegate.stop(dep);
+ }
+
+ public Set<String> getProvidesAsSet()
+ {
+ return delegate.getProvidesAsSet();
+ }
+
+ public Set<String> getRequiresAsSet()
+ {
+ return delegate.getRequiresAsSet();
+ }
+
+ public DeploymentAspect getDelegate()
+ {
+ return delegate;
+ }
+
+ public void setDelegate(DeploymentAspect delegate)
+ {
+ this.delegate = delegate;
+ }
+
+}
Property changes on: stack/metro/branches/asoldano/modules/server/src/main/java/org/jboss/wsf/stack/metro/JAXRPCDelegateDeploymentAspect.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/metro/branches/asoldano/modules/server/src/main/java/org/jboss/wsf/stack/metro/MixEndpointHandlerDeploymentAspect.java
===================================================================
--- stack/metro/branches/asoldano/modules/server/src/main/java/org/jboss/wsf/stack/metro/MixEndpointHandlerDeploymentAspect.java (rev 0)
+++ stack/metro/branches/asoldano/modules/server/src/main/java/org/jboss/wsf/stack/metro/MixEndpointHandlerDeploymentAspect.java 2008-11-18 08:27:15 UTC (rev 8742)
@@ -0,0 +1,124 @@
+package org.jboss.wsf.stack.metro;
+
+import java.io.File;
+import java.net.URL;
+import java.net.URLClassLoader;
+
+import javax.xml.rpc.Stub;
+
+import org.jboss.wsf.spi.SPIProvider;
+import org.jboss.wsf.spi.SPIProviderResolver;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.DeploymentAspect;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.deployment.LifecycleHandler;
+import org.jboss.wsf.spi.deployment.LifecycleHandlerFactory;
+import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
+import org.jboss.wsf.spi.invocation.InvocationHandler;
+import org.jboss.wsf.spi.invocation.InvocationHandlerFactory;
+import org.jboss.wsf.spi.invocation.InvocationType;
+import org.jboss.wsf.spi.invocation.RequestHandler;
+import org.jboss.wsf.spi.invocation.RequestHandlerFactory;
+import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.EJBMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.MDBMetaData;
+
+public class MixEndpointHandlerDeploymentAspect extends DeploymentAspect
+{
+ private SPIProvider spiProvider;
+
+ public MixEndpointHandlerDeploymentAspect()
+ {
+ spiProvider = SPIProviderResolver.getInstance().getProvider();
+ }
+
+ @Override
+ public void create(Deployment dep)
+ {
+ ClassLoader tcl = Thread.currentThread().getContextClassLoader();
+ try
+ {
+ DeploymentType dt = dep.getType();
+ if (!DeploymentType.JAXWS_JSE.equals(dt) && !DeploymentType.JAXWS_EJB3.equals(dt))
+ {
+ //TODO!!!! do this better
+
+ for (Endpoint ep : dep.getService().getEndpoints())
+ {
+ // Associate a request handler
+ Class clazz = Class.forName("org.jboss.wsf.stack.jbws.RequestHandlerImpl");
+ ep.setRequestHandler((RequestHandler)clazz.newInstance());
+
+ // Associate a lifecycle handler
+ ep.setLifecycleHandler(getLifecycleHandler(dep));
+
+ // Associate an invocation handler
+ // Invocation handlers are assigned per container or per stack
+ InvocationHandler invocationHandler = getInvocationHandler(ep);
+ if (invocationHandler != null)
+ ep.setInvocationHandler(invocationHandler);
+
+ }
+
+ } else {
+
+ for (Endpoint ep : dep.getService().getEndpoints())
+ {
+ // Associate a request handler
+ ep.setRequestHandler(getRequestHandler(dep));
+
+ // Associate a lifecycle handler
+ ep.setLifecycleHandler(getLifecycleHandler(dep));
+
+ // Associate an invocation handler
+ // Invocation handlers are assigned per container or per stack
+ InvocationHandler invocationHandler = getInvocationHandler(ep);
+ if (invocationHandler != null)
+ ep.setInvocationHandler(invocationHandler);
+
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ }
+
+ private RequestHandler getRequestHandler(Deployment dep)
+ {
+ return spiProvider.getSPI(RequestHandlerFactory.class).newRequestHandler();
+ }
+
+ private LifecycleHandler getLifecycleHandler(Deployment dep)
+ {
+ return spiProvider.getSPI(LifecycleHandlerFactory.class).newLifecycleHandler();
+ }
+
+ private InvocationHandler getInvocationHandler(Endpoint ep)
+ {
+ Deployment dep = ep.getService().getDeployment();
+ DeploymentType depType = dep.getType();
+
+ String key = depType.toString();
+
+ // Use a special key for MDB endpoints
+ EJBArchiveMetaData uapp = dep.getAttachment(EJBArchiveMetaData.class);
+ if (uapp != null)
+ {
+ EJBMetaData bmd = uapp.getBeanByEjbName(ep.getShortName());
+ if (depType == DeploymentType.JAXRPC_EJB21 && bmd instanceof MDBMetaData)
+ {
+ key = InvocationType.JAXRPC_MDB21.toString();
+ }
+ else if (depType == DeploymentType.JAXWS_EJB3 && bmd instanceof MDBMetaData)
+ {
+ key = InvocationType.JAXWS_MDB3.toString();
+ }
+ }
+
+ InvocationType type = InvocationType.valueOf(key);
+ InvocationHandler invocationHandler = spiProvider.getSPI(InvocationHandlerFactory.class).newInvocationHandler(type);
+ return invocationHandler;
+ }
+}
Property changes on: stack/metro/branches/asoldano/modules/server/src/main/java/org/jboss/wsf/stack/metro/MixEndpointHandlerDeploymentAspect.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
16 years, 1 month
JBossWS SVN: r8741 - in stack/metro/branches/asoldano/modules/server/src/main/java/org/jboss/wsf/stack/metro: metadata and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2008-11-18 03:24:49 -0500 (Tue, 18 Nov 2008)
New Revision: 8741
Modified:
stack/metro/branches/asoldano/modules/server/src/main/java/org/jboss/wsf/stack/metro/SunJaxwsDeploymentAspect.java
stack/metro/branches/asoldano/modules/server/src/main/java/org/jboss/wsf/stack/metro/metadata/RuntimeModelDeploymentAspect.java
Log:
Run metro specific DA for JAXWS only
Modified: stack/metro/branches/asoldano/modules/server/src/main/java/org/jboss/wsf/stack/metro/SunJaxwsDeploymentAspect.java
===================================================================
--- stack/metro/branches/asoldano/modules/server/src/main/java/org/jboss/wsf/stack/metro/SunJaxwsDeploymentAspect.java 2008-11-18 08:23:50 UTC (rev 8740)
+++ stack/metro/branches/asoldano/modules/server/src/main/java/org/jboss/wsf/stack/metro/SunJaxwsDeploymentAspect.java 2008-11-18 08:24:49 UTC (rev 8741)
@@ -24,6 +24,7 @@
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.DeploymentAspect;
import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
import org.jboss.wsf.stack.metro.metadata.sunjaxws.DDEndpoint;
import org.jboss.wsf.stack.metro.metadata.sunjaxws.DDEndpoints;
import org.jboss.wsf.stack.metro.metadata.RuntimeModelDeploymentAspect;
@@ -47,6 +48,12 @@
@SuppressWarnings("unchecked")
public void create(Deployment dep)
{
+ DeploymentType dt = dep.getType();
+ if (!DeploymentType.JAXWS_JSE.equals(dt) && !DeploymentType.JAXWS_EJB3.equals(dt))
+ {
+ return;
+ }
+
DDEndpoints ddEndpoints = dep.getAttachment(DDEndpoints.class);
if (ddEndpoints == null)
{
@@ -80,6 +87,12 @@
@Override
public void destroy(Deployment dep)
{
+ DeploymentType dt = dep.getType();
+ if (!DeploymentType.JAXWS_JSE.equals(dt) && !DeploymentType.JAXWS_EJB3.equals(dt))
+ {
+ return;
+ }
+
DDEndpoints dd = dep.getAttachment(DDEndpoints.class);
if (dd != null)
{
Modified: stack/metro/branches/asoldano/modules/server/src/main/java/org/jboss/wsf/stack/metro/metadata/RuntimeModelDeploymentAspect.java
===================================================================
--- stack/metro/branches/asoldano/modules/server/src/main/java/org/jboss/wsf/stack/metro/metadata/RuntimeModelDeploymentAspect.java 2008-11-18 08:23:50 UTC (rev 8740)
+++ stack/metro/branches/asoldano/modules/server/src/main/java/org/jboss/wsf/stack/metro/metadata/RuntimeModelDeploymentAspect.java 2008-11-18 08:24:49 UTC (rev 8741)
@@ -38,6 +38,7 @@
import org.jboss.wsf.spi.deployment.DeploymentAspect;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
+import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
import org.jboss.wsf.stack.metro.DeploymentDescriptorParserExt;
import org.jboss.wsf.stack.metro.DeploymentDescriptorParserJBWS;
import org.jboss.wsf.stack.metro.MessageStreamAdapter;
@@ -74,6 +75,12 @@
public void start(Deployment deployment)
{
+ DeploymentType dt = deployment.getType();
+ if (!DeploymentType.JAXWS_JSE.equals(dt) && !DeploymentType.JAXWS_EJB3.equals(dt))
+ {
+ return;
+ }
+
ClassLoader runtimeLoader = deployment.getRuntimeClassLoader();
if(null == runtimeLoader)
throw new IllegalArgumentException("Null runtimeLoader");
16 years, 1 month
JBossWS SVN: r8740 - stack/metro/branches/asoldano/modules/client/src/main/java/org/jboss/wsf/stack/metro/client.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2008-11-18 03:23:50 -0500 (Tue, 18 Nov 2008)
New Revision: 8740
Modified:
stack/metro/branches/asoldano/modules/client/src/main/java/org/jboss/wsf/stack/metro/client/ServiceRefBinderFactoryImpl.java
Log:
Enable service-ref
Modified: stack/metro/branches/asoldano/modules/client/src/main/java/org/jboss/wsf/stack/metro/client/ServiceRefBinderFactoryImpl.java
===================================================================
--- stack/metro/branches/asoldano/modules/client/src/main/java/org/jboss/wsf/stack/metro/client/ServiceRefBinderFactoryImpl.java 2008-11-18 08:17:25 UTC (rev 8739)
+++ stack/metro/branches/asoldano/modules/client/src/main/java/org/jboss/wsf/stack/metro/client/ServiceRefBinderFactoryImpl.java 2008-11-18 08:23:50 UTC (rev 8740)
@@ -21,6 +21,7 @@
*/
package org.jboss.wsf.stack.metro.client;
+import org.jboss.ws.core.jaxrpc.client.NativeServiceRefBinderJAXRPC;
import org.jboss.wsf.spi.serviceref.ServiceRefBinder;
import org.jboss.wsf.spi.serviceref.ServiceRefBinderFactory;
import org.jboss.wsf.spi.serviceref.ServiceRefHandler.Type;
@@ -35,6 +36,8 @@
{
public ServiceRefBinder newServiceRefBinder(Type type)
{
- return (type == Type.JAXRPC ? new ServiceRefBinderJAXRPC() : new ServiceRefBinderJAXWS());
+ //TODO!!! Fix this, we shouldn't directly refer to native classes here
+ //return (type == Type.JAXRPC ? new ServiceRefBinderJAXRPC() : new ServiceRefBinderJAXWS());
+ return (type == Type.JAXRPC ? new NativeServiceRefBinderJAXRPC() : new ServiceRefBinderJAXWS());
}
}
16 years, 1 month