public JavaCallInfo deserializeResponse(Packet res, JavaCallInfo call) { StubHandler stubHandler = stubHandlers.get(call.getMethod()); try { return stubHandler.readResponse(res, call); } catch (Throwable e) { call.setException(e); return call; } }
@Override public Packet serializeRequest(JavaCallInfo call) { StubHandler stubHandler = stubHandlers.get(call.getMethod()); Packet p = stubHandler.createRequestPacket(call); p.setState(Packet.State.ClientRequest); return p; }
public JavaCallInfo deserializeResponse(Packet res, JavaCallInfo call) { StubHandler stubHandler = stubHandlers.get(call.getMethod()); try { return stubHandler.readResponse(res, call); } catch (Throwable e) { call.setException(e); return call; } }
public JavaCallInfo deserializeResponse(Packet res, JavaCallInfo call) { StubHandler stubHandler = stubHandlers.get(call.getMethod()); try { return stubHandler.readResponse(res, call); } catch (Throwable e) { call.setException(e); return call; } }
@Override public Packet serializeRequest(JavaCallInfo call) { StubHandler stubHandler = stubHandlers.get(call.getMethod()); Packet p = stubHandler.createRequestPacket(call); p.setState(Packet.State.ClientRequest); return p; }
@Override public Packet serializeRequest(JavaCallInfo call) { StubHandler stubHandler = stubHandlers.get(call.getMethod()); Packet p = stubHandler.createRequestPacket(call); p.setState(Packet.State.ClientRequest); return p; }
@Override public Packet serializeResponse(JavaCallInfo call) { Method method = call.getMethod(); Message message = null; if (method != null) { TieHandler th = tieHandlers.get(method); if (th != null) { return th.serializeResponse(call); } } if (call.getException() instanceof DispatchException) { message = ((DispatchException) call.getException()).fault; } Packet p = (Packet) packetFactory.createContext(message); p.setState(Packet.State.ServerResponse); return p; }
@Override public Packet serializeResponse(JavaCallInfo call) { Method method = call.getMethod(); Message message = null; if (method != null) { TieHandler th = tieHandlers.get(method); if (th != null) { return th.serializeResponse(call); } } if (call.getException() instanceof DispatchException) { message = ((DispatchException) call.getException()).fault; } Packet p = (Packet) packetFactory.createContext(message); p.setState(Packet.State.ServerResponse); return p; }
@Override public Packet serializeResponse(JavaCallInfo call) { Method method = call.getMethod(); Message message = null; if (method != null) { TieHandler th = tieHandlers.get(method); if (th != null) { return th.serializeResponse(call); } } if (call.getException() instanceof DispatchException) { message = ((DispatchException) call.getException()).fault; } Packet p = (Packet) packetFactory.createContext(message); p.setState(Packet.State.ServerResponse); return p; }
/** * This binds the parameters for SEI endpoints and invokes the endpoint method. The * return value, and response Holder arguments are used to create a new {@link Message} * that traverses through the Pipeline to transport. */ public @NotNull NextAction processRequest(@NotNull Packet req) { JavaCallInfo call = model.getDatabinding().deserializeRequest(req); if (call.getException() == null) { try { if (req.getMessage().isOneWay(model.getPort()) && req.transportBackChannel != null) { req.transportBackChannel.close(); } Object ret = getInvoker(req).invoke(req, call.getMethod(), call.getParameters()); call.setReturnValue(ret); } catch (InvocationTargetException e) { call.setException(e); } catch (Exception e) { call.setException(e); } } else if (call.getException() instanceof DispatchException) { DispatchException e = (DispatchException)call.getException(); return doReturnWith(req.createServerResponse(e.fault, model.getPort(), null, binding)); } Packet res = (Packet) model.getDatabinding().serializeResponse(call); res = req.relateServerResponse(res, req.endpoint.getPort(), model, req.endpoint.getBinding()); assert res != null; return doReturnWith(res); }
/** * This binds the parameters for SEI endpoints and invokes the endpoint method. The * return value, and response Holder arguments are used to create a new {@link Message} * that traverses through the Pipeline to transport. */ public @NotNull NextAction processRequest(@NotNull Packet req) { JavaCallInfo call = model.getDatabinding().deserializeRequest(req); if (call.getException() == null) { try { if (req.getMessage().isOneWay(model.getPort()) && req.transportBackChannel != null) { req.transportBackChannel.close(); } Object ret = getInvoker(req).invoke(req, call.getMethod(), call.getParameters()); call.setReturnValue(ret); } catch (InvocationTargetException e) { call.setException(e); } catch (Exception e) { call.setException(e); } } else if (call.getException() instanceof DispatchException) { DispatchException e = (DispatchException)call.getException(); return doReturnWith(req.createServerResponse(e.fault, model.getPort(), null, binding)); } Packet res = (Packet) model.getDatabinding().serializeResponse(call); res = req.relateServerResponse(res, req.endpoint.getPort(), model, req.endpoint.getBinding()); assert res != null; return doReturnWith(res); }
/** * This binds the parameters for SEI endpoints and invokes the endpoint method. The * return value, and response Holder arguments are used to create a new {@link Message} * that traverses through the Pipeline to transport. */ public @NotNull NextAction processRequest(@NotNull Packet req) { JavaCallInfo call = model.getDatabinding().deserializeRequest(req); if (call.getException() == null) { try { if (req.getMessage().isOneWay(model.getPort()) && req.transportBackChannel != null) { req.transportBackChannel.close(); } Object ret = getInvoker(req).invoke(req, call.getMethod(), call.getParameters()); call.setReturnValue(ret); } catch (InvocationTargetException e) { call.setException(e); } catch (Exception e) { call.setException(e); } } else if (call.getException() instanceof DispatchException) { DispatchException e = (DispatchException)call.getException(); return doReturnWith(req.createServerResponse(e.fault, model.getPort(), null, binding)); } Packet res = (Packet) model.getDatabinding().serializeResponse(call); res = req.relateServerResponse(res, req.endpoint.getPort(), model, req.endpoint.getBinding()); assert res != null; return doReturnWith(res); }