Forum Discussion

John_Ogle_45372's avatar
John_Ogle_45372
Icon for Nimbostratus rankNimbostratus
Apr 19, 2010

HTTP:Respond issue - how to escape characters??

Hello,

 

 

I am having trouble adding some html data in my HTTP::Respond command. I basically used the example in the wiki, which does work by itself. I then just swapped out the txt in the "body" but it's not taking it. I'm wondering if certain characters need to be escaped, etc. Any ideas on how to get this working with the desired XML response show below? It definitely doesn't like the first XML header line. It looks like it is trying to interpret it and not just display the XML error message.

 

 

Not working:

 

HTTP::respond 200 content \

 

"

 

 

Apology Page

 

 

 

 

xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"

 

 

 

200

 

Back end systems failed to Respond

 

WebService deployed on Back end systems failed to Respond

 

 

 

 

 

 

"

 

 

Sample from wiki:

 

 

 

Apology Page

 

 

 

We are sorry, but the site you are looking for is temporarily out of service

 

 

If you feel you have reached this page in error, please try again.

 

 

 

4 Replies

  • Hi John,

     

     

    Can you wrap the text you want to send as HTTP respond data in curly braces:

     

     

    HTTP::respond 200 content {

     

    ..

     

    some unescaped strings here

     

    ..

     

    }

     

     

    Aaron
  • The curly braces helped somewhat but it looks like plain text:

     

    200 Back end systems failed to Respond WebService deployed on Back end systems failed to Respond

     

     

    Instead of looking like this:

     

     

     

     

    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"

     

     

     

    200

     

    Back end systems failed to Respond

     

    WebService deployed on Back end systems failed to Respond

     

     

     

     

  • I just realized that the forum is also intrepreting the XML output I posted. I have attached a jpeg instead so that you can see exactly how I need the output to be displayed. I attached an additional jpeg as well to show the raw code snippet I have been experimenting with. Any help is very much appreciated.

     

     

    Thank you,

     

     

     

     

  • I don't see the attachment you've uploaded. I think you need to upload it and insert it in the post.

     

     

    Aaron