Re: Wicketstuff restannotations example throws IllegalStateException: STREAMED with https
You can use method AbstractRestResource.setResponseStatusCode Thanks Andrea. I'm working this out. Now I have one more question: How can I return an Http 401 Status Code of Unauthorized if the password is incorrect? I know I can return values, such as the PersonPojo in the example, and I can return error messages from the from a registered validator, but I think it is standard to return 401 on authentication failure. Can I return a Status Code? Bruce -Original Message- From: Andrea Del Bene [mailto:an.delb...@gmail.com] Sent: Friday, August 01, 2014 12:26 PM To: users@wicket.apache.org Subject: Re: Wicketstuff restannotations example throws IllegalStateException: STREAMED with https I would pass them as request parameters... Andrea, I have the SSL working fine when I call it from a Java program using HttpsURLConnection. So it was something with curl. I wonder if you could suggest how I could pass a username and password along with the json string and authenticate the request. Thanks, Bruce - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicketstuff restannotations example throws IllegalStateException: STREAMED with https
Thanks again! Bruce Sent from my iPad On Aug 2, 2014, at 6:26 AM, Andrea Del Bene an.delb...@gmail.com wrote: You can use method AbstractRestResource.setResponseStatusCode Thanks Andrea. I'm working this out. Now I have one more question: How can I return an Http 401 Status Code of Unauthorized if the password is incorrect? I know I can return values, such as the PersonPojo in the example, and I can return error messages from the from a registered validator, but I think it is standard to return 401 on authentication failure. Can I return a Status Code? Bruce -Original Message- From: Andrea Del Bene [mailto:an.delb...@gmail.com] Sent: Friday, August 01, 2014 12:26 PM To: users@wicket.apache.org Subject: Re: Wicketstuff restannotations example throws IllegalStateException: STREAMED with https I would pass them as request parameters... Andrea, I have the SSL working fine when I call it from a Java program using HttpsURLConnection. So it was something with curl. I wonder if you could suggest how I could pass a username and password along with the json string and authenticate the request. Thanks, Bruce - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicketstuff restannotations example throws IllegalStateException: STREAMED with https
I would pass them as request parameters... Andrea, I have the SSL working fine when I call it from a Java program using HttpsURLConnection. So it was something with curl. I wonder if you could suggest how I could pass a username and password along with the json string and authenticate the request. Thanks, Bruce - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: Wicketstuff restannotations example throws IllegalStateException: STREAMED with https
Thanks Andrea. I'm working this out. Now I have one more question: How can I return an Http 401 Status Code of Unauthorized if the password is incorrect? I know I can return values, such as the PersonPojo in the example, and I can return error messages from the from a registered validator, but I think it is standard to return 401 on authentication failure. Can I return a Status Code? Bruce -Original Message- From: Andrea Del Bene [mailto:an.delb...@gmail.com] Sent: Friday, August 01, 2014 12:26 PM To: users@wicket.apache.org Subject: Re: Wicketstuff restannotations example throws IllegalStateException: STREAMED with https I would pass them as request parameters... Andrea, I have the SSL working fine when I call it from a Java program using HttpsURLConnection. So it was something with curl. I wonder if you could suggest how I could pass a username and password along with the json string and authenticate the request. Thanks, Bruce - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicketstuff restannotations example throws IllegalStateException: STREAMED with https
Hi, how did you started the example application? I want to use the wicketstuff-restannotations library to implement a restful web service. It seem very handy and I was able to get the example code working fine. To make sure I understood how everything was working and how to access from another server I used curl from the command line to send an HTTP request. It worked fine using http with jetty, but when I tried http://localhost:8443 I get IllegalStateException: STREAMED. See the details below: The following works using curl to post: C:\Software\Curlcurl -H Content-Type: application/json -d {name:Bruce,email:myacco...@gmail.com,password:piano} http://localhost:8080/personsmanager/createPerson It returns this: {name:Bruce,email:myacco...@gmail.com,password:piano} With the following HTTPS curl command I get IllegalStateException: STREAMED (note: the -k/ --insecure switch tells curl not to validate the certificate since it is not in their list) C:\Software\Curlcurl -H -k/ --insecure Content-Type: application/json -d {name:Bruce,email:myacco...@gmail.com,password:piano} https://localhost:8443 /personsmanager/persons Stacktrace shows: java.lang.IllegalStateException: STREAMED at org.eclipse.jetty.server.Request.getReader(Request.java:787) at org.wicketstuff.rest.utils.http.HttpUtils.readStringFromRequest(HttpUtils.ja va:46) at org.wicketstuff.rest.contenthandling.serialdeserial.TextualWebSerialDeserial .requestToObject(TextualWebSerialDeserial.java:83) at org.wicketstuff.rest.utils.reflection.MethodParameter.deserializeObjectFromR equest(MethodParameter.java:278) at org.wicketstuff.rest.utils.reflection.MethodParameter.extractParameterFromAn notation(MethodParameter.java:168) at org.wicketstuff.rest.utils.reflection.MethodParameter.extractParameterValue( MethodParameter.java:117) Does this mean that it the restful annotation will not work over https, or am I doing something wrong? Bruce - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicketstuff restannotations example throws IllegalStateException: STREAMED with https
I just stated it by running Start.java as a java application to start Jetty from Eclipse. Bruce Sent from my iPad On Jul 31, 2014, at 6:09 AM, Andrea Del Bene an.delb...@gmail.com wrote: Hi, how did you started the example application? I want to use the wicketstuff-restannotations library to implement a restful web service. It seem very handy and I was able to get the example code working fine. To make sure I understood how everything was working and how to access from another server I used curl from the command line to send an HTTP request. It worked fine using http with jetty, but when I tried http://localhost:8443 I get IllegalStateException: STREAMED. See the details below: The following works using curl to post: C:\Software\Curlcurl -H Content-Type: application/json -d {name:Bruce,email:myacco...@gmail.com,password:piano} http://localhost:8080/personsmanager/createPerson It returns this: {name:Bruce,email:myacco...@gmail.com,password:piano} With the following HTTPS curl command I get IllegalStateException: STREAMED (note: the -k/ --insecure switch tells curl not to validate the certificate since it is not in their list) C:\Software\Curlcurl -H -k/ --insecure Content-Type: application/json -d {name:Bruce,email:myacco...@gmail.com,password:piano} https://localhost:8443 /personsmanager/persons Stacktrace shows: java.lang.IllegalStateException: STREAMED at org.eclipse.jetty.server.Request.getReader(Request.java:787) at org.wicketstuff.rest.utils.http.HttpUtils.readStringFromRequest(HttpUtils.ja va:46) at org.wicketstuff.rest.contenthandling.serialdeserial.TextualWebSerialDeserial .requestToObject(TextualWebSerialDeserial.java:83) at org.wicketstuff.rest.utils.reflection.MethodParameter.deserializeObjectFromR equest(MethodParameter.java:278) at org.wicketstuff.rest.utils.reflection.MethodParameter.extractParameterFromAn notation(MethodParameter.java:168) at org.wicketstuff.rest.utils.reflection.MethodParameter.extractParameterValue( MethodParameter.java:117) Does this mean that it the restful annotation will not work over https, or am I doing something wrong? Bruce - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicketstuff restannotations example throws IllegalStateException: STREAMED with https
I started the example app with Maven and enabling the SSL port. I've tested it with Firefox, although I had to disable the flag security.mixed_content.block_active_content to load the JS libraries. I had no problem with the REST operations (GET, POST, DELETE...), everything worked fine usin SSL. Maybe the problem is with curl and SSL handling? I just stated it by running Start.java as a java application to start Jetty from Eclipse. Bruce Sent from my iPad On Jul 31, 2014, at 6:09 AM, Andrea Del Bene an.delb...@gmail.com wrote: Hi, how did you started the example application? I want to use the wicketstuff-restannotations library to implement a restful web service. It seem very handy and I was able to get the example code working fine. To make sure I understood how everything was working and how to access from another server I used curl from the command line to send an HTTP request. It worked fine using http with jetty, but when I tried http://localhost:8443 I get IllegalStateException: STREAMED. See the details below: The following works using curl to post: C:\Software\Curlcurl -H Content-Type: application/json -d {name:Bruce,email:myacco...@gmail.com,password:piano} http://localhost:8080/personsmanager/createPerson It returns this: {name:Bruce,email:myacco...@gmail.com,password:piano} With the following HTTPS curl command I get IllegalStateException: STREAMED (note: the -k/ --insecure switch tells curl not to validate the certificate since it is not in their list) C:\Software\Curlcurl -H -k/ --insecure Content-Type: application/json -d {name:Bruce,email:myacco...@gmail.com,password:piano} https://localhost:8443 /personsmanager/persons Stacktrace shows: java.lang.IllegalStateException: STREAMED at org.eclipse.jetty.server.Request.getReader(Request.java:787) at org.wicketstuff.rest.utils.http.HttpUtils.readStringFromRequest(HttpUtils.ja va:46) at org.wicketstuff.rest.contenthandling.serialdeserial.TextualWebSerialDeserial .requestToObject(TextualWebSerialDeserial.java:83) at org.wicketstuff.rest.utils.reflection.MethodParameter.deserializeObjectFromR equest(MethodParameter.java:278) at org.wicketstuff.rest.utils.reflection.MethodParameter.extractParameterFromAn notation(MethodParameter.java:168) at org.wicketstuff.rest.utils.reflection.MethodParameter.extractParameterValue( MethodParameter.java:117) Does this mean that it the restful annotation will not work over https, or am I doing something wrong? Bruce - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicketstuff restannotations example throws IllegalStateException: STREAMED with https
Thanks, I'll try it with another approach. I'll let you know. Bruce Sent from my iPad On Jul 31, 2014, at 8:05 AM, Andrea Del Bene an.delb...@gmail.com wrote: I started the example app with Maven and enabling the SSL port. I've tested it with Firefox, although I had to disable the flag security.mixed_content.block_active_content to load the JS libraries. I had no problem with the REST operations (GET, POST, DELETE...), everything worked fine usin SSL. Maybe the problem is with curl and SSL handling? I just stated it by running Start.java as a java application to start Jetty from Eclipse. Bruce Sent from my iPad On Jul 31, 2014, at 6:09 AM, Andrea Del Bene an.delb...@gmail.com wrote: Hi, how did you started the example application? I want to use the wicketstuff-restannotations library to implement a restful web service. It seem very handy and I was able to get the example code working fine. To make sure I understood how everything was working and how to access from another server I used curl from the command line to send an HTTP request. It worked fine using http with jetty, but when I tried http://localhost:8443 I get IllegalStateException: STREAMED. See the details below: The following works using curl to post: C:\Software\Curlcurl -H Content-Type: application/json -d {name:Bruce,email:myacco...@gmail.com,password:piano} http://localhost:8080/personsmanager/createPerson It returns this: {name:Bruce,email:myacco...@gmail.com,password:piano} With the following HTTPS curl command I get IllegalStateException: STREAMED (note: the -k/ --insecure switch tells curl not to validate the certificate since it is not in their list) C:\Software\Curlcurl -H -k/ --insecure Content-Type: application/json -d {name:Bruce,email:myacco...@gmail.com,password:piano} https://localhost:8443 /personsmanager/persons Stacktrace shows: java.lang.IllegalStateException: STREAMED at org.eclipse.jetty.server.Request.getReader(Request.java:787) at org.wicketstuff.rest.utils.http.HttpUtils.readStringFromRequest(HttpUtils.ja va:46) at org.wicketstuff.rest.contenthandling.serialdeserial.TextualWebSerialDeserial .requestToObject(TextualWebSerialDeserial.java:83) at org.wicketstuff.rest.utils.reflection.MethodParameter.deserializeObjectFromR equest(MethodParameter.java:278) at org.wicketstuff.rest.utils.reflection.MethodParameter.extractParameterFromAn notation(MethodParameter.java:168) at org.wicketstuff.rest.utils.reflection.MethodParameter.extractParameterValue( MethodParameter.java:117) Does this mean that it the restful annotation will not work over https, or am I doing something wrong? Bruce - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: Wicketstuff restannotations example throws IllegalStateException: STREAMED with https
Andrea, I have the SSL working fine when I call it from a Java program using HttpsURLConnection. So it was something with curl. I wonder if you could suggest how I could pass a username and password along with the json string and authenticate the request. Thanks, Bruce -Original Message- From: Andrea Del Bene [mailto:an.delb...@gmail.com] Sent: Thursday, July 31, 2014 8:06 AM To: users@wicket.apache.org Subject: Re: Wicketstuff restannotations example throws IllegalStateException: STREAMED with https I started the example app with Maven and enabling the SSL port. I've tested it with Firefox, although I had to disable the flag security.mixed_content.block_active_content to load the JS libraries. I had no problem with the REST operations (GET, POST, DELETE...), everything worked fine usin SSL. Maybe the problem is with curl and SSL handling? I just stated it by running Start.java as a java application to start Jetty from Eclipse. Bruce Sent from my iPad On Jul 31, 2014, at 6:09 AM, Andrea Del Bene an.delb...@gmail.com wrote: Hi, how did you started the example application? I want to use the wicketstuff-restannotations library to implement a restful web service. It seem very handy and I was able to get the example code working fine. To make sure I understood how everything was working and how to access from another server I used curl from the command line to send an HTTP request. It worked fine using http with jetty, but when I tried http://localhost:8443 I get IllegalStateException: STREAMED. See the details below: The following works using curl to post: C:\Software\Curlcurl -H Content-Type: application/json -d {name:Bruce,email:myacco...@gmail.com,password:piano} http://localhost:8080/personsmanager/createPerson It returns this: {name:Bruce,email:myacco...@gmail.com,password:piano} With the following HTTPS curl command I get IllegalStateException: STREAMED (note: the -k/ --insecure switch tells curl not to validate the certificate since it is not in their list) C:\Software\Curlcurl -H -k/ --insecure Content-Type: application/json -d {name:Bruce,email:myacco...@gmail.com,password:piano} https://localhost:8443 /personsmanager/persons Stacktrace shows: java.lang.IllegalStateException: STREAMED at org.eclipse.jetty.server.Request.getReader(Request.java:787) at org.wicketstuff.rest.utils.http.HttpUtils.readStringFromRequest(Http Utils.ja va:46) at org.wicketstuff.rest.contenthandling.serialdeserial.TextualWebSerial Deserial .requestToObject(TextualWebSerialDeserial.java:83) at org.wicketstuff.rest.utils.reflection.MethodParameter.deserializeObj ectFromR equest(MethodParameter.java:278) at org.wicketstuff.rest.utils.reflection.MethodParameter.extractParamet erFromAn notation(MethodParameter.java:168) at org.wicketstuff.rest.utils.reflection.MethodParameter.extractParamet erValue( MethodParameter.java:117) Does this mean that it the restful annotation will not work over https, or am I doing something wrong? Bruce - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org