on 03-22-2016 11:04 PM
hello
Can you please cut/paste:
?
Regards,
eric
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sivaraman,
POST is not a valid method for refreshing parameters, which explains the second error above. Use PUT to refresh the parameters.
To enable a full stack trace, as Eric requested, you can enable this in the properties of the Web Application Container Server in the CMS. Select the checkbox for: "Show Error Stack", restart the server and a full error message will be returned rather than a simple HTTP error.
The first error: "Bad Request" suggest a problem with the XML that you are sending to the server. Rather than escaping the double quotes for the parameter attributes, try using single quotes in that string:
string promptxml = "<parameters><parameter type='prompt'><id>0</id><answer type='text'><values>....</parameters>";
Additionally, when converting the xml to an array of bytes, specify the encoding as UTF8 and pass in your string
byte[] dataByte = System.Text.Encoding.UTF8.GetBytes(promptxml);
I believe this should fix it up. If not, get the full error stack as Eric mentioned,
Dan
[ edited message as I didn't see your previous answer... oops ]
hi Sivaraman,
You need to read the response stream when the server returns a HTTP code different from 200 OK. See for example:
Regards,
eric
Thanks,
I'm having a difficult time piecing it together.
Your code screenshot is code for creating a new document in a specific folder. The issue I see here is that you use a PUT instead of a POST.
The parameter screenshot appears to be correct XML but I'm not sure this is what is causing your problem as its not related to the source code you posted.
The Error screenshot suggests you are passing XML with a lower case "text" attribute rather than a case sensitive "Text" attribute, but the Parameter XML posted looks fine.
Can you point to the exact line of code throwing the exception as well as any XML body being sent when the error occurs?
Dan
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.