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 2012/07/14 13:51:48 UTC
svn commit: r1361526 - in /webservices/axiom/branches/AXIOM-435: ./
modules/axiom-api/src/main/java/org/apache/axiom/om/impl/builder/
modules/axiom-api/src/main/java/org/apache/axiom/soap/impl/builder/
modules/axiom-testsuite/src/main/java/org/apache/a...
Author: veithen
Date: Sat Jul 14 11:51:48 2012
New Revision: 1361526
URL: http://svn.apache.org/viewvc?rev=1361526&view=rev
Log:
More unfinished code.
Added:
webservices/axiom/branches/AXIOM-435/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/builder/TestDTD.java
- copied unchanged from r1361522, webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/builder/TestDTD.java
webservices/axiom/branches/AXIOM-435/modules/axiom-testsuite/src/main/resources/badsoap/soap11/processing-instruction.xml
- copied unchanged from r1361522, webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/resources/badsoap/soap11/processing-instruction.xml
webservices/axiom/branches/AXIOM-435/modules/axiom-testsuite/src/main/resources/badsoap/soap12/processing-instruction.xml
- copied unchanged from r1361522, webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/resources/badsoap/soap12/processing-instruction.xml
Modified:
webservices/axiom/branches/AXIOM-435/ (props changed)
webservices/axiom/branches/AXIOM-435/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/builder/StAXOMBuilder.java
webservices/axiom/branches/AXIOM-435/modules/axiom-api/src/main/java/org/apache/axiom/soap/impl/builder/StAXSOAPModelBuilder.java
webservices/axiom/branches/AXIOM-435/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPTestSuiteBuilder.java
Propchange: webservices/axiom/branches/AXIOM-435/
------------------------------------------------------------------------------
Merged /webservices/commons/trunk/modules/axiom:r1361517-1361522
Modified: webservices/axiom/branches/AXIOM-435/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/builder/StAXOMBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-435/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/builder/StAXOMBuilder.java?rev=1361526&r1=1361525&r2=1361526&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-435/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/builder/StAXOMBuilder.java (original)
+++ webservices/axiom/branches/AXIOM-435/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/builder/StAXOMBuilder.java Sat Jul 14 11:51:48 2012
@@ -262,7 +262,7 @@ public class StAXOMBuilder extends StAXB
createPI();
break;
case XMLStreamConstants.ENTITY_REFERENCE:
- createOMText(XMLStreamConstants.ENTITY_REFERENCE);
+ createEntityReference();
break;
default :
throw new OMException();
@@ -493,6 +493,10 @@ public class StAXOMBuilder extends StAXB
return omfactory.createOMProcessingInstruction(target, parser.getPITarget(), parser.getPIData(), true);
}
+ protected OMNode createEntityReference() {
+ return omfactory.createOMEntityReference(target, parser.getLocalName(), true);
+ }
+
protected void endElement() {
target.setComplete(true);
target = (OMContainerEx)((OMElement)target).getParent();
Modified: webservices/axiom/branches/AXIOM-435/modules/axiom-api/src/main/java/org/apache/axiom/soap/impl/builder/StAXSOAPModelBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-435/modules/axiom-api/src/main/java/org/apache/axiom/soap/impl/builder/StAXSOAPModelBuilder.java?rev=1361526&r1=1361525&r2=1361526&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-435/modules/axiom-api/src/main/java/org/apache/axiom/soap/impl/builder/StAXSOAPModelBuilder.java (original)
+++ webservices/axiom/branches/AXIOM-435/modules/axiom-api/src/main/java/org/apache/axiom/soap/impl/builder/StAXSOAPModelBuilder.java Sat Jul 14 11:51:48 2012
@@ -376,12 +376,16 @@ public class StAXSOAPModelBuilder extend
/** Method createDTD. Overriding the default behaviour as a SOAPMessage should not have a DTD. */
protected OMNode createDTD() throws OMException {
- throw new OMException("SOAP message MUST NOT contain a Document Type Declaration(DTD)");
+ throw new SOAPProcessingException("SOAP message MUST NOT contain a Document Type Declaration(DTD)");
}
/** Method createPI. Overriding the default behaviour as a SOAP Message should not have a PI. */
protected OMNode createPI() throws OMException {
- throw new OMException("SOAP message MUST NOT contain Processing Instructions(PI)");
+ throw new SOAPProcessingException("SOAP message MUST NOT contain Processing Instructions(PI)");
+ }
+
+ protected OMNode createEntityReference() {
+ throw new SOAPProcessingException("A SOAP message cannot contain entity references because it must not have a DTD");
}
// Necessary to allow SOAPBuilderHelper to access this method
Modified: webservices/axiom/branches/AXIOM-435/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPTestSuiteBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-435/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPTestSuiteBuilder.java?rev=1361526&r1=1361525&r2=1361526&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-435/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPTestSuiteBuilder.java (original)
+++ webservices/axiom/branches/AXIOM-435/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPTestSuiteBuilder.java Sat Jul 14 11:51:48 2012
@@ -31,7 +31,8 @@ import org.apache.axiom.testutils.suite.
public class SOAPTestSuiteBuilder extends TestSuiteBuilder {
private static final String[] badSOAPFiles = { "wrongSoapNs.xml", "notnamespaceQualified.xml", "soap11/twoheaders.xml", "soap11/twoBodymessage.xml",
"soap11/envelopeMissing.xml", "soap11/haederBodyWrongOrder.xml", "soap11/invalid-faultcode.xml", "soap11/invalid-faultstring.xml",
- "soap11/invalid-faultactor.xml", "soap12/header-bad-case.xml", "soap12/header-no-namespace.xml" };
+ "soap11/invalid-faultactor.xml", "soap11/processing-instruction.xml",
+ "soap12/header-bad-case.xml", "soap12/header-no-namespace.xml", "soap12/processing-instruction.xml" };
private static final String[] goodSOAPFiles = { TestConstants.WHITESPACE_MESSAGE,
TestConstants.MINIMAL_MESSAGE, TestConstants.REALLY_BIG_MESSAGE,
@@ -101,6 +102,7 @@ public class SOAPTestSuiteBuilder extend
addTest(new org.apache.axiom.ts.soap.body.TestHasFaultWithParser(metaFactory, spec));
addTest(new org.apache.axiom.ts.soap.builder.TestCommentInEpilog(metaFactory, spec));
addTest(new org.apache.axiom.ts.soap.builder.TestCommentInProlog(metaFactory, spec));
+ addTest(new org.apache.axiom.ts.soap.builder.TestDTD(metaFactory, spec));
if (supportsBodyElementNameOptimization) {
addTest(new org.apache.axiom.ts.soap.builder.TestRegisterCustomBuilderForPayloadAfterSOAPFaultCheck(metaFactory, spec));
}