The next issue you'll probably encounter is the parsing of the date.
Try "20130123T000000000"
when that occurs.


On Thu, Jan 24, 2013 at 6:55 PM, Dan Haywood
<[email protected]>wrote:

> 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.ToDoItemsJdo: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.EnumValueSemanticsProvider.doParse(EnumValueSemanticsProvider.java:63)",
> >
> >
> "org.apache.isis.core.progmodel.facets.object.choices.enums.EnumValueSemanticsProvider.doRestore(EnumValueSemanticsProvider.java:73)",
> >
> >
> "org.apache.isis.core.progmodel.facets.object.choices.enums.EnumValueSemanticsProvider.doRestore(EnumValueSemanticsProvider.java:32)",
> >
> >
> "org.apache.isis.core.progmodel.facets.object.value.ValueSemanticsProviderAndFacetAbstract.fromEncodedString(ValueSemanticsProviderAndFacetAbstract.java:261)",
> >
> >
> "org.apache.isis.core.progmodel.facets.object.encodeable.EncodableFacetUsingEncoderDecoder.fromEncodedString(EncodableFacetUsingEncoderDecoder.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.java:270)",
> >
> >
> "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.DomainResourceHelper.invokeAction(DomainResourceHelper.java:265)",
> >
> >
> "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.DomainObjectResourceServerside.invokeAction(DomainObjectResourceServerside.java:407)",
> >     "sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)",
> >
> >
> "sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)",
> >
> >
> "sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.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(SynchronousDispatcher.java:525)",
> >
> >
> "org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:502)",
> >
> >
> "org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.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