Package org.openquark.cal.internal.runtime.lecc

Examples of org.openquark.cal.internal.runtime.lecc.RTPartialApp$_10$_6


     * @throws java.io.IOException for any transport errors.
     */
    public void sendSoapFault(final SoapFault soapFault, final AddressingProperties addressingProperties, final InstanceIdentifier identifier)
        throws SoapFault, IOException
    {
        final TerminationParticipantPortType port = getPort(addressingProperties, identifier, soapFaultAction);
        final ExceptionType fault = new ExceptionType();
        // we pass the fault type, reason and subcode. we cannot pass the detail and header elements as they are
        // built from Kev's element types rather than dom element types. this is all we need anyway since we only
        // see faults containing those values
        fault.setSoapFaultType(soapFault.getSoapFaultType().getValue());
        fault.setReason(soapFault.getReason());
        fault.setSubCode(soapFault.getSubcode());

        port.faultOperation(fault);
    }
View Full Code Here


     * @return
     */
    private static synchronized TerminationParticipantService getTerminationParticipantService()
    {
        if (terminationParticipantService.get() == null) {
            terminationParticipantService.set(new TerminationParticipantService());
        }
        return terminationParticipantService.get();
    }
View Full Code Here

    public static TerminationParticipantPortType getTerminationParticipantPort(W3CEndpointReference endpointReference,
                                                                               AttributedURI action,
                                                                               AddressingProperties addressingProperties)
    {
        // TODO - we need the 2.1 verison of Service so we can specify that we want to use the WS Addressing feature
        TerminationParticipantService service = getTerminationParticipantService();
        // TerminationParticipantPortType port = service.getPort(endpointReference, TerminationParticipantPortType.class, new AddressingFeature(true, true));
        TerminationParticipantPortType port = service.getPort(endpointReference, TerminationParticipantPortType.class);
        BindingProvider bindingProvider = (BindingProvider)port;
        /*
         * we have to add the JaxWS WSAddressingClientHandler because we cannoy specify the WSAddressing feature
         */
        List<Handler> customHandlerChain = new ArrayList<Handler>();
View Full Code Here

    public static TerminationParticipantPortType getTerminationParticipantPort(InstanceIdentifier identifier,
                                                                               AttributedURI action,
                                                                               AddressingProperties addressingProperties)
    {
        // TODO - we need the 2.1 verison of Service so we can specify that we want to use the WS Addressing feature
        TerminationParticipantService service = getTerminationParticipantService();
        // TerminationParticipantPortType port = service.getPort(endpointReference, TerminationParticipantPortType.class, new AddressingFeature(true, true));
        TerminationParticipantPortType port = service.getPort(TerminationParticipantPortType.class);
        BindingProvider bindingProvider = (BindingProvider)port;
        /*
         * we have to add the JaxWS WSAddressingClientHandler because we cannoy specify the WSAddressing feature
         */
        List<Handler> customHandlerChain = new ArrayList<Handler>();
View Full Code Here

    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 {
        Assert.fail( "Unknown TransportType: " + transportType );
      }
View Full Code Here

    return service;
  }

  protected int submitRequest(ICorrespondenceAgencyExternalBasic port, InsertCorrespondenceV2 request, CorrespondenceMessage msg) {

    ReceiptExternal response;
    try {
      response = port.insertCorrespondenceBasicV2(settings.getSystemUserName(), settings.getSystemPassword(), settings.getSystemUserCode(), msg.getExternalReference(), request);
      if (!ReceiptStatusEnum.OK.equals(response.getReceiptStatusCode()))
        throw new AltinnException("Status was not ok: receiptID " + response.getReceiptId() + " status " + response.getReceiptStatusCode());

    } catch (ICorrespondenceAgencyExternalBasicInsertCorrespondenceBasicV2AltinnFaultFaultFaultMessage e) {
      throw new AltinnException(getAltinnFaultMessage(e), e);
    }
    return response.getReceiptId();
  }
View Full Code Here

  @Override
  protected int submitRequest( ICorrespondenceAgencyExternalBasic port, InsertCorrespondenceV2 request, CorrespondenceMessage message ) {
    Assert.assertEquals( settings.getServiceCode(), request.getServiceCode() );
    Assert.assertEquals( settings.getServiceEdition(), request.getServiceEdition() );
    Assert.assertEquals( message.getOrgNr(), request.getReportee() );
    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 )) {
View Full Code Here

    insertCorrespondence.setNotifications(createMessageNotification(notificationEmail));
    return insertCorrespondence;
  }

  private ExternalContentV2 createContent(CorrespondenceMessage msg) {
    ExternalContentV2 externalContent = new ExternalContentV2();
    externalContent.setLanguageCode(settings.getLanguageCode());
    externalContent.setMessageTitle(msg.getMessageTitle());
    externalContent.setMessageBody(msg.getMessageBody());
    externalContent.setMessageSummary(msg.getMessageSummary());
    return externalContent;
  }
View Full Code Here

    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

    MessageNotification messageNotification = new MessageNotification(settings, notificationEmail);
    return messageNotification.getNotifications();
  }

  private InsertCorrespondenceV2 createRequest(CorrespondenceMessage msg, String notificationEmail) {
    InsertCorrespondenceV2 insertCorrespondence = new InsertCorrespondenceV2();
    insertCorrespondence.setServiceCode(settings.getServiceCode());
    insertCorrespondence.setServiceEdition(settings.getServiceEdition());
    insertCorrespondence.setAllowForwarding(false);
    insertCorrespondence.setReportee(msg.getOrgNr());
    insertCorrespondence.setVisibleDateTime(XMLDatatypeUtil.toXMLGregorianCalendar(Calendar.getInstance()));
    insertCorrespondence.setNotifications(createMessageNotification(notificationEmail));
    return insertCorrespondence;
  }
View Full Code Here

TOP

Related Classes of org.openquark.cal.internal.runtime.lecc.RTPartialApp$_10$_6

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.