Skip to content

Commit

Permalink
Merge pull request #4 from rdhananjaya/xml-remove-old-on-xml-named-ty…
Browse files Browse the repository at this point in the history
…pes-pr

Adjest xml syntax in integration test cases
  • Loading branch information
irshadnilam authored Mar 12, 2020
2 parents 505ee41 + 99a7a99 commit 7c07729
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ service testService on new http:Listener(9098) {
if (xmlResponse is http:Response) {
var result = xmlResponse.getXmlPayload();
if (result is xml) {
value = value + result.getTextValue();
value = value + (result/*).toString();
} else {
error err = result;
value = value + err.reason();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ service testService16 on new http:Listener(9118) {
if (binaryPayload is byte[]) {
var payload = res.getXmlPayload();
if (payload is xml) {
xml descendants = payload.selectDescendants("title");
checkpanic caller->respond(<@untainted> descendants.getTextValue());
//xml descendants = payload.selectDescendants("title");
checkpanic caller->respond(<@untainted> (payload/**/<title>/*).toString());
} else {
error err = payload;
checkpanic caller->respond(<@untainted> err.reason());
Expand All @@ -56,8 +56,8 @@ service testService16 on new http:Listener(9118) {
if (res is http:Response) {
var payload = res.getXmlPayload();
if (payload is xml) {
xml descendants = payload.selectDescendants("title");
checkpanic caller->respond(<@untainted> descendants.getTextValue());
//xml descendants = payload.selectDescendants("title");
checkpanic caller->respond(<@untainted> (payload/**/<title>/*).toString());
} else {
if (payload is http:GenericClientError) {
var cause = payload.detail()?.cause;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ service testService on new http:Listener(9103, { httpVersion: "2.0" }) {
if (xmlResponse is http:Response) {
var result = xmlResponse.getXmlPayload();
if (result is xml) {
value = value + result.getTextValue();
value = value + (result/*).toString();
} else {
error err = result;
value = value + err.reason();
Expand Down

0 comments on commit 7c07729

Please sign in to comment.