You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ws.apache.org by "Daniel James Matthews (JIRA)" <ji...@apache.org> on 2011/02/25 14:03:40 UTC
[jira] Created: (AXIOM-357) org.apache.axiom.om.util.CopyUtils
throws NPE when used to copy a SOAPEnvelope containing a SOAP 1.1 SOAPFault
org.apache.axiom.om.util.CopyUtils throws NPE when used to copy a SOAPEnvelope containing a SOAP 1.1 SOAPFault
--------------------------------------------------------------------------------------------------------------
Key: AXIOM-357
URL: https://issues.apache.org/jira/browse/AXIOM-357
Project: Axiom
Issue Type: Bug
Environment: All
Reporter: Daniel James Matthews
NPE when using CopyUtils.copy on a SOAPEnvelope containing a SOAP 1.1 SOAPFault.
This is because the copySOAPFaultCode method assumes that the SOAPFaultCode has a Value child element, but that's only true for SOAP 1.2.
In SOAP 1.1 the SOAPFault contains a text element, not a Value element.
I have a patch available where I copy the text or Value based on the namespace of the SOAPFactory.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org
[jira] [Commented] (AXIOM-357) org.apache.axiom.om.util.CopyUtils
throws NPE when used to copy a SOAPEnvelope containing a SOAP 1.1 SOAPFault
Posted by "David Illsley (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIOM-357?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13052214#comment-13052214 ]
David Illsley commented on AXIOM-357:
-------------------------------------
Hi Dan, I'm a little concerned about just copying the string across in case the prefix is different, unless elsewhere in the copy cope it's guaranteed to be the same?
> org.apache.axiom.om.util.CopyUtils throws NPE when used to copy a SOAPEnvelope containing a SOAP 1.1 SOAPFault
> --------------------------------------------------------------------------------------------------------------
>
> Key: AXIOM-357
> URL: https://issues.apache.org/jira/browse/AXIOM-357
> Project: Axiom
> Issue Type: Bug
> Components: API
> Affects Versions: 1.2.11
> Environment: All
> Reporter: Daniel James Matthews
> Assignee: Andreas Veithen
> Fix For: 1.2.12
>
> Original Estimate: 4h
> Remaining Estimate: 4h
>
> NPE when using CopyUtils.copy on a SOAPEnvelope containing a SOAP 1.1 SOAPFault.
> This is because the copySOAPFaultCode method assumes that the SOAPFaultCode has a Value child element, but that's only true for SOAP 1.2.
> In SOAP 1.1 the SOAPFault contains a text element, not a Value element.
> I have a patch available where I copy the text or Value based on the namespace of the SOAPFactory.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org
[jira] [Updated] (AXIOM-357) org.apache.axiom.om.util.CopyUtils
throws NPE when used to copy a SOAPEnvelope containing a SOAP 1.1 SOAPFault
Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIOM-357?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andreas Veithen updated AXIOM-357:
----------------------------------
Component/s: API
Affects Version/s: 1.2.11
Fix Version/s: 1.2.12
Assignee: Andreas Veithen
> org.apache.axiom.om.util.CopyUtils throws NPE when used to copy a SOAPEnvelope containing a SOAP 1.1 SOAPFault
> --------------------------------------------------------------------------------------------------------------
>
> Key: AXIOM-357
> URL: https://issues.apache.org/jira/browse/AXIOM-357
> Project: Axiom
> Issue Type: Bug
> Components: API
> Affects Versions: 1.2.11
> Environment: All
> Reporter: Daniel James Matthews
> Assignee: Andreas Veithen
> Fix For: 1.2.12
>
> Original Estimate: 4h
> Remaining Estimate: 4h
>
> NPE when using CopyUtils.copy on a SOAPEnvelope containing a SOAP 1.1 SOAPFault.
> This is because the copySOAPFaultCode method assumes that the SOAPFaultCode has a Value child element, but that's only true for SOAP 1.2.
> In SOAP 1.1 the SOAPFault contains a text element, not a Value element.
> I have a patch available where I copy the text or Value based on the namespace of the SOAPFactory.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org
[jira] [Commented] (AXIOM-357) org.apache.axiom.om.util.CopyUtils
throws NPE when used to copy a SOAPEnvelope containing a SOAP 1.1 SOAPFault
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIOM-357?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13276519#comment-13276519 ]
Hudson commented on AXIOM-357:
------------------------------
Integrated in ws-axiom-trunk #967 (See [https://builds.apache.org/job/ws-axiom-trunk/967/])
Added unit test provided by Daniel James Matthews for AXIOM-357. With the changes in r1339012 the issue no longer occurs. (Revision 1339023)
Result = SUCCESS
veithen :
Files :
* /webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/util/CopyUtilsTest.java
> org.apache.axiom.om.util.CopyUtils throws NPE when used to copy a SOAPEnvelope containing a SOAP 1.1 SOAPFault
> --------------------------------------------------------------------------------------------------------------
>
> Key: AXIOM-357
> URL: https://issues.apache.org/jira/browse/AXIOM-357
> Project: Axiom
> Issue Type: Bug
> Components: API
> Affects Versions: 1.2.11
> Environment: All
> Reporter: Daniel James Matthews
> Assignee: Andreas Veithen
> Fix For: 1.2.14
>
> Original Estimate: 4h
> Remaining Estimate: 4h
>
> NPE when using CopyUtils.copy on a SOAPEnvelope containing a SOAP 1.1 SOAPFault.
> This is because the copySOAPFaultCode method assumes that the SOAPFaultCode has a Value child element, but that's only true for SOAP 1.2.
> In SOAP 1.1 the SOAPFault contains a text element, not a Value element.
> I have a patch available where I copy the text or Value based on the namespace of the SOAPFactory.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org
[jira] [Resolved] (AXIOM-357) org.apache.axiom.om.util.CopyUtils
throws NPE when used to copy a SOAPEnvelope containing a SOAP 1.1 SOAPFault
Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIOM-357?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andreas Veithen resolved AXIOM-357.
-----------------------------------
Resolution: Fixed
> org.apache.axiom.om.util.CopyUtils throws NPE when used to copy a SOAPEnvelope containing a SOAP 1.1 SOAPFault
> --------------------------------------------------------------------------------------------------------------
>
> Key: AXIOM-357
> URL: https://issues.apache.org/jira/browse/AXIOM-357
> Project: Axiom
> Issue Type: Bug
> Components: API
> Affects Versions: 1.2.11
> Environment: All
> Reporter: Daniel James Matthews
> Assignee: Andreas Veithen
> Fix For: 1.2.14
>
> Original Estimate: 4h
> Remaining Estimate: 4h
>
> NPE when using CopyUtils.copy on a SOAPEnvelope containing a SOAP 1.1 SOAPFault.
> This is because the copySOAPFaultCode method assumes that the SOAPFaultCode has a Value child element, but that's only true for SOAP 1.2.
> In SOAP 1.1 the SOAPFault contains a text element, not a Value element.
> I have a patch available where I copy the text or Value based on the namespace of the SOAPFactory.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org
[jira] [Work started] (AXIOM-357)
org.apache.axiom.om.util.CopyUtils throws NPE when used to copy a
SOAPEnvelope containing a SOAP 1.1 SOAPFault
Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIOM-357?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Work on AXIOM-357 started by Andreas Veithen.
> org.apache.axiom.om.util.CopyUtils throws NPE when used to copy a SOAPEnvelope containing a SOAP 1.1 SOAPFault
> --------------------------------------------------------------------------------------------------------------
>
> Key: AXIOM-357
> URL: https://issues.apache.org/jira/browse/AXIOM-357
> Project: Axiom
> Issue Type: Bug
> Components: API
> Affects Versions: 1.2.11
> Environment: All
> Reporter: Daniel James Matthews
> Assignee: Andreas Veithen
> Fix For: 1.2.14
>
> Original Estimate: 4h
> Remaining Estimate: 4h
>
> NPE when using CopyUtils.copy on a SOAPEnvelope containing a SOAP 1.1 SOAPFault.
> This is because the copySOAPFaultCode method assumes that the SOAPFaultCode has a Value child element, but that's only true for SOAP 1.2.
> In SOAP 1.1 the SOAPFault contains a text element, not a Value element.
> I have a patch available where I copy the text or Value based on the namespace of the SOAPFactory.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org
[jira] Commented: (AXIOM-357) org.apache.axiom.om.util.CopyUtils
throws NPE when used to copy a SOAPEnvelope containing a SOAP 1.1 SOAPFault
Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIOM-357?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13002767#comment-13002767 ]
Andreas Veithen commented on AXIOM-357:
---------------------------------------
Daniel, can you provide a unit test that reproduces the issue?
> org.apache.axiom.om.util.CopyUtils throws NPE when used to copy a SOAPEnvelope containing a SOAP 1.1 SOAPFault
> --------------------------------------------------------------------------------------------------------------
>
> Key: AXIOM-357
> URL: https://issues.apache.org/jira/browse/AXIOM-357
> Project: Axiom
> Issue Type: Bug
> Environment: All
> Reporter: Daniel James Matthews
> Original Estimate: 4h
> Remaining Estimate: 4h
>
> NPE when using CopyUtils.copy on a SOAPEnvelope containing a SOAP 1.1 SOAPFault.
> This is because the copySOAPFaultCode method assumes that the SOAPFaultCode has a Value child element, but that's only true for SOAP 1.2.
> In SOAP 1.1 the SOAPFault contains a text element, not a Value element.
> I have a patch available where I copy the text or Value based on the namespace of the SOAPFactory.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org
[jira] [Commented] (AXIOM-357) org.apache.axiom.om.util.CopyUtils
throws NPE when used to copy a SOAPEnvelope containing a SOAP 1.1 SOAPFault
Posted by "Daniel James Matthews (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIOM-357?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13018421#comment-13018421 ]
Daniel James Matthews commented on AXIOM-357:
---------------------------------------------
Andreas, the following method can be added to org.apache.axiom.om.util.CopyUtilsTest.java in axiom\modules\axiom-tests\src\test\java\org\apache\axiom\om\util...
public void testSoap11fault() throws Exception {
copyAndCheck(createEnvelope(getTestResource("soap/soap11/soap11fault.xml")), true);
}
This will show the bug.
A possible fix for the bug is to update the copySOAPFaultCode method in CopyUtils.java as follows...
private static void copySOAPFaultCode(SOAPFactory factory,
SOAPFault targetFault,
SOAPFaultCode sourceCode) {
SOAPFaultCode targetCode = factory.createSOAPFaultCode(targetFault);
copyTagData(sourceCode, targetCode);
if(SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(factory.getSoapVersionURI())) {
targetCode.setText(sourceCode.getText());
} else {
// Create the Value
SOAPFaultValue sourceValue = sourceCode.getValue();
if(sourceValue != null) {
SOAPFaultValue targetValue = factory.createSOAPFaultValue(targetCode);
copyTagData(sourceValue, targetValue);
// There should only be a text node for the value, but in case there is more
Iterator i = sourceValue.getChildren();
while (i.hasNext()) {
OMNode node = (OMNode) i.next();
copy(factory, targetValue, node);
}
}
}
// Now get process the SubCode
SOAPFaultSubCode sourceSubCode = sourceCode.getSubCode();
if (sourceSubCode != null) {
copySOAPFaultSubCode(factory, targetCode, sourceSubCode);
}
}
> org.apache.axiom.om.util.CopyUtils throws NPE when used to copy a SOAPEnvelope containing a SOAP 1.1 SOAPFault
> --------------------------------------------------------------------------------------------------------------
>
> Key: AXIOM-357
> URL: https://issues.apache.org/jira/browse/AXIOM-357
> Project: Axiom
> Issue Type: Bug
> Environment: All
> Reporter: Daniel James Matthews
> Original Estimate: 4h
> Remaining Estimate: 4h
>
> NPE when using CopyUtils.copy on a SOAPEnvelope containing a SOAP 1.1 SOAPFault.
> This is because the copySOAPFaultCode method assumes that the SOAPFaultCode has a Value child element, but that's only true for SOAP 1.2.
> In SOAP 1.1 the SOAPFault contains a text element, not a Value element.
> I have a patch available where I copy the text or Value based on the namespace of the SOAPFactory.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org
[jira] [Updated] (AXIOM-357) org.apache.axiom.om.util.CopyUtils
throws NPE when used to copy a SOAPEnvelope containing a SOAP 1.1 SOAPFault
Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIOM-357?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andreas Veithen updated AXIOM-357:
----------------------------------
Fix Version/s: (was: 1.2.12)
1.2.13
> org.apache.axiom.om.util.CopyUtils throws NPE when used to copy a SOAPEnvelope containing a SOAP 1.1 SOAPFault
> --------------------------------------------------------------------------------------------------------------
>
> Key: AXIOM-357
> URL: https://issues.apache.org/jira/browse/AXIOM-357
> Project: Axiom
> Issue Type: Bug
> Components: API
> Affects Versions: 1.2.11
> Environment: All
> Reporter: Daniel James Matthews
> Assignee: Andreas Veithen
> Fix For: 1.2.13
>
> Original Estimate: 4h
> Remaining Estimate: 4h
>
> NPE when using CopyUtils.copy on a SOAPEnvelope containing a SOAP 1.1 SOAPFault.
> This is because the copySOAPFaultCode method assumes that the SOAPFaultCode has a Value child element, but that's only true for SOAP 1.2.
> In SOAP 1.1 the SOAPFault contains a text element, not a Value element.
> I have a patch available where I copy the text or Value based on the namespace of the SOAPFactory.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org
[jira] [Updated] (AXIOM-357) org.apache.axiom.om.util.CopyUtils
throws NPE when used to copy a SOAPEnvelope containing a SOAP 1.1 SOAPFault
Posted by "Andreas Veithen (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIOM-357?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andreas Veithen updated AXIOM-357:
----------------------------------
Fix Version/s: (was: 1.2.13)
1.2.14
> org.apache.axiom.om.util.CopyUtils throws NPE when used to copy a SOAPEnvelope containing a SOAP 1.1 SOAPFault
> --------------------------------------------------------------------------------------------------------------
>
> Key: AXIOM-357
> URL: https://issues.apache.org/jira/browse/AXIOM-357
> Project: Axiom
> Issue Type: Bug
> Components: API
> Affects Versions: 1.2.11
> Environment: All
> Reporter: Daniel James Matthews
> Assignee: Andreas Veithen
> Fix For: 1.2.14
>
> Original Estimate: 4h
> Remaining Estimate: 4h
>
> NPE when using CopyUtils.copy on a SOAPEnvelope containing a SOAP 1.1 SOAPFault.
> This is because the copySOAPFaultCode method assumes that the SOAPFaultCode has a Value child element, but that's only true for SOAP 1.2.
> In SOAP 1.1 the SOAPFault contains a text element, not a Value element.
> I have a patch available where I copy the text or Value based on the namespace of the SOAPFactory.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org