/** * 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 ); } }
Element schemaElement = _wsdlTypes.findNamedElement( p.getElementName() );
/** * Generate a WsdlOpParameter from the message part. * * @param part * A list of message part. * @param requesPart * true if part from request message. */ private List<WsdlOpParameter> getParameter( Part part, boolean requesPart ) throws KettleStepException { List<WsdlOpParameter> params = new ArrayList<WsdlOpParameter>(); if ( part.getElementName() != null ) { if ( WsdlUtils.isWrappedParameterStyle( _operation.getName(), !requesPart, part.getName() ) ) { _parameterStyle = WsdlOperation.SOAPParameterStyle.WRAPPED; } params.addAll( resolvePartElement( part ) ); } else { params.add( new WsdlOpParameter( part.getName(), part.getTypeName(), _wsdlTypes.findNamedType( part .getTypeName() ), _wsdlTypes ) ); } return params; }
part.getElementName(), def, pw);
private String getOperationNameWithSamePart(String operationName, Part part) { QName partQN = part.getElementName(); String opName = uniqueBodyPartsMap.get(partQN); if (opName == null) { uniqueBodyPartsMap.put(partQN, operationName); return null; } return opName; }
private String getOperationNameWithSamePart(String operationName, Part part) { QName partQN = part.getElementName(); String opName = uniqueBodyPartsMap.get(partQN); if (opName == null) { uniqueBodyPartsMap.put(partQN, operationName); return null; } return opName; }
private String getOperationNameWithSamePart(String operationName, Part part) { QName partQN = part.getElementName(); String opName = uniqueBodyPartsMap.get(partQN); if (opName == null) { uniqueBodyPartsMap.put(partQN, operationName); return null; } else { return opName; } }
private static XmlSchemaElement getElement(Part part, SchemaCollection xmlSchemaList) throws Exception { XmlSchemaElement schemaElement = null; for (XmlSchema xmlSchema : xmlSchemaList.getXmlSchemas()) { if (part.getElementName() != null) { schemaElement = findElement(xmlSchema, part.getElementName()); if (schemaElement != null) { return schemaElement; } } } return schemaElement; }
public static String resolvePartNamespace(Part part) { QName qname = part.getElementName(); if (qname == null) { qname = part.getTypeName(); } if (qname != null) { return qname.getNamespaceURI(); } else { return null; } }
public static String getPartType(Part part) { String typeName; if (part.getElementName() != null) { typeName = part.getElementName().getLocalPart(); } else if (part.getTypeName() != null) { typeName = part.getTypeName().getLocalPart(); } else { typeName = "BadType"; } return typeName; }
MetadataType buildPartMetadataType(Part part) throws MetadataResolvingException { if (part.getElementName() != null) { String partName = part.getElementName().toString(); return loader.load(partName) .orElseThrow(() -> new MetadataResolvingException(format("Could not load part element name [%s]", partName), UNKNOWN)); } throw new MetadataResolvingException("Trying to resolve metadata for a nameless part, probably the provided WSDL is invalid", INVALID_CONFIGURATION); }
public void checkMessages() { for (Iterator itMsg = definition.getMessages().values().iterator(); itMsg.hasNext();) { Message msg = (Message) itMsg.next(); for (Iterator it2 = msg.getParts().values().iterator(); it2.hasNext();) { Part p = (Part) it2.next(); if (p.getTypeName() != null && p.getElementName() != null) { error(Code.R2306, msg); } } } }
private boolean isOperationWithRequiredParameters(TypeLoader loader, Part part) { // Find the body type Optional<MetadataType> bodyType = loader.load(part.getElementName().toString()); if (bodyType.isPresent()) { Collection<ObjectFieldType> operationFields = SoapServiceMetadataTypeUtils.getOperationType(bodyType.get()).getFields(); return !operationFields.isEmpty(); } return false; }
private XmlSchemaElement getWrappedSchema(Message message) { Part part = (Part) message.getParts().values().iterator().next(); XmlSchemaElement schemaEl = schemas.getElementByQName(part.getElementName()); if (schemaEl.getSchemaType() instanceof XmlSchemaComplexType) return schemaEl; return null; }
public void visit(Part part, Object parent, WSDLTraversalContext ctx) { if (part.getElementName() != null && registry.getType(part.getElementName()) == null) { errors.add(ctx.getMessage().getQName()); ctx.cancelMessageProcessing(); } }
public OMessageVarType.Part apply(Part part) { OVarType partType; if (part.getElementName() != null) { partType = resolveElementType(part.getElementName()); } else { partType = resolveXsdType(part.getTypeName()); } OMessageVarType.Part opart = new OMessageVarType.Part(_oprocess, part.getName(), partType); opart.debugInfo = createDebugInfo(_processDef, "Message Variable Part: " + part.getName()); return opart; } });
private void checkPart(Part p, Binding b) { if (p != null && p.getElementName() == null) errors.add(b.getQName(), p.getName()); }
private XSDType getDataType(Part part, XmlSchemaCollection collection, PortType portType, IntrospectionContext context) { QName elementName = part.getElementName(); XSDType dataType = null; QName typeName = part.getTypeName(); if (elementName != null) { dataType = getElementDataType(elementName, collection, portType, context); } else if (typeName != null) { dataType = getSchemaDataType(typeName, collection, portType, context); } return dataType; }
public void visit(Part part, Object parent, WSDLTraversalContext ctx) { if (part.getElementName() != null && part.getTypeName() != null) { errors.add(ctx.getMessage().getQName()); ctx.cancelMessageProcessing(); } }
public void visit(Part part, Object parent, WSDLTraversalContext ctx) { if (part.getElementName() != null && part.getTypeName() != null) { errors.add(ctx.getMessage().getQName()); ctx.cancelMessageProcessing(); } }