Revision 038ac9a4 src/com/rackspace/cloud/servers/api/client/parsers/CloudServersFaultXMLParser.java
b/src/com/rackspace/cloud/servers/api/client/parsers/CloudServersFaultXMLParser.java | ||
---|---|---|
12 | 12 |
|
13 | 13 |
/** |
14 | 14 |
* @author Mike Mayo - mike.mayo@rackspace.com - twitter.com/greenisus |
15 |
* |
|
15 |
*
|
|
16 | 16 |
*/ |
17 | 17 |
public class CloudServersFaultXMLParser extends DefaultHandler { |
18 | 18 |
|
19 |
//<?xml version="1.0" encoding="UTF-8" standalone="yes"?> |
|
20 |
//<cloudServersFault xmlns="http://docs.rackspacecloud.com/servers/api/v1.0" code="400"> |
|
21 |
//<message>422 Unprocessable Entity: Cannot perform requested action until reboot is complete.</message> |
|
22 |
//<details>com.rackspace.cloud.service.servers.CloudServersFault: 422 Unprocessable Entity: Cannot perform requested action until reboot is complete.</details> |
|
23 |
//</cloudServersFault> |
|
19 |
// <?xml version="1.0" encoding="UTF-8" standalone="yes"?> |
|
20 |
// <cloudServersFault |
|
21 |
// xmlns="http://docs.rackspacecloud.com/servers/api/v1.0" code="400"> |
|
22 |
// <message>422 Unprocessable Entity: Cannot perform requested action until |
|
23 |
// reboot is complete.</message> |
|
24 |
// <details>com.rackspace.cloud.service.servers.CloudServersFault: 422 |
|
25 |
// Unprocessable Entity: Cannot perform requested action until reboot is |
|
26 |
// complete.</details> |
|
27 |
// </cloudServersFault> |
|
24 | 28 |
|
25 | 29 |
private CloudServersException exception; |
26 | 30 |
private StringBuffer currentData; |
... | ... | |
32 | 36 |
public void endDocument() { |
33 | 37 |
} |
34 | 38 |
|
35 |
public void startElement(String uri, String name, String qName, Attributes atts) { |
|
39 |
public void startElement(String uri, String name, String qName, |
|
40 |
Attributes atts) { |
|
36 | 41 |
|
37 | 42 |
currentData = new StringBuffer(); |
38 | 43 |
if ("cloudServersFault".equals(name)) { |
... | ... | |
73 | 78 |
} |
74 | 79 |
} |
75 | 80 |
Log.d("Rackspace-Cloud", "\"\n"); |
76 |
|
|
77 |
|
|
81 |
|
|
78 | 82 |
for (int i = start; i < (start + length); i++) { |
79 | 83 |
currentData.append(ch[i]); |
80 | 84 |
} |
... | ... | |
88 | 92 |
} |
89 | 93 |
|
90 | 94 |
/** |
91 |
* @param exception the exception to set |
|
95 |
* @param exception |
|
96 |
* the exception to set |
|
92 | 97 |
*/ |
93 | 98 |
public void setException(CloudServersException exception) { |
94 | 99 |
this.exception = exception; |
95 | 100 |
} |
96 | 101 |
|
97 |
|
|
98 | 102 |
} |
Also available in: Unified diff