You are viewing a plain text version of this content. The canonical link for it is here.
Posted to woden-dev@ws.apache.org by jk...@apache.org on 2008/01/07 18:36:43 UTC
svn commit: r609714 [7/8] - in /webservices/woden/branches/woden65: ./
ant-test/ src/org/apache/woden/ src/org/apache/woden/ant/
src/org/apache/woden/internal/ src/org/apache/woden/internal/resolver/
src/org/apache/woden/internal/util/dom/ src/org/apac...
Modified: webservices/woden/branches/woden65/test/org/apache/woden/wsdl20/extensions/http/HTTPBindingFaultExtensionsTest.java
URL: http://svn.apache.org/viewvc/webservices/woden/branches/woden65/test/org/apache/woden/wsdl20/extensions/http/HTTPBindingFaultExtensionsTest.java?rev=609714&r1=609713&r2=609714&view=diff
==============================================================================
--- webservices/woden/branches/woden65/test/org/apache/woden/wsdl20/extensions/http/HTTPBindingFaultExtensionsTest.java (original)
+++ webservices/woden/branches/woden65/test/org/apache/woden/wsdl20/extensions/http/HTTPBindingFaultExtensionsTest.java Mon Jan 7 09:36:13 2008
@@ -82,7 +82,7 @@
{
BindingFault bindFault = fBindFaults[0];
HTTPBindingFaultExtensions httpBindFaultExts = (HTTPBindingFaultExtensions)bindFault
- .getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_HTTP);
+ .getComponentExtensionsForNamespace(ComponentExtensions.NS_URI_HTTP);
assertNotNull("The BindingFault does not contain an HTTPBindingFaultExtensions object.",
httpBindFaultExts);
@@ -94,7 +94,7 @@
bindFault = fBindFaults[1];
httpBindFaultExts = (HTTPBindingFaultExtensions)bindFault
- .getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_HTTP);
+ .getComponentExtensionsForNamespace(ComponentExtensions.NS_URI_HTTP);
assertNotNull("The BindingFault does not contain an HTTPBindingFaultExtensions object.",
httpBindFaultExts);
@@ -113,7 +113,7 @@
{
BindingFault bindFault = fBindFaults[0];
HTTPBindingFaultExtensions httpBindFaultExts = (HTTPBindingFaultExtensions)bindFault
- .getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_HTTP);
+ .getComponentExtensionsForNamespace(ComponentExtensions.NS_URI_HTTP);
String actual = httpBindFaultExts.getHttpContentEncoding();
assertNotNull("The value for http transfer coding was null", actual);
@@ -141,7 +141,7 @@
{
BindingFault bindFault = fBindFaults[2];
HTTPBindingFaultExtensions httpBindFaultExts = (HTTPBindingFaultExtensions)bindFault
- .getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_HTTP);
+ .getComponentExtensionsForNamespace(ComponentExtensions.NS_URI_HTTP);
assertNotNull("The BindingFault does not contain an HTTPBindingFaultExtensions object.",
httpBindFaultExts);
@@ -185,7 +185,7 @@
{
BindingFault bindFault = fBindFaults[3];
HTTPBindingFaultExtensions httpBindFaultExts = (HTTPBindingFaultExtensions)bindFault
- .getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_HTTP);
+ .getComponentExtensionsForNamespace(ComponentExtensions.NS_URI_HTTP);
assertNotNull("The BindingFault does not contain an HTTPBindingFaultExtensions object.",
httpBindFaultExts);
Modified: webservices/woden/branches/woden65/test/org/apache/woden/wsdl20/extensions/http/HTTPBindingMessageReferenceExtensionsTest.java
URL: http://svn.apache.org/viewvc/webservices/woden/branches/woden65/test/org/apache/woden/wsdl20/extensions/http/HTTPBindingMessageReferenceExtensionsTest.java?rev=609714&r1=609713&r2=609714&view=diff
==============================================================================
--- webservices/woden/branches/woden65/test/org/apache/woden/wsdl20/extensions/http/HTTPBindingMessageReferenceExtensionsTest.java (original)
+++ webservices/woden/branches/woden65/test/org/apache/woden/wsdl20/extensions/http/HTTPBindingMessageReferenceExtensionsTest.java Mon Jan 7 09:36:13 2008
@@ -93,7 +93,7 @@
HTTPBindingMessageReferenceExtensions httpBindMsgRefExts =
(HTTPBindingMessageReferenceExtensions) inputMsg
.getComponentExtensionsForNamespace(
- ComponentExtensions.URI_NS_HTTP);
+ ComponentExtensions.NS_URI_HTTP);
String actual = httpBindMsgRefExts.getHttpContentEncoding();
assertEquals("Unexpected value for http content encoding.",
@@ -105,7 +105,7 @@
HTTPBindingMessageReferenceExtensions httpBindMsgRefExts2 =
(HTTPBindingMessageReferenceExtensions) outputMsg
.getComponentExtensionsForNamespace(
- ComponentExtensions.URI_NS_HTTP);
+ ComponentExtensions.NS_URI_HTTP);
String actual2 = httpBindMsgRefExts2.getHttpContentEncoding();
assertNull("Null was expected for http content encoding.",
@@ -132,7 +132,7 @@
HTTPBindingMessageReferenceExtensions httpBindMsgRefExts =
(HTTPBindingMessageReferenceExtensions) inputMsg
.getComponentExtensionsForNamespace(
- ComponentExtensions.URI_NS_HTTP);
+ ComponentExtensions.NS_URI_HTTP);
HTTPHeader[] actual = httpBindMsgRefExts.getHttpHeaders();
assertEquals("Unexpected size of {http headers}.",
@@ -144,7 +144,7 @@
HTTPBindingMessageReferenceExtensions httpBindMsgRefExts2 =
(HTTPBindingMessageReferenceExtensions) outputMsg
.getComponentExtensionsForNamespace(
- ComponentExtensions.URI_NS_HTTP);
+ ComponentExtensions.NS_URI_HTTP);
HTTPHeader[] actual2 = httpBindMsgRefExts2.getHttpHeaders();
assertEquals("Unexpected size of {http headers}.",
Modified: webservices/woden/branches/woden65/test/org/apache/woden/wsdl20/extensions/http/HTTPBindingOperationExtensionsTest.java
URL: http://svn.apache.org/viewvc/webservices/woden/branches/woden65/test/org/apache/woden/wsdl20/extensions/http/HTTPBindingOperationExtensionsTest.java?rev=609714&r1=609713&r2=609714&view=diff
==============================================================================
--- webservices/woden/branches/woden65/test/org/apache/woden/wsdl20/extensions/http/HTTPBindingOperationExtensionsTest.java (original)
+++ webservices/woden/branches/woden65/test/org/apache/woden/wsdl20/extensions/http/HTTPBindingOperationExtensionsTest.java Mon Jan 7 09:36:13 2008
@@ -89,7 +89,7 @@
HTTPBindingOperationExtensions httpBindOperExts =
(HTTPBindingOperationExtensions) oper
.getComponentExtensionsForNamespace(
- ComponentExtensions.URI_NS_HTTP);
+ ComponentExtensions.NS_URI_HTTP);
String expected = "http://ws.apache.woden/location";
HTTPLocation httpLoc = httpBindOperExts.getHttpLocation();
@@ -103,7 +103,7 @@
HTTPBindingOperationExtensions httpBindOperExts2 =
(HTTPBindingOperationExtensions) oper2
.getComponentExtensionsForNamespace(
- ComponentExtensions.URI_NS_HTTP);
+ ComponentExtensions.NS_URI_HTTP);
HTTPLocation actual2 = httpBindOperExts2.getHttpLocation();
assertNull("Http location did not default to null", actual2);
@@ -126,7 +126,7 @@
HTTPBindingOperationExtensions httpBindOperExts =
(HTTPBindingOperationExtensions) oper
.getComponentExtensionsForNamespace(
- ComponentExtensions.URI_NS_HTTP);
+ ComponentExtensions.NS_URI_HTTP);
Boolean actual = httpBindOperExts.isHttpLocationIgnoreUncited();
assertTrue("Http location ignore uncited was not True",
@@ -137,7 +137,7 @@
HTTPBindingOperationExtensions httpBindOperExts2 =
(HTTPBindingOperationExtensions) oper2
.getComponentExtensionsForNamespace(
- ComponentExtensions.URI_NS_HTTP);
+ ComponentExtensions.NS_URI_HTTP);
Boolean actual2 = httpBindOperExts2.isHttpLocationIgnoreUncited();
assertFalse("Http location ignore uncited did not default to False",
@@ -165,7 +165,7 @@
HTTPBindingOperationExtensions httpBindOperExts =
(HTTPBindingOperationExtensions) oper
.getComponentExtensionsForNamespace(
- ComponentExtensions.URI_NS_HTTP);
+ ComponentExtensions.NS_URI_HTTP);
String actual = httpBindOperExts.getHttpMethod();
assertEquals("Unexpected value for http method.",
@@ -177,7 +177,7 @@
HTTPBindingOperationExtensions httpBindOperExts2 =
(HTTPBindingOperationExtensions) oper2
.getComponentExtensionsForNamespace(
- ComponentExtensions.URI_NS_HTTP);
+ ComponentExtensions.NS_URI_HTTP);
String actual2 = httpBindOperExts2.getHttpMethod();
assertNull("Http method was not null by default.",
@@ -220,7 +220,7 @@
HTTPBindingOperationExtensions httpBindOperExts =
(HTTPBindingOperationExtensions) oper
.getComponentExtensionsForNamespace(
- ComponentExtensions.URI_NS_HTTP);
+ ComponentExtensions.NS_URI_HTTP);
String actual = httpBindOperExts.getHttpInputSerialization();
assertEquals("Unexpected value for http input serialization.",
@@ -233,7 +233,7 @@
HTTPBindingOperationExtensions httpBindOperExts2 =
(HTTPBindingOperationExtensions) oper2
.getComponentExtensionsForNamespace(
- ComponentExtensions.URI_NS_HTTP);
+ ComponentExtensions.NS_URI_HTTP);
String actual2 = httpBindOperExts2.getHttpInputSerialization();
assertEquals("Unexpected default value for http input serialization.",
@@ -246,7 +246,7 @@
HTTPBindingOperationExtensions httpBindOperExts3 =
(HTTPBindingOperationExtensions) oper3
.getComponentExtensionsForNamespace(
- ComponentExtensions.URI_NS_HTTP);
+ ComponentExtensions.NS_URI_HTTP);
String actual3 = httpBindOperExts3.getHttpInputSerialization();
assertEquals("Unexpected default value for http input serialization.",
@@ -259,7 +259,7 @@
HTTPBindingOperationExtensions httpBindOperExts4 =
(HTTPBindingOperationExtensions) oper4
.getComponentExtensionsForNamespace(
- ComponentExtensions.URI_NS_HTTP);
+ ComponentExtensions.NS_URI_HTTP);
String actual4 = httpBindOperExts4.getHttpInputSerialization();
assertEquals("Unexpected default value for http input serialization.",
@@ -272,7 +272,7 @@
HTTPBindingOperationExtensions httpBindOperExts5 =
(HTTPBindingOperationExtensions) oper5
.getComponentExtensionsForNamespace(
- ComponentExtensions.URI_NS_HTTP);
+ ComponentExtensions.NS_URI_HTTP);
String actual5 = httpBindOperExts5.getHttpInputSerialization();
assertEquals("Unexpected default value for http input serialization.",
@@ -285,7 +285,7 @@
HTTPBindingOperationExtensions httpBindOperExts6 =
(HTTPBindingOperationExtensions) oper6
.getComponentExtensionsForNamespace(
- ComponentExtensions.URI_NS_HTTP);
+ ComponentExtensions.NS_URI_HTTP);
String actual6 = httpBindOperExts6.getHttpInputSerialization();
assertEquals("Unexpected default value for http input serialization.",
@@ -298,7 +298,7 @@
HTTPBindingOperationExtensions httpBindOperExts7 =
(HTTPBindingOperationExtensions) oper7
.getComponentExtensionsForNamespace(
- ComponentExtensions.URI_NS_HTTP);
+ ComponentExtensions.NS_URI_HTTP);
String actual7 = httpBindOperExts7.getHttpInputSerialization();
assertEquals("Unexpected default value for http input serialization.",
@@ -324,7 +324,7 @@
HTTPBindingOperationExtensions httpBindOperExts =
(HTTPBindingOperationExtensions) oper
.getComponentExtensionsForNamespace(
- ComponentExtensions.URI_NS_HTTP);
+ ComponentExtensions.NS_URI_HTTP);
String actual = httpBindOperExts.getHttpOutputSerialization();
assertEquals("Unexpected value for http output serialization.",
@@ -336,7 +336,7 @@
HTTPBindingOperationExtensions httpBindOperExts2 =
(HTTPBindingOperationExtensions) oper2
.getComponentExtensionsForNamespace(
- ComponentExtensions.URI_NS_HTTP);
+ ComponentExtensions.NS_URI_HTTP);
String actual2 = httpBindOperExts2.getHttpOutputSerialization();
assertEquals("Unexpected default value for http output serialization.",
@@ -361,7 +361,7 @@
HTTPBindingOperationExtensions httpBindOperExts =
(HTTPBindingOperationExtensions) oper
.getComponentExtensionsForNamespace(
- ComponentExtensions.URI_NS_HTTP);
+ ComponentExtensions.NS_URI_HTTP);
String actual = httpBindOperExts.getHttpFaultSerialization();
assertEquals("Unexpected value for http fault serialization.",
@@ -373,7 +373,7 @@
HTTPBindingOperationExtensions httpBindOperExts2 =
(HTTPBindingOperationExtensions) oper2
.getComponentExtensionsForNamespace(
- ComponentExtensions.URI_NS_HTTP);
+ ComponentExtensions.NS_URI_HTTP);
String actual2 = httpBindOperExts2.getHttpFaultSerialization();
assertEquals("Unexpected default value for http fault serialization.",
@@ -398,7 +398,7 @@
HTTPBindingOperationExtensions httpBindOperExts =
(HTTPBindingOperationExtensions) oper
.getComponentExtensionsForNamespace(
- ComponentExtensions.URI_NS_HTTP);
+ ComponentExtensions.NS_URI_HTTP);
String actual = httpBindOperExts.getHttpQueryParameterSeparator();
assertEquals("Unexpected value for http query parameter separator.",
@@ -410,7 +410,7 @@
HTTPBindingOperationExtensions httpBindOperExts2 =
(HTTPBindingOperationExtensions) oper2
.getComponentExtensionsForNamespace(
- ComponentExtensions.URI_NS_HTTP);
+ ComponentExtensions.NS_URI_HTTP);
String actual2 = httpBindOperExts2.getHttpQueryParameterSeparator();
assertNull("Expected a null value for http query parameter separator.",
@@ -434,7 +434,7 @@
HTTPBindingOperationExtensions httpBindOperExts =
(HTTPBindingOperationExtensions) oper
.getComponentExtensionsForNamespace(
- ComponentExtensions.URI_NS_HTTP);
+ ComponentExtensions.NS_URI_HTTP);
String actual = httpBindOperExts.getHttpContentEncodingDefault();
assertEquals("Unexpected value for http content encoding default.",
@@ -446,7 +446,7 @@
HTTPBindingOperationExtensions httpBindOperExts2 =
(HTTPBindingOperationExtensions) oper2
.getComponentExtensionsForNamespace(
- ComponentExtensions.URI_NS_HTTP);
+ ComponentExtensions.NS_URI_HTTP);
String actual2 = httpBindOperExts2.getHttpContentEncodingDefault();
assertNull("Http content encoding default did not default to null.",
Modified: webservices/woden/branches/woden65/test/org/apache/woden/wsdl20/extensions/http/HTTPEndpointExtensionsTest.java
URL: http://svn.apache.org/viewvc/webservices/woden/branches/woden65/test/org/apache/woden/wsdl20/extensions/http/HTTPEndpointExtensionsTest.java?rev=609714&r1=609713&r2=609714&view=diff
==============================================================================
--- webservices/woden/branches/woden65/test/org/apache/woden/wsdl20/extensions/http/HTTPEndpointExtensionsTest.java (original)
+++ webservices/woden/branches/woden65/test/org/apache/woden/wsdl20/extensions/http/HTTPEndpointExtensionsTest.java Mon Jan 7 09:36:13 2008
@@ -94,7 +94,7 @@
HTTPEndpointExtensions httpEndpointExts =
(HTTPEndpointExtensions) endpoint
.getComponentExtensionsForNamespace(
- ComponentExtensions.URI_NS_HTTP);
+ ComponentExtensions.NS_URI_HTTP);
HTTPAuthenticationScheme actual = httpEndpointExts.getHttpAuthenticationScheme();
assertEquals("Unexpected value for http authentication scheme.",
@@ -106,7 +106,7 @@
HTTPEndpointExtensions httpEndpointExts2 =
(HTTPEndpointExtensions) endpoint2
.getComponentExtensionsForNamespace(
- ComponentExtensions.URI_NS_HTTP);
+ ComponentExtensions.NS_URI_HTTP);
HTTPAuthenticationScheme actual2 = httpEndpointExts2.getHttpAuthenticationScheme();
assertEquals("Unexpected value for http authentication scheme.",
@@ -118,7 +118,7 @@
HTTPEndpointExtensions httpEndpointExts3 =
(HTTPEndpointExtensions) endpoint3
.getComponentExtensionsForNamespace(
- ComponentExtensions.URI_NS_HTTP);
+ ComponentExtensions.NS_URI_HTTP);
HTTPAuthenticationScheme actual3 = httpEndpointExts3.getHttpAuthenticationScheme();
assertNull("Http authentication scheme did not default to null.",
@@ -139,7 +139,7 @@
HTTPEndpointExtensions httpEndpointExts =
(HTTPEndpointExtensions) endpoint
.getComponentExtensionsForNamespace(
- ComponentExtensions.URI_NS_HTTP);
+ ComponentExtensions.NS_URI_HTTP);
String actual = httpEndpointExts.getHttpAuthenticationRealm();
assertEquals("Unexpected value for http authentication realm.",
Modified: webservices/woden/branches/woden65/test/org/apache/woden/wsdl20/extensions/soap/SOAPBindingExtensionsTest.java
URL: http://svn.apache.org/viewvc/webservices/woden/branches/woden65/test/org/apache/woden/wsdl20/extensions/soap/SOAPBindingExtensionsTest.java?rev=609714&r1=609713&r2=609714&view=diff
==============================================================================
--- webservices/woden/branches/woden65/test/org/apache/woden/wsdl20/extensions/soap/SOAPBindingExtensionsTest.java (original)
+++ webservices/woden/branches/woden65/test/org/apache/woden/wsdl20/extensions/soap/SOAPBindingExtensionsTest.java Mon Jan 7 09:36:13 2008
@@ -69,13 +69,13 @@
Binding binding = descComp.getBindings()[0];
assertNotNull("The Description does not contain a Binding.", binding);
- fSoapBindExts = (SOAPBindingExtensions)binding.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_SOAP);
+ fSoapBindExts = (SOAPBindingExtensions)binding.getComponentExtensionsForNamespace(ComponentExtensions.NS_URI_SOAP);
assertNotNull("The Binding does not contain a SOAPBindingExtensions object.");
Binding binding2 = descComp.getBindings()[1];
assertNotNull("The Description does not contain a second Binding.", binding2);
- fSoapBind2Exts = (SOAPBindingExtensions)binding2.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_SOAP);
+ fSoapBind2Exts = (SOAPBindingExtensions)binding2.getComponentExtensionsForNamespace(ComponentExtensions.NS_URI_SOAP);
assertNotNull("The second Binding does not contain a SOAPBindingExtensions object.");
}
Modified: webservices/woden/branches/woden65/test/org/apache/woden/wsdl20/extensions/soap/SOAPBindingFaultExtensionsTest.java
URL: http://svn.apache.org/viewvc/webservices/woden/branches/woden65/test/org/apache/woden/wsdl20/extensions/soap/SOAPBindingFaultExtensionsTest.java?rev=609714&r1=609713&r2=609714&view=diff
==============================================================================
--- webservices/woden/branches/woden65/test/org/apache/woden/wsdl20/extensions/soap/SOAPBindingFaultExtensionsTest.java (original)
+++ webservices/woden/branches/woden65/test/org/apache/woden/wsdl20/extensions/soap/SOAPBindingFaultExtensionsTest.java Mon Jan 7 09:36:13 2008
@@ -92,7 +92,7 @@
{
BindingFault bindFault = fBinding.getBindingFaults()[0];
SOAPBindingFaultExtensions soapBindFaultExts =
- (SOAPBindingFaultExtensions) bindFault.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_SOAP);
+ (SOAPBindingFaultExtensions) bindFault.getComponentExtensionsForNamespace(ComponentExtensions.NS_URI_SOAP);
SOAPFaultCode soapFaultCode = soapBindFaultExts.getSoapFaultCode();
assertNotNull("The SOAPBindingFaultExtensions did not return a SOAPFaultCode.", soapFaultCode);
@@ -110,7 +110,7 @@
{
BindingFault bindFault = fBinding.getBindingFaults()[1];
SOAPBindingFaultExtensions soapBindFaultExts =
- (SOAPBindingFaultExtensions) bindFault.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_SOAP);
+ (SOAPBindingFaultExtensions) bindFault.getComponentExtensionsForNamespace(ComponentExtensions.NS_URI_SOAP);
SOAPFaultCode soapFaultCode = soapBindFaultExts.getSoapFaultCode();
assertNotNull("The SOAPBindingFaultExtensions did not return a SOAPFaultCode.", soapFaultCode);
@@ -128,7 +128,7 @@
{
BindingFault bindFault = fBinding.getBindingFaults()[2];
SOAPBindingFaultExtensions soapBindFaultExts =
- (SOAPBindingFaultExtensions) bindFault.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_SOAP);
+ (SOAPBindingFaultExtensions) bindFault.getComponentExtensionsForNamespace(ComponentExtensions.NS_URI_SOAP);
SOAPFaultCode soapFaultCode = soapBindFaultExts.getSoapFaultCode();
assertNotNull("The SOAPBindingFaultExtensions did not return a SOAPFaultCode.", soapFaultCode);
@@ -145,7 +145,7 @@
{
BindingFault bindFault = fBinding.getBindingFaults()[0];
SOAPBindingFaultExtensions soapBindFaultExts =
- (SOAPBindingFaultExtensions) bindFault.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_SOAP);
+ (SOAPBindingFaultExtensions) bindFault.getComponentExtensionsForNamespace(ComponentExtensions.NS_URI_SOAP);
SOAPFaultSubcodes soapFaultSubcodes = soapBindFaultExts.getSoapFaultSubcodes();
assertNotNull("The SOAPBindingFaultExtensions did not return a SOAPFaultSubcodes.", soapFaultSubcodes);
@@ -166,7 +166,7 @@
{
BindingFault bindFault = fBinding.getBindingFaults()[1];
SOAPBindingFaultExtensions soapBindFaultExts =
- (SOAPBindingFaultExtensions) bindFault.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_SOAP);
+ (SOAPBindingFaultExtensions) bindFault.getComponentExtensionsForNamespace(ComponentExtensions.NS_URI_SOAP);
SOAPFaultSubcodes soapFaultSubcodes = soapBindFaultExts.getSoapFaultSubcodes();
assertNotNull("The SOAPBindingFaultExtensions did not return a SOAPFaultSubcodes.", soapFaultSubcodes);
@@ -184,7 +184,7 @@
{
BindingFault bindFault = fBinding.getBindingFaults()[2];
SOAPBindingFaultExtensions soapBindFaultExts =
- (SOAPBindingFaultExtensions) bindFault.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_SOAP);
+ (SOAPBindingFaultExtensions) bindFault.getComponentExtensionsForNamespace(ComponentExtensions.NS_URI_SOAP);
SOAPFaultSubcodes soapFaultSubcodes = soapBindFaultExts.getSoapFaultSubcodes();
assertNotNull("The SOAPBindingFaultExtensions did not return a SOAPFaultSubcodes.", soapFaultSubcodes);
@@ -201,7 +201,7 @@
{
BindingFault bindFault = fBinding.getBindingFaults()[1];
SOAPBindingFaultExtensions soapBindFaultExts =
- (SOAPBindingFaultExtensions) bindFault.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_SOAP);
+ (SOAPBindingFaultExtensions) bindFault.getComponentExtensionsForNamespace(ComponentExtensions.NS_URI_SOAP);
SOAPModule[] actual = soapBindFaultExts.getSoapModules();
assertEquals("Unexpected number of SOAPModule objects.", 3, actual.length);
}
@@ -214,7 +214,7 @@
{
BindingFault bindFault = fBinding.getBindingFaults()[2];
SOAPBindingFaultExtensions soapBindFaultExts =
- (SOAPBindingFaultExtensions) bindFault.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_SOAP);
+ (SOAPBindingFaultExtensions) bindFault.getComponentExtensionsForNamespace(ComponentExtensions.NS_URI_SOAP);
SOAPHeaderBlock[] actual = soapBindFaultExts.getSoapHeaders();
assertEquals("Unexpected number of SOAPHeaderBlock objects.", 2, actual.length);
}
Modified: webservices/woden/branches/woden65/test/org/apache/woden/wsdl20/extensions/soap/SOAPBindingFaultReferenceExtensionsTest.java
URL: http://svn.apache.org/viewvc/webservices/woden/branches/woden65/test/org/apache/woden/wsdl20/extensions/soap/SOAPBindingFaultReferenceExtensionsTest.java?rev=609714&r1=609713&r2=609714&view=diff
==============================================================================
--- webservices/woden/branches/woden65/test/org/apache/woden/wsdl20/extensions/soap/SOAPBindingFaultReferenceExtensionsTest.java (original)
+++ webservices/woden/branches/woden65/test/org/apache/woden/wsdl20/extensions/soap/SOAPBindingFaultReferenceExtensionsTest.java Mon Jan 7 09:36:13 2008
@@ -100,7 +100,7 @@
assertTrue("The BindingFaultReference does not represent an <infault> element.", Direction.IN.equals(direction));
SOAPBindingFaultReferenceExtensions soapBindFaultRefExts =
- (SOAPBindingFaultReferenceExtensions) bindFaultRef.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_SOAP);
+ (SOAPBindingFaultReferenceExtensions) bindFaultRef.getComponentExtensionsForNamespace(ComponentExtensions.NS_URI_SOAP);
SOAPModule[] actual = soapBindFaultRefExts.getSoapModules();
assertEquals("Unexpected number of SOAPModule objects.", 2, actual.length);
}
@@ -119,7 +119,7 @@
assertTrue("The BindingFaultReference does not represent an <outfault> element.", Direction.OUT.equals(direction));
SOAPBindingFaultReferenceExtensions soapBindFaultRefExts =
- (SOAPBindingFaultReferenceExtensions) bindFaultRef.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_SOAP);
+ (SOAPBindingFaultReferenceExtensions) bindFaultRef.getComponentExtensionsForNamespace(ComponentExtensions.NS_URI_SOAP);
SOAPModule[] actual = soapBindFaultRefExts.getSoapModules();
assertEquals("Unexpected number of SOAPModule objects.", 1, actual.length);
}
Modified: webservices/woden/branches/woden65/test/org/apache/woden/wsdl20/extensions/soap/SOAPBindingMessageReferenceExtensionsTest.java
URL: http://svn.apache.org/viewvc/webservices/woden/branches/woden65/test/org/apache/woden/wsdl20/extensions/soap/SOAPBindingMessageReferenceExtensionsTest.java?rev=609714&r1=609713&r2=609714&view=diff
==============================================================================
--- webservices/woden/branches/woden65/test/org/apache/woden/wsdl20/extensions/soap/SOAPBindingMessageReferenceExtensionsTest.java (original)
+++ webservices/woden/branches/woden65/test/org/apache/woden/wsdl20/extensions/soap/SOAPBindingMessageReferenceExtensionsTest.java Mon Jan 7 09:36:13 2008
@@ -100,7 +100,7 @@
assertTrue("The BindingMessageReference does not represent an <input> element.", Direction.IN.equals(direction));
SOAPBindingMessageReferenceExtensions soapBindMsgRefExts =
- (SOAPBindingMessageReferenceExtensions) bindMsgRef.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_SOAP);
+ (SOAPBindingMessageReferenceExtensions) bindMsgRef.getComponentExtensionsForNamespace(ComponentExtensions.NS_URI_SOAP);
SOAPModule[] actual = soapBindMsgRefExts.getSoapModules();
assertEquals("Unexpected number of SOAPModule objects.", 2, actual.length);
}
@@ -119,7 +119,7 @@
assertTrue("The BindingMessageReference does not represent an <output> element.", Direction.OUT.equals(direction));
SOAPBindingMessageReferenceExtensions soapBindMsgRefExts =
- (SOAPBindingMessageReferenceExtensions) bindMsgRef.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_SOAP);
+ (SOAPBindingMessageReferenceExtensions) bindMsgRef.getComponentExtensionsForNamespace(ComponentExtensions.NS_URI_SOAP);
SOAPModule[] actual = soapBindMsgRefExts.getSoapModules();
assertEquals("Unexpected number of SOAPModule objects.", 1, actual.length);
}
@@ -134,7 +134,7 @@
assertNotNull("The BindingOperation does not contain a BindingMessageReference.", bindMsgRef);
SOAPBindingMessageReferenceExtensions soapBindMsgRefExts =
- (SOAPBindingMessageReferenceExtensions) bindMsgRef.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_SOAP);
+ (SOAPBindingMessageReferenceExtensions) bindMsgRef.getComponentExtensionsForNamespace(ComponentExtensions.NS_URI_SOAP);
SOAPHeaderBlock[] actual = soapBindMsgRefExts.getSoapHeaders();
assertEquals("Unexpected number of SOAPHeaderBlock objects.", 2, actual.length);
}
@@ -149,7 +149,7 @@
assertNotNull("The BindingOperation does not contain the expected BindingMessageReference.", bindMsgRef);
SOAPBindingMessageReferenceExtensions soapBindMsgRefExts =
- (SOAPBindingMessageReferenceExtensions) bindMsgRef.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_SOAP);
+ (SOAPBindingMessageReferenceExtensions) bindMsgRef.getComponentExtensionsForNamespace(ComponentExtensions.NS_URI_SOAP);
SOAPHeaderBlock[] actual = soapBindMsgRefExts.getSoapHeaders();
assertEquals("Unexpected number of SOAPHeaderBlock objects.", 1, actual.length);
}
Modified: webservices/woden/branches/woden65/test/org/apache/woden/wsdl20/extensions/soap/SOAPBindingOperationExtensionsTest.java
URL: http://svn.apache.org/viewvc/webservices/woden/branches/woden65/test/org/apache/woden/wsdl20/extensions/soap/SOAPBindingOperationExtensionsTest.java?rev=609714&r1=609713&r2=609714&view=diff
==============================================================================
--- webservices/woden/branches/woden65/test/org/apache/woden/wsdl20/extensions/soap/SOAPBindingOperationExtensionsTest.java (original)
+++ webservices/woden/branches/woden65/test/org/apache/woden/wsdl20/extensions/soap/SOAPBindingOperationExtensionsTest.java Mon Jan 7 09:36:13 2008
@@ -97,7 +97,7 @@
public void testGetSoapMep()
{
SOAPBindingOperationExtensions soapBindOperExts =
- (SOAPBindingOperationExtensions) fBindOper.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_SOAP);
+ (SOAPBindingOperationExtensions) fBindOper.getComponentExtensionsForNamespace(ComponentExtensions.NS_URI_SOAP);
URI soapMep = soapBindOperExts.getSoapMep();
assertNotNull("The SOAPBindingOperationExtensions did not return a value for {soap mep}.", soapMep);
@@ -111,7 +111,7 @@
public void testGetSoapAction()
{
SOAPBindingOperationExtensions soapBindOperExts =
- (SOAPBindingOperationExtensions) fBindOper.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_SOAP);
+ (SOAPBindingOperationExtensions) fBindOper.getComponentExtensionsForNamespace(ComponentExtensions.NS_URI_SOAP);
URI soapAction = soapBindOperExts.getSoapAction();
assertNotNull("The SOAPBindingOperationExtensions did not return a value for {soap action}.", soapAction);
@@ -125,7 +125,7 @@
public void testGetSoapModules()
{
SOAPBindingOperationExtensions soapBindOperExts =
- (SOAPBindingOperationExtensions) fBindOper.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_SOAP);
+ (SOAPBindingOperationExtensions) fBindOper.getComponentExtensionsForNamespace(ComponentExtensions.NS_URI_SOAP);
SOAPModule[] actual = soapBindOperExts.getSoapModules();
assertEquals("Unexpected number of SOAPModule objects.", 1, actual.length);
}
@@ -138,14 +138,14 @@
public void testGetHttpQueryParameterSeparator()
{
SOAPBindingOperationExtensions soapBindOperExts =
- (SOAPBindingOperationExtensions) fBindOper.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_SOAP);
+ (SOAPBindingOperationExtensions) fBindOper.getComponentExtensionsForNamespace(ComponentExtensions.NS_URI_SOAP);
String actual = soapBindOperExts.getHttpQueryParameterSeparator();
assertNotNull("The SOAPBindingOperationExtensions did not return a value for {http query parameter separator}.", actual);
assertEquals("Unexpected value for http query parameter separator.", "$", actual);
SOAPBindingOperationExtensions soapBind2OperExts =
- (SOAPBindingOperationExtensions) fBind2Oper.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_SOAP);
+ (SOAPBindingOperationExtensions) fBind2Oper.getComponentExtensionsForNamespace(ComponentExtensions.NS_URI_SOAP);
String actual2 = soapBind2OperExts.getHttpQueryParameterSeparator();
assertNull("Non-null value for http query parameter separator.", actual2);
Modified: webservices/woden/branches/woden65/test/org/apache/woden/wsdl20/fragids/FragmentIdentificationTest.java
URL: http://svn.apache.org/viewvc/webservices/woden/branches/woden65/test/org/apache/woden/wsdl20/fragids/FragmentIdentificationTest.java?rev=609714&r1=609713&r2=609714&view=diff
==============================================================================
--- webservices/woden/branches/woden65/test/org/apache/woden/wsdl20/fragids/FragmentIdentificationTest.java (original)
+++ webservices/woden/branches/woden65/test/org/apache/woden/wsdl20/fragids/FragmentIdentificationTest.java Mon Jan 7 09:36:13 2008
@@ -1,5 +1,3 @@
-package org.apache.woden.wsdl20.fragids;
-
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -16,6 +14,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+package org.apache.woden.wsdl20.fragids;
+
import java.net.URL;
import org.apache.woden.WSDLFactory;
@@ -57,17 +57,17 @@
assertEquals("wsdl.description()", desc.toString());
//Elements
- assertEquals("xmlns(ghns=http://greath.example.com/2004/schemas/resSvc)wsdl.elementDeclaration(ghns:checkAvailability)",
+ assertEquals("xmlns(ns1=http://greath.example.com/2004/schemas/resSvc)wsdl.elementDeclaration(ns1:checkAvailability)",
desc.getElementDeclaration(new QName("http://greath.example.com/2004/schemas/resSvc","checkAvailability")).toString());
- assertEquals("xmlns(ghns=http://greath.example.com/2004/schemas/resSvc)wsdl.elementDeclaration(ghns:checkAvailabilityResponse)",
+ assertEquals("xmlns(ns1=http://greath.example.com/2004/schemas/resSvc)wsdl.elementDeclaration(ns1:checkAvailabilityResponse)",
desc.getElementDeclaration(new QName("http://greath.example.com/2004/schemas/resSvc","checkAvailabilityResponse")).toString());
- assertEquals("xmlns(ghns=http://greath.example.com/2004/schemas/resSvc)wsdl.elementDeclaration(ghns:invalidDataError)",
+ assertEquals("xmlns(ns1=http://greath.example.com/2004/schemas/resSvc)wsdl.elementDeclaration(ns1:invalidDataError)",
desc.getElementDeclaration(new QName("http://greath.example.com/2004/schemas/resSvc","invalidDataError")).toString());
//Types
- assertEquals("xmlns(ghns=http://greath.example.com/2004/schemas/resSvc)wsdl.typeDefinition(ghns:tCheckAvailability)",
+ assertEquals("xmlns(ns1=http://greath.example.com/2004/schemas/resSvc)wsdl.typeDefinition(ns1:tCheckAvailability)",
desc.getTypeDefinition(new QName("http://greath.example.com/2004/schemas/resSvc","tCheckAvailability")).toString());
//Interface
@@ -86,26 +86,26 @@
assertEquals("wsdl.interfaceMessageReference(reservationInterface/opCheckAvailability/Out)",
desc.getInterface(new QName("http://greath.example.com/2004/wsdl/resSvc", "reservationInterface")).getInterfaceOperation(new QName("http://greath.example.com/2004/wsdl/resSvc", "opCheckAvailability")).getInterfaceMessageReferences()[1].toString());
- assertEquals("xmlns(tns=http://greath.example.com/2004/wsdl/resSvc)wsdl.interfaceFaultReference(reservationInterface/opCheckAvailability/Out/tns:invalidDataFault)",
+ assertEquals("xmlns(ns1=http://greath.example.com/2004/wsdl/resSvc)wsdl.interfaceFaultReference(reservationInterface/opCheckAvailability/Out/ns1:invalidDataFault)",
desc.getInterface(new QName("http://greath.example.com/2004/wsdl/resSvc", "reservationInterface")).getInterfaceOperation(new QName("http://greath.example.com/2004/wsdl/resSvc", "opCheckAvailability", "tns")).getInterfaceFaultReferences()[0].toString());
//Binding
assertEquals("wsdl.binding(reservationSOAPBinding)",
desc.getBinding(new QName("http://greath.example.com/2004/wsdl/resSvc", "reservationSOAPBinding")).toString());
- assertEquals("xmlns(tns=http://greath.example.com/2004/wsdl/resSvc)wsdl.bindingFault(reservationSOAPBinding/tns:invalidDataFault)",
+ assertEquals("xmlns(ns1=http://greath.example.com/2004/wsdl/resSvc)wsdl.bindingFault(reservationSOAPBinding/ns1:invalidDataFault)",
desc.getBinding(new QName("http://greath.example.com/2004/wsdl/resSvc", "reservationSOAPBinding")).getBindingFaults()[0].toString());
- assertEquals("xmlns(tns=http://greath.example.com/2004/wsdl/resSvc)wsdl.bindingOperation(reservationSOAPBinding/tns:opCheckAvailability)",
+ assertEquals("xmlns(ns1=http://greath.example.com/2004/wsdl/resSvc)wsdl.bindingOperation(reservationSOAPBinding/ns1:opCheckAvailability)",
desc.getBinding(new QName("http://greath.example.com/2004/wsdl/resSvc", "reservationSOAPBinding")).getBindingOperations()[0].toString());
- assertEquals("xmlns(tns=http://greath.example.com/2004/wsdl/resSvc)wsdl.bindingMessageReference(reservationSOAPBinding/tns:opCheckAvailability/In)",
+ assertEquals("xmlns(ns1=http://greath.example.com/2004/wsdl/resSvc)wsdl.bindingMessageReference(reservationSOAPBinding/ns1:opCheckAvailability/In)",
desc.getBinding(new QName("http://greath.example.com/2004/wsdl/resSvc", "reservationSOAPBinding")).getBindingOperations()[0].getBindingMessageReferences()[0].toString());
- assertEquals("xmlns(tns=http://greath.example.com/2004/wsdl/resSvc)wsdl.bindingMessageReference(reservationSOAPBinding/tns:opCheckAvailability/Out)",
+ assertEquals("xmlns(ns1=http://greath.example.com/2004/wsdl/resSvc)wsdl.bindingMessageReference(reservationSOAPBinding/ns1:opCheckAvailability/Out)",
desc.getBinding(new QName("http://greath.example.com/2004/wsdl/resSvc", "reservationSOAPBinding")).getBindingOperations()[0].getBindingMessageReferences()[1].toString());
- assertEquals("xmlns(tns=http://greath.example.com/2004/wsdl/resSvc)wsdl.bindingFaultReference(reservationSOAPBinding/tns:opCheckAvailability/Out/tns:invalidDataFault)",
+ assertEquals("xmlns(ns1=http://greath.example.com/2004/wsdl/resSvc)wsdl.bindingFaultReference(reservationSOAPBinding/ns1:opCheckAvailability/Out/ns1:invalidDataFault)",
desc.getBinding(new QName("http://greath.example.com/2004/wsdl/resSvc", "reservationSOAPBinding")).getBindingOperations()[0].getBindingFaultReferences()[0].toString());
//Service
@@ -115,6 +115,6 @@
assertEquals("wsdl.endpoint(reservationService/reservationEndpoint)",
desc.getService(new QName("http://greath.example.com/2004/wsdl/resSvc", "reservationService")).getEndpoints()[0].toString());
- //TODO add tests for BindingMessageReference, BindingFaultReference, Extensions.
+ //TODO add tests for Extensions.
}
}
Modified: webservices/woden/branches/woden65/test/org/apache/woden/wsdl20/xml/BindingFaultReferenceElementTest.java
URL: http://svn.apache.org/viewvc/webservices/woden/branches/woden65/test/org/apache/woden/wsdl20/xml/BindingFaultReferenceElementTest.java?rev=609714&r1=609713&r2=609714&view=diff
==============================================================================
--- webservices/woden/branches/woden65/test/org/apache/woden/wsdl20/xml/BindingFaultReferenceElementTest.java (original)
+++ webservices/woden/branches/woden65/test/org/apache/woden/wsdl20/xml/BindingFaultReferenceElementTest.java Mon Jan 7 09:36:13 2008
@@ -116,13 +116,6 @@
fFaultReference.setMessageLabel(new NCName("Fault1MessageLabel"));
fFaultReference.setRef(new QName("Fault1Ref"));
- descriptionElement.toComponent();
- // Note : Description's list of interfaces does not get setup until toComponent() is invoked.
- // therefore cannot successfully traverse the element model without creating the component model.
- // Creating the component model requires that the extension registry is instantiated.
- // TODO Note that neither this, not creating an extension registry is necessary on BindingFaultTest,
- // so there is some perceived inconsistency in the API.
-
InterfaceFaultReferenceElement retrievedFault = fFaultReference.getInterfaceFaultReferenceElement();
assertEquals("The retrieved InterfaceFaultReferenceElement is not that which was set",
iffrElement, retrievedFault);
Modified: webservices/woden/branches/woden65/test/org/apache/woden/wsdl20/xml/BindingMessageReferenceElementTest.java
URL: http://svn.apache.org/viewvc/webservices/woden/branches/woden65/test/org/apache/woden/wsdl20/xml/BindingMessageReferenceElementTest.java?rev=609714&r1=609713&r2=609714&view=diff
==============================================================================
--- webservices/woden/branches/woden65/test/org/apache/woden/wsdl20/xml/BindingMessageReferenceElementTest.java (original)
+++ webservices/woden/branches/woden65/test/org/apache/woden/wsdl20/xml/BindingMessageReferenceElementTest.java Mon Jan 7 09:36:13 2008
@@ -16,10 +16,14 @@
*/
package org.apache.woden.wsdl20.xml;
+import javax.xml.namespace.QName;
+
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
+import org.apache.woden.WSDLException;
+import org.apache.woden.WSDLFactory;
import org.apache.woden.internal.wsdl20.BindingMessageReferenceImpl;
import org.apache.woden.types.NCName;
import org.apache.woden.wsdl20.enumeration.Direction;
@@ -80,4 +84,41 @@
assertEquals("The retrieved messageLabel is not that which was set",
messageRefNCName, fMessageReference.getMessageLabel());
}
+
+ /*
+ * Test that the associated InterfaceMessageReferenceElement can be retrieved.
+ */
+ public void testGetInterfaceMessageReferenceElement()
+ {
+ WSDLFactory factory = null;
+ try {
+ factory = WSDLFactory.newInstance();
+ } catch (WSDLException e) {
+ fail("Can't instantiate the WSDLFactory object.");
+ }
+
+ DescriptionElement descriptionElement = factory.newDescription();
+
+ // Create the BindingElement->InterfaceElement->InterfaceOperationElement->InterfaceMessageReferenceElement
+ BindingElement bindingElement = descriptionElement.addBindingElement();
+ bindingElement.setInterfaceName(new QName("interface1"));
+
+ InterfaceElement interfaceElement = descriptionElement.addInterfaceElement();
+ interfaceElement.setName(new NCName("interface1"));
+
+ InterfaceOperationElement ifopElement = interfaceElement.addInterfaceOperationElement();
+ ifopElement.setName(new NCName("operation1"));
+ InterfaceMessageReferenceElement ifmrElement = ifopElement.addInterfaceMessageReferenceElement();
+ ifmrElement.setMessageLabel(new NCName("input1MessageLabel"));
+
+ // Create the BindingOperationElement->BindingMessageReferenceElement
+ BindingOperationElement bopElement = bindingElement.addBindingOperationElement();
+ bopElement.setRef(new QName("operation1"));
+ fMessageReference = bopElement.addBindingMessageReferenceElement();
+ fMessageReference.setMessageLabel(new NCName("input1MessageLabel"));
+
+ InterfaceMessageReferenceElement retrievedMsgRef = fMessageReference.getInterfaceMessageReferenceElement();
+ assertEquals("The InterfaceMessageReferenceElement is not the expected one.",
+ ifmrElement, retrievedMsgRef);
+ }
}
Modified: webservices/woden/branches/woden65/test/org/apache/woden/wsdl20/xml/DescriptiontElementTest.java
URL: http://svn.apache.org/viewvc/webservices/woden/branches/woden65/test/org/apache/woden/wsdl20/xml/DescriptiontElementTest.java?rev=609714&r1=609713&r2=609714&view=diff
==============================================================================
--- webservices/woden/branches/woden65/test/org/apache/woden/wsdl20/xml/DescriptiontElementTest.java (original)
+++ webservices/woden/branches/woden65/test/org/apache/woden/wsdl20/xml/DescriptiontElementTest.java Mon Jan 7 09:36:13 2008
@@ -89,38 +89,6 @@
assertEquals("Retrieved target Namespace URI differs from that set", fNamespace1, retrievedTNS);
}
- public void testAddGetNamespace() {
- fDescriptionElement.addNamespace(fPrefix1,fNamespace1);
- URI uri = fDescriptionElement.getNamespace(fPrefix1);
- assertEquals("Retrieved NamespaceURI does not match that set", fNamespace1, uri);
- }
-
- /*
- * Test getNamespace() when the prefix & namespace pair has not been previously added
- */
- public void testGetNullNamespace() {
- assertNull("Null was not returned when a non-existent prefix was given", fDescriptionElement.getNamespace("nosuchprefix"));
- }
-
- public void testRemoveNamespace() {
- fDescriptionElement.addNamespace(fPrefix1,fNamespace1);
- assertNotNull(fDescriptionElement.getNamespace(fPrefix1));
- fDescriptionElement.removeNamespace(fPrefix1);
- assertNull(fDescriptionElement.getNamespace(fPrefix1));
- }
-
- public void testAddGetNamespaces() {
- fDescriptionElement.addNamespace(fPrefix1,fNamespace1);
- fDescriptionElement.addNamespace(fPrefix2,fNamespace2);
- Map uriMap = fDescriptionElement.getNamespaces();
- assertEquals("Expected 2 namespaces", uriMap.size(),2);
- URI uri1 = (URI)uriMap.get(fPrefix1);
- URI uri2 = (URI)uriMap.get(fPrefix2);
- assertEquals("Expected NamespaceURI not found", fNamespace1, uri1);
- assertEquals("Expected NamespaceURI not found", fNamespace2, uri2);
- }
-
-
public void testAddGetImportElements() {
ImportElement importElement1 = fDescriptionElement.addImportElement();
ImportElement importElement2 = fDescriptionElement.addImportElement();
Modified: webservices/woden/branches/woden65/test/org/apache/woden/wsdl20/xml/InterfaceFaultElementTest.java
URL: http://svn.apache.org/viewvc/webservices/woden/branches/woden65/test/org/apache/woden/wsdl20/xml/InterfaceFaultElementTest.java?rev=609714&r1=609713&r2=609714&view=diff
==============================================================================
--- webservices/woden/branches/woden65/test/org/apache/woden/wsdl20/xml/InterfaceFaultElementTest.java (original)
+++ webservices/woden/branches/woden65/test/org/apache/woden/wsdl20/xml/InterfaceFaultElementTest.java Mon Jan 7 09:36:13 2008
@@ -16,6 +16,10 @@
*/
package org.apache.woden.wsdl20.xml;
+import java.io.Reader;
+import java.io.StringReader;
+import java.net.URI;
+
import javax.xml.namespace.QName;
import junit.framework.Test;
@@ -24,9 +28,16 @@
import org.apache.woden.WSDLException;
import org.apache.woden.WSDLFactory;
-import org.apache.woden.internal.wsdl20.DescriptionImpl;
-import org.apache.woden.internal.wsdl20.InterfaceFaultImpl;
+import org.apache.woden.internal.schema.InlinedSchemaImpl;
+import org.apache.woden.schema.InlinedSchema;
import org.apache.woden.types.NCName;
+import org.apache.woden.types.QNameTokenUnion;
+import org.apache.ws.commons.schema.XmlSchema;
+import org.apache.ws.commons.schema.XmlSchemaCollection;
+import org.apache.ws.commons.schema.XmlSchemaElement;
+import org.apache.xerces.parsers.DOMParser;
+import org.apache.xerces.xni.parser.XMLInputSource;
+import org.w3c.dom.Document;
/**
* Unit tests for the InterfaceFaultElement class.
@@ -35,7 +46,12 @@
*/
public class InterfaceFaultElementTest extends TestCase {
- private InterfaceFaultElement fFault;
+ private DescriptionElement fDescriptionElement = null;
+ private InterfaceElement fInterfaceElement = null;
+ private InterfaceFaultElement fFaultElement;
+ private final String TNS = "http://example.org";
+ private final String INTF_NAME = "interfaceName";
+ private final String FAULT_NAME = "faultName";
public static Test suite()
{
@@ -51,34 +67,111 @@
fail("Can't instantiate the WSDLFactory object.");
}
- DescriptionElement desc = factory.newDescription();
- fFault = (desc.addInterfaceElement()).addInterfaceFaultElement();
+ fDescriptionElement = factory.newDescription();
+ fDescriptionElement.setTargetNamespace(URI.create(TNS));
+ fInterfaceElement = fDescriptionElement.addInterfaceElement();
+ fInterfaceElement.setName(new NCName(INTF_NAME));
+ fFaultElement = fInterfaceElement.addInterfaceFaultElement();
}
/*
- * Test that an (optional) ElementName QName can be successfully set and retrieved
- */
- public void testSetGetElementName()
- {
- // Default case
- assertNull("The retrieved Element name when unset should be null", fFault.getElementName());
-
- QName elementName = new QName("elementName");
- fFault.setElementName(elementName);
- assertEquals("The retrieved Element name is not that which was set",
- elementName, fFault.getElementName());
- }
-
- /*
* Test that a (Mandatory) Name QName can be successfully set and retrieved
*/
public void testSetGetName()
{
- QName faultName = new QName("faultName");
- NCName faultNCName = new NCName("faultName");
- fFault.setName(faultNCName);
- assertEquals("The retrieved Element name is not that which was set",
- faultName, fFault.getName());
+ QName faultName = new QName(TNS, FAULT_NAME);
+ NCName faultNCName = new NCName(FAULT_NAME);
+ fFaultElement.setName(faultNCName);
+ assertEquals("The retrieved fault name is not that which was set",
+ faultName, fFaultElement.getName());
}
+
+ /*
+ * Test that the optional attribute ("element") can be successfully set and retrieved
+ */
+ public void testSetGetElement()
+ {
+ //test with type qname.
+ QNameTokenUnion element = new QNameTokenUnion(new QName("ElementName"));
+ fFaultElement.setElement(element);
+ assertEquals("The retrieved 'element' attribute is not that which was set",
+ element, fFaultElement.getElement());
+
+ //test with type token.
+ QNameTokenUnion token = QNameTokenUnion.ANY;
+ fFaultElement.setElement(token);
+ assertEquals("The retrieved 'element' attribute is not that which was set",
+ token, fFaultElement.getElement());
+ }
+
+ /*
+ * Test that the optional schema element declaration can be successfully retrieved if
+ * the QNameTokenUnion is of type qname and if it is of type token, that there is no
+ * element declaration returned.
+ */
+ public void testGetXmlSchemaElement() throws Exception
+ {
+ WSDLFactory factory = null;
+ try {
+ factory = WSDLFactory.newInstance();
+ } catch (WSDLException e) {
+ fail("Can't instantiate the WSDLFactory object.");
+ }
+
+ // Create the DescriptionElement->InterfaceElement->InterfaceOperationElement->InterfaceMessageReferenceElement hierarchy
+ DescriptionElement descriptionElement = factory.newDescription();
+ InterfaceElement interfaceElement = descriptionElement.addInterfaceElement();
+ InterfaceFaultElement faultElement = interfaceElement.addInterfaceFaultElement();
+
+ // Default case:
+ XmlSchemaElement retrievedElement = faultElement.getXmlSchemaElement();
+ assertNull("Should return null if 'element' attribute is not set", retrievedElement);
+
+ // Case 1 - (with 'element' set to #any)
+ faultElement.setElement(QNameTokenUnion.ANY);
+ retrievedElement = faultElement.getXmlSchemaElement();
+ assertNull("Should return null if 'element' attribute is #any", retrievedElement);
+
+ // Case 2 - (with 'element' set to #none)
+ faultElement.setElement(QNameTokenUnion.NONE);
+ retrievedElement = faultElement.getXmlSchemaElement();
+ assertNull("Should return null if 'element' attribute is #none", retrievedElement);
+
+ // Case 3 - (with 'element' set to #other)
+ faultElement.setElement(QNameTokenUnion.OTHER);
+ retrievedElement = faultElement.getXmlSchemaElement();
+ assertNull("Should return null if 'element' attribute is #other", retrievedElement);
+
+ // Case 4 - (with 'element' set to the qname of a schema element declaration)
+ TypesElement typesElement = descriptionElement.addTypesElement(); //throws WSDLException
+ InlinedSchema schema = new InlinedSchemaImpl();
+ String schemaString = "<schema xmlns=\"http://www.w3.org/2001/XMLSchema\" targetNamespace=\"http://www.sample.org\">"
+ + "<complexType name=\"myType\">"
+ + "<sequence>"
+ + "<element name=\"element\" type=\"string\"/>"
+ + "</sequence>"
+ + "</complexType>"
+ + "<element name=\"myElement\" type=\"string\"/>"
+ + "</schema>";
+ DOMParser builder = new DOMParser();
+ Reader reader = new StringReader(schemaString);
+ XMLInputSource is = new XMLInputSource(null,null,null,reader,null);
+ builder.parse(is); //throws IOException
+ Document schemaDoc1 = builder.getDocument();
+ XmlSchemaCollection xsc = new XmlSchemaCollection();
+ XmlSchema xs1 = xsc.read(schemaDoc1.getDocumentElement());
+ schema.setSchemaDefinition(xs1);
+ URI schemaNS = URI.create("http://www.sample.org");
+ schema.setNamespace(schemaNS);
+ typesElement.addSchema(schema);
+
+ QName elemQN = new QName("http://www.sample.org","myElement");
+ XmlSchemaElement expectedElement = xs1.getElementByName(elemQN);
+
+ faultElement.setElement(new QNameTokenUnion(elemQN));
+ retrievedElement = faultElement.getXmlSchemaElement();
+ assertEquals("The 'element' qname should resolve to the expected XML Schema element declaration",
+ expectedElement, retrievedElement);
+ }
}
Modified: webservices/woden/branches/woden65/test/org/apache/woden/wsdl20/xml/InterfaceMessageReferenceElementTest.java
URL: http://svn.apache.org/viewvc/webservices/woden/branches/woden65/test/org/apache/woden/wsdl20/xml/InterfaceMessageReferenceElementTest.java?rev=609714&r1=609713&r2=609714&view=diff
==============================================================================
--- webservices/woden/branches/woden65/test/org/apache/woden/wsdl20/xml/InterfaceMessageReferenceElementTest.java (original)
+++ webservices/woden/branches/woden65/test/org/apache/woden/wsdl20/xml/InterfaceMessageReferenceElementTest.java Mon Jan 7 09:36:13 2008
@@ -16,6 +16,8 @@
*/
package org.apache.woden.wsdl20.xml;
+import java.io.Reader;
+import java.io.StringReader;
import java.net.URI;
import javax.xml.namespace.QName;
@@ -26,14 +28,18 @@
import org.apache.woden.WSDLException;
import org.apache.woden.WSDLFactory;
-import org.apache.woden.internal.wsdl20.Constants;
-import org.apache.woden.internal.wsdl20.DescriptionImpl;
-import org.apache.woden.internal.wsdl20.ElementDeclarationImpl;
+import org.apache.woden.internal.schema.InlinedSchemaImpl;
import org.apache.woden.internal.wsdl20.InterfaceMessageReferenceImpl;
+import org.apache.woden.schema.InlinedSchema;
import org.apache.woden.types.NCName;
-import org.apache.woden.wsdl20.ElementDeclaration;
+import org.apache.woden.types.QNameTokenUnion;
import org.apache.woden.wsdl20.enumeration.Direction;
+import org.apache.ws.commons.schema.XmlSchema;
+import org.apache.ws.commons.schema.XmlSchemaCollection;
import org.apache.ws.commons.schema.XmlSchemaElement;
+import org.apache.xerces.parsers.DOMParser;
+import org.apache.xerces.xni.parser.XMLInputSource;
+import org.w3c.dom.Document;
@@ -44,8 +50,7 @@
*/
public class InterfaceMessageReferenceElementTest extends TestCase {
- private InterfaceMessageReferenceElement fMessageReference = null;
- private URI fNamespace = null;
+ private InterfaceMessageReferenceElement fMessageReferenceElement = null;
public static Test suite()
{
@@ -58,8 +63,7 @@
protected void setUp() throws Exception
{
super.setUp();
- fMessageReference = new InterfaceMessageReferenceImpl();
- fNamespace = new URI("http://apache.org/testns");
+ fMessageReferenceElement = new InterfaceMessageReferenceImpl();
}
/*
@@ -76,11 +80,11 @@
public void testSetGetDirection()
{
// Default case
- assertNull("The retrieved Direction when unset should be null", fMessageReference.getDirection());
+ assertNull("The retrieved Direction when unset should be null", fMessageReferenceElement.getDirection());
- fMessageReference.setDirection(Direction.OUT);
+ fMessageReferenceElement.setDirection(Direction.OUT);
assertEquals("The retrieved MessageReference direction is not that which was set",
- Direction.OUT, fMessageReference.getDirection());
+ Direction.OUT, fMessageReferenceElement.getDirection());
}
/*
@@ -89,43 +93,39 @@
public void testSetGetMessageLabel()
{
NCName messageRefNCName = new NCName("messageRefName");
- fMessageReference.setMessageLabel(messageRefNCName);
+ fMessageReferenceElement.setMessageLabel(messageRefNCName);
assertEquals("The retrieved messageLabel is not that which was set",
- messageRefNCName, fMessageReference.getMessageLabel());
+ messageRefNCName, fMessageReferenceElement.getMessageLabel());
}
- /*
- * Test that the (Mandatory) Message Content Model property can be successfully set and retrieved
- */
- public void testSetGetMessageContentModel()
- {
- fMessageReference.setMessageContentModel("contentModel");
- assertEquals("The retrieved Message Content Model is not that which was set",
- "contentModel", fMessageReference.getMessageContentModel());
- }
-
-
/*
- * Test that the (Mandatory) Element Name attribute ("element") can be successfully set and retrieved
+ * Test that the optional attribute ("element") can be successfully set and retrieved
*/
- public void testSetGetElementName()
+ public void testSetGetElement()
{
- QName elementName = new QName("ElementName");
- fMessageReference.setElementName(elementName);
- assertEquals("The retrieved Element Name attribute is not that which was set",
- elementName, fMessageReference.getElementName());
+ //test with type qname.
+ QNameTokenUnion element = new QNameTokenUnion(new QName("ElementName"));
+ fMessageReferenceElement.setElement(element);
+ assertEquals("The retrieved 'element' attribute is not that which was set",
+ element, fMessageReferenceElement.getElement());
+
+ //test with type token.
+ QNameTokenUnion token = QNameTokenUnion.ANY;
+ fMessageReferenceElement.setElement(token);
+ assertEquals("The retrieved 'element' attribute is not that which was set",
+ token, fMessageReferenceElement.getElement());
}
/*
- * Test that the (Optional) Element Declaration property can be successfully retrieved.
- * The element reference is to an Element Declaration associated with a TypeDef below the ancestor Description,
- * of the name set in setElementName().
+ * Test that the optional schema element declaration can be successfully retrieved if
+ * the QNameTokenUnion is of type qname and if it is of type token, that there is no
+ * element declaration returned.
*
* TODO Need to check model structure for XmlSchema
*/
- public void testGetElement()
- {
+ public void testGetXmlSchemaElement() throws Exception
+ {
WSDLFactory factory = null;
try {
factory = WSDLFactory.newInstance();
@@ -137,63 +137,56 @@
DescriptionElement descriptionElement = factory.newDescription();
InterfaceElement interfaceElement = descriptionElement.addInterfaceElement();
InterfaceOperationElement interfaceOperationElement = interfaceElement.addInterfaceOperationElement();
-
- // create the InterfaceMessageReferenceElement to test
InterfaceMessageReferenceElement messageReference = interfaceOperationElement.addInterfaceMessageReferenceElement();
// Default case:
- XmlSchemaElement retrievedElement = messageReference.getElement();
- assertNull("Unset Element Declaration should return null", retrievedElement);
+ XmlSchemaElement retrievedElement = messageReference.getXmlSchemaElement();
+ assertNull("Should return null if 'element' attribute is not set", retrievedElement);
- // populated case 1 - (with Message Content Model set to #ANY or #NONE).
- ElementDeclaration ed = new ElementDeclarationImpl();
- ((DescriptionImpl)descriptionElement).addElementDeclaration(ed);
- messageReference.setMessageContentModel(Constants.NMTOKEN_NONE);
-
- descriptionElement.toComponent();
-
- retrievedElement = messageReference.getElement();
- assertNull("The retrieved Element Declation should return null when message content model is #NONE",
- retrievedElement);
-
- messageReference.setMessageContentModel(Constants.NMTOKEN_ANY);
- descriptionElement.toComponent();
- retrievedElement = messageReference.getElement();
- assertNull("The retrieved Element Declaration should return null when message content model is #ANY",
- retrievedElement);
-
- /* TODO following populated case (with Message Content Model set) requires XmlSchema "element" field to be set.
- * (probably via org.apache.ws.commons.schema.SchemaBuilder.handleXmlSchemaElement())
- */
-/*
- // populated case 2 - success:
-
- // Add a TypesElement to the Description
- TypesElement typesElement = descriptionElement.getTypesElement();
-
- // Add a namespace-identified schema element declaration to the Types element
- XmlSchemaCollection xsc = new XmlSchemaCollection();
- XmlSchema xmlSchema = new XmlSchema("ElementName", xsc);
- Schema schema = new ImportedSchemaImpl(); // arbitrary schema
- schema.setNamespace(fNamespace);
- schema.setSchemaDefinition(xmlSchema);
- typesElement.addSchema(schema);
-
- fExtensionRegistry.registerComponentExtension(InterfaceOperation.class,
- InterfaceOperationExtensionsImpl.URI_NS_EXTENSIONS, InterfaceOperationExtensionsImpl.class);
-
- descriptionElement.setExtensionRegistry(fExtensionRegistry);
-
- // set the element name reference
- QName elementName = new QName("http://apache.org/testns", "ElementName");
- messageReference.setElementName(elementName);
- messageReference.setMessageContentModel(Constants.NMTOKEN_ELEMENT);
-
- //descriptionElement.toComponent(); // quick test of model integrity for testing purposes
-
- retrievedElement = messageReference.getElement();
- assertEquals("The retrieved Element is not that which was set",
- schema, retrievedElement);
-*/
+ // Case 1 - (with 'element' set to #any)
+ messageReference.setElement(QNameTokenUnion.ANY);
+ retrievedElement = messageReference.getXmlSchemaElement();
+ assertNull("Should return null if 'element' attribute is #any", retrievedElement);
+
+ // Case 2 - (with 'element' set to #none)
+ messageReference.setElement(QNameTokenUnion.NONE);
+ retrievedElement = messageReference.getXmlSchemaElement();
+ assertNull("Should return null if 'element' attribute is #none", retrievedElement);
+
+ // Case 3 - (with 'element' set to #other)
+ messageReference.setElement(QNameTokenUnion.OTHER);
+ retrievedElement = messageReference.getXmlSchemaElement();
+ assertNull("Should return null if 'element' attribute is #other", retrievedElement);
+
+ // Case 4 - (with 'element' set to the qname of a schema element declaration)
+ TypesElement typesElement = descriptionElement.addTypesElement(); //throws WSDLException
+ InlinedSchema schema = new InlinedSchemaImpl();
+ String schemaString = "<schema xmlns=\"http://www.w3.org/2001/XMLSchema\" targetNamespace=\"http://www.sample.org\">"
+ + "<complexType name=\"myType\">"
+ + "<sequence>"
+ + "<element name=\"element\" type=\"string\"/>"
+ + "</sequence>"
+ + "</complexType>"
+ + "<element name=\"myElement\" type=\"string\"/>"
+ + "</schema>";
+ DOMParser builder = new DOMParser();
+ Reader reader = new StringReader(schemaString);
+ XMLInputSource is = new XMLInputSource(null,null,null,reader,null);
+ builder.parse(is); //throws IOException
+ Document schemaDoc1 = builder.getDocument();
+ XmlSchemaCollection xsc = new XmlSchemaCollection();
+ XmlSchema xs1 = xsc.read(schemaDoc1.getDocumentElement());
+ schema.setSchemaDefinition(xs1);
+ URI schemaNS = URI.create("http://www.sample.org");
+ schema.setNamespace(schemaNS);
+ typesElement.addSchema(schema);
+
+ QName elemQN = new QName("http://www.sample.org","myElement");
+ XmlSchemaElement expectedElement = xs1.getElementByName(elemQN);
+
+ messageReference.setElement(new QNameTokenUnion(elemQN));
+ retrievedElement = messageReference.getXmlSchemaElement();
+ assertEquals("The 'element' qname should resolve to the expected XML Schema element declaration",
+ expectedElement, retrievedElement);
}
}
Modified: webservices/woden/branches/woden65/test/org/apache/woden/wsdl20/xml/OMServiceElementTest.java
URL: http://svn.apache.org/viewvc/webservices/woden/branches/woden65/test/org/apache/woden/wsdl20/xml/OMServiceElementTest.java?rev=609714&r1=609713&r2=609714&view=diff
==============================================================================
--- webservices/woden/branches/woden65/test/org/apache/woden/wsdl20/xml/OMServiceElementTest.java (original)
+++ webservices/woden/branches/woden65/test/org/apache/woden/wsdl20/xml/OMServiceElementTest.java Mon Jan 7 09:36:13 2008
@@ -98,14 +98,8 @@
* Test that the QName specified on the setName method is returned by getName.
*/
public void testSetAndGetNameFromOM() throws Exception{
- WSDLFactory factory = null;
- try {
- factory = WSDLFactory.newInstance();
- } catch (WSDLException e) {
- fail("Can't instantiate the WSDLFactory object.");
- }
- DescriptionElement descElem = factory.newDescription();
+ DescriptionElement descElem = fFactory.newDescription();
descElem.setTargetNamespace(new URI("urn:woden"));
ServiceElement service = descElem.addServiceElement();
service.setName(new NCName(fQName.getLocalPart()));
Modified: webservices/woden/branches/woden65/test/org/apache/woden/wsdl20/xml/TypesElementTest.java
URL: http://svn.apache.org/viewvc/webservices/woden/branches/woden65/test/org/apache/woden/wsdl20/xml/TypesElementTest.java?rev=609714&r1=609713&r2=609714&view=diff
==============================================================================
--- webservices/woden/branches/woden65/test/org/apache/woden/wsdl20/xml/TypesElementTest.java (original)
+++ webservices/woden/branches/woden65/test/org/apache/woden/wsdl20/xml/TypesElementTest.java Mon Jan 7 09:36:13 2008
@@ -16,6 +16,7 @@
*/
package org.apache.woden.wsdl20.xml;
+import java.net.URI;
import java.util.Arrays;
import java.util.List;
@@ -23,6 +24,7 @@
import junit.framework.TestCase;
import junit.framework.TestSuite;
+import org.apache.woden.WSDLFactory;
import org.apache.woden.internal.schema.ImportedSchemaImpl;
import org.apache.woden.internal.schema.InlinedSchemaImpl;
import org.apache.woden.internal.wsdl20.TypesImpl;
@@ -38,11 +40,13 @@
public class TypesElementTest extends TestCase {
+ private DescriptionElement fDescriptionElement = null;
private TypesElement fTypesElement = null;
private Schema fInlinedSchema1 = null;
private Schema fInlinedSchema2 = null;
private Schema fImportedSchema1 = null;
private Schema fImportedSchema2 = null;
+ private final String TNS = "http://example.org";
public static Test suite()
{
@@ -55,7 +59,11 @@
protected void setUp() throws Exception
{
super.setUp();
- fTypesElement = new TypesImpl();
+ WSDLFactory factory = null;
+ factory = WSDLFactory.newInstance();
+ fDescriptionElement = factory.newDescription();
+ fDescriptionElement.setTargetNamespace(URI.create(TNS));
+ fTypesElement = fDescriptionElement.addTypesElement();
fInlinedSchema1 = new InlinedSchemaImpl();
fInlinedSchema2 = new InlinedSchemaImpl();
fImportedSchema1 = new ImportedSchemaImpl();
---------------------------------------------------------------------
To unsubscribe, e-mail: woden-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: woden-dev-help@ws.apache.org