I'm doing an HTTP post to a jsp. I setup a REST proxy to do the call. The parameters are getting passed and the jsp is working, but the response back to webmaker is an error.
Error I see is "Cannot parse response. Most likely cause is empty or non-structured payload:". What kind of response is webmaker expecting? This is a jsp that is returning simple html. What does it need to return?
Error I see is "Cannot parse response. Most likely cause is empty or non-structured payload:". What kind of response is webmaker expecting? This is a jsp that is returning simple html. What does it need to return?
RE: HTTP Post
WebMaker normally expects XML data in response. You can use the info on the following thread to setup WebMaker to handle non-XML responses:
http://www.hyfinity.com/node/335
Regards
Abdul
RE: HTTP Post
RE: HTTP Post
If your log level is set accordingly (anything other than 'fatal') then you should be able to see the cause of this failure by looking at the Dashboard trace, which might provide more clues.
If this doesn't help then I'd be happy to look at your response structure.
Regards
Abdul
RE: HTTP Post
RE: HTTP Post
Thank you for the sample message. I have tried running this with a basic REST service. The message is received okay from the calling application, so your message appears okay.
I have also simply fired a call to http://hyfinity.com and you should definitely see a stack trace in your logs if you have the correct error level set. Please try setting the log level to 'debug' and see if you get more info. If not, then please send across your log file and I'll see if I can extract some additional info.
Abdul.
RE: HTTP Post
Additional: Looking at the log file itself (not the dashboard) I see a "StringIndexOutOfBoundsException: String index out of range: -1" error in the <details> of the response. Not sure if that's the result of the problem, or the cause of the problem.
RE: HTTP Post
Yes, the error message is related. I think it's failing on the cookie processing in your response. It should probably be more robust here and I know there has been additional effort in this area for v5. You can try and remove the cookies in your response to see if that resolves your issue or ensure every cookie contains a non-empty value. I appreciate you may not have full control over this aspect of your service.
Is there any way you can inspect the raw HTTP response to see the exact cookie structure that is being returned? You should be able to use tools such as Fiddler to achieve this. If you let me have the cookie fragment, I would be happy to run this through a test service and see if I can help you track down the issue.
Regards
Abdul
RE: HTTP Post
Installed Fiddler. Tried 3 different locations for the jsp with no success. Can't see anything in the cookies.
Here are the raw response from them:
Local: http://localhost:7080/email_testing/sendmail.jsp
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: text/xml;charset=ISO-8859-1
Content-Length: 220
Date: Fri, 23 Aug 2013 17:14:08 GMT
<?xml version="1.0" encoding="UTF-8" ?>
<sendemailresponse>
<emailfrom>null</emailfrom>
<emailto>null</emailto>
<emailsubject>null</emailsubject>
<emailbody>null</emailbody>
</sendemailresponse>
Webmaker: http://{server}/bizflowwebmaker/TAC/sendmail.jsp
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: text/xml;charset=ISO-8859-1
Content-Length: 220
Date: Fri, 23 Aug 2013 17:15:55 GMT
<?xml version="1.0" encoding="UTF-8" ?>
<sendemailresponse>
<emailfrom>null</emailfrom>
<emailto>null</emailto>
<emailsubject>null</emailsubject>
<emailbody>null</emailbody>
Bizflow: http://{server}/bizflow/fresno/sendmail.jsp?test=yes
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: text/xml;charset=UTF-8
Content-Length: 236
Date: Fri, 23 Aug 2013 17:16:00 GMT
<sendemailresponse>
<emailfrom>noreply@csufresno.edu</emailfrom>
<emailto>ghensley@csufresno.edu</emailto>
<emailsubject>JSP Test Email</emailsubject>
<emailbody>This is a test</emailbody>
</sendemailresponse>
[hr][/hr]
I got it to work. Added a cookie to the jsp and it started working. Thanks for pointing me in the right direction.