Package com.arjuna.schemas.ws._2005._10.wsarjtx

Examples of com.arjuna.schemas.ws._2005._10.wsarjtx.TerminationParticipantService


    ExternalContentV2 content = request.getContent();
    Assert.assertEquals( message.getMessageTitle(), content.getMessageTitle() );
    Assert.assertEquals( message.getMessageBody(), content.getMessageBody() );
    Assert.assertEquals( message.getMessageSummary(), content.getMessageSummary() );
    Assert.assertEquals( settings.getLanguageCode(), content.getLanguageCode() );
    Notification notification = request.getNotifications().getNotification().get( 0 );
    List<ReceiverEndPoint> receiverEndPoints = notification.getReceiverEndPoints().getReceiverEndPoint();
    for (ReceiverEndPoint receiverEndPoint : receiverEndPoints) {
      TransportType transportType = receiverEndPoint.getTransportType();
      if (TransportType.EMAIL.equals( transportType )) {
      } else if (TransportType.SMS.equals( transportType )) {
      } else {
View Full Code Here


public class MessageNotificationTest {

    @Test
    public void testMessageNotificationContainsEmailAddressIfAddressNotNull() throws Exception {
        MessageNotification messageNotification = new MessageNotification(new CorrespondenceSettings(), "test@example.com");
        NotificationBEList notifications = messageNotification.getNotifications();

        assertEquals(1, notifications.getNotification().size());
        assertEquals(2, notifications.getNotification().get(0).getReceiverEndPoints().getReceiverEndPoint().size());

        ReceiverEndPoint smsEndpoint = notifications.getNotification().get(0).getReceiverEndPoints().getReceiverEndPoint().get(0);
        ReceiverEndPoint mailEndpoint = notifications.getNotification().get(0).getReceiverEndPoints().getReceiverEndPoint().get(1);

        assertEquals(TransportType.SMS, smsEndpoint.getTransportType());
        assertEquals("", smsEndpoint.getReceiverAddress());

        assertEquals(TransportType.EMAIL, mailEndpoint.getTransportType());
View Full Code Here

    }

    @Test
    public void testMessageNotificationContainsEmailEmptyStringIfAddressIsNull() throws Exception {
        MessageNotification messageNotification = new MessageNotification(new CorrespondenceSettings(), "");
        NotificationBEList notifications = messageNotification.getNotifications();

        assertEquals(1, notifications.getNotification().size());
        assertEquals(2, notifications.getNotification().get(0).getReceiverEndPoints().getReceiverEndPoint().size());

        ReceiverEndPoint smsEndpoint = notifications.getNotification().get(0).getReceiverEndPoints().getReceiverEndPoint().get(0);
        ReceiverEndPoint mailEndpoint = notifications.getNotification().get(0).getReceiverEndPoints().getReceiverEndPoint().get(1);

        assertEquals(TransportType.SMS, smsEndpoint.getTransportType());
        assertEquals("", smsEndpoint.getReceiverAddress());

        assertEquals(TransportType.EMAIL, mailEndpoint.getTransportType());
View Full Code Here

        NotificationBEList notifications = messageNotification.getNotifications();

        assertEquals(1, notifications.getNotification().size());
        assertEquals(2, notifications.getNotification().get(0).getReceiverEndPoints().getReceiverEndPoint().size());

        ReceiverEndPoint smsEndpoint = notifications.getNotification().get(0).getReceiverEndPoints().getReceiverEndPoint().get(0);
        ReceiverEndPoint mailEndpoint = notifications.getNotification().get(0).getReceiverEndPoints().getReceiverEndPoint().get(1);

        assertEquals(TransportType.SMS, smsEndpoint.getTransportType());
        assertEquals("", smsEndpoint.getReceiverAddress());

        assertEquals(TransportType.EMAIL, mailEndpoint.getTransportType());
        assertEquals("test@example.com", mailEndpoint.getReceiverAddress());
    }
View Full Code Here

        NotificationBEList notifications = messageNotification.getNotifications();

        assertEquals(1, notifications.getNotification().size());
        assertEquals(2, notifications.getNotification().get(0).getReceiverEndPoints().getReceiverEndPoint().size());

        ReceiverEndPoint smsEndpoint = notifications.getNotification().get(0).getReceiverEndPoints().getReceiverEndPoint().get(0);
        ReceiverEndPoint mailEndpoint = notifications.getNotification().get(0).getReceiverEndPoints().getReceiverEndPoint().get(1);

        assertEquals(TransportType.SMS, smsEndpoint.getTransportType());
        assertEquals("", smsEndpoint.getReceiverAddress());

        assertEquals(TransportType.EMAIL, mailEndpoint.getTransportType());
        assertEquals("", mailEndpoint.getReceiverAddress());
    }
View Full Code Here

    }
    return response.getReceiptId();
  }

  private String getAltinnFaultMessage(ICorrespondenceAgencyExternalBasicInsertCorrespondenceBasicV2AltinnFaultFaultFaultMessage f) {
    AltinnFault faultMessage = f.getFaultInfo();
    log.info("Error id:" + faultMessage.getErrorID() + "Error: " + faultMessage.getAltinnErrorMessage());
    return faultMessage.getAltinnErrorMessage();
  }
View Full Code Here

  public CorrespondenceClient(CorrespondenceSettings settings) {
    this.settings = settings;
  }

  public int send(CorrespondenceMessage msg, String notificationEmail) {
    ICorrespondenceAgencyExternalBasic port = createClientPort();
    InsertCorrespondenceV2 request = createRequest(msg, notificationEmail);
    request.setContent(createContent(msg));
    return submitRequest(port, request, msg);
  }
View Full Code Here

    externalContent.setMessageSummary(msg.getMessageSummary());
    return externalContent;
  }

  protected ICorrespondenceAgencyExternalBasic createClientPort() {
    ICorrespondenceAgencyExternalBasic service;
    JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
    factory.getInInterceptors().add(new LoggingInInterceptor());
    factory.getOutInterceptors().add(new LoggingOutInterceptor());
    factory.getOutInterceptors().add(new CdataWriterInterceptor("MessageBody"));
View Full Code Here

    }
   
    private static final String text = "Binary Attachments are radical";
    private void setText(ImageDepot depot) {
       
        Base64Binary binary = new Base64Binary();
        binary.setContentType("");
        binary.setValue(text.getBytes());
        depot.setTextData(binary);
    }
View Full Code Here

        binary.setValue(text.getBytes());
        depot.setTextData(binary);
    }
   
    private void checkText(ImageDepot depot) {
        Base64Binary binary = depot.getTextData();
        assertTrue(binary != null);
        String contentType = binary.getContentType();
        assertTrue("".equals(contentType));
        byte[] bytes = binary.getValue();
        assertTrue(bytes != null);
        String theText = new String(bytes);
        assertTrue(text.equals(theText));
    }
View Full Code Here

TOP

Related Classes of com.arjuna.schemas.ws._2005._10.wsarjtx.TerminationParticipantService

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.