FileDocCategorySizeDatePackage
AnyTestCase.javaAPI DocApache Axis 1.41141Sat Apr 22 18:57:28 BST 2006test.wsdl.any

AnyTestCase

public class AnyTestCase extends TestCase
author
Ashutosh Shahi Test to check if MessageElement [] for includes all elements

Fields Summary
Constructors Summary
public AnyTestCase(String name)

        super(name);
    
Methods Summary
public static voidmain(java.lang.String[] args)

    	AnyTestCase at = new AnyTestCase("test");
    	at.testAny1();
    
public voidtestAny1()

    	AnyServiceLocator loc = new AnyServiceLocator(); 
    	Soap svc = loc.getSoap();
    	
    	QueryResult qr = svc.query("blah");
    	
    	assertTrue("Records size mismatch", qr.getRecords().length == 1);
		 for (int i =0; i < qr.getRecords().length; i++ ) { 
		 	SObject s = qr.getRecords(i);
		 	System.out.println("id::" + s.getId());
		 	org.apache.axis.message.MessageElement [] e= s.get_any();
		 	System.out.println("MessageElement array size is " + e.length);
		 	 for (int j = 0; j < e.length; j++ ){ 
		 	 	 System.out.print(" " + e[j].getValue()); 
		 	 }
		 	 System.out.println(""); 
		 	assertTrue("Any should have three elements", e.length == 3);
		 }