JBossWS SVN: r4509 - in stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm: spi and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2007-08-31 11:48:18 -0400 (Fri, 31 Aug 2007)
New Revision: 4509
Added:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/MessageFactory.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/Provider.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/AckRequested.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/CloseSequence.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/CloseSequenceResponse.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/CreateSequence.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/CreateSequenceResponse.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/IncompleteSequenceBehavior.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/Sequence.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/SequenceAcknowledgement.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/SequenceFault.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/SequenceFaultCode.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/TerminateSequence.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/TerminateSequenceResponse.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/XMLSerializable.java
Log:
Adding WS-RM SPI facade
Added: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/MessageFactory.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/MessageFactory.java (rev 0)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/MessageFactory.java 2007-08-31 15:48:18 UTC (rev 4509)
@@ -0,0 +1,101 @@
+/*
+ * 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.extensions.wsrm.spi;
+
+import org.jboss.ws.extensions.wsrm.spi.protocol.AckRequested;
+import org.jboss.ws.extensions.wsrm.spi.protocol.CloseSequence;
+import org.jboss.ws.extensions.wsrm.spi.protocol.CloseSequenceResponse;
+import org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequence;
+import org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequenceResponse;
+import org.jboss.ws.extensions.wsrm.spi.protocol.Sequence;
+import org.jboss.ws.extensions.wsrm.spi.protocol.SequenceAcknowledgement;
+import org.jboss.ws.extensions.wsrm.spi.protocol.SequenceFault;
+import org.jboss.ws.extensions.wsrm.spi.protocol.TerminateSequence;
+import org.jboss.ws.extensions.wsrm.spi.protocol.TerminateSequenceResponse;
+
+/**
+ * WS-RM protocol elements SPI facade. Each WS-RM provider must implement this interface.
+ *
+ * @author richard.opalka(a)jboss.com
+ */
+public interface MessageFactory
+{
+ /**
+ * Factory method
+ * @return new CreateSequence instance
+ */
+ CreateSequence newCreateSequence();
+
+ /**
+ * Factory method
+ * @return new CreateSequenceResponse instance
+ */
+ CreateSequenceResponse newCreateSequenceResponse();
+
+ /**
+ * Factory method
+ * @return new CloseSequence instance or null if this message is not supported by underlying WS-RM provider
+ */
+ CloseSequence newCloseSequence();
+
+ /**
+ * Factory method
+ * @return new CloseSequenceResponse instance or null if this message is not supported by underlying WS-RM provider
+ */
+ CloseSequenceResponse newCloseSequenceResponse();
+
+ /**
+ * Factory method
+ * @return new TerminateSequence instance
+ */
+ TerminateSequence newTerminateSequence();
+
+ /**
+ * Factory method
+ * @return new TerminateSequenceResponse instance or null if this message is not supported by underlying WS-RM provider
+ */
+ TerminateSequenceResponse newTerminateSequenceResponse();
+
+ /**
+ * Factory method
+ * @return new Sequence instance
+ */
+ Sequence newSequence();
+
+ /**
+ * Factory method
+ * @return new AckRequested instance
+ */
+ AckRequested newAckRequested();
+
+ /**
+ * Factory method
+ * @return new SequenceAcknowledgement instance
+ */
+ SequenceAcknowledgement newSequenceAcknowledgement();
+
+ /**
+ * Factory method
+ * @return new SequenceFault instance
+ */
+ SequenceFault newSequenceFault();
+}
Property changes on: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/MessageFactory.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/Provider.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/Provider.java (rev 0)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/Provider.java 2007-08-31 15:48:18 UTC (rev 4509)
@@ -0,0 +1,61 @@
+/*
+ * 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.extensions.wsrm.spi;
+
+/**
+ * WS-RM Provider SPI facade. Each WS-RM provider must override this class.
+ *
+ * @author richard.opalka(a)jboss.com
+ */
+public abstract class Provider
+{
+ /**
+ * Must be overriden in the subclasses
+ * @param targetNamespace
+ */
+ protected Provider(String targetNamespace)
+ {
+ }
+
+ /**
+ * Returns the namespace associated with current WS-RM provider implementation
+ * @return
+ */
+ public abstract String getNamespaceURI();
+
+ /**
+ * Returns WS-RM provider specific message factory
+ * @return message factory
+ */
+ public abstract MessageFactory getMessageFactory();
+
+ /**
+ * Gets WS-RM provider by <b>wsrmNamespace</b>
+ * @param namespace associated with the WS-RM provider
+ * @return WS-RM provider instance
+ * @throws IllegalArgumentException if specified <b>wsrmNamespace</b> has no associated WS-RM provider
+ */
+ public static Provider getInstance(String wsrmNamespace)
+ {
+ return null; // TODO: implement
+ }
+}
Property changes on: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/Provider.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/AckRequested.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/AckRequested.java (rev 0)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/AckRequested.java 2007-08-31 15:48:18 UTC (rev 4509)
@@ -0,0 +1,69 @@
+/*
+ * 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.extensions.wsrm.spi.protocol;
+
+/**
+ * <p><b>AckRequested</b> element requests an Acknowledgement for the identified Sequence.</p>
+ *
+ * The following infoset defines its syntax:
+ * <p><blockquote><pre>
+ * <wsrm:AckRequested ...>
+ * <wsrm:Identifier ...> xs:anyURI </wsrm:Identifier>
+ * <wsrm:MessageNumber> xs:unsignedLong </wsrm:MessageNumber> ?
+ * ...
+ * </wsrm:AckRequested>
+ * </pre></blockquote></p>
+ *
+ * @author richard.opalka(a)jboss.com
+ */
+public interface AckRequested extends XMLSerializable
+{
+ /**
+ * An RM Source that includes an <b>AckRequested</b> header block in a SOAP envelope MUST include
+ * this element in that header block. The RM Source MUST set the value of this element to the
+ * absolute URI, (conformant with RFC3986), that uniquely identifies the Sequence to which the
+ * request applies.
+ * @param identifier
+ */
+ void setIdentifier(String identifier);
+
+ /**
+ * Getter
+ * @return sequence identifier
+ */
+ String getIdentifier();
+
+ /**
+ * This optional element, if present, MUST contain an <b>xs:unsignedLong</b> representing the highest
+ * <b>MessageNumber</b> sent by the RM Source within a Sequence. If present, it MAY be treated
+ * as a hint to the RM Destination as an optimization to the process of preparing to transmit a
+ * <b>SequenceAcknowledgement</b>.
+ * @param lastMessageId
+ */
+ void setMessage(long lastMessageId);
+
+ /**
+ * Getter
+ * @return last message number in the sequence
+ */
+ long getMessage();
+}
Property changes on: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/AckRequested.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/CloseSequence.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/CloseSequence.java (rev 0)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/CloseSequence.java 2007-08-31 15:48:18 UTC (rev 4509)
@@ -0,0 +1,69 @@
+/*
+ * 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.extensions.wsrm.spi.protocol;
+
+/**
+ * <p><b>CloseSequence</b> element MAY be sent by an RM Source to indicate that the RM Destination MUST NOT
+ * accept any new messages for this Sequence This element MAY also be sent by an RM
+ * Destination to indicate that it will not accept any new messages for this Sequence.</p>
+ *
+ * The following infoset defines its syntax:
+ * <p><blockquote><pre>
+ * <wsrm:CloseSequence ...>
+ * <wsrm:Identifier ...> xs:anyURI </wsrm:Identifier>
+ * <wsrm:LastMsgNumber> wsrm:MessageNumberType </wsrm:LastMsgNumber> ?
+ * ...
+ * </wsrm:CloseSequence>
+ * </pre></blockquote></p>
+ *
+ * @author richard.opalka(a)jboss.com
+ */
+public interface CloseSequence extends XMLSerializable
+{
+ /**
+ * The RM Source or RM Destination MUST include this element in any <b>CloseSequence</b> messages it
+ * sends. The RM Source or RM Destination MUST set the value of this element to the absolute URI
+ * (conformant with RFC3986) of the closing Sequence.
+ * @param identifier
+ */
+ void setIdentifier(String identifier);
+
+ /**
+ * Getter
+ * @return sequence identifier
+ */
+ String getIdentifier();
+
+ /**
+ * The RM Source SHOULD include this element in any <b>CloseSequence</b> message it sends. The
+ * <b>LastMsgNumber</b> element specifies the highest assigned message number of all the Sequence
+ * Traffic Messages for the closing Sequence.
+ * @param lastMsgNumber
+ */
+ void setLastMsgNumber(long lastMsgNumber);
+
+ /**
+ * Getter
+ * @return last message number
+ */
+ void getLastMsgNumber();
+}
Property changes on: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/CloseSequence.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/CloseSequenceResponse.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/CloseSequenceResponse.java (rev 0)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/CloseSequenceResponse.java 2007-08-31 15:48:18 UTC (rev 4509)
@@ -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.extensions.wsrm.spi.protocol;
+
+/**
+ * <p><b>CloseSequenceResponse</b> element is sent in the body of a message in response to receipt of a <b>CloseSequence</b>
+ * request message. It indicates that the responder has closed the Sequence.</p>
+ *
+ * The following infoset defines its syntax:
+ * <p><blockquote><pre>
+ * <wsrm:CloseSequenceResponse ...>
+ * <wsrm:Identifier ...> xs:anyURI </wsrm:Identifier>
+ * ...
+ * </wsrm:CloseSequenceResponse>
+ * </pre></blockquote></p>
+ *
+ * @author richard.opalka(a)jboss.com
+ */
+public interface CloseSequenceResponse extends XMLSerializable
+{
+ /**
+ * The responder (RM Source or RM Destination) MUST include this element in any
+ * <b>CloseSequenceResponse</b> message it sends. The responder MUST set the value of this
+ * element to the absolute URI (conformant with RFC3986) of the closing Sequence.
+ * @param identifier
+ */
+ void setIdentifier(String identifier);
+
+ /**
+ * Getter
+ * @return sequence identifier
+ */
+ String getIdentifier();
+}
Property changes on: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/CloseSequenceResponse.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/CreateSequence.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/CreateSequence.java (rev 0)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/CreateSequence.java 2007-08-31 15:48:18 UTC (rev 4509)
@@ -0,0 +1,180 @@
+/*
+ * 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.extensions.wsrm.spi.protocol;
+
+/**
+ * <p><b>CreateSequence</b> element requests creation of a new Sequence between the RM Source that sends it, and the
+ * RM Destination to which it is sent. The RM Source MUST NOT send this element as a header
+ * block. The RM Destination MUST respond either with a <b>CreateSequenceResponse</b> response
+ * message or a <b>CreateSequenceRefused</b> fault.</p>
+ *
+ * The following infoset defines its syntax:
+ * <p><blockquote><pre>
+ * <wsrm:CreateSequence ...>
+ * <wsrm:AcksTo> wsa:EndpointReferenceType </wsrm:AcksTo>
+ * <wsrm:Expires ...> xs:duration </wsrm:Expires> ?
+ * <wsrm:Offer ...>
+ * <wsrm:Identifier ...> xs:anyURI </wsrm:Identifier>
+ * <wsrm:Endpoint> wsa:EndpointReferenceType </wsrm:Endpoint>
+ * <wsrm:Expires ...> xs:duration </wsrm:Expires> ?
+ * <wsrm:IncompleteSequenceBehavior>
+ * wsrm:IncompleteSequenceBehaviorType
+ * </wsrm:IncompleteSequenceBehavior> ?
+ * ...
+ * </wsrm:Offer> ?
+ * ...
+ * </wsrm:CreateSequence>
+ * </pre></blockquote></p>
+ *
+ * @author richard.opalka(a)jboss.com
+ */
+public interface CreateSequence extends XMLSerializable
+{
+ /**
+ * <p>The RM Source MUST include this element in any CreateSequence message it sends. This
+ * element is of type wsa:EndpointReferenceType (as specified by WS-Addressing). It specifies
+ * the endpoint reference to which messages containing SequenceAcknowledgement header
+ * blocks and faults related to the created Sequence are to be sent, unless otherwise noted in this
+ * specification.</p>
+ * <p>Implementations MUST NOT use an endpoint reference in the AcksTo element that would prevent
+ * the sending of Sequence Acknowledgements back to the RM Source. For example, using the WS-Addressing
+ * "http://www.w3.org/2005/08/addressing/none" URI would make it impossible for the RM
+ * Destination to ever send Sequence Acknowledgements.</p>
+ * @param address
+ */
+ void setAcksTo(String address);
+
+ /**
+ * Getter
+ * @return address
+ */
+ String getAcksTo();
+
+ /**
+ * This element, if present, of type <b>xs:duration</b> specifies the RM Source's requested duration for
+ * the Sequence. The RM Destination MAY either accept the requested duration or assign a lesser
+ * value of its choosing. A value of <b>"PT0S"</b> indicates that the Sequence will never expire. Absence of
+ * the element indicates an implied value of <b>"PT0S"</b>.
+ * @param duration
+ */
+ void setExpires(String duration);
+
+ /**
+ * Getter
+ * @return duration
+ */
+ String getExpires();
+
+ /**
+ * Factory method
+ * @return new instance of Offer
+ */
+ Offer newOffer();
+
+ /**
+ * Setter
+ * @param offer
+ */
+ void setOffer(Offer offer);
+
+ /**
+ * Getter
+ * @return offer
+ */
+ Offer getOffer();
+
+ /**
+ * This element, if present, enables an RM Source to offer a corresponding Sequence for the reliable
+ * exchange of messages Transmitted from RM Destination to RM Source.
+ */
+ interface Offer extends XMLSerializable
+ {
+ /**
+ * The RM Source MUST set the value of this element to an absolute URI (conformant with
+ * RFC3986 [URI]) that uniquely identifies the offered Sequence.
+ * @param identifier
+ */
+ void setIdentifier(String identifier);
+
+ /**
+ * Getter
+ * @return offered sequence identifier
+ */
+ String getIdentifier();
+
+ /**
+ * <p>An RM Source MUST include this element, of type <b>wsa:EndpointReferenceType</b> (as
+ * specified by WS-Addressing). This element specifies the endpoint reference to which Sequence
+ * Lifecycle Messages, Acknowledgement Requests, and fault messages related to the offered
+ * Sequence are to be sent.</p>
+ *
+ * <p>Implementations MUST NOT use an endpoint reference in the Endpoint element that would
+ * prevent the sending of Sequence Lifecycle Message, etc. For example, using the WS-Addressing
+ * "http://www.w3.org/2005/08/addressing/none" URI would make it impossible for the RM Destination
+ * to ever send Sequence Lifecycle Messages (e.g. <b>TerminateSequence</b>) to the RM Source for
+ * the Offered Sequence.</p>
+ *
+ * <p>The Offer of an Endpoint containing the "http://www.w3.org/2005/08/addressing/anonymous" URI
+ * as its address is problematic due to the inability of a source to connect to this address and retry
+ * unacknowledged messages. Note that this specification does not
+ * define any mechanisms for providing this assurance. In the absence of an extension that
+ * addresses this issue, an RM Destination MUST NOT accept (via the
+ * <b>/wsrm:CreateSequenceResponse/wsrm:Accept</b>) an Offer that
+ * contains the "http://www.w3.org/2005/08/addressing/anonymous" URI as its address.</p>
+ * @param address
+ */
+ void setEndpoint(String address);
+
+ /**
+ * Getter
+ * @return offered endpoint address
+ */
+ String getEndpoint();
+
+ /**
+ * This element, if present, of type <b>xs:duration</b> specifies the duration for the offered Sequence. A
+ * value of <b>"PT0S"</b> indicates that the offered Sequence will never expire. Absence of the element
+ * indicates an implied value of <b>"PT0S"</b>.
+ * @param duration
+ */
+ void setExpires(String duration);
+
+ /**
+ * Getter
+ * @return offered sequence duration
+ */
+ String getExpires();
+
+ /**
+ * This element, if present, specifies the behavior that the destination will exhibit upon the closure or
+ * termination of an incomplete Sequence.
+ * @param incompleteSequenceBehavior
+ */
+ void setIncompleteSequenceBehavior(IncompleteSequenceBehavior incompleteSequenceBehavior);
+
+ /**
+ * Getter
+ * @return offered incomplete sequence behavior
+ */
+ IncompleteSequenceBehavior getIncompleteSequenceBehavior();
+ }
+}
Property changes on: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/CreateSequence.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/CreateSequenceResponse.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/CreateSequenceResponse.java (rev 0)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/CreateSequenceResponse.java 2007-08-31 15:48:18 UTC (rev 4509)
@@ -0,0 +1,144 @@
+/*
+ * 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.extensions.wsrm.spi.protocol;
+
+/**
+ * <p><b>CreateSequenceResponse</b> element is sent in the body of the response message in response to a <b>CreateSequence</b>
+ * request message. It indicates that the RM Destination has created a new Sequence at the
+ * request of the RM Source. The RM Destination MUST NOT send this element as a header block.</p>
+ *
+ * The following infoset defines its syntax:
+ * <p><blockquote><pre>
+ * <CreateSequenceResponse ...>
+ * <wsrm:Identifier ...> xs:anyURI </wsrm:Identifier>
+ * <wsrm:Expires ...> xs:duration </wsrm:Expires> ?
+ * <wsrm:IncompleteSequenceBehavior>
+ * wsrm:IncompleteSequenceBehaviorType
+ * </wsrm:IncompleteSequenceBehavior> ?
+ * <wsrm:Accept ...>
+ * <wsrm:AcksTo> wsa:EndpointReferenceType </wsrm:AcksTo>
+ * ...
+ * </wsrm:Accept> ?
+ * ...
+ * </CreateSequenceResponse>
+ * </pre></blockquote></p>
+ *
+ * @author richard.opalka(a)jboss.com
+ */
+public interface CreateSequenceResponse extends XMLSerializable
+{
+ /**
+ * The RM Destination MUST include this element within any CreateSequenceResponse message it
+ * sends. The RM Destination MUST set the value of this element to the absolute URI (conformant
+ * with RFC3986) that uniquely identifies the Sequence that has been created by the RM Destination.
+ * @param identifier
+ */
+ void setIdentifier(String identifier);
+
+ /**
+ * Getter
+ * @return sequence identifier
+ */
+ String getIdentifier();
+
+ /**
+ * This element, if present, of type <b>xs:duration</b> accepts or refines the RM Source's requested
+ * duration for the Sequence. It specifies the amount of time after which any resources associated
+ * with the Sequence SHOULD be reclaimed thus causing the Sequence to be silently terminated. At
+ * the RM Destination this duration is measured from a point proximate to Sequence creation and at
+ * the RM Source this duration is measured from a point approximate to the successful processing of
+ * the <b>CreateSequenceResponse</b>. A value of "PT0S" indicates that the Sequence will never
+ * expire. Absence of the element indicates an implied value of "PT0S". The RM Destination MUST
+ * set the value of this element to be equal to or less than the value requested by the RM Source in
+ * the corresponding <b>CreateSequence</b> message.
+ * @param duration
+ */
+ void setExpires(String duration);
+
+ /**
+ * Getter
+ * @return sequence duration
+ */
+ String getDuration();
+
+ /**
+ * This element, if present, specifies the behavior that the destination will exhibit upon the closure or
+ * termination of an incomplete Sequence.
+ * @param incompletSequenceBehaviour
+ */
+ void setIncompleteSequenceBehavior(IncompleteSequenceBehavior incompletSequenceBehaviour);
+
+ /**
+ * Getter
+ * @return used incomplete sequence behavior type
+ */
+ IncompleteSequenceBehavior getIncompleteSequenceBehavior();
+
+ /**
+ * Factory method
+ * @return new instance of accept
+ */
+ Accept newAccept();
+
+ /**
+ * Setter
+ * @param accept
+ */
+ void setAccept(Accept accept);
+
+ /**
+ * Getter
+ * @return accept
+ */
+ Accept getAccept();
+
+ /**
+ * <p>This element, if present, enables an RM Destination to accept the offer of a corresponding
+ * Sequence for the reliable exchange of messages Transmitted from RM Destination to RM Source.</p>
+ *
+ * <p>Note: If a <b>CreateSequenceResponse</b> is returned without a child Accept in response to a
+ * <b>CreateSequence</b> that did contain a child Offer, then the RM Source MAY immediately reclaim
+ * any resources associated with the unused offered Sequence.</p>
+ */
+ interface Accept extends XMLSerializable
+ {
+ /**
+ * <p>The RM Destination MUST include this element, of type <b>wsa:EndpointReferenceType</b> (as
+ * specified by WS-Addressing). It specifies the endpoint reference to which messages containing
+ * <b>SequenceAcknowledgement</b> header blocks and faults related to the created Sequence are to
+ * be sent, unless otherwise noted in this specification.</p>
+ *
+ * <p>Implementations MUST NOT use an endpoint reference in the AcksTo element that would prevent
+ * the sending of Sequence Acknowledgements back to the RM Source. For example, using the
+ * WS-Addressing "http://www.w3.org/2005/08/addressing/none" URI would make it impossible for the RM
+ * Destination to ever send Sequence Acknowledgements.</p>
+ * @param address
+ */
+ void setAcksTo(String address);
+
+ /**
+ * Getter
+ * @return address
+ */
+ String getAcksTo();
+ }
+}
Property changes on: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/CreateSequenceResponse.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/IncompleteSequenceBehavior.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/IncompleteSequenceBehavior.java (rev 0)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/IncompleteSequenceBehavior.java 2007-08-31 15:48:18 UTC (rev 4509)
@@ -0,0 +1,61 @@
+/*
+ * 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.extensions.wsrm.spi.protocol;
+
+/**
+ * <p>This element, if present, specifies the behavior that the destination will exhibit upon the closure or
+ * termination of an incomplete Sequence. For the purposes of defining the values used, the term
+ * "discard" refers to behavior equivalent to the Application Destination never processing a particular message.</p>
+ *
+ * The following schema snippet defines allowed values:
+ * <p><blockquote><pre>
+ * <xs:simpleType name="IncompleteSequenceBehaviorType">
+ * <xs:restriction base="xs:string">
+ * <xs:enumeration value="DiscardEntireSequence"/>
+ * <xs:enumeration value="DiscardFollowingFirstGap"/>
+ * <xs:enumeration value="NoDiscard"/>
+ * </xs:restriction>
+ * </xs:simpleType>
+ * </pre></blockquote></p>
+ *
+ * @author richard.opalka(a)jboss.com
+ */
+public enum IncompleteSequenceBehavior
+{
+ /**
+ * A value of <b>"DiscardEntireSequence"</b> indicates that the entire Sequence MUST be discarded if the
+ * Sequence is closed, or terminated, when there are one or more gaps in the final <b>SequenceAcknowledgement</b>.
+ */
+ DISCARD_ENTIRE_SEQUENCE,
+
+ /**
+ * A value of <b>"DiscardFollowingFirstGap"</b> indicates that messages in the Sequence beyond the first
+ * gap MUST be discarded when there are one or more gaps in the final <b>SequenceAcknowledgement</b>.
+ */
+ DISCARD_FOLLOWING_FIRST_GAP,
+
+ /**
+ * The default value of <b>"NoDiscard"</b> indicates that no acknowledged messages in the Sequence will
+ * be discarded.
+ */
+ NO_DISCARD
+}
\ No newline at end of file
Property changes on: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/IncompleteSequenceBehavior.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/Sequence.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/Sequence.java (rev 0)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/Sequence.java 2007-08-31 15:48:18 UTC (rev 4509)
@@ -0,0 +1,86 @@
+/*
+ * 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.extensions.wsrm.spi.protocol;
+
+/**
+ * <p><b>Sequence</b> protocol element associates the message in which it is contained with a previously
+ * established RM Sequence. It contains the Sequence's unique identifier and the containing
+ * message's ordinal position within that Sequence. The RM Destination MUST understand the
+ * <b>Sequence</b> header block. The RM Source MUST assign a <b>mustUnderstand</b> attribute with a
+ * value 1/true (from the namespace corresponding to the version of SOAP to which the <b>Sequence</b>
+ * SOAP header block is bound) to the <b>Sequence</b> header block element.</p>
+ *
+ * The following infoset defines its syntax:
+ * <p><blockquote><pre>
+ * <wsrm:Sequence ...>
+ * <wsrm:Identifier ...> xs:anyURI </wsrm:Identifier>
+ * <wsrm:MessageNumber> wsrm:MessageNumberType </wsrm:MessageNumber>
+ * <wsrm:LastMessage/> ?
+ * ...
+ * </wsrm:Sequence>
+ * </pre></blockquote></p>
+ *
+ * @author richard.opalka(a)jboss.com
+ */
+public interface Sequence extends XMLSerializable
+{
+ /**
+ * An RM Source that includes a <b>Sequence</b> header block in a SOAP envelope MUST include this
+ * element in that header block. The RM Source MUST set the value of this element to the absolute
+ * URI (conformant with RFC3986) that uniquely identifies the Sequence.
+ * @param identifier
+ */
+ void setIdentifier(String identifier);
+
+ /**
+ * Getter
+ * @return sequence identifier
+ */
+ String getIdentifier();
+
+ /**
+ * The RM Source MUST include this element within any Sequence headers it creates. This element
+ * is of type <b>MessageNumberType</b>. It represents the ordinal position of the message within a
+ * Sequence. Sequence message numbers start at 1 and monotonically increase by 1 throughout
+ * the Sequence.
+ * @param messageNumber
+ */
+ void setMessageNumber(long messageNumber);
+
+ /**
+ * Getter
+ * @return message number within specified sequence
+ */
+ long getMessageNumber();
+
+ /**
+ * This element MAY be included by the RM Source endpoint. The <b>LastMessage</b> element has no content.
+ * @param lastMessage
+ */
+ void setLastMessage(boolean lastMessage);
+
+ /**
+ * Getter
+ * @return last message indicator
+ */
+ boolean isLastMessage();
+}
Property changes on: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/Sequence.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/SequenceAcknowledgement.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/SequenceAcknowledgement.java (rev 0)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/SequenceAcknowledgement.java 2007-08-31 15:48:18 UTC (rev 4509)
@@ -0,0 +1,172 @@
+/*
+ * 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.extensions.wsrm.spi.protocol;
+
+import java.util.List;
+
+/**
+ *
+ * <p><b>wsrm:SequenceAcknowledgement</b> element contains the sequence acknowledgement information</p>
+ *
+ * The following infoset defines its syntax:
+ * <p><blockquote><pre>
+ * <wsrm:SequenceAcknowledgement ...>
+ * <wsrm:Identifier ...> xs:anyURI </wsrm:Identifier>
+ * [ [ [ <wsrm:AcknowledgementRange ...
+ * Upper="wsrm:MessageNumberType"
+ * Lower="wsrm:MessageNumberType"/> +
+ * | <wsrm:None/> ]
+ * <wsrm:Final/> ? ]
+ * | <wsrm:Nack> wsrm:MessageNumberType </wsrm:Nack> + ]
+ *
+ * ...
+ * </wsrm:SequenceAcknowledgement>
+ * </pre></blockquote></p>
+ *
+ * @author richard.opalka(a)jboss.com
+ */
+public interface SequenceAcknowledgement extends XMLSerializable
+{
+ /**
+ * An RM Destination that includes a <b>SequenceAcknowledgement</b> header block in a SOAP
+ * envelope MUST include this element in that header block. The RM Destination MUST set the
+ * value of this element to the absolute URI (conformant with RFC3986) that uniquely identifies the
+ * Sequence. The RM Destination MUST NOT include multiple <b>SequenceAcknowledgement</b>
+ * header blocks that share the same value for <b>Identifier</b> within the same SOAP envelope.
+ * @param identifier
+ */
+ void setIdentifier(String identifier);
+
+ /**
+ * Getter
+ * @return sequence identifier
+ */
+ String getIdentifier();
+
+ /**
+ * The RM Destination MAY include this element within a <b>SequenceAcknowledgement</b> header
+ * block. This element indicates that the RM Destination is not receiving new messages for the
+ * specified Sequence. The RM Source can be assured that the ranges of messages acknowledged
+ * by this SequenceAcknowledgement header block will not change in the future. The RM
+ * Destination MUST include this element when the Sequence is closed. The RM Destination MUST
+ * NOT include this element when sending a <b>Nack</b>; it can only be used when sending
+ * <b>AcknowledgementRange</b> elements or a <b>None</b>.
+ * @param isFinal
+ */
+ void setFinal(boolean isFinal);
+
+ /**
+ * Getter
+ * @return true if <b>SequenceAcknowledgement</b> is <b>Final</b>, false otherwise
+ */
+ boolean isFinal();
+
+ /**
+ * The RM Destination MUST include this element within a <b>SequenceAcknowledgement</b> header
+ * block if the RM Destination has not accepted any messages for the specified Sequence. The RM
+ * Destination MUST NOT include this element if a sibling <b>AcknowledgementRange</b> or <b>Nack</b>
+ * element is also present as a child of the <b>SequenceAcknowledgement</b>.
+ * @param isNone
+ */
+ void setNone(boolean isNone);
+
+ /**
+ * Getter
+ * @return true if <b>SequenceAcknowledgement</b> is <b>None</b>, false otherwise
+ */
+ boolean isNone();
+
+ /**
+ * The RM Destination MAY include this element within a <b>SequenceAcknowledgement</b> header
+ * block. If used, the RM Destination MUST set the value of this element to a <b>MessageNumberType</b>
+ * representing the <b>MessageNumber</b> of an unreceived message in a Sequence. The RM Destination
+ * MUST NOT include a <b>Nack</b> element if a sibling <b>AcknowledgementRange</b> or <b>None</b> element is
+ * also present as a child of <b>SequenceAcknowledgement</b>. Upon the receipt of a <b>Nack</b>, an RM
+ * Source SHOULD retransmit the message identified by the <b>Nack</b>. The RM Destination MUST NOT
+ * issue a <b>SequenceAcknowledgement</b> containing a <b>Nack</b> for a message that it has previously
+ * acknowledged within an <b>AcknowledgementRange</b>. The RM Source SHOULD ignore a
+ * <b>SequenceAcknowledgement</b> containing a <b>Nack</b> for a message that has previously been
+ * acknowledged within an <b>AcknowledgementRange</b>.
+ * @param messageNumber
+ */
+ void addNack(long messageNumber);
+
+ /**
+ * Getter
+ * @return list of not ackonwledged message numbers
+ */
+ List<Long> getNacks();
+
+ /**
+ * Factory method
+ * @return new instance of AcknowledgementRange
+ */
+ AcknowledgementRange newAcknowledgementRange();
+
+ /**
+ * Setter
+ * @param acknowledgementRange
+ */
+ void addAcknowledgementRange(AcknowledgementRange acknowledgementRange);
+
+ /**
+ * Getter
+ * @return list of acknowledged ranges
+ */
+ List<AcknowledgementRange> getAcknowledgementRanges();
+
+ /**
+ * The RM Destination MAY include one or more instances of this element within a
+ * <b>SequenceAcknowledgement</b> header block. It contains a range of Sequence message numbers
+ * successfully accepted by the RM Destination. The ranges MUST NOT overlap. The RM
+ * Destination MUST NOT include this element if a sibling <b>Nack</b> or <b>None</b> element is also present as
+ * a child of <b>SequenceAcknowledgement</b>.
+ */
+ interface AcknowledgementRange extends XMLSerializable
+ {
+ /**
+ * The RM Destination MUST set the value of this attribute equal to the message number of the
+ * highest contiguous message in a Sequence range accepted by the RM Destination.
+ * @param upper
+ */
+ void setUpper(long upper);
+
+ /**
+ * Getter
+ * @return upper value
+ */
+ long getUpper();
+
+ /**
+ * The RM Destination MUST set the value of this attribute equal to the message number of the
+ * lowest contiguous message in a Sequence range accepted by the RM Destination.
+ * @param lower
+ */
+ void setLower(long lower);
+
+ /**
+ * Getter
+ * @return lower value
+ */
+ long getLower();
+ }
+}
Property changes on: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/SequenceAcknowledgement.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/SequenceFault.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/SequenceFault.java (rev 0)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/SequenceFault.java 2007-08-31 15:48:18 UTC (rev 4509)
@@ -0,0 +1,69 @@
+/*
+ * 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.extensions.wsrm.spi.protocol;
+
+/**
+ * <p><b>SequenceFault</b> element purpose is to carry the specific details of a fault generated during the
+ * reliable messaging specific processing of a message belonging to a Sequence. WS-ReliableMessaging
+ * nodes MUST use the <b>SequenceFault</b> container only in conjunction with the SOAP 1.1 fault mechanism.
+ * WS-ReliableMessaging nodes MUST NOT use the <b>SequenceFault</b> container in conjunction with the
+ * SOAP 1.2 binding.</p>
+ *
+ * The following infoset defines its syntax:
+ * <p><blockquote><pre>
+ * <SequenceFault ...>
+ * <wsrm:FaultCode> wsrm:FaultCode </wsrm:FaultCode>
+ * <wsrm:Detail> ... </wsrm:Detail> ?
+ * ...
+ * </SequenceFault>
+ * </pre></blockquote></p>
+ *
+ * @author richard.opalka(a)jboss.com
+ */
+public interface SequenceFault extends XMLSerializable
+{
+ /**
+ * WS-ReliableMessaging nodes that generate a <b>SequenceFault</b> MUST set the value of this
+ * element to a qualified name from the set of faults [Subcodes] defined below.
+ * @param faultCode
+ */
+ void setFaultCode(SequenceFaultCode faultCode);
+
+ /**
+ * Getter
+ * @return sequence fault code
+ */
+ SequenceFaultCode getFaultCode();
+
+ /**
+ * This element, if present, carries application specific error information
+ * related to the fault being described.
+ * @param detail
+ */
+ void setDetail(Exception detail);
+
+ /**
+ * Getter
+ * @return application specific fault detail
+ */
+ Exception getDetail();
+}
Property changes on: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/SequenceFault.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/SequenceFaultCode.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/SequenceFaultCode.java (rev 0)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/SequenceFaultCode.java 2007-08-31 15:48:18 UTC (rev 4509)
@@ -0,0 +1,71 @@
+/*
+ * 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.extensions.wsrm.spi.protocol;
+
+/**
+ * WS-ReliableMessaging nodes that generate a <b>SequenceFault</b> MUST set the value of this
+ * element to a qualified name from the set of faults [Subcodes] defined below.
+ *
+ * @author richard.opalka(a)jboss.com
+ */
+public enum SequenceFaultCode
+{
+ /**
+ * Sequence terminated
+ */
+ SEQUENCE_TERMINATED,
+
+ /**
+ * Unknown sequence
+ */
+ UNKNOWN_SEQUENCE,
+
+ /**
+ * Invalid acknowledgement
+ */
+ INVALID_ACKNOWLEDGEMENT,
+
+ /**
+ * Message number rollover
+ */
+ MESSAGE_NUMBER_ROLLOVER,
+
+ /**
+ * Create sequence refused
+ */
+ CREATE_SEQUENCE_REFUSED,
+
+ /**
+ * Sequence closed
+ */
+ SEQUENCE_CLOSED,
+
+ /**
+ * WSRM required
+ */
+ WSRM_REQUIRED,
+
+ /**
+ * Last message number exceeded
+ */
+ LAST_MESSAGE_NUMBER_EXCEEDED
+}
Property changes on: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/SequenceFaultCode.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/TerminateSequence.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/TerminateSequence.java (rev 0)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/TerminateSequence.java 2007-08-31 15:48:18 UTC (rev 4509)
@@ -0,0 +1,78 @@
+/*
+ * 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.extensions.wsrm.spi.protocol;
+
+/**
+ * <p><b>TerminateSequence</b> MAY be sent by an RM Source to indicate it has completed its use of the Sequence.
+ * It indicates that the RM Destination can safely reclaim any resources related to the identified
+ * Sequence. The RM Source MUST NOT send this element as a header block. The RM Source
+ * MAY retransmit this element. Once this element is sent, other than this element, the RM Source
+ * MUST NOT send any additional message to the RM Destination referencing this Sequence.</p>
+ *
+ * <p>This element MAY also be sent by the RM Destination to indicate that it has unilaterally
+ * terminated the Sequence. Upon sending this message the RM Destination MUST NOT accept
+ * any additional messages (with the exception of the corresponding
+ * <b>TerminateSequenceResponse</b>) for this Sequence. Upon receipt of a <b>TerminateSequence</b>
+ * the RM Source MUST NOT send any additional messages (with the exception of the
+ * corresponding <b>TerminateSequenceResponse</b>) for this Sequence.</p>
+ *
+ * The following infoset defines its syntax:
+ * <p><blockquote><pre>
+ * <wsrm:TerminateSequence ...>
+ * <wsrm:Identifier ...> xs:anyURI </wsrm:Identifier>
+ * <wsrm:LastMsgNumber> wsrm:MessageNumberType </wsrm:LastMsgNumber> ?
+ * ...
+ * </wsrm:TerminateSequence>
+ * </pre></blockquote></p>
+ *
+ * @author richard.opalka(a)jboss.com
+ */
+public interface TerminateSequence extends XMLSerializable
+{
+ /**
+ * The RM Source or RM Destination MUST include this element in any TerminateSequence
+ * message it sends. The RM Source or RM Destination MUST set the value of this element to the
+ * absolute URI (conformant with RFC3986) of the terminating Sequence.
+ * @param identifier
+ */
+ void setIdentifier(String identifier);
+
+ /**
+ * Getter
+ * @return sequence identifier
+ */
+ String getIdentifier();
+
+ /**
+ * The RM Source SHOULD include this element in any TerminateSequence message it sends. The
+ * <b>LastMsgNumber</b> element specifies the highest assigned message number of all the Sequence
+ * Traffic Messages for the terminating Sequence.
+ * @param lastMsgNumber
+ */
+ void setLastMsgNumber(long lastMsgNumber);
+
+ /**
+ * Getter
+ * @return last message number
+ */
+ void getLastMsgNumber();
+}
Property changes on: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/TerminateSequence.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/TerminateSequenceResponse.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/TerminateSequenceResponse.java (rev 0)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/TerminateSequenceResponse.java 2007-08-31 15:48:18 UTC (rev 4509)
@@ -0,0 +1,54 @@
+/*
+ * 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.extensions.wsrm.spi.protocol;
+
+/**
+ * <p><b>TerminateSequenceResponse</b> is sent in the body of a message in response to receipt of a <b>TerminateSequence</b>
+ * request message. It indicates that the responder has terminated the Sequence. The responder
+ * MUST NOT send this element as a header block.</p>
+ *
+ * The following infoset defines its syntax:
+ * <p><blockquote><pre>
+ * <wsrm:TerminateSequenceResponse ...>
+ * <wsrm:Identifier ...> xs:anyURI </wsrm:Identifier>
+ * ...
+ * </wsrm:TerminateSequenceResponse>
+ * </pre></blockquote></p>
+ *
+ * @author richard.opalka(a)jboss.com
+ */
+public interface TerminateSequenceResponse extends XMLSerializable
+{
+ /**
+ * The responder (RM Source or RM Destination) MUST include this element in any
+ * <b>TerminateSequenceResponse</b> message it sends. The responder MUST set the value of this
+ * element to the absolute URI (conformant with RFC3986) of the terminating Sequence.
+ * @param identifier
+ */
+ void setIdentifier(String identifier);
+
+ /**
+ * Getter
+ * @return sequence identifier
+ */
+ String getIdentifier();
+}
Property changes on: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/TerminateSequenceResponse.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/XMLSerializable.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/XMLSerializable.java (rev 0)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/XMLSerializable.java 2007-08-31 15:48:18 UTC (rev 4509)
@@ -0,0 +1,44 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.extensions.wsrm.spi.protocol;
+
+import org.w3c.dom.Element;
+
+/**
+ * This interface identifies classes that are de/serializable from/to W3C DOM elements
+ *
+ * @author richard.opalka(a)jboss.com
+ */
+public interface XMLSerializable
+{
+ /**
+ * Serialize object instance to the W3C DOM element
+ * @return W3C DOM element
+ */
+ Element toXML();
+
+ /**
+ * Deserialize object instance from W3C DOM element
+ * @param e W3C DOM element
+ */
+ void fromXML(Element e);
+}
Property changes on: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/XMLSerializable.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
17 years, 3 months
JBossWS SVN: r4508 - stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2007-08-31 11:47:29 -0400 (Fri, 31 Aug 2007)
New Revision: 4508
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMChannelRequest.java
Log:
Fix
Modified: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMChannelRequest.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMChannelRequest.java 2007-08-29 18:39:18 UTC (rev 4507)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMChannelRequest.java 2007-08-31 15:47:29 UTC (rev 4508)
@@ -97,7 +97,7 @@
client.disconnect();
// trace the incomming response message
- if (rmResponse != null && rmResponse.getPayload() != null)
+ if (rmResponse != null)
MessageTrace.traceMessage("Incoming RM Response Message", rmResponse.getPayload());
return new RMChannelResponse(rmResponse);
17 years, 3 months
JBossWS SVN: r4507 - stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2007-08-29 14:39:18 -0400 (Wed, 29 Aug 2007)
New Revision: 4507
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMChannelRequest.java
Log:
fix
Modified: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMChannelRequest.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMChannelRequest.java 2007-08-29 16:30:42 UTC (rev 4506)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMChannelRequest.java 2007-08-29 18:39:18 UTC (rev 4507)
@@ -97,7 +97,8 @@
client.disconnect();
// trace the incomming response message
- MessageTrace.traceMessage("Incoming RM Response Message", rmResponse.getPayload());
+ if (rmResponse != null && rmResponse.getPayload() != null)
+ MessageTrace.traceMessage("Incoming RM Response Message", rmResponse.getPayload());
return new RMChannelResponse(rmResponse);
}
17 years, 3 months
JBossWS SVN: r4506 - stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/core.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2007-08-29 12:30:42 -0400 (Wed, 29 Aug 2007)
New Revision: 4506
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/core/MessageTrace.java
Log:
adding new functionality to the trace message utility
Modified: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/core/MessageTrace.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/core/MessageTrace.java 2007-08-29 16:29:55 UTC (rev 4505)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/core/MessageTrace.java 2007-08-29 16:30:42 UTC (rev 4506)
@@ -41,44 +41,47 @@
*/
public final class MessageTrace
{
- private static Logger msgLog = Logger.getLogger(MessageTrace.class);
+ private static final Logger msgLog = Logger.getLogger(MessageTrace.class);
- // Hide ctor
private MessageTrace()
{
+ // forbidden constructor
}
- public static void traceMessage(String messagePrefix, MessageAbstraction message)
+ public static void traceMessage(String messagePrefix, Object message)
{
- if (msgLog.isTraceEnabled())
+ if (!msgLog.isTraceEnabled()) return;
+
+ if (message instanceof SOAPMessage)
{
- if (message instanceof SOAPMessage)
+ try
{
- try
+ SOAPEnvelope soapEnv = ((SOAPMessage)message).getSOAPPart().getEnvelope();
+ if (soapEnv != null)
{
- SOAPEnvelope soapEnv = ((SOAPMessage)message).getSOAPPart().getEnvelope();
- if (soapEnv != null)
- {
- String envStr = SOAPElementWriter.writeElement((SOAPElementImpl)soapEnv, true);
- msgLog.trace(messagePrefix + "\n" + envStr);
- }
+ String envStr = SOAPElementWriter.writeElement((SOAPElementImpl)soapEnv, true);
+ msgLog.trace(messagePrefix + "\n" + envStr);
}
- catch (SOAPException ex)
- {
- msgLog.error("Cannot trace SOAPMessage", ex);
- }
}
- else if (message instanceof HTTPMessageImpl)
+ catch (SOAPException ex)
{
- HTTPMessageImpl httpMessage = (HTTPMessageImpl)message;
- Element root = httpMessage.getXmlFragment().toElement();
- String xmlString = DOMWriter.printNode(root, true);
- msgLog.trace(messagePrefix + "\n" + xmlString);
+ msgLog.error("Cannot trace SOAPMessage", ex);
}
- else
- {
- msgLog.warn("Unsupported message type: " + message);
- }
}
+ else if (message instanceof HTTPMessageImpl)
+ {
+ HTTPMessageImpl httpMessage = (HTTPMessageImpl)message;
+ Element root = httpMessage.getXmlFragment().toElement();
+ String xmlString = DOMWriter.printNode(root, true);
+ msgLog.trace(messagePrefix + "\n" + xmlString);
+ }
+ else if (message instanceof byte[])
+ {
+ msgLog.trace(messagePrefix + "\n" + String.valueOf((byte[])message));
+ }
+ else
+ {
+ msgLog.warn("Unsupported message type: " + message);
+ }
}
}
17 years, 3 months
JBossWS SVN: r4505 - stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2007-08-29 12:29:55 -0400 (Wed, 29 Aug 2007)
New Revision: 4505
Added:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMChannelRequest.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMChannelResponse.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMMarshaller.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMUnMarshaller.java
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMChannel.java
Log:
little refactoring
Modified: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMChannel.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMChannel.java 2007-08-29 14:15:04 UTC (rev 4504)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMChannel.java 2007-08-29 16:29:55 UTC (rev 4505)
@@ -1,3 +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.
+ */
package org.jboss.ws.extensions.wsrm;
import static org.jboss.ws.extensions.wsrm.RMConstant.*;
@@ -2,30 +23,18 @@
-import org.jboss.remoting.Client;
-import org.jboss.remoting.InvocationRequest;
-import org.jboss.remoting.InvokerLocator;
-import org.jboss.remoting.invocation.OnewayInvocation;
import org.jboss.remoting.marshal.Marshaller;
import org.jboss.remoting.marshal.UnMarshaller;
-import org.jboss.ws.core.HTTPMessageImpl;
import org.jboss.ws.core.MessageAbstraction;
-import org.jboss.ws.core.MessageTrace;
import java.io.ByteArrayInputStream;
-import java.io.IOException;
import java.io.InputStream;
-import java.io.OutputStream;
import java.io.ByteArrayOutputStream;
-import java.net.MalformedURLException;
+
import java.util.Map;
-import java.util.HashMap;
-import java.util.concurrent.Future;
-import java.util.concurrent.Callable;
import java.util.concurrent.Executors;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.ExecutorService;
-import java.util.concurrent.ExecutionException;
import java.util.concurrent.atomic.AtomicInteger;
/**
- * RM Channel Singleton
+ * RM Channel
* @author richard.opalka(a)jboss.com
@@ -38,7 +47,6 @@
private RMChannel()
{
- super();
// forbidden inheritance
}
@@ -47,13 +55,14 @@
return INSTANCE;
}
+ // Holds the list of tasks that will be send to the remoting transport channel
private static final ExecutorService rmChannelPool = Executors.newFixedThreadPool(5, new RMThreadFactory());
-
+
private static final class RMThreadFactory implements ThreadFactory
{
final ThreadGroup group;
final AtomicInteger threadNumber = new AtomicInteger(1);
- final String namePrefix = "rm-channel-pool-thread-";
+ final String namePrefix = "rm-pool-thread-";
private RMThreadFactory()
{
@@ -71,176 +80,7 @@
return t;
}
}
-
- private static final class RMMarshaller implements Marshaller
- {
- private static final Marshaller INSTANCE = new RMMarshaller();
-
- public Marshaller cloneMarshaller() throws CloneNotSupportedException
- {
- return getInstance();
- }
-
- public static Marshaller getInstance()
- {
- return INSTANCE;
- }
-
- public void write(Object dataObject, OutputStream output) throws IOException
- {
- if (dataObject instanceof InvocationRequest)
- dataObject = ((InvocationRequest)dataObject).getParameter();
- if (dataObject instanceof OnewayInvocation)
- dataObject = ((OnewayInvocation)dataObject).getParameters()[0];
-
- if ((dataObject instanceof byte[]) == false)
- throw new IllegalArgumentException("Not a byte array: " + dataObject);
-
- output.write((byte[])dataObject);
- output.flush();
- }
- }
-
- private static final class RMUnMarshaller implements UnMarshaller
- {
- private static final UnMarshaller INSTANCE = new RMUnMarshaller();
-
- public UnMarshaller cloneUnMarshaller() throws CloneNotSupportedException
- {
- return getInstance();
- }
-
- public static UnMarshaller getInstance()
- {
- return INSTANCE;
- }
-
- public Object read(InputStream inputStream, Map metadata) throws IOException, ClassNotFoundException
- {
- if (inputStream == null)
- return RMMessageFactory.newMessage(null, new RMMetadata(metadata)); // WSAddressing reply-to
-
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- byte[] buffer = new byte[1024];
- int count = -1;
- count = inputStream.read(buffer);
- while (count != -1)
- {
- baos.write(buffer, 0, count);
- count = inputStream.read(buffer);
- }
- return RMMessageFactory.newMessage(baos.toByteArray(), new RMMetadata(metadata));
- }
-
- public void setClassLoader(ClassLoader classloader)
- {
- // do nothing
- }
- }
-
- private static final class RMChannelResponse
- {
- private final Throwable fault;
- private final RMMessage result;
-
- public RMChannelResponse(Throwable fault)
- {
- this(null, fault);
- }
-
- public RMChannelResponse(RMMessage result)
- {
- this(result, null);
- }
-
- private RMChannelResponse(RMMessage result, Throwable fault)
- {
- super();
- this.result = result;
- this.fault = fault;
- }
-
- public Throwable getFault()
- {
- return this.fault;
- }
-
- public RMMessage getResponse()
- {
- return this.result;
- }
- }
-
- private static final class RMChannelRequest implements Callable<RMChannelResponse>
- {
- private final RMMessage rmRequest;
- private static final String JBOSSWS_SUBSYSTEM = "jbossws";
-
- private RMChannelRequest(RMMessage rmRequest)
- {
- super();
- this.rmRequest = rmRequest;
- }
-
- public RMChannelResponse call()
- {
- InvokerLocator locator = null;
- try
- {
- locator = new InvokerLocator((String)rmRequest.getMetadata().getContext(INVOCATION_CONTEXT).get(TARGET_ADDRESS));
- }
- catch (MalformedURLException e)
- {
- return new RMChannelResponse(new IllegalArgumentException("Malformed endpoint address", e));
- }
-
- try
- {
- Client client = new Client(locator, JBOSSWS_SUBSYSTEM, rmRequest.getMetadata().getContext(REMOTING_CONFIGURATION_CONTEXT));
- client.connect();
-
- client.setMarshaller(RMMarshaller.getInstance());
-
- boolean oneWay = (Boolean)rmRequest.getMetadata().getContext(RMConstant.INVOCATION_CONTEXT).get(ONE_WAY_OPERATION);
- if (!oneWay)
- client.setUnMarshaller(RMUnMarshaller.getInstance());
-
- //if (log.isDebugEnabled())
- // log.debug("Remoting metadata: " + rmRequest.getMetadata());
- //System.out.println("Remoting metadata: " + rmRequest.getMetadata());
-
- // debug the outgoing message
- //MessageTrace.traceMessage("Outgoing Request Message", reqMessage);
- //System.out.println("Outgoing Request Message" + new String(rmRequest.getPayload()));
-
- RMMessage resMessage = null;
- Map<String, Object> remotingInvocationContext = rmRequest.getMetadata().getContext(REMOTING_INVOCATION_CONTEXT);
- if (oneWay)
- {
- client.invokeOneway(rmRequest.getPayload(), remotingInvocationContext, false);
- }
- else
- {
- resMessage = (RMMessage)client.invoke(rmRequest.getPayload(), remotingInvocationContext);
- }
-
- // Disconnect the remoting client
- client.disconnect();
-
- // trace the incomming response message
- //MessageTrace.traceMessage("Incoming Response Message", resMessage);
- //System.out.println("Incoming Response Message" + new String(resMessage.getPayload()));
-
- return new RMChannelResponse(resMessage);
- }
- catch (Throwable t)
- {
- return new RMChannelResponse(t);
- }
- }
- }
-
private RMMessage createRMMessage(MessageAbstraction request, RMMetadata rmMetadata) throws Throwable
{
ByteArrayOutputStream baos = new ByteArrayOutputStream();
Added: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMChannelRequest.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMChannelRequest.java (rev 0)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMChannelRequest.java 2007-08-29 16:29:55 UTC (rev 4505)
@@ -0,0 +1,109 @@
+/*
+ * 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.extensions.wsrm;
+
+import static org.jboss.ws.extensions.wsrm.RMConstant.INVOCATION_CONTEXT;
+import static org.jboss.ws.extensions.wsrm.RMConstant.ONE_WAY_OPERATION;
+import static org.jboss.ws.extensions.wsrm.RMConstant.REMOTING_CONFIGURATION_CONTEXT;
+import static org.jboss.ws.extensions.wsrm.RMConstant.REMOTING_INVOCATION_CONTEXT;
+import static org.jboss.ws.extensions.wsrm.RMConstant.TARGET_ADDRESS;
+
+import java.net.MalformedURLException;
+import java.util.Map;
+import java.util.concurrent.Callable;
+
+import org.jboss.logging.Logger;
+import org.jboss.remoting.Client;
+import org.jboss.remoting.InvokerLocator;
+import org.jboss.ws.core.MessageTrace;
+
+/**
+ * Represents request that goes to the RM channel
+ * @see org.jboss.ws.extensions.wsrm.RMChannel
+ * @author richard.opalka(a)jboss.com
+ */
+final class RMChannelRequest implements Callable<RMChannelResponse>
+{
+ private static final Logger log = Logger.getLogger(RMChannelRequest.class);
+ private static final String JBOSSWS_SUBSYSTEM = "jbossws";
+ private final RMMessage rmRequest;
+
+ RMChannelRequest(RMMessage rmRequest)
+ {
+ super();
+ this.rmRequest = rmRequest;
+ }
+
+ public RMChannelResponse call()
+ {
+ InvokerLocator locator = null;
+ try
+ {
+ locator = new InvokerLocator((String)rmRequest.getMetadata().getContext(INVOCATION_CONTEXT).get(TARGET_ADDRESS));
+ }
+ catch (MalformedURLException e)
+ {
+ return new RMChannelResponse(new IllegalArgumentException("Malformed endpoint address", e));
+ }
+
+ try
+ {
+ Client client = new Client(locator, JBOSSWS_SUBSYSTEM, rmRequest.getMetadata().getContext(REMOTING_CONFIGURATION_CONTEXT));
+ client.connect();
+
+ client.setMarshaller(RMMarshaller.getInstance());
+
+ boolean oneWay = (Boolean)rmRequest.getMetadata().getContext(RMConstant.INVOCATION_CONTEXT).get(ONE_WAY_OPERATION);
+ if (!oneWay)
+ client.setUnMarshaller(RMUnMarshaller.getInstance());
+
+ Map<String, Object> remotingInvocationContext = rmRequest.getMetadata().getContext(REMOTING_INVOCATION_CONTEXT);
+ if (log.isDebugEnabled())
+ log.debug("Remoting metadata: " + remotingInvocationContext);
+
+ // debug the outgoing request message
+ MessageTrace.traceMessage("Outgoing RM Request Message", rmRequest.getPayload());
+
+ RMMessage rmResponse = null;
+ if (oneWay)
+ {
+ client.invokeOneway(rmRequest.getPayload(), remotingInvocationContext, false);
+ }
+ else
+ {
+ rmResponse = (RMMessage)client.invoke(rmRequest.getPayload(), remotingInvocationContext);
+ }
+
+ // Disconnect the remoting client
+ client.disconnect();
+
+ // trace the incomming response message
+ MessageTrace.traceMessage("Incoming RM Response Message", rmResponse.getPayload());
+
+ return new RMChannelResponse(rmResponse);
+ }
+ catch (Throwable t)
+ {
+ return new RMChannelResponse(t);
+ }
+ }
+}
\ No newline at end of file
Property changes on: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMChannelRequest.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMChannelResponse.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMChannelResponse.java (rev 0)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMChannelResponse.java 2007-08-29 16:29:55 UTC (rev 4505)
@@ -0,0 +1,60 @@
+/*
+ * 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.extensions.wsrm;
+
+/**
+ * Represents response that goes from the RM channel
+ * @see org.jboss.ws.extensions.wsrm.RMChannel
+ * @author richard.opalka(a)jboss.com
+ */
+final class RMChannelResponse
+{
+ private final Throwable fault;
+ private final RMMessage result;
+
+ public RMChannelResponse(Throwable fault)
+ {
+ this(null, fault);
+ }
+
+ public RMChannelResponse(RMMessage result)
+ {
+ this(result, null);
+ }
+
+ private RMChannelResponse(RMMessage result, Throwable fault)
+ {
+ super();
+ this.result = result;
+ this.fault = fault;
+ }
+
+ public Throwable getFault()
+ {
+ return this.fault;
+ }
+
+ public RMMessage getResponse()
+ {
+ return this.result;
+ }
+}
\ No newline at end of file
Property changes on: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMChannelResponse.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMMarshaller.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMMarshaller.java (rev 0)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMMarshaller.java 2007-08-29 16:29:55 UTC (rev 4505)
@@ -0,0 +1,64 @@
+/*
+ * 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.extensions.wsrm;
+
+import java.io.IOException;
+import java.io.OutputStream;
+
+import org.jboss.remoting.InvocationRequest;
+import org.jboss.remoting.invocation.OnewayInvocation;
+import org.jboss.remoting.marshal.Marshaller;
+
+/**
+ * Marshalls byte array to the output stream
+ * @author richard.opalka(a)jboss.com
+ */
+final class RMMarshaller implements Marshaller
+{
+ private static final Marshaller INSTANCE = new RMMarshaller();
+
+ public Marshaller cloneMarshaller() throws CloneNotSupportedException
+ {
+ return getInstance();
+ }
+
+ public static Marshaller getInstance()
+ {
+ return INSTANCE;
+ }
+
+ public void write(Object dataObject, OutputStream output) throws IOException
+ {
+ if (dataObject instanceof InvocationRequest)
+ dataObject = ((InvocationRequest)dataObject).getParameter();
+
+ if (dataObject instanceof OnewayInvocation)
+ dataObject = ((OnewayInvocation)dataObject).getParameters()[0];
+
+ if ((dataObject instanceof byte[]) == false)
+ throw new IllegalArgumentException("Not a byte array: " + dataObject);
+
+ output.write((byte[])dataObject);
+ output.flush();
+ }
+}
+
Property changes on: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMMarshaller.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMUnMarshaller.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMUnMarshaller.java (rev 0)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMUnMarshaller.java 2007-08-29 16:29:55 UTC (rev 4505)
@@ -0,0 +1,71 @@
+/*
+ * 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.extensions.wsrm;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Map;
+
+import org.jboss.remoting.marshal.UnMarshaller;
+
+/**
+ * Unmarshalls byte array from the input stream
+ * @author richard.opalka(a)jboss.com
+ */
+final class RMUnMarshaller implements UnMarshaller
+{
+ private static final UnMarshaller INSTANCE = new RMUnMarshaller();
+
+ public UnMarshaller cloneUnMarshaller() throws CloneNotSupportedException
+ {
+ return getInstance();
+ }
+
+ public static UnMarshaller getInstance()
+ {
+ return INSTANCE;
+ }
+
+ public Object read(InputStream is, Map metadata) throws IOException, ClassNotFoundException
+ {
+ if (is == null)
+ return RMMessageFactory.newMessage(null, new RMMetadata(metadata)); // TODO: investigate why is == null (WSAddressing reply-to test)
+
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ byte[] buffer = new byte[1024];
+ int count = -1;
+ count = is.read(buffer);
+ while (count != -1)
+ {
+ baos.write(buffer, 0, count);
+ count = is.read(buffer);
+ }
+ return RMMessageFactory.newMessage(baos.toByteArray(), new RMMetadata(metadata));
+ }
+
+ public void setClassLoader(ClassLoader classloader)
+ {
+ // do nothing
+ }
+}
+
Property changes on: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMUnMarshaller.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
17 years, 3 months
JBossWS SVN: r4504 - legacy/tags.
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2007-08-29 10:15:04 -0400 (Wed, 29 Aug 2007)
New Revision: 4504
Added:
legacy/tags/jbossws-1.2.1.GA_CP01/
Log:
CP01 code freeze
Copied: legacy/tags/jbossws-1.2.1.GA_CP01 (from rev 4503, legacy/branches/jbossws-1.2.1.GA_CP)
17 years, 3 months
JBossWS SVN: r4503 - stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2007-08-29 09:15:16 -0400 (Wed, 29 Aug 2007)
New Revision: 4503
Added:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMChannel.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMConstant.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMHelper.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMMessage.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMMessageFactory.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMMessageImpl.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMMetadata.java
Log:
adding RM stuff
Added: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMChannel.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMChannel.java (rev 0)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMChannel.java 2007-08-29 13:15:16 UTC (rev 4503)
@@ -0,0 +1,297 @@
+package org.jboss.ws.extensions.wsrm;
+
+import static org.jboss.ws.extensions.wsrm.RMConstant.*;
+
+import org.jboss.remoting.Client;
+import org.jboss.remoting.InvocationRequest;
+import org.jboss.remoting.InvokerLocator;
+import org.jboss.remoting.invocation.OnewayInvocation;
+import org.jboss.remoting.marshal.Marshaller;
+import org.jboss.remoting.marshal.UnMarshaller;
+import org.jboss.ws.core.HTTPMessageImpl;
+import org.jboss.ws.core.MessageAbstraction;
+import org.jboss.ws.core.MessageTrace;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.ByteArrayOutputStream;
+import java.net.MalformedURLException;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.concurrent.Future;
+import java.util.concurrent.Callable;
+import java.util.concurrent.Executors;
+import java.util.concurrent.ThreadFactory;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.atomic.AtomicInteger;
+
+/**
+ * RM Channel Singleton
+ * @author richard.opalka(a)jboss.com
+ */
+public class RMChannel
+{
+ private static final RMChannel INSTANCE = new RMChannel();
+
+ private RMChannel()
+ {
+ super();
+ // forbidden inheritance
+ }
+
+ public static RMChannel getInstance()
+ {
+ return INSTANCE;
+ }
+
+ private static final ExecutorService rmChannelPool = Executors.newFixedThreadPool(5, new RMThreadFactory());
+
+ private static final class RMThreadFactory implements ThreadFactory
+ {
+ final ThreadGroup group;
+ final AtomicInteger threadNumber = new AtomicInteger(1);
+ final String namePrefix = "rm-channel-pool-thread-";
+
+ private RMThreadFactory()
+ {
+ SecurityManager sm = System.getSecurityManager();
+ group = (sm != null) ? sm.getThreadGroup() : Thread.currentThread().getThreadGroup();
+ }
+
+ public Thread newThread(Runnable r)
+ {
+ Thread t = new Thread(group, r, namePrefix + threadNumber.getAndIncrement(), 0);
+ if (t.isDaemon())
+ t.setDaemon(false);
+ if (t.getPriority() != Thread.NORM_PRIORITY)
+ t.setPriority(Thread.NORM_PRIORITY);
+ return t;
+ }
+ }
+
+ private static final class RMMarshaller implements Marshaller
+ {
+ private static final Marshaller INSTANCE = new RMMarshaller();
+
+ public Marshaller cloneMarshaller() throws CloneNotSupportedException
+ {
+ return getInstance();
+ }
+
+ public static Marshaller getInstance()
+ {
+ return INSTANCE;
+ }
+
+ public void write(Object dataObject, OutputStream output) throws IOException
+ {
+ if (dataObject instanceof InvocationRequest)
+ dataObject = ((InvocationRequest)dataObject).getParameter();
+
+ if (dataObject instanceof OnewayInvocation)
+ dataObject = ((OnewayInvocation)dataObject).getParameters()[0];
+
+ if ((dataObject instanceof byte[]) == false)
+ throw new IllegalArgumentException("Not a byte array: " + dataObject);
+
+ output.write((byte[])dataObject);
+ output.flush();
+ }
+ }
+
+ private static final class RMUnMarshaller implements UnMarshaller
+ {
+ private static final UnMarshaller INSTANCE = new RMUnMarshaller();
+
+ public UnMarshaller cloneUnMarshaller() throws CloneNotSupportedException
+ {
+ return getInstance();
+ }
+
+ public static UnMarshaller getInstance()
+ {
+ return INSTANCE;
+ }
+
+ public Object read(InputStream inputStream, Map metadata) throws IOException, ClassNotFoundException
+ {
+ if (inputStream == null)
+ return RMMessageFactory.newMessage(null, new RMMetadata(metadata)); // WSAddressing reply-to
+
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ byte[] buffer = new byte[1024];
+ int count = -1;
+ count = inputStream.read(buffer);
+ while (count != -1)
+ {
+ baos.write(buffer, 0, count);
+ count = inputStream.read(buffer);
+ }
+ return RMMessageFactory.newMessage(baos.toByteArray(), new RMMetadata(metadata));
+ }
+
+ public void setClassLoader(ClassLoader classloader)
+ {
+ // do nothing
+ }
+ }
+
+ private static final class RMChannelResponse
+ {
+ private final Throwable fault;
+ private final RMMessage result;
+
+ public RMChannelResponse(Throwable fault)
+ {
+ this(null, fault);
+ }
+
+ public RMChannelResponse(RMMessage result)
+ {
+ this(result, null);
+ }
+
+ private RMChannelResponse(RMMessage result, Throwable fault)
+ {
+ super();
+ this.result = result;
+ this.fault = fault;
+ }
+
+ public Throwable getFault()
+ {
+ return this.fault;
+ }
+
+ public RMMessage getResponse()
+ {
+ return this.result;
+ }
+ }
+
+ private static final class RMChannelRequest implements Callable<RMChannelResponse>
+ {
+ private final RMMessage rmRequest;
+ private static final String JBOSSWS_SUBSYSTEM = "jbossws";
+
+ private RMChannelRequest(RMMessage rmRequest)
+ {
+ super();
+ this.rmRequest = rmRequest;
+ }
+
+ public RMChannelResponse call()
+ {
+ InvokerLocator locator = null;
+ try
+ {
+ locator = new InvokerLocator((String)rmRequest.getMetadata().getContext(INVOCATION_CONTEXT).get(TARGET_ADDRESS));
+ }
+ catch (MalformedURLException e)
+ {
+ return new RMChannelResponse(new IllegalArgumentException("Malformed endpoint address", e));
+ }
+
+ try
+ {
+ Client client = new Client(locator, JBOSSWS_SUBSYSTEM, rmRequest.getMetadata().getContext(REMOTING_CONFIGURATION_CONTEXT));
+ client.connect();
+
+ client.setMarshaller(RMMarshaller.getInstance());
+
+ boolean oneWay = (Boolean)rmRequest.getMetadata().getContext(RMConstant.INVOCATION_CONTEXT).get(ONE_WAY_OPERATION);
+ if (!oneWay)
+ client.setUnMarshaller(RMUnMarshaller.getInstance());
+
+ //if (log.isDebugEnabled())
+ // log.debug("Remoting metadata: " + rmRequest.getMetadata());
+ //System.out.println("Remoting metadata: " + rmRequest.getMetadata());
+
+ // debug the outgoing message
+ //MessageTrace.traceMessage("Outgoing Request Message", reqMessage);
+ //System.out.println("Outgoing Request Message" + new String(rmRequest.getPayload()));
+
+ RMMessage resMessage = null;
+ Map<String, Object> remotingInvocationContext = rmRequest.getMetadata().getContext(REMOTING_INVOCATION_CONTEXT);
+ if (oneWay)
+ {
+ client.invokeOneway(rmRequest.getPayload(), remotingInvocationContext, false);
+ }
+ else
+ {
+ resMessage = (RMMessage)client.invoke(rmRequest.getPayload(), remotingInvocationContext);
+ }
+
+ // Disconnect the remoting client
+ client.disconnect();
+
+ // trace the incomming response message
+ //MessageTrace.traceMessage("Incoming Response Message", resMessage);
+ //System.out.println("Incoming Response Message" + new String(resMessage.getPayload()));
+
+ return new RMChannelResponse(resMessage);
+ }
+ catch (Throwable t)
+ {
+ return new RMChannelResponse(t);
+ }
+ }
+ }
+
+ private RMMessage createRMMessage(MessageAbstraction request, RMMetadata rmMetadata) throws Throwable
+ {
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ Marshaller marshaller = (Marshaller)rmMetadata.getContext(SERIALIZATION_CONTEXT).get(MARSHALLER);
+ // we have to serialize message before putting it to the rm pool
+ // * contextClassloader not serializable issue
+ // * DOMUtil threadlocal issue (if message is de/serialized in separate thread)
+ marshaller.write(request, baos);
+ RMMessage rmMessage = RMMessageFactory.newMessage(baos.toByteArray(), rmMetadata);
+ return rmMessage;
+ }
+
+ private MessageAbstraction createResponse(RMMessage rmResponse, RMMetadata rmMetadata) throws Throwable
+ {
+ Map<String, Object> invocationContext = rmMetadata.getContext(INVOCATION_CONTEXT);
+ boolean oneWay = (Boolean)rmMetadata.getContext(INVOCATION_CONTEXT).get(ONE_WAY_OPERATION);
+ MessageAbstraction response = null;
+ if (!oneWay)
+ {
+ byte[] payload = rmResponse.getPayload();
+ InputStream is = payload == null ? null : new ByteArrayInputStream(rmResponse.getPayload());
+ // we have to deserialize message after pick up from the rm pool
+ // * contextClassloader not serializable issue
+ // * DOMUtil threadlocal issue (if message is de/serialized in separate thread)
+ UnMarshaller unmarshaller = (UnMarshaller)rmMetadata.getContext(SERIALIZATION_CONTEXT).get(UNMARSHALLER);
+ response = (MessageAbstraction)unmarshaller.read(is, rmResponse.getMetadata().getContext(REMOTING_INVOCATION_CONTEXT));
+ }
+ invocationContext.clear();
+ invocationContext.putAll(rmMetadata.getContext(REMOTING_INVOCATION_CONTEXT));
+ return response;
+ }
+
+ public MessageAbstraction send(MessageAbstraction request, RMMetadata rmMetadata) throws Throwable
+ {
+ RMMessage rmRequest = createRMMessage(request, rmMetadata);
+ RMMessage rmResponse = sendToChannel(rmRequest);
+ return createResponse(rmResponse, rmMetadata);
+ }
+
+ private RMMessage sendToChannel(RMMessage request) throws Throwable
+ {
+ RMChannelResponse result = rmChannelPool.submit(new RMChannelRequest(request)).get();
+
+ Throwable fault = result.getFault();
+ if (fault != null)
+ {
+ throw fault;
+ }
+ else
+ {
+ return result.getResponse();
+ }
+ }
+}
Property changes on: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMChannel.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMConstant.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMConstant.java (rev 0)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMConstant.java 2007-08-29 13:15:16 UTC (rev 4503)
@@ -0,0 +1,19 @@
+package org.jboss.ws.extensions.wsrm;
+
+final class RMConstant
+{
+ private static final String PREFIX = RMConstant.class.getName();
+ static final String TARGET_ADDRESS = PREFIX + ".targetAddress";
+ static final String ONE_WAY_OPERATION = PREFIX + ".oneWayOperation";
+ static final String INVOCATION_CONTEXT = PREFIX + ".invocationContext";
+ static final String MARSHALLER = PREFIX + ".marshaller";
+ static final String UNMARSHALLER = PREFIX + ".unmarshaller";
+ static final String SERIALIZATION_CONTEXT = PREFIX + ".serializationContext";
+ static final String REMOTING_INVOCATION_CONTEXT = PREFIX + ".remotingInvocationContext";
+ static final String REMOTING_CONFIGURATION_CONTEXT = PREFIX + ".remotingConfigurationContext";
+
+ private RMConstant()
+ {
+ // no instances
+ }
+}
Property changes on: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMConstant.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMHelper.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMHelper.java (rev 0)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMHelper.java 2007-08-29 13:15:16 UTC (rev 4503)
@@ -0,0 +1,17 @@
+package org.jboss.ws.extensions.wsrm;
+
+import org.jboss.ws.core.MessageAbstraction;
+
+public final class RMHelper
+{
+ private RMHelper()
+ {
+ // no instances
+ }
+
+ public static boolean isRMMessage(MessageAbstraction requestMessage)
+ {
+ // TODO: here is the most suitable place to start RM resender
+ return (new java.io.File("/home/ropalka/rm.enabled").exists()) && (requestMessage != null);
+ }
+}
Property changes on: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMHelper.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMMessage.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMMessage.java (rev 0)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMMessage.java 2007-08-29 13:15:16 UTC (rev 4503)
@@ -0,0 +1,7 @@
+package org.jboss.ws.extensions.wsrm;
+
+public interface RMMessage
+{
+ byte[] getPayload();
+ RMMetadata getMetadata();
+}
Property changes on: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMMessage.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMMessageFactory.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMMessageFactory.java (rev 0)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMMessageFactory.java 2007-08-29 13:15:16 UTC (rev 4503)
@@ -0,0 +1,14 @@
+package org.jboss.ws.extensions.wsrm;
+
+public class RMMessageFactory
+{
+ private RMMessageFactory()
+ {
+ // forbidden inheritance
+ }
+
+ public static RMMessage newMessage(byte[] payload, RMMetadata rmMetadata)
+ {
+ return new RMMessageImpl(payload, rmMetadata);
+ }
+}
Property changes on: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMMessageFactory.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMMessageImpl.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMMessageImpl.java (rev 0)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMMessageImpl.java 2007-08-29 13:15:16 UTC (rev 4503)
@@ -0,0 +1,28 @@
+package org.jboss.ws.extensions.wsrm;
+
+/**
+ * RM message object
+ * @author richard.opalka(a)jboss.com
+ */
+public class RMMessageImpl implements RMMessage
+{
+ private final byte[] payload;
+ private final RMMetadata rmMetadata;
+
+ public RMMessageImpl(byte[] payload, RMMetadata rmMetadata)
+ {
+ super();
+ this.payload = payload;
+ this.rmMetadata = rmMetadata;
+ }
+
+ public byte[] getPayload()
+ {
+ return this.payload;
+ }
+
+ public RMMetadata getMetadata()
+ {
+ return this.rmMetadata;
+ }
+}
Property changes on: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMMessageImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMMetadata.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMMetadata.java (rev 0)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMMetadata.java 2007-08-29 13:15:16 UTC (rev 4503)
@@ -0,0 +1,64 @@
+package org.jboss.ws.extensions.wsrm;
+
+import java.util.Map;
+import java.util.HashMap;
+import org.jboss.remoting.marshal.Marshaller;
+import org.jboss.remoting.marshal.UnMarshaller;
+
+public final class RMMetadata
+{
+ private Map<String, Map<String, Object>> contexts = new HashMap<String, Map<String, Object>>();
+
+ public RMMetadata(
+ String targetAddress,
+ boolean oneWay,
+ Marshaller marshaller,
+ UnMarshaller unmarshaller,
+ Map<String, Object> invocationContext,
+ Map<String, Object> remotingInvocationContext,
+ Map<String, Object> remotingConfigurationContext)
+ {
+ if (targetAddress == null)
+ throw new IllegalArgumentException("Target address cannot be null");
+
+ invocationContext.put(RMConstant.TARGET_ADDRESS, targetAddress);
+ invocationContext.put(RMConstant.ONE_WAY_OPERATION, oneWay);
+ setContext(RMConstant.INVOCATION_CONTEXT, invocationContext);
+
+ if (marshaller == null || unmarshaller == null)
+ throw new IllegalArgumentException("Unable to create de/serialization context");
+
+ Map<String, Object> serializationContext = new HashMap<String, Object>();
+ serializationContext.put(RMConstant.MARSHALLER, marshaller);
+ serializationContext.put(RMConstant.UNMARSHALLER, unmarshaller);
+ setContext(RMConstant.SERIALIZATION_CONTEXT, serializationContext);
+
+ if (remotingInvocationContext == null)
+ throw new IllegalArgumentException("Remoting invocation context cannot be null");
+
+ setContext(RMConstant.REMOTING_INVOCATION_CONTEXT, remotingInvocationContext);
+
+ if (remotingConfigurationContext == null)
+ throw new IllegalArgumentException("Remoting configuraton context cannot be null");
+
+ setContext(RMConstant.REMOTING_CONFIGURATION_CONTEXT, remotingConfigurationContext);
+ }
+
+ public RMMetadata(Map<String, Object> remotingInvocationContext)
+ {
+ if (remotingInvocationContext == null)
+ throw new IllegalArgumentException("Remoting invocation context cannot be null");
+
+ setContext(RMConstant.REMOTING_INVOCATION_CONTEXT, remotingInvocationContext);
+ }
+
+ void setContext(String key, Map<String, Object> ctx)
+ {
+ this.contexts.put(key, ctx);
+ }
+
+ Map<String, Object> getContext(String key)
+ {
+ return this.contexts.get(key);
+ }
+}
Property changes on: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMMetadata.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
17 years, 3 months
JBossWS SVN: r4502 - stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/core/client.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2007-08-29 09:13:13 -0400 (Wed, 29 Aug 2007)
New Revision: 4502
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/core/client/RemotingConnectionImpl.java
Log:
refactoring + adding RM stuff
Modified: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/core/client/RemotingConnectionImpl.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/core/client/RemotingConnectionImpl.java 2007-08-24 17:53:06 UTC (rev 4501)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/core/client/RemotingConnectionImpl.java 2007-08-29 13:13:13 UTC (rev 4502)
@@ -54,6 +54,10 @@
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.metadata.config.EndpointProperty;
+import org.jboss.ws.extensions.wsrm.RMHelper;
+import org.jboss.ws.extensions.wsrm.RMChannel;
+import org.jboss.ws.extensions.wsrm.RMMetadata;
+
/**
* SOAPConnection implementation.
* <p/>
@@ -85,14 +89,6 @@
private static Map<String, String> configMap = new HashMap<String, String>();
static
{
- // Remoting constants since 2.0.0.GA
- //configMap.put(StubExt.PROPERTY_KEY_STORE, SSLSocketBuilder.REMOTING_KEY_STORE_FILE_PATH);
- //configMap.put(StubExt.PROPERTY_KEY_STORE_PASSWORD, SSLSocketBuilder.REMOTING_KEY_STORE_PASSWORD);
- //configMap.put(StubExt.PROPERTY_KEY_STORE_TYPE, SSLSocketBuilder.REMOTING_KEY_STORE_TYPE);
- //configMap.put(StubExt.PROPERTY_TRUST_STORE, SSLSocketBuilder.REMOTING_TRUST_STORE_FILE_PATH);
- //configMap.put(StubExt.PROPERTY_TRUST_STORE_PASSWORD, SSLSocketBuilder.REMOTING_TRUST_STORE_PASSWORD);
- //configMap.put(StubExt.PROPERTY_TRUST_STORE_TYPE, SSLSocketBuilder.REMOTING_TRUST_STORE_TYPE);
-
configMap.put(StubExt.PROPERTY_KEY_STORE, "org.jboss.remoting.keyStore");
configMap.put(StubExt.PROPERTY_KEY_STORE_PASSWORD, "org.jboss.remoting.keyStorePassword");
configMap.put(StubExt.PROPERTY_KEY_STORE_TYPE, "org.jboss.remoting.keyStoreType");
@@ -102,7 +98,9 @@
}
private boolean closed;
-
+
+ private static final RMChannel RM_CHANNEL = RMChannel.getInstance();
+
public RemotingConnectionImpl()
{
// HTTPClientInvoker conect sends gratuitous POST
@@ -162,37 +160,83 @@
// setup remoting client
Map<String, Object> metadata = createRemotingMetaData(reqMessage, callProps);
- Client client = createRemotingClient(endpoint, targetAddress, oneway);
-
+ Marshaller marshaller = getMarshaller();
+ UnMarshaller unmarshaller = getUnmarshaller();
+ InvokerLocator locator = null;
try
{
- if (log.isDebugEnabled())
- log.debug("Remoting metadata: " + metadata);
+ // Get the invoker from Remoting for a given endpoint address
+ log.debug("Get locator for: " + endpoint);
+
+ /**
+ * [JBWS-1704] The Use Of Remoting Causes An Additional 'datatype' Parameter To Be Sent On All Requests
+ *
+ * An HTTPClientInvoker may disconnect from the server and recreated by the remoting layer.
+ * In that case the new invoker does not inherit the marshaller/unmarshaller from the disconnected invoker.
+ * We therefore explicitly specify the invoker locator datatype and register the SOAP marshaller/unmarshaller
+ * with the MarshalFactory.
+ *
+ * This applies to remoting-1.4.5 and less
+ */
+ String version = getRemotingVersion();
+ if (version.startsWith("1.4"))
+ {
+ targetAddress = addURLParameter(targetAddress, InvokerLocator.DATATYPE, "JBossWSMessage");
+ MarshalFactory.addMarshaller("JBossWSMessage", marshaller, unmarshaller);
+ }
- // debug the outgoing message
- MessageTrace.traceMessage("Outgoing Request Message", reqMessage);
+ locator = new InvokerLocator(targetAddress);
+ }
+ catch (MalformedURLException e)
+ {
+ throw new IllegalArgumentException("Malformed endpoint address", e);
+ }
- MessageAbstraction resMessage = null;
-
- if (oneway == true)
+ try
+ {
+ if (RMHelper.isRMMessage(reqMessage))
{
- client.invokeOneway(reqMessage, metadata, false);
+ RMMetadata rmMetadata = new RMMetadata(targetAddress, oneway, marshaller, unmarshaller, callProps, metadata, clientConfig);
+ return RM_CHANNEL.send(reqMessage, rmMetadata);
}
- else
+ else
{
- resMessage = (MessageAbstraction)client.invoke(reqMessage, metadata);
- }
+ Client client = new Client(locator, "jbossws", clientConfig);
+ client.connect();
- // Disconnect the remoting client
- client.disconnect();
+ client.setMarshaller(marshaller);
- callProps.clear();
- callProps.putAll(metadata);
+ if (oneway == false)
+ client.setUnMarshaller(unmarshaller);
+
+ if (log.isDebugEnabled())
+ log.debug("Remoting metadata: " + metadata);
- // trace the incomming response message
- MessageTrace.traceMessage("Incoming Response Message", resMessage);
+ // debug the outgoing message
+ MessageTrace.traceMessage("Outgoing Request Message", reqMessage);
- return resMessage;
+ MessageAbstraction resMessage = null;
+
+ if (oneway == true)
+ {
+ client.invokeOneway(reqMessage, metadata, false);
+ }
+ else
+ {
+ resMessage = (MessageAbstraction)client.invoke(reqMessage, metadata);
+ }
+
+ // Disconnect the remoting client
+ client.disconnect();
+
+ callProps.clear();
+ callProps.putAll(metadata);
+
+ // trace the incomming response message
+ MessageTrace.traceMessage("Incoming Response Message", resMessage);
+
+ return resMessage;
+ }
}
catch (Throwable th)
{
@@ -206,7 +250,7 @@
throw io;
}
}
-
+
private String addURLParameter(String url, String key, String value)
{
int qmIndex = url.indexOf("?");
@@ -214,54 +258,6 @@
return url;
}
- private Client createRemotingClient(Object endpoint, String targetAddress, boolean oneway)
- {
- Client client;
- try
- {
- // Get the invoker from Remoting for a given endpoint address
- log.debug("Get locator for: " + endpoint);
-
- Marshaller marshaller = getMarshaller();
- UnMarshaller unmarshaller = getUnmarshaller();
-
- /**
- * [JBWS-1704] The Use Of Remoting Causes An Additional 'datatype' Parameter To Be Sent On All Requests
- *
- * An HTTPClientInvoker may disconnect from the server and recreated by the remoting layer.
- * In that case the new invoker does not inherit the marshaller/unmarshaller from the disconnected invoker.
- * We therefore explicitly specify the invoker locator datatype and register the SOAP marshaller/unmarshaller
- * with the MarshalFactory.
- *
- * This applies to remoting-1.4.5 and less
- */
- String version = getRemotingVersion();
- if (version.startsWith("1.4"))
- {
- targetAddress = addURLParameter(targetAddress, InvokerLocator.DATATYPE, "JBossWSMessage");
- MarshalFactory.addMarshaller("JBossWSMessage", marshaller, unmarshaller);
- }
-
- InvokerLocator locator = new InvokerLocator(targetAddress);
- client = new Client(locator, "jbossws", clientConfig);
- client.connect();
-
- client.setMarshaller(marshaller);
-
- if (oneway == false)
- client.setUnMarshaller(unmarshaller);
- }
- catch (MalformedURLException e)
- {
- throw new IllegalArgumentException("Malformed endpoint address", e);
- }
- catch (Exception e)
- {
- throw new IllegalStateException("Could not setup remoting client", e);
- }
- return client;
- }
-
private String getRemotingVersion()
{
String version = null;
17 years, 3 months
JBossWS SVN: r4501 - in legacy/branches/jbossws-1.2.1.GA_CP: jbossws-tests/ant-import and 7 other directories.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2007-08-24 13:53:06 -0400 (Fri, 24 Aug 2007)
New Revision: 4501
Added:
legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1792/
legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1792/JBWS1792TestCase.java
legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1792/TestEndpoint.java
legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1792/TestEndpointImpl.java
legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1792/TestHandler.java
legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws1792/
legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws1792/META-INF/
legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws1792/META-INF/application-client.xml
legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws1792/META-INF/jboss-client.xml
legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws1792/WEB-INF/
legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws1792/WEB-INF/custom-endpoint-config.xml
legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws1792/WEB-INF/jaxrpc-mapping.xml
legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws1792/WEB-INF/web.xml
legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws1792/WEB-INF/webservices.xml
legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws1792/WEB-INF/wsdl/
legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws1792/WEB-INF/wsdl/TestService.wsdl
legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws1792/wstools-config.xml
Removed:
legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1792/JBWS1792TestCase.java
legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1792/TestEndpoint.java
legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1792/TestEndpointImpl.java
legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1792/TestHandler.java
legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws1792/META-INF/
legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws1792/META-INF/application-client.xml
legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws1792/META-INF/jboss-client.xml
legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws1792/WEB-INF/
legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws1792/WEB-INF/custom-endpoint-config.xml
legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws1792/WEB-INF/jaxrpc-mapping.xml
legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws1792/WEB-INF/web.xml
legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws1792/WEB-INF/webservices.xml
legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws1792/WEB-INF/wsdl/
legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws1792/WEB-INF/wsdl/TestService.wsdl
legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws1792/wstools-config.xml
Modified:
legacy/branches/jbossws-1.2.1.GA_CP/jbossws-core/src/java/org/jboss/ws/metadata/config/binding/OMFactoryJAXRPC.java
legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/ant-import/build-jars-jaxrpc.xml
Log:
[JBPAPP-316] init-param for handler defined in jaxrpc-config not processed.
Modified: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-core/src/java/org/jboss/ws/metadata/config/binding/OMFactoryJAXRPC.java
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_CP/jbossws-core/src/java/org/jboss/ws/metadata/config/binding/OMFactoryJAXRPC.java 2007-08-24 17:18:20 UTC (rev 4500)
+++ legacy/branches/jbossws-1.2.1.GA_CP/jbossws-core/src/java/org/jboss/ws/metadata/config/binding/OMFactoryJAXRPC.java 2007-08-24 17:53:06 UTC (rev 4501)
@@ -145,6 +145,24 @@
}
/**
+ * Called when parsing of a new element started.
+ */
+ public Object newChild(UnifiedHandlerMetaData handler, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+ {
+ if ("init-param".equals(localName))
+ return new UnifiedInitParamMetaData();
+ else return null;
+ }
+
+ /**
+ * Called when parsing character is complete.
+ */
+ public void addChild(UnifiedHandlerMetaData handler, UnifiedInitParamMetaData param, UnmarshallingContext navigator, String namespaceURI, String localName)
+ {
+ handler.addInitParam(param);
+ }
+
+ /**
* Called when a new simple child element with text value was read from the XML content.
*/
public void setValue(UnifiedHandlerMetaData handler, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
Modified: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/ant-import/build-jars-jaxrpc.xml
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/ant-import/build-jars-jaxrpc.xml 2007-08-24 17:18:20 UTC (rev 4500)
+++ legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/ant-import/build-jars-jaxrpc.xml 2007-08-24 17:53:06 UTC (rev 4501)
@@ -2513,6 +2513,35 @@
</metainf>
</jar>
+ <!-- jaxrpc-jbws1792 -->
+ <war warfile="${tests.output.dir}/libs/jaxrpc-jbws1792.war" webxml="${tests.output.dir}/resources/jaxrpc/jbws1792/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/classes">
+ <include name="org/jboss/test/ws/jaxrpc/jbws1792/TestEndpoint.class"/>
+ <include name="org/jboss/test/ws/jaxrpc/jbws1792/TestEndpointImpl.class"/>
+ <include name="org/jboss/test/ws/jaxrpc/jbws1792/TestHandler.class"/>
+ </classes>
+ <webinf dir="${tests.output.dir}/resources/jaxrpc/jbws1792/WEB-INF">
+ <include name="webservices.xml"/>
+ <include name="jaxrpc-mapping.xml"/>
+ <include name="custom-endpoint-config.xml"/>
+ <include name="wsdl/**"/>
+ </webinf>
+ </war>
+ <jar destfile="${tests.output.dir}/libs/jaxrpc-jbws1792-client.jar">
+ <fileset dir="${tests.output.dir}/classes">
+ <include name="org/jboss/test/ws/jbws1792/TestEndpoint.class"/>
+ </fileset>
+ <metainf dir="${tests.output.dir}/resources/jaxrpc/jbws1792/META-INF">
+ <include name="application-client.xml"/>
+ <include name="jboss-client.xml"/>
+ </metainf>
+ <metainf dir="${tests.output.dir}/resources/jaxrpc/jbws1792/WEB-INF">
+ <include name="jaxrpc-mapping.xml"/>
+ <include name="wsdl/**"/>
+ </metainf>
+ </jar>
+
+
<!-- jaxrpc-marshall-doclit.war -->
<war warfile="${tests.output.dir}/libs/jaxrpc-marshall-doclit.war"
webxml="${tests.output.dir}/resources/jaxrpc/marshall-doclit/WEB-INF/web.xml">
Copied: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1792 (from rev 4495, legacy/branches/jbossws-1.2.0.GA_JBWS-1610/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1792)
Deleted: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1792/JBWS1792TestCase.java
===================================================================
--- legacy/branches/jbossws-1.2.0.GA_JBWS-1610/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1792/JBWS1792TestCase.java 2007-08-23 14:47:05 UTC (rev 4495)
+++ legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1792/JBWS1792TestCase.java 2007-08-24 17:53:06 UTC (rev 4501)
@@ -1,68 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2007, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.ws.jaxrpc.jbws1792;
-
-import javax.naming.InitialContext;
-import javax.xml.rpc.Service;
-
-import junit.framework.Test;
-
-import org.jboss.test.ws.JBossWSTest;
-import org.jboss.test.ws.JBossWSTestSetup;
-
-/**
- * @see http://jira.jboss.com/jira/browse/JBWS-1792
- *
- * init-param for handler defined in jaxrpc-config not processed
- *
- * @author darran.lofthouse(a)jboss.com
- * @since Aug 22, 2007
- */
-public class JBWS1792TestCase extends JBossWSTest
-{
- private static TestEndpoint port;
-
- public static Test suite() throws Exception
- {
- return JBossWSTestSetup.newTestSetup(JBWS1792TestCase.class, "jaxrpc-jbws1792.war, jaxrpc-jbws1792-client.jar");
- }
-
- public void setUp() throws Exception
- {
- super.setUp();
- if (port == null)
- {
- InitialContext iniCtx = getInitialContext();
- Service service = (Service)iniCtx.lookup("java:comp/env/service/TestService");
- port = (TestEndpoint)service.getPort(TestEndpoint.class);
- }
- }
-
- public void testCall() throws Exception
- {
- final String message = "Hello!!";
-
- String response = port.echoMessage(message);
-
- assertEquals(message, response);
- }
-}
Copied: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1792/JBWS1792TestCase.java (from rev 4495, legacy/branches/jbossws-1.2.0.GA_JBWS-1610/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1792/JBWS1792TestCase.java)
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1792/JBWS1792TestCase.java (rev 0)
+++ legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1792/JBWS1792TestCase.java 2007-08-24 17:53:06 UTC (rev 4501)
@@ -0,0 +1,68 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxrpc.jbws1792;
+
+import javax.naming.InitialContext;
+import javax.xml.rpc.Service;
+
+import junit.framework.Test;
+
+import org.jboss.test.ws.JBossWSTest;
+import org.jboss.test.ws.JBossWSTestSetup;
+
+/**
+ * @see http://jira.jboss.com/jira/browse/JBWS-1792
+ *
+ * init-param for handler defined in jaxrpc-config not processed
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since Aug 22, 2007
+ */
+public class JBWS1792TestCase extends JBossWSTest
+{
+ private static TestEndpoint port;
+
+ public static Test suite() throws Exception
+ {
+ return JBossWSTestSetup.newTestSetup(JBWS1792TestCase.class, "jaxrpc-jbws1792.war, jaxrpc-jbws1792-client.jar");
+ }
+
+ public void setUp() throws Exception
+ {
+ super.setUp();
+ if (port == null)
+ {
+ InitialContext iniCtx = getInitialContext();
+ Service service = (Service)iniCtx.lookup("java:comp/env/service/TestService");
+ port = (TestEndpoint)service.getPort(TestEndpoint.class);
+ }
+ }
+
+ public void testCall() throws Exception
+ {
+ final String message = "Hello!!";
+
+ String response = port.echoMessage(message);
+
+ assertEquals(message, response);
+ }
+}
Deleted: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1792/TestEndpoint.java
===================================================================
--- legacy/branches/jbossws-1.2.0.GA_JBWS-1610/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1792/TestEndpoint.java 2007-08-23 14:47:05 UTC (rev 4495)
+++ legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1792/TestEndpoint.java 2007-08-24 17:53:06 UTC (rev 4501)
@@ -1,36 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2007, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.ws.jaxrpc.jbws1792;
-
-import java.rmi.Remote;
-import java.rmi.RemoteException;
-
-/**
- * @author darran.lofthouse(a)jboss.com
- * @since Aug 22, 2007
- */
-public interface TestEndpoint extends Remote
-{
-
- public String echoMessage(final String message) throws RemoteException;
-
-}
Copied: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1792/TestEndpoint.java (from rev 4495, legacy/branches/jbossws-1.2.0.GA_JBWS-1610/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1792/TestEndpoint.java)
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1792/TestEndpoint.java (rev 0)
+++ legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1792/TestEndpoint.java 2007-08-24 17:53:06 UTC (rev 4501)
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxrpc.jbws1792;
+
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+
+/**
+ * @author darran.lofthouse(a)jboss.com
+ * @since Aug 22, 2007
+ */
+public interface TestEndpoint extends Remote
+{
+
+ public String echoMessage(final String message) throws RemoteException;
+
+}
Deleted: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1792/TestEndpointImpl.java
===================================================================
--- legacy/branches/jbossws-1.2.0.GA_JBWS-1610/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1792/TestEndpointImpl.java 2007-08-23 14:47:05 UTC (rev 4495)
+++ legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1792/TestEndpointImpl.java 2007-08-24 17:53:06 UTC (rev 4501)
@@ -1,39 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2007, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.ws.jaxrpc.jbws1792;
-
-/**
- * @author darran.lofthouse(a)jboss.com
- * @since Aug 22, 2007
- */
-public class TestEndpointImpl implements TestEndpoint
-{
-
- /**
- * @see org.jboss.test.ws.jaxrpc.jbws1792.TestEndpoint#echoMessage(java.lang.String)
- */
- public String echoMessage(final String message)
- {
- return message;
- }
-
-}
Copied: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1792/TestEndpointImpl.java (from rev 4495, legacy/branches/jbossws-1.2.0.GA_JBWS-1610/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1792/TestEndpointImpl.java)
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1792/TestEndpointImpl.java (rev 0)
+++ legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1792/TestEndpointImpl.java 2007-08-24 17:53:06 UTC (rev 4501)
@@ -0,0 +1,39 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxrpc.jbws1792;
+
+/**
+ * @author darran.lofthouse(a)jboss.com
+ * @since Aug 22, 2007
+ */
+public class TestEndpointImpl implements TestEndpoint
+{
+
+ /**
+ * @see org.jboss.test.ws.jaxrpc.jbws1792.TestEndpoint#echoMessage(java.lang.String)
+ */
+ public String echoMessage(final String message)
+ {
+ return message;
+ }
+
+}
Deleted: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1792/TestHandler.java
===================================================================
--- legacy/branches/jbossws-1.2.0.GA_JBWS-1610/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1792/TestHandler.java 2007-08-23 14:47:05 UTC (rev 4495)
+++ legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1792/TestHandler.java 2007-08-24 17:53:06 UTC (rev 4501)
@@ -1,55 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2007, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.ws.jaxrpc.jbws1792;
-
-import javax.xml.namespace.QName;
-import javax.xml.rpc.handler.GenericHandler;
-import javax.xml.rpc.handler.HandlerInfo;
-
-/**
- * @author darran.lofthouse(a)jboss.com
- * @since Aug 22, 2007
- */
-public class TestHandler extends GenericHandler
-{
-
- public void init(final HandlerInfo config)
- {
- super.init(config);
-
- Object value = config.getHandlerConfig().get("TestParameter");
-
- if ("TestValue".equals(value) == false)
- {
- throw new RuntimeException("Expected parameter not set expected-[TestParameter=TestValue] actual-[TestParameter=" + value + "].");
- }
- }
-
- /**
- * @see javax.xml.rpc.handler.GenericHandler#getHeaders()
- */
- public QName[] getHeaders()
- {
- return null;
- }
-
-}
Copied: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1792/TestHandler.java (from rev 4495, legacy/branches/jbossws-1.2.0.GA_JBWS-1610/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1792/TestHandler.java)
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1792/TestHandler.java (rev 0)
+++ legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1792/TestHandler.java 2007-08-24 17:53:06 UTC (rev 4501)
@@ -0,0 +1,55 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxrpc.jbws1792;
+
+import javax.xml.namespace.QName;
+import javax.xml.rpc.handler.GenericHandler;
+import javax.xml.rpc.handler.HandlerInfo;
+
+/**
+ * @author darran.lofthouse(a)jboss.com
+ * @since Aug 22, 2007
+ */
+public class TestHandler extends GenericHandler
+{
+
+ public void init(final HandlerInfo config)
+ {
+ super.init(config);
+
+ Object value = config.getHandlerConfig().get("TestParameter");
+
+ if ("TestValue".equals(value) == false)
+ {
+ throw new RuntimeException("Expected parameter not set expected-[TestParameter=TestValue] actual-[TestParameter=" + value + "].");
+ }
+ }
+
+ /**
+ * @see javax.xml.rpc.handler.GenericHandler#getHeaders()
+ */
+ public QName[] getHeaders()
+ {
+ return null;
+ }
+
+}
Copied: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws1792 (from rev 4495, legacy/branches/jbossws-1.2.0.GA_JBWS-1610/jbossws-tests/src/main/resources/jaxrpc/jbws1792)
Copied: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws1792/META-INF (from rev 4495, legacy/branches/jbossws-1.2.0.GA_JBWS-1610/jbossws-tests/src/main/resources/jaxrpc/jbws1792/META-INF)
Deleted: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws1792/META-INF/application-client.xml
===================================================================
--- legacy/branches/jbossws-1.2.0.GA_JBWS-1610/jbossws-tests/src/main/resources/jaxrpc/jbws1792/META-INF/application-client.xml 2007-08-23 14:47:05 UTC (rev 4495)
+++ legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws1792/META-INF/application-client.xml 2007-08-24 17:53:06 UTC (rev 4501)
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<application-client xmlns="http://java.sun.com/xml/ns/j2ee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application-client_1_4.xsd"
- version="1.4">
-
- <display-name>TestService</display-name>
-
- <service-ref>
- <service-ref-name>service/TestService</service-ref-name>
- <service-interface>javax.xml.rpc.Service</service-interface>
- <wsdl-file>META-INF/wsdl/TestService.wsdl</wsdl-file>
- <jaxrpc-mapping-file>META-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
- <port-component-ref>
- <service-endpoint-interface>org.jboss.test.ws.jaxrpc.jbws1792.TestEndpoint</service-endpoint-interface>
- </port-component-ref>
- </service-ref>
-
-</application-client>
-
Copied: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws1792/META-INF/application-client.xml (from rev 4495, legacy/branches/jbossws-1.2.0.GA_JBWS-1610/jbossws-tests/src/main/resources/jaxrpc/jbws1792/META-INF/application-client.xml)
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws1792/META-INF/application-client.xml (rev 0)
+++ legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws1792/META-INF/application-client.xml 2007-08-24 17:53:06 UTC (rev 4501)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<application-client xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application-client_1_4.xsd"
+ version="1.4">
+
+ <display-name>TestService</display-name>
+
+ <service-ref>
+ <service-ref-name>service/TestService</service-ref-name>
+ <service-interface>javax.xml.rpc.Service</service-interface>
+ <wsdl-file>META-INF/wsdl/TestService.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>META-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
+ <port-component-ref>
+ <service-endpoint-interface>org.jboss.test.ws.jaxrpc.jbws1792.TestEndpoint</service-endpoint-interface>
+ </port-component-ref>
+ </service-ref>
+
+</application-client>
+
Deleted: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws1792/META-INF/jboss-client.xml
===================================================================
--- legacy/branches/jbossws-1.2.0.GA_JBWS-1610/jbossws-tests/src/main/resources/jaxrpc/jbws1792/META-INF/jboss-client.xml 2007-08-23 14:47:05 UTC (rev 4495)
+++ legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws1792/META-INF/jboss-client.xml 2007-08-24 17:53:06 UTC (rev 4501)
@@ -1,15 +0,0 @@
-<?xml version='1.0' encoding='UTF-8' ?>
-
-<!DOCTYPE jboss-client PUBLIC
- "-//JBoss//DTD Application Client 4.0//EN"
- "http://www.jboss.org/j2ee/dtd/jboss-client_4_0.dtd">
-
-<jboss-client>
- <jndi-name>jbossws-client</jndi-name>
-
- <service-ref>
- <service-ref-name>service/TestService</service-ref-name>
- <wsdl-override>http://@jbosstest.host.name@:8080/jaxrpc-jbws1792/TestEndpoint?wsdl</wsdl-override>
- </service-ref>
-
-</jboss-client>
Copied: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws1792/META-INF/jboss-client.xml (from rev 4495, legacy/branches/jbossws-1.2.0.GA_JBWS-1610/jbossws-tests/src/main/resources/jaxrpc/jbws1792/META-INF/jboss-client.xml)
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws1792/META-INF/jboss-client.xml (rev 0)
+++ legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws1792/META-INF/jboss-client.xml 2007-08-24 17:53:06 UTC (rev 4501)
@@ -0,0 +1,15 @@
+<?xml version='1.0' encoding='UTF-8' ?>
+
+<!DOCTYPE jboss-client PUBLIC
+ "-//JBoss//DTD Application Client 4.0//EN"
+ "http://www.jboss.org/j2ee/dtd/jboss-client_4_0.dtd">
+
+<jboss-client>
+ <jndi-name>jbossws-client</jndi-name>
+
+ <service-ref>
+ <service-ref-name>service/TestService</service-ref-name>
+ <wsdl-override>http://@jbosstest.host.name@:8080/jaxrpc-jbws1792/TestEndpoint?wsdl</wsdl-override>
+ </service-ref>
+
+</jboss-client>
Copied: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws1792/WEB-INF (from rev 4495, legacy/branches/jbossws-1.2.0.GA_JBWS-1610/jbossws-tests/src/main/resources/jaxrpc/jbws1792/WEB-INF)
Deleted: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws1792/WEB-INF/custom-endpoint-config.xml
===================================================================
--- legacy/branches/jbossws-1.2.0.GA_JBWS-1610/jbossws-tests/src/main/resources/jaxrpc/jbws1792/WEB-INF/custom-endpoint-config.xml 2007-08-23 14:47:05 UTC (rev 4495)
+++ legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws1792/WEB-INF/custom-endpoint-config.xml 2007-08-24 17:53:06 UTC (rev 4501)
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!-- $Id$ -->
-
-<jaxrpc-config xmlns="urn:jboss:jaxrpc-config:2.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:j2ee="http://java.sun.com/xml/ns/j2ee"
- xsi:schemaLocation="urn:jboss:jaxrpc-config:2.0 jaxrpc-config_2_0.xsd">
-
- <endpoint-config>
- <config-name>Custom Endpoint Config</config-name>
- <pre-handler-chain>
- <handler-chain-name>Custom Handlers</handler-chain-name>
- <handler>
- <j2ee:handler-name>Custom Handler</j2ee:handler-name>
- <j2ee:handler-class>org.jboss.test.ws.jaxrpc.jbws1792.TestHandler</j2ee:handler-class>
- <j2ee:init-param>
- <j2ee:param-name>TestParameter</j2ee:param-name>
- <j2ee:param-value>TestValue</j2ee:param-value>
- </j2ee:init-param>
- </handler>
- </pre-handler-chain>
- </endpoint-config>
-
-</jaxrpc-config>
\ No newline at end of file
Copied: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws1792/WEB-INF/custom-endpoint-config.xml (from rev 4495, legacy/branches/jbossws-1.2.0.GA_JBWS-1610/jbossws-tests/src/main/resources/jaxrpc/jbws1792/WEB-INF/custom-endpoint-config.xml)
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws1792/WEB-INF/custom-endpoint-config.xml (rev 0)
+++ legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws1792/WEB-INF/custom-endpoint-config.xml 2007-08-24 17:53:06 UTC (rev 4501)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- $Id$ -->
+
+<jaxrpc-config xmlns="urn:jboss:jaxrpc-config:2.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:j2ee="http://java.sun.com/xml/ns/j2ee"
+ xsi:schemaLocation="urn:jboss:jaxrpc-config:2.0 jaxrpc-config_2_0.xsd">
+
+ <endpoint-config>
+ <config-name>Custom Endpoint Config</config-name>
+ <pre-handler-chain>
+ <handler-chain-name>Custom Handlers</handler-chain-name>
+ <handler>
+ <j2ee:handler-name>Custom Handler</j2ee:handler-name>
+ <j2ee:handler-class>org.jboss.test.ws.jaxrpc.jbws1792.TestHandler</j2ee:handler-class>
+ <j2ee:init-param>
+ <j2ee:param-name>TestParameter</j2ee:param-name>
+ <j2ee:param-value>TestValue</j2ee:param-value>
+ </j2ee:init-param>
+ </handler>
+ </pre-handler-chain>
+ </endpoint-config>
+
+</jaxrpc-config>
\ No newline at end of file
Deleted: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws1792/WEB-INF/jaxrpc-mapping.xml
===================================================================
--- legacy/branches/jbossws-1.2.0.GA_JBWS-1610/jbossws-tests/src/main/resources/jaxrpc/jbws1792/WEB-INF/jaxrpc-mapping.xml 2007-08-23 14:47:05 UTC (rev 4495)
+++ legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws1792/WEB-INF/jaxrpc-mapping.xml 2007-08-24 17:53:06 UTC (rev 4501)
@@ -1,37 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?><java-wsdl-mapping version='1.1' xmlns='http://java.sun.com/xml/ns/j2ee' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd'>
- <package-mapping>
- <package-type>org.jboss.test.ws.jaxrpc.jbws1792</package-type>
- <namespaceURI>http://org.jboss.test.ws/jbws1792/types</namespaceURI>
- </package-mapping>
- <service-interface-mapping>
- <service-interface>org.jboss.test.ws.jaxrpc.jbws1792.TestService</service-interface>
- <wsdl-service-name xmlns:serviceNS='http://org.jboss.test.ws/jbws1792'>serviceNS:TestService</wsdl-service-name>
- <port-mapping>
- <port-name>TestEndpointPort</port-name>
- <java-port-name>TestEndpointPort</java-port-name>
- </port-mapping>
- </service-interface-mapping>
- <service-endpoint-interface-mapping>
- <service-endpoint-interface>org.jboss.test.ws.jaxrpc.jbws1792.TestEndpoint</service-endpoint-interface>
- <wsdl-port-type xmlns:portTypeNS='http://org.jboss.test.ws/jbws1792'>portTypeNS:TestEndpoint</wsdl-port-type>
- <wsdl-binding xmlns:bindingNS='http://org.jboss.test.ws/jbws1792'>bindingNS:TestEndpointBinding</wsdl-binding>
- <service-endpoint-method-mapping>
- <java-method-name>echoMessage</java-method-name>
- <wsdl-operation>echoMessage</wsdl-operation>
- <method-param-parts-mapping>
- <param-position>0</param-position>
- <param-type>java.lang.String</param-type>
- <wsdl-message-mapping>
- <wsdl-message xmlns:wsdlMsgNS='http://org.jboss.test.ws/jbws1792'>wsdlMsgNS:TestEndpoint_echoMessage</wsdl-message>
- <wsdl-message-part-name>String_1</wsdl-message-part-name>
- <parameter-mode>IN</parameter-mode>
- </wsdl-message-mapping>
- </method-param-parts-mapping>
- <wsdl-return-value-mapping>
- <method-return-value>java.lang.String</method-return-value>
- <wsdl-message xmlns:wsdlMsgNS='http://org.jboss.test.ws/jbws1792'>wsdlMsgNS:TestEndpoint_echoMessageResponse</wsdl-message>
- <wsdl-message-part-name>result</wsdl-message-part-name>
- </wsdl-return-value-mapping>
- </service-endpoint-method-mapping>
- </service-endpoint-interface-mapping>
-</java-wsdl-mapping>
\ No newline at end of file
Copied: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws1792/WEB-INF/jaxrpc-mapping.xml (from rev 4495, legacy/branches/jbossws-1.2.0.GA_JBWS-1610/jbossws-tests/src/main/resources/jaxrpc/jbws1792/WEB-INF/jaxrpc-mapping.xml)
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws1792/WEB-INF/jaxrpc-mapping.xml (rev 0)
+++ legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws1792/WEB-INF/jaxrpc-mapping.xml 2007-08-24 17:53:06 UTC (rev 4501)
@@ -0,0 +1,37 @@
+<?xml version='1.0' encoding='UTF-8'?><java-wsdl-mapping version='1.1' xmlns='http://java.sun.com/xml/ns/j2ee' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd'>
+ <package-mapping>
+ <package-type>org.jboss.test.ws.jaxrpc.jbws1792</package-type>
+ <namespaceURI>http://org.jboss.test.ws/jbws1792/types</namespaceURI>
+ </package-mapping>
+ <service-interface-mapping>
+ <service-interface>org.jboss.test.ws.jaxrpc.jbws1792.TestService</service-interface>
+ <wsdl-service-name xmlns:serviceNS='http://org.jboss.test.ws/jbws1792'>serviceNS:TestService</wsdl-service-name>
+ <port-mapping>
+ <port-name>TestEndpointPort</port-name>
+ <java-port-name>TestEndpointPort</java-port-name>
+ </port-mapping>
+ </service-interface-mapping>
+ <service-endpoint-interface-mapping>
+ <service-endpoint-interface>org.jboss.test.ws.jaxrpc.jbws1792.TestEndpoint</service-endpoint-interface>
+ <wsdl-port-type xmlns:portTypeNS='http://org.jboss.test.ws/jbws1792'>portTypeNS:TestEndpoint</wsdl-port-type>
+ <wsdl-binding xmlns:bindingNS='http://org.jboss.test.ws/jbws1792'>bindingNS:TestEndpointBinding</wsdl-binding>
+ <service-endpoint-method-mapping>
+ <java-method-name>echoMessage</java-method-name>
+ <wsdl-operation>echoMessage</wsdl-operation>
+ <method-param-parts-mapping>
+ <param-position>0</param-position>
+ <param-type>java.lang.String</param-type>
+ <wsdl-message-mapping>
+ <wsdl-message xmlns:wsdlMsgNS='http://org.jboss.test.ws/jbws1792'>wsdlMsgNS:TestEndpoint_echoMessage</wsdl-message>
+ <wsdl-message-part-name>String_1</wsdl-message-part-name>
+ <parameter-mode>IN</parameter-mode>
+ </wsdl-message-mapping>
+ </method-param-parts-mapping>
+ <wsdl-return-value-mapping>
+ <method-return-value>java.lang.String</method-return-value>
+ <wsdl-message xmlns:wsdlMsgNS='http://org.jboss.test.ws/jbws1792'>wsdlMsgNS:TestEndpoint_echoMessageResponse</wsdl-message>
+ <wsdl-message-part-name>result</wsdl-message-part-name>
+ </wsdl-return-value-mapping>
+ </service-endpoint-method-mapping>
+ </service-endpoint-interface-mapping>
+</java-wsdl-mapping>
\ No newline at end of file
Deleted: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws1792/WEB-INF/web.xml
===================================================================
--- legacy/branches/jbossws-1.2.0.GA_JBWS-1610/jbossws-tests/src/main/resources/jaxrpc/jbws1792/WEB-INF/web.xml 2007-08-23 14:47:05 UTC (rev 4495)
+++ legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws1792/WEB-INF/web.xml 2007-08-24 17:53:06 UTC (rev 4501)
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
- version="2.4">
-
- <context-param>
- <param-name>jbossws-config-name</param-name>>
- <param-value>Custom Endpoint Config</param-value>
- </context-param>
- <context-param>
- <param-name>jbossws-config-file</param-name>>
- <param-value>WEB-INF/custom-endpoint-config.xml</param-value>
- </context-param>
-
- <servlet>
- <servlet-name>TestEndpoint</servlet-name>
- <servlet-class>org.jboss.test.ws.jaxrpc.jbws1792.TestEndpointImpl</servlet-class>
- </servlet>
-
- <servlet-mapping>
- <servlet-name>TestEndpoint</servlet-name>
- <url-pattern>/TestEndpoint</url-pattern>
- </servlet-mapping>
-
-</web-app>
-
Copied: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws1792/WEB-INF/web.xml (from rev 4495, legacy/branches/jbossws-1.2.0.GA_JBWS-1610/jbossws-tests/src/main/resources/jaxrpc/jbws1792/WEB-INF/web.xml)
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws1792/WEB-INF/web.xml (rev 0)
+++ legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws1792/WEB-INF/web.xml 2007-08-24 17:53:06 UTC (rev 4501)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+ version="2.4">
+
+ <context-param>
+ <param-name>jbossws-config-name</param-name>>
+ <param-value>Custom Endpoint Config</param-value>
+ </context-param>
+ <context-param>
+ <param-name>jbossws-config-file</param-name>>
+ <param-value>WEB-INF/custom-endpoint-config.xml</param-value>
+ </context-param>
+
+ <servlet>
+ <servlet-name>TestEndpoint</servlet-name>
+ <servlet-class>org.jboss.test.ws.jaxrpc.jbws1792.TestEndpointImpl</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>TestEndpoint</servlet-name>
+ <url-pattern>/TestEndpoint</url-pattern>
+ </servlet-mapping>
+
+</web-app>
+
Deleted: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws1792/WEB-INF/webservices.xml
===================================================================
--- legacy/branches/jbossws-1.2.0.GA_JBWS-1610/jbossws-tests/src/main/resources/jaxrpc/jbws1792/WEB-INF/webservices.xml 2007-08-23 14:47:05 UTC (rev 4495)
+++ legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws1792/WEB-INF/webservices.xml 2007-08-24 17:53:06 UTC (rev 4501)
@@ -1,15 +0,0 @@
-<webservices version='1.1' xmlns='http://java.sun.com/xml/ns/j2ee' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd'>
- <webservice-description>
- <webservice-description-name>TestService</webservice-description-name>
- <wsdl-file>WEB-INF/wsdl/TestService.wsdl</wsdl-file>
- <jaxrpc-mapping-file>WEB-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
- <port-component>
- <port-component-name>TestEndpointPort</port-component-name>
- <wsdl-port xmlns:portNS='http://org.jboss.test.ws/jbws1792'>portNS:TestEndpointPort</wsdl-port>
- <service-endpoint-interface>org.jboss.test.ws.jaxrpc.jbws1792.TestEndpoint</service-endpoint-interface>
- <service-impl-bean>
- <servlet-link>TestEndpoint</servlet-link>
- </service-impl-bean>
- </port-component>
- </webservice-description>
-</webservices>
\ No newline at end of file
Copied: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws1792/WEB-INF/webservices.xml (from rev 4495, legacy/branches/jbossws-1.2.0.GA_JBWS-1610/jbossws-tests/src/main/resources/jaxrpc/jbws1792/WEB-INF/webservices.xml)
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws1792/WEB-INF/webservices.xml (rev 0)
+++ legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws1792/WEB-INF/webservices.xml 2007-08-24 17:53:06 UTC (rev 4501)
@@ -0,0 +1,15 @@
+<webservices version='1.1' xmlns='http://java.sun.com/xml/ns/j2ee' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd'>
+ <webservice-description>
+ <webservice-description-name>TestService</webservice-description-name>
+ <wsdl-file>WEB-INF/wsdl/TestService.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>WEB-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
+ <port-component>
+ <port-component-name>TestEndpointPort</port-component-name>
+ <wsdl-port xmlns:portNS='http://org.jboss.test.ws/jbws1792'>portNS:TestEndpointPort</wsdl-port>
+ <service-endpoint-interface>org.jboss.test.ws.jaxrpc.jbws1792.TestEndpoint</service-endpoint-interface>
+ <service-impl-bean>
+ <servlet-link>TestEndpoint</servlet-link>
+ </service-impl-bean>
+ </port-component>
+ </webservice-description>
+</webservices>
\ No newline at end of file
Copied: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws1792/WEB-INF/wsdl (from rev 4495, legacy/branches/jbossws-1.2.0.GA_JBWS-1610/jbossws-tests/src/main/resources/jaxrpc/jbws1792/WEB-INF/wsdl)
Deleted: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws1792/WEB-INF/wsdl/TestService.wsdl
===================================================================
--- legacy/branches/jbossws-1.2.0.GA_JBWS-1610/jbossws-tests/src/main/resources/jaxrpc/jbws1792/WEB-INF/wsdl/TestService.wsdl 2007-08-23 14:47:05 UTC (rev 4495)
+++ legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws1792/WEB-INF/wsdl/TestService.wsdl 2007-08-24 17:53:06 UTC (rev 4501)
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<definitions name='TestService' targetNamespace='http://org.jboss.test.ws/jbws1792' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://org.jboss.test.ws/jbws1792' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
- <types/>
- <message name='TestEndpoint_echoMessage'>
- <part name='String_1' type='xsd:string'/>
- </message>
- <message name='TestEndpoint_echoMessageResponse'>
- <part name='result' type='xsd:string'/>
- </message>
- <portType name='TestEndpoint'>
- <operation name='echoMessage' parameterOrder='String_1'>
- <input message='tns:TestEndpoint_echoMessage'/>
- <output message='tns:TestEndpoint_echoMessageResponse'/>
- </operation>
- </portType>
- <binding name='TestEndpointBinding' type='tns:TestEndpoint'>
- <soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>
- <operation name='echoMessage'>
- <soap:operation soapAction=''/>
- <input>
- <soap:body namespace='http://org.jboss.test.ws/jbws1792' use='literal'/>
- </input>
- <output>
- <soap:body namespace='http://org.jboss.test.ws/jbws1792' use='literal'/>
- </output>
- </operation>
- </binding>
- <service name='TestService'>
- <port binding='tns:TestEndpointBinding' name='TestEndpointPort'>
- <soap:address location='REPLACE_WITH_ACTUAL_URL'/>
- </port>
- </service>
-</definitions>
\ No newline at end of file
Copied: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws1792/WEB-INF/wsdl/TestService.wsdl (from rev 4495, legacy/branches/jbossws-1.2.0.GA_JBWS-1610/jbossws-tests/src/main/resources/jaxrpc/jbws1792/WEB-INF/wsdl/TestService.wsdl)
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws1792/WEB-INF/wsdl/TestService.wsdl (rev 0)
+++ legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws1792/WEB-INF/wsdl/TestService.wsdl 2007-08-24 17:53:06 UTC (rev 4501)
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions name='TestService' targetNamespace='http://org.jboss.test.ws/jbws1792' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://org.jboss.test.ws/jbws1792' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
+ <types/>
+ <message name='TestEndpoint_echoMessage'>
+ <part name='String_1' type='xsd:string'/>
+ </message>
+ <message name='TestEndpoint_echoMessageResponse'>
+ <part name='result' type='xsd:string'/>
+ </message>
+ <portType name='TestEndpoint'>
+ <operation name='echoMessage' parameterOrder='String_1'>
+ <input message='tns:TestEndpoint_echoMessage'/>
+ <output message='tns:TestEndpoint_echoMessageResponse'/>
+ </operation>
+ </portType>
+ <binding name='TestEndpointBinding' type='tns:TestEndpoint'>
+ <soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>
+ <operation name='echoMessage'>
+ <soap:operation soapAction=''/>
+ <input>
+ <soap:body namespace='http://org.jboss.test.ws/jbws1792' use='literal'/>
+ </input>
+ <output>
+ <soap:body namespace='http://org.jboss.test.ws/jbws1792' use='literal'/>
+ </output>
+ </operation>
+ </binding>
+ <service name='TestService'>
+ <port binding='tns:TestEndpointBinding' name='TestEndpointPort'>
+ <soap:address location='REPLACE_WITH_ACTUAL_URL'/>
+ </port>
+ </service>
+</definitions>
\ No newline at end of file
Deleted: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws1792/wstools-config.xml
===================================================================
--- legacy/branches/jbossws-1.2.0.GA_JBWS-1610/jbossws-tests/src/main/resources/jaxrpc/jbws1792/wstools-config.xml 2007-08-23 14:47:05 UTC (rev 4495)
+++ legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws1792/wstools-config.xml 2007-08-24 17:53:06 UTC (rev 4501)
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- wstools.sh -cp ../../../../../output/tests/classes -config wstools-config.xml
--->
-
-<configuration xmlns="http://www.jboss.org/jbossws-tools"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.jboss.org/jbossws-tools http://www.jboss.org/jbossws-tools/schema/jbossws-tool_1_0.xsd">
-
- <java-wsdl>
- <service name="TestService" endpoint="org.jboss.test.ws.jaxrpc.jbws1792.TestEndpoint" style="rpc">
- </service>
- <namespaces target-namespace="http://org.jboss.test.ws/jbws1792" type-namespace="http://org.jboss.test.ws/jbws1792/types"/>
- <mapping file="jaxrpc-mapping.xml"/>
- <webservices servlet-link="TestEndpoint"/>
- </java-wsdl>
-
-</configuration>
Copied: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws1792/wstools-config.xml (from rev 4495, legacy/branches/jbossws-1.2.0.GA_JBWS-1610/jbossws-tests/src/main/resources/jaxrpc/jbws1792/wstools-config.xml)
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws1792/wstools-config.xml (rev 0)
+++ legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/jaxrpc/jbws1792/wstools-config.xml 2007-08-24 17:53:06 UTC (rev 4501)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ wstools.sh -cp ../../../../../output/tests/classes -config wstools-config.xml
+-->
+
+<configuration xmlns="http://www.jboss.org/jbossws-tools"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.jboss.org/jbossws-tools http://www.jboss.org/jbossws-tools/schema/jbossws-tool_1_0.xsd">
+
+ <java-wsdl>
+ <service name="TestService" endpoint="org.jboss.test.ws.jaxrpc.jbws1792.TestEndpoint" style="rpc">
+ </service>
+ <namespaces target-namespace="http://org.jboss.test.ws/jbws1792" type-namespace="http://org.jboss.test.ws/jbws1792/types"/>
+ <mapping file="jaxrpc-mapping.xml"/>
+ <webservices servlet-link="TestEndpoint"/>
+ </java-wsdl>
+
+</configuration>
17 years, 4 months
JBossWS SVN: r4500 - in legacy/branches/jbossws-1.2.1.GA_CP: jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1653 and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2007-08-24 13:18:20 -0400 (Fri, 24 Aug 2007)
New Revision: 4500
Modified:
legacy/branches/jbossws-1.2.1.GA_CP/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/client/ServiceImpl.java
legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1653/JBWS1653TestCase.java
Log:
[JBPAPP-274] Post-handler-chain not invoked for 'Standard Client' configuration with DII client.
Modified: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/client/ServiceImpl.java
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_CP/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/client/ServiceImpl.java 2007-08-24 16:14:20 UTC (rev 4499)
+++ legacy/branches/jbossws-1.2.1.GA_CP/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/client/ServiceImpl.java 2007-08-24 17:18:20 UTC (rev 4500)
@@ -421,7 +421,7 @@
}
private int initStubProperties(CallImpl call, String seiName)
- {
+ {
// nothing to do
if (usrMetaData == null)
return 0;
@@ -443,6 +443,8 @@
private int initCallProperties(CallImpl call, String seiName)
{
+ setupHandlerChain(call.getEndpointMetaData());
+
// nothing to do
if (usrMetaData == null)
return 0;
Modified: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1653/JBWS1653TestCase.java
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1653/JBWS1653TestCase.java 2007-08-24 16:14:20 UTC (rev 4499)
+++ legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1653/JBWS1653TestCase.java 2007-08-24 17:18:20 UTC (rev 4500)
@@ -27,14 +27,16 @@
import java.net.URLClassLoader;
import javax.naming.InitialContext;
+import javax.xml.namespace.QName;
+import javax.xml.rpc.Call;
import javax.xml.rpc.Service;
import junit.framework.Test;
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
+import org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl;
-
/**
* [JBWS-1653] Post-handler-chain not invoked for "Standard Client" configuration
*
@@ -64,14 +66,92 @@
assertNull(ClientHandler.message);
}
+ public void testStandardConfigConfiguredDII() throws Exception
+ {
+ ServiceFactoryImpl factory = new ServiceFactoryImpl();
+ URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxrpc-jbws1653/TestEndpoint?wsdl");
+ QName qname = new QName("http://org.jboss.test.ws/jbws1653", "TestService");
+ Service service = factory.createService(wsdlURL, qname);
+
+ Call call = service.createCall();
+ call.setOperationName(new QName("http://org.jboss.test.ws/jbws1653", "echoString"));
+
+ call.setTargetEndpointAddress("http://" + getServerHost() + ":8080/jaxrpc-jbws1653/TestEndpoint");
+
+ String hello = "Hello";
+ Object retObj = call.invoke(new Object[] { hello });
+ assertEquals(hello, retObj);
+
+ assertNull(ClientHandler.message);
+ }
+
+ public void testStandardConfigFullyConfiguredDII() throws Exception
+ {
+ ServiceFactoryImpl factory = new ServiceFactoryImpl();
+ URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxrpc-jbws1653/TestEndpoint?wsdl");
+ URL mappingURL = new File("resources/jaxrpc/jbws1653/WEB-INF/jaxrpc-mapping.xml").toURL();
+ QName qname = new QName("http://org.jboss.test.ws/jbws1653", "TestService");
+ Service service = factory.createService(wsdlURL, qname, mappingURL);
+ TestEndpoint port = (TestEndpoint)service.getPort(TestEndpoint.class);
+
+ String retStr = port.echoString("kermit");
+ assertEquals("kermit", retStr);
+ assertNull(ClientHandler.message);
+ }
+
public void testCustomConfig() throws Exception
{
ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
- URLClassLoader urlLoader = new URLClassLoader(new URL[] {}, ctxLoader)
+ URLClassLoader urlLoader = new URLClassLoader(new URL[] {}, ctxLoader) {
+ public URL getResource(String resName)
+ {
+ URL resURL = super.getResource(resName);
+ try
+ {
+ if (resName.endsWith("META-INF/standard-jaxrpc-client-config.xml"))
+ resURL = new File("resources/jaxrpc/jbws1653/META-INF/standard-jaxrpc-client-config.xml").toURL();
+ }
+ catch (MalformedURLException ex)
+ {
+ // ignore
+ }
+ return resURL;
+ }
+ };
+ Thread.currentThread().setContextClassLoader(urlLoader);
+
+ URL configURL = urlLoader.getResource("META-INF/standard-jaxrpc-client-config.xml");
+ assertTrue("Invalid config url: " + configURL, configURL.toExternalForm().indexOf("jbws1653") > 0);
+
+ InitialContext iniCtx = getInitialContext();
+ Service service = (Service)iniCtx.lookup("java:comp/env/service/TestService");
+ TestEndpoint port = (TestEndpoint)service.getPort(TestEndpoint.class);
+
+ try
{
- public URL findResource(String resName)
+ String retStr = port.echoString("kermit");
+ assertEquals("kermit", retStr);
+ assertEquals("kermit", ClientHandler.message);
+ }
+ finally
+ {
+ Thread.currentThread().setContextClassLoader(ctxLoader);
+ }
+ }
+
+ public void testCustomConfigConfiguredDII() throws Exception
+ {
+ if (false)
+ {
+ System.out.println("FIXME: [JBWS-1771] Post-handler-chain not invoked for \"Standard Client\" configuration with DII client");
+ return;
+ }
+
+ ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
+ URLClassLoader urlLoader = new URLClassLoader(new URL[] {}, ctxLoader) {
+ public URL getResource(String resName)
{
- URL resURL = super.findResource(resName);
+ URL resURL = super.getResource(resName);
try
{
if (resName.endsWith("META-INF/standard-jaxrpc-client-config.xml"))
@@ -83,7 +163,37 @@
}
return resURL;
}
-
+ };
+ Thread.currentThread().setContextClassLoader(urlLoader);
+
+ ServiceFactoryImpl factory = new ServiceFactoryImpl();
+ URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxrpc-jbws1653/TestEndpoint?wsdl");
+ QName qname = new QName("http://org.jboss.test.ws/jbws1653", "TestService");
+ Service service = factory.createService(wsdlURL, qname);
+
+ Call call = service.createCall();
+ call.setOperationName(new QName("http://org.jboss.test.ws/jbws1653", "echoString"));
+
+ call.setTargetEndpointAddress("http://" + getServerHost() + ":8080/jaxrpc-jbws1653/TestEndpoint");
+
+ String hello = "Hello";
+
+ try
+ {
+ Object retObj = call.invoke(new Object[] { hello });
+ assertEquals(hello, retObj);
+ assertEquals(hello, ClientHandler.message);
+ }
+ finally
+ {
+ Thread.currentThread().setContextClassLoader(ctxLoader);
+ }
+ }
+
+ public void testCustomConfigFullyConfiguredDII() throws Exception
+ {
+ ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
+ URLClassLoader urlLoader = new URLClassLoader(new URL[] {}, ctxLoader) {
public URL getResource(String resName)
{
URL resURL = super.getResource(resName);
@@ -101,18 +211,18 @@
};
Thread.currentThread().setContextClassLoader(urlLoader);
- URL configURL = urlLoader.findResource("META-INF/standard-jaxrpc-client-config.xml");
- assertTrue("Invalid config url: " + configURL, configURL.toExternalForm().indexOf("jbws1653") > 0);
-
- InitialContext iniCtx = getInitialContext();
- Service service = (Service)iniCtx.lookup("java:comp/env/service/TestService");
+ ServiceFactoryImpl factory = new ServiceFactoryImpl();
+ URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxrpc-jbws1653/TestEndpoint?wsdl");
+ URL mappingURL = new File("resources/jaxrpc/jbws1653/WEB-INF/jaxrpc-mapping.xml").toURL();
+ QName qname = new QName("http://org.jboss.test.ws/jbws1653", "TestService");
+ Service service = factory.createService(wsdlURL, qname, mappingURL);
TestEndpoint port = (TestEndpoint)service.getPort(TestEndpoint.class);
try
{
- String retStr = port.echoString("kermit");
- assertEquals("kermit", retStr);
- assertEquals("kermit", ClientHandler.message);
+ String retStr = port.echoString("thefrog");
+ assertEquals("thefrog", retStr);
+ assertEquals("thefrog", ClientHandler.message);
}
finally
{
17 years, 4 months