Java Code Examples for com.sun.xml.internal.ws.api.message.Messages#create()
The following examples show how to use
com.sun.xml.internal.ws.api.message.Messages#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: SOAPHandlerProcessor.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
/** * Replace the message in the given message context with a * fault message. If the context already contains a fault * message, then return without changing it. * * <p>This method should only be called during a request, * because during a response an exception from a handler * is dispatched rather than replacing the message with * a fault. So this method can use the MESSAGE_OUTBOUND_PROPERTY * to determine whether it is being called on the client * or the server side. If this changes in the spec, then * something else will need to be passed to the method * to determine whether the fault code is client or server. */ final void insertFaultMessage(C context, ProtocolException exception) { try { if(!context.getPacketMessage().isFault()) { Message faultMessage = Messages.create(binding.getSOAPVersion(), exception,determineFaultCode(binding.getSOAPVersion())); context.setPacketMessage(faultMessage); } } catch (Exception e) { // severe since this is from runtime and not handler logger.log(Level.SEVERE, "exception while creating fault message in handler chain", e); throw new RuntimeException(e); } }
Example 2
Source File: SOAPHandlerProcessor.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
/** * Replace the message in the given message context with a * fault message. If the context already contains a fault * message, then return without changing it. * * <p>This method should only be called during a request, * because during a response an exception from a handler * is dispatched rather than replacing the message with * a fault. So this method can use the MESSAGE_OUTBOUND_PROPERTY * to determine whether it is being called on the client * or the server side. If this changes in the spec, then * something else will need to be passed to the method * to determine whether the fault code is client or server. */ final void insertFaultMessage(C context, ProtocolException exception) { try { if(!context.getPacketMessage().isFault()) { Message faultMessage = Messages.create(binding.getSOAPVersion(), exception,determineFaultCode(binding.getSOAPVersion())); context.setPacketMessage(faultMessage); } } catch (Exception e) { // severe since this is from runtime and not handler logger.log(Level.SEVERE, "exception while creating fault message in handler chain", e); throw new RuntimeException(e); } }
Example 3
Source File: SOAPHandlerProcessor.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
/** * Replace the message in the given message context with a * fault message. If the context already contains a fault * message, then return without changing it. * * <p>This method should only be called during a request, * because during a response an exception from a handler * is dispatched rather than replacing the message with * a fault. So this method can use the MESSAGE_OUTBOUND_PROPERTY * to determine whether it is being called on the client * or the server side. If this changes in the spec, then * something else will need to be passed to the method * to determine whether the fault code is client or server. */ final void insertFaultMessage(C context, ProtocolException exception) { try { if(!context.getPacketMessage().isFault()) { Message faultMessage = Messages.create(binding.getSOAPVersion(), exception,determineFaultCode(binding.getSOAPVersion())); context.setPacketMessage(faultMessage); } } catch (Exception e) { // severe since this is from runtime and not handler logger.log(Level.SEVERE, "exception while creating fault message in handler chain", e); throw new RuntimeException(e); } }
Example 4
Source File: SOAPHandlerProcessor.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
/** * Replace the message in the given message context with a * fault message. If the context already contains a fault * message, then return without changing it. * * <p>This method should only be called during a request, * because during a response an exception from a handler * is dispatched rather than replacing the message with * a fault. So this method can use the MESSAGE_OUTBOUND_PROPERTY * to determine whether it is being called on the client * or the server side. If this changes in the spec, then * something else will need to be passed to the method * to determine whether the fault code is client or server. */ final void insertFaultMessage(C context, ProtocolException exception) { try { if(!context.getPacketMessage().isFault()) { Message faultMessage = Messages.create(binding.getSOAPVersion(), exception,determineFaultCode(binding.getSOAPVersion())); context.setPacketMessage(faultMessage); } } catch (Exception e) { // severe since this is from runtime and not handler logger.log(Level.SEVERE, "exception while creating fault message in handler chain", e); throw new RuntimeException(e); } }
Example 5
Source File: SOAPHandlerProcessor.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
/** * Replace the message in the given message context with a * fault message. If the context already contains a fault * message, then return without changing it. * * <p>This method should only be called during a request, * because during a response an exception from a handler * is dispatched rather than replacing the message with * a fault. So this method can use the MESSAGE_OUTBOUND_PROPERTY * to determine whether it is being called on the client * or the server side. If this changes in the spec, then * something else will need to be passed to the method * to determine whether the fault code is client or server. */ final void insertFaultMessage(C context, ProtocolException exception) { try { if(!context.getPacketMessage().isFault()) { Message faultMessage = Messages.create(binding.getSOAPVersion(), exception,determineFaultCode(binding.getSOAPVersion())); context.setPacketMessage(faultMessage); } } catch (Exception e) { // severe since this is from runtime and not handler logger.log(Level.SEVERE, "exception while creating fault message in handler chain", e); throw new RuntimeException(e); } }
Example 6
Source File: SOAPProviderArgumentBuilder.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
protected Message getResponseMessage(Source source) { return Messages.create(source, soapVersion); }
Example 7
Source File: SOAPProviderArgumentBuilder.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
protected Message getResponseMessage(Source source) { return Messages.create(source, soapVersion); }
Example 8
Source File: SOAPProviderArgumentBuilder.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
protected Message getResponseMessage(Source source) { return Messages.create(source, soapVersion); }
Example 9
Source File: SOAPProviderArgumentBuilder.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
protected Message getResponseMessage(SOAPMessage soapMsg) { return Messages.create(soapMsg); }
Example 10
Source File: SOAPProviderArgumentBuilder.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
protected Message getResponseMessage(Source source) { return Messages.create(source, soapVersion); }
Example 11
Source File: SOAPProviderArgumentBuilder.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
protected Message getResponseMessage(SOAPMessage soapMsg) { return Messages.create(soapMsg); }
Example 12
Source File: SOAPProviderArgumentBuilder.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
protected Message getResponseMessage(SOAPMessage soapMsg) { return Messages.create(soapMsg); }
Example 13
Source File: SOAPProviderArgumentBuilder.java From hottub with GNU General Public License v2.0 | 4 votes |
protected Message getResponseMessage(Source source) { return Messages.create(source, soapVersion); }
Example 14
Source File: SOAPProviderArgumentBuilder.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
protected Message getResponseMessage(SOAPMessage soapMsg) { return Messages.create(soapMsg); }
Example 15
Source File: SOAPProviderArgumentBuilder.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
protected Message getResponseMessage(Source source) { return Messages.create(source, soapVersion); }
Example 16
Source File: Converter.java From hottub with GNU General Public License v2.0 | 2 votes |
/** * Converts JAX-WS RI message represented as input stream back to Message * object. * * @param dataStream message data stream * @param encoding message data stream encoding * * @return {@link com.sun.xml.internal.ws.api.message.Message} object created from the data stream */ public static Message toMessage(@NotNull InputStream dataStream, String encoding) throws XMLStreamException { XMLStreamReader xsr = XmlUtil.newXMLInputFactory(true).createXMLStreamReader(dataStream, encoding); return Messages.create(xsr); }
Example 17
Source File: Converter.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 2 votes |
/** * Converts JAX-WS RI message represented as input stream back to Message * object. * * @param dataStream message data stream * @param encoding message data stream encoding * * @return {@link com.sun.xml.internal.ws.api.message.Message} object created from the data stream */ public static Message toMessage(@NotNull InputStream dataStream, String encoding) throws XMLStreamException { XMLStreamReader xsr = XmlUtil.newXMLInputFactory(true).createXMLStreamReader(dataStream, encoding); return Messages.create(xsr); }
Example 18
Source File: Converter.java From openjdk-8-source with GNU General Public License v2.0 | 2 votes |
/** * Converts JAX-WS RI message represented as input stream back to Message * object. * * @param dataStream message data stream * @param encoding message data stream encoding * * @return {@link com.sun.xml.internal.ws.api.message.Message} object created from the data stream */ public static Message toMessage(@NotNull InputStream dataStream, String encoding) throws XMLStreamException { XMLStreamReader xsr = XmlUtil.newXMLInputFactory(true).createXMLStreamReader(dataStream, encoding); return Messages.create(xsr); }
Example 19
Source File: Converter.java From openjdk-jdk9 with GNU General Public License v2.0 | 2 votes |
/** * Converts JAX-WS RI message represented as input stream back to Message * object. * * @param dataStream message data stream * @param encoding message data stream encoding * * @return {@link com.sun.xml.internal.ws.api.message.Message} object created from the data stream */ public static Message toMessage(@NotNull InputStream dataStream, String encoding) throws XMLStreamException { XMLStreamReader xsr = XmlUtil.newXMLInputFactory(true).createXMLStreamReader(dataStream, encoding); return Messages.create(xsr); }
Example 20
Source File: Converter.java From jdk8u60 with GNU General Public License v2.0 | 2 votes |
/** * Converts JAX-WS RI message represented as input stream back to Message * object. * * @param dataStream message data stream * @param encoding message data stream encoding * * @return {@link com.sun.xml.internal.ws.api.message.Message} object created from the data stream */ public static Message toMessage(@NotNull InputStream dataStream, String encoding) throws XMLStreamException { XMLStreamReader xsr = XmlUtil.newXMLInputFactory(true).createXMLStreamReader(dataStream, encoding); return Messages.create(xsr); }