Java Code Examples for com.sun.xml.internal.ws.message.jaxb.JAXBMessage#create()

The following examples show how to use com.sun.xml.internal.ws.message.jaxb.JAXBMessage#create() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SOAPFaultBuilder.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public static Message createSOAPFaultMessage(SOAPVersion soapVersion, SOAPFault fault) {
    switch (soapVersion) {
        case SOAP_11:
            return JAXBMessage.create(JAXB_CONTEXT, new SOAP11Fault(fault), soapVersion);
        case SOAP_12:
            return JAXBMessage.create(JAXB_CONTEXT, new SOAP12Fault(fault), soapVersion);
        default:
            throw new AssertionError();
    }
}
 
Example 2
Source File: SOAPFaultBuilder.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public static Message createSOAPFaultMessage(SOAPVersion soapVersion, SOAPFault fault) {
    switch (soapVersion) {
        case SOAP_11:
            return JAXBMessage.create(JAXB_CONTEXT, new SOAP11Fault(fault), soapVersion);
        case SOAP_12:
            return JAXBMessage.create(JAXB_CONTEXT, new SOAP12Fault(fault), soapVersion);
        default:
            throw new AssertionError();
    }
}
 
Example 3
Source File: SOAPFaultBuilder.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public static Message createSOAPFaultMessage(SOAPVersion soapVersion, SOAPFault fault) {
    switch (soapVersion) {
        case SOAP_11:
            return JAXBMessage.create(JAXB_CONTEXT, new SOAP11Fault(fault), soapVersion);
        case SOAP_12:
            return JAXBMessage.create(JAXB_CONTEXT, new SOAP12Fault(fault), soapVersion);
        default:
            throw new AssertionError();
    }
}
 
Example 4
Source File: SOAPFaultBuilder.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public static Message createSOAPFaultMessage(SOAPVersion soapVersion, SOAPFault fault) {
    switch (soapVersion) {
        case SOAP_11:
            return JAXBMessage.create(JAXB_CONTEXT, new SOAP11Fault(fault), soapVersion);
        case SOAP_12:
            return JAXBMessage.create(JAXB_CONTEXT, new SOAP12Fault(fault), soapVersion);
        default:
            throw new AssertionError();
    }
}
 
Example 5
Source File: SOAPFaultBuilder.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public static Message createSOAPFaultMessage(SOAPVersion soapVersion, SOAPFault fault) {
    switch (soapVersion) {
        case SOAP_11:
            return JAXBMessage.create(JAXB_CONTEXT, new SOAP11Fault(fault), soapVersion);
        case SOAP_12:
            return JAXBMessage.create(JAXB_CONTEXT, new SOAP12Fault(fault), soapVersion);
        default:
            throw new AssertionError();
    }
}
 
Example 6
Source File: SOAPFaultBuilder.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
private static Message createSOAPFaultMessage(SOAPVersion soapVersion, String faultString, QName faultCode, Element detail) {
    switch (soapVersion) {
        case SOAP_11:
            return JAXBMessage.create(JAXB_CONTEXT, new SOAP11Fault(faultCode, faultString, null, detail), soapVersion);
        case SOAP_12:
            return JAXBMessage.create(JAXB_CONTEXT, new SOAP12Fault(faultCode, faultString, detail), soapVersion);
        default:
            throw new AssertionError();
    }
}
 
Example 7
Source File: SOAPFaultBuilder.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
private static Message createSOAPFaultMessage(SOAPVersion soapVersion, String faultString, QName faultCode, Element detail) {
    switch (soapVersion) {
        case SOAP_11:
            return JAXBMessage.create(JAXB_CONTEXT, new SOAP11Fault(faultCode, faultString, null, detail), soapVersion);
        case SOAP_12:
            return JAXBMessage.create(JAXB_CONTEXT, new SOAP12Fault(faultCode, faultString, detail), soapVersion);
        default:
            throw new AssertionError();
    }
}
 
Example 8
Source File: SOAPFaultBuilder.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
private static Message createSOAPFaultMessage(SOAPVersion soapVersion, String faultString, QName faultCode, Element detail) {
    switch (soapVersion) {
        case SOAP_11:
            return JAXBMessage.create(JAXB_CONTEXT, new SOAP11Fault(faultCode, faultString, null, detail), soapVersion);
        case SOAP_12:
            return JAXBMessage.create(JAXB_CONTEXT, new SOAP12Fault(faultCode, faultString, detail), soapVersion);
        default:
            throw new AssertionError();
    }
}
 
