Package org.serviceconnector.scmp

Examples of org.serviceconnector.scmp.SCMPPart


    LOGGER.debug("CRP message found in queue subscriptionId " + subscriptionId);
    // message found in subscription queue set up reply
    SCMPMessage reply = null;
    if (message.isPart() == true) {
      // message from queue is of type part - outgoing must be part too, no poll request
      reply = new SCMPPart(message.getSCMPVersion(), false, message.getHeader());
    } else {
      reply = new SCMPMessage(message.getSCMPVersion(), message.getHeader());
    }
    reply.setSessionId(reqMessage.getSessionId());
    reply.setMessageType(reqMessage.getMessageType());
View Full Code Here


    String requestString = TestUtil.getSCMPString(headKey, header, body);

    byte[] buffer = requestString.getBytes();
    InputStream is = new ByteArrayInputStream(buffer);
    IEncoderDecoder coder = coderFactory.createEncoderDecoder(new SCMPPart(SCMPVersion.CURRENT));

    SCMPMessage message = null;
    try {
      message = (SCMPMessage) coder.decode(is);
    } catch (Exception e) {
View Full Code Here

    String requestString = TestUtil.getSCMPString(headKey, header, body);

    byte[] buffer = requestString.getBytes();
    InputStream is = new ByteArrayInputStream(buffer);
    IEncoderDecoder coder = coderFactory.createEncoderDecoder(new SCMPPart(SCMPVersion.CURRENT));

    SCMPMessage message = null;
    try {
      message = (SCMPMessage) coder.decode(is);
    } catch (Exception e) {
View Full Code Here

    String requestString = TestUtil.getSCMPString(headKey, header, body);

    byte[] buffer = requestString.getBytes();
    InputStream is = new ByteArrayInputStream(buffer);
    IEncoderDecoder coder = coderFactory.createEncoderDecoder(new SCMPPart(SCMPVersion.CURRENT));

    SCMPMessage message = null;
    try {
      message = (SCMPMessage) coder.decode(is);
    } catch (Exception e) {
View Full Code Here

    String requestString = "garbe /s=69& SCMP/1.0\n" + "bty=" + bodyType.getValue() + "\n" + "msn=" + msgSequenceNr + "\n"
        + "mty=" + msgType.getValue() + "\n" + body;

    byte[] buffer = requestString.getBytes();
    InputStream is = new ByteArrayInputStream(buffer);
    IEncoderDecoder coder = coderFactory.createEncoderDecoder(new SCMPPart(SCMPVersion.CURRENT));

    try {
      coder.decode(is);
      Assert.fail("Should throw exception");
    } catch (Exception e) {
View Full Code Here

    String requestString = TestUtil.getSCMPString(headKey, header, body);

    byte[] buffer = requestString.getBytes();
    InputStream is = new ByteArrayInputStream(buffer);
    IEncoderDecoder coder = coderFactory.createEncoderDecoder(new SCMPPart(SCMPVersion.CURRENT));

    SCMPMessage message = null;
    try {
      message = (SCMPMessage) coder.decode(is);
    } catch (Exception e) {
View Full Code Here

    String requestString = TestUtil.getSCMPString(headKey, header, body);

    byte[] buffer = requestString.getBytes();
    InputStream is = new ByteArrayInputStream(buffer);
    IEncoderDecoder coder = coderFactory.createEncoderDecoder(new SCMPPart(SCMPVersion.CURRENT));

    SCMPMessage message = null;
    try {
      message = (SCMPMessage) coder.decode(is);
    } catch (Exception e) {
View Full Code Here

    String requestString = TestUtil.getSCMPString(headKey, header, body);

    byte[] buffer = requestString.getBytes();
    InputStream is = new ByteArrayInputStream(buffer);
    IEncoderDecoder coder = coderFactory.createEncoderDecoder(new SCMPPart(SCMPVersion.CURRENT));

    SCMPMessage message = null;
    try {
      message = (SCMPMessage) coder.decode(is);
    } catch (Exception e) {
      Assert.fail("Should not throw exception");
    }
    verifySCMP(message);

    bodyType = SCMPBodyType.TEXT;
    header = "bty=" + bodyType.getValue() + "\n" + "msn=" + msgSequenceNr + "\n" + "mty=" + msgType.getValue() + "\n";

    requestString = TestUtil.getSCMPString(headKey, header, body);

    buffer = requestString.getBytes();
    is = new ByteArrayInputStream(buffer);
    coder = coderFactory.createEncoderDecoder(new SCMPPart(SCMPVersion.CURRENT));

    message = null;
    try {
      message = (SCMPMessage) coder.decode(is);
    } catch (Exception e) {
View Full Code Here

   * Description: Encode REQ test<br>
   * Expectation: passes
   */
  @Test
  public void t20_EncodeREQTest() {
    IEncoderDecoder coder = coderFactory.createEncoderDecoder(new SCMPPart(SCMPVersion.CURRENT));

    String header = "msn=" + msgSequenceNr + "\n" + "bty=" + bodyType.getValue() + "\n" + "mty=" + msgType.getValue() + "\n";

    String expectedString = TestUtil.getSCMPString(headKey, header, body);

View Full Code Here

   * Description: Encode RES test<br>
   * Expectation: passes
   */
  @Test
  public void t21_EncodeRESTest() {
    IEncoderDecoder coder = coderFactory.createEncoderDecoder(new SCMPPart(SCMPVersion.CURRENT));

    this.headKey = SCMPHeaderKey.RES;
    String header = "msn=" + msgSequenceNr + "\n" + "bty=" + bodyType.getValue() + "\n" + "mty=" + msgType.getValue() + "\n";

    String expectedString = TestUtil.getSCMPString(headKey, header, body);
View Full Code Here

TOP

Related Classes of org.serviceconnector.scmp.SCMPPart

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.