Author: gdaniels
Date: Thu Mar 15 12:51:49 2007
New Revision: 518741
URL: http://svn.apache.org/viewvc?view=rev&rev=518741
Log:
Start work to improve role handling and SOAP version handling.
* Introduce SOAPVersion interface, which lets us get at things like namespace
URI and attribute name constants. Add a getVersion() accessor to
SOAPHeaderBlock interface.
* Introduce a "RolePlayer" interface which allows something to indicate that it
operates as the ultimate destination (or not), and any custom roles that it
supports. This allows us to decouple role support from Axis2, but still have
it in Axiom.
* Introduce a Checker (see SOAPHeaderImpl.java) which gets headers based on a
RolePlayer's roles.
* Tests for the above.
* Also removed a few unnecessary "public abstract" modifiers on interface
methods.
Added:
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/soap/RolePlayer.java
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/soap/SOAP11Version.java
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/soap/SOAP12Version.java
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/soap/SOAPVersion.java
webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPRoleTest.java
webservices/commons/trunk/modules/axiom/modules/axiom-tests/test-resources/soap/soap11/soap11RoleMessage.xml
webservices/commons/trunk/modules/axiom/modules/axiom-tests/test-resources/soap/soap12RoleMessage.xml
Modified:
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/soap/SOAP11Constants.java
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/soap/SOAP12Constants.java
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/soap/SOAPHeader.java
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/soap/SOAPHeaderBlock.java
webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPHeaderImpl.java
webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11HeaderBlockImpl.java
webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12HeaderBlockImpl.java
webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPHeaderImpl.java
webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11HeaderBlockImpl.java
webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12HeaderBlockImpl.java
webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPHeaderTest.java
webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPTestCase.java
Added:
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/soap/RolePlayer.java
URL:
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/soap/RolePlayer.java?view=auto&rev=518741
==============================================================================
---
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/soap/RolePlayer.java
(added)
+++
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/soap/RolePlayer.java
Thu Mar 15 12:51:49 2007
@@ -0,0 +1,41 @@
+package org.apache.axiom.soap;
+
+import java.util.List;
+/*
+ * Copyright 2007 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * This interface represents the thing which provides us with the SOAP roles
in a given
+ * context. Used to search through SOAP header blocks.
+ */
+public interface RolePlayer {
+ /**
+ * Get a list of the roles supported. NOTE: the "next" role is
automatically supported,
+ * and the "none" role (for SOAP 1.2) is automatically disallowed. The
roles returned
+ * should only be the non-standard ones, since the ultimate destination
role is also
+ * handled by the isUltimateDestination method below.
+ *
+ * @return a List containing URI Strings, one per custom role supported,
or null
+ */
+ List getRoles();
+
+ /**
+ * Are we the ultimate destination?
+ *
+ * @return true if this is the ultimate destination, false if an
intermediary.
+ */
+ boolean isUltimateDestination();
+}
Modified:
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/soap/SOAP11Constants.java
URL:
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/soap/SOAP11Constants.java?view=diff&rev=518741&r1=518740&r2=518741
==============================================================================
---
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/soap/SOAP11Constants.java
(original)
+++
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/soap/SOAP11Constants.java
Thu Mar 15 12:51:49 2007
@@ -21,6 +21,8 @@
/** Eran Chinthaka ([EMAIL PROTECTED]) */
public static final String SOAP_ENVELOPE_NAMESPACE_URI =
"http://schemas.xmlsoap.org/soap/envelope/";
+ public static final String SOAP_ENCODING_NAMESPACE_URI =
+ "http://schemas.xmlsoap.org/soap/encoding/";
/** Field ATTR_ACTOR */
public static final String ATTR_ACTOR = "actor";
Added:
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/soap/SOAP11Version.java
URL:
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/soap/SOAP11Version.java?view=auto&rev=518741
==============================================================================
---
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/soap/SOAP11Version.java
(added)
+++
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/soap/SOAP11Version.java
Thu Mar 15 12:51:49 2007
@@ -0,0 +1,51 @@
+package org.apache.axiom.soap;
+
+import javax.xml.namespace.QName;
+/*
+ * Copyright 2007 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Version-specific stuff for SOAP 1.1
+ */
+public class SOAP11Version implements SOAPVersion, SOAP11Constants {
+ private static final SOAP11Version singleton = new SOAP11Version();
+ public static SOAP11Version getSingleton() { return singleton; }
+
+ QName actorQName = new QName(SOAP_ENVELOPE_NAMESPACE_URI, ATTR_ACTOR);
+
+ private SOAP11Version() {
+ }
+
+ /** Obtain the envelope namespace for this version of SOAP */
+ public String getEnvelopeURI() {
+ return SOAP_ENVELOPE_NAMESPACE_URI;
+ }
+
+ /** Obtain the encoding namespace for this version of SOAP */
+ public String getEncodingURI() {
+ return SOAP_ENCODING_NAMESPACE_URI;
+ }
+
+ /** Obtain the QName for the role attribute (actor/role) */
+ public QName getRoleAttributeQName() {
+ return actorQName;
+ }
+
+ /** Obtain the "next" role/actor URI */
+ public String getNextRoleURI() {
+ return SOAP_ACTOR_NEXT;
+ }
+}
Modified:
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/soap/SOAP12Constants.java
URL:
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/soap/SOAP12Constants.java?view=diff&rev=518741&r1=518740&r2=518741
==============================================================================
---
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/soap/SOAP12Constants.java
(original)
+++
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/soap/SOAP12Constants.java
Thu Mar 15 12:51:49 2007
@@ -22,6 +22,8 @@
public String SOAP_ENVELOPE_NAMESPACE_URI =
"http://www.w3.org/2003/05/soap-envelope";
+ public String SOAP_ENCODING_NAMESPACE_URI =
+ "http://www.w3.org/2003/05/soap-encoding";
public static final String SOAP_ROLE = "role";
public static final String SOAP_RELAY = "relay";
Added:
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/soap/SOAP12Version.java
URL:
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/soap/SOAP12Version.java?view=auto&rev=518741
==============================================================================
---
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/soap/SOAP12Version.java
(added)
+++
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/soap/SOAP12Version.java
Thu Mar 15 12:51:49 2007
@@ -0,0 +1,51 @@
+package org.apache.axiom.soap;
+
+import javax.xml.namespace.QName;
+/*
+ * Copyright 2007 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Version-specific stuff for SOAP 1.2
+ */
+public class SOAP12Version implements SOAPVersion, SOAP12Constants {
+ private static final SOAP12Version singleton = new SOAP12Version();
+ public static SOAP12Version getSingleton() { return singleton; }
+
+ QName actorQName = new QName(SOAP_ENVELOPE_NAMESPACE_URI, SOAP_ROLE);
+
+ private SOAP12Version() {
+ }
+
+ /** Obtain the envelope namespace for this version of SOAP */
+ public String getEnvelopeURI() {
+ return SOAP_ENVELOPE_NAMESPACE_URI;
+ }
+
+ /** Obtain the encoding namespace for this version of SOAP */
+ public String getEncodingURI() {
+ return SOAP_ENCODING_NAMESPACE_URI;
+ }
+
+ /** Obtain the QName for the role attribute (actor/role) */
+ public QName getRoleAttributeQName() {
+ return actorQName;
+ }
+
+ /** Obtain the "next" role/actor URI */
+ public String getNextRoleURI() {
+ return SOAP_ROLE_NEXT;
+ }
+}
Modified:
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/soap/SOAPHeader.java
URL:
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/soap/SOAPHeader.java?view=diff&rev=518741&r1=518740&r2=518741
==============================================================================
---
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/soap/SOAPHeader.java
(original)
+++
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/soap/SOAPHeader.java
Thu Mar 15 12:51:49 2007
@@ -36,8 +36,19 @@
* @throws org.apache.axiom.om.OMException
* if a SOAP error occurs
*/
- public abstract SOAPHeaderBlock addHeaderBlock(String localName,
- OMNamespace ns) throws
OMException;
+ SOAPHeaderBlock addHeaderBlock(String localName, OMNamespace ns) throws
OMException;
+
+ /**
+ * Get the appropriate set of headers for a RolePlayer.
+ *
+ * The RolePlayer indicates whether it is the ultimate destination (in
which case
+ * headers with no role or the explicit UltimateDestination role will be
included),
+ * and any non-standard roles it supports. Headers targeted to "next"
will always
+ * be included, and those targeted to "none" (for SOAP 1.2) will never be
included.
+ *
+ * @return an Iterator over all the HeaderBlocks this RolePlayer should
process.
+ */
+ Iterator getHeadersToProcess(RolePlayer rolePlayer);
/**
* Returns a list of all the <CODE>SOAPHeaderBlock</CODE> objects in this
@@ -52,7 +63,7 @@
* objects that contain the specified role
* @see #extractHeaderBlocks(String) extractHeaderBlocks(java.lang.String)
*/
- public abstract Iterator examineHeaderBlocks(String role);
+ Iterator examineHeaderBlocks(String role);
/**
* Returns a list of all the <CODE>SOAPHeaderBlock</CODE> objects in this
@@ -67,7 +78,7 @@
* objects that contain the specified role
* @see #examineHeaderBlocks(String) examineHeaderBlocks(java.lang.String)
*/
- public abstract Iterator extractHeaderBlocks(String role);
+ Iterator extractHeaderBlocks(String role);
/**
* Returns an <code>Iterator</code> over all the
<code>SOAPHeaderBlock</code> objects in this
@@ -78,7 +89,7 @@
* @return Returns an <code>Iterator</code> object over all the
<code>SOAPHeaderBlock</code>
* objects that contain the specified role and are marked as
MustUnderstand.
*/
- public abstract Iterator examineMustUnderstandHeaderBlocks(String role);
+ Iterator examineMustUnderstandHeaderBlocks(String role);
/**
* Returns an <code>Iterator</code> over all the
<code>SOAPHeaderBlock</code> objects in this
@@ -88,7 +99,7 @@
* contained by this <code>SOAPHeader</code>. If there are no
header blocks then an
* empty iterator is returned.
*/
- public abstract Iterator examineAllHeaderBlocks();
+ Iterator examineAllHeaderBlocks();
/**
* Returns an <code>Iterator</code> over all the
<code>SOAPHeaderBlock</code> objects in this
@@ -97,7 +108,7 @@
* @return Returns an <code>Iterator</code> object over all the
<code>SOAPHeaderBlock</code>
* objects contained by this <code>SOAPHeader</code>
*/
- public abstract Iterator extractAllHeaderBlocks();
+ Iterator extractAllHeaderBlocks();
/**
* Return all the Headers that has the Namespace URI to given NS URI.
Modified:
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/soap/SOAPHeaderBlock.java
URL:
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/soap/SOAPHeaderBlock.java?view=diff&rev=518741&r1=518740&r2=518741
==============================================================================
---
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/soap/SOAPHeaderBlock.java
(original)
+++
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/soap/SOAPHeaderBlock.java
Thu Mar 15 12:51:49 2007
@@ -34,7 +34,7 @@
* if there is a problem in setting the actor.
* @see #getRole() getRole()
*/
- public abstract void setRole(String roleURI);
+ void setRole(String roleURI);
/**
* Returns the uri of the actor associated with this <CODE>
SOAPHeaderBlock</CODE> object.
@@ -42,7 +42,7 @@
* @return a <CODE>String</CODE> giving the URI of the actor
* @see #setRole(String) setRole(java.lang.String)
*/
- public abstract String getRole();
+ String getRole();
/**
* Sets the mustUnderstand attribute for this <CODE>
SOAPHeaderBlock</CODE> object to be on or
@@ -57,9 +57,9 @@
* if there is a problem in setting the actor.
* @see #getMustUnderstand() getMustUnderstand()
*/
- public abstract void setMustUnderstand(boolean mustUnderstand);
+ void setMustUnderstand(boolean mustUnderstand);
- public abstract void setMustUnderstand(String mustUnderstand) throws
SOAPProcessingException;
+ void setMustUnderstand(String mustUnderstand) throws
SOAPProcessingException;
/**
* Returns whether the mustUnderstand attribute for this
<CODE>SOAPHeaderBlock</CODE> object is
@@ -68,10 +68,10 @@
* @return <CODE>true</CODE> if the mustUnderstand attribute of this
* <CODE>SOAPHeaderBlock</CODE> object is turned on;
<CODE>false</CODE> otherwise
*/
- public abstract boolean getMustUnderstand() throws SOAPProcessingException;
+ boolean getMustUnderstand() throws SOAPProcessingException;
- public abstract boolean isProcessed();
+ boolean isProcessed();
/**
* We need to know whether all the mustUnderstand headers have been
processed by the node. This
@@ -79,7 +79,7 @@
* the handlers who process a particular header block must explicitly say
that he processesd the
* header by calling setProcessed()
*/
- public abstract void setProcessed();
+ void setProcessed();
/**
@@ -89,12 +89,19 @@
*
* @param relay a <CODE>boolean</CODE> giving the value to be set
*/
- public abstract void setRelay(boolean relay);
+ void setRelay(boolean relay);
/**
* Returns the relay status associated with this <CODE>
SOAPHeaderBlock</CODE> object.
*
* @return a <CODE>boolean</CODE> giving the relay status
*/
- public abstract boolean getRelay();
+ boolean getRelay();
+
+ /**
+ * What SOAP version is this HeaderBlock?
+ *
+ * @return a SOAPVersion, one of the two singletons.
+ */
+ SOAPVersion getVersion();
}
Added:
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/soap/SOAPVersion.java
URL:
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/soap/SOAPVersion.java?view=auto&rev=518741
==============================================================================
---
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/soap/SOAPVersion.java
(added)
+++
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/soap/SOAPVersion.java
Thu Mar 15 12:51:49 2007
@@ -0,0 +1,44 @@
+package org.apache.axiom.soap;
+
+import javax.xml.namespace.QName;
+/*
+ * Copyright 2007 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * A generic way to get at SOAP-version-specific values. As long as we can get
+ * one of these from a SOAP element, we can get at the right
+ */
+public interface SOAPVersion {
+ /**
+ * Obtain the envelope namespace for this version of SOAP
+ */
+ public String getEnvelopeURI();
+
+ /**
+ * Obtain the encoding namespace for this version of SOAP
+ */
+ public String getEncodingURI();
+
+ /**
+ * Obtain the QName for the role attribute (actor/role)
+ */
+ public QName getRoleAttributeQName();
+
+ /**
+ * Obtain the "next" role/actor URI
+ */
+ public String getNextRoleURI();
+}
Modified:
webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPHeaderImpl.java
URL:
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPHeaderImpl.java?view=diff&rev=518741&r1=518740&r2=518741
==============================================================================
---
webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPHeaderImpl.java
(original)
+++
webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPHeaderImpl.java
Thu Mar 15 12:51:49 2007
@@ -28,6 +28,7 @@
import org.apache.axiom.soap.SOAPHeader;
import org.apache.axiom.soap.SOAPHeaderBlock;
import org.apache.axiom.soap.SOAPProcessingException;
+import org.apache.axiom.soap.RolePlayer;
import java.util.ArrayList;
import java.util.Collection;
@@ -71,6 +72,20 @@
throws OMException;
/**
+ * Get the appropriate set of headers for a RolePlayer.
+ * <p/>
+ * The RolePlayer indicates whether it is the ultimate destination (in
which case headers with
+ * no role or the explicit UltimateDestination role will be included), and
any non-standard
+ * roles it supports. Headers targeted to "next" will always be included,
and those targeted to
+ * "none" (for SOAP 1.2) will never be included.
+ *
+ * @return an Iterator over all the HeaderBlocks this RolePlayer should
process.
+ */
+ public Iterator getHeadersToProcess(RolePlayer rolePlayer) {
+ return null; // TODO: Implement this!
+ }
+
+ /**
* Returns a list of all the <CODE>SOAPHeaderBlock</CODE> objects in this
* <CODE>SOAPHeader</CODE> object that have the the specified actor. An
actor is a global
* attribute that indicates the intermediate parties to whom the message
should be sent. An
@@ -209,7 +224,7 @@
public ArrayList getHeaderBlocksWithNSURI(String nsURI) {
ArrayList headers = null;
- OMNode node = null;
+ OMNode node;
OMElement header = this.getFirstElement();
if (header != null) {
Modified:
webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11HeaderBlockImpl.java
URL:
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11HeaderBlockImpl.java?view=diff&rev=518741&r1=518740&r2=518741
==============================================================================
---
webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11HeaderBlockImpl.java
(original)
+++
webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11HeaderBlockImpl.java
Thu Mar 15 12:51:49 2007
@@ -24,6 +24,8 @@
import org.apache.axiom.soap.SOAPFactory;
import org.apache.axiom.soap.SOAPHeader;
import org.apache.axiom.soap.SOAPProcessingException;
+import org.apache.axiom.soap.SOAPVersion;
+import org.apache.axiom.soap.SOAP11Version;
import org.apache.axiom.soap.impl.dom.SOAPHeaderBlockImpl;
public class SOAP11HeaderBlockImpl extends SOAPHeaderBlockImpl {
@@ -118,7 +120,7 @@
* <CODE>SOAPHeaderBlock</CODE> object is turned on;
<CODE>false</CODE> otherwise
*/
public boolean getMustUnderstand() throws SOAPProcessingException {
- String mustUnderstand = "";
+ String mustUnderstand;
if ((mustUnderstand =
getAttribute(SOAPConstants.ATTR_MUSTUNDERSTAND,
SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI))
@@ -143,4 +145,14 @@
return false;
}
+
+ /**
+ * What SOAP version is this HeaderBlock?
+ *
+ * @return a SOAPVersion, one of the two singletons.
+ */
+ public SOAPVersion getVersion() {
+ return SOAP11Version.getSingleton();
+ }
+
}
Modified:
webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12HeaderBlockImpl.java
URL:
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12HeaderBlockImpl.java?view=diff&rev=518741&r1=518740&r2=518741
==============================================================================
---
webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12HeaderBlockImpl.java
(original)
+++
webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12HeaderBlockImpl.java
Thu Mar 15 12:51:49 2007
@@ -24,6 +24,8 @@
import org.apache.axiom.soap.SOAPFactory;
import org.apache.axiom.soap.SOAPHeader;
import org.apache.axiom.soap.SOAPProcessingException;
+import org.apache.axiom.soap.SOAPVersion;
+import org.apache.axiom.soap.SOAP12Version;
import org.apache.axiom.soap.impl.dom.SOAPHeaderBlockImpl;
public class SOAP12HeaderBlockImpl extends SOAPHeaderBlockImpl {
@@ -141,4 +143,12 @@
}
+ /**
+ * What SOAP version is this HeaderBlock?
+ *
+ * @return a SOAPVersion, one of the two singletons.
+ */
+ public SOAPVersion getVersion() {
+ return SOAP12Version.getSingleton();
+ }
}
Modified:
webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPHeaderImpl.java
URL:
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPHeaderImpl.java?view=diff&rev=518741&r1=518740&r2=518741
==============================================================================
---
webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPHeaderImpl.java
(original)
+++
webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPHeaderImpl.java
Thu Mar 15 12:51:49 2007
@@ -21,42 +21,40 @@
import org.apache.axiom.om.OMNamespace;
import org.apache.axiom.om.OMNode;
import org.apache.axiom.om.OMXMLParserWrapper;
+import org.apache.axiom.soap.RolePlayer;
+import org.apache.axiom.soap.SOAP12Constants;
+import org.apache.axiom.soap.SOAP12Version;
import org.apache.axiom.soap.SOAPConstants;
import org.apache.axiom.soap.SOAPEnvelope;
import org.apache.axiom.soap.SOAPFactory;
import org.apache.axiom.soap.SOAPHeader;
import org.apache.axiom.soap.SOAPHeaderBlock;
import org.apache.axiom.soap.SOAPProcessingException;
+import org.apache.axiom.soap.SOAPVersion;
import java.util.ArrayList;
import java.util.Iterator;
+import java.util.List;
/**
- * A local interface we can use to make "header checker" objects which can be
used
- * by HeaderIterators to filter results. This really SHOULD be done with
anonymous
- * classes:
- *
- * public void getHeadersByRole(final String role) {
- * return new HeaderIterator() {
- * public boolean checkHeader(SOAPHeaderBlock header) {
- * ...
- * if (role.equals(headerRole)) return true;
- * return false;
- * }
- * }
- * }
- *
- * ...but there appears to be some kind of weird problem with the JVM not
correctly
- * scoping the passed "role" value in a situation like the above. As such, we
have
- * to make Checker objects instead (sigh).
+ * A local interface we can use to make "header checker" objects which can be
used by
+ * HeaderIterators to filter results. This really SHOULD be done with
anonymous classes:
+ * <p/>
+ * public void getHeadersByRole(final String role) { return new
HeaderIterator() { public boolean
+ * checkHeader(SOAPHeaderBlock header) { ... if (role.equals(headerRole))
return true; return false;
+ * } } }
+ * <p/>
+ * ...but there appears to be some kind of weird problem with the JVM not
correctly scoping the
+ * passed "role" value in a situation like the above. As such, we have to
make Checker objects
+ * instead (sigh).
*/
interface Checker {
boolean checkHeader(SOAPHeaderBlock header);
}
/**
- * A Checker to make sure headers match a given role. If the role we're
looking for is
- * null, then everything matches.
+ * A Checker to make sure headers match a given role. If the role we're
looking for is null, then
+ * everything matches.
*/
class RoleChecker implements Checker {
String role;
@@ -75,8 +73,50 @@
}
/**
- * A Checker to see that we both match a given role AND are mustUnderstand=true
+ * This Checker uses a RolePlayer to return the appropriate headers for that
RolePlayer to process.
+ * Ignore "none", always "next", etc.
*/
+class RolePlayerChecker implements Checker {
+ RolePlayer rolePlayer;
+
+ public RolePlayerChecker(RolePlayer rolePlayer) {
+ this.rolePlayer = rolePlayer;
+ }
+
+ public boolean checkHeader(SOAPHeaderBlock header) {
+ String role = header.getRole();
+ SOAPVersion version = header.getVersion();
+
+ // 1. If role is ultimatedest, go by what the rolePlayer says
+ if (role == null || role.equals("") ||
+ (version instanceof SOAP12Version &&
+
role.equals(SOAP12Constants.SOAP_ROLE_ULTIMATE_RECEIVER))) {
+ return rolePlayer.isUltimateDestination();
+ }
+
+ // 2. If role is next, always return true
+ if (role.equals(version.getNextRoleURI())) return true;
+
+ // 3. If role is none, always return false
+ if (version instanceof SOAP12Version &&
+ role.equals(SOAP12Constants.SOAP_ROLE_NONE)) {
+ return false;
+ }
+
+ // 4. Return t/f depending on match
+ List roles = rolePlayer.getRoles();
+ if (roles != null) {
+ for (Iterator i = roles.iterator(); i.hasNext();) {
+ String thisRole = (String) i.next();
+ if (thisRole.equals(role)) return true;
+ }
+ }
+
+ return false;
+ }
+}
+
+/** A Checker to see that we both match a given role AND are
mustUnderstand=true */
class MURoleChecker extends RoleChecker {
public MURoleChecker(String role) {
super(role);
@@ -89,15 +129,9 @@
}
}
-/**
- * A class representing the SOAP Header, primarily allowing access to the
contained
- * HeaderBlocks.
- */
+/** A class representing the SOAP Header, primarily allowing access to the
contained HeaderBlocks. */
public abstract class SOAPHeaderImpl extends SOAPElement implements SOAPHeader
{
- /**
- * An Iterator which walks the header list as needed, potentially filtering
- * as we traverse.
- */
+ /** An Iterator which walks the header list as needed, potentially
filtering as we traverse. */
class HeaderIterator implements Iterator {
SOAPHeaderBlock current;
boolean advance = false;
@@ -109,7 +143,7 @@
public HeaderIterator(Checker checker) {
this.checker = checker;
- current = (SOAPHeaderBlock)getFirstElement();
+ current = (SOAPHeaderBlock) getFirstElement();
if (current != null) {
if (!checkHeader(current)) {
advance = true;
@@ -136,9 +170,9 @@
while (sibling != null) {
if (sibling instanceof SOAPHeaderBlock) {
- SOAPHeaderBlock possible = (SOAPHeaderBlock)sibling;
+ SOAPHeaderBlock possible = (SOAPHeaderBlock) sibling;
if (checkHeader(possible)) {
- current = (SOAPHeaderBlock)sibling;
+ current = (SOAPHeaderBlock) sibling;
return true;
}
}
@@ -196,6 +230,20 @@
public abstract SOAPHeaderBlock addHeaderBlock(String localName,
OMNamespace ns)
throws OMException;
+
+ /**
+ * Get the appropriate set of headers for a RolePlayer.
+ * <p/>
+ * The RolePlayer indicates whether it is the ultimate destination (in
which case headers with
+ * no role or the explicit UltimateDestination role will be included), and
any non-standard
+ * roles it supports. Headers targeted to "next" will always be included,
and those targeted to
+ * "none" (for SOAP 1.2) will never be included.
+ *
+ * @return an Iterator over all the HeaderBlocks this RolePlayer should
process.
+ */
+ public Iterator getHeadersToProcess(RolePlayer rolePlayer) {
+ return new HeaderIterator(new RolePlayerChecker(rolePlayer));
+ }
/**
* Returns a list of all the <CODE>SOAPHeaderBlock</CODE> objects in this
Modified:
webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11HeaderBlockImpl.java
URL:
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11HeaderBlockImpl.java?view=diff&rev=518741&r1=518740&r2=518741
==============================================================================
---
webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11HeaderBlockImpl.java
(original)
+++
webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11HeaderBlockImpl.java
Thu Mar 15 12:51:49 2007
@@ -24,6 +24,8 @@
import org.apache.axiom.soap.SOAPFactory;
import org.apache.axiom.soap.SOAPHeader;
import org.apache.axiom.soap.SOAPProcessingException;
+import org.apache.axiom.soap.SOAPVersion;
+import org.apache.axiom.soap.SOAP11Version;
import org.apache.axiom.soap.impl.llom.SOAPHeaderBlockImpl;
public class SOAP11HeaderBlockImpl extends SOAPHeaderBlockImpl {
@@ -144,5 +146,9 @@
//TODO : implement
public boolean getRelay() {
throw new UnsupportedOperationException("Not supported for SOAP 1.1");
+ }
+
+ public SOAPVersion getVersion() {
+ return SOAP11Version.getSingleton();
}
}
Modified:
webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12HeaderBlockImpl.java
URL:
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12HeaderBlockImpl.java?view=diff&rev=518741&r1=518740&r2=518741
==============================================================================
---
webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12HeaderBlockImpl.java
(original)
+++
webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12HeaderBlockImpl.java
Thu Mar 15 12:51:49 2007
@@ -24,6 +24,8 @@
import org.apache.axiom.soap.SOAPFactory;
import org.apache.axiom.soap.SOAPHeader;
import org.apache.axiom.soap.SOAPProcessingException;
+import org.apache.axiom.soap.SOAPVersion;
+import org.apache.axiom.soap.SOAP12Version;
import org.apache.axiom.soap.impl.llom.SOAPHeaderBlockImpl;
public class SOAP12HeaderBlockImpl extends SOAPHeaderBlockImpl {
@@ -144,5 +146,14 @@
//TODO : implement
public boolean getRelay() {
throw new UnsupportedOperationException("Not supported for SOAP 1.1");
+ }
+
+ /**
+ * What SOAP version is this HeaderBlock?
+ *
+ * @return a SOAPVersion, one of the two singletons.
+ */
+ public SOAPVersion getVersion() {
+ return SOAP12Version.getSingleton();
}
}
Modified:
webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPHeaderTest.java
URL:
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPHeaderTest.java?view=diff&rev=518741&r1=518740&r2=518741
==============================================================================
---
webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPHeaderTest.java
(original)
+++
webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPHeaderTest.java
Thu Mar 15 12:51:49 2007
@@ -20,7 +20,6 @@
import java.util.Iterator;
public class SOAPHeaderTest extends SOAPHeaderTestCase {
- protected boolean isThereException;
private static final String ROLE_URI =
"http://schemas.xmlsoap.org/soap/envelope/actor/next";
public SOAPHeaderTest(String testName) {
Added:
webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPRoleTest.java
URL:
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPRoleTest.java?view=auto&rev=518741
==============================================================================
---
webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPRoleTest.java
(added)
+++
webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPRoleTest.java
Thu Mar 15 12:51:49 2007
@@ -0,0 +1,153 @@
+package org.apache.axiom.soap;
+
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.XMLInputFactory;
+import java.io.FileReader;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Iterator;
+
+import org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder;
+import org.apache.axiom.om.AbstractTestCase;
+/*
+ * Copyright 2007 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+public class SOAPRoleTest extends AbstractTestCase {
+ public static final String CUSTOM_ROLE = "http://example.org/myCustomRole";
+
+ class MyRolePlayer implements RolePlayer {
+ boolean ultimateReceiver;
+ List roles;
+
+ public MyRolePlayer(boolean ultimateReceiver) {
+ this.ultimateReceiver = ultimateReceiver;
+ roles = null;
+ }
+
+ public MyRolePlayer(boolean ultimateReceiver, String [] roles) {
+ this.ultimateReceiver = ultimateReceiver;
+ this.roles = new ArrayList();
+ for (int i = 0; i < roles.length; i++) {
+ this.roles.add(roles[i]);
+ }
+ }
+
+ public List getRoles() {
+ return roles;
+ }
+
+ public boolean isUltimateDestination() {
+ return ultimateReceiver;
+ }
+ }
+
+ public SOAPRoleTest(String testName) {
+ super(testName);
+ }
+
+ protected void setUp() throws Exception {
+ }
+
+ public StAXSOAPModelBuilder getSOAPBuilder(String fileName) throws
Exception {
+ XMLStreamReader parser =
XMLInputFactory.newInstance().createXMLStreamReader(
+ new FileReader(getTestResourceFile(fileName)));
+ return new StAXSOAPModelBuilder(parser, null);
+ }
+
+ public void testSOAP11Roles() throws Exception {
+ String testfile = "soap/soap11/soap11RoleMessage.xml";
+ StAXSOAPModelBuilder builder = getSOAPBuilder(testfile);
+ SOAPEnvelope env = builder.getSOAPEnvelope();
+ SOAPHeader soapHeader = env.getHeader();
+
+ String roles [] = { CUSTOM_ROLE };
+ RolePlayer rp = new MyRolePlayer(true, roles);
+
+ Iterator headers = soapHeader.getHeadersToProcess(rp);
+ assertTrue("No headers!", headers.hasNext());
+
+ int numHeaders = 0;
+ while (headers.hasNext()) {
+ SOAPHeaderBlock header = (SOAPHeaderBlock)headers.next();
+ assertNotNull(header);
+ numHeaders++;
+ }
+
+ assertEquals("Didn't get right number of headers (with custom role)",
4, numHeaders);
+
+ rp = new MyRolePlayer(true);
+
+ headers = soapHeader.getHeadersToProcess(rp);
+ assertTrue(headers.hasNext());
+
+ numHeaders = 0;
+ while (headers.hasNext()) {
+ SOAPHeaderBlock header = (SOAPHeaderBlock)headers.next();
+ assertNotNull(header);
+ numHeaders++;
+ }
+
+ assertEquals("Didn't get right number of headers (no custom role)", 3,
numHeaders);
+ }
+
+ public void testSOAP12Roles() throws Exception {
+ String testfile = "soap/soap12RoleMessage.xml";
+ StAXSOAPModelBuilder builder = getSOAPBuilder(testfile);
+ SOAPEnvelope env = builder.getSOAPEnvelope();
+ SOAPHeader soapHeader = env.getHeader();
+
+ String roles [] = { CUSTOM_ROLE };
+ RolePlayer rp = new MyRolePlayer(true, roles);
+
+ Iterator headers = soapHeader.getHeadersToProcess(rp);
+ assertTrue("No headers!", headers.hasNext());
+
+ int numHeaders = 0;
+ while (headers.hasNext()) {
+ SOAPHeaderBlock header = (SOAPHeaderBlock)headers.next();
+ numHeaders++;
+ }
+
+ assertEquals("Didn't get right number of headers (with custom role)",
5, numHeaders);
+
+ rp = new MyRolePlayer(true);
+
+ headers = soapHeader.getHeadersToProcess(rp);
+ assertTrue(headers.hasNext());
+
+ numHeaders = 0;
+ while (headers.hasNext()) {
+ SOAPHeaderBlock header = (SOAPHeaderBlock)headers.next();
+ numHeaders++;
+ }
+
+ assertEquals("Didn't get right number of headers (no custom role)", 4,
numHeaders);
+
+ // Intermediary test
+ rp = new MyRolePlayer(false);
+
+ headers = soapHeader.getHeadersToProcess(rp);
+ assertTrue(headers.hasNext());
+
+ numHeaders = 0;
+ while (headers.hasNext()) {
+ SOAPHeaderBlock header = (SOAPHeaderBlock)headers.next();
+ numHeaders++;
+ }
+
+ assertEquals("Didn't get right number of headers (no custom role)", 1,
numHeaders);
+ }
+}
Modified:
webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPTestCase.java
URL:
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPTestCase.java?view=diff&rev=518741&r1=518740&r2=518741
==============================================================================
---
webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPTestCase.java
(original)
+++
webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPTestCase.java
Thu Mar 15 12:51:49 2007
@@ -20,13 +20,9 @@
import org.apache.axiom.om.OMAbstractFactory;
import org.apache.axiom.om.OMFactory;
import org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import javax.xml.stream.XMLInputFactory;
-import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
-import java.io.FileNotFoundException;
import java.io.FileReader;
public abstract class SOAPTestCase extends AbstractTestCase {
@@ -42,7 +38,6 @@
protected static final String SOAP11_FILE_NAME =
"soap/soap11/soap11message.xml";
protected static final String SOAP12_FILE_NAME = "soap/soap12message.xml";
- private Log log = LogFactory.getLog(getClass());
/** @param testName */
public SOAPTestCase(String testName) {
@@ -66,17 +61,9 @@
.getDocumentElement();
}
- protected StAXSOAPModelBuilder getSOAPBuilder(String fileName) {
- XMLStreamReader parser = null;
- try {
- parser =
- XMLInputFactory.newInstance().createXMLStreamReader(
- new FileReader(getTestResourceFile(fileName)));
- } catch (XMLStreamException e) {
- log.info(e.getMessage());
- } catch (FileNotFoundException e) {
- log.info(e.getMessage());
- }
+ protected StAXSOAPModelBuilder getSOAPBuilder(String fileName) throws
Exception {
+ XMLStreamReader parser =
XMLInputFactory.newInstance().createXMLStreamReader(
+ new FileReader(getTestResourceFile(fileName)));
return new StAXSOAPModelBuilder(parser, null);
}
Added:
webservices/commons/trunk/modules/axiom/modules/axiom-tests/test-resources/soap/soap11/soap11RoleMessage.xml
URL:
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-tests/test-resources/soap/soap11/soap11RoleMessage.xml?view=auto&rev=518741
==============================================================================
---
webservices/commons/trunk/modules/axiom/modules/axiom-tests/test-resources/soap/soap11/soap11RoleMessage.xml
(added)
+++
webservices/commons/trunk/modules/axiom/modules/axiom-tests/test-resources/soap/soap11/soap11RoleMessage.xml
Thu Mar 15 12:51:49 2007
@@ -0,0 +1,20 @@
+<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
+ <env:Header xmlns:test="http://example.org/RoleTest">
+ <test:h1 env:actor="http://schemas.xmlsoap.org/soap/actor/next"
+ env:mustUnderstand="false">
+ I'm so next.
+ </test:h1>
+ <test:h2 env:actor="">
+ Going all the way baby! (empty actor)
+ </test:h2>
+ <test:h3>
+ Going all the way baby! (no actor)
+ </test:h3>
+ <test:h4 env:actor="http://example.org/myCustomRole">
+ I'm only going to special, customized places.
+ </test:h4>
+ </env:Header>
+ <env:Body>
+ <Echo>This is a test, this is only a test...</Echo>
+ </env:Body>
+</env:Envelope>
\ No newline at end of file
Added:
webservices/commons/trunk/modules/axiom/modules/axiom-tests/test-resources/soap/soap12RoleMessage.xml
URL:
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-tests/test-resources/soap/soap12RoleMessage.xml?view=auto&rev=518741
==============================================================================
---
webservices/commons/trunk/modules/axiom/modules/axiom-tests/test-resources/soap/soap12RoleMessage.xml
(added)
+++
webservices/commons/trunk/modules/axiom/modules/axiom-tests/test-resources/soap/soap12RoleMessage.xml
Thu Mar 15 12:51:49 2007
@@ -0,0 +1,28 @@
+<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"
xmlns:xml="http://www.w3.org/XML/1998/namespace">
+ <env:Header xmlns:test="http://example.org/RoleTest">
+ <test:h1
env:role="http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver"
+ env:mustUnderstand="true">
+ Going all the way baby!
+ </test:h1>
+ <test:h2 env:role="http://www.w3.org/2003/05/soap-envelope/role/next"
+ env:mustUnderstand="false">
+ I'm so next.
+ </test:h2>
+ <test:h3 env:role="http://www.w3.org/2003/05/soap-envelope/role/none"
+ env:mustUnderstand="1">
+ Please don't process me!
+ </test:h3>
+ <test:h4 env:role="http://example.org/myCustomRole">
+ I'm only going to special, customized places.
+ </test:h4>
+ <test:h5>
+ Going all the way baby! (no role)
+ </test:h5>
+ <test:h6 env:role="">
+ Going all the way baby! (empty role)
+ </test:h6>
+ </env:Header>
+ <env:Body>
+ <Echo>This is a test, this is only a test...</Echo>
+ </env:Body>
+</env:Envelope>
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]