No I got a Status Code: 500 Server Error

Changing the capitalization as you suggested did not help

Are you able to repro the issue or does it work for you?

Mark

-----Original Message-----
From: Dan Haywood [mailto:[email protected]] 
Sent: Thursday, January 24, 2013 9:55 AM
To: [email protected]
Subject: Re: problem using firefox REST tool with archetype

Hi Mark,

Just looking at the code, the Category enum is defined as:

    public static enum Category {
        Professional, Domestic, Other;
    }

So try "Other" instead of "OTHER".

Did you get a 400 response code (you should have)?

Let me know...
Dan

On 24 January 2013 17:16, Mark Wood-Patrick <[email protected]> wrote:

> I was trying to post:
>
> {
>     "description": "Eat Seaweed",
>     "category": "OTHER",
>     "dueBy": "Jan 23, 2013"
> }
>
> To an instance of the archetype using URL:
>
>
> http://l-sim-15-165:8080/restful/objects/objstore.jdo.todo.ToDoItemsJd
> o:1/actions/newToDo/invoke
>
> using the Firefox REST tool with current archetype
>
> And I got:
>
> {
>   "message": "Unknown enum constant 'OTHER'",
>   "stackTrace": [
>
> "org.apache.isis.core.progmodel.facets.object.choices.enums.EnumValueS
> emanticsProvider.doParse(EnumValueSemanticsProvider.java:63)",
>
> "org.apache.isis.core.progmodel.facets.object.choices.enums.EnumValueS
> emanticsProvider.doRestore(EnumValueSemanticsProvider.java:73)",
>
> "org.apache.isis.core.progmodel.facets.object.choices.enums.EnumValueS
> emanticsProvider.doRestore(EnumValueSemanticsProvider.java:32)",
>
> "org.apache.isis.core.progmodel.facets.object.value.ValueSemanticsProv
> iderAndFacetAbstract.fromEncodedString(ValueSemanticsProviderAndFacetA
> bstract.java:261)",
>
> "org.apache.isis.core.progmodel.facets.object.encodeable.EncodableFace
> tUsingEncoderDecoder.fromEncodedString(EncodableFacetUsingEncoderDecod
> er.java:60)",
>
> "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> JsonValueEncoder.asAdapter(JsonValueEncoder.java:163)",
>
> "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> DomainResourceHelper.objectAdapterFor(DomainResourceHelper.java:332)",
>
> "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> DomainResourceHelper.parseArguments(DomainResourceHelper.java:476)",
>
> "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> DomainResourceHelper.parseArguments(DomainResourceHelper.java:463)",
>
> "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> DomainResourceHelper.invokeActionUsingAdapters(DomainResourceHelper.ja
> va:270)",
>
> "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> DomainResourceHelper.invokeAction(DomainResourceHelper.java:265)",
>
>
"org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.Domain
ObjectResourceServerside.invokeAction(DomainObjectResourceServerside.java:40
7)",
>     "sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)",
>
> "sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> java:57)",
>
>
"sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp
l.java:43)",
>     "java.lang.reflect.Method.invoke(Method.java:601)",
>
> "org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.
> java:155)",
>
> "org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.
> java:257)",
>
> "org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:222
> )",
>
> "org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:211
> )",
>
> "org.jboss.resteasy.core.SynchronousDispatcher.getResponse(Synchronous
> Dispatcher.java:525)",
>
> "org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispa
> tcher.java:502)",
>
> "org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispa
> tcher.java:119)",
>
> "org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.
> service(ServletContainerDispatcher.java:208)",
>
> Anyone know what I'm doing wrong?
>
> Mark Wood-Patrick
> Performance Infrastructure Lead
> e-mail: [email protected]<mailto:[email protected]>
> Building/Cube: SC B31.3084
> Primary Office: please use cell # below (+1 408 486-2757)
> Cell:    408-627-5025
> Fax: 408 486-4757
> Mailstop/Mailbox: MS-10 / B307
>
>  (\__/)
>  (='.'=)
>  (")_(")
>
>
>
>
>
> ----------------------------------------------------------------------
> ------------- This email message is for the sole use of the intended 
> recipient(s) and may contain confidential information.  Any 
> unauthorized review, use, disclosure or distribution is prohibited.  
> If you are not the intended recipient, please contact the sender by 
> reply email and destroy all copies of the original message.
>
> ----------------------------------------------------------------------
> -------------
>

Reply via email to