Examples of InvocationResponse


Examples of com.betfair.cougar.transport.api.protocol.socket.InvocationResponse

                        public void responseReceived(ResponseMessage message) {
                            CougarObjectInput in = objectIOFactory.newCougarObjectInput(new ByteArrayInputStream(message.getPayload()), CougarProtocol.getProtocolVersion(session));

                            try {
                                EnumUtils.setHardFailureForThisThread(hardFailEnumDeserialisation);
                                InvocationResponse response = marshaller.readInvocationResponse(def.getReturnType(), in);
                                // connected object calls need some additional setup prior to responding to the observer
                                if (def.getOperationKey().getType() == OperationKey.Type.ConnectedObject && response.isSuccess()) {
                                    connectedObjectManager.handleSubscriptionResponse(session, response, observer);
                                }
                                else {
                                    response.recreate(observer, def.getReturnType(), message.getPayload().length);
                                }
                            } catch (Exception e) {
                                observer.onResult(new ExecutionResult(new CougarServiceException(ServerFaultCode.BinDeserialisationParseFailure, "Unable to deserialise response, closing session", e)));
                                if (session.isConnected()) {
                                    logger.log(NioLogger.LoggingLevel.SESSION, session, "Error occurred whilst trying to deserialise response, closing session");
View Full Code Here

Examples of org.apache.axis2.engine.Handler.InvocationResponse

            msgContext.setTo(new EndpointReference(request.getURI().toString()));
           
            msgContext.setProperty(MessageContext.TRANSPORT_OUT, response.getOutputStream());
            msgContext.setProperty(Constants.OUT_TRANSPORT_INFO, new Axis2TransportInfo(response));

            InvocationResponse processed = RESTUtil.processURLRequest(msgContext,
                                                                      response.getOutputStream(),
                                                                      contentType);

            if (!processed.equals(InvocationResponse.CONTINUE)) {
                response.setStatusCode(HttpURLConnection.HTTP_OK);
                String s = HTTPTransportReceiver.getServicesHTML(configurationContext);
                PrintWriter pw = new PrintWriter(response.getOutputStream());
                pw.write(s);
                pw.flush();
View Full Code Here

Examples of org.apache.axis2.engine.Handler.InvocationResponse

        setMsgContextProperties(request, response, service, msgContext);
       
        ServiceContext serviceContext = msgContext.getServiceContext();
        serviceContext.setProperty(ServiceContext.SERVICE_OBJECT, this.endpointInstance);
               
        InvocationResponse processed = null;
        try {
            processed = RESTUtil.processURLRequest(msgContext,
                                                   response.getOutputStream(),
                                                   contentType);
        } finally {                       
            // de-associate JAX-WS MessageContext with the thread
            // (association happens in POJOEndpointLifecycleManager.createService() call)
            POJOWebServiceContext.clear();
        }
           
        if (!processed.equals(InvocationResponse.CONTINUE)) {
            response.setStatusCode(HttpURLConnection.HTTP_OK);
            String s = HTTPTransportReceiver.getServicesHTML(configurationContext);
            PrintWriter pw = new PrintWriter(response.getOutputStream());
            pw.write(s);
            pw.flush();
View Full Code Here

Examples of org.apache.axis2.engine.Handler.InvocationResponse

        ConfigurationContext configurationContext = msgContext.getConfigurationContext();
        configurationContext.fillServiceContextAndServiceGroupContext(msgContext);
       
        setMsgContextProperties(request, response, service, msgContext);
               
        InvocationResponse processed = RESTUtil.processURLRequest(msgContext,
                                                                  response.getOutputStream(),
                                                                  contentType);

        if (!processed.equals(InvocationResponse.CONTINUE)) {
            response.setStatusCode(HttpURLConnection.HTTP_OK);
            String s = HTTPTransportReceiver.getServicesHTML(configurationContext);
            PrintWriter pw = new PrintWriter(response.getOutputStream());
            pw.write(s);
            pw.flush();
View Full Code Here

Examples of org.apache.axis2.engine.Handler.InvocationResponse

        }

        msgContext.setProperty(MessageContext.TRANSPORT_OUT, response.getOutputStream());
        msgContext.setProperty(Constants.OUT_TRANSPORT_INFO, new Axis2TransportInfo(response));

        InvocationResponse processed = RESTUtil.processURLRequest(msgContext, response.getOutputStream(), null);

      if (!processed.equals(InvocationResponse.CONTINUE)) {
          response.setStatusCode(200);
          String s = HTTPTransportReceiver.getServicesHTML(configurationContext);
          PrintWriter pw = new PrintWriter(response.getOutputStream());
          pw.write(s);
          pw.flush();
View Full Code Here

Examples of org.apache.axis2.engine.Handler.InvocationResponse

      msgCtx.getOptions().setTimeOutInMilliSeconds(1000000);
     
      try {
        AxisEngine engine = new AxisEngine (msgCtx.getConfigurationContext());
        InvocationResponse response = InvocationResponse.CONTINUE;
       
        SandeshaPolicyBean policy = SandeshaUtil.getPropertyBean(msgCtx.getAxisOperation());
        if(policy.isUseMessageSerialization()) {
          if(msgCtx.isPaused()) {
            if (log.isDebugEnabled())
View Full Code Here

Examples of org.apache.axis2.engine.Handler.InvocationResponse

 
  private static InvocationResponse manageIncomingFault (AxisFault fault, RMMsgContext rmMsgCtx, SOAPFault faultPart) throws AxisFault {
 
    if (log.isDebugEnabled())
      log.debug("Enter: FaultManager::manageIncomingFault");
    InvocationResponse response = InvocationResponse.CONTINUE;
    if (log.isErrorEnabled())
      log.error(fault);
   
    SandeshaListener listner = (SandeshaListener) rmMsgCtx.getProperty(SandeshaClientConstants.SANDESHA_LISTENER);
    if (listner!=null)
View Full Code Here

Examples of org.apache.axis2.engine.Handler.InvocationResponse

    return response;
  }
 
  public static InvocationResponse processMessagesForFaults (RMMsgContext rmMsgCtx, StorageManager storageManager) throws AxisFault {
   
    InvocationResponse response = InvocationResponse.CONTINUE;
   
    SOAPEnvelope envelope = rmMsgCtx.getSOAPEnvelope();
    if (envelope==null)
      return response;
   
View Full Code Here

Examples of org.apache.axis2.engine.Handler.InvocationResponse

  public InvocationResponse processSequenceHeader(RMMsgContext rmMsgCtx, Transaction transaction) throws AxisFault {
    if (log.isDebugEnabled())
      log.debug("Enter: SequenceProcessor::processSequenceHeader");
   
    InvocationResponse result = InvocationResponse.CONTINUE;
    Sequence sequence = (Sequence) rmMsgCtx.getMessagePart(Sandesha2Constants.MessageParts.SEQUENCE);
    if(sequence != null) {
      // This is a reliable message, so hand it on to the main routine
      result = processReliableMessage(rmMsgCtx, transaction);
    } else {
View Full Code Here

Examples of org.apache.axis2.engine.Handler.InvocationResponse

 
  public InvocationResponse processReliableMessage(RMMsgContext rmMsgCtx, Transaction transaction) throws AxisFault {
    if (log.isDebugEnabled())
      log.debug("Enter: SequenceProcessor::processReliableMessage");

    InvocationResponse result = InvocationResponse.CONTINUE;
   
    if (rmMsgCtx.getProperty(Sandesha2Constants.APPLICATION_PROCESSING_DONE) != null
        && rmMsgCtx.getProperty(Sandesha2Constants.APPLICATION_PROCESSING_DONE).equals("true")) {
      return result;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.