public void writeRequest(OutputStream out) throws IOException { try { this.message.writeTo(out); } catch (SOAPException e) { throw new IOException(e.getMessage()); } }
public void writeRequest(OutputStream out) throws IOException { try { this.message.writeTo(out); } catch (SOAPException e) { throw new IOException(e.getMessage()); } }
public void writeRequest(OutputStream out) throws IOException { try { this.message.writeTo(out); } catch (SOAPException e) { throw new IOException(e.getMessage()); } }
private void log(SOAPMessageContext context) { try { this.getLogger().process(context); } catch (SOAPException e) { throw new RuntimeException(e.getMessage(), e); } }
private void log(SOAPMessageContext context) { try { this.getLogger().process(context); } catch (SOAPException e) { throw new RuntimeException(e.getMessage(), e); } }
@Override public void setValue(String value) { Node valueNode = getValueNodeStrict(); if (valueNode != null) { valueNode.setNodeValue(value); } else { try { addTextNode(value); } catch (SOAPException e) { throw new RuntimeException(e.getMessage()); } } }
private int getSaajVersion() { try { return SaajUtils.getSaajVersion(saajMessage); } catch (SOAPException ex) { throw new SaajSoapEnvelopeException("Could not access envelope: " + ex.getMessage(), ex); } }
/** * Add namespace to envelope. * * @param prefix the prefix * @param namespaceUri the namespace uri */ public void addNamespaceToEnvelope(String prefix, String namespaceUri) { try { builder.addNamespaceToenvelope(prefix, namespaceUri); } catch (SOAPException e) { throw new ConditionalException(e.getMessage()); } }
/** * Ik voeg een body element (op root niveau) aan de envelope van het nieuw aangemaakte bericht toe. * * @param naam the naam * @throws SOAPException */ public void addBodyElementToEnvelope(String naam) { try { builder.addBodyElementToEnvelope(naam); } catch (SOAPException e) { throw new ConditionalException(e.getMessage()); } }
/** * Ik maak een nieuw, leeg SOAP bericht aan. Eventueel eerder aangemaakte * berichten worden hiermee overschreven. * * @throws SOAPException */ public void createNewMessage() { try { builder.createNewMessage(); } catch (SOAPException e) { throw new ConditionalException(e.getMessage()); } }
public SOAPBindingImpl(boolean server) { try { isServer = server; msgFactory = MessageFactory.newInstance(SOAPConstants.SOAP_1_1_PROTOCOL); soapFactory = SOAPFactory.newInstance(SOAPConstants.SOAP_1_1_PROTOCOL); faultCode = isServer ? FAULTCODE_SERVER : FAULTCODE_CLIENT; } catch (SOAPException se) { LOG.log(Level.SEVERE, "SAAJ_FACTORY_CREATION_FAILURE_MSG", se); throw new WebServiceException(se.getMessage()); } }
public void setReferenceValue(String encodedValue) throws XWSSecurityException { removeContents(); try { addTextNode(encodedValue); } catch (SOAPException e) { log.log(Level.SEVERE, "WSS0757.error.setting.reference", e.getMessage()); throw new XWSSecurityException(e); } }
public void appendToSOAPHeader(FederatedCatalogInfo[] fedCatInfos, SOAPHeader header) throws SAXException { try { Name name = SOAPFactory.newInstance().createName( Constants.SOAP_HEADER_NAME_FEDCATINFO, Constants.SOAP_HEADER_PREFIX, Constants.SOAP_HEADER_NS); SOAPHeaderElement headerElement = header.addHeaderElement(name); appendToSOAPHeaderElement(fedCatInfos, headerElement); } catch (SOAPException e) { LOG.error(e.getMessage(), e); throw new SAXException("Error transforming to SOAP header", e); } }
public void appendToSOAPHeader(String[] federatedCatalogIDs, SOAPHeader header) throws SAXException { try { Name name = SOAPFactory.newInstance().createName(Constants.ELEMENT_FEDERATEDCS, Constants.SOAP_HEADER_PREFIX, Constants.SOAP_HEADER_NS); SOAPHeaderElement headerElement = header.addHeaderElement(name); headerElement.setMustUnderstand(false); //todo headerElement.setActor(Constants.SOAP_ACTOR); appendToSOAPElement(federatedCatalogIDs, headerElement); } catch (SOAPException e) { LOG.error(e.getMessage(), e); throw new SAXException("Error transforming to SOAP header", e); } }
public boolean loadSoapMessageFromString(String xml, String encoding) throws IOException { InputStream is = IOUtils.toInputStream(tidyXml(xml), encoding); try { request = MessageFactory.newInstance().createMessage(null, is); logRequestToSystemOut(); } catch (SOAPException e) { throw new CommandException("A SOAPException has occurred with message: " + e.getMessage()); } return true; }
@Override public SaajSoapMessage createWebServiceMessage() { try { SOAPMessage saajMessage = messageFactory.createMessage(); postProcess(saajMessage); return new SaajSoapMessage(saajMessage, langAttributeOnSoap11FaultString, messageFactory); } catch (SOAPException ex) { throw new SoapMessageCreationException("Could not create empty message: " + ex.getMessage(), ex); } }
public SaajSoapMessage createWebServiceMessage() { try { SOAPMessage saajMessage = messageFactory.createMessage(); postProcess(saajMessage); return new SaajSoapMessage(saajMessage, langAttributeOnSoap11FaultString, messageFactory); } catch (SOAPException ex) { throw new SoapMessageCreationException("Could not create empty message: " + ex.getMessage(), ex); } }
@Override public SaajSoapMessage createWebServiceMessage() { try { SOAPMessage saajMessage = messageFactory.createMessage(); postProcess(saajMessage); return new SaajSoapMessage(saajMessage, langAttributeOnSoap11FaultString, messageFactory); } catch (SOAPException ex) { throw new SoapMessageCreationException("Could not create empty message: " + ex.getMessage(), ex); } }
@Override public SaajSoapMessage createWebServiceMessage() { try { SOAPMessage saajMessage = messageFactory.createMessage(); postProcess(saajMessage); return new SaajSoapMessage(saajMessage, langAttributeOnSoap11FaultString, messageFactory); } catch (SOAPException ex) { throw new SoapMessageCreationException("Could not create empty message: " + ex.getMessage(), ex); } }
public void writeTo(OutputStream outputStream) throws IOException { MimeHeaders mimeHeaders = getImplementation().getMimeHeaders(getSaajMessage()); if (ObjectUtils.isEmpty(mimeHeaders.getHeader(TransportConstants.HEADER_ACCEPT))) { mimeHeaders.setHeader(TransportConstants.HEADER_ACCEPT, getVersion().getContentType()); } try { getImplementation().writeTo(getSaajMessage(), outputStream); outputStream.flush(); } catch (SOAPException ex) { throw new SaajSoapMessageException("Could not write message to OutputStream: " + ex.getMessage(), ex); } }