Hi Dan,
Thanks for your help. I'm not sure about the architecture.
Would the following architecture do the trick:
- write my own xml web service, accepting xml complying to the view
model's xsd
- use the jaxb service to unmarshall the input to a domain entity
- use the wrapperfactory to wrap the actual service method call for
validation to be handled by Apache isis
- how to use a possible validation error as a response?
Thanks,
Erik
On 04/12/2017 02:15 PM, Dan Haywood wrote:
Hi Erik,
sorry not to reply sooner.
I'm afraid that serializing objects in this fashion isn't possible in the
RO viewer. The best/only workaround I can give you right now is to define
the property as a string and then to send the JSON as a string and
deserialize within the receiving action:
public void exampleAction(String addressAsJson, String foo) {
Address address = fromJson(addressAsJson);
}
Or, you could use XML of course. The JAXB-style of view models would make
the deserialization easier actually, so you might want to go that route,
using JaxbService [1]
HTH
Dan
[1] http://isis.apache.org/guides/rgsvc/rgsvc.html#_rgsvc_api_JaxbService
On Wed, 12 Apr 2017 at 12:27 Erik de Hair <e.deh...@pocos.nl> wrote:
Anyone? I can do this writing my own service class but I would like to
use Apache Isis' error handling etc.
Erik
On 04/10/2017 05:44 PM, Erik de Hair wrote:
Still figuring some things out...
Is it possible to expose some service method using the RO viewer with
complex type parameters like below?
public void exampleAction(Address address, String foo){
// process input...
}
public class Address {
private String zipCode;
private String number;
}
I tried annotating the Address class with @ViewModel but then the RO
viewer expects a link to an existing view model. I would like our
external partners using the RO viewer to create json-objects (or xml?)
that will be accepted by 'exampleAction'. How to do that?
Thanks,
Erik
On 04/10/2017 11:57 AM, Erik de Hair wrote:
Hi,
For some use case we have a Wicket wizard using Apache Isis view
models where each step enriches the view model as returned by the
previous step until it is ready to submit. I was trying to redo this
using the restful interface but I can't figure out what's the
objectId of the returned view model. I need that I to start the
actions related to the next step.
So I have an action
/objects/WbaAvailability/{objectId}/actions/startAccessOrderCopper/invoke
where object WbaAvailability is a view model. An other action
(executed before) returns a list of WbaAvailabilities. But how to use
one of these and invoke the startAccessOrderCopper-action?
Thanks,
Erik