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

TestDeser1999

public class TestDeser1999 extends TestDeser
Test deserialization of SOAP responses

Fields Summary
Constructors Summary
public TestDeser1999(String name)

        super(name, Constants.URI_1999_SCHEMA_XSI,
                    Constants.URI_1999_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);
        // Test map with nulls and
        // Test type references to the default namespace.
        deserialize("<result xsi:type=\"xmlsoap:Map\" " +
                    "xmlns:xmlsoap=\"http://xml.apache.org/xml-soap\"> " +
                      "<item>" +
                       "<key xsi:null=\"true\"/>" +
                       "<value xsi:type=\"boolean\" xmlns=\"" +
                         Constants.URI_1999_SCHEMA_XSD +
                         "\">false</value>" + 
                      "</item><item>" +
                       "<key xsi:type=\"string\" xmlns=\"" +
                         Constants.URI_1999_SCHEMA_XSD +
                         "\">hi</key>" +
                       "<value xsi:null=\"true\"/>" +
                      "</item>" +
                    "</result>",
                    m);
    
public voidtestNullSOAPBoolean()

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