Package com.oracle.webservices.api.databinding

Examples of com.oracle.webservices.api.databinding.JavaCallInfo


     * 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;
View Full Code Here


        SEIAsyncInvoker(Object proxy, Object[] args) {
            this.args = args;
        }

        public void do_run () {     
          JavaCallInfo call = owner.databinding.createJavaCallInfo(method, args);
            Packet req = (Packet)owner.databinding.serializeRequest(call);

            Fiber.CompletionCallback callback = new Fiber.CompletionCallback() {

                public void onCompletion(@NotNull Packet response) {
                    responseImpl.setResponseContext(new ResponseContext(response));
                    Message msg = response.getMessage();
                    if (msg == null) {
                        return;
                    }
                    try {
                      Object[] rargs = new Object[1];
                      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);
                        }
//                      dbHandler.readResponse(response, call);
//                      responseImpl.set(rargs[0], null);
View Full Code Here

     *      This {@link RequestContext} is used for invoking this method.
     *      We take this as a separate parameter because of the async invocation
     *      handling, which requires a separate copy.
     */
    Object invoke(Object proxy, Object[] args, RequestContext rc, ResponseContextReceiver receiver) throws Throwable {
        JavaCallInfo call = owner.databinding.createJavaCallInfo(method, args);
        Packet req = (Packet) owner.databinding.serializeRequest(call);
        // process the message
        Packet reply = owner.doProcess(req,rc,receiver);

        Message msg = reply.getMessage();
        if(msg == null) {
            if (!isOneway || !isVoid) {
                throw new WebServiceException(DispatchMessages.INVALID_RESPONSE());
            }
            return null;
        }

        try {
            call = owner.databinding.deserializeResponse(reply, call);
            if (call.getException() != null) {
                throw call.getException();
            } else {
                return call.getReturnValue();
            }
        } catch (JAXBException e) {
            throw new DeserializationException(DispatchMessages.INVALID_RESPONSE_DESERIALIZATION(), e);
        } catch (XMLStreamException e) {
            throw new DeserializationException(DispatchMessages.INVALID_RESPONSE_DESERIALIZATION(),e);
View Full Code Here

TOP

Related Classes of com.oracle.webservices.api.databinding.JavaCallInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.