Forum Discussion

jzyling's avatar
jzyling
Occasional Contributor
12 years ago

HTTP ERROR 500 when using POST method

I am trying to use HTTP POST request to post asset to Data Server, I get this HTTP ERROR 500: No content to map to Object due to end of input. java.io.EOFException: No content to map to Object due to end of input. However, I can successfully use GET/DELETE request on the same url. How to solve this problem? Thanks.

1 Reply

  • jzyling's avatar
    jzyling
    Occasional Contributor
    In addition, I used Jmeter to do POST request on the same path, it is working. So why can't I use soapui to send the POST request successfully?

    It seems like those parameters in data are not sent by the POST request according to this 500 error. Which style of the parameter should I choose? I tried all of them (query, template, header, matrix, plain), none is working. I have set the content-type of header to be application/json, the media types of request and response are application/json.

    The type of parameter is always {http://www.w3.org/2001/XMLSchema}string, how to change it to json type?


    <method name="POST" id="Post">
    <doc xml:lang="en" title="Post"/>
    <request>
    <param name="accountId" default="11" type="xs:string" required="false" style="header" xmlns:xs="http://www.w3.org/2001/XMLSchema"/>
    <param name="userId" default="23" type="xs:string" required="false" style="header" xmlns:xs="http://www.w3.org/2001/XMLSchema"/>
    <param name="value" default="0" type="xs:string" required="false" style="header" xmlns:xs="http://www.w3.org/2001/XMLSchema"/>
    <param name="key" default="345" type="xs:string" required="false" style="header" xmlns:xs="http://www.w3.org/2001/XMLSchema"/>
    <param name="id" default="123" type="xs:string" required="false" style="header" xmlns:xs="http://www.w3.org/2001/XMLSchema"/>
    <representation mediaType="application/json"/>
    </request>
    <response status="">
    <representation mediaType="application/json"/>
    <representation mediaType="application/json"/>
    </response>
    <response status="500">
    <representation mediaType="text/html;charset=ISO-8859-1" element="html"/>
    </response>
    </method>