Package org.apache.axis

Examples of org.apache.axis.AxisFault


        catch (java.net.ConnectException ce) {
            System.err.println("round4XSD connect error: " + ce);
            return;
        catch (java.rmi.RemoteException re) {
            if (re instanceof AxisFault) {
                AxisFault fault = (AxisFault) re;
                if (fault.detail instanceof ConnectException ||
                    fault.getFaultCode().getLocalPart().equals("HTTP")) {
                    System.err.println("round4XSD HTTP error: " + fault);
                    return;
                }
            }
            throw new junit.framework.AssertionFailedError("Remote Exception caught: " + re);
View Full Code Here


        catch (java.net.ConnectException ce) {
            System.err.println("MathService connect error: " + ce);
            return;
        catch (java.rmi.RemoteException re) {
            if (re instanceof AxisFault) {
                AxisFault fault = (AxisFault) re;
                if (fault.detail instanceof ConnectException ||
                    fault.getFaultCode().getLocalPart().equals("HTTP")) {
                    System.err.println("MathService HTTP error: " + fault);
                    return;
                }
            }
            throw new junit.framework.AssertionFailedError("Remote Exception caught: " + re);
View Full Code Here

            }
            else {
            // We don't already have a transport for this address.  Create one.
                transport = getTransportForProtocol(protocol);
                if (transport == null)
                    throw new AxisFault("Call.setTargetEndpointAddress",
                                 JavaUtils.getMessage("noTransport01",
                                 protocol), null, null);
                transport.setUrl(address.toString());
                setTransport(transport);
                service.registerTransportForURL(address, transport);
View Full Code Here

            invoke();

            msg = msgContext.getResponseMessage();
            if (msg == null) {
              if (FAULT_ON_NO_RESPONSE) {
                throw new AxisFault(JavaUtils.getMessage("nullResponse00"));
              } else {
                return null;
              }
            }

            env = msg.getSOAPEnvelope();
            return( env.getBodyElements() );
        }


        if ( operationName == null )
            throw new AxisFault( JavaUtils.getMessage("noOperation00") );
        try {
            Object res=this.invoke(operationName.getNamespaceURI(),
                    operationName.getLocalPart(), params);
            if( tlog.isDebugEnabled() ) {
                t1=System.currentTimeMillis();
                tlog.debug("axis.Call.invoke: " + (t1-t0+ " " + operationName);
            }
            return res;
        }
        catch( AxisFault af) {
            throw af;
        }
        catch( Exception exp ) {
            //if ( exp instanceof AxisFault ) throw (AxisFault) exp ;
            entLog.info(JavaUtils.getMessage("toAxisFault00"), exp);
            throw new AxisFault( JavaUtils.getMessage("errorInvoking00", "\n" + exp) );
        }
    }
View Full Code Here

            setRequestMessage( msg );
            invoke();
            msg = msgContext.getResponseMessage();
            if (msg == null) {
              if (this.FAULT_ON_NO_RESPONSE) {
                throw new AxisFault(JavaUtils.getMessage("nullResponse00"));
              } else {
                return null;
              }
            }
            return( msg.getSOAPEnvelope() );
        }
        catch( Exception exp ) {
            if ( exp instanceof AxisFault ) throw (AxisFault) exp ;

            entLog.info(JavaUtils.getMessage("toAxisFault00"), exp);
            throw new AxisFault( JavaUtils.getMessage("errorInvoking00", "\n" + exp) );
        }
    }
View Full Code Here

         * was called (returnType != null) and we have args but addParameter
         * wasn't called (paramXMLTypes == null), then toss a fault.
         */
        if (returnType != null && args != null && args.length != 0
                && operation == null) {
            throw new AxisFault(JavaUtils.getMessage("mustSpecifyParms"));
        }

        RPCElement  body = new RPCElement(namespace, method, getParamList(args));

        Object ret = invoke( body );
View Full Code Here

        resMsg = msgContext.getResponseMessage();

        if (resMsg == null) {
          if (FAULT_ON_NO_RESPONSE) {
            throw new AxisFault(JavaUtils.getMessage("nullResponse00"));
          } else {
            return null;
          }
        }
View Full Code Here

                // Does this make any sense to anyone?  If not, we should remove it.
                // --Glen 03/16/02
                //if ( body.getPrefix() == null )       body.setPrefix( "m" );
                if ( body.getNamespaceURI() == null ) {
                    throw new AxisFault("Call.invoke",
                                        JavaUtils.getMessage("cantInvoke00", body.getName()),
                                        null, null);
                } else {
                    msgContext.setTargetService(body.getNamespaceURI());
                }
View Full Code Here

        Message resMsg = msgContext.getResponseMessage();

        if (resMsg == null) {
          if (this.FAULT_ON_NO_RESPONSE) {
            throw new AxisFault(JavaUtils.getMessage("nullResponse00"));
          } else {
            return;
          }
        }
View Full Code Here

                    InetAddress myAddr = InetAddress.getLocalHost();
                    InetAddress remoteAddr =
                            InetAddress.getByName(remoteIP);
                   
                    if (!myAddr.equals(remoteAddr))
                        throw new AxisFault("Server.Unauthorized",
                           JavaUtils.getMessage("noAdminAccess00"),
                           null, null);
                } catch (UnknownHostException e) {
                    throw new AxisFault("Server.UnknownHost",
                        JavaUtils.getMessage("unknownHost00"),
                        null, null);
                }
            }
        }
View Full Code Here

TOP

Related Classes of org.apache.axis.AxisFault

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.