Modified: axis/axis2/java/core/branches/hermetic-tests/modules/kernel/src/org/apache/axis2/description/OutInAxisOperation.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/hermetic-tests/modules/kernel/src/org/apache/axis2/description/OutInAxisOperation.java?rev=1849802&r1=1849801&r2=1849802&view=diff ============================================================================== --- axis/axis2/java/core/branches/hermetic-tests/modules/kernel/src/org/apache/axis2/description/OutInAxisOperation.java (original) +++ axis/axis2/java/core/branches/hermetic-tests/modules/kernel/src/org/apache/axis2/description/OutInAxisOperation.java Thu Dec 27 18:42:33 2018 @@ -49,7 +49,7 @@ import org.apache.commons.logging.LogFac public class OutInAxisOperation extends TwoChannelAxisOperation { - private static final Log log = LogFactory.getLog(OutInAxisOperation.class); + private static final Log log = LogFactory.getLog(OutInAxisOperation.class); public OutInAxisOperation() { super(); @@ -191,7 +191,7 @@ class OutInAxisOperationClient extends O if (!mc.getOptions().isUseSeparateListener()) { Boolean useAsyncOption = (Boolean) mc.getProperty(Constants.Configuration.USE_ASYNC_OPERATIONS); - if (log.isDebugEnabled()) log.debug("OutInAxisOperationClient: useAsyncOption " + useAsyncOption); + if (log.isDebugEnabled()) log.debug("OutInAxisOperationClient: useAsyncOption " + useAsyncOption); if (useAsyncOption != null) { useAsync = useAsyncOption.booleanValue(); } @@ -255,21 +255,21 @@ class OutInAxisOperationClient extends O } callbackReceiver = new CallbackReceiver(); axisOp.setMessageReceiver(callbackReceiver); - if (log.isDebugEnabled()) log.debug("OutInAxisOperation: callbackReceiver " + callbackReceiver + " : " + axisOp); + if (log.isDebugEnabled()) log.debug("OutInAxisOperation: callbackReceiver " + callbackReceiver + " : " + axisOp); } } SyncCallBack internalCallback = null; if (axisCallback != null) { callbackReceiver.addCallback(mc.getMessageID(), axisCallback); - if (log.isDebugEnabled()) log.debug("OutInAxisOperationClient: Creating axis callback"); + if (log.isDebugEnabled()) log.debug("OutInAxisOperationClient: Creating axis callback"); } else { if (log.isDebugEnabled()) { log.debug("Creating internal callback"); } internalCallback = new SyncCallBack(); callbackReceiver.addCallback(mc.getMessageID(), internalCallback); - if (log.isDebugEnabled()) log.debug("OutInAxisOperationClient: Creating internal callback"); + if (log.isDebugEnabled()) log.debug("OutInAxisOperationClient: Creating internal callback"); } /** @@ -303,7 +303,7 @@ class OutInAxisOperationClient extends O mc.setProperty(MessageContext.CLIENT_API_NON_BLOCKING, Boolean.TRUE); mc.getConfigurationContext().registerOperationContext(mc.getMessageID(), oc); AxisEngine.send(mc); - if (internalCallback != null) { + if (internalCallback != null) { internalCallback.waitForCompletion(options.getTimeOutInMilliSeconds()); // process the result of the invocation @@ -528,7 +528,7 @@ class OutInAxisOperationClient extends O * finally block. */ public synchronized void onComplete() { - complete = true; + complete = true; notify(); }
Modified: axis/axis2/java/core/branches/hermetic-tests/modules/kernel/src/org/apache/axis2/description/PolicySubject.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/hermetic-tests/modules/kernel/src/org/apache/axis2/description/PolicySubject.java?rev=1849802&r1=1849801&r2=1849802&view=diff ============================================================================== --- axis/axis2/java/core/branches/hermetic-tests/modules/kernel/src/org/apache/axis2/description/PolicySubject.java (original) +++ axis/axis2/java/core/branches/hermetic-tests/modules/kernel/src/org/apache/axis2/description/PolicySubject.java Thu Dec 27 18:42:33 2018 @@ -31,111 +31,87 @@ import java.util.List; import java.util.concurrent.ConcurrentHashMap; public class PolicySubject { - - private boolean updated = false; - private Date lastUpdatedTime = new Date(); - - private ConcurrentHashMap<String, PolicyComponent> attachedPolicyComponents = new ConcurrentHashMap<String, PolicyComponent>(); - - public void attachPolicy(Policy policy) { - String key = policy.getName(); - if (key == null) { - key = policy.getId(); - if (key == null) { - key = UIDGenerator.generateUID(); - policy.setId(key); - } - } - attachPolicyComponent(key, policy); - } - - public void attachPolicyReference(PolicyReference reference) { - attachedPolicyComponents.put(reference.getURI(), reference); - setLastUpdatedTime(new Date()); - } - - public void attachPolicyComponents(List<PolicyComponent> policyComponents) { - for (Iterator<PolicyComponent> iterator = policyComponents.iterator(); iterator - .hasNext();) { - attachPolicyComponent((PolicyComponent) iterator.next()); - } - } - - public void attachPolicyComponent(PolicyComponent policyComponent) { - if (policyComponent instanceof Policy) { - attachPolicy((Policy) policyComponent); - } else if (policyComponent instanceof PolicyReference) { - attachPolicyReference((PolicyReference) policyComponent); - } else { - throw new IllegalArgumentException( - "Invalid top level policy component type"); - } - - } - - public void attachPolicyComponent(String key, - PolicyComponent policyComponent) { - attachedPolicyComponents.put(key, policyComponent); - setLastUpdatedTime(new Date()); - - if (!isUpdated()) { - setUpdated(true); - } - } - - public PolicyComponent getAttachedPolicyComponent(String key) { - return (PolicyComponent) attachedPolicyComponents.get(key); - - } - - public Collection<PolicyComponent> getAttachedPolicyComponents() { - return attachedPolicyComponents.values(); - } - - public boolean isUpdated() { - return updated; - } - - public void setUpdated(boolean updated) { - this.updated = updated; - } - - public void updatePolicy(Policy policy) { - String key = (policy.getName() != null) ? policy.getName() : policy - .getId(); - if (key == null) { - throw new IllegalArgumentException( - "policy doesn't have a name or an id "); - } - attachedPolicyComponents.put(key, policy); - setLastUpdatedTime(new Date()); - - if (!isUpdated()) { - setUpdated(true); - } - } - - public void detachPolicyComponent(String key) { - attachedPolicyComponents.remove(key); - setLastUpdatedTime(new Date()); - if (!isUpdated()) { - setUpdated(true); - } - } - - public void clear() { - attachedPolicyComponents.clear(); - setLastUpdatedTime(new Date()); - if (!isUpdated()) { - setUpdated(true); - } - } - - public Date getLastUpdatedTime() { - return lastUpdatedTime; - } - - public void setLastUpdatedTime(Date lastUpdatedTime) { - this.lastUpdatedTime = lastUpdatedTime; - } + private Date lastUpdatedTime = new Date(); + + private ConcurrentHashMap<String, PolicyComponent> attachedPolicyComponents = new ConcurrentHashMap<String, PolicyComponent>(); + + public void attachPolicy(Policy policy) { + String key = policy.getName(); + if (key == null) { + key = policy.getId(); + if (key == null) { + key = UIDGenerator.generateUID(); + policy.setId(key); + } + } + attachPolicyComponent(key, policy); + } + + public void attachPolicyReference(PolicyReference reference) { + attachedPolicyComponents.put(reference.getURI(), reference); + setLastUpdatedTime(new Date()); + } + + public void attachPolicyComponents(List<PolicyComponent> policyComponents) { + for (Iterator<PolicyComponent> iterator = policyComponents.iterator(); iterator + .hasNext();) { + attachPolicyComponent((PolicyComponent) iterator.next()); + } + } + + public void attachPolicyComponent(PolicyComponent policyComponent) { + if (policyComponent instanceof Policy) { + attachPolicy((Policy) policyComponent); + } else if (policyComponent instanceof PolicyReference) { + attachPolicyReference((PolicyReference) policyComponent); + } else { + throw new IllegalArgumentException( + "Invalid top level policy component type"); + } + + } + + public void attachPolicyComponent(String key, + PolicyComponent policyComponent) { + attachedPolicyComponents.put(key, policyComponent); + setLastUpdatedTime(new Date()); + } + + public PolicyComponent getAttachedPolicyComponent(String key) { + return (PolicyComponent) attachedPolicyComponents.get(key); + + } + + public Collection<PolicyComponent> getAttachedPolicyComponents() { + return attachedPolicyComponents.values(); + } + + public void updatePolicy(Policy policy) { + String key = (policy.getName() != null) ? policy.getName() : policy + .getId(); + if (key == null) { + throw new IllegalArgumentException( + "policy doesn't have a name or an id "); + } + attachedPolicyComponents.put(key, policy); + setLastUpdatedTime(new Date()); + } + + public void detachPolicyComponent(String key) { + attachedPolicyComponents.remove(key); + setLastUpdatedTime(new Date()); + } + + public void clear() { + attachedPolicyComponents.clear(); + setLastUpdatedTime(new Date()); + } + + public Date getLastUpdatedTime() { + return lastUpdatedTime; + } + + public void setLastUpdatedTime(Date lastUpdatedTime) { + this.lastUpdatedTime = lastUpdatedTime; + } } Modified: axis/axis2/java/core/branches/hermetic-tests/modules/kernel/src/org/apache/axis2/description/RobustOutOnlyAxisOperation.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/hermetic-tests/modules/kernel/src/org/apache/axis2/description/RobustOutOnlyAxisOperation.java?rev=1849802&r1=1849801&r2=1849802&view=diff ============================================================================== --- axis/axis2/java/core/branches/hermetic-tests/modules/kernel/src/org/apache/axis2/description/RobustOutOnlyAxisOperation.java (original) +++ axis/axis2/java/core/branches/hermetic-tests/modules/kernel/src/org/apache/axis2/description/RobustOutOnlyAxisOperation.java Thu Dec 27 18:42:33 2018 @@ -125,5 +125,5 @@ public class RobustOutOnlyAxisOperation return false; } - } + } } Modified: axis/axis2/java/core/branches/hermetic-tests/modules/kernel/src/org/apache/axis2/engine/AxisConfiguration.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/hermetic-tests/modules/kernel/src/org/apache/axis2/engine/AxisConfiguration.java?rev=1849802&r1=1849801&r2=1849802&view=diff ============================================================================== --- axis/axis2/java/core/branches/hermetic-tests/modules/kernel/src/org/apache/axis2/engine/AxisConfiguration.java (original) +++ axis/axis2/java/core/branches/hermetic-tests/modules/kernel/src/org/apache/axis2/engine/AxisConfiguration.java Thu Dec 27 18:42:33 2018 @@ -446,10 +446,10 @@ public class AxisConfiguration extends A Map<String, AxisEndpoint> endpoints = axisService.getEndpoints(); if (endpoints == null || endpoints.size() == 0) { - org.apache.axis2.deployment.util.Utils.addEndpointsToService( - axisService, axisService.getAxisConfiguration()); + org.apache.axis2.deployment.util.Utils.addEndpointsToService( + axisService, axisService.getAxisConfiguration()); endpoints = axisService.getEndpoints(); - } + } String serviceName = axisService.getName(); addToAllServicesMap(axisService); @@ -1098,7 +1098,7 @@ public class AxisConfiguration extends A } public void setInPhasesUptoAndIncludingPostDispatch( - List<Phase> inPhasesUptoAndIncludingPostDispatch) { + List<Phase> inPhasesUptoAndIncludingPostDispatch) { this.inPhasesUptoAndIncludingPostDispatch = inPhasesUptoAndIncludingPostDispatch; } @@ -1248,10 +1248,10 @@ public class AxisConfiguration extends A * @return ArrayList<AxisObserver> */ public ArrayList<AxisObserver> getObserversList() { - AxisObserver[] array = observerSet.toArray(new AxisObserver[observerSet.size()]); - ArrayList<AxisObserver> observers = new ArrayList<AxisObserver>(array.length); - observers.addAll(Arrays.asList(array)); - return observers; + AxisObserver[] array = observerSet.toArray(new AxisObserver[observerSet.size()]); + ArrayList<AxisObserver> observers = new ArrayList<AxisObserver>(array.length); + observers.addAll(Arrays.asList(array)); + return observers; } public boolean isStart() { @@ -1422,7 +1422,7 @@ public class AxisConfiguration extends A break; } case PhaseMetadata.OUT_FLOW : { - List<Phase> phaseList = phasesinfo.getOUTPhases(); + List<Phase> phaseList = phasesinfo.getOUTPhases(); phaseList = findAndInsertPhase(d, phaseList); if (phaseList != null) { phasesinfo.setOUTPhases(phaseList); @@ -1430,7 +1430,7 @@ public class AxisConfiguration extends A break; } case PhaseMetadata.FAULT_OUT_FLOW : { - List<Phase> phaseList = phasesinfo.getOutFaultPhaseList(); + List<Phase> phaseList = phasesinfo.getOutFaultPhaseList(); phaseList = findAndInsertPhase(d, phaseList); if (phaseList != null) { phasesinfo.setOUT_FaultPhases(phaseList); @@ -1438,7 +1438,7 @@ public class AxisConfiguration extends A break; } case PhaseMetadata.FAULT_IN_FLOW : { - List<Phase> phaseList = phasesinfo.getIN_FaultPhases(); + List<Phase> phaseList = phasesinfo.getIN_FaultPhases(); phaseList = findAndInsertPhase(d, phaseList); if (phaseList != null) { phasesinfo.setIN_FaultPhases(phaseList); @@ -1496,13 +1496,13 @@ public class AxisConfiguration extends A } private void processEndpoints(AxisService axisService, - AxisConfiguration axisConfiguration) throws AxisFault { + AxisConfiguration axisConfiguration) throws AxisFault { Map<String, AxisEndpoint> enspoints = axisService.getEndpoints(); if (enspoints == null || enspoints.size() == 0) { - org.apache.axis2.deployment.util.Utils.addEndpointsToService( - axisService, axisConfiguration); - } - } + org.apache.axis2.deployment.util.Utils.addEndpointsToService( + axisService, axisConfiguration); + } + } public boolean isChildFirstClassLoading(){ boolean childFirstClassLoading = false; Modified: axis/axis2/java/core/branches/hermetic-tests/modules/kernel/src/org/apache/axis2/transport/MessageFormatter.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/hermetic-tests/modules/kernel/src/org/apache/axis2/transport/MessageFormatter.java?rev=1849802&r1=1849801&r2=1849802&view=diff ============================================================================== --- axis/axis2/java/core/branches/hermetic-tests/modules/kernel/src/org/apache/axis2/transport/MessageFormatter.java (original) +++ axis/axis2/java/core/branches/hermetic-tests/modules/kernel/src/org/apache/axis2/transport/MessageFormatter.java Thu Dec 27 18:42:33 2018 @@ -43,14 +43,6 @@ import java.net.URL; * </p> */ public interface MessageFormatter { - - /** - * @return a byte array of the message formatted according to the given - * message format. - */ - public byte[] getBytes(MessageContext messageContext, OMOutputFormat format) - throws AxisFault; - /** * To support deffered writing transports as in http chunking.. Axis2 was * doing this for some time.. Modified: axis/axis2/java/core/branches/hermetic-tests/modules/kernel/src/org/apache/axis2/transport/http/ApplicationXMLFormatter.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/hermetic-tests/modules/kernel/src/org/apache/axis2/transport/http/ApplicationXMLFormatter.java?rev=1849802&r1=1849801&r2=1849802&view=diff ============================================================================== --- axis/axis2/java/core/branches/hermetic-tests/modules/kernel/src/org/apache/axis2/transport/http/ApplicationXMLFormatter.java (original) +++ axis/axis2/java/core/branches/hermetic-tests/modules/kernel/src/org/apache/axis2/transport/http/ApplicationXMLFormatter.java Thu Dec 27 18:42:33 2018 @@ -33,8 +33,6 @@ import org.apache.axis2.util.JavaUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import javax.xml.stream.XMLStreamException; -import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.OutputStream; import java.net.URL; @@ -45,72 +43,6 @@ import java.net.URL; public class ApplicationXMLFormatter implements MessageFormatter { private static final Log log = LogFactory.getLog(ApplicationXMLFormatter.class); - public byte[] getBytes(MessageContext - messageContext, - OMOutputFormat format) throws AxisFault { - return getBytes(messageContext, format, false); - } - - /** - * Get the bytes for this message - * @param messageContext - * @param format - * @param preserve (indicates if the OM should be preserved or consumed) - * @return - * @throws AxisFault - */ - public byte[] getBytes(MessageContext messageContext, - OMOutputFormat format, - boolean preserve) throws AxisFault { - - if (log.isDebugEnabled()) { - log.debug("start getBytes()"); - log.debug(" fault flow=" + - (messageContext.getFLOW() == MessageContext.OUT_FAULT_FLOW)); - } - try { - OMElement omElement; - - // Find the correct element to serialize. Normally it is the first element - // in the body. But if this is a fault, use the detail entry element or the - // fault reason. - if (messageContext.getFLOW() == MessageContext.OUT_FAULT_FLOW) { - SOAPFault fault = messageContext.getEnvelope().getBody().getFault(); - SOAPFaultDetail soapFaultDetail = fault.getDetail(); - omElement = soapFaultDetail.getFirstElement(); - - if (omElement == null) { - omElement = fault.getReason(); - } - - } else { - // Normal case: The xml payload is the first element in the body. - omElement = messageContext.getEnvelope().getBody().getFirstElement(); - } - ByteArrayOutputStream bytesOut = new ByteArrayOutputStream(); - - if (omElement != null) { - - try { - if (preserve) { - omElement.serialize(bytesOut, format); - } else { - omElement.serializeAndConsume(bytesOut, format); - } - } catch (XMLStreamException e) { - throw AxisFault.makeFault(e); - } - - return bytesOut.toByteArray(); - } - - return new byte[0]; - } finally { - if (log.isDebugEnabled()) { - log.debug("end getBytes()"); - } - } - } public void writeTo(MessageContext messageContext, OMOutputFormat format, OutputStream outputStream, boolean preserve) throws AxisFault { @@ -136,12 +68,8 @@ public class ApplicationXMLFormatter imp } if (omElement != null) { try { - if (preserve) { - omElement.serialize(outputStream, format); - } else { - omElement.serializeAndConsume(outputStream, format); - } - } catch (XMLStreamException e) { + omElement.serialize(outputStream, format, preserve); + } catch (IOException e) { throw AxisFault.makeFault(e); } } Modified: axis/axis2/java/core/branches/hermetic-tests/modules/kernel/src/org/apache/axis2/transport/http/MultipartFormDataFormatter.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/hermetic-tests/modules/kernel/src/org/apache/axis2/transport/http/MultipartFormDataFormatter.java?rev=1849802&r1=1849801&r2=1849802&view=diff ============================================================================== --- axis/axis2/java/core/branches/hermetic-tests/modules/kernel/src/org/apache/axis2/transport/http/MultipartFormDataFormatter.java (original) +++ axis/axis2/java/core/branches/hermetic-tests/modules/kernel/src/org/apache/axis2/transport/http/MultipartFormDataFormatter.java Thu Dec 27 18:42:33 2018 @@ -30,7 +30,6 @@ import org.apache.axis2.context.MessageC import org.apache.axis2.transport.MessageFormatter; import org.apache.axis2.transport.http.util.URLTemplatingUtil; -import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.OutputStream; import java.net.URL; @@ -78,49 +77,6 @@ import java.util.Iterator; * @@@@-@@-@@ --AaB03x-- */ public class MultipartFormDataFormatter implements MessageFormatter { - - /** - * @return a byte array of the message formatted according to the given - * message format. - */ - public byte[] getBytes(MessageContext messageContext, OMOutputFormat format) throws AxisFault { - OMElement omElement = messageContext.getEnvelope().getBody().getFirstElement(); - ByteArrayOutputStream bytesOut = new ByteArrayOutputStream(); - try { - createMultipatFormDataRequest(omElement, bytesOut, format); - return bytesOut.toByteArray(); - } catch (IOException e) { - throw new AxisFault(e.getMessage()); - } - } - - /** - * To support deffered writing transports as in http chunking.. Axis2 was - * doing this for some time.. - * <p/> - * Preserve flag can be used to preserve the envelope for later use. This is - * usefull when implementing authentication machnisms like NTLM. - * - * @param outputStream - * @param preserve : - * do not consume the OM when this is set.. - */ - public void writeTo(MessageContext messageContext, OMOutputFormat format, - OutputStream outputStream, boolean preserve) throws AxisFault { - - try { - byte[] b = getBytes(messageContext, format); - - if (b != null && b.length > 0) { - outputStream.write(b); - } else { - outputStream.flush(); - } - } catch (IOException e) { - throw new AxisFault("An error occured while writing the request"); - } - } - /** * Different message formats can set their own content types * Eg: JSONFormatter can set the content type as application/json @@ -163,42 +119,40 @@ public class MultipartFormDataFormatter return soapAction; } - /** - * @param dataOut - * @param bytesOut - * @param format - * @return - * @throws IOException - */ - private void createMultipatFormDataRequest(OMElement dataOut, ByteArrayOutputStream bytesOut, - OMOutputFormat format) throws IOException { + public void writeTo(MessageContext messageContext, OMOutputFormat format, + OutputStream outputStream, boolean preserve) throws AxisFault { + OMElement dataOut = messageContext.getEnvelope().getBody().getFirstElement(); if (dataOut != null) { - Iterator iter1 = dataOut.getChildElements(); - OMFactory omFactory = OMAbstractFactory.getOMFactory(); - OMMultipartWriter writer = new OMMultipartWriter(bytesOut, format); - while (iter1.hasNext()) { - OMElement ele = (OMElement) iter1.next(); - Iterator iter2 = ele.getChildElements(); - // check whether the element is a complex type - if (iter2.hasNext()) { - OMElement omElement = - omFactory.createOMElement(ele.getQName().getLocalPart(), null); - omElement.addChild( - processComplexType(omElement, ele.getChildElements(), omFactory)); - OutputStream partOutputStream = writer.writePart(DEFAULT_CONTENT_TYPE, null, - Collections.singletonList(new Header("Content-Disposition", - DISPOSITION_TYPE + "; name=\"" + omElement.getLocalName() + "\""))); - partOutputStream.write(omElement.toString().getBytes()); - partOutputStream.close(); - } else { - OutputStream partOutputStream = writer.writePart(DEFAULT_CONTENT_TYPE, null, - Collections.singletonList(new Header("Content-Disposition", - DISPOSITION_TYPE + "; name=\"" + ele.getLocalName() + "\""))); - partOutputStream.write(ele.getText().getBytes()); - partOutputStream.close(); + try { + Iterator iter1 = dataOut.getChildElements(); + OMFactory omFactory = OMAbstractFactory.getOMFactory(); + OMMultipartWriter writer = new OMMultipartWriter(outputStream, format); + while (iter1.hasNext()) { + OMElement ele = (OMElement) iter1.next(); + Iterator iter2 = ele.getChildElements(); + // check whether the element is a complex type + if (iter2.hasNext()) { + OMElement omElement = + omFactory.createOMElement(ele.getQName().getLocalPart(), null); + omElement.addChild( + processComplexType(omElement, ele.getChildElements(), omFactory)); + OutputStream partOutputStream = writer.writePart(DEFAULT_CONTENT_TYPE, null, + Collections.singletonList(new Header("Content-Disposition", + DISPOSITION_TYPE + "; name=\"" + omElement.getLocalName() + "\""))); + partOutputStream.write(omElement.toString().getBytes()); + partOutputStream.close(); + } else { + OutputStream partOutputStream = writer.writePart(DEFAULT_CONTENT_TYPE, null, + Collections.singletonList(new Header("Content-Disposition", + DISPOSITION_TYPE + "; name=\"" + ele.getLocalName() + "\""))); + partOutputStream.write(ele.getText().getBytes()); + partOutputStream.close(); + } } + writer.complete(); + } catch (IOException ex) { + throw AxisFault.makeFault(ex); } - writer.complete(); } } Modified: axis/axis2/java/core/branches/hermetic-tests/modules/kernel/src/org/apache/axis2/transport/http/SOAPMessageFormatter.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/hermetic-tests/modules/kernel/src/org/apache/axis2/transport/http/SOAPMessageFormatter.java?rev=1849802&r1=1849801&r2=1849802&view=diff ============================================================================== --- axis/axis2/java/core/branches/hermetic-tests/modules/kernel/src/org/apache/axis2/transport/http/SOAPMessageFormatter.java (original) +++ axis/axis2/java/core/branches/hermetic-tests/modules/kernel/src/org/apache/axis2/transport/http/SOAPMessageFormatter.java Thu Dec 27 18:42:33 2018 @@ -38,9 +38,7 @@ import org.apache.axis2.util.Utils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import javax.xml.stream.FactoryConfigurationError; import javax.xml.stream.XMLStreamException; -import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.OutputStream; import java.net.URL; @@ -84,13 +82,9 @@ public class SOAPMessageFormatter implem message = ((SOAPFactory)envelope.getOMFactory()).createSOAPMessage(); message.setSOAPEnvelope(envelope); } - if (preserve) { - message.serialize(out, format); - } else { - message.serializeAndConsume(out, format); - } + message.serialize(out, format, preserve); } - } catch (XMLStreamException e) { + } catch (IOException e) { throw AxisFault.makeFault(e); } finally { if (log.isDebugEnabled()) { @@ -99,13 +93,6 @@ public class SOAPMessageFormatter implem } } - public byte[] getBytes(MessageContext msgCtxt, OMOutputFormat format) - throws AxisFault { - ByteArrayOutputStream out = new ByteArrayOutputStream(); - writeTo(msgCtxt, format, out, true); - return out.toByteArray(); - } - public String getContentType(MessageContext msgCtxt, OMOutputFormat format, String soapActionString) { String encoding = format.getCharSetEncoding(); Modified: axis/axis2/java/core/branches/hermetic-tests/modules/kernel/src/org/apache/axis2/transport/http/XFormURLEncodedFormatter.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/hermetic-tests/modules/kernel/src/org/apache/axis2/transport/http/XFormURLEncodedFormatter.java?rev=1849802&r1=1849801&r2=1849802&view=diff ============================================================================== --- axis/axis2/java/core/branches/hermetic-tests/modules/kernel/src/org/apache/axis2/transport/http/XFormURLEncodedFormatter.java (original) +++ axis/axis2/java/core/branches/hermetic-tests/modules/kernel/src/org/apache/axis2/transport/http/XFormURLEncodedFormatter.java Thu Dec 27 18:42:33 2018 @@ -31,6 +31,7 @@ import org.apache.axis2.util.JavaUtils; import java.io.IOException; import java.io.OutputStream; +import java.io.OutputStreamWriter; import java.net.URL; import java.util.Iterator; @@ -38,36 +39,28 @@ import java.util.Iterator; * Formates the request message as application/x-www-form-urlencoded */ public class XFormURLEncodedFormatter implements MessageFormatter { - - public byte[] getBytes(MessageContext messageContext, OMOutputFormat format) throws AxisFault { - + public void writeTo(MessageContext messageContext, OMOutputFormat format, + OutputStream outputStream, boolean preserve) throws AxisFault { OMElement omElement = messageContext.getEnvelope().getBody().getFirstElement(); - if (omElement != null) { - Iterator it = omElement.getChildElements(); - String paraString = ""; - - while (it.hasNext()) { - OMElement ele1 = (OMElement) it.next(); - String parameter; - - parameter = ele1.getLocalName() + "=" + ele1.getText(); - paraString = "".equals(paraString) ? parameter : (paraString + "&" + parameter); + try { + OutputStreamWriter writer = new OutputStreamWriter(outputStream, "utf-8"); + boolean first = true; + for (Iterator<OMElement> it = omElement.getChildElements(); it.hasNext(); ) { + OMElement child = it.next(); + if (first) { + first = false; + } else { + writer.write('&'); + } + writer.write(child.getLocalName()); + writer.write('='); + child.writeTextTo(writer, preserve); + } + writer.flush(); + } catch (IOException e) { + throw new AxisFault("An error occured while writing the request"); } - - return paraString.getBytes(); - } - - return new byte[0]; - } - - public void writeTo(MessageContext messageContext, OMOutputFormat format, - OutputStream outputStream, boolean preserve) throws AxisFault { - - try { - outputStream.write(getBytes(messageContext, format)); - } catch (IOException e) { - throw new AxisFault("An error occured while writing the request"); } } Modified: axis/axis2/java/core/branches/hermetic-tests/modules/kernel/test-resources/deployment/echo/build.xml URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/hermetic-tests/modules/kernel/test-resources/deployment/echo/build.xml?rev=1849802&r1=1849801&r2=1849802&view=diff ============================================================================== --- axis/axis2/java/core/branches/hermetic-tests/modules/kernel/test-resources/deployment/echo/build.xml (original) +++ axis/axis2/java/core/branches/hermetic-tests/modules/kernel/test-resources/deployment/echo/build.xml Thu Dec 27 18:42:33 2018 @@ -36,7 +36,7 @@ <target name="compile" depends="init" unless="jars.uptodate"> <mkdir dir="${build.classes}"/> <mkdir dir="${build.lib}"/> - <javac destdir="${build.classes}" debug="on"> + <javac destdir="${build.classes}" debug="on" fork="true"> <classpath refid="axis.test.classpath"/> <src path="${src}"/> </javac> Modified: axis/axis2/java/core/branches/hermetic-tests/modules/kernel/test-resources/deployment/invalidservice/build.xml URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/hermetic-tests/modules/kernel/test-resources/deployment/invalidservice/build.xml?rev=1849802&r1=1849801&r2=1849802&view=diff ============================================================================== --- axis/axis2/java/core/branches/hermetic-tests/modules/kernel/test-resources/deployment/invalidservice/build.xml (original) +++ axis/axis2/java/core/branches/hermetic-tests/modules/kernel/test-resources/deployment/invalidservice/build.xml Thu Dec 27 18:42:33 2018 @@ -37,7 +37,7 @@ <target name="compile" depends="init" unless="jars.uptodate"> <mkdir dir="${build.classes}"/> <mkdir dir="${build.lib}"/> - <javac destdir="${build.classes}" debug="on"> + <javac destdir="${build.classes}" debug="on" fork="true"> <classpath refid="axis.test.classpath"/> <src path="${src}"/> </javac> Modified: axis/axis2/java/core/branches/hermetic-tests/modules/kernel/test-resources/deployment/module1/build.xml URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/hermetic-tests/modules/kernel/test-resources/deployment/module1/build.xml?rev=1849802&r1=1849801&r2=1849802&view=diff ============================================================================== --- axis/axis2/java/core/branches/hermetic-tests/modules/kernel/test-resources/deployment/module1/build.xml (original) +++ axis/axis2/java/core/branches/hermetic-tests/modules/kernel/test-resources/deployment/module1/build.xml Thu Dec 27 18:42:33 2018 @@ -36,7 +36,7 @@ <target name="compile" depends="init" unless="jars.uptodate"> <mkdir dir="${build.classes}"/> <mkdir dir="${build.lib}"/> - <javac destdir="${build.classes}" debug="on"> + <javac destdir="${build.classes}" debug="on" fork="true"> <classpath refid="axis.test.classpath"/> <src path="${src}"/> </javac> Modified: axis/axis2/java/core/branches/hermetic-tests/modules/kernel/test-resources/deployment/service2/build.xml URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/hermetic-tests/modules/kernel/test-resources/deployment/service2/build.xml?rev=1849802&r1=1849801&r2=1849802&view=diff ============================================================================== --- axis/axis2/java/core/branches/hermetic-tests/modules/kernel/test-resources/deployment/service2/build.xml (original) +++ axis/axis2/java/core/branches/hermetic-tests/modules/kernel/test-resources/deployment/service2/build.xml Thu Dec 27 18:42:33 2018 @@ -36,7 +36,7 @@ <target name="compile" depends="init" unless="jars.uptodate"> <mkdir dir="${build.classes}"/> <mkdir dir="${build.lib}"/> - <javac destdir="${build.classes}" debug="on"> + <javac destdir="${build.classes}" debug="on" fork="true"> <classpath refid="axis.test.classpath"/> <src path="${src}"/> </javac> Modified: axis/axis2/java/core/branches/hermetic-tests/modules/kernel/test-resources/deployment/serviceModule/build.xml URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/hermetic-tests/modules/kernel/test-resources/deployment/serviceModule/build.xml?rev=1849802&r1=1849801&r2=1849802&view=diff ============================================================================== --- axis/axis2/java/core/branches/hermetic-tests/modules/kernel/test-resources/deployment/serviceModule/build.xml (original) +++ axis/axis2/java/core/branches/hermetic-tests/modules/kernel/test-resources/deployment/serviceModule/build.xml Thu Dec 27 18:42:33 2018 @@ -36,7 +36,7 @@ <target name="compile" depends="init" unless="jars.uptodate"> <mkdir dir="${build.classes}"/> <mkdir dir="${build.lib}"/> - <javac destdir="${build.classes}" debug="on"> + <javac destdir="${build.classes}" debug="on" fork="true"> <classpath refid="axis.test.classpath"/> <src path="${src}"/> </javac> Modified: axis/axis2/java/core/branches/hermetic-tests/modules/kernel/test/org/apache/axis2/addressing/EndpointReferenceHelperTest.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/hermetic-tests/modules/kernel/test/org/apache/axis2/addressing/EndpointReferenceHelperTest.java?rev=1849802&r1=1849801&r2=1849802&view=diff ============================================================================== --- axis/axis2/java/core/branches/hermetic-tests/modules/kernel/test/org/apache/axis2/addressing/EndpointReferenceHelperTest.java (original) +++ axis/axis2/java/core/branches/hermetic-tests/modules/kernel/test/org/apache/axis2/addressing/EndpointReferenceHelperTest.java Thu Dec 27 18:42:33 2018 @@ -29,6 +29,9 @@ import org.apache.axis2.addressing.metad import javax.xml.namespace.QName; +import static com.google.common.truth.Truth.assertAbout; +import static org.apache.axiom.truth.xml.XMLTruth.xml; + import java.util.ArrayList; import java.util.Map; @@ -81,7 +84,7 @@ public class EndpointReferenceHelperTest EndpointReference deser = EndpointReferenceHelper.fromOM(om); assertEquals(epr.getAddress(), deser.getAddress()); - ArrayList addrAttrs = deser.getAddressAttributes(); + ArrayList<OMAttribute> addrAttrs = deser.getAddressAttributes(); compareAttributes(attr1, (OMAttribute)addrAttrs.get(0)); compareAttributes(attr2, (OMAttribute)addrAttrs.get(1)); @@ -90,15 +93,15 @@ public class EndpointReferenceHelperTest compareAttributes(attr2, (OMAttribute)attrs.get(1)); ArrayList metadata = deser.getMetaData(); - assertEquals(md1, metadata.get(0)); - assertEquals(md2, metadata.get(1)); + assertAbout(xml()).that(metadata.get(0)).hasSameContentAs(md1); + assertAbout(xml()).that(metadata.get(1)).hasSameContentAs(md2); ArrayList mdAttrs = deser.getMetadataAttributes(); compareAttributes(attr1, (OMAttribute)mdAttrs.get(0)); compareAttributes(attr2, (OMAttribute)mdAttrs.get(1)); ArrayList extelts = deser.getExtensibleElements(); - assertEquals(ext1, extelts.get(0)); - assertEquals(ext2, extelts.get(1)); + assertAbout(xml()).that(extelts.get(0)).hasSameContentAs(ext1); + assertAbout(xml()).that(extelts.get(1)).hasSameContentAs(ext2); Map m = deser.getAllReferenceParameters(); assertEquals("rp1", ((OMElement) m.get(rp1Qname)).getText()); @@ -110,23 +113,23 @@ public class EndpointReferenceHelperTest assertEquals(epr.getAddress(), deser.getAddress()); addrAttrs = deser.getAddressAttributes(); - assertEquals(attr1, addrAttrs.get(0)); - assertEquals(attr2, addrAttrs.get(1)); + compareAttributes(attr1, addrAttrs.get(0)); + compareAttributes(attr2, addrAttrs.get(1)); attrs = deser.getAttributes(); compareAttributes(attr1, (OMAttribute)attrs.get(0)); compareAttributes(attr2, (OMAttribute)attrs.get(1)); metadata = deser.getMetaData(); - assertEquals(md1, metadata.get(0)); - assertEquals(md2, metadata.get(1)); + assertAbout(xml()).that(metadata.get(0)).hasSameContentAs(md1); + assertAbout(xml()).that(metadata.get(1)).hasSameContentAs(md2); mdAttrs = deser.getMetadataAttributes(); compareAttributes(attr1, (OMAttribute)mdAttrs.get(0)); compareAttributes(attr2, (OMAttribute)mdAttrs.get(1)); extelts = deser.getExtensibleElements(); - assertEquals(ext1, extelts.get(0)); - assertEquals(ext2, extelts.get(1)); + assertAbout(xml()).that(extelts.get(0)).hasSameContentAs(ext1); + assertAbout(xml()).that(extelts.get(1)).hasSameContentAs(ext2); m = deser.getAllReferenceParameters(); assertEquals("rp1", ((OMElement) m.get(rp1Qname)).getText()); @@ -204,8 +207,8 @@ public class EndpointReferenceHelperTest assertNull(metadata); ArrayList extelts = deser.getExtensibleElements(); - assertEquals(ext1, extelts.get(0)); - assertEquals(ext2, extelts.get(1)); + assertAbout(xml()).that(extelts.get(0)).hasSameContentAs(ext1); + assertAbout(xml()).that(extelts.get(1)).hasSameContentAs(ext2); //All reference properties are returned as reference parameters. Map m = deser.getAllReferenceParameters(); @@ -233,8 +236,8 @@ public class EndpointReferenceHelperTest assertNull(metadata); extelts = deser.getExtensibleElements(); - assertEquals(ext1, extelts.get(0)); - assertEquals(ext2, extelts.get(1)); + assertAbout(xml()).that(extelts.get(0)).hasSameContentAs(ext1); + assertAbout(xml()).that(extelts.get(1)).hasSameContentAs(ext2); //All reference properties are returned as reference parameters. m = deser.getAllReferenceParameters(); Modified: axis/axis2/java/core/branches/hermetic-tests/modules/kernel/test/org/apache/axis2/addressing/wsdl/WSDL11ActionHelperTest.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/hermetic-tests/modules/kernel/test/org/apache/axis2/addressing/wsdl/WSDL11ActionHelperTest.java?rev=1849802&r1=1849801&r2=1849802&view=diff ============================================================================== --- axis/axis2/java/core/branches/hermetic-tests/modules/kernel/test/org/apache/axis2/addressing/wsdl/WSDL11ActionHelperTest.java (original) +++ axis/axis2/java/core/branches/hermetic-tests/modules/kernel/test/org/apache/axis2/addressing/wsdl/WSDL11ActionHelperTest.java Thu Dec 27 18:42:33 2018 @@ -48,7 +48,7 @@ public class WSDL11ActionHelperTest exte reader.setFeature("javax.wsdl.verbose", false); URL wsdlFile = new File(AbstractTestCase.basedir + testWSDLFile) - .toURL();//getClass().getClassLoader().getResource(testWSDLFile); + .toURI().toURL();//getClass().getClassLoader().getResource(testWSDLFile); definition = reader.readWSDL(wsdlFile.toString()); } Modified: axis/axis2/java/core/branches/hermetic-tests/modules/kernel/test/org/apache/axis2/client/ServiceClientTest.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/hermetic-tests/modules/kernel/test/org/apache/axis2/client/ServiceClientTest.java?rev=1849802&r1=1849801&r2=1849802&view=diff ============================================================================== --- axis/axis2/java/core/branches/hermetic-tests/modules/kernel/test/org/apache/axis2/client/ServiceClientTest.java (original) +++ axis/axis2/java/core/branches/hermetic-tests/modules/kernel/test/org/apache/axis2/client/ServiceClientTest.java Thu Dec 27 18:42:33 2018 @@ -45,7 +45,7 @@ public class ServiceClientTest extends A if (basedir == null) { basedir = "."; } - URL zipUrl = new File(basedir, "target/test-zip.zip").toURL(); + URL zipUrl = new File(basedir, "target/test-zip.zip").toURI().toURL(); URL wsdlUrl = new URL("jar:" + zipUrl + "!/test.wsdl"); ServiceClient serviceClient = new ServiceClient(configContext, wsdlUrl, new QName("urn:test", "EchoService"), "EchoPort"); List<XmlSchema> schemas = serviceClient.getAxisService().getSchema(); Modified: axis/axis2/java/core/branches/hermetic-tests/modules/kernel/test/org/apache/axis2/description/WSDLWrapperTest.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/hermetic-tests/modules/kernel/test/org/apache/axis2/description/WSDLWrapperTest.java?rev=1849802&r1=1849801&r2=1849802&view=diff ============================================================================== --- axis/axis2/java/core/branches/hermetic-tests/modules/kernel/test/org/apache/axis2/description/WSDLWrapperTest.java (original) +++ axis/axis2/java/core/branches/hermetic-tests/modules/kernel/test/org/apache/axis2/description/WSDLWrapperTest.java Thu Dec 27 18:42:33 2018 @@ -115,7 +115,7 @@ public class WSDLWrapperTest extends Tes .createConfigurationContextFromFileSystem(null, axis2xml) .getAxisConfiguration(); - WSDLDefinitionWrapper passthru = new WSDLDefinitionWrapper(def1, testResourceFile1.toURL(), false); + WSDLDefinitionWrapper passthru = new WSDLDefinitionWrapper(def1, testResourceFile1.toURI().toURL(), false); Definition def_passthru = passthru.getUnwrappedDefinition(); String def_passthru_str = def_passthru.toString(); @@ -123,7 +123,7 @@ public class WSDLWrapperTest extends Tes String def_passthru_namespace = def_passthru.getTargetNamespace(); Types def_passthru_types = def_passthru.getTypes(); - WSDLDefinitionWrapper serialize = new WSDLDefinitionWrapper(def1, testResourceFile1.toURL(), axisCfg); + WSDLDefinitionWrapper serialize = new WSDLDefinitionWrapper(def1, testResourceFile1.toURI().toURL(), axisCfg); Definition def_serialize = serialize.getUnwrappedDefinition(); String def_serialize_str = def_serialize.toString(); @@ -131,7 +131,7 @@ public class WSDLWrapperTest extends Tes String def_serialize_namespace = def_serialize.getTargetNamespace(); Types def_serialize_types = def_serialize.getTypes(); - WSDLDefinitionWrapper reload = new WSDLDefinitionWrapper(def1, testResourceFile1.toURL(), 2); + WSDLDefinitionWrapper reload = new WSDLDefinitionWrapper(def1, testResourceFile1.toURI().toURL(), 2); Definition def_reload = reload.getUnwrappedDefinition(); String def_reload_str = def_reload.toString(); Modified: axis/axis2/java/core/branches/hermetic-tests/modules/kernel/test/org/apache/axis2/transport/http/MultipartFormDataFormatterTest.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/hermetic-tests/modules/kernel/test/org/apache/axis2/transport/http/MultipartFormDataFormatterTest.java?rev=1849802&r1=1849801&r2=1849802&view=diff ============================================================================== --- axis/axis2/java/core/branches/hermetic-tests/modules/kernel/test/org/apache/axis2/transport/http/MultipartFormDataFormatterTest.java (original) +++ axis/axis2/java/core/branches/hermetic-tests/modules/kernel/test/org/apache/axis2/transport/http/MultipartFormDataFormatterTest.java Thu Dec 27 18:42:33 2018 @@ -74,27 +74,6 @@ public class MultipartFormDataFormatterT return enp; } - public void testGetBytes() throws AxisFault { - - OMOutputFormat omOutput = new OMOutputFormat(); - String boundary = omOutput.getMimeBoundary(); - byte[] bytes = formatter.getBytes(messageContext, omOutput); - String message = new String(bytes); - - assertNotNull("bytes can not be null", bytes); - assertTrue("Can not find the content", message.contains(boundary)); - assertTrue("Can not find the content", - message.contains("Content-Disposition: form-data; name=\"part1\"")); - assertTrue("Can not find the content", - message.contains("Content-Disposition: form-data; name=\"part2\"")); - assertTrue("Can not find the content", - message.contains("Content-Type: text/plain; charset=US-ASCII")); - //assertTrue("Can not find the content", message.contains("Content-Transfer-Encoding: 8bit")); - assertTrue("Can not find the content", message.contains("sample data part 1")); - assertTrue("Can not find the content", message.contains("sample data part 2")); - - } - public void testWriteTo() throws AxisFault { OMOutputFormat omOutput = new OMOutputFormat(); Modified: axis/axis2/java/core/branches/hermetic-tests/modules/kernel/test/org/apache/axis2/validation/ValidateAxis2XMLTest.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/hermetic-tests/modules/kernel/test/org/apache/axis2/validation/ValidateAxis2XMLTest.java?rev=1849802&r1=1849801&r2=1849802&view=diff ============================================================================== --- axis/axis2/java/core/branches/hermetic-tests/modules/kernel/test/org/apache/axis2/validation/ValidateAxis2XMLTest.java (original) +++ axis/axis2/java/core/branches/hermetic-tests/modules/kernel/test/org/apache/axis2/validation/ValidateAxis2XMLTest.java Thu Dec 27 18:42:33 2018 @@ -54,7 +54,7 @@ public class ValidateAxis2XMLTest extend SAXParser parser = factory.newSAXParser(); //validate against the given schemaURL - parser.setProperty(extSchemaProp, xsdSource.toURL().toString()); + parser.setProperty(extSchemaProp, xsdSource.toURI().toURL().toString()); // parse (validates) the xml parser.parse(xmlSource, new DefaultHandler()); Modified: axis/axis2/java/core/branches/hermetic-tests/modules/metadata/pom.xml URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/hermetic-tests/modules/metadata/pom.xml?rev=1849802&r1=1849801&r2=1849802&view=diff ============================================================================== --- axis/axis2/java/core/branches/hermetic-tests/modules/metadata/pom.xml (original) +++ axis/axis2/java/core/branches/hermetic-tests/modules/metadata/pom.xml Thu Dec 27 18:42:33 2018 @@ -56,14 +56,8 @@ <artifactId>xml-resolver</artifactId> </dependency> <dependency> - <groupId>com.sun.xml.bind</groupId> - <artifactId>jaxb-impl</artifactId> - <exclusions> - <exclusion> - <artifactId>jsr173</artifactId> - <groupId>javax.xml</groupId> - </exclusion> - </exclusions> + <groupId>org.glassfish.jaxb</groupId> + <artifactId>jaxb-runtime</artifactId> </dependency> <dependency> <groupId>junit</groupId> @@ -154,37 +148,6 @@ </executions> </plugin> <plugin> - <groupId>com.github.veithen.alta</groupId> - <artifactId>alta-maven-plugin</artifactId> - <executions> - <execution> - <goals> - <goal>generate-properties</goal> - </goals> - <configuration> - <artifacts> - <artifact> - <groupId>org.apache.geronimo.specs</groupId> - <artifactId>geronimo-jaxws_2.2_spec</artifactId> - </artifact> - </artifacts> - <name>jaxws.bootclasspath</name> - <value>%file%</value> - <separator>${path.separator}</separator> - </configuration> - </execution> - </executions> - </plugin> - <plugin> - <artifactId>maven-compiler-plugin</artifactId> - <inherited>true</inherited> - <configuration> - <compilerArgument> - -Xbootclasspath/p:${jaxws.bootclasspath} - </compilerArgument> - </configuration> - </plugin> - <plugin> <groupId>org.apache.axis2</groupId> <artifactId>axis2-repo-maven-plugin</artifactId> <executions> @@ -201,19 +164,18 @@ </executions> </plugin> <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>jaxb2-maven-plugin</artifactId> + <groupId>com.github.veithen.maven</groupId> + <artifactId>xjc-maven-plugin</artifactId> <executions> <execution> <goals> - <goal>testXjc</goal> + <goal>generate-test-sources</goal> </goals> <configuration> - <sourceType>WSDL</sourceType> - <testSources> - <testSource>test-resources/wsdl/ProxyDocLitWrapped.wsdl</testSource> - </testSources> - <packageName>org.test.proxy.doclitwrapped</packageName> + <schemaLanguage>WSDL</schemaLanguage> + <files> + <file>test-resources/wsdl/ProxyDocLitWrapped.wsdl</file> + </files> </configuration> </execution> </executions> @@ -248,9 +210,6 @@ <artifactId>maven-surefire-plugin</artifactId> <inherited>true</inherited> <configuration> - <argLine> - -Xbootclasspath/p:${jaxws.bootclasspath} - </argLine> <includes> <include>**/*Tests.java</include> </includes> Modified: axis/axis2/java/core/branches/hermetic-tests/modules/metadata/src/org/apache/axis2/jaxws/description/builder/JAXWSRIWSDLGenerator.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/hermetic-tests/modules/metadata/src/org/apache/axis2/jaxws/description/builder/JAXWSRIWSDLGenerator.java?rev=1849802&r1=1849801&r2=1849802&view=diff ============================================================================== --- axis/axis2/java/core/branches/hermetic-tests/modules/metadata/src/org/apache/axis2/jaxws/description/builder/JAXWSRIWSDLGenerator.java (original) +++ axis/axis2/java/core/branches/hermetic-tests/modules/metadata/src/org/apache/axis2/jaxws/description/builder/JAXWSRIWSDLGenerator.java Thu Dec 27 18:42:33 2018 @@ -239,7 +239,7 @@ public class JAXWSRIWSDLGenerator implem if (wsdlFile != null) { try { WSDLReader wsdlReader = WSDLUtil.newWSDLReaderWithPopulatedExtensionRegistry(); - InputStream is = wsdlFile.toURL().openStream(); + InputStream is = wsdlFile.toURI().toURL().openStream(); Definition definition = wsdlReader.readWSDL(localOutputDirectory, new InputSource(is)); try { @@ -331,7 +331,7 @@ public class JAXWSRIWSDLGenerator implem List<File> schemaFiles = getSchemaFiles(localOutputDirectory); for (File schemaFile : schemaFiles) { // generate dom document for current schema file - Document parsedDoc = fac.newDocumentBuilder().parse(schemaFile.toURL().toString()); + Document parsedDoc = fac.newDocumentBuilder().parse(schemaFile.toURI().toURL().toString()); // read the schema through XmlSchema XmlSchema doc = schemaCollection.read(parsedDoc.getDocumentElement(), UIDGenerator.generateUID()); Modified: axis/axis2/java/core/branches/hermetic-tests/modules/metadata/src/org/apache/axis2/jaxws/description/impl/OperationDescriptionImpl.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/hermetic-tests/modules/metadata/src/org/apache/axis2/jaxws/description/impl/OperationDescriptionImpl.java?rev=1849802&r1=1849801&r2=1849802&view=diff ============================================================================== --- axis/axis2/java/core/branches/hermetic-tests/modules/metadata/src/org/apache/axis2/jaxws/description/impl/OperationDescriptionImpl.java (original) +++ axis/axis2/java/core/branches/hermetic-tests/modules/metadata/src/org/apache/axis2/jaxws/description/impl/OperationDescriptionImpl.java Thu Dec 27 18:42:33 2018 @@ -2172,7 +2172,7 @@ class OperationDescriptionImpl WSDL4JWrapper wsdl4j = null; try { File file = new File(wsdlLocation); - URL url = file.toURL(); + URL url = file.toURI().toURL(); wsdl4j = new WSDL4JWrapper(url, true, 2); // In this context, limit the wsdl memory def = wsdl4j.getDefinition(); } catch (Throwable t) { Modified: axis/axis2/java/core/branches/hermetic-tests/modules/metadata/src/org/apache/axis2/jaxws/description/impl/URIResolverImpl.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/hermetic-tests/modules/metadata/src/org/apache/axis2/jaxws/description/impl/URIResolverImpl.java?rev=1849802&r1=1849801&r2=1849802&view=diff ============================================================================== --- axis/axis2/java/core/branches/hermetic-tests/modules/metadata/src/org/apache/axis2/jaxws/description/impl/URIResolverImpl.java (original) +++ axis/axis2/java/core/branches/hermetic-tests/modules/metadata/src/org/apache/axis2/jaxws/description/impl/URIResolverImpl.java Thu Dec 27 18:42:33 2018 @@ -256,7 +256,7 @@ public class URIResolverImpl implements streamURL = (URL) AccessController.doPrivileged( new PrivilegedExceptionAction() { public Object run() throws MalformedURLException { - return file.toURL(); + return file.toURI().toURL(); } } ); Modified: axis/axis2/java/core/branches/hermetic-tests/modules/metadata/src/org/apache/axis2/jaxws/util/BaseWSDLLocator.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/hermetic-tests/modules/metadata/src/org/apache/axis2/jaxws/util/BaseWSDLLocator.java?rev=1849802&r1=1849801&r2=1849802&view=diff ============================================================================== --- axis/axis2/java/core/branches/hermetic-tests/modules/metadata/src/org/apache/axis2/jaxws/util/BaseWSDLLocator.java (original) +++ axis/axis2/java/core/branches/hermetic-tests/modules/metadata/src/org/apache/axis2/jaxws/util/BaseWSDLLocator.java Thu Dec 27 18:42:33 2018 @@ -126,7 +126,7 @@ public abstract class BaseWSDLLocator { if(is == null){ try{ File file = new File(relativeLocation); - absoluteURL = file.toURL(); + absoluteURL = file.toURI().toURL(); is = absoluteURL.openStream(); lastestImportURI = absoluteURL.toExternalForm(); } Modified: axis/axis2/java/core/branches/hermetic-tests/modules/metadata/src/org/apache/axis2/jaxws/util/CatalogWSDLLocator.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/hermetic-tests/modules/metadata/src/org/apache/axis2/jaxws/util/CatalogWSDLLocator.java?rev=1849802&r1=1849801&r2=1849802&view=diff ============================================================================== --- axis/axis2/java/core/branches/hermetic-tests/modules/metadata/src/org/apache/axis2/jaxws/util/CatalogWSDLLocator.java (original) +++ axis/axis2/java/core/branches/hermetic-tests/modules/metadata/src/org/apache/axis2/jaxws/util/CatalogWSDLLocator.java Thu Dec 27 18:42:33 2018 @@ -117,7 +117,7 @@ public class CatalogWSDLLocator extends if (is == null) { try { File file = new File(importPath); - is = file.toURL().openStream(); + is = file.toURI().toURL().openStream(); } catch (Throwable t) { // No FFDC required @@ -180,7 +180,7 @@ public class CatalogWSDLLocator extends if (is == null) { try { File file = new File(wsdlLocation); - streamURL = file.toURL(); + streamURL = file.toURI().toURL(); is = streamURL.openStream(); is.close(); } Modified: axis/axis2/java/core/branches/hermetic-tests/modules/metadata/src/org/apache/axis2/jaxws/util/ModuleWSDLLocator.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/hermetic-tests/modules/metadata/src/org/apache/axis2/jaxws/util/ModuleWSDLLocator.java?rev=1849802&r1=1849801&r2=1849802&view=diff ============================================================================== --- axis/axis2/java/core/branches/hermetic-tests/modules/metadata/src/org/apache/axis2/jaxws/util/ModuleWSDLLocator.java (original) +++ axis/axis2/java/core/branches/hermetic-tests/modules/metadata/src/org/apache/axis2/jaxws/util/ModuleWSDLLocator.java Thu Dec 27 18:42:33 2018 @@ -99,7 +99,7 @@ public class ModuleWSDLLocator extends B if (is == null) { try { File file = new File(importPath); - is = file.toURL().openStream(); + is = file.toURI().toURL().openStream(); } catch (Throwable t) { // No FFDC required @@ -156,7 +156,7 @@ public class ModuleWSDLLocator extends B if (is == null) { try { File file = new File(wsdlLocation); - streamURL = file.toURL(); + streamURL = file.toURI().toURL(); is = streamURL.openStream(); is.close(); } Modified: axis/axis2/java/core/branches/hermetic-tests/modules/metadata/src/org/apache/axis2/metadata/registry/MetadataFactoryRegistry.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/hermetic-tests/modules/metadata/src/org/apache/axis2/metadata/registry/MetadataFactoryRegistry.java?rev=1849802&r1=1849801&r2=1849802&view=diff ============================================================================== --- axis/axis2/java/core/branches/hermetic-tests/modules/metadata/src/org/apache/axis2/metadata/registry/MetadataFactoryRegistry.java (original) +++ axis/axis2/java/core/branches/hermetic-tests/modules/metadata/src/org/apache/axis2/metadata/registry/MetadataFactoryRegistry.java Thu Dec 27 18:42:33 2018 @@ -99,7 +99,7 @@ public class MetadataFactoryRegistry { url = classLoader.getResource(configurationFileLoc); if(url == null) { File file = new File(configurationFileLoc); - url = file.toURL(); + url = file.toURI().toURL(); } // the presence of this file is optional if(url != null) { Modified: axis/axis2/java/core/branches/hermetic-tests/modules/metadata/test/org/apache/axis2/jaxws/description/DescriptionTestUtils.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/hermetic-tests/modules/metadata/test/org/apache/axis2/jaxws/description/DescriptionTestUtils.java?rev=1849802&r1=1849801&r2=1849802&view=diff ============================================================================== --- axis/axis2/java/core/branches/hermetic-tests/modules/metadata/test/org/apache/axis2/jaxws/description/DescriptionTestUtils.java (original) +++ axis/axis2/java/core/branches/hermetic-tests/modules/metadata/test/org/apache/axis2/jaxws/description/DescriptionTestUtils.java Thu Dec 27 18:42:33 2018 @@ -57,7 +57,7 @@ public class DescriptionTestUtils { String urlString = getWSDLLocation(wsdlFileName); // Get the URL to the WSDL file. Note that 'basedir' is setup by Maven try { - wsdlURL = new File(urlString).getAbsoluteFile().toURL(); + wsdlURL = new File(urlString).getAbsoluteFile().toURI().toURL(); } catch (Exception e) { System.out.println("Caught exception creating WSDL URL :" + urlString + "; exception: " + e.toString()); Modified: axis/axis2/java/core/branches/hermetic-tests/modules/metadata/test/org/apache/axis2/jaxws/description/impl/ClientDBCSupportEndpointTests.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/hermetic-tests/modules/metadata/test/org/apache/axis2/jaxws/description/impl/ClientDBCSupportEndpointTests.java?rev=1849802&r1=1849801&r2=1849802&view=diff ============================================================================== --- axis/axis2/java/core/branches/hermetic-tests/modules/metadata/test/org/apache/axis2/jaxws/description/impl/ClientDBCSupportEndpointTests.java (original) +++ axis/axis2/java/core/branches/hermetic-tests/modules/metadata/test/org/apache/axis2/jaxws/description/impl/ClientDBCSupportEndpointTests.java Thu Dec 27 18:42:33 2018 @@ -277,7 +277,7 @@ public class ClientDBCSupportEndpointTes fail("Exception creating File(WSDL): " + e.toString()); } File file = new File(wsdlLocation); - url = file.toURL(); + url = file.toURI().toURL(); } catch (MalformedURLException e) { e.printStackTrace(); fail("Exception converting WSDL file to URL: " + e.toString()); Modified: axis/axis2/java/core/branches/hermetic-tests/modules/metadata/test/org/apache/axis2/jaxws/description/impl/ClientDBCSupportHandlersTests.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/hermetic-tests/modules/metadata/test/org/apache/axis2/jaxws/description/impl/ClientDBCSupportHandlersTests.java?rev=1849802&r1=1849801&r2=1849802&view=diff ============================================================================== --- axis/axis2/java/core/branches/hermetic-tests/modules/metadata/test/org/apache/axis2/jaxws/description/impl/ClientDBCSupportHandlersTests.java (original) +++ axis/axis2/java/core/branches/hermetic-tests/modules/metadata/test/org/apache/axis2/jaxws/description/impl/ClientDBCSupportHandlersTests.java Thu Dec 27 18:42:33 2018 @@ -121,7 +121,7 @@ public class ClientDBCSupportHandlersTes String sep = "/"; configLoc = sep + "test-resources" + sep + "test-handler.xml"; String baseDir = new File(System.getProperty("basedir",".")).getCanonicalPath(); - is = new File(baseDir + configLoc).toURL().openStream(); + is = new File(baseDir + configLoc).toURI().toURL().openStream(); } catch(Exception e) { e.printStackTrace(); Modified: axis/axis2/java/core/branches/hermetic-tests/modules/metadata/test/org/apache/axis2/jaxws/description/impl/DescriptionFactoryImplTests.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/hermetic-tests/modules/metadata/test/org/apache/axis2/jaxws/description/impl/DescriptionFactoryImplTests.java?rev=1849802&r1=1849801&r2=1849802&view=diff ============================================================================== --- axis/axis2/java/core/branches/hermetic-tests/modules/metadata/test/org/apache/axis2/jaxws/description/impl/DescriptionFactoryImplTests.java (original) +++ axis/axis2/java/core/branches/hermetic-tests/modules/metadata/test/org/apache/axis2/jaxws/description/impl/DescriptionFactoryImplTests.java Thu Dec 27 18:42:33 2018 @@ -247,7 +247,7 @@ public class DescriptionFactoryImplTests String sep = "/"; configLoc = sep + "test-resources" + sep + "test-handler.xml"; String baseDir = new File(System.getProperty("basedir",".")).getCanonicalPath(); - is = new File(baseDir + configLoc).toURL().openStream(); + is = new File(baseDir + configLoc).toURI().toURL().openStream(); } catch(Exception e) { e.printStackTrace(); Modified: axis/axis2/java/core/branches/hermetic-tests/modules/osgi-tests/pom.xml URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/hermetic-tests/modules/osgi-tests/pom.xml?rev=1849802&r1=1849801&r2=1849802&view=diff ============================================================================== --- axis/axis2/java/core/branches/hermetic-tests/modules/osgi-tests/pom.xml (original) +++ axis/axis2/java/core/branches/hermetic-tests/modules/osgi-tests/pom.xml Thu Dec 27 18:42:33 2018 @@ -57,7 +57,7 @@ <dependency> <groupId>org.apache.felix</groupId> <artifactId>org.apache.felix.framework</artifactId> - <version>5.0.0</version> + <version>6.0.1</version> <scope>test</scope> </dependency> <dependency> @@ -126,6 +126,10 @@ <version>1.2</version> </artifact> <artifact> + <groupId>com.sun.activation</groupId> + <artifactId>javax.activation</artifactId> + </artifact> + <artifact> <groupId>org.apache.servicemix.bundles</groupId> <artifactId>org.apache.servicemix.bundles.commons-httpclient</artifactId> <version>3.1_7</version> Modified: axis/axis2/java/core/branches/hermetic-tests/modules/osgi-tests/src/test/java/OSGiTest.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/hermetic-tests/modules/osgi-tests/src/test/java/OSGiTest.java?rev=1849802&r1=1849801&r2=1849802&view=diff ============================================================================== --- axis/axis2/java/core/branches/hermetic-tests/modules/osgi-tests/src/test/java/OSGiTest.java (original) +++ axis/axis2/java/core/branches/hermetic-tests/modules/osgi-tests/src/test/java/OSGiTest.java Thu Dec 27 18:42:33 2018 @@ -61,6 +61,7 @@ public class OSGiTest { url("link:classpath:org.apache.felix.configadmin.link"), url("link:classpath:org.apache.servicemix.bundles.wsdl4j.link"), url("link:classpath:org.apache.geronimo.specs.geronimo-ws-metadata_2.0_spec.link"), + url("link:classpath:com.sun.activation.javax.activation.link"), url("link:classpath:com.sun.mail.javax.mail.link"), // TODO: should no longer be necessary url("link:classpath:org.apache.geronimo.specs.geronimo-servlet_2.5_spec.link"), url("link:classpath:org.apache.james.apache-mime4j-core.link"), Modified: axis/axis2/java/core/branches/hermetic-tests/modules/osgi/pom.xml URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/hermetic-tests/modules/osgi/pom.xml?rev=1849802&r1=1849801&r2=1849802&view=diff ============================================================================== --- axis/axis2/java/core/branches/hermetic-tests/modules/osgi/pom.xml (original) +++ axis/axis2/java/core/branches/hermetic-tests/modules/osgi/pom.xml Thu Dec 27 18:42:33 2018 @@ -85,7 +85,7 @@ javax.ws.rs; resolution:=optional, javax.servlet; version=2.4.0, javax.servlet.http; version=2.4.0, - javax.transaction, + javax.transaction; resolution:=optional, org.apache.commons.io, org.osgi.framework; version=1.3.0, org.osgi.service.http; version=1.2.0, Modified: axis/axis2/java/core/branches/hermetic-tests/modules/saaj/pom.xml URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/hermetic-tests/modules/saaj/pom.xml?rev=1849802&r1=1849801&r2=1849802&view=diff ============================================================================== --- axis/axis2/java/core/branches/hermetic-tests/modules/saaj/pom.xml (original) +++ axis/axis2/java/core/branches/hermetic-tests/modules/saaj/pom.xml Thu Dec 27 18:42:33 2018 @@ -66,6 +66,10 @@ <version>${project.version}</version> </dependency> <dependency> + <groupId>javax.xml.soap</groupId> + <artifactId>javax.xml.soap-api</artifactId> + </dependency> + <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <scope>test</scope> @@ -76,6 +80,16 @@ <scope>test</scope> </dependency> <dependency> + <groupId>com.google.truth</groupId> + <artifactId>truth</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.ws.commons.axiom</groupId> + <artifactId>testutils</artifactId> + <scope>test</scope> + </dependency> + <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <scope>test</scope> @@ -93,14 +107,8 @@ <dependency> <groupId>com.sun.xml.messaging.saaj</groupId> <artifactId>saaj-impl</artifactId> - <version>1.3.2</version> + <version>1.3.28</version> <scope>test</scope> - <exclusions> - <exclusion> - <groupId>javax.xml.soap</groupId> - <artifactId>saaj-api</artifactId> - </exclusion> - </exclusions> </dependency> <dependency> <groupId>org.apache.ws.commons.axiom</groupId> @@ -147,30 +155,6 @@ </executions> </plugin> <plugin> - <groupId>com.github.veithen.alta</groupId> - <artifactId>alta-maven-plugin</artifactId> - <executions> - <execution> - <goals> - <goal>generate-properties</goal> - </goals> - <configuration> - <name>surefire.bootclasspath</name> - <value>%file%</value> - <separator>${path.separator}</separator> - <artifacts> - <artifact> - <!-- TODO: make the test cases compatible with the SAAJ API in the JRE and remove this --> - <groupId>org.apache.geronimo.specs</groupId> - <artifactId>geronimo-saaj_1.3_spec</artifactId> - <version>1.0.1</version> - </artifact> - </artifacts> - </configuration> - </execution> - </executions> - </plugin> - <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <configuration> @@ -183,7 +167,7 @@ presence of jaxp-ri on the classpath. * Please leave this on a single line. Adding a newline between the two options causes a build failure. --> - <argLine>-Xbootclasspath/p:${surefire.bootclasspath} -Dcom.sun.org.apache.xerces.internal.xni.parser.XMLParserConfiguration=com.sun.org.apache.xerces.internal.parsers.XIncludeParserConfiguration</argLine> + <argLine>${argLine} -Dcom.sun.org.apache.xerces.internal.xni.parser.XMLParserConfiguration=com.sun.org.apache.xerces.internal.parsers.XIncludeParserConfiguration</argLine> <systemProperties> <!-- Prevent Mac OS X from showing an icon in the dock during the test run --> <property> Modified: axis/axis2/java/core/branches/hermetic-tests/modules/saaj/src/org/apache/axis2/saaj/DetailImpl.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/hermetic-tests/modules/saaj/src/org/apache/axis2/saaj/DetailImpl.java?rev=1849802&r1=1849801&r2=1849802&view=diff ============================================================================== --- axis/axis2/java/core/branches/hermetic-tests/modules/saaj/src/org/apache/axis2/saaj/DetailImpl.java (original) +++ axis/axis2/java/core/branches/hermetic-tests/modules/saaj/src/org/apache/axis2/saaj/DetailImpl.java Thu Dec 27 18:42:33 2018 @@ -70,9 +70,7 @@ public class DetailImpl extends SOAPFaul */ public DetailEntry addDetailEntry(Name name) throws SOAPException { SOAPElementImpl<?> childElement = (SOAPElementImpl<?>)addChildElement(name); - DetailEntryImpl detailEntry = new DetailEntryImpl(childElement.omTarget); - childElement.target.setUserData(SAAJ_NODE, detailEntry, null); - return detailEntry; + return new DetailEntryImpl(childElement.omTarget); } /** @@ -99,9 +97,7 @@ public class DetailImpl extends SOAPFaul */ public DetailEntry addDetailEntry(QName qname) throws SOAPException { SOAPElementImpl<?> childElement = (SOAPElementImpl<?>)addChildElement(qname); - DetailEntryImpl detailEntry = new DetailEntryImpl(childElement.omTarget); - childElement.target.setUserData(SAAJ_NODE, detailEntry, null); - return detailEntry; + return new DetailEntryImpl(childElement.omTarget); } public SOAPElement addAttribute(QName qname, String value) throws SOAPException { Modified: axis/axis2/java/core/branches/hermetic-tests/modules/saaj/src/org/apache/axis2/saaj/ProxyNode.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/hermetic-tests/modules/saaj/src/org/apache/axis2/saaj/ProxyNode.java?rev=1849802&r1=1849801&r2=1849802&view=diff ============================================================================== --- axis/axis2/java/core/branches/hermetic-tests/modules/saaj/src/org/apache/axis2/saaj/ProxyNode.java (original) +++ axis/axis2/java/core/branches/hermetic-tests/modules/saaj/src/org/apache/axis2/saaj/ProxyNode.java Thu Dec 27 18:42:33 2018 @@ -147,46 +147,23 @@ public abstract class ProxyNode<T extend } else if (domNode instanceof org.w3c.dom.Comment) { return new CommentImpl((OMComment)domNode); } else if (domNode instanceof SOAPBody) { - javax.xml.soap.SOAPBody saajSOAPBody = - new org.apache.axis2.saaj.SOAPBodyImpl((SOAPBody)domNode); - domNode.setUserData(SAAJ_NODE, saajSOAPBody, null); - return saajSOAPBody; + return new org.apache.axis2.saaj.SOAPBodyImpl((SOAPBody)domNode); } else if (domNode instanceof SOAPEnvelope) { - javax.xml.soap.SOAPEnvelope saajEnvelope - = new org.apache.axis2.saaj.SOAPEnvelopeImpl((SOAPEnvelope)domNode); - domNode.setUserData(SAAJ_NODE, saajEnvelope, null); - return saajEnvelope; + return new org.apache.axis2.saaj.SOAPEnvelopeImpl((SOAPEnvelope)domNode); } else if (domNode instanceof SOAPFaultNode) { - javax.xml.soap.SOAPFaultElement saajSOAPFaultEle - = new org.apache.axis2.saaj.SOAPFaultElementImpl<SOAPFaultNode>((SOAPFaultNode)domNode); - domNode.setUserData(SAAJ_NODE, saajSOAPFaultEle, null); - return saajSOAPFaultEle; + return new org.apache.axis2.saaj.SOAPFaultElementImpl<SOAPFaultNode>((SOAPFaultNode)domNode); } else if (domNode instanceof SOAPFaultDetail) { - javax.xml.soap.Detail saajDetail - = new org.apache.axis2.saaj.DetailImpl((SOAPFaultDetail)domNode); - domNode.setUserData(SAAJ_NODE, saajDetail, null); - return saajDetail; + return new org.apache.axis2.saaj.DetailImpl((SOAPFaultDetail)domNode); } else if (domNode instanceof SOAPFault) { - javax.xml.soap.SOAPFault saajSOAPFault - = new org.apache.axis2.saaj.SOAPFaultImpl((SOAPFault)domNode); - domNode.setUserData(SAAJ_NODE, saajSOAPFault, null); - return saajSOAPFault; + return new org.apache.axis2.saaj.SOAPFaultImpl((SOAPFault)domNode); } else if (domNode instanceof SOAPHeaderBlock) { - javax.xml.soap.SOAPHeaderElement saajSOAPHeaderEle - = new org.apache.axis2.saaj.SOAPHeaderElementImpl((SOAPHeaderBlock)domNode); - domNode.setUserData(SAAJ_NODE, saajSOAPHeaderEle, null); - return saajSOAPHeaderEle; + return new org.apache.axis2.saaj.SOAPHeaderElementImpl((SOAPHeaderBlock)domNode); } else if (domNode instanceof SOAPHeader) { - javax.xml.soap.SOAPHeader saajSOAPHeader - = new org.apache.axis2.saaj.SOAPHeaderImpl((SOAPHeader)domNode); - domNode.setUserData(SAAJ_NODE, saajSOAPHeader, null); - return saajSOAPHeader; + return new org.apache.axis2.saaj.SOAPHeaderImpl((SOAPHeader)domNode); } else if (domNode instanceof Document) { return new SAAJDocument((OMDocument)domNode); } else { // instanceof org.apache.axis2.om.impl.dom.ElementImpl - SOAPElementImpl<OMElement> saajSOAPElement = new SOAPElementImpl<OMElement>((OMElement)domNode); - domNode.setUserData(SAAJ_NODE, saajSOAPElement, null); - return saajSOAPElement; + return new SOAPElementImpl<OMElement>((OMElement)domNode); } } @@ -354,12 +331,10 @@ public abstract class ProxyNode<T extend SOAPElementImpl<OMElement> childEle = (SOAPElementImpl<OMElement>)child; - childEle.target.setUserData(SAAJ_NODE, childEle, null); if (namespaceURI != null && namespaceURI.trim().length() > 0) { childEle.omTarget.setNamespace(childEle.omTarget.declareNamespace(namespaceURI, prefix)); } target.appendChild(childEle.target); - childEle.target.getParentNode().setUserData(SAAJ_NODE, this, null); childEle.setParentElement((SOAPElement)this); return childEle; }
