To test the behavior of your service, try sending different variations of malformed XML content.
-
Volatile elements:
<login>
<user_name> smartbear</username>
<pass_word> ReaDyAP1R0ck5</password>
</login><login>
<user> smartbear</username>
<pass> ReaDyAP1R0ck5</password>
</login>The following result reveals the required element in the login request:
<loginresponse>
<error>element username is expected.</error>
</loginresponse> -
Missing end elements:
<login>
<username>smartbear<username>
<password>ReaDyAP1R0ck5</password>
</login> -
Missing start elements:
<login>
<user>smartbear</username>
<password>ReaDyAP1R0ck5</password>
</login> -
Malformed namespaces.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:demo="http://demo.smartbear.com">
<soapenv:Header/>
<soapenv:Body>
<demo:login>
<demo:username> smartbear</demo:username>
<demo:password> ReaDyAP1R0ck5</demo:password>
<demo:/login>
</soapenv:Body>
</soapenv:Envelope>For this request, use the following options:
-
Change one of the namespaces.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:demo="http://demo.smartbear.com">
<soapenv:Header/>
<soapenv:Body>
<demo:login>
<username> smartbear</demo:username>
<demo:password> ReaDyAP1R0ck5</demo:password>
<demo:/login>
</soapenv:Body>
</soapenv:Envelope> -
Put an extra quote:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"">
<soapenv:Header/>
<soapenv:Body>
<demo:login>
<username> smartbear</demo:username>
<demo:password> ReaDyAP1R0ck5</demo:password>
<demo:/login>
</soapenv:Body>
</soapenv:Envelope>
-