private static ClassLoader contextClassLoader() throws SOAPException { try { return Thread.currentThread().getContextClassLoader(); } catch (Exception x) { throw new SOAPException(x.toString(), x); } }
static Object newInstance(String className, String defaultImplClassName, ClassLoader classLoader) throws SOAPException { try { return safeLoadClass(className, defaultImplClassName, classLoader).getConstructor().newInstance(); } catch (ClassNotFoundException x) { throw new SOAPException("Provider " + className + " not found", x); } catch (Exception x) { throw new SOAPException("Provider " + className + " could not be instantiated: " + x, x); } }
public static SOAPConnectionFactory newInstance() throws SOAPException, UnsupportedOperationException { try { return $FactoryFinder.find(SOAPConnectionFactory.class, DEFAULT_SOAP_CONNECTION_FACTORY, true); } catch (Exception ex) { throw new SOAPException("Unable to create SOAP connection factory: " + ex.getMessage(), ex); } }
static SAAJMetaFactory getInstance() throws SOAPException { try { return $FactoryFinder.find(SAAJMetaFactory.class, DEFAULT_META_FACTORY_CLASS, true, META_FACTORY_DEPRECATED_CLASS_PROPERTY); } catch (Exception e) { throw new SOAPException("Unable to create SAAJ meta-factory: " + e.getMessage(), e); } }
/** * Closes this <CODE>SOAPConnection</CODE> object. * @throws SOAPException if there is a SOAP error */ public void close() throws SOAPException { if(closed){ throw new SOAPException(Messages.getMessage("connectionClosed00")); } closed = true; } }
static synchronized SAAJMetaFactory getInstance() throws SOAPException { if (instance == null) { try { instance = (SAAJMetaFactory)FactoryFinder.find(SAAJMetaFactory.class, "org.apache.axis2.saaj.SAAJMetaFactoryImpl"); } catch (Exception exception) { throw new SOAPException(exception.getMessage()); } } return instance; }
/** * Closes this <CODE>SOAPConnection</CODE> object. * @throws SOAPException if there is a SOAP error */ public void close() throws SOAPException { if(closed){ throw new SOAPException(Messages.getMessage("connectionClosed00")); } closed = true; } }
public InputStream getBase64Content() throws SOAPException { byte[] rawData = getRawContentBytes(); ByteArrayOutputStream out = new ByteArrayOutputStream(); try { Base64Utils.encode(rawData, 0, rawData.length, out); return new ByteArrayInputStream(out.toByteArray()); } catch (IOException e) { throw new SOAPException(e); } }
public static MessageFactory newInstance() throws SOAPException { try { MessageFactory factory = $FactoryFinder.find(MessageFactory.class, DEFAULT_MESSAGE_FACTORY, false); if (factory != null) { return factory; } return newInstance(SOAPConstants.SOAP_1_1_PROTOCOL); } catch (Exception ex) { throw new SOAPException("Unable to create message factory for SOAP: " + ex.getMessage(), ex); } }
public static SOAPFactory newInstance() throws SOAPException { try { SOAPFactory factory = $FactoryFinder.find(SOAPFactory.class, DEFAULT_SOAP_FACTORY, false); if (factory != null) { return factory; } return newInstance(SOAPConstants.SOAP_1_1_PROTOCOL); } catch (Exception ex) { throw new SOAPException("Unable to create SOAP Factory: " + ex.getMessage(), ex); } }
public void setParentElement(SOAPElement parent) throws SOAPException { if(parent == null) { throw new IllegalArgumentException(Messages.getMessage("nullParent00")); } try { SOAPEnvelope env = (SOAPEnvelope)parent; super.setParentElement(env); setEnvelope(env); } catch (Throwable t) { throw new SOAPException(t); } }
public void setParentElement(SOAPElement parent) throws SOAPException { if(parent == null) { throw new IllegalArgumentException(Messages.getMessage("nullParent00")); } try { SOAPEnvelope env = (SOAPEnvelope)parent; super.setParentElement(env); setEnvelope(env); } catch (Throwable t) { throw new SOAPException(t); } }
@Override public final SOAPException addressTypeNotSupported(final Class<?> clazz) { final SOAPException result = new SOAPException(String.format(getLoggingLocale(), addressTypeNotSupported$str(), clazz)); final StackTraceElement[] st = result.getStackTrace(); result.setStackTrace(Arrays.copyOfRange(st, 1, st.length)); return result; } private static final String noConduitInitiatorAvailableFor = "JBWS024008: No ConduitInitiator is available for %s";
public SOAPElement addChildElement(SOAPElement element) throws SOAPException { if (!(element instanceof SOAPHeaderElement)) { throw new SOAPException(Messages.getMessage("badSOAPHeader00")); } SOAPElement child = super.addChildElement(element); setDirty(); return child; }
public SOAPElement addChildElement(SOAPElement element) throws SOAPException { if (!(element instanceof SOAPHeaderElement)) { throw new SOAPException(Messages.getMessage("badSOAPHeader00")); } SOAPElement child = super.addChildElement(element); setDirty(); return child; }
public void addChild(MessageElement element) throws SOAPException { if (!(element instanceof SOAPHeaderElement)) { throw new SOAPException(Messages.getMessage("badSOAPHeader00")); } element.setEnvelope(getEnvelope()); super.addChild(element); }
public void addChild(MessageElement element) throws SOAPException { if (!(element instanceof SOAPHeaderElement)) { throw new SOAPException(Messages.getMessage("badSOAPHeader00")); } element.setEnvelope(getEnvelope()); super.addChild(element); }
public void writeTo(SOAPMessage saaj) throws SOAPException { try { SOAPHeader header = saaj.getSOAPHeader(); if (header == null) header = saaj.getSOAPPart().getEnvelope().addHeader(); bridge.marshal(jaxbObject,header); } catch (JAXBException e) { throw new SOAPException(e); } }
public void writeTo(SOAPMessage saaj) throws SOAPException { try { SOAPHeader header = saaj.getSOAPHeader(); if (header == null) header = saaj.getSOAPPart().getEnvelope().addHeader(); infoset.writeTo(header); } catch (XMLStreamBufferException e) { throw new SOAPException(e); } }
public SOAPElement addTextNode(String text) throws SOAPException { if (((SOAPFactory)this.omTarget.getOMFactory()).getSOAPVersion() == SOAP11Version.getSingleton()) { return super.addTextNode(text); } else if (((SOAPFactory)this.omTarget.getOMFactory()).getSOAPVersion() == SOAP12Version.getSingleton()) { throw new SOAPException("Cannot add text node to SOAPHeader"); } else { return null; } }