You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by ru...@apache.org on 2005/11/01 08:58:01 UTC
svn commit: r330005 [1/2] - in
/webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom:
soap11/ soap12/
Author: ruchithf
Date: Mon Oct 31 23:57:42 2005
New Revision: 330005
URL: http://svn.apache.org/viewcvs?rev=330005&view=rev
Log:
Adding the org.apache.axis2.soap.impl.dom.soap11 and soap12 stuff
Added:
webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/
webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/SOAP11BodyImpl.java
webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/SOAP11Factory.java
webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/SOAP11FaultCodeImpl.java
webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/SOAP11FaultDetailImpl.java
webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/SOAP11FaultImpl.java
webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/SOAP11FaultNodeImpl.java
webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/SOAP11FaultReasonImpl.java
webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/SOAP11FaultRoleImpl.java
webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/SOAP11FaultSubCodeImpl.java
webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/SOAP11FaultTextImpl.java
webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/SOAP11FaultValueImpl.java
webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/SOAP11HeaderBlockImpl.java
webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/SOAP11HeaderImpl.java
webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap12/
webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap12/SOAP12BodyImpl.java
webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap12/SOAP12Factory.java
webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap12/SOAP12FaultCodeImpl.java
webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap12/SOAP12FaultDetailImpl.java
webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap12/SOAP12FaultImpl.java
webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap12/SOAP12FaultNodeImpl.java
webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap12/SOAP12FaultReasonImpl.java
webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap12/SOAP12FaultRoleImpl.java
webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap12/SOAP12FaultSubCodeImpl.java
webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap12/SOAP12FaultTextImpl.java
webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap12/SOAP12FaultValueImpl.java
webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap12/SOAP12HeaderBlockImpl.java
webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap12/SOAP12HeaderImpl.java
Added: webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/SOAP11BodyImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/SOAP11BodyImpl.java?rev=330005&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/SOAP11BodyImpl.java (added)
+++ webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/SOAP11BodyImpl.java Mon Oct 31 23:57:42 2005
@@ -0,0 +1,47 @@
+/*
+ * 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.axis2.soap.impl.dom.soap11;
+
+import org.apache.axis2.om.OMException;
+import org.apache.axis2.om.OMXMLParserWrapper;
+import org.apache.axis2.soap.SOAPEnvelope;
+import org.apache.axis2.soap.SOAPFault;
+import org.apache.axis2.soap.SOAPProcessingException;
+import org.apache.axis2.soap.impl.dom.SOAPBodyImpl;
+
+public class SOAP11BodyImpl extends SOAPBodyImpl {
+ /**
+ * @param envelope
+ */
+ public SOAP11BodyImpl(SOAPEnvelope envelope) throws SOAPProcessingException {
+ super(envelope);
+ }
+
+ /**
+ * Constructor SOAPBodyImpl
+ *
+ * @param envelope
+ * @param builder
+ */
+ public SOAP11BodyImpl(SOAPEnvelope envelope, OMXMLParserWrapper builder) {
+ super(envelope, builder);
+ }
+
+ public SOAPFault addFault(Exception e) throws OMException {
+ return new SOAP11Factory().createSOAPFault(this, e);
+ }
+}
Added: webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/SOAP11Factory.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/SOAP11Factory.java?rev=330005&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/SOAP11Factory.java (added)
+++ webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/SOAP11Factory.java Mon Oct 31 23:57:42 2005
@@ -0,0 +1,201 @@
+/*
+ * 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.axis2.soap.impl.dom.soap11;
+
+import org.apache.axis2.om.OMNamespace;
+import org.apache.axis2.om.OMXMLParserWrapper;
+import org.apache.axis2.om.impl.dom.NamespaceImpl;
+import org.apache.axis2.soap.SOAP11Constants;
+import org.apache.axis2.soap.SOAPBody;
+import org.apache.axis2.soap.SOAPEnvelope;
+import org.apache.axis2.soap.SOAPFault;
+import org.apache.axis2.soap.SOAPFaultCode;
+import org.apache.axis2.soap.SOAPFaultDetail;
+import org.apache.axis2.soap.SOAPFaultNode;
+import org.apache.axis2.soap.SOAPFaultReason;
+import org.apache.axis2.soap.SOAPFaultRole;
+import org.apache.axis2.soap.SOAPFaultSubCode;
+import org.apache.axis2.soap.SOAPFaultText;
+import org.apache.axis2.soap.SOAPFaultValue;
+import org.apache.axis2.soap.SOAPHeader;
+import org.apache.axis2.soap.SOAPHeaderBlock;
+import org.apache.axis2.soap.SOAPProcessingException;
+import org.apache.axis2.soap.impl.dom.SOAPEnvelopeImpl;
+import org.apache.axis2.soap.impl.dom.factory.DOMSOAPFactory;
+
+public class SOAP11Factory extends DOMSOAPFactory {
+ /**
+ * Eran Chinthaka (chinthaka@apache.org)
+ */
+
+ public SOAPEnvelope createSOAPEnvelope() {
+ return new SOAPEnvelopeImpl(
+ new NamespaceImpl(
+ SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI,
+ SOAP11Constants.SOAP_DEFAULT_NAMESPACE_PREFIX),
+ this);
+ }
+
+ public SOAPHeader createSOAPHeader(SOAPEnvelope envelope) throws SOAPProcessingException {
+ return new SOAP11HeaderImpl(envelope);
+ }
+
+ public SOAPHeader createSOAPHeader(SOAPEnvelope envelope,
+ OMXMLParserWrapper builder) {
+ return new SOAP11HeaderImpl(envelope, builder);
+ }
+
+ public SOAPHeaderBlock createSOAPHeaderBlock(String localName,
+ OMNamespace ns,
+ SOAPHeader parent) throws SOAPProcessingException {
+ return new SOAP11HeaderBlockImpl(localName, ns, parent);
+ }
+
+ public SOAPHeaderBlock createSOAPHeaderBlock(String localName,
+ OMNamespace ns,
+ SOAPHeader parent,
+ OMXMLParserWrapper builder) throws SOAPProcessingException {
+ return new SOAP11HeaderBlockImpl(localName, ns, parent, builder);
+ }
+
+ public SOAPFault createSOAPFault(SOAPBody parent, Exception e) throws SOAPProcessingException {
+ return new SOAP11FaultImpl(parent, e);
+ }
+
+ public SOAPFault createSOAPFault(SOAPBody parent) throws SOAPProcessingException {
+ return new SOAP11FaultImpl(parent);
+ }
+
+ public SOAPFault createSOAPFault(SOAPBody parent,
+ OMXMLParserWrapper builder) {
+ return new SOAP11FaultImpl(parent, builder);
+ }
+
+ public SOAPBody createSOAPBody(SOAPEnvelope envelope) throws SOAPProcessingException {
+ return new SOAP11BodyImpl(envelope);
+ }
+
+ public SOAPBody createSOAPBody(SOAPEnvelope envelope,
+ OMXMLParserWrapper builder) {
+ return new SOAP11BodyImpl(envelope, builder);
+ }
+
+ public SOAPFaultCode createSOAPFaultCode(SOAPFault parent) throws SOAPProcessingException {
+ return new SOAP11FaultCodeImpl(parent);
+ }
+
+ public SOAPFaultCode createSOAPFaultCode(SOAPFault parent,
+ OMXMLParserWrapper builder) {
+ return new SOAP11FaultCodeImpl(parent, builder);
+ }
+
+ public SOAPFaultValue createSOAPFaultValue(SOAPFaultCode parent) throws SOAPProcessingException {
+ return new SOAP11FaultValueImpl(parent);
+ }
+
+ public SOAPFaultValue createSOAPFaultValue(SOAPFaultCode parent,
+ OMXMLParserWrapper builder) {
+ return new SOAP11FaultValueImpl(parent, builder);
+ }
+
+ //added
+ public SOAPFaultValue createSOAPFaultValue(SOAPFaultSubCode parent) throws SOAPProcessingException {
+ return new SOAP11FaultValueImpl(parent);
+ }
+
+ //added
+ public SOAPFaultValue createSOAPFaultValue(SOAPFaultSubCode parent,
+ OMXMLParserWrapper builder) {
+ return new SOAP11FaultValueImpl(parent, builder);
+ }
+
+ //changed
+ public SOAPFaultSubCode createSOAPFaultSubCode(SOAPFaultCode parent) throws SOAPProcessingException {
+ return new SOAP11FaultSubCodeImpl(parent);
+ }
+
+ //changed
+ public SOAPFaultSubCode createSOAPFaultSubCode(SOAPFaultCode parent,
+ OMXMLParserWrapper builder) {
+ return new SOAP11FaultSubCodeImpl(parent, builder);
+ }
+
+ public SOAPFaultSubCode createSOAPFaultSubCode(SOAPFaultSubCode parent) throws SOAPProcessingException {
+ return new SOAP11FaultSubCodeImpl(parent);
+ }
+
+ public SOAPFaultSubCode createSOAPFaultSubCode(SOAPFaultSubCode parent,
+ OMXMLParserWrapper builder) {
+ return new SOAP11FaultSubCodeImpl(parent, builder);
+ }
+
+ public SOAPFaultReason createSOAPFaultReason(SOAPFault parent) throws SOAPProcessingException {
+ return new SOAP11FaultReasonImpl(parent);
+ }
+
+ public SOAPFaultReason createSOAPFaultReason(SOAPFault parent,
+ OMXMLParserWrapper builder) {
+ return new SOAP11FaultReasonImpl(parent, builder);
+ }
+
+ public SOAPFaultText createSOAPFaultText(SOAPFaultReason parent) throws SOAPProcessingException {
+ return new SOAP11FaultTextImpl(parent);
+ }
+
+ public SOAPFaultText createSOAPFaultText(SOAPFaultReason parent,
+ OMXMLParserWrapper builder) {
+ return new SOAP11FaultTextImpl(parent, builder);
+ }
+
+ public SOAPFaultNode createSOAPFaultNode(SOAPFault parent) throws SOAPProcessingException {
+ return new SOAP11FaultNodeImpl(parent);
+ }
+
+ public SOAPFaultNode createSOAPFaultNode(SOAPFault parent,
+ OMXMLParserWrapper builder) {
+ return new SOAP11FaultNodeImpl(parent, builder);
+ }
+
+ public SOAPFaultRole createSOAPFaultRole(SOAPFault parent) throws SOAPProcessingException {
+ return new SOAP11FaultRoleImpl(parent);
+ }
+
+ public SOAPFaultRole createSOAPFaultRole(SOAPFault parent,
+ OMXMLParserWrapper builder) {
+ return new SOAP11FaultRoleImpl(parent, builder);
+ }
+
+ public SOAPFaultDetail createSOAPFaultDetail(SOAPFault parent) throws SOAPProcessingException {
+ return new SOAP11FaultDetailImpl(parent);
+ }
+
+ public SOAPFaultDetail createSOAPFaultDetail(SOAPFault parent,
+ OMXMLParserWrapper builder) {
+ return new SOAP11FaultDetailImpl(parent, builder);
+ }
+
+ public SOAPEnvelope getDefaultEnvelope() throws SOAPProcessingException {
+ OMNamespace ns =
+ new NamespaceImpl(
+ SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI,
+ SOAP11Constants.SOAP_DEFAULT_NAMESPACE_PREFIX);
+ SOAPEnvelopeImpl env = new SOAPEnvelopeImpl(ns, this);
+ createSOAPHeader(env);
+ createSOAPBody(env);
+ return env;
+ }
+}
Added: webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/SOAP11FaultCodeImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/SOAP11FaultCodeImpl.java?rev=330005&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/SOAP11FaultCodeImpl.java (added)
+++ webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/SOAP11FaultCodeImpl.java Mon Oct 31 23:57:42 2005
@@ -0,0 +1,110 @@
+/*
+ * 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.axis2.soap.impl.dom.soap11;
+
+import org.apache.axis2.om.OMElement;
+import org.apache.axis2.om.OMXMLParserWrapper;
+import org.apache.axis2.om.impl.llom.OMSerializerUtil;
+import org.apache.axis2.om.impl.llom.serialize.StreamWriterToContentHandlerConverter;
+import org.apache.axis2.soap.SOAP11Constants;
+import org.apache.axis2.soap.SOAPFault;
+import org.apache.axis2.soap.SOAPFaultSubCode;
+import org.apache.axis2.soap.SOAPFaultValue;
+import org.apache.axis2.soap.SOAPProcessingException;
+import org.apache.axis2.soap.impl.dom.SOAPFaultCodeImpl;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
+public class SOAP11FaultCodeImpl extends SOAPFaultCodeImpl {
+ /**
+ * Constructor OMElementImpl
+ *
+ * @param localName
+ * @param ns
+ * @param parent
+ * @param builder
+ */
+ public SOAP11FaultCodeImpl(SOAPFault parent, OMXMLParserWrapper builder) {
+ super(parent, builder);
+ }
+
+ /**
+ * @param parent
+ * @param parent
+ */
+ public SOAP11FaultCodeImpl(SOAPFault parent) throws SOAPProcessingException {
+ super(parent, false);
+ }
+
+
+ public void setSubCode(SOAPFaultSubCode subCode) throws SOAPProcessingException {
+ if (!(subCode instanceof SOAP11FaultSubCodeImpl)) {
+ throw new SOAPProcessingException(
+ "Expecting SOAP 1.1 implementation of SOAP Fault Sub Code. But received some other implementation");
+ }
+ super.setSubCode(subCode);
+ }
+
+ public void setValue(SOAPFaultValue value) throws SOAPProcessingException {
+ if (!(value instanceof SOAP11FaultValueImpl)) {
+ throw new SOAPProcessingException(
+ "Expecting SOAP 1.1 implementation of SOAP Fault Value. But received some other implementation");
+ }
+ super.setValue(value);
+ }
+
+ protected void checkParent(OMElement parent) throws SOAPProcessingException {
+ if (!(parent instanceof SOAP11FaultImpl)) {
+ throw new SOAPProcessingException(
+ "Expecting SOAP 1.1 implementation of SOAP Fault as the parent. But received some other implementation");
+ }
+ }
+
+ protected void serialize(org.apache.axis2.om.impl.OMOutputImpl omOutput, boolean cache) throws XMLStreamException {
+
+ // select the builder
+ short builderType = PULL_TYPE_BUILDER; // default is pull type
+ if (builder != null) {
+ builderType = this.builder.getBuilderType();
+ }
+ if ((builderType == PUSH_TYPE_BUILDER)
+ && (builder.getRegisteredContentHandler() == null)) {
+ builder.registerExternalContentHandler(
+ new StreamWriterToContentHandlerConverter(omOutput));
+ }
+
+ XMLStreamWriter writer = omOutput.getXmlStreamWriter();
+ if (this.getNamespace() != null) {
+ String prefix = this.getNamespace().getPrefix();
+ String nameSpaceName = this.getNamespace().getName();
+ writer.writeStartElement(prefix, SOAP11Constants.SOAP_FAULT_CODE_LOCAL_NAME,
+ nameSpaceName);
+ } else {
+ writer.writeStartElement(
+ SOAP11Constants.SOAP_FAULT_CODE_LOCAL_NAME);
+ }
+
+ OMSerializerUtil.serializeAttributes(this, omOutput);
+ OMSerializerUtil.serializeNamespaces(this, omOutput);
+
+
+ String text = this.getValue().getText();
+ writer.writeCharacters(text);
+ writer.writeEndElement();
+ }
+}
Added: webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/SOAP11FaultDetailImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/SOAP11FaultDetailImpl.java?rev=330005&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/SOAP11FaultDetailImpl.java (added)
+++ webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/SOAP11FaultDetailImpl.java Mon Oct 31 23:57:42 2005
@@ -0,0 +1,84 @@
+/*
+ * 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.axis2.soap.impl.dom.soap11;
+
+import org.apache.axis2.om.OMElement;
+import org.apache.axis2.om.OMXMLParserWrapper;
+import org.apache.axis2.om.impl.llom.OMSerializerUtil;
+import org.apache.axis2.om.impl.llom.serialize.StreamWriterToContentHandlerConverter;
+import org.apache.axis2.soap.SOAP11Constants;
+import org.apache.axis2.soap.SOAPFault;
+import org.apache.axis2.soap.SOAPProcessingException;
+import org.apache.axis2.soap.impl.dom.SOAPFaultDetailImpl;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
+public class SOAP11FaultDetailImpl extends SOAPFaultDetailImpl {
+ public SOAP11FaultDetailImpl(SOAPFault parent) throws SOAPProcessingException {
+ super(parent, false);
+ }
+
+ public SOAP11FaultDetailImpl(SOAPFault parent, OMXMLParserWrapper builder) {
+ super(parent, builder);
+ }
+
+ protected void checkParent(OMElement parent) throws SOAPProcessingException {
+ if (!(parent instanceof SOAP11FaultImpl)) {
+ throw new SOAPProcessingException(
+ "Expecting SOAP 1.1 implementation of SOAP Fault as the parent. But received some other implementation");
+ }
+ }
+
+ public void serialize(org.apache.axis2.om.impl.OMOutputImpl omOutput, boolean cache) throws XMLStreamException {
+
+ // select the builder
+ short builderType = PULL_TYPE_BUILDER; // default is pull type
+ if (builder != null) {
+ builderType = this.builder.getBuilderType();
+ }
+ if ((builderType == PUSH_TYPE_BUILDER)
+ && (builder.getRegisteredContentHandler() == null)) {
+ builder.registerExternalContentHandler(
+ new StreamWriterToContentHandlerConverter(omOutput));
+ }
+ XMLStreamWriter writer = omOutput.getXmlStreamWriter();
+ if (this.getNamespace() != null) {
+ String prefix = this.getNamespace().getPrefix();
+ String nameSpaceName = this.getNamespace().getName();
+ writer.writeStartElement(prefix, SOAP11Constants.SOAP_FAULT_DETAIL_LOCAL_NAME,
+ nameSpaceName);
+ } else {
+ writer.writeStartElement(
+ SOAP11Constants.SOAP_FAULT_DETAIL_LOCAL_NAME);
+ }
+ OMSerializerUtil.serializeAttributes(this, omOutput);
+ OMSerializerUtil.serializeNamespaces(this, omOutput);
+
+
+ String text = this.getText();
+ writer.writeCharacters(text);
+
+
+ if (firstChild != null) {
+ firstChild.serializeAndConsume(omOutput);
+ }
+ writer.writeEndElement();
+ }
+
+
+}
Added: webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/SOAP11FaultImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/SOAP11FaultImpl.java?rev=330005&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/SOAP11FaultImpl.java (added)
+++ webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/SOAP11FaultImpl.java Mon Oct 31 23:57:42 2005
@@ -0,0 +1,117 @@
+/*
+ * 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.axis2.soap.impl.dom.soap11;
+
+import org.apache.axis2.om.OMElement;
+import org.apache.axis2.om.OMXMLParserWrapper;
+import org.apache.axis2.soap.SOAPBody;
+import org.apache.axis2.soap.SOAPFault;
+import org.apache.axis2.soap.SOAPFaultCode;
+import org.apache.axis2.soap.SOAPFaultDetail;
+import org.apache.axis2.soap.SOAPFaultNode;
+import org.apache.axis2.soap.SOAPFaultReason;
+import org.apache.axis2.soap.SOAPFaultRole;
+import org.apache.axis2.soap.SOAPProcessingException;
+import org.apache.axis2.soap.impl.dom.SOAPFaultImpl;
+
+import javax.xml.stream.XMLStreamException;
+
+public class SOAP11FaultImpl extends SOAPFaultImpl {
+
+ public SOAP11FaultImpl(SOAPBody parent, Exception e) throws SOAPProcessingException {
+ super(parent, e);
+ }
+
+ public SOAP11FaultImpl(SOAPBody parent, OMXMLParserWrapper builder) {
+ super(parent, builder);
+ }
+
+ /**
+ * This is a convenience method for the SOAP Fault Impl.
+ *
+ * @param parent
+ * @param e
+ */
+ public SOAP11FaultImpl(SOAPBody parent) throws SOAPProcessingException {
+ super(parent);
+
+ }
+
+ protected SOAPFaultDetail getNewSOAPFaultDetail(SOAPFault fault) throws SOAPProcessingException {
+ return new SOAP11FaultDetailImpl(fault);
+ }
+
+ public void serialize(org.apache.axis2.om.impl.OMOutputImpl omOutput) throws XMLStreamException {
+ super.serialize(omOutput);
+ }
+
+ public void serializeAndConsume(org.apache.axis2.om.impl.OMOutputImpl omOutput) throws XMLStreamException {
+ super.serializeAndConsume(omOutput);
+ }
+
+ public void setCode(SOAPFaultCode soapFaultCode) throws SOAPProcessingException {
+ if (!(soapFaultCode instanceof SOAP11FaultCodeImpl)) {
+ throw new SOAPProcessingException(
+ "Expecting SOAP 1.1 implementation of SOAP Fault Code. But received some other implementation");
+ }
+ super.setCode(soapFaultCode);
+ }
+
+ public void setReason(SOAPFaultReason reason) throws SOAPProcessingException {
+ if (!(reason instanceof SOAP11FaultReasonImpl)) {
+ throw new SOAPProcessingException(
+ "Expecting SOAP 1.1 implementation of SOAP Fault Reason. But received some other implementation");
+ }
+ super.setReason(reason);
+ }
+
+ public void setNode(SOAPFaultNode node) throws SOAPProcessingException {
+ if (!(node instanceof SOAP11FaultNodeImpl)) {
+ throw new SOAPProcessingException(
+ "Expecting SOAP 1.1 implementation of SOAP Fault Node. But received some other implementation");
+ }
+ super.setNode(node);
+ }
+
+ public void setRole(SOAPFaultRole role) throws SOAPProcessingException {
+ if (!(role instanceof SOAP11FaultRoleImpl)) {
+ throw new SOAPProcessingException(
+ "Expecting SOAP 1.1 implementation of SOAP Fault Role. But received some other implementation");
+ }
+ super.setRole(role);
+ }
+
+ protected void checkParent(OMElement parent) throws SOAPProcessingException {
+ if (!(parent instanceof SOAP11BodyImpl)) {
+ throw new SOAPProcessingException(
+ "Expecting SOAP 1.1 implementation of SOAP Body as the parent. But received some other implementation");
+ }
+ }
+
+ public void setDetail(SOAPFaultDetail detail) throws SOAPProcessingException {
+ if (!(detail instanceof SOAP11FaultDetailImpl)) {
+ throw new SOAPProcessingException(
+ "Expecting SOAP 1.1 implementation of SOAP Fault Detail. But received some other implementation");
+ }
+ super.setDetail(detail);
+ }
+
+ protected void serializeFaultNode(org.apache.axis2.om.impl.OMOutputImpl omOutput) throws XMLStreamException {
+
+ }
+
+}
Added: webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/SOAP11FaultNodeImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/SOAP11FaultNodeImpl.java?rev=330005&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/SOAP11FaultNodeImpl.java (added)
+++ webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/SOAP11FaultNodeImpl.java Mon Oct 31 23:57:42 2005
@@ -0,0 +1,41 @@
+/*
+ * 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.axis2.soap.impl.dom.soap11;
+
+import org.apache.axis2.om.OMElement;
+import org.apache.axis2.om.OMXMLParserWrapper;
+import org.apache.axis2.soap.SOAPFault;
+import org.apache.axis2.soap.SOAPProcessingException;
+import org.apache.axis2.soap.impl.dom.SOAPFaultNodeImpl;
+
+public class SOAP11FaultNodeImpl extends SOAPFaultNodeImpl {
+
+ public SOAP11FaultNodeImpl(SOAPFault parent) throws SOAPProcessingException {
+ super(parent);
+ }
+
+ public SOAP11FaultNodeImpl(SOAPFault parent, OMXMLParserWrapper builder) {
+ super(parent, builder);
+ }
+
+ protected void checkParent(OMElement parent) throws SOAPProcessingException {
+ if (!(parent instanceof SOAP11FaultImpl)) {
+ throw new SOAPProcessingException(
+ "Expecting SOAP 1.1 implementation of SOAP Fault as the parent. But received some other implementation");
+ }
+ }
+}
Added: webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/SOAP11FaultReasonImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/SOAP11FaultReasonImpl.java?rev=330005&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/SOAP11FaultReasonImpl.java (added)
+++ webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/SOAP11FaultReasonImpl.java Mon Oct 31 23:57:42 2005
@@ -0,0 +1,92 @@
+/*
+ * 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.axis2.soap.impl.dom.soap11;
+
+import org.apache.axis2.om.OMElement;
+import org.apache.axis2.om.OMXMLParserWrapper;
+import org.apache.axis2.om.impl.OMOutputImpl;
+import org.apache.axis2.om.impl.llom.OMSerializerUtil;
+import org.apache.axis2.om.impl.llom.serialize.StreamWriterToContentHandlerConverter;
+import org.apache.axis2.soap.SOAP11Constants;
+import org.apache.axis2.soap.SOAPFault;
+import org.apache.axis2.soap.SOAPFaultText;
+import org.apache.axis2.soap.SOAPProcessingException;
+import org.apache.axis2.soap.impl.dom.SOAPFaultReasonImpl;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
+public class SOAP11FaultReasonImpl extends SOAPFaultReasonImpl {
+
+ public SOAP11FaultReasonImpl(SOAPFault parent, OMXMLParserWrapper builder) {
+ super(parent, builder);
+ }
+
+ /**
+ * @param parent
+ */
+ public SOAP11FaultReasonImpl(SOAPFault parent) throws SOAPProcessingException {
+ super(parent, false);
+ }
+
+ public void setSOAPText(SOAPFaultText soapFaultText) throws SOAPProcessingException {
+ if (!(soapFaultText instanceof SOAP11FaultTextImpl)) {
+ throw new SOAPProcessingException(
+ "Expecting SOAP 1.1 implementation of SOAP Fault Text. But received some other implementation");
+ }
+ super.setSOAPText(soapFaultText);
+ }
+
+ protected void checkParent(OMElement parent) throws SOAPProcessingException {
+ if (!(parent instanceof SOAP11FaultImpl)) {
+ throw new SOAPProcessingException(
+ "Expecting SOAP 1.1 implementation of SOAP Fault as the parent. But received some other implementation");
+ }
+ }
+
+ protected void serialize(OMOutputImpl omOutput, boolean cache) throws XMLStreamException {
+
+ // select the builder
+ short builderType = PULL_TYPE_BUILDER; // default is pull type
+ if (builder != null) {
+ builderType = this.builder.getBuilderType();
+ }
+ if ((builderType == PUSH_TYPE_BUILDER)
+ && (builder.getRegisteredContentHandler() == null)) {
+ builder.registerExternalContentHandler(
+ new StreamWriterToContentHandlerConverter(omOutput));
+ }
+
+ XMLStreamWriter writer = omOutput.getXmlStreamWriter();
+ if (this.getNamespace() != null) {
+ String prefix = this.getNamespace().getPrefix();
+ String nameSpaceName = this.getNamespace().getName();
+ writer.writeStartElement(prefix, SOAP11Constants.SOAP_FAULT_STRING_LOCAL_NAME,
+ nameSpaceName);
+ } else {
+ writer.writeStartElement(
+ SOAP11Constants.SOAP_FAULT_STRING_LOCAL_NAME);
+ }
+ OMSerializerUtil.serializeAttributes(this, omOutput);
+ OMSerializerUtil.serializeNamespaces(this, omOutput);
+
+ String text = this.getSOAPText().getText();
+ writer.writeCharacters(text);
+ writer.writeEndElement();
+ }
+
+}
Added: webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/SOAP11FaultRoleImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/SOAP11FaultRoleImpl.java?rev=330005&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/SOAP11FaultRoleImpl.java (added)
+++ webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/SOAP11FaultRoleImpl.java Mon Oct 31 23:57:42 2005
@@ -0,0 +1,78 @@
+/*
+ * 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.axis2.soap.impl.dom.soap11;
+
+import org.apache.axis2.om.OMElement;
+import org.apache.axis2.om.OMXMLParserWrapper;
+import org.apache.axis2.om.impl.llom.OMSerializerUtil;
+import org.apache.axis2.om.impl.llom.serialize.StreamWriterToContentHandlerConverter;
+import org.apache.axis2.soap.SOAP11Constants;
+import org.apache.axis2.soap.SOAPFault;
+import org.apache.axis2.soap.SOAPProcessingException;
+import org.apache.axis2.soap.impl.dom.SOAPFaultRoleImpl;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
+public class SOAP11FaultRoleImpl extends SOAPFaultRoleImpl {
+ public SOAP11FaultRoleImpl(SOAPFault parent) throws SOAPProcessingException {
+ super(parent, false);
+ }
+
+ public SOAP11FaultRoleImpl(SOAPFault parent, OMXMLParserWrapper builder) {
+ super(parent, builder);
+ }
+
+ protected void checkParent(OMElement parent) throws SOAPProcessingException {
+ if (!(parent instanceof SOAP11FaultImpl)) {
+ throw new SOAPProcessingException(
+ "Expecting SOAP 1.1 implementation of SOAP Fault as the parent. But received some other implementation");
+ }
+ }
+
+ protected void serialize(org.apache.axis2.om.impl.OMOutputImpl omOutput, boolean cache) throws XMLStreamException {
+
+ // select the builder
+ short builderType = PULL_TYPE_BUILDER; // default is pull type
+ if (builder != null) {
+ builderType = this.builder.getBuilderType();
+ }
+ if ((builderType == PUSH_TYPE_BUILDER)
+ && (builder.getRegisteredContentHandler() == null)) {
+ builder.registerExternalContentHandler(
+ new StreamWriterToContentHandlerConverter(omOutput));
+ }
+
+ XMLStreamWriter writer = omOutput.getXmlStreamWriter();
+ if (this.getNamespace() != null) {
+ String prefix = this.getNamespace().getPrefix();
+ String nameSpaceName = this.getNamespace().getName();
+ writer.writeStartElement(prefix, SOAP11Constants.SOAP_FAULT_ACTOR_LOCAL_NAME,
+ nameSpaceName);
+ } else {
+ writer.writeStartElement(
+ SOAP11Constants.SOAP_FAULT_ACTOR_LOCAL_NAME);
+ }
+ OMSerializerUtil.serializeAttributes(this, omOutput);
+ OMSerializerUtil.serializeNamespaces(this, omOutput);
+
+ String text = this.getText();
+ writer.writeCharacters(text);
+ writer.writeEndElement();
+ }
+
+}
Added: webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/SOAP11FaultSubCodeImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/SOAP11FaultSubCodeImpl.java?rev=330005&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/SOAP11FaultSubCodeImpl.java (added)
+++ webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/SOAP11FaultSubCodeImpl.java Mon Oct 31 23:57:42 2005
@@ -0,0 +1,72 @@
+/*
+ * 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.axis2.soap.impl.dom.soap11;
+
+import org.apache.axis2.om.OMElement;
+import org.apache.axis2.om.OMXMLParserWrapper;
+import org.apache.axis2.soap.SOAP12Constants;
+import org.apache.axis2.soap.SOAPFaultCode;
+import org.apache.axis2.soap.SOAPFaultSubCode;
+import org.apache.axis2.soap.SOAPFaultValue;
+import org.apache.axis2.soap.SOAPProcessingException;
+import org.apache.axis2.soap.impl.dom.SOAPFaultSubCodeImpl;
+
+public class SOAP11FaultSubCodeImpl extends SOAPFaultSubCodeImpl {
+
+ //changed
+ public SOAP11FaultSubCodeImpl(SOAPFaultCode parent) throws SOAPProcessingException {
+ super(parent, SOAP12Constants.SOAP_FAULT_SUB_CODE_LOCAL_NAME);
+ }
+
+ //changed
+ public SOAP11FaultSubCodeImpl(SOAPFaultCode parent,
+ OMXMLParserWrapper builder) {
+ super(parent, SOAP12Constants.SOAP_FAULT_SUB_CODE_LOCAL_NAME, builder);
+ }
+
+ public SOAP11FaultSubCodeImpl(SOAPFaultSubCode parent) throws SOAPProcessingException {
+ super(parent, SOAP12Constants.SOAP_FAULT_SUB_CODE_LOCAL_NAME);
+ }
+
+ public SOAP11FaultSubCodeImpl(SOAPFaultSubCode parent,
+ OMXMLParserWrapper builder) {
+ super(parent, SOAP12Constants.SOAP_FAULT_SUB_CODE_LOCAL_NAME, builder);
+ }
+
+ protected void checkParent(OMElement parent) throws SOAPProcessingException {
+ if (!(parent instanceof SOAP11FaultSubCodeImpl) ||
+ (parent instanceof SOAP11FaultCodeImpl)) {
+ throw new SOAPProcessingException("Expecting SOAP 1.1 implementation of SOAP FaultSubCode or SOAP FaultCode as the parent. But received some other implementation");
+ }
+ }
+
+ public void setSubCode(SOAPFaultSubCode subCode) throws SOAPProcessingException {
+ if (!((parentNode instanceof SOAP11FaultSubCodeImpl) || (parentNode instanceof SOAP11FaultCodeImpl))) {
+ throw new SOAPProcessingException("Expecting SOAP 1.1 implementation of SOAP Fault Sub Code. But received some other implementation");
+ }
+ super.setSubCode(subCode);
+ }
+
+ public void setValue(SOAPFaultValue soapFaultSubCodeValue) throws SOAPProcessingException {
+ if (!(soapFaultSubCodeValue instanceof SOAP11FaultValueImpl)) {
+ throw new SOAPProcessingException("Expecting SOAP 1.1 implementation of SOAP Fault Value. But received some other implementation");
+ }
+ super.setValue(soapFaultSubCodeValue);
+ }
+
+
+}
Added: webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/SOAP11FaultTextImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/SOAP11FaultTextImpl.java?rev=330005&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/SOAP11FaultTextImpl.java (added)
+++ webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/SOAP11FaultTextImpl.java Mon Oct 31 23:57:42 2005
@@ -0,0 +1,41 @@
+/*
+ * 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.axis2.soap.impl.dom.soap11;
+
+import org.apache.axis2.om.OMElement;
+import org.apache.axis2.om.OMXMLParserWrapper;
+import org.apache.axis2.soap.SOAPFaultReason;
+import org.apache.axis2.soap.SOAPProcessingException;
+import org.apache.axis2.soap.impl.dom.SOAPFaultTextImpl;
+
+public class SOAP11FaultTextImpl extends SOAPFaultTextImpl {
+ public SOAP11FaultTextImpl(SOAPFaultReason parent) throws SOAPProcessingException {
+ super(parent);
+ }
+
+ public SOAP11FaultTextImpl(SOAPFaultReason parent,
+ OMXMLParserWrapper builder) {
+ super(parent, builder);
+ }
+
+ protected void checkParent(OMElement parent) throws SOAPProcessingException {
+ if (!(parent instanceof SOAP11FaultReasonImpl)) {
+ throw new SOAPProcessingException(
+ "Expecting SOAP 1.1 implementation of SOAP FaultReason as the parent. But received some other implementation");
+ }
+ }
+}
Added: webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/SOAP11FaultValueImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/SOAP11FaultValueImpl.java?rev=330005&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/SOAP11FaultValueImpl.java (added)
+++ webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/SOAP11FaultValueImpl.java Mon Oct 31 23:57:42 2005
@@ -0,0 +1,42 @@
+/*
+ * 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.axis2.soap.impl.dom.soap11;
+
+import org.apache.axis2.om.OMElement;
+import org.apache.axis2.om.OMXMLParserWrapper;
+import org.apache.axis2.soap.SOAPProcessingException;
+import org.apache.axis2.soap.impl.dom.SOAPFaultValueImpl;
+
+public class SOAP11FaultValueImpl extends SOAPFaultValueImpl {
+ public SOAP11FaultValueImpl(OMElement parent) throws SOAPProcessingException {
+ super(parent);
+ }
+
+ public SOAP11FaultValueImpl(OMElement parent, OMXMLParserWrapper builder) {
+ super(parent, builder);
+ }
+
+
+ protected void checkParent(OMElement parent) throws SOAPProcessingException {
+ if (!((parent instanceof SOAP11FaultSubCodeImpl) ||
+ (parent instanceof SOAP11FaultCodeImpl))) {
+ throw new SOAPProcessingException(
+ "Expecting SOAP 1.1 implementation of SOAP FaultSubCode or SOAP FaultCode as the parent. But received some other implementation." +
+ parent.getClass());
+ }
+ }
+}
Added: webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/SOAP11HeaderBlockImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/SOAP11HeaderBlockImpl.java?rev=330005&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/SOAP11HeaderBlockImpl.java (added)
+++ webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/SOAP11HeaderBlockImpl.java Mon Oct 31 23:57:42 2005
@@ -0,0 +1,129 @@
+/*
+ * 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.axis2.soap.impl.dom.soap11;
+
+import org.apache.axis2.om.OMElement;
+import org.apache.axis2.om.OMNamespace;
+import org.apache.axis2.om.OMXMLParserWrapper;
+import org.apache.axis2.soap.SOAP11Constants;
+import org.apache.axis2.soap.SOAPConstants;
+import org.apache.axis2.soap.SOAPHeader;
+import org.apache.axis2.soap.SOAPProcessingException;
+import org.apache.axis2.soap.impl.dom.SOAPHeaderBlockImpl;
+
+public class SOAP11HeaderBlockImpl extends SOAPHeaderBlockImpl {
+ /**
+ * @param localName
+ * @param ns
+ */
+ public SOAP11HeaderBlockImpl(String localName,
+ OMNamespace ns,
+ SOAPHeader parent) throws SOAPProcessingException {
+ super(localName, ns, parent);
+ checkParent(parent);
+ }
+
+ /**
+ * Constructor SOAPHeaderBlockImpl
+ *
+ * @param localName
+ * @param ns
+ * @param parent
+ * @param builder
+ */
+ public SOAP11HeaderBlockImpl(String localName,
+ OMNamespace ns,
+ OMElement parent,
+ OMXMLParserWrapper builder) {
+ super(localName, ns, parent, builder);
+ }
+
+
+ protected void checkParent(OMElement parent) throws SOAPProcessingException {
+ if (!(parent instanceof SOAP11HeaderImpl)) {
+ throw new SOAPProcessingException(
+ "Expecting SOAP 1.1 implementation of SOAP Body as the parent. But received some other implementation");
+ }
+ }
+
+ public void setRole(String roleURI) {
+ setAttribute(SOAP11Constants.ATTR_ACTOR,
+ roleURI,
+ SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI);
+
+ }
+
+ public String getRole() {
+ return getAttribute(SOAP11Constants.ATTR_ACTOR,
+ SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI);
+ }
+
+ public void setMustUnderstand(boolean mustUnderstand) {
+ setAttribute(SOAPConstants.ATTR_MUSTUNDERSTAND,
+ mustUnderstand ? "1" : "0",
+ SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI);
+ }
+
+ public void setMustUnderstand(String mustUnderstand) throws SOAPProcessingException {
+ if (SOAPConstants.ATTR_MUSTUNDERSTAND_TRUE.equals(mustUnderstand) ||
+ SOAPConstants.ATTR_MUSTUNDERSTAND_FALSE.equals(mustUnderstand) ||
+ SOAPConstants.ATTR_MUSTUNDERSTAND_0.equals(mustUnderstand) ||
+ SOAPConstants.ATTR_MUSTUNDERSTAND_1.equals(mustUnderstand)) {
+ setAttribute(SOAPConstants.ATTR_MUSTUNDERSTAND,
+ mustUnderstand,
+ SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI);
+ } else {
+ throw new SOAPProcessingException(
+ "mustUndertand should be one of \"true\", \"false\", \"0\" or \"1\" ");
+ }
+ }
+
+ /**
+ * 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() throws SOAPProcessingException {
+ String mustUnderstand = "";
+ if ((mustUnderstand =
+ getAttribute(SOAPConstants.ATTR_MUSTUNDERSTAND,
+ SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI))
+ != null) {
+ if (SOAPConstants.ATTR_MUSTUNDERSTAND_TRUE.equalsIgnoreCase(
+ mustUnderstand) ||
+ SOAPConstants.ATTR_MUSTUNDERSTAND_1.equalsIgnoreCase(
+ mustUnderstand)) {
+ return true;
+ } else if (SOAPConstants.ATTR_MUSTUNDERSTAND_FALSE.equalsIgnoreCase(
+ mustUnderstand) ||
+ SOAPConstants.ATTR_MUSTUNDERSTAND_0.equalsIgnoreCase(
+ mustUnderstand)) {
+ return false;
+ } else {
+ throw new SOAPProcessingException(
+ "Invalid value found in mustUnderstand value of " +
+ this.getLocalName() +
+ " header block");
+ }
+ }
+ return false;
+
+ }
+}
Added: webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/SOAP11HeaderImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/SOAP11HeaderImpl.java?rev=330005&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/SOAP11HeaderImpl.java (added)
+++ webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/SOAP11HeaderImpl.java Mon Oct 31 23:57:42 2005
@@ -0,0 +1,83 @@
+/*
+ * 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.axis2.soap.impl.dom.soap11;
+
+import org.apache.axis2.om.OMException;
+import org.apache.axis2.om.OMNamespace;
+import org.apache.axis2.om.OMXMLParserWrapper;
+import org.apache.axis2.om.impl.OMNodeEx;
+import org.apache.axis2.om.impl.llom.traverse.OMChildrenWithSpecificAttributeIterator;
+import org.apache.axis2.soap.SOAP11Constants;
+import org.apache.axis2.soap.SOAPEnvelope;
+import org.apache.axis2.soap.SOAPHeaderBlock;
+import org.apache.axis2.soap.SOAPProcessingException;
+import org.apache.axis2.soap.impl.dom.SOAPHeaderImpl;
+
+import java.util.Iterator;
+
+import javax.xml.namespace.QName;
+
+public class SOAP11HeaderImpl extends SOAPHeaderImpl {
+ /**
+ * @param envelope
+ */
+ public SOAP11HeaderImpl(SOAPEnvelope envelope) throws SOAPProcessingException {
+ super(envelope);
+ }
+
+ /**
+ * Constructor SOAPHeaderImpl
+ *
+ * @param envelope
+ * @param builder
+ */
+ public SOAP11HeaderImpl(SOAPEnvelope envelope, OMXMLParserWrapper builder) {
+ super(envelope, builder);
+ }
+
+ 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");
+ }
+
+ OMNamespace namespace = findNamespace(ns.getName(), ns.getPrefix());
+ if (namespace != null) {
+ ns = namespace;
+ }
+
+ SOAPHeaderBlock soapHeaderBlock = null;
+ try {
+ soapHeaderBlock = new SOAP11HeaderBlockImpl(localName, ns, this);
+ } catch (SOAPProcessingException e) {
+ throw new OMException(e);
+ }
+ ((OMNodeEx)soapHeaderBlock).setComplete(true);
+ return soapHeaderBlock;
+ }
+
+ public Iterator extractHeaderBlocks(String role) {
+ return new OMChildrenWithSpecificAttributeIterator(getFirstOMChild(),
+ new QName(SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI,
+ SOAP11Constants.ATTR_ACTOR),
+ role,
+ true);
+
+ }
+
+
+}
Added: webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap12/SOAP12BodyImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap12/SOAP12BodyImpl.java?rev=330005&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap12/SOAP12BodyImpl.java (added)
+++ webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap12/SOAP12BodyImpl.java Mon Oct 31 23:57:42 2005
@@ -0,0 +1,49 @@
+/*
+ * 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.axis2.soap.impl.dom.soap12;
+
+import org.apache.axis2.om.OMException;
+import org.apache.axis2.om.OMXMLParserWrapper;
+import org.apache.axis2.soap.SOAPEnvelope;
+import org.apache.axis2.soap.SOAPFault;
+import org.apache.axis2.soap.SOAPProcessingException;
+import org.apache.axis2.soap.impl.dom.SOAPBodyImpl;
+
+public class SOAP12BodyImpl extends SOAPBodyImpl {
+ /**
+ * @param envelope
+ */
+ public SOAP12BodyImpl(SOAPEnvelope envelope) throws SOAPProcessingException {
+ super(envelope);
+ }
+
+ /**
+ * Constructor SOAPBodyImpl
+ *
+ * @param envelope
+ * @param builder
+ */
+ public SOAP12BodyImpl(SOAPEnvelope envelope, OMXMLParserWrapper builder) {
+ super(envelope, builder);
+ }
+
+ public SOAPFault addFault(Exception e) throws OMException {
+ SOAPFault soapFault = new SOAP12FaultImpl(this, e);
+ addFault(soapFault);
+ return soapFault;
+ }
+}
Added: webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap12/SOAP12Factory.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap12/SOAP12Factory.java?rev=330005&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap12/SOAP12Factory.java (added)
+++ webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap12/SOAP12Factory.java Mon Oct 31 23:57:42 2005
@@ -0,0 +1,199 @@
+/*
+ * 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.axis2.soap.impl.dom.soap12;
+
+import org.apache.axis2.om.OMNamespace;
+import org.apache.axis2.om.OMXMLParserWrapper;
+import org.apache.axis2.om.impl.dom.NamespaceImpl;
+import org.apache.axis2.soap.SOAP12Constants;
+import org.apache.axis2.soap.SOAPBody;
+import org.apache.axis2.soap.SOAPEnvelope;
+import org.apache.axis2.soap.SOAPFault;
+import org.apache.axis2.soap.SOAPFaultCode;
+import org.apache.axis2.soap.SOAPFaultDetail;
+import org.apache.axis2.soap.SOAPFaultNode;
+import org.apache.axis2.soap.SOAPFaultReason;
+import org.apache.axis2.soap.SOAPFaultRole;
+import org.apache.axis2.soap.SOAPFaultSubCode;
+import org.apache.axis2.soap.SOAPFaultText;
+import org.apache.axis2.soap.SOAPFaultValue;
+import org.apache.axis2.soap.SOAPHeader;
+import org.apache.axis2.soap.SOAPHeaderBlock;
+import org.apache.axis2.soap.SOAPProcessingException;
+import org.apache.axis2.soap.impl.dom.SOAPEnvelopeImpl;
+import org.apache.axis2.soap.impl.dom.factory.DOMSOAPFactory;
+
+public class SOAP12Factory extends DOMSOAPFactory {
+ public SOAPEnvelope createSOAPEnvelope() {
+ return new SOAPEnvelopeImpl(
+ new NamespaceImpl(
+ SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI,
+ SOAP12Constants.SOAP_DEFAULT_NAMESPACE_PREFIX),
+ this);
+ }
+
+ public SOAPHeader createSOAPHeader(SOAPEnvelope envelope) throws SOAPProcessingException {
+ return new SOAP12HeaderImpl(envelope);
+ }
+
+ public SOAPHeader createSOAPHeader(SOAPEnvelope envelope,
+ OMXMLParserWrapper builder) {
+ return new SOAP12HeaderImpl(envelope, builder);
+ }
+
+ public SOAPHeaderBlock createSOAPHeaderBlock(String localName,
+ OMNamespace ns,
+ SOAPHeader parent) throws SOAPProcessingException {
+ return new SOAP12HeaderBlockImpl(localName, ns, parent);
+ }
+
+ public SOAPHeaderBlock createSOAPHeaderBlock(String localName,
+ OMNamespace ns,
+ SOAPHeader parent,
+ OMXMLParserWrapper builder) throws SOAPProcessingException {
+ return new SOAP12HeaderBlockImpl(localName, ns, parent, builder);
+ }
+
+ public SOAPFault createSOAPFault(SOAPBody parent, Exception e) throws SOAPProcessingException {
+ return new SOAP12FaultImpl(parent, e);
+ }
+
+ public SOAPFault createSOAPFault(SOAPBody parent) throws SOAPProcessingException {
+ return new SOAP12FaultImpl(parent);
+ }
+
+ public SOAPFault createSOAPFault(SOAPBody parent,
+ OMXMLParserWrapper builder) {
+ return new SOAP12FaultImpl(parent, builder);
+ }
+
+ public SOAPBody createSOAPBody(SOAPEnvelope envelope) throws SOAPProcessingException {
+ return new SOAP12BodyImpl(envelope);
+ }
+
+ public SOAPBody createSOAPBody(SOAPEnvelope envelope,
+ OMXMLParserWrapper builder) {
+ return new SOAP12BodyImpl(envelope, builder);
+ }
+
+ public SOAPFaultCode createSOAPFaultCode(SOAPFault parent) throws SOAPProcessingException {
+ return new SOAP12FaultCodeImpl(parent);
+ }
+
+ public SOAPFaultCode createSOAPFaultCode(SOAPFault parent,
+ OMXMLParserWrapper builder) {
+ return new SOAP12FaultCodeImpl(parent, builder);
+ }
+
+ public SOAPFaultValue createSOAPFaultValue(SOAPFaultCode parent) throws SOAPProcessingException {
+ return new SOAP12FaultValueImpl(parent);
+ }
+
+ public SOAPFaultValue createSOAPFaultValue(SOAPFaultCode parent,
+ OMXMLParserWrapper builder) {
+ return new SOAP12FaultValueImpl(parent, builder);
+ }
+
+ //added
+ public SOAPFaultValue createSOAPFaultValue(SOAPFaultSubCode parent) throws SOAPProcessingException {
+ return new SOAP12FaultValueImpl(parent);
+ }
+
+ //added
+ public SOAPFaultValue createSOAPFaultValue(SOAPFaultSubCode parent,
+ OMXMLParserWrapper builder) {
+ return new SOAP12FaultValueImpl(parent, builder);
+ }
+
+ //changed
+ public SOAPFaultSubCode createSOAPFaultSubCode(SOAPFaultCode parent) throws SOAPProcessingException {
+ return new SOAP12FaultSubCodeImpl(parent);
+ }
+
+ //changed
+ public SOAPFaultSubCode createSOAPFaultSubCode(SOAPFaultCode parent,
+ OMXMLParserWrapper builder) {
+ return new SOAP12FaultSubCodeImpl(parent, builder);
+ }
+
+ public SOAPFaultSubCode createSOAPFaultSubCode(SOAPFaultSubCode parent) throws SOAPProcessingException {
+ return new SOAP12FaultSubCodeImpl(parent);
+ }
+
+ public SOAPFaultSubCode createSOAPFaultSubCode(SOAPFaultSubCode parent,
+ OMXMLParserWrapper builder) {
+ return new SOAP12FaultSubCodeImpl(parent, builder);
+ }
+
+ public SOAPFaultReason createSOAPFaultReason(SOAPFault parent) throws SOAPProcessingException {
+ return new SOAP12FaultReasonImpl(parent);
+ }
+
+ public SOAPFaultReason createSOAPFaultReason(SOAPFault parent,
+ OMXMLParserWrapper builder) {
+ return new SOAP12FaultReasonImpl(parent, builder);
+ }
+
+ public SOAPFaultText createSOAPFaultText(SOAPFaultReason parent) throws SOAPProcessingException {
+ return new SOAP12FaultTextImpl(parent);
+ }
+
+ public SOAPFaultText createSOAPFaultText(SOAPFaultReason parent,
+ OMXMLParserWrapper builder) {
+ return new SOAP12FaultTextImpl(parent, builder);
+ }
+
+ public SOAPFaultNode createSOAPFaultNode(SOAPFault parent) throws SOAPProcessingException {
+ return new SOAP12FaultNodeImpl(parent);
+ }
+
+ public SOAPFaultNode createSOAPFaultNode(SOAPFault parent,
+ OMXMLParserWrapper builder) {
+ return new SOAP12FaultNodeImpl(parent, builder);
+ }
+
+ public SOAPFaultRole createSOAPFaultRole(SOAPFault parent) throws SOAPProcessingException {
+ return new SOAP12FaultRoleImpl(parent);
+ }
+
+ public SOAPFaultRole createSOAPFaultRole(SOAPFault parent,
+ OMXMLParserWrapper builder) {
+ return new SOAP12FaultRoleImpl(parent, builder);
+ }
+
+ public SOAPFaultDetail createSOAPFaultDetail(SOAPFault parent) throws SOAPProcessingException {
+ return new SOAP12FaultDetailImpl(parent);
+ }
+
+ public SOAPFaultDetail createSOAPFaultDetail(SOAPFault parent,
+ OMXMLParserWrapper builder) {
+ return new SOAP12FaultDetailImpl(parent, builder);
+ }
+
+ public SOAPEnvelope getDefaultEnvelope() throws SOAPProcessingException {
+ OMNamespace ns =
+ new NamespaceImpl(
+ SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI,
+ SOAP12Constants.SOAP_DEFAULT_NAMESPACE_PREFIX);
+ SOAPEnvelopeImpl env = new SOAPEnvelopeImpl(ns, this);
+ createSOAPHeader(env);
+ createSOAPBody(env);
+
+ return env;
+ }
+
+}
Added: webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap12/SOAP12FaultCodeImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap12/SOAP12FaultCodeImpl.java?rev=330005&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap12/SOAP12FaultCodeImpl.java (added)
+++ webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap12/SOAP12FaultCodeImpl.java Mon Oct 31 23:57:42 2005
@@ -0,0 +1,71 @@
+/*
+ * 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.axis2.soap.impl.dom.soap12;
+
+import org.apache.axis2.om.OMElement;
+import org.apache.axis2.om.OMXMLParserWrapper;
+import org.apache.axis2.soap.SOAPFault;
+import org.apache.axis2.soap.SOAPFaultSubCode;
+import org.apache.axis2.soap.SOAPFaultValue;
+import org.apache.axis2.soap.SOAPProcessingException;
+import org.apache.axis2.soap.impl.dom.SOAPFaultCodeImpl;
+
+public class SOAP12FaultCodeImpl extends SOAPFaultCodeImpl {
+ /**
+ * Constructor OMElementImpl
+ *
+ * @param localName
+ * @param ns
+ * @param parent
+ * @param builder
+ */
+ public SOAP12FaultCodeImpl(SOAPFault parent, OMXMLParserWrapper builder) {
+ super(parent, builder);
+ }
+
+ /**
+ * @param parent
+ * @param parent
+ */
+ public SOAP12FaultCodeImpl(SOAPFault parent) throws SOAPProcessingException {
+ super(parent, true);
+ }
+
+
+ public void setSubCode(SOAPFaultSubCode subCode) throws SOAPProcessingException {
+ if (!(subCode instanceof SOAP12FaultSubCodeImpl)) {
+ throw new SOAPProcessingException(
+ "Expecting SOAP 1.2 implementation of SOAP Fault Sub Code. But received some other implementation");
+ }
+ super.setSubCode(subCode);
+ }
+
+ public void setValue(SOAPFaultValue value) throws SOAPProcessingException {
+ if (!(value instanceof SOAP12FaultValueImpl)) {
+ throw new SOAPProcessingException(
+ "Expecting SOAP 1.2 implementation of SOAP Fault Value. But received some other implementation");
+ }
+ super.setValue(value);
+ }
+
+ protected void checkParent(OMElement parent) throws SOAPProcessingException {
+ if (!(parent instanceof SOAP12FaultImpl)) {
+ throw new SOAPProcessingException(
+ "Expecting SOAP 1.2 implementation of SOAP Fault as the parent. But received some other implementation");
+ }
+ }
+}
Added: webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap12/SOAP12FaultDetailImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap12/SOAP12FaultDetailImpl.java?rev=330005&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap12/SOAP12FaultDetailImpl.java (added)
+++ webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap12/SOAP12FaultDetailImpl.java Mon Oct 31 23:57:42 2005
@@ -0,0 +1,40 @@
+/*
+ * 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.axis2.soap.impl.dom.soap12;
+
+import org.apache.axis2.om.OMElement;
+import org.apache.axis2.om.OMXMLParserWrapper;
+import org.apache.axis2.soap.SOAPFault;
+import org.apache.axis2.soap.SOAPProcessingException;
+import org.apache.axis2.soap.impl.dom.SOAPFaultDetailImpl;
+
+public class SOAP12FaultDetailImpl extends SOAPFaultDetailImpl {
+ public SOAP12FaultDetailImpl(SOAPFault parent) throws SOAPProcessingException {
+ super(parent, true);
+ }
+
+ public SOAP12FaultDetailImpl(SOAPFault parent, OMXMLParserWrapper builder) {
+ super(parent, builder);
+ }
+
+ protected void checkParent(OMElement parent) throws SOAPProcessingException {
+ if (!(parent instanceof SOAP12FaultImpl)) {
+ throw new SOAPProcessingException(
+ "Expecting SOAP 1.2 implementation of SOAP Fault as the parent. But received some other implementation");
+ }
+ }
+}
Added: webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap12/SOAP12FaultImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap12/SOAP12FaultImpl.java?rev=330005&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap12/SOAP12FaultImpl.java (added)
+++ webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap12/SOAP12FaultImpl.java Mon Oct 31 23:57:42 2005
@@ -0,0 +1,111 @@
+/*
+ * 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.axis2.soap.impl.dom.soap12;
+
+import org.apache.axis2.om.OMElement;
+import org.apache.axis2.om.OMXMLParserWrapper;
+import org.apache.axis2.soap.SOAPBody;
+import org.apache.axis2.soap.SOAPFault;
+import org.apache.axis2.soap.SOAPFaultCode;
+import org.apache.axis2.soap.SOAPFaultDetail;
+import org.apache.axis2.soap.SOAPFaultNode;
+import org.apache.axis2.soap.SOAPFaultReason;
+import org.apache.axis2.soap.SOAPFaultRole;
+import org.apache.axis2.soap.SOAPProcessingException;
+import org.apache.axis2.soap.impl.dom.SOAPFaultImpl;
+
+import javax.xml.stream.XMLStreamException;
+
+public class SOAP12FaultImpl extends SOAPFaultImpl {
+ public SOAP12FaultImpl(SOAPBody parent, Exception e) throws SOAPProcessingException {
+ super(parent, e);
+ }
+
+ public SOAP12FaultImpl(SOAPBody parent, OMXMLParserWrapper builder) {
+ super(parent, builder);
+ }
+
+ /**
+ * This is a convenience method for the SOAP Fault Impl.
+ *
+ * @param parent
+ * @param e
+ */
+ public SOAP12FaultImpl(SOAPBody parent) throws SOAPProcessingException {
+ super(parent);
+ }
+
+ protected SOAPFaultDetail getNewSOAPFaultDetail(SOAPFault fault) {
+ return new SOAP12FaultDetailImpl(fault);
+
+ }
+
+ public void setCode(SOAPFaultCode soapFaultCode) throws SOAPProcessingException {
+ if (!(soapFaultCode instanceof SOAP12FaultCodeImpl)) {
+ throw new SOAPProcessingException(
+ "Expecting SOAP 1.2 implementation of SOAP Fault Code. But received some other implementation");
+ }
+ super.setCode(soapFaultCode);
+ }
+
+
+ public void setReason(SOAPFaultReason reason) throws SOAPProcessingException {
+ if (!(reason instanceof SOAP12FaultReasonImpl)) {
+ throw new SOAPProcessingException(
+ "Expecting SOAP 1.2 implementation of SOAP Fault Reason. But received some other implementation");
+ }
+ super.setReason(reason);
+ }
+
+ public void setNode(SOAPFaultNode node) throws SOAPProcessingException {
+ if (!(node instanceof SOAP12FaultNodeImpl)) {
+ throw new SOAPProcessingException(
+ "Expecting SOAP 1.2 implementation of SOAP Fault Node. But received some other implementation");
+ }
+ super.setNode(node);
+ }
+
+ public void setRole(SOAPFaultRole role) throws SOAPProcessingException {
+ if (!(role instanceof SOAP12FaultRoleImpl)) {
+ throw new SOAPProcessingException(
+ "Expecting SOAP 1.2 implementation of SOAP Fault Role. But received some other implementation");
+ }
+ super.setRole(role);
+ }
+
+ public void setDetail(SOAPFaultDetail detail) throws SOAPProcessingException {
+ if (!(detail instanceof SOAP12FaultDetailImpl)) {
+ throw new SOAPProcessingException(
+ "Expecting SOAP 1.2 implementation of SOAP Fault Detail. But received some other implementation");
+ }
+ super.setDetail(detail);
+ }
+
+ protected void checkParent(OMElement parent) throws SOAPProcessingException {
+ if (!(parent instanceof SOAP12BodyImpl)) {
+ throw new SOAPProcessingException(
+ "Expecting SOAP 1.2 implementation of SOAP Body as the parent. But received some other implementation");
+ }
+ }
+
+ protected void serializeFaultNode(org.apache.axis2.om.impl.OMOutputImpl omOutput) throws XMLStreamException {
+ SOAPFaultNode faultNode = getNode();
+ if (faultNode != null) {
+ faultNode.serialize(omOutput);
+ }
+ }
+}
Added: webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap12/SOAP12FaultNodeImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap12/SOAP12FaultNodeImpl.java?rev=330005&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap12/SOAP12FaultNodeImpl.java (added)
+++ webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap12/SOAP12FaultNodeImpl.java Mon Oct 31 23:57:42 2005
@@ -0,0 +1,40 @@
+/*
+ * 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.axis2.soap.impl.dom.soap12;
+
+import org.apache.axis2.om.OMElement;
+import org.apache.axis2.om.OMXMLParserWrapper;
+import org.apache.axis2.soap.SOAPFault;
+import org.apache.axis2.soap.SOAPProcessingException;
+import org.apache.axis2.soap.impl.dom.SOAPFaultNodeImpl;
+
+public class SOAP12FaultNodeImpl extends SOAPFaultNodeImpl {
+ public SOAP12FaultNodeImpl(SOAPFault parent) throws SOAPProcessingException {
+ super(parent);
+ }
+
+ public SOAP12FaultNodeImpl(SOAPFault parent, OMXMLParserWrapper builder) {
+ super(parent, builder);
+ }
+
+ protected void checkParent(OMElement parent) throws SOAPProcessingException {
+ if (!(parent instanceof SOAP12FaultImpl)) {
+ throw new SOAPProcessingException(
+ "Expecting SOAP 1.2 implementation of SOAP Fault as the parent. But received some other implementation");
+ }
+ }
+}
Added: webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap12/SOAP12FaultReasonImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap12/SOAP12FaultReasonImpl.java?rev=330005&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap12/SOAP12FaultReasonImpl.java (added)
+++ webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap12/SOAP12FaultReasonImpl.java Mon Oct 31 23:57:42 2005
@@ -0,0 +1,53 @@
+/*
+ * 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.axis2.soap.impl.dom.soap12;
+
+import org.apache.axis2.om.OMElement;
+import org.apache.axis2.om.OMXMLParserWrapper;
+import org.apache.axis2.soap.SOAPFault;
+import org.apache.axis2.soap.SOAPFaultText;
+import org.apache.axis2.soap.SOAPProcessingException;
+import org.apache.axis2.soap.impl.dom.SOAPFaultReasonImpl;
+
+public class SOAP12FaultReasonImpl extends SOAPFaultReasonImpl {
+
+ public SOAP12FaultReasonImpl(SOAPFault parent, OMXMLParserWrapper builder) {
+ super(parent, builder);
+ }
+
+ /**
+ * @param parent
+ */
+ public SOAP12FaultReasonImpl(SOAPFault parent) throws SOAPProcessingException {
+ super(parent, true);
+ }
+
+ public void setSOAPText(SOAPFaultText soapFaultText) throws SOAPProcessingException {
+ if (!(soapFaultText instanceof SOAP12FaultTextImpl)) {
+ throw new SOAPProcessingException(
+ "Expecting SOAP 1.2 implementation of SOAP Fault Text. But received some other implementation");
+ }
+ super.setSOAPText(soapFaultText);
+ }
+
+ protected void checkParent(OMElement parent) throws SOAPProcessingException {
+ if (!(parent instanceof SOAP12FaultImpl)) {
+ throw new SOAPProcessingException(
+ "Expecting SOAP 1.2 implementation of SOAP Fault as the parent. But received some other implementation");
+ }
+ }
+}
Added: webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap12/SOAP12FaultRoleImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap12/SOAP12FaultRoleImpl.java?rev=330005&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap12/SOAP12FaultRoleImpl.java (added)
+++ webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap12/SOAP12FaultRoleImpl.java Mon Oct 31 23:57:42 2005
@@ -0,0 +1,40 @@
+/*
+ * 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.axis2.soap.impl.dom.soap12;
+
+import org.apache.axis2.om.OMElement;
+import org.apache.axis2.om.OMXMLParserWrapper;
+import org.apache.axis2.soap.SOAPFault;
+import org.apache.axis2.soap.SOAPProcessingException;
+import org.apache.axis2.soap.impl.dom.SOAPFaultRoleImpl;
+
+public class SOAP12FaultRoleImpl extends SOAPFaultRoleImpl {
+ public SOAP12FaultRoleImpl(SOAPFault parent) throws SOAPProcessingException {
+ super(parent, true);
+ }
+
+ public SOAP12FaultRoleImpl(SOAPFault parent, OMXMLParserWrapper builder) {
+ super(parent, builder);
+ }
+
+ protected void checkParent(OMElement parent) throws SOAPProcessingException {
+ if (!(parent instanceof SOAP12FaultImpl)) {
+ throw new SOAPProcessingException(
+ "Expecting SOAP 1.2 implementation of SOAP Fault as the parent. But received some other implementation");
+ }
+ }
+}
Added: webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap12/SOAP12FaultSubCodeImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap12/SOAP12FaultSubCodeImpl.java?rev=330005&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap12/SOAP12FaultSubCodeImpl.java (added)
+++ webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap12/SOAP12FaultSubCodeImpl.java Mon Oct 31 23:57:42 2005
@@ -0,0 +1,72 @@
+/*
+ * 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.axis2.soap.impl.dom.soap12;
+
+import org.apache.axis2.om.OMElement;
+import org.apache.axis2.om.OMXMLParserWrapper;
+import org.apache.axis2.soap.SOAP12Constants;
+import org.apache.axis2.soap.SOAPFaultCode;
+import org.apache.axis2.soap.SOAPFaultSubCode;
+import org.apache.axis2.soap.SOAPFaultValue;
+import org.apache.axis2.soap.SOAPProcessingException;
+import org.apache.axis2.soap.impl.dom.SOAPFaultSubCodeImpl;
+
+public class SOAP12FaultSubCodeImpl extends SOAPFaultSubCodeImpl {
+ //changed
+ public SOAP12FaultSubCodeImpl(SOAPFaultCode parent) throws SOAPProcessingException {
+ super(parent, SOAP12Constants.SOAP_FAULT_SUB_CODE_LOCAL_NAME);
+ }
+
+ //changed
+ public SOAP12FaultSubCodeImpl(SOAPFaultCode parent,
+ OMXMLParserWrapper builder) {
+ super(parent, SOAP12Constants.SOAP_FAULT_SUB_CODE_LOCAL_NAME, builder);
+ }
+
+ public SOAP12FaultSubCodeImpl(SOAPFaultSubCode parent) throws SOAPProcessingException {
+ super(parent, SOAP12Constants.SOAP_FAULT_SUB_CODE_LOCAL_NAME);
+ }
+
+ public SOAP12FaultSubCodeImpl(SOAPFaultSubCode parent,
+ OMXMLParserWrapper builder) {
+ super(parent, SOAP12Constants.SOAP_FAULT_SUB_CODE_LOCAL_NAME, builder);
+ }
+
+ protected void checkParent(OMElement parent) throws SOAPProcessingException {
+ if (!((parent instanceof SOAP12FaultSubCodeImpl) ||
+ (parent instanceof SOAP12FaultCodeImpl))) {
+ throw new SOAPProcessingException(
+ "Expecting SOAP 1.2 implementation of SOAP FaultSubCode or SOAP FaultCodeValue as the parent. But received some other implementation");
+ }
+ }
+
+ public void setSubCode(SOAPFaultSubCode subCode) throws SOAPProcessingException {
+ if (!(subCode instanceof SOAP12FaultSubCodeImpl)) {
+ throw new SOAPProcessingException(
+ "Expecting SOAP 1.2 implementation of SOAP Fault Sub Code. But received some other implementation");
+ }
+ super.setSubCode(subCode);
+ }
+
+ public void setValue(SOAPFaultValue soapFaultSubCodeValue) throws SOAPProcessingException {
+ if (!(soapFaultSubCodeValue instanceof SOAP12FaultValueImpl)) {
+ throw new SOAPProcessingException(
+ "Expecting SOAP 1.2 implementation of SOAP Fault Value. But received some other implementation");
+ }
+ super.setValue(soapFaultSubCodeValue);
+ }
+}