/** * Create a WsdlOpFault from the Fault. * * @param fault * Fault to process. * @return WsdlOpFault Result of processing. */ @SuppressWarnings( "unchecked" ) private WsdlOpFault getFault( Fault fault ) throws KettleStepException { Message m = fault.getMessage(); // a fault should only have one message part. Map<?, Part> partMap = m.getParts(); if ( partMap.size() != 1 ) { throw new IllegalArgumentException( "Invalid part count for fault!!" ); } Part faultPart = partMap.values().iterator().next(); boolean complexType = false; // type of fault is specified either in Part's type or element attribute. QName type = faultPart.getTypeName(); if ( type == null ) { type = faultPart.getElementName(); Element schemaElement = _wsdlTypes.findNamedElement( type ); type = _wsdlTypes.getTypeQName( schemaElement.getAttribute( "type" ) ); complexType = true; } return new WsdlOpFault( fault.getName(), type, complexType, _wsdlTypes ); } }
/** * Add a fault message that must be associated with this * operation. * * @param fault the new fault message */ public void addFault(Fault fault) { faults.put(fault.getName(), fault); }
DOMUtils.printAttribute(Constants.ATTR_NAME, fault.getName(), pw);
/** * Add a fault message that must be associated with this * operation. * * @param fault the new fault message */ public void addFault(Fault fault) { faults.put(fault.getName(), fault); }
/** * Called after the {@link BindingFault} has been created. Subclasses can implement this method to define the name, * or add extensions to it. * * <p>Default implementation set the name of the binding fault to the name of the fault. * * @param bindingFault the WSDL4J {@code BindingFault} * @param fault the corresponding WSDL4J {@code Fault} @throws WSDLException in case of errors */ protected void populateBindingFault(Definition definition, BindingFault bindingFault, Fault fault) throws WSDLException { bindingFault.setName(fault.getName()); }
/** * Called after the {@link BindingFault} has been created. Subclasses can implement this method to define the name, * or add extensions to it. * * <p>Default implementation set the name of the binding fault to the name of the fault. * * @param bindingFault the WSDL4J {@code BindingFault} * @param fault the corresponding WSDL4J {@code Fault} @throws WSDLException in case of errors */ protected void populateBindingFault(Definition definition, BindingFault bindingFault, Fault fault) throws WSDLException { bindingFault.setName(fault.getName()); }
/** * Called after the {@link BindingFault} has been created. Subclasses can implement this method to define the name, * or add extensions to it. * <p/> * Default implementation set the name of the binding fault to the name of the fault. * * @param bindingFault the WSDL4J <code>BindingFault</code> * @param fault the corresponding WSDL4J <code>Fault</code> @throws WSDLException in case of errors */ protected void populateBindingFault(Definition definition, BindingFault bindingFault, Fault fault) throws WSDLException { bindingFault.setName(fault.getName()); }
/** * Called after the {@link BindingFault} has been created. Subclasses can implement this method to define the name, * or add extensions to it. * * <p>Default implementation set the name of the binding fault to the name of the fault. * * @param bindingFault the WSDL4J {@code BindingFault} * @param fault the corresponding WSDL4J {@code Fault} @throws WSDLException in case of errors */ protected void populateBindingFault(Definition definition, BindingFault bindingFault, Fault fault) throws WSDLException { bindingFault.setName(fault.getName()); }
private void addSoapFaults(Operation op, BindingOperation bindingOperation) throws ToolException { Map faults = op.getFaults(); Iterator it = faults.keySet().iterator(); while (it.hasNext()) { String key = (String)it.next(); Fault fault = (Fault)faults.get(key); BindingFault bf = wsdlDefinition.createBindingFault(); bf.setName(fault.getName()); setSoapFaultExtElement(bf); bindingOperation.addBindingFault(bf); } }
protected void visit(Fault fault) { Part message = fault.getMessage().getPart("message"); if (message == null) { context.addFailure(new ValidationFailure("The fault message must contain one part named 'message' : " + fault.getName())); } else if (!XSD_STRING.equals(message.getTypeName())) { context.addFailure(new ValidationFailure("The fault message must contain one part of type 'xsd:string' : " + fault.getName())); } }
protected void visit(Fault fault) { Part message = fault.getMessage().getPart("message"); if (message == null) { context.addFailure(new ValidationFailure("The fault message must contain one part named 'message' : " + fault.getName())); } else if (!XSD_STRING.equals(message.getTypeName())) { context.addFailure(new ValidationFailure("The fault message must contain one part of type 'xsd:string' : " + fault.getName())); } }
protected void visit(final Fault fault) { final Part message = fault.getMessage().getPart("message"); if (message == null) { context.addFailure(new ValidationFailure("The fault message must contain one part named 'message' : " + fault.getName())); } else if (!XSD_STRING.equals(message.getTypeName())) { context.addFailure(new ValidationFailure("The fault message must contain one part of type 'xsd:string' : " + fault.getName())); } }
protected void visit(Fault fault) { Part message = fault.getMessage().getPart("message"); if (message == null) { context.addFailure(new ValidationFailure("The fault message must contain one part named 'message' : " + fault.getName())); } else if (!XSD_STRING.equals(message.getTypeName())) { context.addFailure(new ValidationFailure("The fault message must contain one part of type 'xsd:string' : " + fault.getName())); } }
private void addSoapFaults(Operation op, BindingOperation bindingOperation) throws ToolException { Map<String, Fault> faults = CastUtils.cast(op.getFaults()); for (Fault fault : faults.values()) { BindingFault bf = wsdlDefinition.createBindingFault(); bf.setName(fault.getName()); setSoapFaultExtElement(bf); bindingOperation.addBindingFault(bf); } }
private static void addSoapFaults(Operation op, BindingOperation bindingOperation, Definition wsdlDefinition, ExtensionRegistry extReg) throws Exception { Map<String, Fault> faults = CastUtils.cast(op.getFaults()); for (Fault fault : faults.values()) { BindingFault bf = wsdlDefinition.createBindingFault(); bf.setName(fault.getName()); setSoapFaultExtElement(bf, extReg); bindingOperation.addBindingFault(bf); } }
private static void addSoapFaults(Operation op, BindingOperation bindingOperation, Definition wsdlDefinition, ExtensionRegistry extReg) throws Exception { Map<String, Fault> faults = CastUtils.cast(op.getFaults()); for (Fault fault : faults.values()) { BindingFault bf = wsdlDefinition.createBindingFault(); bf.setName(fault.getName()); setSoapFaultExtElement(bf, extReg); bindingOperation.addBindingFault(bf); } }
private static void addSoapFaults(Operation op, BindingOperation bindingOperation, Definition wsdlDefinition, ExtensionRegistry extReg) throws Exception { Map<String, Fault> faults = CastUtils.cast(op.getFaults()); for (Fault fault : faults.values()) { BindingFault bf = wsdlDefinition.createBindingFault(); bf.setName(fault.getName()); setSoapFaultExtElement(bf, extReg); bindingOperation.addBindingFault(bf); } }
private void addSoapFaults(Operation op, BindingOperation bindingOperation) throws ToolException { Map<String, Fault> faults = CastUtils.cast(op.getFaults()); for (Fault fault : faults.values()) { BindingFault bf = wsdlDefinition.createBindingFault(); bf.setName(fault.getName()); setSoapFaultExtElement(bf); bindingOperation.addBindingFault(bf); } }
protected void configureBindingFault(BindingFault bindingFault, ExtensibilityElement faultExtension, Fault fault) throws WSDLException { String faultName = fault.getName(); bindingFault.setName(faultName); if (requiresSOAP12) { ((SOAP12Fault)faultExtension).setName(faultName); ((SOAP12Fault)faultExtension).setUse("literal"); } else { ((SOAPFault)faultExtension).setName(faultName); ((SOAPFault)faultExtension).setUse("literal"); } }
protected void visit(Fault fault) { FaultInfo faultInfo = opInfo.addFault(fault.getName()); faultInfo.setMessageName(fault.getMessage().getQName()); if(fault.getDocumentationElement()!= null ){ faultInfo.setDocumentation(fault.getDocumentationElement().getNodeValue());//TextContent()); } wfault2msg.put(fault, faultInfo); createMessageParts(faultInfo, fault.getMessage()); }