TestOutputterpublic class TestOutputter extends org.custommonkey.xmlunit.XMLTestCase Test deserialization of SOAP responses |
Fields Summary |
---|
private String | header | private String | footer | private org.apache.axis.server.AxisServer | server |
Constructors Summary |
---|
public TestOutputter(String name)
this(name, Constants.URI_DEFAULT_SCHEMA_XSI,
Constants.URI_DEFAULT_SCHEMA_XSD);
| public TestOutputter(String name, String NS_XSI, String NS_XSD)
super(name);
header =
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
"<soap:Envelope " +
"xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" " +
"xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\" " +
"xmlns:xsi=\"" + NS_XSI + "\" " +
"xmlns:xsd=\"" + NS_XSD + "\">\n" +
"<soap:Body>\n" +
"<methodResult xmlns=\"http://tempuri.org/\">\n";
footer =
"</methodResult>\n" +
"</soap:Body>\n" +
"</soap:Envelope>";
|
Methods Summary |
---|
public static void | main(java.lang.String[] args)
TestOutputter tester = new TestOutputter("test");
tester.testString();
| protected void | roundtrip(java.lang.String data)Verify that a given XML deserialized produces the expected result
Message message = new Message(header + data + footer);
message.setMessageContext(new MessageContext(server));
message.getSOAPEnvelope();
assertXMLEqual(header+data+footer, message.getSOAPPartAsString());
| public void | testEscapedAttributes()
roundtrip("<abc foo=\"<&>\"/>");
// roundtrip("<abc foo=\"<&>\"/>");
| public void | testEscapedText()
roundtrip("<abc><&></abc>");
| public void | testString()
roundtrip("<result xsi:type=\"xsd:string\">abc</result>");
|
|