FileDocCategorySizeDatePackage
TestDeser2000.javaAPI DocApache Axis 1.42394Sat Apr 22 18:57:28 BST 2006test.encoding

TestDeser2000

public class TestDeser2000 extends TestDeser
Test deserialization of SOAP responses

Fields Summary
Constructors Summary
public TestDeser2000(String name)

        super(name, Constants.URI_2000_SCHEMA_XSI,
                    Constants.URI_2000_SCHEMA_XSD);
    
Methods Summary
public voidtestArrayWithNullInt()

        ArrayList list = new ArrayList(4);
        list.add(new Integer(1));
        list.add(null);
        list.add(new Integer(3));
        deserialize("<result xsi:type=\"soapenc:Array\" " +
                            "soapenc:arrayType=\"xsd:int[3]\"> " +
                       "<item xsi:type=\"xsd:int\">1</item>" +
                       "<item xsi:null=\"true\"/>" +
                       "<item xsi:type=\"xsd:int\">3</item>" +
                    "</result>",
                    list, true);
    
public voidtestArrayWithNullString()

        ArrayList list = new ArrayList(4);
        list.add("abc");
        list.add(null);
        list.add("def");
        deserialize("<result xsi:type=\"soapenc:Array\" " +
                            "soapenc:arrayType=\"xsd:string[3]\"> " +
                       "<item xsi:type=\"xsd:string\">abc</item>" +
                       "<item xsi:null=\"true\"/>" +
                       "<item xsi:type=\"xsd:string\">def</item>" +
                    "</result>",
                    list, true);
    
public voidtestMapWithNulls()

        HashMap m = new HashMap();
        m.put(null, new Boolean("false"));
        m.put("hi", null);
        deserialize("<result xsi:type=\"xmlsoap:Map\" " +
                    "xmlns:xmlsoap=\"http://xml.apache.org/xml-soap\"> " +
                      "<item>" +
                       "<key xsi:null=\"true\"/>" +
                       "<value xsi:type=\"xsd:boolean\">false</value>" + 
                      "</item><item>" +
                       "<key xsi:type=\"xsd:string\">hi</key>" +
                       "<value xsi:null=\"true\"/>" +
                      "</item>" +
                    "</result>",
                    m);
    
public voidtestNullSOAPBoolean()

        deserialize("<result xsi:type=\"soapenc:boolean\" xsi:null=\"true\" />",
                    null);