You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ch...@apache.org on 2005/06/20 19:59:00 UTC
svn commit: r191524 [3/4] - in /webservices/axis/trunk/java/modules:
core/src/org/apache/axis/clientapi/ core/src/org/apache/axis/engine/
core/src/org/apache/axis/transport/http/ core/test/org/apache/axis/engine/
core/test/org/apache/axis/handlers/addr...
Modified: webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/factory/SOAPLinkedListImplFactory.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/factory/SOAPLinkedListImplFactory.java?rev=191524&r1=191523&r2=191524&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/factory/SOAPLinkedListImplFactory.java (original)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/factory/SOAPLinkedListImplFactory.java Mon Jun 20 10:58:56 2005
@@ -7,8 +7,6 @@
import org.apache.axis.om.impl.llom.factory.OMLinkedListImplFactory;
import org.apache.axis.soap.*;
import org.apache.axis.soap.impl.llom.*;
-import org.apache.axis.soap.impl.llom.SOAPConstants;
-import org.apache.axis.soap.impl.llom.soap11.SOAP11Constants;
/**
* Copyright 2001-2004 The Apache Software Foundation.
@@ -31,144 +29,146 @@
* Eran Chinthaka (chinthaka@apache.org)
*/
- /**
- * Method createSOAPBody
- *
- * @param envelope
- * @return
- */
- public SOAPBody createSOAPBody(SOAPEnvelope envelope) {
- SOAPBody soapBody = new SOAPBodyImpl(envelope);
- return soapBody;
+
+ public SOAPEnvelope createSOAPEnvelope(OMXMLParserWrapper builder){
+ return new SOAPEnvelopeImpl(builder);
}
- /**
- * Method createSOAPBody
- *
- * @param envelope
- * @param builder
- * @return
- */
- public SOAPBody createSOAPBody(SOAPEnvelope envelope,
- OMXMLParserWrapper builder) {
- return new SOAPBodyImpl(envelope, builder);
+ public SOAPEnvelope createSOAPEnvelope() {
+ throw new UnsupportedOperationException();
}
- /**
- * Method createSOAPEnvelope
- *
- * @param ns
- * @param builder
- * @return
- */
- public SOAPEnvelope createSOAPEnvelope(OMNamespace ns,
- OMXMLParserWrapper builder) {
- return new SOAPEnvelopeImpl(ns, builder);
+ public SOAPHeader createSOAPHeader(SOAPEnvelope envelope) throws SOAPProcessingException {
+ throw new UnsupportedOperationException();
}
- public SOAPEnvelope createSOAPEnvelope() {
- return null; //To change body of implemented methods use File | Settings | File Templates.
+ public SOAPHeader createSOAPHeader(SOAPEnvelope envelope, OMXMLParserWrapper builder) {
+ throw new UnsupportedOperationException();
+
}
- /**
- * Method createSOAPEnvelope
- *
- * @param ns
- * @return
- */
- public SOAPEnvelope createSOAPEnvelope(OMNamespace ns) {
- return new SOAPEnvelopeImpl(ns);
+ public SOAPHeaderBlock createSOAPHeaderBlock(String localName, OMNamespace ns, SOAPHeader parent) throws SOAPProcessingException {
+ throw new UnsupportedOperationException();
+
}
- /**
- * Method createSOAPHeader
- *
- * @param envelope
- * @return
- */
- public SOAPHeader createSOAPHeader(SOAPEnvelope envelope) {
- return new SOAPHeaderImpl(envelope);
+ public SOAPHeaderBlock createSOAPHeaderBlock(String localName, OMNamespace ns, SOAPHeader parent, OMXMLParserWrapper builder) throws SOAPProcessingException {
+ throw new UnsupportedOperationException();
+
}
- /**
- * Method createSOAPHeader
- *
- * @param envelope
- * @param builder
- * @return
- */
- public SOAPHeader createSOAPHeader(SOAPEnvelope envelope,
- OMXMLParserWrapper builder) {
- return new SOAPHeaderImpl(envelope, builder);
+
+ public SOAPFault createSOAPFault(SOAPBody parent, Exception e) throws SOAPProcessingException {
+ throw new UnsupportedOperationException();
}
- /**
- * Method createSOAPHeaderBlock
- *
- * @param localName
- * @param ns
- * @return
- */
- public SOAPHeaderBlock createSOAPHeaderBlock(String localName,
- OMNamespace ns) {
- return new SOAPHeaderBlockImpl(localName, ns);
+ public SOAPFault createSOAPFault(SOAPBody parent) throws SOAPProcessingException {
+ throw new UnsupportedOperationException();
}
- /**
- * Method createSOAPHeaderBlock
- *
- * @param localName
- * @param ns
- * @param parent
- * @param builder
- * @return
- */
- public SOAPHeaderBlock createSOAPHeaderBlock(String localName,
- OMNamespace ns, OMElement parent, OMXMLParserWrapper builder) {
- return new SOAPHeaderBlockImpl(localName, ns, parent, builder);
+ public SOAPFault createSOAPFault(SOAPBody parent, OMXMLParserWrapper builder) {
+ throw new UnsupportedOperationException();
}
- /**
- * Method createSOAPFault
- *
- * @param parent
- * @param e
- * @return
- */
- public SOAPFault createSOAPFault(SOAPBody parent, Exception e) {
- return new SOAPFaultImpl(parent, e);
+ public SOAPBody createSOAPBody(SOAPEnvelope envelope) throws SOAPProcessingException {
+ throw new UnsupportedOperationException();
}
- /**
- * Method createSOAPFault
- *
- * @param ns
- * @param parent
- * @param builder
- * @return
- */
- public SOAPFault createSOAPFault(OMNamespace ns, SOAPBody parent,
- OMXMLParserWrapper builder) {
- return new SOAPFaultImpl(ns, parent, builder);
+ public SOAPBody createSOAPBody(SOAPEnvelope envelope, OMXMLParserWrapper builder) {
+ throw new UnsupportedOperationException();
+ }
+
+ public SOAPFaultCode createSOAPFaultCode(SOAPFault parent) throws SOAPProcessingException {
+ throw new UnsupportedOperationException();
+ }
+
+ public SOAPFaultCode createSOAPFaultCode(SOAPFault parent, OMXMLParserWrapper builder) {
+ throw new UnsupportedOperationException();
+ }
+
+ public SOAPFaultValue createSOAPFaultValue(SOAPFaultCode parent) throws SOAPProcessingException {
+ throw new UnsupportedOperationException();
+ }
+
+ public SOAPFaultValue createSOAPFaultValue(SOAPFaultCode parent, OMXMLParserWrapper builder) {
+ throw new UnsupportedOperationException();
+ }
+
+ //added
+ public SOAPFaultValue createSOAPFaultValue(SOAPFaultSubCode parent) throws SOAPProcessingException {
+ throw new UnsupportedOperationException();
+ }
+
+ //added
+ public SOAPFaultValue createSOAPFaultValue(SOAPFaultSubCode parent, OMXMLParserWrapper builder) {
+ throw new UnsupportedOperationException();
+ }
+
+ //changed
+ public SOAPFaultSubCode createSOAPFaultSubCode(SOAPFaultCode parent) throws SOAPProcessingException {
+ throw new UnsupportedOperationException();
+ }
+
+ //changed
+ public SOAPFaultSubCode createSOAPFaultSubCode(SOAPFaultCode parent, OMXMLParserWrapper builder) {
+ throw new UnsupportedOperationException();
+ }
+
+ public SOAPFaultSubCode createSOAPFaultSubCode(SOAPFaultSubCode parent) throws SOAPProcessingException {
+ throw new UnsupportedOperationException();
+ }
+
+ public SOAPFaultSubCode createSOAPFaultSubCode(SOAPFaultSubCode parent, OMXMLParserWrapper builder) {
+ throw new UnsupportedOperationException();
}
+ public SOAPFaultReason createSOAPFaultReason(SOAPFault parent) throws SOAPProcessingException {
+ throw new UnsupportedOperationException();
+ }
+
+ public SOAPFaultReason createSOAPFaultReason(SOAPFault parent, OMXMLParserWrapper builder) {
+ throw new UnsupportedOperationException();
+ }
+
+ public SOAPFaultText createSOAPFaultText(SOAPFaultReason parent) throws SOAPProcessingException {
+ throw new UnsupportedOperationException();
+ }
+
+ public SOAPFaultText createSOAPFaultText(SOAPFaultReason parent, OMXMLParserWrapper builder) {
+ throw new UnsupportedOperationException();
+ }
+
+ public SOAPFaultNode createSOAPFaultNode(SOAPFault parent) throws SOAPProcessingException {
+ throw new UnsupportedOperationException();
+ }
+
+ public SOAPFaultNode createSOAPFaultNode(SOAPFault parent, OMXMLParserWrapper builder) {
+ throw new UnsupportedOperationException();
+ }
+
+ public SOAPFaultRole createSOAPFaultRole(SOAPFault parent) throws SOAPProcessingException {
+ throw new UnsupportedOperationException();
+ }
+
+ public SOAPFaultRole createSOAPFaultRole(SOAPFault parent, OMXMLParserWrapper builder) {
+ throw new UnsupportedOperationException();
+ }
+
+ public SOAPFaultDetail createSOAPFaultDetail(SOAPFault parent) throws SOAPProcessingException {
+ throw new UnsupportedOperationException();
+ }
+
+ public SOAPFaultDetail createSOAPFaultDetail(SOAPFault parent, OMXMLParserWrapper builder) {
+ throw new UnsupportedOperationException();
+ }
+
+
/**
* Method getDefaultEnvelope
*
* @return
*/
- public SOAPEnvelope getDefaultEnvelope() {
- // Create an envelope
- OMNamespace ns =
- new OMNamespaceImpl(SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI,
- SOAPConstants.SOAP_DEFAULT_NAMESPACE_PREFIX);
- SOAPEnvelopeImpl env = new SOAPEnvelopeImpl(ns);
- SOAPBodyImpl bodyImpl = new SOAPBodyImpl(env);
- env.addChild(bodyImpl);
-
- SOAPHeaderImpl headerImpl = new SOAPHeaderImpl(env);
- headerImpl.setComplete(true);
- env.addChild(headerImpl);
- return env;
+ public SOAPEnvelope getDefaultEnvelope() throws SOAPProcessingException {
+ throw new UnsupportedOperationException();
}
}
Added: webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11BodyImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11BodyImpl.java?rev=191524&view=auto
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11BodyImpl.java (added)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11BodyImpl.java Mon Jun 20 10:58:56 2005
@@ -0,0 +1,52 @@
+package org.apache.axis.soap.impl.llom.soap11;
+
+import org.apache.axis.soap.impl.llom.SOAPBodyImpl;
+import org.apache.axis.soap.impl.llom.SOAPFaultImpl;
+import org.apache.axis.soap.impl.llom.SOAPProcessingException;
+import org.apache.axis.soap.SOAPEnvelope;
+import org.apache.axis.soap.SOAPFault;
+import org.apache.axis.om.OMXMLParserWrapper;
+import org.apache.axis.om.OMException;
+
+/*
+ * 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.
+ *
+ * author : Eran Chinthaka (chinthaka@apache.org)
+ */
+
+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 {
+ SOAPFault soapFault = new SOAP11FaultImpl(this, e);
+ addFault(soapFault);
+ return soapFault;
+ }
+}
Modified: webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11Constants.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11Constants.java?rev=191524&r1=191523&r2=191524&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11Constants.java (original)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11Constants.java Mon Jun 20 10:58:56 2005
@@ -23,4 +23,24 @@
* Eran Chinthaka (chinthaka@apache.org)
*/
public static final String SOAP_ENVELOPE_NAMESPACE_URI = "http://schemas.xmlsoap.org/soap/envelope/";
+
+ /**
+ * Field ATTR_ACTOR
+ */
+ public static final String ATTR_ACTOR = "actor";
+
+ /**
+ * Field SOAP_FAULT_CODE_LOCAL_NAME
+ */
+ public static final String SOAP_FAULT_CODE_LOCAL_NAME = "faultcode";
+ /**
+ * Field SOAP_FAULT_STRING_LOCAL_NAME
+ */
+ public static final String SOAP_FAULT_STRING_LOCAL_NAME = "faultstring";
+ /**
+ * Field SOAP_FAULT_ACTOR_LOCAL_NAME
+ */
+ public static final String SOAP_FAULT_ACTOR_LOCAL_NAME = "faultactor";
+
+ public static final String SOAP_FAULT_DETAIL_LOCAL_NAME = "detail";
}
Modified: webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11Factory.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11Factory.java?rev=191524&r1=191523&r2=191524&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11Factory.java (original)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11Factory.java Mon Jun 20 10:58:56 2005
@@ -1,5 +1,12 @@
package org.apache.axis.soap.impl.llom.soap11;
+import org.apache.axis.om.impl.llom.OMNamespaceImpl;
+import org.apache.axis.om.OMXMLParserWrapper;
+import org.apache.axis.om.OMNamespace;
+import org.apache.axis.om.OMElement;
+import org.apache.axis.soap.*;
+import org.apache.axis.soap.impl.llom.*;
+import org.apache.axis.soap.impl.llom.soap12.SOAP12HeaderImpl;
import org.apache.axis.soap.impl.llom.factory.SOAPLinkedListImplFactory;
/**
@@ -18,9 +25,150 @@
* the License.
* <p/>
*/
-public class SOAP11Factory extends SOAPLinkedListImplFactory{
+public class SOAP11Factory extends SOAPLinkedListImplFactory {
/**
* Eran Chinthaka (chinthaka@apache.org)
*/
+
+ public SOAPEnvelope createSOAPEnvelope() {
+ return new SOAPEnvelopeImpl(new OMNamespaceImpl(SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI, SOAPConstants.SOAP_DEFAULT_NAMESPACE_PREFIX));
+ }
+
+ 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 OMNamespaceImpl(SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI,
+ SOAPConstants.SOAP_DEFAULT_NAMESPACE_PREFIX);
+ SOAPEnvelopeImpl env = new SOAPEnvelopeImpl(ns);
+
+
+ SOAPHeaderImpl headerImpl = new SOAP11HeaderImpl(env);
+ headerImpl.setComplete(true);
+
+ SOAPBodyImpl bodyImpl = new SOAP11BodyImpl(env);
+ bodyImpl.setComplete(true);
+ return env;
+ }
+
+
}
Added: webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultCodeImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultCodeImpl.java?rev=191524&view=auto
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultCodeImpl.java (added)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultCodeImpl.java Mon Jun 20 10:58:56 2005
@@ -0,0 +1,121 @@
+package org.apache.axis.soap.impl.llom.soap11;
+
+import org.apache.axis.soap.impl.llom.SOAPFaultCodeImpl;
+import org.apache.axis.soap.impl.llom.SOAPProcessingException;
+import org.apache.axis.soap.SOAPFaultSubCode;
+import org.apache.axis.soap.SOAPFaultValue;
+import org.apache.axis.soap.SOAPFault;
+import org.apache.axis.om.*;
+import org.apache.axis.om.impl.llom.serialize.StreamWriterToContentHandlerConverter;
+import org.apache.axis.om.impl.llom.OMSerializerUtil;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamWriter;
+import javax.xml.stream.XMLStreamException;
+
+/*
+ * 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.
+ *
+ * author : Eran Chinthaka (chinthaka@apache.org)
+ */
+
+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(XMLStreamWriter writer, 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(writer));
+ }
+
+
+ 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, writer);
+ OMSerializerUtil.serializeNamespaces(this, writer);
+
+
+ String text = this.getValue().getText();
+ writer.writeCharacters(text);
+ writer.writeEndElement();
+
+ //serilize siblings
+ if (this.nextSibling != null) {
+ nextSibling.serialize(writer);
+ } else if (this.parent != null) {
+ if (!this.parent.isComplete()) {
+ builder.setCache(cache);
+ builder.next();
+ }
+ }
+
+ }
+
+ public String getLocalName() {
+ return SOAP11Constants.SOAP_FAULT_CODE_LOCAL_NAME;
+ }
+}
Added: webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultDetailImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultDetailImpl.java?rev=191524&view=auto
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultDetailImpl.java (added)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultDetailImpl.java Mon Jun 20 10:58:56 2005
@@ -0,0 +1,102 @@
+package org.apache.axis.soap.impl.llom.soap11;
+
+import org.apache.axis.soap.SOAPFaultDetail;
+import org.apache.axis.soap.SOAPFault;
+import org.apache.axis.soap.impl.llom.SOAPFaultDetailImpl;
+import org.apache.axis.soap.impl.llom.SOAPProcessingException;
+import org.apache.axis.om.impl.llom.OMElementImpl;
+import org.apache.axis.om.impl.llom.OMSerializerUtil;
+import org.apache.axis.om.impl.llom.serialize.StreamWriterToContentHandlerConverter;
+import org.apache.axis.om.*;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamWriter;
+import javax.xml.stream.XMLStreamException;
+import java.util.Iterator;
+
+/*
+ * 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.
+ *
+ * author : Eran Chinthaka (chinthaka@apache.org)
+ */
+
+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 addDetailEntry(OMElement detailElement) {
+ throw new UnsupportedOperationException();
+ }
+
+ public Iterator getAllDetailEntries() {
+ throw new UnsupportedOperationException();
+ }
+
+ protected void serialize(XMLStreamWriter writer, 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(writer));
+ }
+
+ 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, writer);
+ OMSerializerUtil.serializeNamespaces(this, writer);
+
+
+ String text = this.getText();
+ writer.writeCharacters(text);
+
+
+ if (firstChild != null) {
+ firstChild.serialize(writer);
+ }
+ writer.writeEndElement();
+
+ //serilize siblings
+ if (this.nextSibling != null) {
+ nextSibling.serialize(writer);
+ }
+
+ }
+
+ public String getLocalName() {
+ return SOAP11Constants.SOAP_FAULT_DETAIL_LOCAL_NAME;
+ }
+
+}
Added: webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultImpl.java?rev=191524&view=auto
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultImpl.java (added)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultImpl.java Mon Jun 20 10:58:56 2005
@@ -0,0 +1,170 @@
+package org.apache.axis.soap.impl.llom.soap11;
+
+import org.apache.axis.om.*;
+import org.apache.axis.om.impl.llom.OMElementImpl;
+import org.apache.axis.om.impl.llom.OMTextImpl;
+import org.apache.axis.soap.impl.llom.*;
+import org.apache.axis.soap.impl.llom.soap12.SOAP12Constants;
+import org.apache.axis.soap.impl.llom.soap12.SOAP12FaultCodeImpl;
+import org.apache.axis.soap.*;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamWriter;
+import javax.xml.stream.XMLOutputFactory;
+import javax.xml.stream.XMLStreamException;
+import java.io.StringWriter;
+import java.io.PrintWriter;
+import java.util.Iterator;
+
+
+/**
+ * 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 SOAP11FaultImpl extends SOAPFaultImpl {
+ /**
+ * Eran Chinthaka (chinthaka@apache.org)
+ */
+
+ 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 serializeWithCache(XMLStreamWriter writer) throws XMLStreamException {
+ super.serializeWithCache(writer);
+ }
+
+ public void serialize(XMLStreamWriter writer) throws XMLStreamException {
+ super.serialize(writer);
+ }
+
+// /**
+// * Method getException
+// *
+// * @return
+// * @throws OMException
+// */
+// public Exception getException() throws OMException {
+// getDetail();
+// if (faultDetail == null) {
+// return null;
+// }
+//
+// OMElement exceptionElement = faultDetail.getFirstChildWithName(new QName(SOAPConstants.SOAP_FAULT_DETAIL_EXCEPTION_ENTRY));
+// if(exceptionElement != null){
+// return new Exception(exceptionElement.getText());
+// }
+// return null;
+// }
+//
+// protected void putExceptionToSOAPFault(Exception e) {
+// StringWriter sw = new StringWriter();
+// e.printStackTrace(new PrintWriter(sw));
+// getDetail();
+// if (faultDetail == null) {
+// faultDetail = new SOAP11FaultDetailImpl(this);
+//
+// }
+// OMElement faultDetailEnty = new OMElementImpl(SOAPConstants.SOAP_FAULT_DETAIL_EXCEPTION_ENTRY, this.getNamespace());
+// faultDetailEnty.setText(sw.getBuffer().toString());
+// faultDetail.addChild(faultDetailEnty);
+// }
+//
+// /**
+// * Equivalent for FaultCode in SOAP 1.1 is faultCode.
+// * So creating faultCode element and putting the value as SOAPFaultCode.SOAPFaultCodeValue.value
+// *
+// * @param soapFaultCode
+// * @throws SOAPProcessingException
+// */
+ 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 SOAPFaultCode getCode() {
+// if (faultCode == null) {
+// faultCode = (SOAPFaultCode) getChildWithName(SOAP11Constants.SOAP_FAULT_CODE_LOCAL_NAME);
+// }
+// return faultCode;
+// }
+//
+ 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 SOAPFaultReason getReason() {
+// if (faultReason == null) {
+// faultReason = (SOAPFaultReason) getChildWithName(SOAP11Constants.SOAP_FAULT_STRING_LOCAL_NAME);
+// }
+// return faultReason;
+// }
+//
+ 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 SOAPFaultNode getNode() {
+// throw new UnsupportedOperationException();
+// }
+//
+ 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);
+ }
+
+ public SOAPFaultDetail getDetail() {
+ if (faultDetail == null || faultDetail.getParent() != this) {
+ faultDetail = (SOAPFaultDetail) this.getChildWithName(SOAP11Constants.SOAP_FAULT_DETAIL_LOCAL_NAME);
+ }
+ return faultDetail;
+ }
+
+ 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");
+ }
+ }
+
+}
Added: webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultNodeImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultNodeImpl.java?rev=191524&view=auto
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultNodeImpl.java (added)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultNodeImpl.java Mon Jun 20 10:58:56 2005
@@ -0,0 +1,46 @@
+package org.apache.axis.soap.impl.llom.soap11;
+
+import org.apache.axis.soap.impl.llom.SOAPFaultNodeImpl;
+import org.apache.axis.soap.impl.llom.SOAPProcessingException;
+import org.apache.axis.soap.SOAPFault;
+import org.apache.axis.om.OMNamespace;
+import org.apache.axis.om.OMElement;
+import org.apache.axis.om.OMXMLParserWrapper;
+import org.apache.axis.om.OMException;
+
+import javax.xml.namespace.QName;
+
+/*
+ * 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.
+ *
+ * author : Eran Chinthaka (chinthaka@apache.org)
+ */
+
+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/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultReasonImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultReasonImpl.java?rev=191524&view=auto
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultReasonImpl.java (added)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultReasonImpl.java Mon Jun 20 10:58:56 2005
@@ -0,0 +1,103 @@
+package org.apache.axis.soap.impl.llom.soap11;
+
+import org.apache.axis.om.OMElement;
+import org.apache.axis.om.OMXMLParserWrapper;
+import org.apache.axis.om.impl.llom.serialize.StreamWriterToContentHandlerConverter;
+import org.apache.axis.om.impl.llom.OMSerializerUtil;
+import org.apache.axis.soap.impl.llom.SOAPFaultReasonImpl;
+import org.apache.axis.soap.impl.llom.SOAPProcessingException;
+import org.apache.axis.soap.SOAPFaultText;
+import org.apache.axis.soap.SOAPFault;
+
+import javax.xml.stream.XMLStreamWriter;
+import javax.xml.stream.XMLStreamException;
+
+/**
+ * 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 SOAP11FaultReasonImpl extends SOAPFaultReasonImpl {
+ /**
+ * Eran Chinthaka (chinthaka@apache.org)
+ */
+
+ 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(XMLStreamWriter writer, 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(writer));
+ }
+
+
+ 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, writer);
+ OMSerializerUtil.serializeNamespaces(this, writer);
+
+ String text = this.getSOAPText().getText();
+ writer.writeCharacters(text);
+ writer.writeEndElement();
+
+ //serilize siblings
+ if (this.nextSibling != null) {
+ nextSibling.serialize(writer);
+ } else if (this.parent != null) {
+ if (!this.parent.isComplete()) {
+ builder.setCache(cache);
+ builder.next();
+ }
+ }
+
+ }
+
+ public String getLocalName() {
+ return SOAP11Constants.SOAP_FAULT_STRING_LOCAL_NAME;
+ }
+}
Added: webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultRoleImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultRoleImpl.java?rev=191524&view=auto
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultRoleImpl.java (added)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultRoleImpl.java Mon Jun 20 10:58:56 2005
@@ -0,0 +1,93 @@
+package org.apache.axis.soap.impl.llom.soap11;
+
+import org.apache.axis.soap.impl.llom.SOAPFaultRoleImpl;
+import org.apache.axis.soap.impl.llom.SOAPProcessingException;
+import org.apache.axis.soap.SOAPFault;
+import org.apache.axis.om.OMElement;
+import org.apache.axis.om.OMNamespace;
+import org.apache.axis.om.OMException;
+import org.apache.axis.om.OMXMLParserWrapper;
+import org.apache.axis.om.impl.llom.serialize.StreamWriterToContentHandlerConverter;
+import org.apache.axis.om.impl.llom.OMSerializerUtil;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamWriter;
+import javax.xml.stream.XMLStreamException;
+
+/*
+ * 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.
+ *
+ * author : Eran Chinthaka (chinthaka@apache.org)
+ */
+
+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(XMLStreamWriter writer, 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(writer));
+ }
+
+
+ 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, writer);
+ OMSerializerUtil.serializeNamespaces(this, writer);
+
+ String text = this.getText();
+ writer.writeCharacters(text);
+ writer.writeEndElement();
+
+ //serilize siblings
+ if (this.nextSibling != null) {
+ nextSibling.serialize(writer);
+ } else if (this.parent != null) {
+ if (!this.parent.isComplete()) {
+ builder.setCache(cache);
+ builder.next();
+ }
+ }
+
+ }
+
+ public String getLocalName() {
+ return SOAP11Constants.SOAP_FAULT_ACTOR_LOCAL_NAME;
+ }
+}
Added: webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultSubCodeImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultSubCodeImpl.java?rev=191524&view=auto
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultSubCodeImpl.java (added)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultSubCodeImpl.java Mon Jun 20 10:58:56 2005
@@ -0,0 +1,75 @@
+package org.apache.axis.soap.impl.llom.soap11;
+
+import org.apache.axis.soap.SOAPFaultSubCode;
+import org.apache.axis.soap.SOAPFaultCode;
+import org.apache.axis.soap.SOAPFaultValue;
+import org.apache.axis.soap.impl.llom.SOAPFaultSubCodeImpl;
+import org.apache.axis.soap.impl.llom.SOAPProcessingException;
+import org.apache.axis.soap.impl.llom.soap12.SOAP12FaultSubCodeImpl;
+import org.apache.axis.soap.impl.llom.soap12.SOAP12Constants;
+import org.apache.axis.om.OMNamespace;
+import org.apache.axis.om.OMElement;
+import org.apache.axis.om.OMXMLParserWrapper;
+import org.apache.axis.om.OMException;
+
+import javax.xml.namespace.QName;
+
+/*
+ * 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.
+ *
+ * author : Eran Chinthaka (chinthaka@apache.org)
+ */
+
+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 (!(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 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/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultTextImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultTextImpl.java?rev=191524&view=auto
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultTextImpl.java (added)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultTextImpl.java Mon Jun 20 10:58:56 2005
@@ -0,0 +1,41 @@
+package org.apache.axis.soap.impl.llom.soap11;
+
+import org.apache.axis.soap.impl.llom.SOAPFaultTextImpl;
+import org.apache.axis.soap.impl.llom.SOAPProcessingException;
+import org.apache.axis.soap.SOAPFaultReason;
+import org.apache.axis.om.OMElement;
+import org.apache.axis.om.OMXMLParserWrapper;
+
+/*
+ * 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.
+ *
+ * author : Eran Chinthaka (chinthaka@apache.org)
+ */
+
+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/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultValueImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultValueImpl.java?rev=191524&view=auto
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultValueImpl.java (added)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultValueImpl.java Mon Jun 20 10:58:56 2005
@@ -0,0 +1,45 @@
+package org.apache.axis.soap.impl.llom.soap11;
+
+import org.apache.axis.soap.impl.llom.SOAPProcessingException;
+import org.apache.axis.soap.impl.llom.SOAPFaultValueImpl;
+import org.apache.axis.om.OMNamespace;
+import org.apache.axis.om.OMElement;
+import org.apache.axis.om.OMXMLParserWrapper;
+import org.apache.axis.om.OMException;
+
+import javax.xml.namespace.QName;
+
+/*
+ * 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.
+ *
+ * author : Eran Chinthaka (chinthaka@apache.org)
+ */
+
+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/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11HeaderBlockImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11HeaderBlockImpl.java?rev=191524&view=auto
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11HeaderBlockImpl.java (added)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11HeaderBlockImpl.java Mon Jun 20 10:58:56 2005
@@ -0,0 +1,98 @@
+package org.apache.axis.soap.impl.llom.soap11;
+
+import org.apache.axis.om.OMElement;
+import org.apache.axis.om.OMNamespace;
+import org.apache.axis.om.OMXMLParserWrapper;
+import org.apache.axis.soap.impl.llom.SOAPHeaderBlockImpl;
+import org.apache.axis.soap.impl.llom.SOAPConstants;
+import org.apache.axis.soap.impl.llom.SOAPProcessingException;
+import org.apache.axis.soap.impl.llom.soap12.SOAP12Constants;
+import org.apache.axis.soap.SOAPHeader;
+
+/**
+ * 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/>
+ *
+ * Eran Chinthaka (chinthaka@apache.org)
+ *
+ */
+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() {
+ String mustUnderstand = "";
+ if ((mustUnderstand = getAttribute(SOAPConstants.ATTR_MUSTUNDERSTAND, SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI))
+ != null) {
+ return SOAPConstants.ATTR_MUSTUNDERSTAND_TRUE.equalsIgnoreCase(mustUnderstand) || SOAPConstants.ATTR_MUSTUNDERSTAND_1.equalsIgnoreCase(mustUnderstand) ;
+ }
+ return false;
+
+ }
+}
Added: webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11HeaderImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11HeaderImpl.java?rev=191524&view=auto
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11HeaderImpl.java (added)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11HeaderImpl.java Mon Jun 20 10:58:56 2005
@@ -0,0 +1,84 @@
+package org.apache.axis.soap.impl.llom.soap11;
+
+import org.apache.axis.om.OMXMLParserWrapper;
+import org.apache.axis.om.OMNamespace;
+import org.apache.axis.om.OMException;
+import org.apache.axis.om.OMElement;
+import org.apache.axis.om.impl.llom.traverse.OMChildrenWithSpecificAttributeIterator;
+import org.apache.axis.soap.SOAPEnvelope;
+import org.apache.axis.soap.SOAPHeaderBlock;
+import org.apache.axis.soap.impl.llom.SOAPHeaderImpl;
+import org.apache.axis.soap.impl.llom.SOAPProcessingException;
+
+import javax.xml.namespace.QName;
+import java.util.Iterator;
+
+/**
+ * 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 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);
+ }
+ soapHeaderBlock.setComplete(true);
+ return soapHeaderBlock;
+ }
+
+ public Iterator extractHeaderBlocks(String role) {
+ return new OMChildrenWithSpecificAttributeIterator(getFirstChild(),
+ new QName(SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI,
+ SOAP11Constants.ATTR_ACTOR),
+ role,
+ true);
+
+ }
+
+ public Iterator examineMustUnderstandHeaderBlocks(String actor) {
+ throw new UnsupportedOperationException();
+ }
+
+
+}
Added: webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap12/SOAP12BodyImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap12/SOAP12BodyImpl.java?rev=191524&view=auto
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap12/SOAP12BodyImpl.java (added)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap12/SOAP12BodyImpl.java Mon Jun 20 10:58:56 2005
@@ -0,0 +1,52 @@
+package org.apache.axis.soap.impl.llom.soap12;
+
+import org.apache.axis.soap.impl.llom.SOAPBodyImpl;
+import org.apache.axis.soap.impl.llom.SOAPFaultImpl;
+import org.apache.axis.soap.impl.llom.SOAPProcessingException;
+import org.apache.axis.soap.SOAPFault;
+import org.apache.axis.soap.SOAPEnvelope;
+import org.apache.axis.om.OMException;
+import org.apache.axis.om.OMXMLParserWrapper;
+
+/*
+ * 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.
+ *
+ * author : Eran Chinthaka (chinthaka@apache.org)
+ */
+
+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;
+ }
+}
Modified: webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap12/SOAP12Constants.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap12/SOAP12Constants.java?rev=191524&r1=191523&r2=191524&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap12/SOAP12Constants.java (original)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap12/SOAP12Constants.java Mon Jun 20 10:58:56 2005
@@ -54,4 +54,7 @@
// SOAP Fault Detail
public static final String SOAP_FAULT_DETAIL_LOCAL_NAME = "Detail";
+
+ // SOAP Fault Role
+ public static final String SOAP_FAULT_ROLE_LOCAL_NAME = "Role";
}
Modified: webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap12/SOAP12Factory.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap12/SOAP12Factory.java?rev=191524&r1=191523&r2=191524&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap12/SOAP12Factory.java (original)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap12/SOAP12Factory.java Mon Jun 20 10:58:56 2005
@@ -1,5 +1,13 @@
package org.apache.axis.soap.impl.llom.soap12;
+import org.apache.axis.om.OMNamespace;
+import org.apache.axis.om.OMXMLParserWrapper;
+import org.apache.axis.om.OMElement;
+import org.apache.axis.om.impl.llom.OMNamespaceImpl;
+import org.apache.axis.soap.*;
+import org.apache.axis.soap.impl.llom.*;
+import org.apache.axis.soap.impl.llom.soap11.SOAP11Constants;
+import org.apache.axis.soap.impl.llom.soap11.SOAP11HeaderImpl;
import org.apache.axis.soap.impl.llom.factory.SOAPLinkedListImplFactory;
/**
@@ -18,8 +26,147 @@
* the License.
* <p/>
*/
-public class SOAP12Factory extends SOAPLinkedListImplFactory{
+public class SOAP12Factory extends SOAPLinkedListImplFactory {
/**
* Eran Chinthaka (chinthaka@apache.org)
*/
+
+ public SOAPEnvelope createSOAPEnvelope() {
+ return new SOAPEnvelopeImpl(new OMNamespaceImpl(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI, SOAPConstants.SOAP_DEFAULT_NAMESPACE_PREFIX));
+ }
+
+ 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 OMNamespaceImpl(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI,
+ SOAPConstants.SOAP_DEFAULT_NAMESPACE_PREFIX);
+ SOAPEnvelopeImpl env = new SOAPEnvelopeImpl(ns);
+ SOAPBodyImpl bodyImpl = new SOAP12BodyImpl(env);
+ env.addChild(bodyImpl);
+
+ SOAPHeaderImpl headerImpl = new SOAP12HeaderImpl(env);
+ headerImpl.setComplete(true);
+ env.addChild(headerImpl);
+ return env;
+ }
+
}
Added: webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap12/SOAP12FaultCodeImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap12/SOAP12FaultCodeImpl.java?rev=191524&view=auto
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap12/SOAP12FaultCodeImpl.java (added)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap12/SOAP12FaultCodeImpl.java Mon Jun 20 10:58:56 2005
@@ -0,0 +1,78 @@
+package org.apache.axis.soap.impl.llom.soap12;
+
+import org.apache.axis.soap.impl.llom.SOAPFaultCodeImpl;
+import org.apache.axis.soap.impl.llom.SOAPProcessingException;
+import org.apache.axis.soap.impl.llom.soap11.SOAP11FaultSubCodeImpl;
+import org.apache.axis.soap.impl.llom.soap11.SOAP11BodyImpl;
+import org.apache.axis.soap.SOAPFaultSubCode;
+import org.apache.axis.soap.SOAPFault;
+import org.apache.axis.soap.SOAPFaultValue;
+import org.apache.axis.om.OMNamespace;
+import org.apache.axis.om.OMElement;
+import org.apache.axis.om.OMXMLParserWrapper;
+import org.apache.axis.om.OMException;
+
+import javax.xml.namespace.QName;
+
+/**
+ * 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 SOAP12FaultCodeImpl extends SOAPFaultCodeImpl{
+ /**
+ * Eran Chinthaka (chinthaka@apache.org)
+ */
+ /**
+ * 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/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap12/SOAP12FaultDetailImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap12/SOAP12FaultDetailImpl.java?rev=191524&view=auto
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap12/SOAP12FaultDetailImpl.java (added)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap12/SOAP12FaultDetailImpl.java Mon Jun 20 10:58:56 2005
@@ -0,0 +1,45 @@
+package org.apache.axis.soap.impl.llom.soap12;
+
+import org.apache.axis.soap.impl.llom.SOAPFaultDetailImpl;
+import org.apache.axis.soap.impl.llom.SOAPProcessingException;
+import org.apache.axis.soap.SOAPFault;
+import org.apache.axis.om.OMNamespace;
+import org.apache.axis.om.OMElement;
+import org.apache.axis.om.OMXMLParserWrapper;
+import org.apache.axis.om.OMException;
+
+import javax.xml.namespace.QName;
+
+/*
+ * 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.
+ *
+ * author : Eran Chinthaka (chinthaka@apache.org)
+ */
+
+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/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap12/SOAP12FaultImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap12/SOAP12FaultImpl.java?rev=191524&view=auto
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap12/SOAP12FaultImpl.java (added)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap12/SOAP12FaultImpl.java Mon Jun 20 10:58:56 2005
@@ -0,0 +1,105 @@
+package org.apache.axis.soap.impl.llom.soap12;
+
+import org.apache.axis.om.OMElement;
+import org.apache.axis.om.OMException;
+import org.apache.axis.om.OMXMLParserWrapper;
+import org.apache.axis.soap.*;
+import org.apache.axis.soap.impl.llom.SOAPFaultImpl;
+import org.apache.axis.soap.impl.llom.SOAPProcessingException;
+import org.apache.axis.soap.impl.llom.soap11.SOAP11BodyImpl;
+
+
+/**
+ * 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 SOAP12FaultImpl extends SOAPFaultImpl {
+ /**
+ * Eran Chinthaka (chinthaka@apache.org)
+ */
+
+ 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);
+ }
+
+ public SOAPFaultDetail getDetail() {
+ if (faultDetail == null || faultDetail.getParent() != this) {
+ faultDetail = (SOAPFaultDetail) this.getChildWithName(SOAP12Constants.SOAP_FAULT_DETAIL_LOCAL_NAME);
+ }
+ return faultDetail;
+ }
+
+
+ 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");
+ }
+ }
+}
Added: webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap12/SOAP12FaultNodeImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap12/SOAP12FaultNodeImpl.java?rev=191524&view=auto
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap12/SOAP12FaultNodeImpl.java (added)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap12/SOAP12FaultNodeImpl.java Mon Jun 20 10:58:56 2005
@@ -0,0 +1,45 @@
+package org.apache.axis.soap.impl.llom.soap12;
+
+import org.apache.axis.soap.impl.llom.SOAPFaultNodeImpl;
+import org.apache.axis.soap.impl.llom.SOAPProcessingException;
+import org.apache.axis.soap.SOAPFault;
+import org.apache.axis.om.OMNamespace;
+import org.apache.axis.om.OMElement;
+import org.apache.axis.om.OMXMLParserWrapper;
+import org.apache.axis.om.OMException;
+
+import javax.xml.namespace.QName;
+
+/*
+ * 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.
+ *
+ * author : Eran Chinthaka (chinthaka@apache.org)
+ */
+
+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");
+ }
+ }
+}