Topic
4 replies Latest Post - ‏2013-10-30T18:35:14Z by HermannSW
ansmyke
ansmyke
52 Posts
ACCEPTED ANSWER

Pinned topic JSON request fails with "Send a test message" utility

‏2013-03-12T22:09:58Z |
Hi,
we have XI50 5.0.0.3. I created a Loopback XML firewall with request type set to JSON in a test domain and I tried to send a JSON request on the url
http://127.0.0.1:1000 but it fails

1) In Mozilla and internet explorer saying "can not parse XML". I see empty Response Body or Response Header as if request is never sent and probe verfies that no message is triggered.
2) In Chrome "Make a call" triggers some action but I get Response code 500 and a Client Soap fault in response body. I verified in the probe I see the message fails before the first processing step with message;

Transaction aborted in Step 0
Invalid JSON format

and I recieve a soap fault

<env:Envelope
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
>
<env:Body>
<env:Fault>
<faultcode>env:Client</faultcode>
<faultstring>Internal Error (from client)</faultstring>
</env:Fault>
</env:Body>
</env:Envelope>
Updated on 2013-03-13T14:32:02Z at 2013-03-13T14:32:02Z by HermannSW
  • ansmyke
    ansmyke
    52 Posts
    ACCEPTED ANSWER

    Re: JSON request fails with "Send a test message" utility

    ‏2013-03-12T22:14:04Z  in response to ansmyke
    I see XML/SOAP message works perfectly fine with send a test message utility.

    Also I tried to send the JSON message to an actual service from Rest client successfully and but same message from send a test message to actual service result in Client SOAP fault error.

    Is there any justification for this ?
    Thanks,
    Mayank
    • HermannSW
      HermannSW
      2818 Posts
      ACCEPTED ANSWER

      Re: JSON request fails with "Send a test message" utility

      ‏2013-03-13T14:22:46Z  in response to ansmyke
      My experiments showed, that "Send as message" link in Probe
      • is displayed for XML payload
      • is not display for Non-XML payload.

      I know that you can open the dialogue also by "Administration->Debug->Send a Test Message".

       
      OK -- here we go.
      Click on "Request Body" (that is a link) to see the WebGUI help.
      It states "... test soap message ...".

      I totally agree with you that it may be really useful to be able to send JSON requests as well.
      Because its documented for soap, an Enhancement Request from you would be good:
      http://www.ibm.com/developerworks/rfe/


      Online Help: Send a Test Message

      This page allows a user to send a test soap message to a destination and view the response.
      URL

      The URL of the destination the test message will be sent to.
      Request Headers

      The request headers to be sent to the destination.
      Request Body

      The request body of the message to be sent to the destination.


      Hermann<myXsltBlog/> <myXsltTweets/> <myCE/>
    • HermannSW
      HermannSW
      2818 Posts
      ACCEPTED ANSWER

      Re: JSON request fails with "Send a test message" utility

      ‏2013-03-13T14:32:02Z  in response to ansmyke
      My experiments showed, that "Send as message" link in Probe
      • is displayed for XML payload
      • is not display for Non-XML payload.

      I know that you can open the dialogue also by "Administration->Debug->Send a Test Message".

       
      OK -- here we go.
      Click on "Request Body" (that is a link) to see the WebGUI help.
      It states "... test soap message ...".

      I totally agree with you that it may be really useful to be able to send JSON requests as well.
      Because its documented for soap, an Enhancement Request from you would be good:
      http://www.ibm.com/developerworks/rfe/


      Online Help: Send a Test Message

      This page allows a user to send a test soap message to a destination and view the response.
      URL

      The URL of the destination the test message will be sent to.
      Request Headers

      The request headers to be sent to the destination.
      Request Body

      The request body of the message to be sent to the destination.


      Hermann<myXsltBlog/> <myXsltTweets/> <myCE/>