on 06-19-2007 11:48 PM
Hi Experts,
I'd made an EJB, then a WebService of that.
I'd tested the url in a Browser, and everything works fine... I sent the values, and got the correct response.
Now i'm trying to call it in a Web Dynpro. I'd imported the model, added to the controller, generated a method and set all the values that the WS receive, however every time i execute an error occurs.
This is the error in Log Viewer:
com.sap.engine.services.webservices.addtions.exceptions.ProcessException: Cannot find the required parameter [RefPagamento] in the request message content.
This is the code i'm using:
wdContext.nodeRequest_PedidoAutorizacao().invalidate();
WS_PagamentoVisa model = new WS_PagamentoVisa();
wdContext.nodeRequest_PedidoAutorizacao().bind(new Request_PedidoAutorizacao(model));
IPublicHotelariaController.IPedidoAutorizacaoElement input = wdContext.createPedidoAutorizacaoElement(new PedidoAutorizacao(model));
wdContext.nodePedidoAutorizacao().bind(input);
input.setRefPagamento("12321321323");
wdContext.currentRequest_PedidoAutorizacaoElement().modelObject().execute();
...
I believe the input is not well formed in my code, but i can't understand where's the problem.
Can anyone help me, please?
Thanks in advanced,
Luis
Hi,
Assuming you context to be..
Context
--Request_PedidoAutorizacao (node)
-
PedidoAutorizacao (node)
-
RefPagamento (attribute)
<i>You are invalidating Request_PedidoAutorizacao which is your main node.This node contians subnode PedidoAutorizacao</i>
<i>which has the input attribute RefPagamento</i>.
// try the following
WS_PagamentoVisa model = new WS_PagamentoVisa();
Request_PedidoAutorizacao req = new Request_PedidoAutorizacao(model);
PedidoAutorizacao input = new PedidoAutorizacao(model);
req.setPedidoAutorizacao(input);
wdContext.nodeRequest_PedidoAutorizacao().bind(req);
wdContext.currentPedidoAutorizacaoElement.setRefPagamento("12321321323");
wdContext.currentRequest_PedidoAutorizacaoElement().modelObject().execute();
wdContext.nodeResponse.invalidate(); // invalidate your response node
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Luis,
You are invalidating the node first.First execute the the model then invalidate.
WS_PagamentoVisa model = new WS_PagamentoVisa();
wdContext.nodeRequest_PedidoAutorizacao().bind(new Request_PedidoAutorizacao(model));
IPublicHotelariaController.IPedidoAutorizacaoElement input = wdContext.createPedidoAutorizacaoElement(new PedidoAutorizacao(model));
input.setRefPagamento("12321321323");
wdContext.nodePedidoAutorizacao().bind(input);
wdContext.currentRequest_PedidoAutorizacaoElement().modelObject().execute();
wdContext.nodeRequest_PedidoAutorizacao().invalidate();
Would you please post the exact structure of you model node that contains "RefPagamento" parameter .
Regards,
Mithu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Can you do the setting of refPagemento first and then the binding of input variable.
i.e
IPublicHotelariaController.IPedidoAutorizacaoElement input = wdContext.createPedidoAutorizacaoElement(new PedidoAutorizacao(model));
input.setRefPagamento("12321321323");
wdContext.nodePedidoAutorizacao().bind(input);
wdContext.currentRequest_PedidoAutorizacaoElement().modelObject().execute();
Regards,
Ashwani Kr Sharma
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.