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 [1/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...
Author: chinthaka
Date: Mon Jun 20 10:58:56 2005
New Revision: 191524
URL: http://svn.apache.org/viewcvs?rev=191524&view=rev
Log:
Committing SOAP 1.2 stuff
Added:
webservices/axis/trunk/java/modules/core/test/org/apache/axis/handlers/addressing/
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/SOAPFaultText.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/SOAPFaultValue.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/SOAPElement.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/SOAPFaultCodeImpl.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/SOAPFaultDetailImpl.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/SOAPFaultNodeImpl.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/SOAPFaultReasonImpl.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/SOAPFaultRoleImpl.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/SOAPFaultSubCodeImpl.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/SOAPFaultTextImpl.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/SOAPFaultValueImpl.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/SOAPProcessingException.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/builder/SOAP11BuilderHelper.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/builder/SOAP12BuilderHelper.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/builder/SOAPBuilderHelper.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11BodyImpl.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultCodeImpl.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultDetailImpl.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultImpl.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultNodeImpl.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultReasonImpl.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultRoleImpl.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultSubCodeImpl.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultTextImpl.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultValueImpl.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11HeaderBlockImpl.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11HeaderImpl.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap12/SOAP12BodyImpl.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap12/SOAP12FaultCodeImpl.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap12/SOAP12FaultDetailImpl.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap12/SOAP12FaultImpl.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap12/SOAP12FaultNodeImpl.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap12/SOAP12FaultReasonImpl.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap12/SOAP12FaultRoleImpl.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap12/SOAP12FaultSubCodeImpl.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap12/SOAP12FaultTextImpl.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap12/SOAP12FaultValueImpl.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap12/SOAP12HeaderBlockImpl.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap12/SOAP12HeaderImpl.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/util/
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/util/UtilProvider.java
webservices/axis/trunk/java/modules/xml/test-resources/soap/soap11fault.xml
webservices/axis/trunk/java/modules/xml/test/org/apache/axis/soap/
webservices/axis/trunk/java/modules/xml/test/org/apache/axis/soap/impl/
webservices/axis/trunk/java/modules/xml/test/org/apache/axis/soap/impl/llom/
webservices/axis/trunk/java/modules/xml/test/org/apache/axis/soap/impl/llom/builder/
webservices/axis/trunk/java/modules/xml/test/org/apache/axis/soap/impl/llom/builder/StAXSOAPModelBuilderTest.java
webservices/axis/trunk/java/modules/xml/test/org/apache/axis/soap/impl/llom/soap11/
webservices/axis/trunk/java/modules/xml/test/org/apache/axis/soap/impl/llom/soap11/SOAP11SerialiserTest.java
webservices/axis/trunk/java/modules/xml/test/org/apache/axis/soap/impl/llom/soap12/
webservices/axis/trunk/java/modules/xml/test/org/apache/axis/soap/impl/llom/util/
Removed:
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/SOAPFaultCodeValue.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/SOAPFaultSubCodeValue.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/SOAPText.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/SOAPFaulReasonImpl.java
Modified:
webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/MEPClient.java
webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/Stub.java
webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisEngine.java
webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/AxisServlet.java
webservices/axis/trunk/java/modules/core/test/org/apache/axis/engine/MessageContextTest.java
webservices/axis/trunk/java/modules/saaj/src/org/apache/axis/saaj/SOAPEnvelopeImpl.java
webservices/axis/trunk/java/modules/saaj/test/org/apache/axis/saaj/SOAPBodyTest.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/FactoryFinder.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/OMElement.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/OMElementImpl.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/OMNodeImpl.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/OMSerializerUtil.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/exception/OMBuilderException.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/SOAPFactory.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/SOAPFault.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/SOAPFaultCode.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/SOAPFaultReason.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/SOAPFaultSubCode.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/SOAPHeaderBlock.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/SOAPBodyImpl.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/SOAPConstants.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/SOAPEnvelopeImpl.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/SOAPFaultImpl.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/SOAPHeaderBlockImpl.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/SOAPHeaderImpl.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/SOAPTextImpl.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/builder/StAXSOAPModelBuilder.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/factory/SOAPLinkedListImplFactory.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11Constants.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11Factory.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap12/SOAP12Constants.java
webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap12/SOAP12Factory.java
webservices/axis/trunk/java/modules/xml/test/org/apache/axis/om/CompareOMWithDOMTest.java
webservices/axis/trunk/java/modules/xml/test/org/apache/axis/om/OMBodyTest.java
webservices/axis/trunk/java/modules/xml/test/org/apache/axis/om/OMEnvelopeTest.java
webservices/axis/trunk/java/modules/xml/test/org/apache/axis/om/OMTestUtils.java
webservices/axis/trunk/java/modules/xml/test/org/apache/axis/om/factory/OMLinkedListImplFactoryTest.java
Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/MEPClient.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/MEPClient.java?rev=191524&r1=191523&r2=191524&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/MEPClient.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/MEPClient.java Mon Jun 20 10:58:56 2005
@@ -30,6 +30,7 @@
import org.apache.axis.om.OMElement;
import org.apache.axis.soap.SOAPEnvelope;
import org.apache.axis.soap.SOAPFactory;
+import org.apache.axis.soap.impl.llom.SOAPProcessingException;
/**
* This is the Super Class for all the MEPClients, All the MEPClient will extend this.
@@ -67,7 +68,11 @@
SOAPEnvelope envelope = null;
SOAPFactory omfac = OMAbstractFactory.getSOAP11Factory();
- envelope = omfac.getDefaultEnvelope();
+ try {
+ envelope = omfac.getDefaultEnvelope();
+ } catch (SOAPProcessingException e) {
+ throw new AxisFault(e);
+ }
envelope.getBody().addChild(toSend);
msgctx.setEnvelope(envelope);
return msgctx;
Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/Stub.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/Stub.java?rev=191524&r1=191523&r2=191524&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/Stub.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/Stub.java Mon Jun 20 10:58:56 2005
@@ -30,6 +30,7 @@
import org.apache.axis.soap.SOAPEnvelope;
import org.apache.axis.soap.SOAPBody;
import org.apache.axis.soap.SOAPFactory;
+import org.apache.axis.soap.impl.llom.SOAPProcessingException;
import org.apache.wsdl.WSDLService;
@@ -103,7 +104,7 @@
}
//todo make this compliant with the SOAP12
- protected SOAPEnvelope createEnvelope(){
+ protected SOAPEnvelope createEnvelope() throws SOAPProcessingException {
SOAPEnvelope env = getFactory().getDefaultEnvelope();
return env;
}
Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisEngine.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisEngine.java?rev=191524&r1=191523&r2=191524&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisEngine.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisEngine.java Mon Jun 20 10:58:56 2005
@@ -23,6 +23,7 @@
import org.apache.axis.om.OMAbstractFactory;
import org.apache.axis.soap.SOAPBody;
import org.apache.axis.soap.SOAPEnvelope;
+import org.apache.axis.soap.impl.llom.SOAPProcessingException;
import org.apache.axis.transport.TransportSender;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -167,7 +168,12 @@
faultContext.setOperationContext(context.getOperationContext());
faultContext.setProcessingFault(true);
faultContext.setServerSide(true);
- SOAPEnvelope envelope = OMAbstractFactory.getSOAP11Factory().getDefaultEnvelope();
+ SOAPEnvelope envelope = null;
+ try {
+ envelope = OMAbstractFactory.getSOAP11Factory().getDefaultEnvelope();
+ } catch (SOAPProcessingException e1) {
+ throw new AxisFault(e1);
+ }
// TODO do we need to set old Headers back?
SOAPBody body = envelope.getBody();
Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/AxisServlet.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/AxisServlet.java?rev=191524&r1=191523&r2=191524&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/AxisServlet.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/AxisServlet.java Mon Jun 20 10:58:56 2005
@@ -52,6 +52,7 @@
import org.apache.axis.soap.SOAPFactory;
import org.apache.axis.soap.impl.llom.builder.StAXSOAPModelBuilder;
import org.apache.axis.soap.impl.llom.soap11.SOAP11Factory;
+import org.apache.axis.soap.impl.llom.SOAPProcessingException;
import org.apache.axis.util.Utils;
/**
@@ -228,6 +229,8 @@
} catch (XMLStreamException e) {
throw new ServletException(e);
} catch (FactoryConfigurationError e) {
+ throw new ServletException(e);
+ } catch (SOAPProcessingException e) {
throw new ServletException(e);
}
}
Modified: webservices/axis/trunk/java/modules/core/test/org/apache/axis/engine/MessageContextTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/test/org/apache/axis/engine/MessageContextTest.java?rev=191524&r1=191523&r2=191524&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/test/org/apache/axis/engine/MessageContextTest.java (original)
+++ webservices/axis/trunk/java/modules/core/test/org/apache/axis/engine/MessageContextTest.java Mon Jun 20 10:58:56 2005
@@ -22,13 +22,14 @@
import org.apache.axis.description.ServiceDescription;
import org.apache.axis.om.OMAbstractFactory;
import org.apache.axis.soap.SOAPFactory;
+import org.apache.axis.soap.impl.llom.SOAPProcessingException;
public class MessageContextTest extends AbstractTestCase {
public MessageContextTest(String testName) {
super(testName);
}
- public void testMesssageContext() throws AxisFault {
+ public void testMesssageContext() throws AxisFault, SOAPProcessingException {
AxisConfiguration er = new AxisConfigurationImpl();
ServiceDescription servicesDesc = new ServiceDescription();
er.addService(servicesDesc);
Modified: webservices/axis/trunk/java/modules/saaj/src/org/apache/axis/saaj/SOAPEnvelopeImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/saaj/src/org/apache/axis/saaj/SOAPEnvelopeImpl.java?rev=191524&r1=191523&r2=191524&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/saaj/src/org/apache/axis/saaj/SOAPEnvelopeImpl.java (original)
+++ webservices/axis/trunk/java/modules/saaj/src/org/apache/axis/saaj/SOAPEnvelopeImpl.java Mon Jun 20 10:58:56 2005
@@ -44,7 +44,7 @@
*/
public SOAPEnvelopeImpl(){
//super(omEnv);
- SOAPFactory fac = OMAbstractFactory.getDefaultSOAPFactory();
+ SOAPFactory fac = OMAbstractFactory.getSOAP11Factory();
omNode = omElement =omSOAPEnvelope = fac.getDefaultEnvelope();
}
Modified: webservices/axis/trunk/java/modules/saaj/test/org/apache/axis/saaj/SOAPBodyTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/saaj/test/org/apache/axis/saaj/SOAPBodyTest.java?rev=191524&r1=191523&r2=191524&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/saaj/test/org/apache/axis/saaj/SOAPBodyTest.java (original)
+++ webservices/axis/trunk/java/modules/saaj/test/org/apache/axis/saaj/SOAPBodyTest.java Mon Jun 20 10:58:56 2005
@@ -38,7 +38,7 @@
/**
* Method suite
- *
+ *
* @return
*/
/* public static Test suite() {
Modified: webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/FactoryFinder.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/FactoryFinder.java?rev=191524&r1=191523&r2=191524&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/FactoryFinder.java (original)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/FactoryFinder.java Mon Jun 20 10:58:56 2005
@@ -27,7 +27,7 @@
private static final String DEFAULT_SOAP11_FACTORY_CLASS_NAME =
"org.apache.axis.soap.impl.llom.soap11.SOAP11Factory";
private static final String DEFAULT_SOAP12_FACTORY_CLASS_NAME =
- "org.apache.axis.om.impl.llom.soap11.SOAP12Factory";
+ "org.apache.axis.soap.impl.llom.soap12.SOAP12Factory";
private static final String OM_FACTORY_NAME_PROPERTY = "om.factory";
private static final String SOAP11_FACTORY_NAME_PROPERTY = "soap11.factory";
Modified: webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/OMElement.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/OMElement.java?rev=191524&r1=191523&r2=191524&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/OMElement.java (original)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/OMElement.java Mon Jun 20 10:58:56 2005
@@ -54,6 +54,7 @@
*/
public OMElement getFirstChildWithName(QName elementQName) throws OMException;
+
/**
* This returns a collection of this element.
* Children can be of types OMElement, OMText.
Modified: webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/OMElementImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/OMElementImpl.java?rev=191524&r1=191523&r2=191524&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/OMElementImpl.java (original)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/OMElementImpl.java Mon Jun 20 10:58:56 2005
@@ -48,7 +48,6 @@
protected OMNode firstChild;
-
/**
* Field namespaces
*/
@@ -68,6 +67,7 @@
* Field noPrefixNamespaceCounter
*/
protected int noPrefixNamespaceCounter = 0;
+ private OMNode lastChild;
/**
* Constructor OMElementImpl
@@ -112,6 +112,15 @@
}
}
+ public OMElementImpl(String localName, OMNamespace ns, OMElement parent) {
+ super(parent);
+ this.localName = localName;
+ this.done = true;
+ if (ns != null) {
+ setNamespace(handleNamespace(ns));
+ }
+ }
+
/**
* Here it is assumed that this QName passed, at least contains the localName for this element
*
@@ -144,8 +153,7 @@
if (parent != null) {
ns = parent.getNamespace();
} else {
- throw new OMException(
- "Element can not be declared without a namespaceURI. Every Element should be namespace qualified");
+ throw new OMException("Element can not be declared without a namespaceURI. Every Element should be namespace qualified");
}
}
@@ -163,8 +171,7 @@
}
}
if (ns == null) {
- throw new OMException(
- "Element can not be declared without a namespaceURI. Every Element should be namespace qualified");
+ throw new OMException("Element can not be declared without a namespaceURI. Every Element should be namespace qualified");
}
this.setNamespace(ns);
}
@@ -235,20 +242,17 @@
* @param child
*/
private void addChild(OMNodeImpl child) {
- if ((firstChild == null) && !done) {
- builder.next();
+ if (firstChild == null) {
+ firstChild = child;
+ child.setPreviousSibling(null);
+ } else {
+ child.setPreviousSibling(lastChild);
+ lastChild.setNextSibling(child);
}
-
-
+ child.setNextSibling(null);
child.setParent(this);
+ lastChild = child;
- child.setPreviousSibling(null);
- child.setNextSibling(firstChild);
- if (firstChild != null) {
- OMNodeImpl firstChildImpl = (OMNodeImpl) firstChild;
- firstChildImpl.setPreviousSibling(child);
- }
- this.firstChild = child;
}
/**
@@ -440,8 +444,7 @@
if (ns != null) {
namespace = findNamespace(ns.getName(), ns.getPrefix());
if (namespace == null) {
- throw new OMException(
- "Given OMNamespace(" + ns.getName() + ns.getPrefix()
+ throw new OMException("Given OMNamespace(" + ns.getName() + ns.getPrefix()
+ ") for "
+ "this attribute is not declared in the scope of this element. First declare the namespace"
+ " and then use it with the attribute");
@@ -503,9 +506,9 @@
* @throws OMException
*/
public OMNode detach() throws OMException {
- if (!done){
+ if (!done) {
build();
- }else{
+ } else {
super.detach();
}
return this;
@@ -532,16 +535,16 @@
}
/**
- * @see org.apache.axis.om.OMElement#getXMLStreamReader()
* @return
+ * @see org.apache.axis.om.OMElement#getXMLStreamReader()
*/
public XMLStreamReader getXMLStreamReader() {
return getXMLStreamReader(true);
}
/**
- * @see org.apache.axis.om.OMElement#getXMLStreamReaderWithoutCaching()
* @return
+ * @see org.apache.axis.om.OMElement#getXMLStreamReaderWithoutCaching()
*/
public XMLStreamReader getXMLStreamReaderWithoutCaching() {
return getXMLStreamReader(false);
@@ -553,8 +556,7 @@
*/
private XMLStreamReader getXMLStreamReader(boolean cache) {
if ((builder == null) && !cache) {
- throw new UnsupportedOperationException(
- "This element was not created in a manner to be switched");
+ throw new UnsupportedOperationException("This element was not created in a manner to be switched");
}
return new OMStAXWrapper(builder, this, cache);
}
@@ -563,23 +565,25 @@
* Sets the text of the given element.
* caution - This method will wipe out all the text elements (and hence any
* moxed content) before setting the text
+ *
* @param text
*/
public void setText(String text) {
OMNode child = this.getFirstChild();
- while(child != null){
- if(child.getType() == OMNode.TEXT_NODE){
+ while (child != null) {
+ if (child.getType() == OMNode.TEXT_NODE) {
child.detach();
}
child = child.getNextSibling();
}
- this.addChild(OMAbstractFactory.getOMFactory().createText(this,text));
+ this.addChild(OMAbstractFactory.getOMFactory().createText(this, text));
}
/**
* select all the text children and concat them to a single string
+ *
* @return
*/
public String getText() {
@@ -587,10 +591,10 @@
OMNode child = this.getFirstChild();
OMText textNode = null;
- while(child != null){
- if(child.getType() == OMNode.TEXT_NODE){
- textNode = (OMText)child;
- if( textNode.getText() != null && !"".equals(textNode.getText().trim())){
+ while (child != null) {
+ if (child.getType() == OMNode.TEXT_NODE) {
+ textNode = (OMText) child;
+ if (textNode.getText() != null && !"".equals(textNode.getText().trim())) {
childText += textNode.getText().trim();
}
}
@@ -606,14 +610,14 @@
* @param writer
* @throws XMLStreamException
*/
- public void serializeWithCache(XMLStreamWriter writer) throws XMLStreamException {
- serialize(writer,true);
+ public void serializeWithCache(XMLStreamWriter writer) throws XMLStreamException {
+ serialize(writer, true);
}
///////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////
- private void serialize(XMLStreamWriter writer,boolean cache)throws XMLStreamException {
+ protected void serialize(XMLStreamWriter writer, boolean cache) throws XMLStreamException {
// select the builder
short builderType = PULL_TYPE_BUILDER; // default is pull type
@@ -622,42 +626,41 @@
}
if ((builderType == PUSH_TYPE_BUILDER)
&& (builder.getRegisteredContentHandler() == null)) {
- builder.registerExternalContentHandler(
- new StreamWriterToContentHandlerConverter(writer));
+ builder.registerExternalContentHandler(new StreamWriterToContentHandlerConverter(writer));
}
if (!cache) {
//No caching
- if (this.firstChild!=null){
- OMSerializerUtil.serializeStartpart(this,writer);
+ if (this.firstChild != null) {
+ OMSerializerUtil.serializeStartpart(this, writer);
firstChild.serialize(writer);
OMSerializerUtil.serializeEndpart(writer);
- }else if (!this.done){
- if (builderType==PULL_TYPE_BUILDER){
- OMSerializerUtil.serializeByPullStream(this,writer);
- }else{
- OMSerializerUtil.serializeStartpart(this,writer);
+ } else if (!this.done) {
+ if (builderType == PULL_TYPE_BUILDER) {
+ OMSerializerUtil.serializeByPullStream(this, writer);
+ } else {
+ OMSerializerUtil.serializeStartpart(this, writer);
builder.setCache(cache);
builder.next();
OMSerializerUtil.serializeEndpart(writer);
}
- }else{
- OMSerializerUtil.serializeNormal(this,writer, cache);
+ } else {
+ OMSerializerUtil.serializeNormal(this, writer, cache);
}
//serilize siblings
- if (this.nextSibling!=null){
+ if (this.nextSibling != null) {
nextSibling.serialize(writer);
- }else if (this.parent!=null){
- if (!this.parent.done){
+ } else if (this.parent != null) {
+ if (!this.parent.done) {
builder.setCache(cache);
builder.next();
}
}
- }else{
+ } else {
//Cached
- OMSerializerUtil.serializeNormal(this,writer, cache);
+ OMSerializerUtil.serializeNormal(this, writer, cache);
// serialize the siblings
OMNode nextSibling = this.getNextSibling();
if (nextSibling != null) {
@@ -674,16 +677,15 @@
* serialise without building the object structure in the memory. Misuse of this method will
* cause loss of data.So its adviced to use populateYourSelf() method, before this,
* if you want to preserve data in the stream.
+ *
* @param writer
* @throws XMLStreamException
*/
public void serialize(XMLStreamWriter writer) throws XMLStreamException {
- this. serialize(writer,false);
+ this.serialize(writer, false);
}
-
-
/**
* Method getNextNamespacePrefix
*
@@ -695,10 +697,10 @@
public OMElement getFirstElement() {
OMNode node = getFirstChild();
- while(node != null){
- if(node.getType() == OMNode.ELEMENT_NODE){
- return (OMElement)node;
- }else{
+ while (node != null) {
+ if (node.getType() == OMNode.ELEMENT_NODE) {
+ return (OMElement) node;
+ } else {
node = node.getNextSibling();
}
}
@@ -746,12 +748,12 @@
* @throws OMException
*/
public OMNamespace getNamespace() throws OMException {
- if ((ns == null) && (parent != null)) {
- ns = parent.getNamespace();
- }
- if (ns == null) {
- throw new OMException("all elements in a soap message must be namespace qualified");
- }
+// if ((ns == null) && (parent != null)) {
+// ns = parent.getNamespace();
+// }
+// if (ns == null) {
+// throw new OMException("all elements in a soap message must be namespace qualified");
+// }
return ns;
}
@@ -773,7 +775,7 @@
if (ns != null) {
qName = new QName(ns.getName(), localName, ns.getPrefix());
- }else{
+ } else {
qName = new QName(localName);
}
return qName;
@@ -781,12 +783,13 @@
/**
* Discard implementation for
+ *
* @throws OMException
*/
public void discard() throws OMException {
- if (done){
+ if (done) {
this.detach();
- }else{
+ } else {
builder.discard(this);
}
}
Modified: webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/OMNodeImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/OMNodeImpl.java?rev=191524&r1=191523&r2=191524&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/OMNodeImpl.java (original)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/OMNodeImpl.java Mon Jun 20 10:58:56 2005
@@ -67,6 +67,7 @@
public OMNodeImpl(OMElement parent) {
if ((parent != null) && (parent.getType() == OMNode.ELEMENT_NODE)) {
this.parent = (OMElementImpl) parent;
+ parent.addChild(this);
}
}
Modified: webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/OMSerializerUtil.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/OMSerializerUtil.java?rev=191524&r1=191523&r2=191524&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/OMSerializerUtil.java (original)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/OMSerializerUtil.java Mon Jun 20 10:58:56 2005
@@ -27,7 +27,7 @@
*
*
*/
-class OMSerializerUtil {
+public class OMSerializerUtil {
/**
* Method serializeEndpart
@@ -136,18 +136,26 @@
}
// add the elements attributes
- if (element.attributes != null) {
- Iterator attributesList = element.attributes.values().iterator();
- while (attributesList.hasNext()) {
- serializeAttribute((OMAttribute) attributesList.next(), writer);
- }
- }
+ serializeAttributes(element, writer);
// add the namespaces
+ serializeNamespaces(element, writer);
+ }
+
+ public static void serializeNamespaces(OMElementImpl element, XMLStreamWriter writer) throws XMLStreamException {
Iterator namespaces = element.getAllDeclaredNamespaces();
if (namespaces != null) {
while (namespaces.hasNext()) {
serializeNamespace((OMNamespace) namespaces.next(), writer);
+ }
+ }
+ }
+
+ public static void serializeAttributes(OMElementImpl element, XMLStreamWriter writer) throws XMLStreamException {
+ if (element.getAttributes() != null) {
+ Iterator attributesList = element.getAttributes();
+ while (attributesList.hasNext()) {
+ serializeAttribute((OMAttribute) attributesList.next(), writer);
}
}
}
Modified: webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/exception/OMBuilderException.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/exception/OMBuilderException.java?rev=191524&r1=191523&r2=191524&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/exception/OMBuilderException.java (original)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/exception/OMBuilderException.java Mon Jun 20 10:58:56 2005
@@ -29,4 +29,8 @@
public OMBuilderException(String s) {
super(s);
}
+
+ public OMBuilderException(Throwable cause) {
+ super(cause); //To change body of overridden methods use File | Settings | File Templates.
+ }
}
Modified: webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/SOAPFactory.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/SOAPFactory.java?rev=191524&r1=191523&r2=191524&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/SOAPFactory.java (original)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/SOAPFactory.java Mon Jun 20 10:58:56 2005
@@ -4,6 +4,7 @@
import org.apache.axis.om.OMFactory;
import org.apache.axis.om.OMNamespace;
import org.apache.axis.om.OMXMLParserWrapper;
+import org.apache.axis.soap.impl.llom.SOAPProcessingException;
/**
@@ -28,88 +29,249 @@
*/
/**
- * @param ns
* @param builder
* @return
*/
- public SOAPEnvelope createSOAPEnvelope(OMNamespace ns,
- OMXMLParserWrapper builder);
+ public SOAPEnvelope createSOAPEnvelope(OMXMLParserWrapper builder);
/**
- * @param ns
* @return
*/
- public SOAPEnvelope createSOAPEnvelope();
- public SOAPEnvelope createSOAPEnvelope(OMNamespace ns);
+ public SOAPEnvelope createSOAPEnvelope() throws SOAPProcessingException;
/**
* @param envelope
* @return
*/
- public SOAPBody createSOAPBody(SOAPEnvelope envelope);
+ public SOAPHeader createSOAPHeader(SOAPEnvelope envelope) throws SOAPProcessingException;
/**
* @param envelope
* @param builder
* @return
*/
- public SOAPBody createSOAPBody(SOAPEnvelope envelope,
- OMXMLParserWrapper builder);
+ public SOAPHeader createSOAPHeader(SOAPEnvelope envelope, OMXMLParserWrapper builder);
+ /**
+ * @param localName
+ * @param ns
+ * @return
+ */
+ public SOAPHeaderBlock createSOAPHeaderBlock(String localName, OMNamespace ns, SOAPHeader parent) throws SOAPProcessingException;
+ /**
+ * @param localName
+ * @param ns
+ * @param parent
+ * @param builder
+ * @return
+ */
+ public SOAPHeaderBlock createSOAPHeaderBlock(String localName, OMNamespace ns, SOAPHeader parent, OMXMLParserWrapper builder) throws SOAPProcessingException;
/**
+ * @param parent
+ * @param e
+ * @return
+ */
+ public SOAPFault createSOAPFault(SOAPBody parent, Exception e)throws SOAPProcessingException;
+ public SOAPFault createSOAPFault(SOAPBody parent)throws SOAPProcessingException;
+
+ /**
+ * @param ns
+ * @param parent
+ * @param builder
+ * @return
+ */
+ public SOAPFault createSOAPFault(SOAPBody parent, OMXMLParserWrapper builder);
+
+ /**
* @param envelope
* @return
*/
- public SOAPHeader createSOAPHeader(SOAPEnvelope envelope);
+ public SOAPBody createSOAPBody(SOAPEnvelope envelope) throws SOAPProcessingException;
/**
* @param envelope
* @param builder
* @return
*/
- public SOAPHeader createSOAPHeader(SOAPEnvelope envelope,
- OMXMLParserWrapper builder);
+ public SOAPBody createSOAPBody(SOAPEnvelope envelope, OMXMLParserWrapper builder);
+
+ /* ========================
+ = SOAPFaultCode =
+ ======================== */
+ /**
+ * Code eii under SOAPFault (parent)
+ * @param parent
+ * @return
+ */
+ public SOAPFaultCode createSOAPFaultCode(SOAPFault parent) throws SOAPProcessingException;
/**
- * @param localName
- * @param ns
+ * Code eii under SOAPFault (parent)
+ * @param parent
+ * @param builder
* @return
*/
- public SOAPHeaderBlock createSOAPHeaderBlock(String localName,
- OMNamespace ns);
+ public SOAPFaultCode createSOAPFaultCode(SOAPFault parent, OMXMLParserWrapper builder);
+
+ /*========================
+ = SOAPFaultCodeValue =
+ ======================== */
/**
- * @param localName
- * @param ns
+ * Value eii under Code (parent)
+ * @param parent
+ * @return
+ */
+ public SOAPFaultValue createSOAPFaultValue(SOAPFaultCode parent) throws SOAPProcessingException;
+ /**
+ * Value eii under Code (parent)
* @param parent
* @param builder
* @return
*/
- public SOAPHeaderBlock createSOAPHeaderBlock(String localName,
- OMNamespace ns, OMElement parent, OMXMLParserWrapper builder);
+ public SOAPFaultValue createSOAPFaultValue(SOAPFaultCode parent, OMXMLParserWrapper builder);
+
+ /*========================
+ = SOAPFaultSubCode =
+ ======================== */
/**
+ * SubCode eii under Value (parent)
* @param parent
- * @param e
* @return
*/
- public SOAPFault createSOAPFault(SOAPBody parent, Exception e);
+ //added
+ public SOAPFaultValue createSOAPFaultValue(SOAPFaultSubCode parent) throws SOAPProcessingException;
+
+ //added
+ public SOAPFaultValue createSOAPFaultValue(SOAPFaultSubCode parent, OMXMLParserWrapper builder);
+
+ //changed
+ public SOAPFaultSubCode createSOAPFaultSubCode(SOAPFaultCode parent) throws SOAPProcessingException;
/**
- * @param ns
+ * SubCode eii under Value (parent)
+ * @param parent
+ * @param builder
+ * @return
+ */
+ //changed
+ public SOAPFaultSubCode createSOAPFaultSubCode(SOAPFaultCode parent, OMXMLParserWrapper builder);
+
+ /**
+ * SubCode eii under SubCode (parent)
+ * @param parent
+ * @return
+ */
+ public SOAPFaultSubCode createSOAPFaultSubCode(SOAPFaultSubCode parent) throws SOAPProcessingException;
+ /**
+ * SubCode eii under SubCode (parent)
+ * @param parent
+ * @param builder
+ * @return
+ */
+ public SOAPFaultSubCode createSOAPFaultSubCode(SOAPFaultSubCode parent, OMXMLParserWrapper builder);
+
+
+ /*========================
+ = SOAPFaultReason =
+ ======================== */
+
+ /**
+ * Reason eii under SOAPFault (parent)
+ * @param parent
+ * @return
+ */
+ public SOAPFaultReason createSOAPFaultReason(SOAPFault parent) throws SOAPProcessingException;
+ /**
+ * Reason eii under SOAPFault (parent)
+ * @param parent
+ * @param builder
+ * @return
+ */
+ public SOAPFaultReason createSOAPFaultReason(SOAPFault parent, OMXMLParserWrapper builder);
+
+ /*========================
+ = SOAPFaultReasonText =
+ ======================== */
+
+ /**
+ * SubCode eii under SubCode (parent)
+ * @param parent
+ * @return
+ */
+ public SOAPFaultText createSOAPFaultText(SOAPFaultReason parent) throws SOAPProcessingException;
+ /**
+ * SubCode eii under SubCode (parent)
* @param parent
* @param builder
* @return
*/
- public SOAPFault createSOAPFault(OMNamespace ns, SOAPBody parent,
- OMXMLParserWrapper builder);
+ public SOAPFaultText createSOAPFaultText(SOAPFaultReason parent, OMXMLParserWrapper builder);
+
+
+ /*========================
+ = SOAPFaultNode =
+ ======================== */
+
+ /**
+ * Node eii under SOAPFault (parent)
+ * @param parent
+ * @return
+ */
+ public SOAPFaultNode createSOAPFaultNode(SOAPFault parent) throws SOAPProcessingException;
+ /**
+ * Node eii under SOAPFault (parent)
+ * @param parent
+ * @param builder
+ * @return
+ */
+ public SOAPFaultNode createSOAPFaultNode(SOAPFault parent, OMXMLParserWrapper builder);
+
+ /*========================
+ = SOAPFaultRole =
+ ======================== */
+
+ /**
+ * Role eii under SOAPFault (parent)
+ * @param parent
+ * @return
+ */
+ public SOAPFaultRole createSOAPFaultRole(SOAPFault parent) throws SOAPProcessingException;
+ /**
+ * Role eii under SOAPFault (parent)
+ * @param parent
+ * @param builder
+ * @return
+ */
+ public SOAPFaultRole createSOAPFaultRole(SOAPFault parent, OMXMLParserWrapper builder);
+
+ /*========================
+ = SOAPFaultDetail =
+ ======================== */
+
+ /**
+ * Detail eii under SOAPFault (parent)
+ * @param parent
+ * @return
+ */
+ public SOAPFaultDetail createSOAPFaultDetail(SOAPFault parent) throws SOAPProcessingException;
+ /**
+ * Role eii under SOAPFault (parent)
+ * @param parent
+ * @param builder
+ * @return
+ */
+ public SOAPFaultDetail createSOAPFaultDetail(SOAPFault parent, OMXMLParserWrapper builder);
+
+
/**
* Method getDefaultEnvelope
*
* @return
*/
- public SOAPEnvelope getDefaultEnvelope();
+ public SOAPEnvelope getDefaultEnvelope() throws SOAPProcessingException;
}
Modified: webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/SOAPFault.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/SOAPFault.java?rev=191524&r1=191523&r2=191524&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/SOAPFault.java (original)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/SOAPFault.java Mon Jun 20 10:58:56 2005
@@ -17,6 +17,7 @@
import org.apache.axis.om.OMElement;
import org.apache.axis.om.OMException;
+import org.apache.axis.soap.impl.llom.SOAPProcessingException;
/**
@@ -45,39 +46,46 @@
* SOAPFaultCode is a mandatory item in a Fault, in SOAP 1.2 specification
* @param soapFaultCode
*/
- public void setCode(SOAPFaultCode soapFaultCode);
+ public void setCode(SOAPFaultCode soapFaultCode) throws SOAPProcessingException ;
public SOAPFaultCode getCode();
/**
* SOAPFaultReason is a mandatory item in a Fault, in SOAP 1.2 specification
* @param reason
*/
- public void setReason(SOAPFaultReason reason);
+ public void setReason(SOAPFaultReason reason) throws SOAPProcessingException;
public SOAPFaultReason getReason();
/**
* SOAPFaultNode is an optional item in a Fault, in SOAP 1.2 specification
* @param node
*/
- public void setNode(SOAPFaultNode node);
+ public void setNode(SOAPFaultNode node) throws SOAPProcessingException;
public SOAPFaultNode getNode();
/**
- * SOAPFaultRole is an optional item in a Fault, in SOAP 1.2 specification
+ * SOAPFaultRoleImpl is an optional item in a Fault, in SOAP 1.2 specification
* @param role
*/
- public void setRole(SOAPFaultRole role);
+ public void setRole(SOAPFaultRole role) throws SOAPProcessingException;
public SOAPFaultRole getRole();
/**
- * SOAPFaultRole is an optional item in a Fault, in SOAP 1.2 specification
+ * SOAPFaultRoleImpl is an optional item in a Fault, in SOAP 1.2 specification
* @param detail
*/
- public void setDetail(SOAPFaultDetail detail);
+ public void setDetail(SOAPFaultDetail detail) throws SOAPProcessingException;
public SOAPFaultDetail getDetail();
/**
- * Method getException
+ * This will return if there is an exception in the SOAP fault.
+ *
+ * If the exception is like;
+ * <SOAPFault>
+ * <Detail>
+ * <Exception> stack trace goes here </Exception>
+ * </Detail>
+ * </SOAPFault>
*
* @return
* @throws org.apache.axis.om.OMException
Modified: webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/SOAPFaultCode.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/SOAPFaultCode.java?rev=191524&r1=191523&r2=191524&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/SOAPFaultCode.java (original)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/SOAPFaultCode.java Mon Jun 20 10:58:56 2005
@@ -1,6 +1,7 @@
package org.apache.axis.soap;
import org.apache.axis.om.OMElement;
+import org.apache.axis.soap.impl.llom.SOAPProcessingException;
/**
* Copyright 2001-2004 The Apache Software Foundation.
@@ -26,17 +27,17 @@
/**
* @param value
*/
- public void addValue(SOAPFaultCodeValue value);
+ public void setValue(SOAPFaultValue value) throws SOAPProcessingException;
/**
* @return
*/
- public SOAPFaultCodeValue getValue();
+ public SOAPFaultValue getValue();
/**
* @param value
*/
- public void addSubCode(SOAPFaultSubCode value);
+ public void setSubCode(SOAPFaultSubCode value) throws SOAPProcessingException;
/**
* @return
Modified: webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/SOAPFaultReason.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/SOAPFaultReason.java?rev=191524&r1=191523&r2=191524&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/SOAPFaultReason.java (original)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/SOAPFaultReason.java Mon Jun 20 10:58:56 2005
@@ -1,6 +1,7 @@
package org.apache.axis.soap;
import org.apache.axis.om.OMElement;
+import org.apache.axis.soap.impl.llom.SOAPProcessingException;
/**
* Copyright 2001-2004 The Apache Software Foundation.
@@ -23,6 +24,6 @@
* Eran Chinthaka (chinthaka@apache.org)
*/
- public void setSOAPText(SOAPText soapText);
- public SOAPText getSOAPText();
+ public void setSOAPText(SOAPFaultText soapFaultText) throws SOAPProcessingException;
+ public SOAPFaultText getSOAPText();
}
Modified: webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/SOAPFaultSubCode.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/SOAPFaultSubCode.java?rev=191524&r1=191523&r2=191524&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/SOAPFaultSubCode.java (original)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/SOAPFaultSubCode.java Mon Jun 20 10:58:56 2005
@@ -1,6 +1,7 @@
package org.apache.axis.soap;
import org.apache.axis.om.OMElement;
+import org.apache.axis.soap.impl.llom.SOAPProcessingException;
/**
* Copyright 2001-2004 The Apache Software Foundation.
@@ -27,14 +28,14 @@
* Fault SubCode contain only one mandatory Value child. This value child contains a QName
* @param soapFaultSubCodeValue
*/
- public void addValue(SOAPFaultSubCodeValue soapFaultSubCodeValue);
- public SOAPFaultSubCodeValue getValue();
+ public void setValue(SOAPFaultValue soapFaultSubCodeValue) throws SOAPProcessingException;
+ public SOAPFaultValue getValue();
/**
* Fault SubCode can contain an optional SubCode
* @param subCode
*/
- public void addSubCode(SOAPFaultSubCode subCode);
+ public void setSubCode(SOAPFaultSubCode subCode) throws SOAPProcessingException;
public SOAPFaultSubCode getSubCode();
}
Added: webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/SOAPFaultText.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/SOAPFaultText.java?rev=191524&view=auto
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/SOAPFaultText.java (added)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/SOAPFaultText.java Mon Jun 20 10:58:56 2005
@@ -0,0 +1,36 @@
+package org.apache.axis.soap;
+
+import org.apache.axis.om.OMElement;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ * <p/>
+ */
+public interface SOAPFaultText extends OMElement{
+ /**
+ * Eran Chinthaka (chinthaka@apache.org)
+ */
+
+ /**
+ * lang is a mandatory attribute within the SOAPFaultText which must have
+ * SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_NS_URI as the namespace URI and
+ * SOAP12constants.SOAP_FAULT_TEXT_LANG_ATTR_NS_PREFIX or a capitalization thereof as the prefix
+ * @param lang
+ */
+ public void setLang(String lang);
+ public String getLang();
+
+
+}
Added: webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/SOAPFaultValue.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/SOAPFaultValue.java?rev=191524&view=auto
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/SOAPFaultValue.java (added)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/SOAPFaultValue.java Mon Jun 20 10:58:56 2005
@@ -0,0 +1,25 @@
+package org.apache.axis.soap;
+
+import org.apache.axis.om.OMElement;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ * <p/>
+ */
+public interface SOAPFaultValue extends OMElement{
+ /**
+ * Eran Chinthaka (chinthaka@apache.org)
+ */
+}
Modified: webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/SOAPHeaderBlock.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/SOAPHeaderBlock.java?rev=191524&r1=191523&r2=191524&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/SOAPHeaderBlock.java (original)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/SOAPHeaderBlock.java Mon Jun 20 10:58:56 2005
@@ -16,6 +16,7 @@
package org.apache.axis.soap;
import org.apache.axis.om.OMElement;
+import org.apache.axis.soap.impl.llom.SOAPProcessingException;
/**
* <P>An object representing the contents in the SOAP header part of the SOAP
@@ -61,6 +62,7 @@
* @see #getMustUnderstand() getMustUnderstand()
*/
public abstract void setMustUnderstand(boolean mustUnderstand);
+ public abstract void setMustUnderstand(String mustUnderstand) throws SOAPProcessingException;
/**
* Returns whether the mustUnderstand attribute for this
Modified: webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/SOAPBodyImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/SOAPBodyImpl.java?rev=191524&r1=191523&r2=191524&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/SOAPBodyImpl.java (original)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/SOAPBodyImpl.java Mon Jun 20 10:58:56 2005
@@ -24,24 +24,24 @@
import org.apache.axis.soap.SOAPEnvelope;
import org.apache.axis.soap.SOAPFault;
import org.apache.axis.soap.impl.llom.soap11.SOAP11Constants;
+import org.apache.axis.soap.impl.llom.soap12.SOAP12Constants;
/**
* Class SOAPBodyImpl
*/
-public class SOAPBodyImpl extends OMElementImpl
+public abstract class SOAPBodyImpl extends SOAPElement
implements SOAPBody, OMConstants {
/**
* Field hasSOAPFault
*/
private boolean hasSOAPFault = false;
-
+
/**
* @param envelope
*/
- public SOAPBodyImpl(SOAPEnvelope envelope) {
- super(envelope);
- this.ns = envelope.getNamespace();
- this.localName = SOAPConstants.BODY_LOCAL_NAME;
+ public SOAPBodyImpl(SOAPEnvelope envelope) throws SOAPProcessingException {
+ super(envelope, SOAPConstants.BODY_LOCAL_NAME, true);
+
}
/**
@@ -51,8 +51,7 @@
* @param builder
*/
public SOAPBodyImpl(SOAPEnvelope envelope, OMXMLParserWrapper builder) {
- super(SOAPConstants.BODY_LOCAL_NAME, envelope.getNamespace(), envelope,
- builder);
+ super(envelope, SOAPConstants.BODY_LOCAL_NAME, builder);
}
/**
@@ -64,11 +63,7 @@
* @throws org.apache.axis.om.OMException if there is a SOAP error
* @throws OMException
*/
- public SOAPFault addFault(Exception e) throws OMException {
- SOAPFault soapFault = new SOAPFaultImpl(this, e);
- addFault(soapFault);
- return soapFault;
- }
+ public abstract SOAPFault addFault(Exception e) throws OMException;
/**
* Indicates whether a <code>SOAPFault</code> object exists in
@@ -83,12 +78,13 @@
return true;
} else {
OMElement element = getFirstElement();
- if(element != null
- && SOAPConstants.SOAPFAULT_LOCAL_NAME.equals(element.getLocalName())
- && SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(element.getNamespace().getName())){
+ if (element != null
+ && SOAPConstants.SOAPFAULT_LOCAL_NAME.equals(element.getLocalName())
+ && (SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(element.getNamespace().getName())
+ || SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(element.getNamespace().getName()))) { //added this line
hasSOAPFault = true;
return true;
- }else{
+ } else {
return false;
}
}
@@ -102,18 +98,19 @@
* object
*/
public SOAPFault getFault() {
- if(hasSOAPFault){
- OMElement element = getFirstElement();
- if(element != null
+ OMElement element = getFirstElement();
+ if (hasSOAPFault) {
+ return (SOAPFault) element;
+ } else if (element != null
&& SOAPConstants.SOAPFAULT_LOCAL_NAME.equals(element.getLocalName())
- && SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(element.getNamespace().getName())){
- hasSOAPFault = true;
- return (SOAPFault)element;
- }else{
- return null;
- }
+ && (SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(element.getNamespace().getName())
+ || SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(element.getNamespace().getName()))) { //added this line
+ hasSOAPFault = true;
+ return (SOAPFault) element;
+ } else {
+ return null;
}
- return null;
+
}
/**
@@ -123,10 +120,15 @@
*/
public void addFault(SOAPFault soapFault) throws OMException {
if (hasSOAPFault) {
- throw new OMException(
- "SOAP Body already has a SOAP Fault and there can not be more than one SOAP fault");
+ throw new OMException("SOAP Body already has a SOAP Fault and there can not be more than one SOAP fault");
}
addChild(soapFault);
hasSOAPFault = true;
+ }
+
+ protected void checkParent(OMElement parent) throws SOAPProcessingException {
+ if (!(parent instanceof SOAPEnvelopeImpl)) {
+ throw new SOAPProcessingException("Expecting an implementation of SOAP Envelope as the parent. But received some other implementation");
+ }
}
}
Modified: webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/SOAPConstants.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/SOAPConstants.java?rev=191524&r1=191523&r2=191524&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/SOAPConstants.java (original)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/SOAPConstants.java Mon Jun 20 10:58:56 2005
@@ -47,31 +47,20 @@
* Field BODY_FAULT_LOCAL_NAME
*/
public static final String BODY_FAULT_LOCAL_NAME = "Fault";
- /**
- * Field ATTR_ACTOR
- */
- public static final String ATTR_ACTOR = "actor";
+
/**
* Field ATTR_MUSTUNDERSTAND
*/
public static final String ATTR_MUSTUNDERSTAND = "mustUnderstand";
+ public static final String ATTR_MUSTUNDERSTAND_TRUE = "true";
+ public static final String ATTR_MUSTUNDERSTAND_FALSE = "false";
+ public static final String ATTR_MUSTUNDERSTAND_0 = "0";
+ public static final String ATTR_MUSTUNDERSTAND_1 = "1";
/**
* Field SOAPFAULT_LOCAL_NAME
*/
public static final String SOAPFAULT_LOCAL_NAME = "Fault";
/**
- * Field SOAPFAULT_CODE_LOCAL_NAME
- */
- public static final String SOAPFAULT_CODE_LOCAL_NAME = "faultcode";
- /**
- * Field SOAPFAULT_STRING_LOCAL_NAME
- */
- public static final String SOAPFAULT_STRING_LOCAL_NAME = "faultstring";
- /**
- * Field SOAPFAULT_ACTOR_LOCAL_NAME
- */
- public static final String SOAPFAULT_ACTOR_LOCAL_NAME = "faultactor";
- /**
* Field SOAPFAULT_DETAIL_LOCAL_NAME
*/
public static final String SOAPFAULT_DETAIL_LOCAL_NAME = "detail";
@@ -81,4 +70,6 @@
*/
public static final String SOAPFAULT_NAMESPACE_PREFIX =
SOAP_DEFAULT_NAMESPACE_PREFIX;
+
+ public static final String SOAP_FAULT_DETAIL_EXCEPTION_ENTRY = "Exception";
}
Added: webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/SOAPElement.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/SOAPElement.java?rev=191524&view=auto
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/SOAPElement.java (added)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/SOAPElement.java Mon Jun 20 10:58:56 2005
@@ -0,0 +1,73 @@
+package org.apache.axis.soap.impl.llom;
+
+import org.apache.axis.om.impl.llom.OMElementImpl;
+import org.apache.axis.om.OMElement;
+import org.apache.axis.om.OMXMLParserWrapper;
+import org.apache.axis.om.OMNamespace;
+
+/*
+ * 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)
+ *
+ * This will be the base class of all the SOAP specific elements inthe system
+
+ */
+
+public abstract class SOAPElement extends OMElementImpl {
+
+
+ /**
+ * @param parent
+ * @param parent
+ */
+ protected SOAPElement(OMElement parent, String localName, boolean extractNamespaceFromParent) throws SOAPProcessingException {
+ super(parent);
+ if (parent == null) {
+ throw new SOAPProcessingException(" Can not create " + localName + " element without a parent !!");
+ }
+ checkParent(parent);
+
+ if (extractNamespaceFromParent) {
+ this.ns = parent.getNamespace();
+ }
+ this.localName = localName;
+ }
+
+
+ protected SOAPElement(OMElement parent, String localName, OMXMLParserWrapper builder) {
+ super(localName, null, parent, builder);
+ }
+
+ /**
+ * Caution : This Constructor is meant to be used only by the SOAPEnvelope.
+ * <p/>
+ * Reasons : This can be used to create a SOAP Element programmatically. But we need to make sure that the user
+ * always passes a parent for the element being created. But SOAP Envelope has no parent.
+ *
+ * @param localName
+ * @param ns
+ */
+ protected SOAPElement(String localName, OMNamespace ns) {
+ super(localName, ns);
+
+ }
+
+ /**
+ * This has to be implemented by all the derived classes to check for the correct parent.
+ */
+ protected abstract void checkParent(OMElement parent) throws SOAPProcessingException;
+
+}
Modified: webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/SOAPEnvelopeImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/SOAPEnvelopeImpl.java?rev=191524&r1=191523&r2=191524&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/SOAPEnvelopeImpl.java (original)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/SOAPEnvelopeImpl.java Mon Jun 20 10:58:56 2005
@@ -21,10 +21,12 @@
import org.apache.axis.soap.SOAPEnvelope;
import org.apache.axis.soap.SOAPHeader;
+import javax.xml.namespace.QName;
+
/**
* Class SOAPEnvelopeImpl
*/
-public class SOAPEnvelopeImpl extends OMElementImpl
+public class SOAPEnvelopeImpl extends SOAPElement
implements SOAPEnvelope, OMConstants {
private SOAPBody soapBody;
@@ -34,17 +36,7 @@
* @param builder
*/
public SOAPEnvelopeImpl(OMXMLParserWrapper builder) {
- super(SOAPConstants.SOAPENVELOPE_LOCAL_NAME, null, null, builder);
- }
-
- /**
- * Constructor SOAPEnvelopeImpl
- *
- * @param ns
- * @param builder
- */
- public SOAPEnvelopeImpl(OMNamespace ns, OMXMLParserWrapper builder) {
- super(SOAPConstants.SOAPENVELOPE_LOCAL_NAME, ns, null, builder);
+ super(null, SOAPConstants.SOAPENVELOPE_LOCAL_NAME, builder);
}
/**
@@ -68,10 +60,7 @@
*/
public SOAPHeader getHeader() throws OMException {
if (soapHeader == null) {
- OMElement element = getFirstElement();
- if (SOAPConstants.HEADER_LOCAL_NAME.equals(element.getLocalName())) {
- soapHeader = (SOAPHeader) element;
- }
+ soapHeader = (SOAPHeader) getFirstChildWithName(new QName(SOAPConstants.HEADER_LOCAL_NAME));
}
return soapHeader;
}
@@ -89,10 +78,12 @@
*/
public SOAPBody getBody() throws OMException {
if (soapBody == null) {
+
+ //check for the first element
OMElement element = getFirstElement();
if (SOAPConstants.BODY_LOCAL_NAME.equals(element.getLocalName())) {
soapBody = (SOAPBody) element;
- } else {
+ } else { // if not second element SHOULD be the body
OMNode node = element.getNextSibling();
while (node.getType() != OMNode.ELEMENT_NODE) {
node = node.getNextSibling();
@@ -101,6 +92,8 @@
if (SOAPConstants.BODY_LOCAL_NAME.equals(element.getLocalName())) {
soapBody = (SOAPBody) element;
+ } else {
+ throw new OMException("SOAPEnvelope must contain a body element which is either first or second child element of the SOAPEnvelope.");
}
}
}
@@ -114,5 +107,9 @@
*/
public OMNode detach() throws OMException {
throw new OMException("Root Element can not be detached");
+ }
+
+ protected void checkParent(OMElement parent) throws SOAPProcessingException {
+ // here do nothing as SOAPEnvelope doesn't have a parent !!!
}
}
Added: webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/SOAPFaultCodeImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/SOAPFaultCodeImpl.java?rev=191524&view=auto
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/SOAPFaultCodeImpl.java (added)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/SOAPFaultCodeImpl.java Mon Jun 20 10:58:56 2005
@@ -0,0 +1,82 @@
+package org.apache.axis.soap.impl.llom;
+
+import org.apache.axis.om.impl.llom.OMElementImpl;
+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 org.apache.axis.soap.SOAPFaultCode;
+import org.apache.axis.soap.SOAPFaultValue;
+import org.apache.axis.soap.SOAPFaultSubCode;
+import org.apache.axis.soap.SOAPFault;
+import org.apache.axis.soap.impl.llom.util.UtilProvider;
+import org.apache.axis.soap.impl.llom.soap12.SOAP12Constants;
+
+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 abstract class SOAPFaultCodeImpl extends SOAPElement implements SOAPFaultCode {
+
+ protected SOAPFaultValue value;
+ protected SOAPFaultSubCode subCode;
+
+ /**
+ * Constructor OMElementImpl
+ *
+ * @param localName
+ * @param ns
+ * @param parent
+ * @param builder
+ */
+ public SOAPFaultCodeImpl(SOAPFault parent, OMXMLParserWrapper builder) {
+ super(parent, SOAP12Constants.SOAP_FAULT_CODE_LOCAL_NAME, builder);
+ }
+
+ /**
+ * @param parent
+ * @param parent
+ */
+ public SOAPFaultCodeImpl(SOAPFault parent, boolean extractNamespaceFromParent) throws SOAPProcessingException {
+ super(parent, SOAP12Constants.SOAP_FAULT_CODE_LOCAL_NAME, extractNamespaceFromParent);
+ }
+
+ /**
+ * Eran Chinthaka (chinthaka@apache.org)
+ */
+ public void setValue(SOAPFaultValue value) throws SOAPProcessingException {
+ UtilProvider.setNewElement(this, value, value);
+ }
+
+ public SOAPFaultValue getValue() {
+ if (value == null) {
+ value = (SOAPFaultValue) UtilProvider.getChildWithName(this, SOAP12Constants.SOAP_FAULT_VALUE_LOCAL_NAME);
+ }
+ return value;
+ }
+
+ public void setSubCode(SOAPFaultSubCode value) throws SOAPProcessingException {
+ UtilProvider.setNewElement(this, subCode, value);
+ }
+
+ public SOAPFaultSubCode getSubCode() {
+ if (subCode == null) {
+ subCode = (SOAPFaultSubCode) UtilProvider.getChildWithName(this, SOAP12Constants.SOAP_FAULT_SUB_CODE_LOCAL_NAME);
+ }
+ return subCode;
+ }
+}
Added: webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/SOAPFaultDetailImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/SOAPFaultDetailImpl.java?rev=191524&view=auto
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/SOAPFaultDetailImpl.java (added)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/SOAPFaultDetailImpl.java Mon Jun 20 10:58:56 2005
@@ -0,0 +1,50 @@
+package org.apache.axis.soap.impl.llom;
+
+import org.apache.axis.om.impl.llom.OMElementImpl;
+import org.apache.axis.om.OMElement;
+import org.apache.axis.om.OMNamespace;
+import org.apache.axis.om.OMXMLParserWrapper;
+import org.apache.axis.om.OMException;
+import org.apache.axis.soap.SOAPFaultDetail;
+import org.apache.axis.soap.SOAPFault;
+import org.apache.axis.soap.impl.llom.soap12.SOAP12Constants;
+
+import javax.xml.namespace.QName;
+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 abstract class SOAPFaultDetailImpl extends SOAPElement implements SOAPFaultDetail{
+
+ protected SOAPFaultDetailImpl(SOAPFault parent, boolean extractNamespaceFromParent) throws SOAPProcessingException {
+ super(parent, SOAP12Constants.SOAP_FAULT_DETAIL_LOCAL_NAME, extractNamespaceFromParent);
+ }
+
+ protected SOAPFaultDetailImpl(SOAPFault parent, OMXMLParserWrapper builder) {
+ super(parent, SOAP12Constants.SOAP_FAULT_DETAIL_LOCAL_NAME, builder);
+ }
+
+ public void addDetailEntry(OMElement detailElement) {
+ this.addChild(detailElement);
+ }
+
+ public Iterator getAllDetailEntries() {
+ return this.getChildren();
+ }
+}