You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ws.apache.org by ve...@apache.org on 2016/05/02 12:58:26 UTC
svn commit: r1741958 -
/webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/builder/TestRegisterCustomBuilderForPayload.java
Author: veithen
Date: Mon May 2 10:58:25 2016
New Revision: 1741958
URL: http://svn.apache.org/viewvc?rev=1741958&view=rev
Log:
SOAPFaults are automatically skipped for custom builders.
Modified:
webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/builder/TestRegisterCustomBuilderForPayload.java
Modified: webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/builder/TestRegisterCustomBuilderForPayload.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/builder/TestRegisterCustomBuilderForPayload.java?rev=1741958&r1=1741957&r2=1741958&view=diff
==============================================================================
--- webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/builder/TestRegisterCustomBuilderForPayload.java (original)
+++ webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/builder/TestRegisterCustomBuilderForPayload.java Mon May 2 10:58:25 2016
@@ -54,16 +54,7 @@ public class TestRegisterCustomBuilderFo
@Override
protected void runTest() throws Throwable {
SOAPModelBuilder builder = message.getAdapter(SOAPSampleAdapter.class).getBuilder(metaFactory);
- ((CustomBuilderSupport)builder).registerCustomBuilder(CustomBuilder.Selector.PAYLOAD, new ByteArrayCustomBuilder("utf-8") {
- @Override
- public OMDataSource create(XMLStreamReader reader) throws OMException {
- if (reader.getName().equals(message.getSOAPSpec().getFaultQName())) {
- return null;
- } else {
- return super.create(reader);
- }
- }
- });
+ ((CustomBuilderSupport)builder).registerCustomBuilder(CustomBuilder.Selector.PAYLOAD, new ByteArrayCustomBuilder("utf-8"));
OMElement payload = builder.getSOAPEnvelope().getBody().getFirstElement();
if (message.getPayload() == null) {
assertNull(payload);