You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "Punnoose, Roshan" <pu...@bah-systems.com> on 2007/03/14 16:23:58 UTC

[axis2]REST requests failing

I have a REST GET request, and I keep getting this error:

java.lang.NullPointerException.
java.lang.NullPointerException
        at java.io.Reader.<init>(Reader.java:61)
        at java.io.InputStreamReader.<init>(InputStreamReader.java:80)
        at
org.apache.axis2.builder.XFormURLEncodedBuilder.extractParametersFromReq
uest(XFormURLEncodedBuilder.java:123)
        at
org.apache.axis2.builder.XFormURLEncodedBuilder.processDocument(XFormURL
EncodedBuilder.java:77)
        at
org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUti
ls.java:120)
        at
org.apache.axis2.transport.http.util.RESTUtil.processURLRequest(RESTUtil
.java:98)
        at
org.apache.axis2.transport.http.AxisServlet$ProcessRESTRequest.processUR
LRequest(AxisServlet.java:767)
        at
org.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java:236)

Any ideas?

Roshan Punnoose
Phone: 301-497-6039


Re: [axis2]REST requests failing

Posted by keith chapman <ke...@gmail.com>.
See comments inline

On 3/14/07, Punnoose, Roshan <pu...@bah-systems.com> wrote:
>
> I have a REST GET request, and I keep getting this error:
>
> java.lang.NullPointerException.
> java.lang.NullPointerException
>         at java.io.Reader.<init>(Reader.java:61)
>         at java.io.InputStreamReader.<init>(InputStreamReader.java:80)
>         at
> org.apache.axis2.builder.XFormURLEncodedBuilder.extractParametersFromReq
> uest(XFormURLEncodedBuilder.java:123)



The stack trace above shows that your not using the latest code. The code in
the current svn has a null check for inputStream. Yes the inputStream can be
null in some cases, especially if the request is a GET. The
XFormURLEncodedBuilder can be called for POST request as well, thats the
reason for having the inputStream in there. Just try the latest code, if the
problem persists send me the service so that i can debug and fix the
problem.



        at
> org.apache.axis2.builder.XFormURLEncodedBuilder.processDocument(XFormURL
> EncodedBuilder.java:77)
>         at
> org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUti
> ls.java:120)
>         at
> org.apache.axis2.transport.http.util.RESTUtil.processURLRequest(RESTUtil
> .java:98)
>         at
> org.apache.axis2.transport.http.AxisServlet$ProcessRESTRequest.processUR
> LRequest(AxisServlet.java:767)
>         at
> org.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java:236)
>
> Any ideas?
>
> Roshan Punnoose
> Phone: 301-497-6039
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
Thanks,
Keith.

-- 
Keith Chapman
WSO2 Inc.
Oxygen for Web Services Developers.
http://wso2.org/