Glen,
Does "ant clean all-tests" work for you?
Thanks,
dims
--- [EMAIL PROTECTED] wrote:
> gdaniels 2003/02/07 10:02:56
>
> Modified: java/test/wsdl/soap12/assertion
> WhiteMesaSoap12TestSvcTestCase.java
> java/test/wsdl/soap12/additional
> WhiteMesaSoap12AddTestSvcTestCase.java
> java/src/org/apache/axis/message SOAPHeaderElement.java
> java/src/org/apache/axis/soap SOAP12Constants.java
> java/samples/echo InteropTestSoapBindingImpl.java
> java/src/org/apache/axis Constants.java
> Log:
> More work on SOAP 1.2 client interop tests.
>
> As it turned out, the generated test case for the XMLP additional tests was
> pretty useless, since all the test require some futzing around with the
> envelope (adding headers, removing parameters, etc). Hence this has been
> rewritten ground-up and most of the xmlp-1 through xmlp-19 tests are
> implemented.
>
> Add a "relay" field to the SOAPHeaderElement class for SOAP 1.2's relay
> attribute.
>
> Deprecate URI_SOAP12_NEXT_ACTOR in favor of URI_SOAP12_NEXT_ROLE
>
> Add fault subcode constants for bad arguments and procedure not found
>
> Revision Changes Path
> 1.4 +1 -1
> xml-axis/java/test/wsdl/soap12/assertion/WhiteMesaSoap12TestSvcTestCase.java
>
> Index: WhiteMesaSoap12TestSvcTestCase.java
> ===================================================================
> RCS file:
>
>/home/cvs/xml-axis/java/test/wsdl/soap12/assertion/WhiteMesaSoap12TestSvcTestCase.java,v
> retrieving revision 1.3
> retrieving revision 1.4
> diff -u -r1.3 -r1.4
> --- WhiteMesaSoap12TestSvcTestCase.java 3 Feb 2003 13:54:46 -0000 1.3
> +++ WhiteMesaSoap12TestSvcTestCase.java 7 Feb 2003 18:02:55 -0000 1.4
> @@ -568,7 +568,7 @@
> * @throws Exception
> */
> public void testT1() throws Exception {
> - testEchoOkHeaderWithEmptyBody(Constants.URI_SOAP12_NEXT_ACTOR);
> + testEchoOkHeaderWithEmptyBody(Constants.URI_SOAP12_NEXT_ROLE);
> }
>
> /**
>
>
>
> 1.5 +253 -250
> xml-axis/java/test/wsdl/soap12/additional/WhiteMesaSoap12AddTestSvcTestCase.java
>
> Index: WhiteMesaSoap12AddTestSvcTestCase.java
> ===================================================================
> RCS file:
>
>/home/cvs/xml-axis/java/test/wsdl/soap12/additional/WhiteMesaSoap12AddTestSvcTestCase.java,v
> retrieving revision 1.4
> retrieving revision 1.5
> diff -u -r1.4 -r1.5
> --- WhiteMesaSoap12AddTestSvcTestCase.java 3 Feb 2003 13:54:46 -0000 1.4
> +++ WhiteMesaSoap12AddTestSvcTestCase.java 7 Feb 2003 18:02:55 -0000 1.5
> @@ -7,18 +7,22 @@
>
> package test.wsdl.soap12.additional;
>
> -import org.apache.axis.Constants;
> import org.apache.axis.AxisFault;
> -import org.apache.axis.message.SOAPEnvelope;
> -import org.apache.axis.soap.SOAPConstants;
> -import org.apache.axis.soap.SOAP12Constants;
> +import org.apache.axis.Constants;
> +import org.apache.axis.client.Call;
> +import org.apache.axis.encoding.ser.BeanDeserializerFactory;
> +import org.apache.axis.encoding.ser.BeanSerializerFactory;
> import org.apache.axis.enum.Style;
> import org.apache.axis.enum.Use;
> -import org.apache.axis.client.Call;
> -import org.apache.axis.client.Service;
> +import org.apache.axis.message.SOAPEnvelope;
> +import org.apache.axis.message.SOAPHeaderElement;
> +import org.apache.axis.soap.SOAP12Constants;
> +import org.apache.axis.soap.SOAPConstants;
> +import test.wsdl.soap12.additional.xsd.SOAPStruct;
>
> import javax.xml.namespace.QName;
> import javax.xml.rpc.ParameterMode;
> +import java.util.Vector;
>
> /**
> * Additional SOAP 1.2 tests.
> @@ -34,13 +38,49 @@
> public class WhiteMesaSoap12AddTestSvcTestCase extends junit.framework.TestCase {
> public static final String STRING_VAL = "SOAP 1.2 is cool!";
> public static final float FLOAT_VAL = 3.14F;
> + public static final Float FLOAT_OBJVAL = new Float(FLOAT_VAL);
> public static final int INT_VAL = 69;
> + public static final Integer INT_OBJVAL = new Integer(INT_VAL);
> +
> + public final String TEST_NS = "http://soapinterop.org/";
> + public final QName ECHO_STRING_QNAME = new QName(TEST_NS, "echoString");
>
> + // Endpoints
> + // TODO : Shouldn't be hardcoded!
> +// public static final String HOST = "http://localhost:8080";
> + public static final String HOST = "http://www.whitemesa.net";
> + public static final String RPC_ENDPOINT = HOST + "/soap12/add-test-rpc";
> + public static final String DOC_ENDPOINT = HOST + "/soap12/add-test-doc";
> + public static final String DOC_INT_ENDPOINT = HOST +
>"/soap12/add-test-doc-int";
> + private QName SOAPSTRUCT_QNAME = new QName("http://example.org/ts-tests/xsd",
> "SOAPStruct");
> +
> public WhiteMesaSoap12AddTestSvcTestCase(java.lang.String name) {
> super(name);
> }
>
> /**
> + * Test xmlp-1 - call echoString with no arguments (even though it expects
> + * one). Confirm bad arguments fault from endpoint.
> + *
> + * @throws Exception
> + */
> + public void testXMLP1() throws Exception {
> + Call call = new Call(RPC_ENDPOINT);
> + call.setSOAPVersion(SOAPConstants.SOAP12_CONSTANTS);
> + try {
> + call.invoke(ECHO_STRING_QNAME, null);
> + } catch (AxisFault fault) {
> + assertEquals(Constants.FAULT_SOAP12_SENDER, fault.getFaultCode());
> + QName [] subCodes = fault.getFaultSubCodes();
> + assertNotNull(subCodes);
> + assertEquals(1, subCodes.length);
> + assertEquals(Constants.FAULT_SUBCODE_BADARGS, subCodes[0]);
> + return;
> + }
> + fail("Didn't catch expected fault");
> + }
> +
> + /**
> * Test xmlp-2, using the GET webmethod.
> *
> * @throws Exception
> @@ -77,29 +117,64 @@
> // gonna for now.
> }
>
> - public void test1Soap12AddTestDocPortEchoString() throws Exception {
> - test.wsdl.soap12.additional.Soap12AddTestDocBindingStub binding;
> + public void textXMLP4() throws Exception {
> + Call call = new Call(RPC_ENDPOINT);
> + call.setSOAPVersion(SOAPConstants.SOAP12_CONSTANTS);
> + call.registerTypeMapping(SOAPStruct.class, SOAPSTRUCT_QNAME,
> + new BeanSerializerFactory(SOAPStruct.class,
> SOAPSTRUCT_QNAME),
> + new BeanDeserializerFactory(SOAPStruct.class,
> SOAPSTRUCT_QNAME));
> + call.addParameter(new QName("", "inputFloat"),
> + Constants.XSD_FLOAT, ParameterMode.IN);
> + call.addParameter(new QName("", "inputInteger"),
> + Constants.XSD_INT, ParameterMode.IN);
> + call.addParameter(new QName("", "inputString"),
> + Constants.XSD_STRING, ParameterMode.IN);
> + call.setReturnType(SOAPSTRUCT_QNAME);
> + SOAPStruct ret = (SOAPStruct)call.invoke(
> + new QName(TEST_NS, "echoSimpleTypesAsStruct"),
> + new Object [] {
> + new Float(FLOAT_VAL),
> + new Integer(INT_VAL),
> + STRING_VAL
> + });
> + assertEquals(STRING_VAL, ret.getVarString());
> + assertEquals(FLOAT_VAL, ret.getVarFloat(), 0.0004F);
> + assertEquals(INT_VAL, ret.getVarInt());
> + }
> +
> + public void testXMLP5() throws Exception {
> + Call call = new Call(RPC_ENDPOINT);
> try {
> - binding = (test.wsdl.soap12.additional.Soap12AddTestDocBindingStub)
> - new
>
>test.wsdl.soap12.additional.WhiteMesaSoap12AddTestSvcLocator().getSoap12AddTestDocPort();
> + call.invoke(new QName(TEST_NS, "echoVoid"), null);
> + } catch (AxisFault fault) {
> + // Got the expected Fault - make sure it looks right
> + assertEquals(Constants.FAULT_VERSIONMISMATCH, fault.getFaultCode());
> + return;
> }
> - catch (javax.xml.rpc.ServiceException jre) {
> - if(jre.getLinkedCause()!=null)
> - jre.getLinkedCause().printStackTrace();
> - throw new junit.framework.AssertionFailedError("JAX-RPC
>ServiceException caught:
> " + jre);
> + fail("Didn't catch expected fault");
> + }
> +
> + public void testXMLP6() throws Exception {
> + Call call = new Call(RPC_ENDPOINT);
> + call.setSOAPVersion(SOAPConstants.SOAP12_CONSTANTS);
> + SOAPHeaderElement unknownHeader =
> + new SOAPHeaderElement("http://example.org",
>
=== message truncated ===
=====
Davanum Srinivas - http://webservices.apache.org/~dims/
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com