You can't do a POST without setting a content-type because it assumes the
content-type is SOAP and looks for some xml:
2012-07-21 21:09:41,079] INFO - BuilderUtil Remaining input stream :[]
[2012-07-21 21:09:41,079] ERROR - ServerWorker Error processing POST
request
org.apache.axis2.AxisFault: com.ctc.wstx.exc.WstxEOFException: Unexpected
EOF in prolog
at [row,col {unknown-source}]: [1,0]
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
at
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:180)
at
org.apache.synapse.transport.nhttp.ServerWorker.processEntityEnclosingMethod(ServerWorker.java:409)
at
org.apache.synapse.transport.nhttp.ServerWorker.run(ServerWorker.java:261)
at
org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
Caused by: org.apache.axiom.om.OMException:
com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
at [row,col {unknown-source}]: [1,0]
This seems a bug because an empty POST is a perfectly acceptable thing to
do, and many APIs won't be expecting to have set the content type when the
body is empty.
Paul
--
Paul Fremantle
CTO and Co-Founder, WSO2
OASIS WS-RX TC Co-chair, VP, Apache Synapse
UK: +44 207 096 0336
US: +1 646 595 7614
blog: http://pzf.fremantle.org
twitter.com/pzfreo
[email protected]
wso2.com Lean Enterprise Middleware
Disclaimer: This communication may contain privileged or other confidential
information and is intended exclusively for the addressee/s. If you are not
the intended recipient/s, or believe that you may have received this
communication in error, please reply to the sender indicating that fact and
delete the copy you received and in addition, you should not print, copy,
retransmit, disseminate, or otherwise use the information contained in this
communication. Internet communications cannot be guaranteed to be timely,
secure, error or virus-free. The sender does not accept liability for any
errors or omissions.
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev