public OMElement processDocument(InputStream inputStream, String contentType, MessageContext messageContext) throws AxisFault { throw new AxisFault("A message with content type application/xop+xml can only appear in a MIME multipart message"); }
private org.apache.axis2.AxisFault createAxisFault(java.lang.Exception e) { org.apache.axis2.AxisFault f; Throwable cause = e.getCause(); if (cause != null) { f = new org.apache.axis2.AxisFault(e.getMessage(), cause); } else { f = new org.apache.axis2.AxisFault(e.getMessage()); } return f; }
private InvocationResponse buildMessage(MessageContext messageContext) throws AxisFault { try { RelayUtils.buildMessage(messageContext, true); } catch (IOException e) { throw new AxisFault("I/O error while reading from the input stream"); } catch (XMLStreamException e) { throw new AxisFault("Unexpected error while parsing the XML content"); } return InvocationResponse.CONTINUE; } }
public void writeTo(MessageContext messageContext, OMOutputFormat format, OutputStream outputStream, boolean preserve) throws AxisFault { try { outputStream.write(getBytes(messageContext, format)); } catch (IOException e) { throw new AxisFault("An error occured while writing the request"); } }
public void initXmlStreamReader(QName elementQname, List<XmlSchema> xmlSchemaList, ConfigurationContext configContext) throws AxisFault { this.elementQname = elementQname; this.xmlSchemaList = xmlSchemaList; this.configContext = configContext; try { process(); } catch (AxisFault axisFault) { throw new AxisFault("Error while initializing XMLStreamReader ", axisFault); } isProcessed = true; }
private SOAPFactory getSOAPFactory(MessageContext msgContext) throws AxisFault { String nsURI = msgContext.getEnvelope().getNamespace().getNamespaceURI(); if (SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(nsURI)) { return OMAbstractFactory.getSOAP12Factory(); } else if (SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(nsURI)) { return OMAbstractFactory.getSOAP11Factory(); } else { throw new AxisFault(Messages.getMessage("invalidSOAPversion")); } } }
public SOAPFactory getSOAPFactory(MessageContext msgContext) throws AxisFault { String nsURI = msgContext.getEnvelope().getNamespace().getNamespaceURI(); if (SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(nsURI)) { return OMAbstractFactory.getSOAP12Factory(); } else if (SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(nsURI)) { return OMAbstractFactory.getSOAP11Factory(); } else { throw new AxisFault(Messages.getMessage("invalidSOAPversion")); } }
protected static Object makeNewServiceObject(AxisService service) throws AxisFault { Object serviceObject = Utils.createServiceObject(service); if (serviceObject == null) { throw new AxisFault( Messages.getMessage("paramIsNotSpecified", "SERVICE_OBJECT_SUPPLIER")); } else { return serviceObject; } }
public void writeTo(MessageContext messageContext, OMOutputFormat format, OutputStream outputStream, boolean preserve) throws AxisFault { DataHandler dh = getDataHandler(messageContext); if (dh != null) { try { dh.writeTo(outputStream); } catch (IOException e) { throw new AxisFault("Error serializing binary content of element : " + BaseConstants.DEFAULT_BINARY_WRAPPER, e); } } }
public void init(ConfigurationContext configContext, AxisModule module) throws AxisFault { // Set up OpenSAML to use a DOM aware Axiom implementation // Axiom Parser pool is also set within the RampartSAMLBootstrap class. try { RampartSAMLBootstrap.bootstrap(); // Initialize XML security org.apache.xml.security.Init.init(); } catch (ConfigurationException ex) { throw new AxisFault("Failed to bootstrap OpenSAML", ex); } }
public HandlerManagementServiceClient(String backEndUrl, String sessionCookie) throws AxisFault { this.endPoint = backEndUrl + serviceName; try { handlerManagementServiceStub = new HandlerManagementServiceStub(endPoint); } catch (AxisFault axisFault) { log.error("handlerManagementServiceStub Initialization fail " + axisFault.getMessage()); throw new AxisFault("handlerManagementServiceStub Initialization fail ", axisFault); } AuthenticateStub.authenticateStub(sessionCookie, handlerManagementServiceStub); }
public HandlerManagementServiceClient(String backEndUrl, String userName, String password) throws AxisFault { this.endPoint = backEndUrl + serviceName; try { handlerManagementServiceStub = new HandlerManagementServiceStub(endPoint); } catch (AxisFault axisFault) { log.error("handlerManagementServiceStub Initialization fail " + axisFault.getMessage()); throw new AxisFault("handlerManagementServiceStub Initialization fail ", axisFault); } AuthenticateStub.authenticateStub(userName, password, handlerManagementServiceStub); }
public HandlerManagementServiceClient(String backEndUrl, String sessionCookie) throws AxisFault { this.endPoint = backEndUrl + serviceName; try { handlerManagementServiceStub = new HandlerManagementServiceStub(endPoint); } catch (AxisFault axisFault) { log.error("handlerManagementServiceStub Initialization fail " + axisFault.getMessage()); throw new AxisFault("handlerManagementServiceStub Initialization fail ", axisFault); } AuthenticateStub.authenticateStub(sessionCookie, handlerManagementServiceStub); }
public void addFaultMessageContext(MessageContext msgContext, OperationContext opContext) throws AxisFault { HashMap<String, MessageContext> mep = opContext.getMessageContexts(); MessageContext faultMessageCtxt = (MessageContext) mep.get(MESSAGE_LABEL_FAULT_VALUE); if (faultMessageCtxt != null) { throw new AxisFault(Messages.getMessage("mepcompleted")); } else { mep.put(MESSAGE_LABEL_FAULT_VALUE, msgContext); opContext.setComplete(true); opContext.cleanup(); } }
public void addFaultMessageContext(MessageContext msgContext, OperationContext opContext) throws AxisFault { HashMap<String, MessageContext> mep = opContext.getMessageContexts(); MessageContext faultMessageCtxt = (MessageContext) mep.get(MESSAGE_LABEL_FAULT_VALUE); if (faultMessageCtxt != null) { throw new AxisFault(Messages.getMessage("mepcompleted")); } else { mep.put(MESSAGE_LABEL_FAULT_VALUE, msgContext); opContext.setComplete(true); opContext.cleanup(); } }
private SOAPFactory getSOAPFactory(String nsURI) throws AxisFault { if (nsURI == null) { return OMAbstractFactory.getSOAP12Factory(); } else if (SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(nsURI)) { return OMAbstractFactory.getSOAP12Factory(); } else if (SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(nsURI)) { return OMAbstractFactory.getSOAP11Factory(); } else { throw new AxisFault(Messages.getMessage("invalidSOAPversion")); } }
public void startService(String serviceName) throws AxisFault { AxisService service = allServices.get(serviceName); if (service == null) { throw new AxisFault(Messages.getMessage("servicenamenotvalid", serviceName)); } service.setActive(true); notifyObservers(new AxisEvent(AxisEvent.SERVICE_START , service), service); }
/** * @param param : Parameter to be added */ public void addParameter(Parameter param) throws AxisFault { if (isParameterLocked(param.getName())) { throw new AxisFault(Messages.getMessage("paramterlockedbyparent", param.getName())); } else { parameters.addParameter(param); } }
public void addParameter(Parameter param) throws AxisFault { if (isParameterLocked(param.getName())) { throw new AxisFault(Messages.getMessage("paramterlockedbyparent", param.getName())); } else { parameterInclude.addParameter(param); } }
/** * Add a Parameter * * @param param the Parameter to associate with this HandlerDescription */ public void addParameter(Parameter param) throws AxisFault { if (isParameterLocked(param.getName())) { throw new AxisFault(Messages.getMessage("paramterlockedbyparent", param.getName())); } else { parameterInclude.addParameter(param); } }