Package javax.wsdl

Examples of javax.wsdl.Fault


                    output.setMessage(message);
                    operation.setOutput(output);
                }
                //loop to add fault
                Collection<FaultInfo> faults = operationInfo.getFaults();
                Fault fault = null;
                for (FaultInfo faultInfo : faults) {
                    fault = def.createFault();
                    fault.setName(faultInfo.getFaultName().getLocalPart());
                    message = def.createMessage();
                    buildMessage(message, faultInfo, def);
                    this.addExtensibilityAttributes(fault, faultInfo.getExtensionAttributes());
                    this.addExtensibilityElements(fault, getWSDL11Extensors(faultInfo));
                    fault.setMessage(message);
                    operation.addFault(fault);
                }
            }
            portType.addOperation(operation);
        }
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.getMessage(), symbolTable));
                    pw.println(" e" + count + ") {");
                    pw.print("            ");
                    pw.println("throw new junit.framework.AssertionFailedError(\"" + f.getName() + " Exception caught: \" + e" + count + ");");
                    pw.println("        }");
                }
            }
           
            pw.println("        " + indent + "// TBD - validate results");
View Full Code Here

        if (parms != null && 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.getMessage(), symbolTable);
                signature = signature + ", " + exceptionName;
            }
        }
        return signature;
    } // constructSignature
View Full Code Here

            // if use=literal, no use of namespace on the soap:fault
            // if use=encoded, no use of element on the part

            // Check this fault to make sure it matches the one
            // in the matching portType Operation
            Fault opFault = operation.getFault(bFault.getName());
            if (opFault == null) {
                throw new IOException(Messages.getMessage("noPortTypeFault",
                        new String[] {bFault.getName(),
                        bindOp.getName(),
                        binding.getQName().toString()}));
View Full Code Here

        } else {
            operation.setStyle(OperationType.ONE_WAY);
        }

        for (DataType<DataType> faultType: op.getFaultTypes()) {
            Fault fault = definition.createFault();
            QName faultName = ((XMLType)faultType.getLogical().getLogical()).getElementName();
            fault.setName(faultName.getLocalPart());
            Message faultMsg = definition.getMessage(faultName);
            if (faultMsg == null) {
                faultMsg = definition.createMessage();
                faultMsg.setQName(faultName);
                faultMsg.setUndefined(false);
                definition.addMessage(faultMsg);
                faultMsg.addPart(generatePart(definition, faultType.getLogical(), faultName.getLocalPart()));
            }
            fault.setMessage(faultMsg);
            operation.addFault(fault);
            List<ElementInfo> elements = null;
            if (faultType.getLogical().getPhysical() != faultType.getPhysical()) {
                // create special wrapper for type indirection to real fault bean
                elements = new ArrayList<ElementInfo>(1);
View Full Code Here

            }
            bindingOutput.addExtensibilityElement(outputExtension);
            bindingOperation.setBindingOutput(bindingOutput);
        }
        for (Iterator fi = operation.getFaults().values().iterator(); fi.hasNext();) {
            Fault fault = (Fault)fi.next();
            BindingFault bindingFault = definition.createBindingFault();
            ExtensibilityElement faultExtension =
                definition.getExtensionRegistry().createExtension(BindingFault.class, soapFault);
            configureBindingFault(bindingFault, faultExtension, fault);
            bindingFault.addExtensibilityElement(faultExtension);
View Full Code Here

                }
                bindingOp.setBindingOutput(out);
            }
            for (Iterator itf = operation.getFaults().values().iterator(); itf
                    .hasNext();) {
                Fault fault = (Fault) itf.next();
                BindingFault bindingFault = def.createBindingFault();
                bindingFault.setName(fault.getName());
                if (soap11) {
                    SOAPFault soapFault = new SOAPFaultImpl();
                    soapFault.setUse("literal");
                    soapFault.setName(fault.getName());
                    bindingFault.addExtensibilityElement(soapFault);
                } else {
                    SOAP12Fault soapFault = new SOAP12FaultImpl();
                    soapFault.setUse("literal");
                    soapFault.setName(fault.getName());
                    bindingFault.addExtensibilityElement(soapFault);
                }
                bindingOp.addBindingFault(bindingFault);
            }
            binding.addBindingOperation(bindingOp);
View Full Code Here

            // Create output
            createOutput(operation, wsdlBindingOperation);
            // Create faults
            Collection faults = wsdlOperation.getFaults().values();
            for (Iterator itFault = faults.iterator(); itFault.hasNext();) {
                Fault fault = (Fault) itFault.next();
                createFault(operation, wsdlBindingOperation.getBindingFaults().get(fault.getName()));
            }
            // Add operation
            binding.addOperation(operation);
        }
       
View Full Code Here

                    String faultName = e.getLocalName();
                    String partName = BPEComponent.PART_PAYLOAD;
                    QName elemName = new QName(e.getNamespaceURI(), e.getLocalName());
                    if (wsdlOperation != null) {
                        for (Iterator itFault = wsdlOperation.getFaults().values().iterator(); itFault.hasNext();) {
                            Fault f = (Fault) itFault.next();
                            Part p = (Part) f.getMessage().getParts().values().iterator().next();
                            if (elemName.equals(p.getTypeName())) {
                                faultName = f.getName();
                                partName = p.getName();
                            }
                        }
                    }
                    BPRuntimeException bpre = new BPRuntimeException(faultName, "");
View Full Code Here

                out.addExtensibilityElement(body);
            }
            bindingOp.setBindingOutput(out);
        }
        for (Iterator<?> itf = operation.getFaults().values().iterator(); itf.hasNext();) {
            Fault fault = (Fault) itf.next();
            BindingFault bindingFault = def.createBindingFault();
            bindingFault.setName(fault.getName());
            if (soap11) {
                SOAPFault soapFault = new SOAPFaultImpl();
                soapFault.setUse("literal");
                soapFault.setName(fault.getName());
                bindingFault.addExtensibilityElement(soapFault);
            } else {
                SOAP12Fault soapFault = new SOAP12FaultImpl();
                soapFault.setUse("literal");
                soapFault.setName(fault.getName());
                bindingFault.addExtensibilityElement(soapFault);
            }
            bindingOp.addBindingFault(bindingFault);
        }
        return bindingOp;
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.