scheu 2002/10/02 16:37:37
Modified: java/src/org/apache/axis/description Tag: explicitHeaderWork
ParameterDesc.java
java/src/org/apache/axis/message Tag: explicitHeaderWork
RPCElement.java
Log:
Revision Changes Path
No revision
No revision
1.22.6.4 +1 -1 xml-axis/java/src/org/apache/axis/description/ParameterDesc.java
Index: ParameterDesc.java
===================================================================
RCS file:
/home/cvs/xml-axis/java/src/org/apache/axis/description/ParameterDesc.java,v
retrieving revision 1.22.6.3
retrieving revision 1.22.6.4
diff -u -r1.22.6.3 -r1.22.6.4
--- ParameterDesc.java 2 Oct 2002 20:39:06 -0000 1.22.6.3
+++ ParameterDesc.java 2 Oct 2002 23:37:37 -0000 1.22.6.4
@@ -142,7 +142,7 @@
* @param typeQName the parameter's XML type QName
* @param javaType the parameter's javaType
* @param inHeader does this parameter go into the input message header?
- * @param inHeader does this parameter go into the output message header?
+ * @param outHeader does this parameter go into the output message header?
*/
public ParameterDesc(QName name, byte mode, QName typeQName,
Class javaType, boolean inHeader, boolean outHeader) {
No revision
No revision
1.76.4.2 +63 -61 xml-axis/java/src/org/apache/axis/message/RPCElement.java
Index: RPCElement.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/message/RPCElement.java,v
retrieving revision 1.76.4.1
retrieving revision 1.76.4.2
diff -u -r1.76.4.1 -r1.76.4.2
--- RPCElement.java 2 Oct 2002 20:39:06 -0000 1.76.4.1
+++ RPCElement.java 2 Oct 2002 23:37:37 -0000 1.76.4.2
@@ -382,70 +382,72 @@
{
// Inform handler that subsequent elements come from
// the header
-
- handler.setHeaderElement(true);
- // Get the soap envelope
- SOAPElement envelope = getParentElement();
- while (envelope != null &&
- !(envelope instanceof SOAPEnvelope)) {
- envelope = envelope.getParentElement();
- }
- if (envelope == null)
- return;
-
- // Find parameters that have instance
- // data in the header.
- ArrayList paramDescs = operation.getParameters();
- if (paramDescs != null) {
- for (int j=0; j<paramDescs.size(); j++) {
- ParameterDesc paramDesc = (ParameterDesc) paramDescs.get(j);
- if ((!isResponse && paramDesc.isInHeader()) ||
- (isResponse && paramDesc.isOutHeader())) {
- // Get the headers that match the parameter's
- // QName
- Enumeration headers = ((SOAPEnvelope) envelope).
- getHeadersByName(
- paramDesc.getQName().getNamespaceURI(),
- paramDesc.getQName().getLocalPart(),
- true);
- // Publish each of the found elements to the
- // handler. The pushElementHandler and
- // setCurElement calls are necessary to
- // have the message element recognized as a
- // child of the RPCElement.
- while(headers != null &&
- headers.hasMoreElements()) {
- context.pushElementHandler(handler);
- context.setCurElement(null);
- ((MessageElement) headers.nextElement()).
- publishToHandler(
- (org.xml.sax.ContentHandler)context);
+ try {
+ handler.setHeaderElement(true);
+ // Get the soap envelope
+ SOAPElement envelope = getParentElement();
+ while (envelope != null &&
+ !(envelope instanceof SOAPEnvelope)) {
+ envelope = envelope.getParentElement();
+ }
+ if (envelope == null)
+ return;
+
+ // Find parameters that have instance
+ // data in the header.
+ ArrayList paramDescs = operation.getParameters();
+ if (paramDescs != null) {
+ for (int j=0; j<paramDescs.size(); j++) {
+ ParameterDesc paramDesc =
+ (ParameterDesc) paramDescs.get(j);
+ if ((!isResponse && paramDesc.isInHeader()) ||
+ (isResponse && paramDesc.isOutHeader())) {
+ // Get the headers that match the parameter's
+ // QName
+ Enumeration headers = ((SOAPEnvelope) envelope).
+ getHeadersByName(
+ paramDesc.getQName().getNamespaceURI(),
+ paramDesc.getQName().getLocalPart(),
+ true);
+ // Publish each of the found elements to the
+ // handler. The pushElementHandler and
+ // setCurElement calls are necessary to
+ // have the message element recognized as a
+ // child of the RPCElement.
+ while(headers != null &&
+ headers.hasMoreElements()) {
+ context.pushElementHandler(handler);
+ context.setCurElement(null);
+ ((MessageElement) headers.nextElement()).
+ publishToHandler(
+ (org.xml.sax.ContentHandler)context);
+ }
}
}
}
+
+ // Now do the same processing for the return parameter.
+ if (isResponse &&
+ operation.getReturnParamDesc() != null &&
+ operation.getReturnParamDesc().isOutHeader()) {
+ ParameterDesc paramDesc = operation.getReturnParamDesc();
+ Enumeration headers =
+ ((SOAPEnvelope) envelope).
+ getHeadersByName(
+ paramDesc.getQName().getNamespaceURI(),
+ paramDesc.getQName().getLocalPart(),
+ true);
+ while(headers != null &&
+ headers.hasMoreElements()) {
+ context.pushElementHandler(handler);
+ context.setCurElement(null);
+
+ ((MessageElement) headers.nextElement()).
+ publishToHandler((org.xml.sax.ContentHandler)context);
+ }
+ }
+ } finally {
+ handler.setHeaderElement(false);
}
-
- // Now do the same processing for the return parameter.
- if (isResponse &&
- operation.getReturnParamDesc() != null &&
- operation.getReturnParamDesc().isOutHeader()) {
- ParameterDesc paramDesc = operation.getReturnParamDesc();
- Enumeration headers =
- ((SOAPEnvelope) envelope).
- getHeadersByName(
- paramDesc.getQName().getNamespaceURI(),
- paramDesc.getQName().getLocalPart(),
- true);
- while(headers != null &&
- headers.hasMoreElements()) {
- context.pushElementHandler(handler);
- context.setCurElement(null);
-
- ((MessageElement) headers.nextElement()).
- publishToHandler((org.xml.sax.ContentHandler)context);
- }
- }
-
- handler.setHeaderElement(false);
}
}