Hello,
Using: (SC_SNAPSHOT-2012-02-27_v8.2p/PowerEdition Deployment 2012-02-27)
I have a normal Servlet, and from this servlet I want to do an 'add' DSRequest. The operationBinding of this request is shown below. It however, does not call the DMI-add method of the specified className. Instead, it executes as if there was no <serverObject> specified (this datasource is a mysql DS btw).
Is this supposed to work like this? If so, how can I make sure my DMI method is called?
I am calling it like so:
Should I somehow start an RPC Manager first? Help or hints are appreciated!
Using: (SC_SNAPSHOT-2012-02-27_v8.2p/PowerEdition Deployment 2012-02-27)
I have a normal Servlet, and from this servlet I want to do an 'add' DSRequest. The operationBinding of this request is shown below. It however, does not call the DMI-add method of the specified className. Instead, it executes as if there was no <serverObject> specified (this datasource is a mysql DS btw).
Is this supposed to work like this? If so, how can I make sure my DMI method is called?
Code:
<operationBinding operationType="add" requiresAuthentication="false" requiresRole="" operationId="Order_JsonWebserviceDataSourceImplDefaultAddOperation">
<serverObject className="nl.sytematic.projects.MyProject.server.custom.dmi.Order_CustomDMI"/>
</operationBinding>
Code:
protected void doPost(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
try {
DSRequest req = new DSRequest("Order_", "add");
//init it with some values, omitted
//...
// run the Add request
req.setOperationId("Order_JsonWebserviceDataSourceImplDefaultAddOperation");
req.setValues(values);
DSResponse resp;
try {
resp = req.execute();
} catch (Exception e) {
//*snip*
}
}
catch (ServiceException e) {
//*snip*
}
}
Comment