Modified: webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/soap12/SOAP12FaultValueImpl.java URL: http://svn.apache.org/viewcvs/webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/soap12/SOAP12FaultValueImpl.java?rev=383805&r1=383804&r2=383805&view=diff ============================================================================== --- webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/soap12/SOAP12FaultValueImpl.java (original) +++ webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/soap12/SOAP12FaultValueImpl.java Mon Mar 6 22:59:32 2006 @@ -18,21 +18,26 @@ import org.apache.ws.commons.om.OMElement; import org.apache.ws.commons.om.OMXMLParserWrapper; +import org.apache.ws.commons.soap.SOAPFactory; import org.apache.ws.commons.soap.SOAPProcessingException; import org.apache.ws.commons.soap.impl.llom.SOAPFaultValueImpl; public class SOAP12FaultValueImpl extends SOAPFaultValueImpl { - public SOAP12FaultValueImpl(OMElement parent) throws SOAPProcessingException { - super(parent); + + public SOAP12FaultValueImpl(OMElement parent, SOAPFactory factory) + throws SOAPProcessingException { + super(parent, factory); } - public SOAP12FaultValueImpl() throws SOAPProcessingException { - super(SOAP12Factory.getNamespace()); + public SOAP12FaultValueImpl(SOAPFactory factory) + throws SOAPProcessingException { + super(factory.getNamespace(), factory); } - public SOAP12FaultValueImpl(OMElement parent, OMXMLParserWrapper builder) { - super(parent, builder); + public SOAP12FaultValueImpl(OMElement parent, OMXMLParserWrapper builder, + SOAPFactory factory) { + super(parent, builder, factory); } protected void checkParent(OMElement parent) throws SOAPProcessingException {
Modified: webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/soap12/SOAP12HeaderBlockImpl.java URL: http://svn.apache.org/viewcvs/webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/soap12/SOAP12HeaderBlockImpl.java?rev=383805&r1=383804&r2=383805&view=diff ============================================================================== --- webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/soap12/SOAP12HeaderBlockImpl.java (original) +++ webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/soap12/SOAP12HeaderBlockImpl.java Mon Mar 6 22:59:32 2006 @@ -21,14 +21,16 @@ import org.apache.ws.commons.om.OMXMLParserWrapper; import org.apache.ws.commons.soap.SOAP12Constants; import org.apache.ws.commons.soap.SOAPConstants; +import org.apache.ws.commons.soap.SOAPFactory; import org.apache.ws.commons.soap.SOAPHeader; import org.apache.ws.commons.soap.SOAPProcessingException; import org.apache.ws.commons.soap.impl.llom.SOAPHeaderBlockImpl; public class SOAP12HeaderBlockImpl extends SOAPHeaderBlockImpl { - public SOAP12HeaderBlockImpl(String localName, OMNamespace ns) { - super(localName, ns); + public SOAP12HeaderBlockImpl(String localName, OMNamespace ns, + SOAPFactory factory) { + super(localName, ns, factory); } /** * Eran Chinthaka ([EMAIL PROTECTED]) @@ -39,8 +41,10 @@ */ public SOAP12HeaderBlockImpl(String localName, OMNamespace ns, - SOAPHeader parent) throws SOAPProcessingException { - super(localName, ns, parent); + SOAPHeader parent, + SOAPFactory factory) + throws SOAPProcessingException { + super(localName, ns, parent, factory); checkParent(parent); } @@ -55,15 +59,17 @@ public SOAP12HeaderBlockImpl(String localName, OMNamespace ns, SOAPHeader parent, - OMXMLParserWrapper builder) { - super(localName, ns, parent, builder); + OMXMLParserWrapper builder, + SOAPFactory factory) { + super(localName, ns, parent, builder, factory); } protected void checkParent(OMElement parent) throws SOAPProcessingException { if (!(parent instanceof SOAP12HeaderImpl)) { throw new SOAPProcessingException( - "Expecting SOAP 1.2 implementation of SOAP Body as the parent. But received some other implementation"); + "Expecting SOAP 1.2 implementation of SOAP Body as " + + "the parent. But received some other implementation"); } } @@ -86,7 +92,8 @@ } - public void setMustUnderstand(String mustUnderstand) throws SOAPProcessingException { + 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) || @@ -96,7 +103,8 @@ SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI); } else { throw new SOAPProcessingException( - "mustUndertand should be one of \"true\", \"false\", \"0\" or \"1\" "); + "mustUndertand should be one of \"true\", " + + "\"false\", \"0\" or \"1\" "); } } Modified: webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/soap12/SOAP12HeaderImpl.java URL: http://svn.apache.org/viewcvs/webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/soap12/SOAP12HeaderImpl.java?rev=383805&r1=383804&r2=383805&view=diff ============================================================================== --- webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/soap12/SOAP12HeaderImpl.java (original) +++ webservices/commons/modules/axiom/src/org/apache/ws/commons/soap/impl/llom/soap12/SOAP12HeaderImpl.java Mon Mar 6 22:59:32 2006 @@ -23,6 +23,7 @@ import org.apache.ws.commons.om.impl.llom.traverse.OMChildrenWithSpecificAttributeIterator; import org.apache.ws.commons.soap.SOAP12Constants; import org.apache.ws.commons.soap.SOAPEnvelope; +import org.apache.ws.commons.soap.SOAPFactory; import org.apache.ws.commons.soap.SOAPHeaderBlock; import org.apache.ws.commons.soap.SOAPProcessingException; import org.apache.ws.commons.soap.impl.llom.SOAPHeaderImpl; @@ -35,15 +36,16 @@ * Eran Chinthaka ([EMAIL PROTECTED]) */ - public SOAP12HeaderImpl() { - super(SOAP12Factory.getNamespace()); + public SOAP12HeaderImpl(SOAPFactory factory) { + super(factory.getNamespace(), factory); } /** * @param envelope */ - public SOAP12HeaderImpl(SOAPEnvelope envelope) throws SOAPProcessingException { - super(envelope); + public SOAP12HeaderImpl(SOAPEnvelope envelope, SOAPFactory factory) + throws SOAPProcessingException { + super(envelope, factory); } /** @@ -52,8 +54,9 @@ * @param envelope * @param builder */ - public SOAP12HeaderImpl(SOAPEnvelope envelope, OMXMLParserWrapper builder) { - super(envelope, builder); + public SOAP12HeaderImpl(SOAPEnvelope envelope, OMXMLParserWrapper builder, + SOAPFactory factory) { + super(envelope, builder, factory); } public SOAPHeaderBlock addHeaderBlock(String localName, OMNamespace ns) throws OMException { @@ -69,7 +72,8 @@ SOAPHeaderBlock soapHeaderBlock = null; try { - soapHeaderBlock = new SOAP12HeaderBlockImpl(localName, ns, this); + soapHeaderBlock = new SOAP12HeaderBlockImpl(localName, ns, this, + (SOAPFactory) this.factory); } catch (SOAPProcessingException e) { throw new OMException(e); } Modified: webservices/commons/modules/axiom/test/org/apache/ws/commons/attachments/ImageSampleTest.java URL: http://svn.apache.org/viewcvs/webservices/commons/modules/axiom/test/org/apache/ws/commons/attachments/ImageSampleTest.java?rev=383805&r1=383804&r2=383805&view=diff ============================================================================== --- webservices/commons/modules/axiom/test/org/apache/ws/commons/attachments/ImageSampleTest.java (original) +++ webservices/commons/modules/axiom/test/org/apache/ws/commons/attachments/ImageSampleTest.java Mon Mar 6 22:59:32 2006 @@ -19,7 +19,9 @@ import org.apache.ws.commons.attachments.utils.ImageDataSource; import org.apache.ws.commons.attachments.utils.ImageIO; import org.apache.ws.commons.om.AbstractTestCase; +import org.apache.ws.commons.om.OMAbstractFactory; import org.apache.ws.commons.om.OMElement; +import org.apache.ws.commons.om.OMFactory; import org.apache.ws.commons.om.OMOutputFormat; import org.apache.ws.commons.om.OMText; import org.apache.ws.commons.om.impl.llom.OMElementImpl; @@ -80,14 +82,15 @@ OMOutputFormat baseOutputFormat = new OMOutputFormat(); baseOutputFormat.setDoOptimize(false); + OMFactory fac = OMAbstractFactory.getOMFactory(); OMNamespaceImpl soap = new OMNamespaceImpl( - "http://schemas.xmlsoap.org/soap/envelope/", "soap"); - OMElement envelope = new OMElementImpl("Envelope", soap); - OMElement body = new OMElementImpl("Body", soap); + "http://schemas.xmlsoap.org/soap/envelope/", "soap", fac); + OMElement envelope = new OMElementImpl("Envelope", soap, fac); + OMElement body = new OMElementImpl("Body", soap, fac); OMNamespaceImpl dataName = new OMNamespaceImpl( - "http://www.example.org/stuff", "m"); - OMElement data = new OMElementImpl("data", dataName); + "http://www.example.org/stuff", "m", fac); + OMElement data = new OMElementImpl("data", dataName, fac); expectedImage = new ImageIO().loadImage( @@ -96,7 +99,7 @@ ImageDataSource dataSource = new ImageDataSource("WaterLilies.jpg", expectedImage); expectedDH = new DataHandler(dataSource); - OMText binaryNode = new OMTextImpl(expectedDH, true); + OMText binaryNode = new OMTextImpl(expectedDH, true, fac); envelope.addChild(body); body.addChild(data); Modified: webservices/commons/modules/axiom/test/org/apache/ws/commons/om/impl/llom/OMOutputTest.java URL: http://svn.apache.org/viewcvs/webservices/commons/modules/axiom/test/org/apache/ws/commons/om/impl/llom/OMOutputTest.java?rev=383805&r1=383804&r2=383805&view=diff ============================================================================== --- webservices/commons/modules/axiom/test/org/apache/ws/commons/om/impl/llom/OMOutputTest.java (original) +++ webservices/commons/modules/axiom/test/org/apache/ws/commons/om/impl/llom/OMOutputTest.java Mon Mar 6 22:59:32 2006 @@ -18,8 +18,10 @@ import org.apache.ws.commons.attachments.ByteArrayDataSource; import org.apache.ws.commons.om.AbstractTestCase; +import org.apache.ws.commons.om.OMAbstractFactory; import org.apache.ws.commons.om.OMAttribute; import org.apache.ws.commons.om.OMElement; +import org.apache.ws.commons.om.OMFactory; import org.apache.ws.commons.om.OMOutputFormat; import javax.activation.DataHandler; @@ -57,26 +59,28 @@ outMTOMFile = getTempOutputFile(outFileName); outBase64File = getTempOutputFile(outBase64FileName); + OMFactory fac = OMAbstractFactory.getOMFactory(); + OMNamespaceImpl soap = new OMNamespaceImpl( - "http://schemas.xmlsoap.org/soap/envelope/", "soap"); - envelope = new OMElementImpl("Envelope", soap); - OMElement body = new OMElementImpl("Body", soap); + "http://schemas.xmlsoap.org/soap/envelope/", "soap", fac); + envelope = new OMElementImpl("Envelope", soap, fac); + OMElement body = new OMElementImpl("Body", soap, fac); OMNamespaceImpl dataName = new OMNamespaceImpl( - "http://www.example.org/stuff", "m"); - OMElement data = new OMElementImpl("data", dataName); + "http://www.example.org/stuff", "m", fac); + OMElement data = new OMElementImpl("data", dataName, fac); OMNamespaceImpl mime = new OMNamespaceImpl( - "http://www.w3.org/2003/06/xmlmime", "m"); + "http://www.w3.org/2003/06/xmlmime", "m", fac); - OMElement text = new OMElementImpl("name", dataName); + OMElement text = new OMElementImpl("name", dataName, fac); OMAttribute cType1 = new OMAttributeImpl("contentType", mime, - "text/plain"); + "text/plain", fac); text.addAttribute(cType1); byte[] byteArray = new byte[]{13, 56, 65, 32, 12, 12, 7, -3, -2, -1, 98}; dataHandler = new DataHandler(new ByteArrayDataSource(byteArray)); - OMTextImpl textData = new OMTextImpl(dataHandler, false); + OMTextImpl textData = new OMTextImpl(dataHandler, false, fac); envelope.addChild(body); body.addChild(data); Modified: webservices/commons/modules/axiom/test/org/apache/ws/commons/soap/impl/llom/OMHeaderTest.java URL: http://svn.apache.org/viewcvs/webservices/commons/modules/axiom/test/org/apache/ws/commons/soap/impl/llom/OMHeaderTest.java?rev=383805&r1=383804&r2=383805&view=diff ============================================================================== --- webservices/commons/modules/axiom/test/org/apache/ws/commons/soap/impl/llom/OMHeaderTest.java (original) +++ webservices/commons/modules/axiom/test/org/apache/ws/commons/soap/impl/llom/OMHeaderTest.java Mon Mar 6 22:59:32 2006 @@ -45,7 +45,7 @@ String newElementName = "MyHeaderElement"; SOAPHeaderBlock soapHeaderElement = soapHeader.addHeaderBlock( newElementName, - new OMNamespaceImpl("http://opensource.lk", "lsf")); + new OMNamespaceImpl("http://opensource.lk", "lsf", soapHeader.getOMFactory())); assertTrue( "Header Element added has different parent than it should have", soapHeaderElement.getParent() == soapHeader);
