Package com.microsoft.schemas._2003._10.serialization

Examples of com.microsoft.schemas._2003._10.serialization.GuidE


        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

        return dataFormat;
    }

    @Override
    public Object doMarshal(Exchange exchange, Object inputObject, OutputStream stream, String soapAction) throws IOException {
        Body body = new Body();
        Header header = new Header();

        Throwable exception = exchange.getProperty(Exchange.EXCEPTION_CAUGHT, Throwable.class);
        if (exception == null) {
            exception = exchange.getIn().getHeader(Exchange.EXCEPTION_CAUGHT, Throwable.class);
        }

        final List<JAXBElement<?>> bodyContent;
        List<JAXBElement<?>> headerContent = new ArrayList<JAXBElement<?>>();
        if (exception != null) {
            bodyContent = new ArrayList<JAXBElement<?>>();
            bodyContent.add(createFaultFromException(exception));
        } else {
            bodyContent = getDataFormat().createContentFromObject(inputObject, soapAction, headerContent);
        }

        for (JAXBElement<?> elem : bodyContent) {
            body.getAny().add(elem);
        }
        for (JAXBElement<?> elem : headerContent) {
            header.getAny().add(elem);
        }
        Envelope envelope = new Envelope();
View Full Code Here

        Reasontext text = new Reasontext();
        text.setValue(exception.getMessage());
        text.setLang("en");
        fault.setReason(new Faultreason().withText(text));

        Detail detailEl = new ObjectFactory().createDetail();
        @SuppressWarnings("rawtypes")
        JAXBElement<?> faultDetailContent = new JAXBElement(name, faultObject.getClass(), faultObject);
        detailEl.getAny().add(faultDetailContent);
        fault.setDetail(detailEl);
        return new ObjectFactory().createFault(fault);
    }
View Full Code Here

            body.getAny().add(elem);
        }
        for (JAXBElement<?> elem : headerContent) {
            header.getAny().add(elem);
        }
        Envelope envelope = new Envelope();
        if (headerContent.size() > 0) {
            envelope.setHeader(header);
        }
        envelope.setBody(body);
        JAXBElement<Envelope> envelopeEl = new ObjectFactory().createEnvelope(envelope);
        return envelopeEl;
    }
View Full Code Here

    @Override
    public Object doUnmarshal(Exchange exchange, InputStream stream, Object rootObject) throws IOException {
        if (rootObject.getClass() != Envelope.class) {
            throw new RuntimeCamelException("Expected Soap Envelope but got " + rootObject.getClass());
        }
        Envelope envelope = (Envelope) rootObject;

        Header header = envelope.getHeader();
        if (header != null) {
            List<Object> returnHeaders;
            List<Object> anyHeaderElements = envelope.getHeader().getAny();
            if (null != anyHeaderElements && !(getDataFormat().isIgnoreUnmarshalledHeaders())) {
                if (getDataFormat().isIgnoreJAXBElement()) {
                    returnHeaders = new ArrayList<Object>();
                    for (Object headerEl : anyHeaderElements) {
                        returnHeaders.add(JAXBIntrospector.getValue(headerEl));
                    }
                } else {
                    returnHeaders = anyHeaderElements;
                }
                exchange.getOut().setHeader(SoapJaxbDataFormat.SOAP_UNMARSHALLED_HEADER_LIST, returnHeaders);
            }
        }

        List<Object> anyElement = envelope.getBody().getAny();
        if (anyElement.size() == 0) {
            // No parameter so return null
            return null;

        }
View Full Code Here

            faultObject = method.invoke(exception);
        } catch (Exception e) {
            throw new RuntimeCamelException("Exception while trying to get fault details", e);
        }

        Fault fault = new Fault();
        Faultcode code = new Faultcode();
        code.setValue(FAULT_CODE_SERVER);
        fault.setCode(code);

        Reasontext text = new Reasontext();
        text.setValue(exception.getMessage());
        text.setLang("en");
        fault.setReason(new Faultreason().withText(text));

        Detail detailEl = new ObjectFactory().createDetail();
        @SuppressWarnings("rawtypes")
        JAXBElement<?> faultDetailContent = new JAXBElement(name, faultObject.getClass(), faultObject);
        detailEl.getAny().add(faultDetailContent);
        fault.setDetail(detailEl);
        return new ObjectFactory().createFault(fault);
    }
View Full Code Here

        } catch (Exception e) {
            throw new RuntimeCamelException("Exception while trying to get fault details", e);
        }

        Fault fault = new Fault();
        Faultcode code = new Faultcode();
        code.setValue(FAULT_CODE_SERVER);
        fault.setCode(code);

        Reasontext text = new Reasontext();
        text.setValue(exception.getMessage());
        text.setLang("en");
View Full Code Here

TOP

Related Classes of com.microsoft.schemas._2003._10.serialization.GuidE

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.