Examples of EnvelopeMarshallerException


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

      XmlUtils.writeETag(writer,T_ENVELOPE);
      writer.flush();
    }
    else
    {
      throw new EnvelopeMarshallerException("Unknown envelope type: " + rplyEnvelope);
    }
  }
View Full Code Here

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

    throws EnvelopeMarshallerException
  {
    Element de = XmlUtils.parse(reader);
    if (!XmlUtils.isElementName(de,T_ENVELOPE))
    {
      throw new EnvelopeMarshallerException("Root element must be named " + T_ENVELOPE);
    }
    return de;
  }
View Full Code Here

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

    throws EnvelopeMarshallerException
  {
    Element header = XmlUtils.findChildElement(envelope,T_HEADER,1,1);
    if (header == null)
    {
      throw new EnvelopeMarshallerException(T_HEADER + " element not found or not at the right position");
    }
    return header;
  }
View Full Code Here

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

    throws EnvelopeMarshallerException
  {
    Element body = XmlUtils.findChildElement(envelope,T_BODY,2,2);
    if (body == null)
    {
      throw new EnvelopeMarshallerException(T_BODY + " element not found or not at the right position");
    }
    return body;
  }
View Full Code Here

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

  public RqstEnvelope unmarshallRqst(Message msg)
    throws EnvelopeMarshallerException, JMSException
  {
    if (!(msg instanceof TextMessage))
    {
      throw new EnvelopeMarshallerException("JMS message is not a TextMessage");
    }
    short verb = EnvelopeConstants.stringToVerb(msg.getStringProperty(EnvelopeConstants.F_VERB));
    String appName = msg.getStringProperty(EnvelopeConstants.F_APPNAME);
    String className = msg.getStringProperty(EnvelopeConstants.F_CLASSNAME);
    String methodName = msg.getStringProperty(EnvelopeConstants.F_METHODNAME);
View Full Code Here

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

      sw.close();
      return sw.toString();
    }
    catch(java.io.IOException ioe)
    {
      throw new EnvelopeMarshallerException("Error writing to string: " + ioe);
    }
  }
View Full Code Here

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

      // body
      msg.setText(ErrorMarshallerXML.marshallError(rplyEnvelopeError));
    }
    else
    {
      throw new EnvelopeMarshallerException("Unknown envelope type: " + rplyEnvelope);
    }
    return msg;
  }
View Full Code Here

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

      java.io.StringReader sr = new java.io.StringReader(marshalledRqst);
      return sem.unmarshallRqst(sr);
    }
    catch(java.io.IOException ioe)
    {
      throw new EnvelopeMarshallerException("Error reading from string: " + ioe);
    }
  }
View Full Code Here

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

    throws EnvelopeMarshallerException, JMSException
  {
    String status = msg.getStringProperty("status");
    if (status == null)
    {
      throw new EnvelopeMarshallerException("'status' property not found in reply");
    }

    if (!(msg instanceof TextMessage))
    {
      throw new EnvelopeMarshallerException("JMS message is not a TextMessage");
    }

    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);
    }
    else
    {
      throw new EnvelopeMarshallerException("Invalid 'status' property: " + status);
    }

    return rplyEnvelope;
  }
View Full Code Here

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

      sw.close();
      return sw.toString();
    }
    catch(java.io.IOException ioe)
    {
      throw new EnvelopeMarshallerException("Error writing to string: " + ioe);
    }
  }
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.