Example 9
Source File: EndpointResponseMessageBuilder.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
public final Message createMessage(Object[] methodArgs, Object returnValue) {
    return JAXBMessage.create( bridge, build(methodArgs, returnValue), soapVersion );
}
 
Example 10
Source File: LogicalMessageImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public Message getMessage(MessageHeaders headers, AttachmentSet attachments, WSBinding binding) {
    return JAXBMessage.create(BindingContextFactory.create(ctxt), o,binding.getSOAPVersion(), headers,attachments);
}
 
Example 11
Source File: BodyBuilder.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
final Message createMessage(Object[] methodArgs) {
    return JAXBMessage.create( bridge, build(methodArgs), soapVersion );
}
 
Example 12
Source File: LogicalMessageImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public Message getMessage(MessageHeaders headers, AttachmentSet attachments, WSBinding binding) {
    return JAXBMessage.create(BindingContextFactory.create(ctxt), o,binding.getSOAPVersion(), headers,attachments);
}
 
Example 13
Source File: BodyBuilder.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
final Message createMessage(Object[] methodArgs) {
    return JAXBMessage.create( bridge, build(methodArgs), soapVersion );
}
 
Example 14
Source File: EndpointResponseMessageBuilder.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
public final Message createMessage(Object[] methodArgs, Object returnValue) {
    return JAXBMessage.create( bridge, build(methodArgs, returnValue), soapVersion );
}
 
Example 15
Source File: LogicalMessageImpl.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public Message getMessage(MessageHeaders headers, AttachmentSet attachments, WSBinding binding) {
    return JAXBMessage.create(BindingContextFactory.create(ctxt), o,binding.getSOAPVersion(), headers,attachments);
}
 
Example 16
Source File: BodyBuilder.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
final Message createMessage(Object[] methodArgs) {
    return JAXBMessage.create( bridge, build(methodArgs), soapVersion );
}
 
Example 17
Source File: BodyBuilder.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
final Message createMessage(Object[] methodArgs) {
    return JAXBMessage.create( bridge, build(methodArgs), soapVersion );
}
 
Example 18
Source File: Messages.java    From openjdk-8 with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Creates a {@link Message} backed by a JAXB bean.
 * @deprecated
 * @param context
 *      The context to be used to produce infoset from the object. Must not be null.
 * @param jaxbObject
 *      The JAXB object that represents the payload. must not be null. This object
 *      must be bound to an element (which means it either is a {@link JAXBElement} or
 *      an instanceof a class with {@link XmlRootElement}).
 * @param soapVersion
 *      The SOAP version of the message. Must not be null.
 */
public static Message create(JAXBContext context, Object jaxbObject, SOAPVersion soapVersion) {
    return JAXBMessage.create(context,jaxbObject,soapVersion);
}
 
Example 19
Source File: Messages.java    From openjdk-8-source with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Creates a {@link Message} backed by a JAXB bean.
 * @deprecated
 * @param context
 *      The context to be used to produce infoset from the object. Must not be null.
 * @param jaxbObject
 *      The JAXB object that represents the payload. must not be null. This object
 *      must be bound to an element (which means it either is a {@link JAXBElement} or
 *      an instanceof a class with {@link XmlRootElement}).
 * @param soapVersion
 *      The SOAP version of the message. Must not be null.
 */
public static Message create(JAXBContext context, Object jaxbObject, SOAPVersion soapVersion) {
    return JAXBMessage.create(context,jaxbObject,soapVersion);
}
 
Example 20
Source File: Messages.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Creates a {@link Message} backed by a JAXB bean.
 * @deprecated
 * @param context
 *      The context to be used to produce infoset from the object. Must not be null.
 * @param jaxbObject
 *      The JAXB object that represents the payload. must not be null. This object
 *      must be bound to an element (which means it either is a {@link JAXBElement} or
 *      an instanceof a class with {@link XmlRootElement}).
 * @param soapVersion
 *      The SOAP version of the message. Must not be null.
 */
public static Message create(JAXBContext context, Object jaxbObject, SOAPVersion soapVersion) {
    return JAXBMessage.create(context,jaxbObject,soapVersion);
}