Package javax.wsdl

Examples of javax.wsdl.Fault


                soapBody.setUse("literal");
                bindingOutput.addExtensibilityElement(soapBody);
                bindingOperation.setBindingOutput(bindingOutput);
            }
            for (Iterator fi = operation.getFaults().values().iterator(); fi.hasNext();) {
                Fault fault = (Fault)fi.next();
                BindingFault bindingFault = definition.createBindingFault();
                configureBindingFault(bindingFault, fault);
                bindingOperation.addBindingFault(bindingFault);
            }
            binding.addBindingOperation(bindingOperation);
View Full Code Here


    public List<DataType> getFaultTypes() throws InvalidWSDLException {
        if (faultTypes == null) {
            Collection faults = operation.getFaults().values();
            faultTypes = new ArrayList<DataType>();
            for (Object f : faults) {
                Fault fault = (Fault)f;
                Message faultMsg = fault.getMessage();
                List faultParts = faultMsg.getOrderedParts(null);
                if (faultParts.size() != 1) {
                    throw new InvalidWSDLException("The fault message MUST have a single part");
                }
                Part part = (Part)faultParts.get(0);
View Full Code Here

                Iterator i = faultMap.values().iterator();
                int count = 0;

                while (i.hasNext()) {
                    count++;
                    Fault f = (Fault) i.next();
                    pw.print("        catch (");
                    pw.print(Utils.getFullExceptionName(
                            f, emitter));
                    pw.println(" e" + count + ") {");
                    pw.print("            ");
                    pw.println("throw new junit.framework.AssertionFailedError(\"" + f.getName() + " Exception caught: \" + e" + count + ");");
                    pw.println("        }");
                }
            }
            pw.println("        catch (java.rmi.RemoteException re) {");
            pw.print("            ");
View Full Code Here

                        Parameters parameters = bEntry.getParameters(operation);

                        // Inspect the faults of the operation
                        Iterator iFault = parameters.faults.values().iterator();
                        while(iFault.hasNext()) {
                            Fault fault = (Fault) iFault.next();
                            setFaultContext(fault, symbolTable);
                        }
                    }
                }
            }
View Full Code Here

        if (parms.faults != null) {
            // Collect the list of faults into a single string, separated by commas.
           
            Iterator i = parms.faults.values().iterator();
            while (i.hasNext()) {
                Fault fault = (Fault) i.next();
                String exceptionName =
                  Utils.getFullExceptionName(fault, emitter);
                signature = signature + ", " + exceptionName;
            }
        }
View Full Code Here

        // iterate over fault list, emitting code.
        Iterator fi = faults.entrySet().iterator();
        while (fi.hasNext()) {
            Map.Entry entry = (Map.Entry) fi.next();
            Fault fault = (Fault) entry.getKey();

            // Generate the 'Simple' Faults.
            // The complexType Faults are automatically handled
            // by JavaTypeWriter.
            MessageEntry me = symbolTable.getMessageEntry(
                fault.getMessage().getQName());
            boolean emitSimpleFault = true;
            if (me != null) {
                Boolean complexTypeFault = (Boolean)
                    me.getDynamicVar(
                        JavaGeneratorFactory.COMPLEX_TYPE_FAULT);
View Full Code Here

                for (int i = 0; i < operations.size(); ++i) {
                    Operation operation = (Operation) operations.get(i);
                    Map opFaults = operation.getFaults();
                    Iterator fi = opFaults.values().iterator();
                    while (fi.hasNext()) {
                        Fault f = (Fault) fi.next();
                        String name = Utils.getFullExceptionName(
                                f,
                                emitter);
                        // prevent duplicates
                        if (! faultList.contains(name) ) {
                            faultList.add(name);
                            faults.put(f, f.getMessage().getQName());
                        }
                    }
                }
            }
        }
View Full Code Here

        if (faults != null) {
            Iterator i = faults.values().iterator();

            while (i.hasNext()) {
                Fault f = (Fault) i.next();
                partTypes(v,
                        f.getMessage().getOrderedParts(null),
                        (bEntry.getFaultBodyType(operation, f.getName()) == BindingEntry.USE_LITERAL));
            }
        }
        // Put all these types into a set.  This operation eliminates all duplicates.
        for (int i = 0; i < v.size(); i++)
            types.add(v.get(i));
View Full Code Here

        ArrayList exceptions = desc.getFaults();

        for (int i = 0; exceptions != null && i < exceptions.size(); i++) {
            FaultDesc faultDesc = (FaultDesc) exceptions.get(i);
            msg = writeFaultMessage(def, faultDesc);
            Fault fault = def.createFault();
            fault.setMessage(msg);
            fault.setName((faultDesc).getName());
            oper.addFault(fault);
            if (def.getMessage(msg.getQName()) == null) {
                def.addMessage(msg);
            }
        }
View Full Code Here

                    flat.addMessage(flatOutputMsg);
                }
                flatOper.setOutput(flatOutput);
            }
            for (Iterator itFault = defOper.getFaults().values().iterator(); itFault.hasNext();) {
                Fault defFault = (Fault) itFault.next();
                Fault flatFault = flat.createFault();
                flatFault.setName(defFault.getName());
                if (defFault.getMessage() != null) {
                    Message flatFaultMsg = copyMessage(defFault.getMessage(), flat);
                    flatFault.setMessage(flatFaultMsg);
                    flat.addMessage(flatFaultMsg);
                }
                flatOper.addFault(flatFault);
            }
            flatPort.addOperation(flatOper);
View Full Code Here

TOP

Related Classes of javax.wsdl.Fault

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.