/** * Creates a server-side response {@link Packet} from a request * packet ({@code this}). If WS-Addressing is enabled, a default Action * Message Addressing Property is obtained using <code>wsdlPort</code> {@link WSDLPort} * and <code>binding</code> {@link WSBinding}. * <p><p> * This method should be called to create application response messages * since they are associated with a {@link WSBinding} and {@link WSDLPort}. * For creating protocol messages that require a non-default Action, use * {@link #createServerResponse(Message, com.sun.xml.ws.api.addressing.AddressingVersion, com.sun.xml.ws.api.SOAPVersion, String)}. * * @param responseMessage The {@link Message} that represents a reply. Can be null. * @param wsdlPort The response WSDL port. * @param binding The response Binding. Cannot be null. * @return response packet */ public Packet createServerResponse(@Nullable Message responseMessage, @Nullable WSDLPort wsdlPort, @Nullable SEIModel seiModel, @NotNull WSBinding binding) { Packet r = createClientResponse(responseMessage); return relateServerResponse(r, wsdlPort, seiModel, binding); }
/** * Creates a server-side response {@link Packet} from a request * packet ({@code this}). If WS-Addressing is enabled, a default Action * Message Addressing Property is obtained using <code>wsdlPort</code> {@link WSDLPort} * and <code>binding</code> {@link WSBinding}. * <p><p> * This method should be called to create application response messages * since they are associated with a {@link WSBinding} and {@link WSDLPort}. * For creating protocol messages that require a non-default Action, use * {@link #createServerResponse(Message, com.sun.xml.ws.api.addressing.AddressingVersion, com.sun.xml.ws.api.SOAPVersion, String)}. * * @param responseMessage The {@link Message} that represents a reply. Can be null. * @param wsdlPort The response WSDL port. * @param binding The response Binding. Cannot be null. * @return response packet */ public Packet createServerResponse(@Nullable Message responseMessage, @Nullable WSDLPort wsdlPort, @Nullable SEIModel seiModel, @NotNull WSBinding binding) { Packet r = createClientResponse(responseMessage); return relateServerResponse(r, wsdlPort, seiModel, binding); }
/** * Creates a server-side response {@link Packet} from a request * packet ({@code this}). If WS-Addressing is enabled, a default Action * Message Addressing Property is obtained using <code>wsdlPort</code> {@link WSDLPort} * and <code>binding</code> {@link WSBinding}. * <p><p> * This method should be called to create application response messages * since they are associated with a {@link WSBinding} and {@link WSDLPort}. * For creating protocol messages that require a non-default Action, use * {@link #createServerResponse(Message, com.sun.xml.ws.api.addressing.AddressingVersion, com.sun.xml.ws.api.SOAPVersion, String)}. * * @param responseMessage The {@link Message} that represents a reply. Can be null. * @param wsdlPort The response WSDL port. * @param binding The response Binding. Cannot be null. * @return response packet */ public Packet createServerResponse(@Nullable Message responseMessage, @Nullable WSDLPort wsdlPort, @Nullable SEIModel seiModel, @NotNull WSBinding binding) { Packet r = createClientResponse(responseMessage); return relateServerResponse(r, wsdlPort, seiModel, binding); }
/** * 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); }