/** * Gets the fault code for this <CODE>SOAPFaultException</CODE> * object. * @return a <CODE>String</CODE> with the fault code */ public String getFaultCode() { return fault.getFaultCode().getLocalPart(); }
/** * Gets the fault code for this <CODE>SOAPFaultException</CODE> * object. * @return a <CODE>String</CODE> with the fault code */ public String getFaultCode() { return fault.getFaultCode().getLocalPart(); }
/** * Gets the fault code for this <CODE>SOAPFaultException</CODE> * object. * @return a <CODE>String</CODE> with the fault code */ public String getFaultCode() { return fault.getFaultCode().getLocalPart(); }
/** * Extract information from AxisFault and map it to a HTTP Status code. * * @param af Axis Fault * @return HTTP Status code. */ protected int getHttpServletResponseStatus(AxisFault af) { // TODO: Should really be doing this with explicit AxisFault // subclasses... --Glen return af.getFaultCode().getLocalPart().startsWith("Server.Unauth") ? HttpServletResponse.SC_UNAUTHORIZED : HttpServletResponse.SC_INTERNAL_SERVER_ERROR; // This will raise a 401 for both // "Unauthenticated" & "Unauthorized"... }
/** * Extract information from AxisFault and map it to a HTTP Status code. * * @param af Axis Fault * @return HTTP Status code. */ protected int getHttpServletResponseStatus(AxisFault af) { // TODO: Should really be doing this with explicit AxisFault // subclasses... --Glen return af.getFaultCode().getLocalPart().startsWith("Server.Unauth") ? HttpServletResponse.SC_UNAUTHORIZED : HttpServletResponse.SC_INTERNAL_SERVER_ERROR; // This will raise a 401 for both // "Unauthenticated" & "Unauthorized"... }
/** * Extract information from AxisFault and map it to a HTTP Status code. * * @param af Axis Fault * @return HTTP Status code. */ private int getHttpServletResponseStatus (AxisFault af) { // TODO: Should really be doing this with explicit AxisFault // subclasses... --Glen return af.getFaultCode().getLocalPart().startsWith ("Server.Unauth") ? HttpServletResponse.SC_UNAUTHORIZED : HttpServletResponse.SC_INTERNAL_SERVER_ERROR; // This will raise a 401 for both // "Unauthenticated" & "Unauthorized"... }
/** * Extract information from AxisFault and map it to a HTTP Status code. * * @param af Axis Fault * @return HTTP Status code. */ private int getHttpServletResponseStatus (AxisFault af) { // TODO: Should really be doing this with explicit AxisFault // subclasses... --Glen return af.getFaultCode().getLocalPart().startsWith ("Server.Unauth") ? HttpServletResponse.SC_UNAUTHORIZED : HttpServletResponse.SC_INTERNAL_SERVER_ERROR; // This will raise a 401 for both // "Unauthenticated" & "Unauthorized"... }
/** * Extract information from AxisFault and map it to a HTTP Status code. * * @param af Axis Fault * @return HTTP Status code. */ private int getHttpServletResponseStatus (AxisFault af) { // TODO: Should really be doing this with explicit AxisFault // subclasses... --Glen return af.getFaultCode().getLocalPart().startsWith ("Server.Unauth") ? HttpServletResponse.SC_UNAUTHORIZED : HttpServletResponse.SC_INTERNAL_SERVER_ERROR; // This will raise a 401 for both // "Unauthenticated" & "Unauthorized"... }
/** * Extract information from AxisFault and map it to a HTTP Status code. * * @param af Axis Fault * @return HTTP Status code. */ protected int getHttpServletResponseStatus(AxisFault af) { // TODO: Should really be doing this with explicit AxisFault // subclasses... --Glen return af.getFaultCode().getLocalPart().startsWith("Server.Unauth") ? HttpServletResponse.SC_UNAUTHORIZED : HttpServletResponse.SC_INTERNAL_SERVER_ERROR; // This will raise a 401 for both // "Unauthenticated" & "Unauthorized"... }
public Name getFaultCodeAsName() { QName qname = fault.getFaultCode(); String uri = qname.getNamespaceURI(); String local = qname.getLocalPart(); return new PrefixedQName(uri, local, prefix); }
public Name getFaultCodeAsName() { QName qname = fault.getFaultCode(); String uri = qname.getNamespaceURI(); String local = qname.getLocalPart(); return new PrefixedQName(uri, local, prefix); }
public Name getFaultCodeAsName() { QName qname = fault.getFaultCode(); String uri = qname.getNamespaceURI(); String local = qname.getLocalPart(); return new PrefixedQName(uri, local, prefix); }
/** * Retrieves the user, or null if no such user exists. */ public CTFUser getUser(String username) throws RemoteException { try { return new CTFUser(this,this.icns.getUserData(getSessionId(),username)); } catch (NoSuchObjectFault e) { return null; } catch (AxisFault e) { // somehow Axis is failing to create a strongly typed binding. if (NoSuchObjectFault.FAULT_CODE.equals(e.getFaultCode())) return null; throw e; } }
private static MagentoException toMagentoException(final AxisFault fault) { final String faultCode = fault.getFaultCode().toString(); if (NumberUtils.isNumber(faultCode)) { return new MagentoException(Integer.parseInt(faultCode), fault.getFaultString(), fault); } else { return new MagentoException(MagentoException.UNKNOWN_ERROR, fault.getFaultString(), fault); } }
while (enumeration.hasMoreElements()) { String s = (String) enumeration.nextElement(); if (s.equals("fault-" + fault.getFaultCode().getLocalPart())) { faultHandler = (Handler)options.get(s);
while (enumeration.hasMoreElements()) { String s = (String) enumeration.nextElement(); if (s.equals("fault-" + fault.getFaultCode().getLocalPart())) { faultHandler = (Handler)options.get(s);
if (axisFault.getFaultCode().equals (Constants.QNAME_NO_SERVICE_FAULT_CODE)) {
if (axisFault.getFaultCode().equals (Constants.QNAME_NO_SERVICE_FAULT_CODE)) {
private Message handleFault(final AxisFault fault, final HttpResponse res, final MessageContext context) { Message responseMessage; final Element runtimeException = fault.lookupFaultDetail(Constants.QNAME_FAULTDETAIL_RUNTIMEEXCEPTION); logger.warning(Messages.getMessage("axisFault00"), fault); if (runtimeException != null) { //strip runtime details fault.removeFaultDetail(Constants.QNAME_FAULTDETAIL_RUNTIMEEXCEPTION); } final int status = fault.getFaultCode().getLocalPart().startsWith("Server.Unauth") ? HttpServletResponse.SC_UNAUTHORIZED : HttpServletResponse.SC_INTERNAL_SERVER_ERROR; if (status == HttpServletResponse.SC_UNAUTHORIZED) { // unauth access results in authentication request // TODO: less generic realm choice? res.setHeader("WWW-Authenticate", "Basic realm=\"AXIS\""); } res.setStatus(status); responseMessage = context.getResponseMessage(); if (responseMessage == null) { responseMessage = new Message(fault); final SOAPPart soapPart = (SOAPPart) responseMessage.getSOAPPart(); soapPart.getMessage().setMessageContext(context); } return responseMessage; }
private void executeInCurrentVM(String[] args) { //now create a client and invoke it AdminClient admin = null; try { admin = new AdminClient(true); } catch (ServiceException e) { throw new BuildException("failed to start the axis engine", e); } String result = null; try { result = admin.process(args); if (result != null) { log(result); } else { logOrThrow(getTaskName() + " got a null response"); } } catch (AxisFault fault) { log(fault.dumpToString(), Project.MSG_ERR); traceParams(Project.MSG_ERR); logOrThrow(getTaskName() + " failed with " + fault.getFaultCode().toString() + " " + fault.getFaultString()); } catch (BuildException e) { //rethrow these throw e; } catch (Exception e) { throw new BuildException("Exception in " + getTaskName(), e); } }