public Message createResponse(JavaCallInfo call) { Message responseMessage; if (call.getException() == null) { responseMessage = isOneWay ? null : createResponseMessage(call.getParameters(), call.getReturnValue()); } else { Throwable e = call.getException(); Throwable serviceException = getServiceException(e); if (e instanceof InvocationTargetException || serviceException != null) {
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 readResponse(Packet p, JavaCallInfo call) throws Throwable { Message msg = p.getMessage(); if(msg.isFault()) { SOAPFaultBuilder faultBuilder = SOAPFaultBuilder.create(msg); Throwable t = faultBuilder.createException(checkedExceptions); call.setException(t); throw t; } else { initArgs(call.getParameters()); Object ret = responseBuilder.readResponse(msg, call.getParameters()); call.setReturnValue(ret); return call; } }
@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); }
if (call.getException() != null) { throw call.getException(); } else { return call.getReturnValue();
@Override public Packet serializeRequest(JavaCallInfo call) { StubHandler stubHandler = stubHandlers.get(call.getMethod()); Packet p = stubHandler.createRequestPacket(call); p.setState(Packet.State.ClientRequest); return p; }
/** * Creates a request {@link com.sun.xml.ws.message.jaxb.JAXBMessage} from method arguments. * @param args proxy invocation arguments * @return Message for the arguments */ public Packet createRequestPacket(JavaCallInfo args) { Message msg = bodyBuilder.createMessage(args.getParameters()); for (MessageFiller filler : inFillers) filler.fillIn(args.getParameters(),msg); Packet req = (Packet)packetFactory.createContext(msg); req.setState(Packet.State.ClientRequest); req.soapAction = soapAction; req.expectReply = !isOneWay; req.getMessage().assertOneWay(isOneWay); req.setWSDLOperation(getOperationName()); return req; }
JavaCallInfo call = owner.databinding.createJavaCallInfo(method, rargs); call = owner.databinding.deserializeResponse(response, call); if (call.getException() != null) { throw call.getException(); } else { responseImpl.set(rargs[0], null);
/** * 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); }
@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; }
if (call.getException() != null) { throw call.getException(); } else { return call.getReturnValue();
@Override public Packet serializeRequest(JavaCallInfo call) { StubHandler stubHandler = stubHandlers.get(call.getMethod()); Packet p = stubHandler.createRequestPacket(call); p.setState(Packet.State.ClientRequest); return p; }
/** * Creates a request {@link com.sun.xml.ws.message.jaxb.JAXBMessage} from method arguments. * @param args proxy invocation arguments * @return Message for the arguments */ public Packet createRequestPacket(JavaCallInfo args) { Message msg = bodyBuilder.createMessage(args.getParameters()); for (MessageFiller filler : inFillers) filler.fillIn(args.getParameters(),msg); Packet req = (Packet)packetFactory.createContext(msg); req.setState(Packet.State.ClientRequest); req.soapAction = soapAction; req.expectReply = !isOneWay; req.getMessage().assertOneWay(isOneWay); req.setWSDLOperation(getOperationName()); return req; }
JavaCallInfo call = owner.databinding.createJavaCallInfo(method, rargs); call = owner.databinding.deserializeResponse(response, call); if (call.getException() != null) { throw call.getException(); } else { responseImpl.set(rargs[0], null);
/** * 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); }
public JavaCallInfo readResponse(Packet p, JavaCallInfo call) throws Throwable { Message msg = p.getMessage(); if(msg.isFault()) { SOAPFaultBuilder faultBuilder = SOAPFaultBuilder.create(msg); Throwable t = faultBuilder.createException(checkedExceptions); call.setException(t); throw t; } else { initArgs(call.getParameters()); Object ret = responseBuilder.readResponse(msg, call.getParameters()); call.setReturnValue(ret); return call; } }
public Message createResponse(JavaCallInfo call) { Message responseMessage; if (call.getException() == null) { responseMessage = isOneWay ? null : createResponseMessage(call.getParameters(), call.getReturnValue()); } else { Throwable e = call.getException(); Throwable serviceException = getServiceException(e); if (e instanceof InvocationTargetException || serviceException != null) {
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 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; }