Examples of RplyEnvelopeOk


Examples of org.xooof.xmldispatcher.tools.envelope.RplyEnvelopeOk

        {
          //System.out.println("JMS rply: " + rply);
          RplyEnvelope rplyEnvelope = envelopeMarshaller.unmarshallRply(rply);
          if (rplyEnvelope instanceof RplyEnvelopeOk)
          {
            RplyEnvelopeOk rplyEnvelopeOk = (RplyEnvelopeOk)rplyEnvelope;
            afterOk(rqst,rqstEnvelope,rply,rplyEnvelopeOk);
            sessionData = rplyEnvelopeOk.getSessionData();
            return rplyEnvelopeOk.getXmlRply();
          }
          else
          {
            RplyEnvelopeError rplyEnvelopeError = (RplyEnvelopeError)rplyEnvelope;
            afterError(rqst,rqstEnvelope,rply,rplyEnvelopeError);
View Full Code Here

Examples of org.xooof.xmldispatcher.tools.envelope.RplyEnvelopeOk

        throw new XMLDispatcherSystemException("Invalid verb: " + rqstEnvelope.getVerb());
      }
      // prepare rply
      try
      {
        RplyEnvelopeOk rplyEnvelopeOk = new RplyEnvelopeOk(xmlRply,
                                                           xd.getSessionData());
        if (inMessage.getJMSReplyTo() != null)
        {
          outMessage = envelopeMarshaller.marshallRply(rplyEnvelopeOk,
                                                       queueSession);
View Full Code Here

Examples of org.xooof.xmldispatcher.tools.envelope.RplyEnvelopeOk

  public void marshallRply(RplyEnvelope rplyEnvelope, java.io.Writer writer)
    throws EnvelopeMarshallerException, java.io.IOException
  {
    if (rplyEnvelope instanceof RplyEnvelopeOk)
    {
      RplyEnvelopeOk rplyEnvelopeOk = (RplyEnvelopeOk)rplyEnvelope;
      XmlUtils.writeSTag(writer,T_ENVELOPE);
      XmlUtils.writeSTag(writer,T_HEADER);
      XmlUtils.writeElement(writer,EnvelopeConstants.F_SESSIONDATA,rplyEnvelopeOk.getSessionData(),true);
      XmlUtils.writeETag(writer,T_HEADER);
      XmlUtils.writeSTag(writer,T_BODY);
      if (rplyEnvelopeOk.getXmlRply() != null)
      {
        writer.write(rplyEnvelopeOk.getXmlRply());
      }
      XmlUtils.writeETag(writer,T_BODY);
      XmlUtils.writeETag(writer,T_ENVELOPE);
    }
    else if (rplyEnvelope instanceof RplyEnvelopeError)
View Full Code Here

Examples of org.xooof.xmldispatcher.tools.envelope.RplyEnvelopeOk

    {
      // TBC: this is the bad thing about this kind of envelope: we
      //      have parsed it and we need to reconvert it to XML
      String xmlRply = XmlUtils.elementContentToString(body);
      String sessionData = XmlUtils.findChildElementText(header,EnvelopeConstants.F_SESSIONDATA);
      return new RplyEnvelopeOk(xmlRply,sessionData);
    }
  }
View Full Code Here

Examples of org.xooof.xmldispatcher.tools.envelope.RplyEnvelopeOk

    throws EnvelopeMarshallerException, JMSException
  {
    TextMessage msg = queueSession.createTextMessage();
    if (rplyEnvelope instanceof RplyEnvelopeOk)
    {
      RplyEnvelopeOk rplyEnvelopeOk = (RplyEnvelopeOk)rplyEnvelope;
      // header
      msg.setStringProperty(EnvelopeConstants.F_STATUS,EnvelopeConstants.V_OK);
      if (rplyEnvelopeOk.getSessionData() != null)
      {
        msg.setStringProperty(EnvelopeConstants.F_SESSIONDATA,rplyEnvelopeOk.getSessionData());
      }
      // body
      if (rplyEnvelopeOk.getXmlRply() != null)
      {
        msg.setText(rplyEnvelopeOk.getXmlRply());
      }
    }
    else if (rplyEnvelope instanceof RplyEnvelopeError)
    {
      RplyEnvelopeError rplyEnvelopeError = (RplyEnvelopeError)rplyEnvelope;
View Full Code Here

Examples of org.xooof.xmldispatcher.tools.envelope.RplyEnvelopeOk

    RplyEnvelope rplyEnvelope;
    if (status.equals(EnvelopeConstants.V_OK))
    {
      String xmlRply = ((TextMessage)msg).getText();
      String sessionData = msg.getStringProperty("sessionData");
      rplyEnvelope = new RplyEnvelopeOk(xmlRply,sessionData);
    }
    else if (status.equals(EnvelopeConstants.V_NOK))
    {
      String xmlRply = ((TextMessage)msg).getText();
      rplyEnvelope = ErrorMarshallerXML.unmarshallError(xmlRply);
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.