I love these kind of problems!  :)

On 8/28/2012 2:19 PM, David R Robison wrote:
> Never mind. I was loading a html file locally and trying to run the
> javascript out of tomcat. I put the test file in tomcat and all worked
> well. David
>
> David R Robison
> Open Roads Consulting, Inc.
> 103 Watson Road, Chesapeake, VA 23320
> phone: (757) 546-3401
> e-mail:drrobi...@openroadsconsulting.com
> web:http://openroadsconsulting.com
> blog:http://therobe.blogspot.com
> book:http://www.xulonpress.com/bookstore/bookdetail.php?PB_ISBN=9781597816526
>
> On 8/28/2012 2:12 PM, David R Robison wrote:
>> I have a RESTeasy interface defines as follows:
>>
>> @Path("/resteasy/Speaking")
>> public class SpeakRestful {
>>
>>     @POST
>>     @Path("/Say")
>>     @Consumes({ "text/plain", "text/html" })
>>     @Produces({ "text/plain" })
>>     public String say(String message) throws Exception {
>>         return "ABC";
>>     }
>> }
>>
>> And I am trying to call it using JavaScript from a web page as follows:
>>
>> <SCRIPT type="text/javascript"
>> src="http://localhost:8080/TalkingRoad/rest-js";></SCRIPT>
>> <SCRIPT>
>> function speak() {
>>     alert("URL=" + SpeakRestful.say({$entity: "Hello dog!"}));
>> }
>> </SCRIPT>
>>
>>
>> The call succeeds on the server but I get a javascript error trying to
>> process the response
>>
>> NS_ERROR_FAILURE: Failure
>> request.send(data);
>>
>> It appears that it has trouble with the string response. Am I doing
>> something wrong?
>> David
>>
>>
>>      
>>
>>
>> --
>>
>> David R Robison
>> Open Roads Consulting, Inc.
>> 103 Watson Road, Chesapeake, VA 23320
>> phone: (757) 546-3401
>> e-mail:drrobi...@openroadsconsulting.com
>> web:http://openroadsconsulting.com
>> blog:http://therobe.blogspot.com
>> book:http://www.xulonpress.com/bookstore/bookdetail.php?PB_ISBN=9781597816526
>>
>>
>> ------------------------------------------------------------------------
>> This email communication (including any attachments) may contain 
>> confidential and/or privileged material intended solely for the individual 
>> or entity to which it is addressed.
>> If you are not the intended recipient, please delete this email immediately.
>>
>>
>> ------------------------------------------------------------------------------
>> Live Security Virtual Conference
>> Exclusive live event will cover all the ways today's security and
>> threat landscape has changed and how IT managers can respond. Discussions
>> will include endpoint security, mobile security and the latest in malware
>> threats.http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>>
>>
>> _______________________________________________
>> Resteasy-users mailing list
>> Resteasy-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/resteasy-users
>
>
>
> ------------------------------------------------------------------------
> This email communication (including any attachments) may contain confidential 
> and/or privileged material intended solely for the individual or entity to 
> which it is addressed.
> If you are not the intended recipient, please delete this email immediately.
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>
>
>
> _______________________________________________
> Resteasy-users mailing list
> Resteasy-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/resteasy-users
>

-- 
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Resteasy-users mailing list
Resteasy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/resteasy-users

Reply via email to