Identity Manager 3.7 REST Password Management Services

Hello, any help will be appreciated, it has been 3 days now and I cant
seem to figure this one out.
I am busy writing an application to change the Challenge response
questions for a user. I am using the REST (RIS.war) services.
The Password Challenge Response REST Service requests
(http(s)://hostort/war_context/roa/v1/pwdmgt/user/{userDN}/chares) to
obtain responses (using GET request method) are working perfectly, but
updating the responses are throwing validation errors
([ChallengeResponseResource] All fields are required).

I have inspected the Http calls and all the data gets sent to the
server and it is returning a HTTP 200 response. For e.g. if the
question0 json element is omitted I get an Error happened when saving
challenge responses validation error instead of an All fields are
required validation error so I dont think that the problem is with the
http calls (as it is picking up the json object).

My password policy just has one challenge response question and the
json object returned via the
http(s)://hostort/war_context/roa/v1/pwdmgt/user/{userDN}/chares GET
call is something like
[{},{"have_stored_challenges":"true","use_mask":"fa lse"}, {"0":"Question
1"}, {}, {"use_grace_login":"false","grace_login_remaining" :"-1"}]

so the response must be something like

[{"_question0":"Question 1","_answer0":"This is my answer",
_from_seq0:1}]

but is is not working, if tried all possible combinations with and
without the square brackets.

All the fields as specified in the documentation are provided and it
looks like the REST service is picking up the data. I couldnt find any
additional information on the Novell Website for solving this problem.

Ive decompiled the IDMProv.war file the code is verifying the
structure of the json object (the json object is converted to a
com.sun.jersey.api.representation.Form object via annotations)

The app is running on login as: Linux version 2.6.27.37-0.1-pae (SUSE
Linux) and JBoss 5.0.1.GA

The stacktrace im getting:
00:39:22,578 ERROR [ChallengeResponseResource] All fields are
required.
com.novell.pwdmgt.api.ChallengeResponseException: All fields are
required.
at
com.novell.pwdmgt.service.ChallengeResponseService .validateChallengeResponse(ChallengeResponseServic e.java:250)
at
com.novell.pwdmgt.service.ChallengeResponseService .saveChallengeResponse(ChallengeResponseService.ja va:136)
at
com.novell.roa.resources.ChallengeResponseResource .saveChallengeResponse(ChallengeResponseResource.j ava:248)
at
com.novell.roa.resources.ChallengeResponseResource .saveChallengeResponse(ChallengeResponseResource.j ava:136)
at
com.novell.roa.resources.PwdMgtResources.processPa sswordManagementResources(PwdMgtResources.java:282 )
at sun.reflect.GeneratedMethodAccessor577.invoke(Unkn own
Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
com.sun.jersey.server.impl.model.method.dispatch.A bstractResourceMethodDispatchProvider$TypeOutInvok er._dispatch(AbstractResourceMethodDispatchProvide r.java:156)
at
com.sun.jersey.server.impl.model.method.dispatch.R esourceJavaMethodDispatcher.dispatch(ResourceJavaM ethodDispatcher.java:67)
at
com.sun.jersey.server.impl.uri.rules.HttpMethodRul e.accept(HttpMethodRule.java:163)
at
com.sun.jersey.server.impl.uri.rules.RightHandPath Rule.accept(RightHandPathRule.java:111)
at
com.sun.jersey.server.impl.uri.rules.ResourceClass Rule.accept(ResourceClassRule.java:71)
at
com.sun.jersey.server.impl.uri.rules.RightHandPath Rule.accept(RightHandPathRule.java:111)
at
com.sun.jersey.server.impl.uri.rules.RootResourceC lassesRule.accept(RootResourceClassesRule.java:63)
at
com.sun.jersey.server.impl.application.WebApplicat ionImpl._handleRequest(WebApplicationImpl.java:654 )
at
com.sun.jersey.server.impl.application.WebApplicat ionImpl.handleRequest(WebApplicationImpl.java:612)
at
com.sun.jersey.server.impl.application.WebApplicat ionImpl.handleRequest(WebApplicationImpl.java:603)
at
com.sun.jersey.spi.container.servlet.WebComponent. service(WebComponent.java:309)
at
com.sun.jersey.spi.container.servlet.ServletContai ner.service(ServletContainer.java:425)
at
com.sun.jersey.spi.container.servlet.ServletContai ner.service(ServletContainer.java:590)
at
javax.servlet.http.HttpServlet.service(HttpServlet .java:717)
at
org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:206)
at
com.novell.soa.common.i18n.BestLocaleServletFilter .doFilter(BestLocaleServletFilter.java:233)
at
org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:206)
at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doF ilter(ReplyHeaderFilter.java:96)
at
org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:235)
at
org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:191)
at
org.jboss.web.tomcat.security.SecurityAssociationV alve.invoke(SecurityAssociationValve.java:190)
at
org.apache.catalina.authenticator.AuthenticatorBas e.invoke(AuthenticatorBase.java:433)
at
org.jboss.web.tomcat.security.JaccContextValve.inv oke(JaccContextValve.java:92)
at
org.jboss.web.tomcat.security.SecurityContextEstab lishmentValve.process(SecurityContextEstablishment Valve.java:126)
at
org.jboss.web.tomcat.security.SecurityContextEstab lishmentValve.invoke(SecurityContextEstablishmentV alve.java:70)
at
org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:102)
at
org.jboss.web.tomcat.service.jca.CachedConnectionV alve.invoke(CachedConnectionValve.java:158)
at
org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.servic e(CoyoteAdapter.java:330)
at
org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java:829)
at
org.apache.coyote.http11.Http11Protocol$Http11Conn ectionHandler.process(Http11Protocol.java:601)
at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run( JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)


--
Nielk
------------------------------------------------------------------------
Nielk's Profile: http://forums.novell.com/member.php?userid=80699
View this thread: http://forums.novell.com/showthread.php?t=404943