You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by ru...@apache.org on 2007/03/06 13:14:55 UTC
svn commit: r515099 - in /webservices/commons/trunk/modules/axiom: ./
modules/axiom-api/src/main/java/org/apache/axiom/soap/impl/builder/
modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/
modules/axiom-impl/src/main/java/org/apache...
Author: ruchithf
Date: Tue Mar 6 04:14:50 2007
New Revision: 515099
URL: http://svn.apache.org/viewvc?view=rev&rev=515099
Log:
Fixed WSCOMMONS-104
Please see https://issues.apache.org/jira/browse/WSCOMMONS-104#action_12475920
Modified:
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/soap/impl/builder/SOAP11BuilderHelper.java
webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11FaultCodeImpl.java
webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11FaultImpl.java
webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11FaultReasonImpl.java
webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11FaultCodeImpl.java
webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11FaultImpl.java
webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11FaultReasonImpl.java
webservices/commons/trunk/modules/axiom/modules/axiom-tests/pom.xml
webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPFaultCodeTest.java
webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPFaultReasonTest.java
webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPFaultSubCodeTestCase.java
webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPFaultTextTest.java
webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPFaultValueTest.java
webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/builder/StAXSOAPModelBuilderTest.java
webservices/commons/trunk/modules/axiom/project.xml
Modified: webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/soap/impl/builder/SOAP11BuilderHelper.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/soap/impl/builder/SOAP11BuilderHelper.java?view=diff&rev=515099&r1=515098&r2=515099
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/soap/impl/builder/SOAP11BuilderHelper.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/soap/impl/builder/SOAP11BuilderHelper.java Tue Mar 6 04:14:50 2007
@@ -57,11 +57,10 @@
SOAPFaultCode code = factory.createSOAPFaultCode(
(SOAPFault) parent, builder);
- SOAPFaultValue value = factory.createSOAPFaultValue(code);
processNamespaceData(code, false);
processAttributes(code);
- processText(parser, value);
+ processText(parser, code);
((OMNodeEx)code).setComplete(true);
element = code;
builder.elementLevel--;
@@ -71,11 +70,10 @@
SOAPFaultReason reason = factory.createSOAPFaultReason(
(SOAPFault) parent, builder);
- SOAPFaultText faultText = factory.createSOAPFaultText(reason);
processNamespaceData(reason, false);
processAttributes(reason);
- processText(parser, faultText);
+ processText(parser, reason);
((OMNodeEx)reason).setComplete(true);
element = reason;
builder.elementLevel--;
Modified: webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11FaultCodeImpl.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11FaultCodeImpl.java?view=diff&rev=515099&r1=515098&r2=515099
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11FaultCodeImpl.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11FaultCodeImpl.java Tue Mar 6 04:14:50 2007
@@ -97,8 +97,12 @@
SOAP11Constants.SOAP_FAULT_CODE_LOCAL_NAME,
writer);
- String text = this.getValue().getText();
+ String text = this.getText();
writer.writeCharacters(text);
writer.writeEndElement();
+ }
+
+ public String getLocalName() {
+ return SOAP11Constants.SOAP_FAULT_CODE_LOCAL_NAME;
}
}
Modified: webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11FaultImpl.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11FaultImpl.java?view=diff&rev=515099&r1=515098&r2=515099
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11FaultImpl.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11FaultImpl.java Tue Mar 6 04:14:50 2007
@@ -125,4 +125,13 @@
.getChildWithName(SOAP11Constants.SOAP_FAULT_ACTOR_LOCAL_NAME);
}
+ public SOAPFaultCode getCode() {
+ return (SOAPFaultCode) this.getChildWithName(
+ SOAP11Constants.SOAP_FAULT_CODE_LOCAL_NAME);
+ }
+
+ public SOAPFaultReason getReason() {
+ return (SOAPFaultReason) this.getChildWithName(
+ SOAP11Constants.SOAP_FAULT_STRING_LOCAL_NAME);
+ }
}
Modified: webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11FaultReasonImpl.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11FaultReasonImpl.java?view=diff&rev=515099&r1=515098&r2=515099
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11FaultReasonImpl.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11FaultReasonImpl.java Tue Mar 6 04:14:50 2007
@@ -81,9 +81,13 @@
SOAP11Constants.SOAP_FAULT_STRING_LOCAL_NAME,
writer);
- String text = this.getFirstSOAPText().getText();
+ String text = this.getText();
writer.writeCharacters(text);
writer.writeEndElement();
+ }
+
+ public String getLocalName() {
+ return SOAP11Constants.SOAP_FAULT_STRING_LOCAL_NAME;
}
}
Modified: webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11FaultCodeImpl.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11FaultCodeImpl.java?view=diff&rev=515099&r1=515098&r2=515099
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11FaultCodeImpl.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11FaultCodeImpl.java Tue Mar 6 04:14:50 2007
@@ -95,9 +95,13 @@
SOAP11Constants.SOAP_FAULT_CODE_LOCAL_NAME,
writer);
- String text = this.getValue().getText();
+ String text = this.getText();
writer.writeCharacters(text);
writer.writeEndElement();
+ }
+
+ public String getLocalName() {
+ return SOAP11Constants.SOAP_FAULT_CODE_LOCAL_NAME;
}
Modified: webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11FaultImpl.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11FaultImpl.java?view=diff&rev=515099&r1=515098&r2=515099
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11FaultImpl.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11FaultImpl.java Tue Mar 6 04:14:50 2007
@@ -18,6 +18,7 @@
import org.apache.axiom.om.OMElement;
import org.apache.axiom.om.OMXMLParserWrapper;
+import org.apache.axiom.soap.SOAP11Constants;
import org.apache.axiom.soap.SOAPBody;
import org.apache.axiom.soap.SOAPFactory;
import org.apache.axiom.soap.SOAPFault;
@@ -134,4 +135,13 @@
}
+ public SOAPFaultCode getCode() {
+ return (SOAPFaultCode) this.getChildWithName(
+ SOAP11Constants.SOAP_FAULT_CODE_LOCAL_NAME);
+ }
+
+ public SOAPFaultReason getReason() {
+ return (SOAPFaultReason) this.getChildWithName(
+ SOAP11Constants.SOAP_FAULT_STRING_LOCAL_NAME);
+ }
}
Modified: webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11FaultReasonImpl.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11FaultReasonImpl.java?view=diff&rev=515099&r1=515098&r2=515099
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11FaultReasonImpl.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11FaultReasonImpl.java Tue Mar 6 04:14:50 2007
@@ -90,9 +90,13 @@
SOAP11Constants.SOAP_FAULT_STRING_LOCAL_NAME,
writer);
- String text = this.getFirstSOAPText().getText();
+ String text = this.getText();
writer.writeCharacters(text);
writer.writeEndElement();
+ }
+
+ public String getLocalName() {
+ return SOAP11Constants.SOAP_FAULT_STRING_LOCAL_NAME;
}
Modified: webservices/commons/trunk/modules/axiom/modules/axiom-tests/pom.xml
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-tests/pom.xml?view=diff&rev=515099&r1=515098&r2=515099
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-tests/pom.xml (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-tests/pom.xml Tue Mar 6 04:14:50 2007
@@ -74,7 +74,6 @@
<include>**/*Test.java</include>
</includes>
<excludes>
- <exclude>**/*SOAP11FaultImplConversionTest.java</exclude>
<exclude>**/*AbstractOMSerializationTest.java</exclude>
</excludes>
</configuration>
Modified: webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPFaultCodeTest.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPFaultCodeTest.java?view=diff&rev=515099&r1=515098&r2=515099
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPFaultCodeTest.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPFaultCodeTest.java Tue Mar 6 04:14:50 2007
@@ -131,13 +131,10 @@
//SOAP 1.1 Fault Code Test (With Parser)
public void testSOAP11GetValueWithParser() {
- assertFalse(
- "SOAP 1.1 Fault Code Test with parser : - getValue method returns null",
- soap11FaultCodeWithParser.getValue() == null);
assertTrue(
- "SOAP 1.1 Fault Code Test with parser : - Value local name mismatch",
- soap11FaultCodeWithParser.getValue().getLocalName().equals(
- SOAP12Constants.SOAP_FAULT_VALUE_LOCAL_NAME));
+ "SOAP 1.1 Fault Code Test with parser : - getValue method should return null",
+ soap11FaultCodeWithParser.getValue() == null);
+
}
//SOAP 1.2 Fault Code Test (With Parser)
Modified: webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPFaultReasonTest.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPFaultReasonTest.java?view=diff&rev=515099&r1=515098&r2=515099
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPFaultReasonTest.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPFaultReasonTest.java Tue Mar 6 04:14:50 2007
@@ -85,8 +85,8 @@
//SOAP 1.1 Fault Reason Test (With Parser)
public void testSOAP11GetSOAPTextWithParser() {
- assertFalse(
- "SOAP 1.1 FaultReason Test With Parser : - getFirstSOAPText method returns null",
+ assertTrue(
+ "SOAP 1.1 FaultReason Test With Parser : - getFirstSOAPText should return null",
soap11FaultReasonWithParser.getFirstSOAPText() == null);
}
Modified: webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPFaultSubCodeTestCase.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPFaultSubCodeTestCase.java?view=diff&rev=515099&r1=515098&r2=515099
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPFaultSubCodeTestCase.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPFaultSubCodeTestCase.java Tue Mar 6 04:14:50 2007
@@ -24,7 +24,7 @@
protected SOAPFaultValue soap12FaultValueInFaultSubCode;
protected SOAPFaultSubCode soap12FaultSubCodeInSubCode;
- protected SOAPFaultValue soap11FaultValueWithParser;
+ protected String soap11FaultValueWithParser;
protected SOAPFaultValue soap12FaultValueInFaultCodeWithParser;
protected SOAPFaultSubCode soap12FaultSubCodeInFaultCodeWithParser;
@@ -48,7 +48,7 @@
soap12FaultSubCodeInSubCode =
soap12Factory.createSOAPFaultSubCode(soap12FaultSubCodeInCode);
- soap11FaultValueWithParser = soap11FaultCodeWithParser.getValue();
+ soap11FaultValueWithParser = soap11FaultCodeWithParser.getText();
soap12FaultValueInFaultCodeWithParser =
soap12FaultCodeWithParser.getValue();
soap12FaultSubCodeInFaultCodeWithParser =
Modified: webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPFaultTextTest.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPFaultTextTest.java?view=diff&rev=515099&r1=515098&r2=515099
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPFaultTextTest.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPFaultTextTest.java Tue Mar 6 04:14:50 2007
@@ -21,7 +21,7 @@
public class SOAPFaultTextTest extends SOAPFaultReasonTestCase {
protected SOAPFaultText soap11FaultText;
protected SOAPFaultText soap12FaultText;
- protected SOAPFaultText soap11FaultTextWithParser;
+ protected String soap11FaultTextWithParser;
protected SOAPFaultText soap12FaultTextWithParser;
public SOAPFaultTextTest(String testName) {
@@ -32,7 +32,7 @@
super.setUp();
soap11FaultText = soap11Factory.createSOAPFaultText(soap11FaultReason);
soap12FaultText = soap12Factory.createSOAPFaultText(soap12FaultReason);
- soap11FaultTextWithParser = soap11FaultReasonWithParser.getFirstSOAPText();
+ soap11FaultTextWithParser = soap11FaultReasonWithParser.getText();
soap12FaultTextWithParser = soap12FaultReasonWithParser.getFirstSOAPText();
}
@@ -143,7 +143,7 @@
public void testSOAP11GetTextWithParser() {
assertTrue(
"SOAP 1.1 Fault Text Test With Parser : - getText method returns incorrect string",
- soap11FaultTextWithParser.getText().trim().equals("Sender Timeout"));
+ soap11FaultTextWithParser.trim().equals("Sender Timeout"));
}
//SOAP 1.2 Fault Text Test (With Parser)
Modified: webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPFaultValueTest.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPFaultValueTest.java?view=diff&rev=515099&r1=515098&r2=515099
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPFaultValueTest.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPFaultValueTest.java Tue Mar 6 04:14:50 2007
@@ -97,7 +97,7 @@
public void testSOAP11GetTextWithParser() {
assertTrue(
"SOAP 1.1 Fault Value Test with parser : - value text mismatch",
- soap11FaultValueWithParser.getText().trim().equals("env:Sender"));
+ soap11FaultValueWithParser.trim().equals("env:Sender"));
}
//SOAP 1.2 Fault Value(In Fault Code) Test (With Parser)
Modified: webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/builder/StAXSOAPModelBuilderTest.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/builder/StAXSOAPModelBuilderTest.java?view=diff&rev=515099&r1=515098&r2=515099
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/builder/StAXSOAPModelBuilderTest.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/builder/StAXSOAPModelBuilderTest.java Tue Mar 6 04:14:50 2007
@@ -471,18 +471,18 @@
code = (SOAPFaultCode) iteratorInFault.next();
assertEquals("SOAP Fault code local name mismatch",
code.getLocalName(),
- (SOAP12Constants.SOAP_FAULT_CODE_LOCAL_NAME));
+ (SOAP11Constants.SOAP_FAULT_CODE_LOCAL_NAME));
- assertEquals("SOAP 1.1 :- Fault code value mismatch", code.getValue().getText().trim(),
+ assertEquals("SOAP 1.1 :- Fault code value mismatch", code.getText().trim(),
"env:Sender");
iteratorInFault.next();
reason = (SOAPFaultReason) iteratorInFault.next();
assertTrue("SOAP 1.1 :- Fault string local name mismatch",
reason.getLocalName().equals(
- SOAP12Constants.SOAP_FAULT_REASON_LOCAL_NAME));
+ SOAP11Constants.SOAP_FAULT_STRING_LOCAL_NAME));
assertTrue("SOAP 1.1 :- Fault string value mismatch",
- reason.getFirstSOAPText().getText().trim().equals("Sender Timeout"));
+ reason.getText().trim().equals("Sender Timeout"));
iteratorInFault.next();
role = (SOAPFaultRole) iteratorInFault.next();
@@ -564,6 +564,7 @@
log.info(e.getMessage());
fail("Test failed. Reason -> " + e.getMessage());
} catch (Exception e) {
+ e.printStackTrace();
log.info(e.getMessage());
fail("Test failed. Reason -> " + e.getMessage());
Modified: webservices/commons/trunk/modules/axiom/project.xml
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/project.xml?view=diff&rev=515099&r1=515098&r2=515099
==============================================================================
--- webservices/commons/trunk/modules/axiom/project.xml (original)
+++ webservices/commons/trunk/modules/axiom/project.xml Tue Mar 6 04:14:50 2007
@@ -206,7 +206,6 @@
<excludes>
<exclude>**/*SpacesTest.java</exclude>
<exclude>**/*AbstractOMSerializationTest.java</exclude>
- <exclude>**/*SOAP11FaultImplConversionTest.java</exclude>
</excludes>
<includes>
<include>**/*Test.java</include>
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org