Author: chinthaka
Date: Wed May 11 02:46:32 2005
New Revision: 169611
URL: http://svn.apache.org/viewcvs?rev=169611&view=rev
Log:
Moving SOAP specific stuff within the *.llom package into *.llom.soap package
Added:
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/soap/SOAPBodyImpl.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/soap/SOAPConstants.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/soap/SOAPEnvelopeImpl.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/soap/SOAPFaulReasonImpl.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/soap/SOAPFaultImpl.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/soap/SOAPHeaderBlockImpl.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/soap/SOAPHeaderImpl.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/soap/SOAPTextImpl.java
Modified:
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/SOAPFactory.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/factory/SOAPLinkedListImplFactory.java
Modified:
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/SOAPFactory.java
URL:
http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/SOAPFactory.java?rev=169611&r1=169610&r2=169611&view=diff
==============================================================================
---
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/SOAPFactory.java
(original)
+++
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/SOAPFactory.java
Wed May 11 02:46:32 2005
@@ -21,33 +21,36 @@
/**
* Eran Chinthaka ([EMAIL PROTECTED])
*/
+
/**
- * @param envelope
+ * @param ns
+ * @param builder
* @return
*/
- public SOAPBody createSOAPBody(SOAPEnvelope envelope);
+ public SOAPEnvelope createSOAPEnvelope(OMNamespace ns,
+ OMXMLParserWrapper
builder);
/**
- * @param envelope
- * @param builder
+ * @param ns
* @return
*/
- public SOAPBody createSOAPBody(SOAPEnvelope envelope,
- OMXMLParserWrapper builder);
+ public SOAPEnvelope createSOAPEnvelope();
/**
- * @param ns
- * @param builder
+ * @param envelope
* @return
*/
- public SOAPEnvelope createSOAPEnvelope(OMNamespace ns,
- OMXMLParserWrapper
builder);
+ public SOAPBody createSOAPBody(SOAPEnvelope envelope);
/**
- * @param ns
+ * @param envelope
+ * @param builder
* @return
*/
- public SOAPEnvelope createSOAPEnvelope(OMNamespace ns);
+ public SOAPBody createSOAPBody(SOAPEnvelope envelope,
+ OMXMLParserWrapper builder);
+
+
/**
* @param envelope
Modified:
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/factory/SOAPLinkedListImplFactory.java
URL:
http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/factory/SOAPLinkedListImplFactory.java?rev=169611&r1=169610&r2=169611&view=diff
==============================================================================
---
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/factory/SOAPLinkedListImplFactory.java
(original)
+++
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/factory/SOAPLinkedListImplFactory.java
Wed May 11 02:46:32 2005
@@ -75,6 +75,10 @@
return new SOAPEnvelopeImpl(ns, builder);
}
+ public SOAPEnvelope createSOAPEnvelope() {
+ return null; //To change body of implemented methods use File |
Settings | File Templates.
+ }
+
/**
* Method createSOAPEnvelope
*
Added:
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/soap/SOAPBodyImpl.java
URL:
http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/soap/SOAPBodyImpl.java?rev=169611&view=auto
==============================================================================
---
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/soap/SOAPBodyImpl.java
(added)
+++
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/soap/SOAPBodyImpl.java
Wed May 11 02:46:32 2005
@@ -0,0 +1,133 @@
+/*
+ * Copyright 2004,2005 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.
+ */
+package org.apache.axis.om.impl.llom.soap;
+
+import org.apache.axis.om.OMConstants;
+import org.apache.axis.om.OMElement;
+import org.apache.axis.om.OMException;
+import org.apache.axis.om.OMXMLParserWrapper;
+import org.apache.axis.om.SOAPBody;
+import org.apache.axis.om.SOAPEnvelope;
+import org.apache.axis.om.SOAPFault;
+import org.apache.axis.om.impl.llom.soap.soap11.SOAP11Constants;
+import org.apache.axis.om.impl.llom.soap.soap11.SOAP11Constants;
+import org.apache.axis.om.impl.llom.OMElementImpl;
+
+/**
+ * Class SOAPBodyImpl
+ */
+public class SOAPBodyImpl extends OMElementImpl
+ implements SOAPBody, OMConstants {
+ /**
+ * Field hasSOAPFault
+ */
+ private boolean hasSOAPFault = false;
+
+ /**
+ * @param envelope
+ */
+ public SOAPBodyImpl(SOAPEnvelope envelope) {
+ super(envelope);
+ this.ns = envelope.getNamespace();
+ this.localName = SOAPConstants.BODY_LOCAL_NAME;
+ }
+
+ /**
+ * Constructor SOAPBodyImpl
+ *
+ * @param envelope
+ * @param builder
+ */
+ public SOAPBodyImpl(SOAPEnvelope envelope, OMXMLParserWrapper builder) {
+ super(SOAPConstants.BODY_LOCAL_NAME, envelope.getNamespace(), envelope,
+ builder);
+ }
+
+ /**
+ * Creates a new <code>SOAPFault</code> object and adds it to
+ * this <code>SOAPBody</code> object.
+ *
+ * @param e
+ * @return the new <code>SOAPFault</code> object
+ * @throws org.apache.axis.om.OMException if there is a SOAP error
+ * @throws OMException
+ */
+ public SOAPFault addFault(Exception e) throws OMException {
+ SOAPFault soapFault = new SOAPFaultImpl(this, e);
+ addFault(soapFault);
+ return soapFault;
+ }
+
+ /**
+ * Indicates whether a <code>SOAPFault</code> object exists in
+ * this <code>SOAPBody</code> object.
+ *
+ * @return <code>true</code> if a <code>SOAPFault</code> object exists in
+ * this <code>SOAPBody</code> object; <code>false</code>
+ * otherwise
+ */
+ public boolean hasFault() {
+ if (hasSOAPFault) {
+ return true;
+ } else {
+ OMElement element = getFirstElement();
+ if(element != null
+ &&
SOAPConstants.SOAPFAULT_LOCAL_NAME.equals(element.getLocalName())
+ &&
SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(element.getNamespace().getName())){
+ hasSOAPFault = true;
+ return true;
+ }else{
+ return false;
+ }
+ }
+ }
+
+ /**
+ * Returns the <code>SOAPFault</code> object in this <code>SOAPBody</code>
+ * object.
+ *
+ * @return the <code>SOAPFault</code> object in this <code>SOAPBody</code>
+ * object
+ */
+ public SOAPFault getFault() {
+ if(hasSOAPFault){
+ OMElement element = getFirstElement();
+ if(element != null
+ &&
SOAPConstants.SOAPFAULT_LOCAL_NAME.equals(element.getLocalName())
+ &&
SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(element.getNamespace().getName())){
+ hasSOAPFault = true;
+ return (SOAPFault)element;
+ }else{
+ return null;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * @param soapFault
+ * @throws org.apache.axis.om.OMException
+ * @throws OMException
+ */
+ public void addFault(SOAPFault soapFault) throws OMException {
+ if (hasSOAPFault) {
+ throw new OMException(
+ "SOAP Body already has a SOAP Fault and there can not be
more than one SOAP fault");
+ }
+ addChild(soapFault);
+ hasSOAPFault = true;
+ }
+}
Added:
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/soap/SOAPConstants.java
URL:
http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/soap/SOAPConstants.java?rev=169611&view=auto
==============================================================================
---
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/soap/SOAPConstants.java
(added)
+++
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/soap/SOAPConstants.java
Wed May 11 02:46:32 2005
@@ -0,0 +1,84 @@
+package org.apache.axis.om.impl.llom.soap;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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.
+ * <p/>
+ */
+public interface SOAPConstants {
+ /**
+ * Eran Chinthaka ([EMAIL PROTECTED])
+ */
+ /**
+ * Field SOAP_DEFAULT_NAMESPACE_PREFIX
+ */
+ public static final String SOAP_DEFAULT_NAMESPACE_PREFIX = "soapenv";
+ /**
+ * Field SOAPENVELOPE_LOCAL_NAME
+ */
+ public static final String SOAPENVELOPE_LOCAL_NAME = "Envelope";
+
+ /**
+ * Field HEADER_LOCAL_NAME
+ */
+ public static final String HEADER_LOCAL_NAME = "Header";
+
+ /**
+ * Field BODY_LOCAL_NAME
+ */
+ public static final String BODY_LOCAL_NAME = "Body";
+ /**
+ * Field BODY_NAMESPACE_PREFIX
+ */
+ public static final String BODY_NAMESPACE_PREFIX =
+ SOAP_DEFAULT_NAMESPACE_PREFIX;
+ /**
+ * Field BODY_FAULT_LOCAL_NAME
+ */
+ public static final String BODY_FAULT_LOCAL_NAME = "Fault";
+ /**
+ * Field ATTR_ACTOR
+ */
+ public static final String ATTR_ACTOR = "actor";
+ /**
+ * Field ATTR_MUSTUNDERSTAND
+ */
+ public static final String ATTR_MUSTUNDERSTAND = "mustUnderstand";
+ /**
+ * Field SOAPFAULT_LOCAL_NAME
+ */
+ public static final String SOAPFAULT_LOCAL_NAME = "Fault";
+ /**
+ * Field SOAPFAULT_CODE_LOCAL_NAME
+ */
+ public static final String SOAPFAULT_CODE_LOCAL_NAME = "faultcode";
+ /**
+ * Field SOAPFAULT_STRING_LOCAL_NAME
+ */
+ public static final String SOAPFAULT_STRING_LOCAL_NAME = "faultstring";
+ /**
+ * Field SOAPFAULT_ACTOR_LOCAL_NAME
+ */
+ public static final String SOAPFAULT_ACTOR_LOCAL_NAME = "faultactor";
+ /**
+ * Field SOAPFAULT_DETAIL_LOCAL_NAME
+ */
+ public static final String SOAPFAULT_DETAIL_LOCAL_NAME = "detail";
+
+ /**
+ * Field SOAPFAULT_NAMESPACE_PREFIX
+ */
+ public static final String SOAPFAULT_NAMESPACE_PREFIX =
+ SOAP_DEFAULT_NAMESPACE_PREFIX;
+}
Added:
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/soap/SOAPEnvelopeImpl.java
URL:
http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/soap/SOAPEnvelopeImpl.java?rev=169611&view=auto
==============================================================================
---
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/soap/SOAPEnvelopeImpl.java
(added)
+++
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/soap/SOAPEnvelopeImpl.java
Wed May 11 02:46:32 2005
@@ -0,0 +1,124 @@
+/*
+ * Copyright 2004,2005 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.
+ */
+package org.apache.axis.om.impl.llom.soap;
+
+import org.apache.axis.om.OMConstants;
+import org.apache.axis.om.OMElement;
+import org.apache.axis.om.OMException;
+import org.apache.axis.om.OMNamespace;
+import org.apache.axis.om.OMNode;
+import org.apache.axis.om.OMXMLParserWrapper;
+import org.apache.axis.om.SOAPBody;
+import org.apache.axis.om.SOAPEnvelope;
+import org.apache.axis.om.SOAPHeader;
+import org.apache.axis.om.impl.llom.soap.SOAPConstants;
+import org.apache.axis.om.impl.llom.OMElementImpl;
+
+/**
+ * Class SOAPEnvelopeImpl
+ */
+public class SOAPEnvelopeImpl extends OMElementImpl
+ implements SOAPEnvelope, OMConstants {
+
+ private SOAPBody soapBody;
+ private SOAPHeader soapHeader;
+
+ /**
+ * @param builder
+ */
+ public SOAPEnvelopeImpl(OMXMLParserWrapper builder) {
+ super(SOAPConstants.SOAPENVELOPE_LOCAL_NAME, null, null, builder);
+ }
+
+ /**
+ * Constructor SOAPEnvelopeImpl
+ *
+ * @param ns
+ * @param builder
+ */
+ public SOAPEnvelopeImpl(OMNamespace ns, OMXMLParserWrapper builder) {
+ super(SOAPConstants.SOAPENVELOPE_LOCAL_NAME, ns, null, builder);
+ }
+
+ /**
+ * @param ns
+ */
+ public SOAPEnvelopeImpl(OMNamespace ns) {
+ super(SOAPConstants.SOAPENVELOPE_LOCAL_NAME, ns);
+ }
+
+ /**
+ * Returns the <CODE>SOAPHeader</CODE> object for this <CODE>
+ * SOAPEnvelope</CODE> object. <P> This SOAPHeader will just be a container
+ * for all the headers in the <CODE>OMMessage</CODE> </P>
+ *
+ * @return the <CODE>SOAPHeader</CODE> object or <CODE> null</CODE> if
there
+ * is none
+ * @throws org.apache.axis.om.OMException if there is a problem obtaining
+ * the <CODE>SOAPHeader</CODE>
+ * object
+ * @throws OMException
+ */
+ public SOAPHeader getHeader() throws OMException {
+ if (soapHeader == null) {
+ OMElement element = getFirstElement();
+ if
(SOAPConstants.HEADER_LOCAL_NAME.equals(element.getLocalName())) {
+ soapHeader = (SOAPHeader) element;
+ }
+ }
+ return soapHeader;
+ }
+
+ /**
+ * Returns the <CODE>SOAPBody</CODE> object associated with this
+ * <CODE>SOAPEnvelope</CODE> object. <P> This SOAPBody will just be a
+ * container for all the BodyElements in the <CODE>OMMessage</CODE> </P>
+ *
+ * @return the <CODE>SOAPBody</CODE> object for this <CODE>
+ * SOAPEnvelope</CODE> object or <CODE>null</CODE> if there is none
+ * @throws org.apache.axis.om.OMException if there is a problem obtaining
+ * the <CODE>SOAPBody</CODE> object
+ * @throws OMException
+ */
+ public SOAPBody getBody() throws OMException {
+ if (soapBody == null) {
+ OMElement element = getFirstElement();
+ if (SOAPConstants.BODY_LOCAL_NAME.equals(element.getLocalName())) {
+ soapBody = (SOAPBody) element;
+ } else {
+ OMNode node = element.getNextSibling();
+ while (node.getType() != OMNode.ELEMENT_NODE) {
+ node = node.getNextSibling();
+ }
+ element = (OMElement) node;
+
+ if
(SOAPConstants.BODY_LOCAL_NAME.equals(element.getLocalName())) {
+ soapBody = (SOAPBody) element;
+ }
+ }
+ }
+ return soapBody;
+ }
+
+ /**
+ * Method detach
+ *
+ * @throws OMException
+ */
+ public OMNode detach() throws OMException {
+ throw new OMException("Root Element can not be detached");
+ }
+}
Added:
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/soap/SOAPFaulReasonImpl.java
URL:
http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/soap/SOAPFaulReasonImpl.java?rev=169611&view=auto
==============================================================================
---
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/soap/SOAPFaulReasonImpl.java
(added)
+++
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/soap/SOAPFaulReasonImpl.java
Wed May 11 02:46:32 2005
@@ -0,0 +1,48 @@
+package org.apache.axis.om.impl.llom.soap;
+
+import org.apache.axis.om.OMElement;
+import org.apache.axis.om.SOAPFaultReason;
+import org.apache.axis.om.SOAPText;
+import org.apache.axis.om.impl.llom.OMElementImpl;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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.
+ * <p/>
+ */
+public class SOAPFaulReasonImpl extends OMElementImpl implements
SOAPFaultReason {
+
+
+ /**
+ * @param parent
+ * @param parent
+ */
+ public SOAPFaulReasonImpl(OMElement parent) {
+ super(parent);
+ }
+
+ /**
+ * Eran Chinthaka ([EMAIL PROTECTED])
+ */
+
+ private SOAPText soapText;
+
+ public void setSOAPText(SOAPText soapText) {
+ this.soapText = soapText;
+ }
+
+ public SOAPText getSOAPText() {
+ return this.soapText; //To change body of implemented methods use
File | Settings | File Templates.
+ }
+}
Added:
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/soap/SOAPFaultImpl.java
URL:
http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/soap/SOAPFaultImpl.java?rev=169611&view=auto
==============================================================================
---
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/soap/SOAPFaultImpl.java
(added)
+++
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/soap/SOAPFaultImpl.java
Wed May 11 02:46:32 2005
@@ -0,0 +1,354 @@
+/*
+ * Copyright 2004,2005 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.
+ */
+package org.apache.axis.om.impl.llom.soap;
+
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.Iterator;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLOutputFactory;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
+import org.apache.axis.om.OMAbstractFactory;
+import org.apache.axis.om.OMConstants;
+import org.apache.axis.om.OMElement;
+import org.apache.axis.om.OMException;
+import org.apache.axis.om.OMNamespace;
+import org.apache.axis.om.OMNode;
+import org.apache.axis.om.OMText;
+import org.apache.axis.om.OMXMLParserWrapper;
+import org.apache.axis.om.SOAPFault;
+import org.apache.axis.om.SOAPFaultCode;
+import org.apache.axis.om.SOAPFaultDetail;
+import org.apache.axis.om.SOAPFaultNode;
+import org.apache.axis.om.SOAPFaultReason;
+import org.apache.axis.om.SOAPFaultRole;
+import org.apache.axis.om.SOAPText;
+import org.apache.axis.om.impl.llom.soap.soap11.SOAP11Constants;
+import org.apache.axis.om.impl.llom.soap.soap11.SOAP11Constants;
+import org.apache.axis.om.impl.llom.soap.SOAPConstants;
+import org.apache.axis.om.impl.llom.soap.SOAPFaulReasonImpl;
+import org.apache.axis.om.impl.llom.OMElementImpl;
+import org.apache.axis.om.impl.llom.OMNamespaceImpl;
+import org.apache.axis.om.impl.llom.OMTextImpl;
+
+/**
+ * Class SOAPFaultImpl
+ */
+public class SOAPFaultImpl extends OMElementImpl
+ implements SOAPFault, OMConstants {
+ /**
+ * Field e
+ */
+ private Exception e;
+
+ /**
+ * Field faultCodeElement
+ */
+ private OMElement faultCodeElement;
+
+ /**
+ * Field faultActorElement
+ */
+ private OMElement faultActorElement;
+
+ /**
+ * Field faultStringElement
+ */
+ private OMElement faultStringElement;
+
+ /**
+ * Field detailElement
+ */
+ private OMElement detailElement;
+
+ /**
+ * Constructor SOAPFaultImpl
+ *
+ * @param parent
+ * @param e
+ */
+ public SOAPFaultImpl(OMElement parent, Exception e) {
+ super(SOAPConstants.SOAPFAULT_LOCAL_NAME,
+ new
OMNamespaceImpl(SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI,
+ SOAPConstants.SOAPFAULT_NAMESPACE_PREFIX));
+ this.parent = (OMElementImpl) parent;
+ this.e = e;
+ StringWriter sw = new StringWriter();
+ e.printStackTrace(new PrintWriter(sw));
+
this.setDetailInformation(OMAbstractFactory.getSOAP11Factory().createText(sw.getBuffer().toString()));
+ }
+
+ /**
+ * Constructor SOAPFaultImpl
+ *
+ * @param ns
+ * @param parent
+ * @param builder
+ */
+ public SOAPFaultImpl(OMNamespace ns, OMElement parent,
+ OMXMLParserWrapper builder) {
+ super(SOAPConstants.SOAPFAULT_LOCAL_NAME, ns, parent, builder);
+ }
+
+ /**
+ * Method setCode
+ *
+ * @param faultCode
+ * @throws OMException
+ */
+ public void setCode(SOAPFaultCode faultCode) throws OMException {
+ if (faultCodeElement != null) {
+ faultCodeElement.detach();
+ }
+ faultCodeElement =
+ new OMElementImpl(SOAPConstants.SOAPFAULT_CODE_LOCAL_NAME, this.ns);
+ this.addChild(faultCodeElement);
+ faultCodeElement.addChild(new OMTextImpl(faultCodeElement,
+ faultCode.getNamespace().getPrefix() + ':'
+ + faultCode.getLocalName()));
+ }
+
+ /**
+ * Method getCode
+ *
+ * @return
+ */
+ public SOAPFaultCode getCode() {
+// if (faultCodeElement != null) {
+// Iterator childrenIter = faultCodeElement.getChildren();
+// while (childrenIter.hasNext()) {
+// Object o = childrenIter.next();
+// if ((o instanceof OMText)
+// && !((OMText) o).getText().trim().equals("")) {
+// String[] strings = ((OMText) o).getText().split(":");
+// return new QName("", strings[1], strings[0]);
+// }
+// }
+// } else {
+// faultCodeElement = this.getFirstChildWithName(
+// new QName(
+// this.ns.getName(),
SOAPConstants.SOAPFAULT_CODE_LOCAL_NAME,
+// this.ns.getPrefix()));
+// if (faultCodeElement != null) {
+// return this.getCode();
+// }
+// }
+ return null;
+ }
+
+ public void setReason(SOAPFaultReason reason) {
+ //To change body of implemented methods use File | Settings | File
Templates.
+ }
+
+ public SOAPFaultReason getReason() {
+
+
+ SOAPFaultReason faultReason = new SOAPFaulReasonImpl(this);
+ SOAPText soapText = new SOAPTextImpl(faultReason);
+ soapText.setText(this.getFaultString());
+
+ faultReason.setSOAPText(soapText);
+ return faultReason; //To change body of implemented methods use File
| Settings | File Templates.
+ }
+
+ public void setNode(SOAPFaultNode node) {
+ //To change body of implemented methods use File | Settings | File
Templates.
+ }
+
+ public SOAPFaultNode getNode() {
+ return null; //To change body of implemented methods use File |
Settings | File Templates.
+ }
+
+ public void setRole(SOAPFaultRole role) {
+ //To change body of implemented methods use File | Settings | File
Templates.
+ }
+
+ public SOAPFaultRole getRole() {
+ return null; //To change body of implemented methods use File |
Settings | File Templates.
+ }
+
+ public void setDetail(SOAPFaultDetail detail) {
+ //To change body of implemented methods use File | Settings | File
Templates.
+ }
+
+ public SOAPFaultDetail getDetail() {
+ return null; //To change body of implemented methods use File |
Settings | File Templates.
+ }
+
+ /**
+ * Method setFaultActor
+ *
+ * @param faultActor
+ * @throws OMException
+ */
+ public void setFaultActor(String faultActor) throws OMException {
+ if (faultActorElement != null) {
+ faultActorElement.detach();
+ }
+ faultActorElement =
+ new OMElementImpl(SOAPConstants.SOAPFAULT_ACTOR_LOCAL_NAME, this.ns);
+ this.addChild(faultActorElement);
+ faultActorElement.addChild(new OMTextImpl(faultActorElement,
+ faultActor));
+ }
+
+ /**
+ * Method getFaultActor
+ *
+ * @return
+ */
+ public String getFaultActor() {
+ if (faultActorElement != null) {
+ Iterator childrenIter = faultActorElement.getChildren();
+ while (childrenIter.hasNext()) {
+ Object o = childrenIter.next();
+ if ((o instanceof OMText)
+ && !"".equals(((OMText) o).getText())) {
+ return ((OMText) o).getText();
+ }
+ }
+ } else {
+ faultActorElement = this.getFirstChildWithName(
+ new QName(
+ this.ns.getName(),
SOAPConstants.SOAPFAULT_ACTOR_LOCAL_NAME,
+ this.ns.getPrefix()));
+ if (faultActorElement != null) {
+ return this.getFaultString();
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Method setFaultString
+ *
+ * @param faultString
+ * @throws OMException
+ */
+ public void setFaultString(String faultString) throws OMException {
+ if (faultStringElement != null) {
+ faultStringElement.detach();
+ }
+ faultStringElement =
+ new OMElementImpl(SOAPConstants.SOAPFAULT_STRING_LOCAL_NAME, this.ns);
+ this.addChild(faultStringElement);
+ faultStringElement.addChild(new OMTextImpl(faultStringElement,
+ faultString));
+ }
+
+ /**
+ * Method getFaultString
+ *
+ * @return
+ */
+ public String getFaultString() {
+ if (faultStringElement != null) {
+ Iterator childrenIter = faultStringElement.getChildren();
+ while (childrenIter.hasNext()) {
+ Object o = childrenIter.next();
+ if ((o instanceof OMText)
+ && !"".equals(((OMText) o).getText())) {
+ return ((OMText) o).getText();
+ }
+ }
+ } else {
+ faultStringElement = this.getFirstChildWithName(
+ new QName(
+ this.ns.getName(),
SOAPConstants.SOAPFAULT_STRING_LOCAL_NAME,
+ this.ns.getPrefix()));
+ if (faultStringElement != null) {
+ return this.getFaultString();
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Method setDetailInformation
+ *
+ * @param detailInformation
+ */
+ public void setDetailInformation(OMNode detailInformation) {
+ if (detailElement != null) {
+ detailElement.detach();
+ }
+ detailElement =
+ new OMElementImpl(SOAPConstants.SOAPFAULT_DETAIL_LOCAL_NAME, this.ns);
+ this.addChild(detailElement);
+ detailElement.addChild(detailInformation);
+ }
+
+ /**
+ * Method getDetailInformation
+ *
+ * @return
+ */
+ public OMNode getDetailInformation() {
+ if (detailElement != null) {
+ Iterator childrenIter = detailElement.getChildren();
+ while (childrenIter.hasNext()) {
+ Object o = childrenIter.next();
+ if (!((o instanceof OMText)
+ && "".equals(((OMText) o).getText()))) {
+ return (OMNode) o;
+ }
+ }
+ } else {
+ detailElement = this.getFirstChildWithName(
+ new QName(
+ this.ns.getName(),
SOAPConstants.SOAPFAULT_DETAIL_LOCAL_NAME,
+ this.ns.getPrefix()));
+ if (detailElement != null) {
+ return detailElement;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Method getException
+ *
+ * @return
+ * @throws OMException
+ */
+ public Exception getException() throws OMException {
+ if (e == null) {
+ OMNode detailsInformationNode = this.getDetailInformation();
+ if (detailsInformationNode instanceof OMElement) {
+ try {
+ StringWriter sw = new StringWriter();
+ XMLStreamWriter writer =
+
XMLOutputFactory.newInstance().createXMLStreamWriter(
+ sw);
+ ((OMElement)
detailsInformationNode).serializeWithCache(writer);
+ writer.flush();
+ return new Exception(sw.toString());
+ } catch (XMLStreamException e1) {
+ throw new OMException("Exception in StAX Writer", e1);
+ }
+ } else if (detailsInformationNode instanceof OMText) {
+ return new Exception(
+ ((OMText) detailsInformationNode).getText());
+ }
+ } else {
+ return e;
+ }
+ return null;
+ }
+}
Added:
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/soap/SOAPHeaderBlockImpl.java
URL:
http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/soap/SOAPHeaderBlockImpl.java?rev=169611&view=auto
==============================================================================
---
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/soap/SOAPHeaderBlockImpl.java
(added)
+++
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/soap/SOAPHeaderBlockImpl.java
Wed May 11 02:46:32 2005
@@ -0,0 +1,167 @@
+/*
+ * Copyright 2004,2005 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.
+ */
+package org.apache.axis.om.impl.llom.soap;
+
+import javax.xml.namespace.QName;
+
+import org.apache.axis.om.OMAttribute;
+import org.apache.axis.om.OMElement;
+import org.apache.axis.om.OMNamespace;
+import org.apache.axis.om.OMXMLParserWrapper;
+import org.apache.axis.om.SOAPHeaderBlock;
+import org.apache.axis.om.impl.llom.soap.soap11.SOAP11Constants;
+import org.apache.axis.om.impl.llom.soap.soap11.SOAP11Constants;
+import org.apache.axis.om.impl.llom.soap.SOAPConstants;
+import org.apache.axis.om.impl.llom.OMElementImpl;
+import org.apache.axis.om.impl.llom.OMAttributeImpl;
+import org.apache.axis.om.impl.llom.OMNamespaceImpl;
+
+/**
+ * Class SOAPHeaderBlockImpl
+ */
+public class SOAPHeaderBlockImpl extends OMElementImpl
+ implements SOAPHeaderBlock {
+
+ private boolean processed = false;
+ /**
+ * @param localName
+ * @param ns
+ */
+ public SOAPHeaderBlockImpl(String localName, OMNamespace ns) {
+ super(localName, ns);
+ }
+
+ /**
+ * Constructor SOAPHeaderBlockImpl
+ *
+ * @param localName
+ * @param ns
+ * @param parent
+ * @param builder
+ */
+ public SOAPHeaderBlockImpl(String localName, OMNamespace ns,
+ OMElement parent, OMXMLParserWrapper builder) {
+ super(localName, ns, parent, builder);
+ }
+
+ /**
+ * Sets the actor associated with this <CODE>
+ * SOAPHeaderBlock</CODE> object to the specified actor. The
+ * default value of an actor is: <CODE>
+ * OMConstants.URI_SOAP_ACTOR_NEXT</CODE>
+ *
+ * @param actorURI a <CODE>String</CODE> giving
+ * the URI of the actor to set
+ * @throws IllegalArgumentException if
+ * there is a problem in setting the
actor.
+ * @see #getRole() getRole()
+ */
+ public void setRole(String actorURI) {
+ setAttribute(SOAPConstants.ATTR_ACTOR, actorURI);
+ }
+
+ /**
+ * @param attributeName
+ * @param attrValue
+ */
+ private void setAttribute(String attributeName, String attrValue) {
+ OMAttribute omAttribute = this.getFirstAttribute(
+ new QName(SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI,
attributeName));
+ if (omAttribute != null) {
+ omAttribute.setValue(attrValue);
+ } else {
+ OMAttribute attribute = new OMAttributeImpl(
+ attributeName,
+ new OMNamespaceImpl(
+ SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI,
+ SOAPConstants.SOAP_DEFAULT_NAMESPACE_PREFIX),
attrValue);
+ this.addAttribute(attribute);
+ }
+ }
+
+ /**
+ * Returns the uri of the actor associated with this <CODE>
+ * SOAPHeaderBlock</CODE> object.
+ *
+ * @return a <CODE>String</CODE> giving the URI of the
+ * actor
+ * @see #setRole(String) setRole(java.lang.String)
+ */
+ public String getRole() {
+ return getAttribute(SOAPConstants.ATTR_ACTOR);
+ }
+
+ /**
+ * Method getAttribute
+ *
+ * @param attrName
+ * @return
+ */
+ private String getAttribute(String attrName) {
+ OMAttribute omAttribute = this.getFirstAttribute(
+ new QName(SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI,
attrName));
+ return (omAttribute != null)
+ ? omAttribute.getValue()
+ : null;
+ }
+
+ /**
+ * Sets the mustUnderstand attribute for this <CODE>
+ * SOAPHeaderBlock</CODE> object to be on or off.
+ * <P>If the mustUnderstand attribute is on, the actor who
+ * receives the <CODE>SOAPHeaderBlock</CODE> must process it
+ * correctly. This ensures, for example, that if the <CODE>
+ * SOAPHeaderBlock</CODE> object modifies the message, that
+ * the message is being modified correctly.</P>
+ *
+ * @param mustUnderstand <CODE>true</CODE> to
+ * set the mustUnderstand attribute on;
<CODE>false</CODE>
+ * to turn if off
+ * @throws IllegalArgumentException if
+ * there is a problem in setting the
actor.
+ * @see #getMustUnderstand() getMustUnderstand()
+ */
+ public void setMustUnderstand(boolean mustUnderstand) {
+ setAttribute(SOAPConstants.ATTR_MUSTUNDERSTAND, mustUnderstand
+ ? "true"
+ : "false");
+ }
+
+ /**
+ * Returns whether the mustUnderstand attribute for this
+ * <CODE>SOAPHeaderBlock</CODE> object is turned on.
+ *
+ * @return <CODE>true</CODE> if the mustUnderstand attribute of
+ * this <CODE>SOAPHeaderBlock</CODE> object is turned on;
+ * <CODE>false</CODE> otherwise
+ */
+ public boolean getMustUnderstand() {
+ String mustUnderstand = "";
+ if ((mustUnderstand = getAttribute(SOAPConstants.ATTR_MUSTUNDERSTAND))
+ != null) {
+ return mustUnderstand.equalsIgnoreCase("true");
+ }
+ return false;
+ }
+
+ public boolean isProcessed() {
+ return processed;
+ }
+
+ public void setProcessed() {
+ processed = true;
+ }
+}
Added:
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/soap/SOAPHeaderImpl.java
URL:
http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/soap/SOAPHeaderImpl.java?rev=169611&view=auto
==============================================================================
---
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/soap/SOAPHeaderImpl.java
(added)
+++
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/soap/SOAPHeaderImpl.java
Wed May 11 02:46:32 2005
@@ -0,0 +1,215 @@
+/*
+* Copyright 2004,2005 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.
+*/
+package org.apache.axis.om.impl.llom.soap;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+
+import javax.xml.namespace.QName;
+
+import org.apache.axis.om.OMElement;
+import org.apache.axis.om.OMException;
+import org.apache.axis.om.OMNamespace;
+import org.apache.axis.om.OMNode;
+import org.apache.axis.om.OMXMLParserWrapper;
+import org.apache.axis.om.SOAPEnvelope;
+import org.apache.axis.om.SOAPHeader;
+import org.apache.axis.om.SOAPHeaderBlock;
+import org.apache.axis.om.impl.llom.soap.soap11.SOAP11Constants;
+import
org.apache.axis.om.impl.llom.traverse.OMChildrenWithSpecificAttributeIterator;
+import org.apache.axis.om.impl.llom.soap.soap11.SOAP11Constants;
+import org.apache.axis.om.impl.llom.soap.SOAPConstants;
+import org.apache.axis.om.impl.llom.soap.SOAPHeaderBlockImpl;
+import org.apache.axis.om.impl.llom.OMElementImpl;
+
+/**
+ * Class SOAPHeaderImpl
+ */
+public class SOAPHeaderImpl extends OMElementImpl implements SOAPHeader {
+ /**
+ * @param envelope
+ */
+ public SOAPHeaderImpl(SOAPEnvelope envelope) {
+ super(envelope);
+
+ // set the namespaces
+ this.ns = envelope.getNamespace();
+ this.localName = SOAPConstants.HEADER_LOCAL_NAME;
+ }
+
+ /**
+ * Constructor SOAPHeaderImpl
+ *
+ * @param envelope
+ * @param builder
+ */
+ public SOAPHeaderImpl(SOAPEnvelope envelope, OMXMLParserWrapper builder) {
+ super(SOAPConstants.HEADER_LOCAL_NAME,
+ (envelope == null) ? null : envelope.getNamespace(),
+ envelope,
+ builder);
+ }
+
+ /**
+ * Creates a new <CODE>SOAPHeaderBlock</CODE> object initialized with the
+ * specified name and adds it to this <CODE>SOAPHeader</CODE> object.
+ *
+ * @param localName
+ * @param ns
+ * @return the new <CODE>SOAPHeaderBlock</CODE> object that was inserted
+ * into this <CODE>SOAPHeader</CODE> object
+ * @throws org.apache.axis.om.OMException if a SOAP error occurs
+ * @throws OMException
+ */
+ public SOAPHeaderBlock addHeaderBlock(String localName, OMNamespace ns)
+ throws OMException {
+ if (ns == null || ns.getName() == null || "".equals(ns.getName())) {
+ throw new OMException("All the SOAP Header blocks should be
namespace qualified");
+ }
+ SOAPHeaderBlock soapHeaderBlock =
+ new SOAPHeaderBlockImpl(localName, ns);
+ this.addChild(soapHeaderBlock);
+ soapHeaderBlock.setComplete(true);
+ return soapHeaderBlock;
+ }
+
+ /**
+ * 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 actor receives the message and then
+ * sends it to the next actor. The default actor is the ultimate intended
+ * recipient for the message, so if no actor attribute is included in a
+ * <CODE>SOAPHeader</CODE> object, the message is sent to its ultimate
+ * destination.
+ *
+ * @param paramRole a <CODE>String</CODE> giving the URI of the actor for
+ * which to search
+ * @return an <CODE>Iterator</CODE> object over all the <CODE>
+ * SOAPHeaderBlock</CODE> objects that contain the specified actor
+ * @see #extractHeaderBlocks(String) extractHeaderBlocks(java.lang.String)
+ */
+ public Iterator examineHeaderBlocks(String paramRole) {
+ Iterator headerBlocksIter = this.getChildren();
+ ArrayList headersWithGivenActor = new ArrayList();
+ while (headerBlocksIter.hasNext()) {
+ Object o = headerBlocksIter.next();
+ if (o instanceof SOAPHeaderBlock) {
+ SOAPHeaderBlock soapHeaderBlock = (SOAPHeaderBlock) o;
+ String role = soapHeaderBlock.getRole();
+ if ((role != null) && role.equalsIgnoreCase(paramRole)) {
+ headersWithGivenActor.add(soapHeaderBlock);
+ }
+ }
+ }
+ return headersWithGivenActor.iterator();
+ }
+
+ /**
+ * Returns a list of all the <CODE>SOAPHeaderBlock</CODE> objects in this
+ * <CODE>SOAPHeader</CODE> object that have the the specified actor and
+ * detaches them from this <CODE> SOAPHeader</CODE> object. <P>This method
+ * allows an actor to process only the parts of the <CODE>SOAPHeader</CODE>
+ * object that apply to it and to remove them before passing the message on
+ * to the next actor.
+ *
+ * @param actor a <CODE>String</CODE> giving the URI of the actor for which
+ * to search
+ * @return an <CODE>Iterator</CODE> object over all the <CODE>
+ * SOAPHeaderBlock</CODE> objects that contain the specified actor
+ * @see #examineHeaderBlocks(String) examineHeaderBlocks(java.lang.String)
+ */
+ public Iterator extractHeaderBlocks(String actor) {
+ return new OMChildrenWithSpecificAttributeIterator(getFirstChild(),
+ new QName(SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI,
+ SOAPConstants.ATTR_ACTOR),
+ actor,
+ true);
+ }
+
+ /**
+ * Returns an <code>Iterator</code> over all the
<code>SOAPHeaderBlock</code>
+ * objects in this <code>SOAPHeader</code> object that have the specified
+ * actor and that have a MustUnderstand attribute whose value is equivalent
+ * to <code>true</code>.
+ *
+ * @param actor a <code>String</code> giving the URI of the actor for which
+ * to search
+ * @return an <code>Iterator</code> object over all the
+ * <code>SOAPHeaderBlock</code> objects that contain the specified
+ * actor and are marked as MustUnderstand
+ */
+ public Iterator examineMustUnderstandHeaderBlocks(String actor) {
+ return new OMChildrenWithSpecificAttributeIterator(getFirstChild(),
+ new QName(SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI,
+ SOAPConstants.ATTR_ACTOR),
+ actor,
+ false);
+ }
+
+ /**
+ * Returns an <code>Iterator</code> over all the
<code>SOAPHeaderBlock</code>
+ * objects in this <code>SOAPHeader</code> object. Not that this will
return
+ * elements containing the QName
(http://schemas.xmlsoap.org/soap/envelope/,
+ * Header)
+ *
+ * @return an <code>Iterator</code> object over all the
+ * <code>SOAPHeaderBlock</code> objects contained by this
+ * <code>SOAPHeader</code>
+ */
+ public Iterator examineAllHeaderBlocks() {
+ return this.getChildrenWithName(null);
+ }
+
+ /**
+ * Returns an <code>Iterator</code> over all the
<code>SOAPHeaderBlock</code>
+ * objects in this <code>SOAPHeader </code> object and detaches them from
+ * this <code>SOAPHeader</code> object.
+ *
+ * @return an <code>Iterator</code> object over all the
+ * <code>SOAPHeaderBlock</code> objects contained by this
+ * <code>SOAPHeader</code>
+ */
+ public Iterator extractAllHeaderBlocks() {
+ throw new UnsupportedOperationException(); // TODO implement this
+ }
+
+ public ArrayList getHeaderBolcksWithNSURI(String nsURI) {
+ ArrayList headers = null;
+ OMNode node = null;
+ OMElement header = this.getFirstElement();
+
+ if (header != null) {
+ headers = new ArrayList();
+ }
+
+ node = header;
+
+ while (node != null) {
+ if (node.getType() == OMNode.ELEMENT_NODE) {
+ header = (OMElement) node;
+ if (nsURI.equals(header.getNamespace().getName())) {
+ headers.add(header);
+ }
+ }
+ node = node.getNextSibling();
+
+ }
+ return headers;
+
+ }
+
+}
Added:
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/soap/SOAPTextImpl.java
URL:
http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/soap/SOAPTextImpl.java?rev=169611&view=auto
==============================================================================
---
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/soap/SOAPTextImpl.java
(added)
+++
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/soap/SOAPTextImpl.java
Wed May 11 02:46:32 2005
@@ -0,0 +1,42 @@
+package org.apache.axis.om.impl.llom.soap;
+
+import org.apache.axis.om.OMElement;
+import org.apache.axis.om.SOAPText;
+import org.apache.axis.om.impl.llom.OMElementImpl;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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.
+ * <p/>
+ */
+public class SOAPTextImpl extends OMElementImpl implements SOAPText{
+ /**
+ * Eran Chinthaka ([EMAIL PROTECTED])
+ */
+ /**
+ * @param parent
+ * @param parent
+ */
+ public SOAPTextImpl(OMElement parent) {
+ super(parent);
+ }
+
+ public void setLang(String lang) {
+ //To change body of implemented methods use File | Settings | File
Templates.
+ }
+
+ public String getLang() {
+ return null; //To change body of implemented methods use File |
Settings | File Templates.
+ }
+}