public WSDLDefinition read(URL contributionURL, URI artifactURI, URL artifactURL, ProcessorContext context) throws ContributionReadException { try { WSDLDefinition definition = indexRead(artifactURL); definition.setURI(artifactURI); return definition; } catch (Exception e) { ContributionReadException ce = new ContributionReadException(e); error(context.getMonitor(), "ContributionReadException", artifactURL, ce); //throw ce; return null; } }
/** * Unmarshals the requires extension element from XML */ @SuppressWarnings("unchecked") public ExtensibilityElement unmarshall(Class theClass, QName elementType, Element theElement, Definition def, ExtensionRegistry extReg) throws WSDLException { // Check that this elementType really is a requires element if( !elementType.getLocalPart().equals("requires") ){ return null; } RequiresExt requires = new RequiresExt(); requires.setElementType(elementType); String intents = theElement.getAttribute("intents"); String[] intentArray = intents.split(" +"); for (int i=0; i < intentArray.length; i++){ String intentNameString = intentArray[i]; QName intentQName = getQNameValue( def, intentNameString); requires.getIntents().add(intentQName); } return requires; }
Map<String, String> wsdlImports = indexRead(artifactURL); wsdlImports.putAll(wsdlDef.getWsdliLocations()); WSDLLocatorImpl locator = new WSDLLocatorImpl(context, artifactURL, is, wsdlImports); Definition definition = reader.readWSDL(locator); wsdlDef.setDefinition(definition); resolved = resolveImports(WSDLDefinition.class, wsdlDefinition, context); if (!resolved.isUnresolved()) { if (resolved.getImportedDefinitions().isEmpty()) { readInlineSchemas(wsdlDef, definition, context); } catch (WSDLException e) { throw new ContributionReadException(e);
wsdlExtensionRegistry.registerExtensionAttributeType(PortType.class, Q_CALLBACK_ATTRIBUTE_EXTENSION, AttributeExtensible.QNAME_TYPE); serializer = new PolicyExtensionHandler(); deserializer = new PolicyExtensionHandler(); wsdlExtensionRegistry.registerSerializer(PortType.class, Q_POLICY_ELEMENT_EXTENSION, serializer); wsdlExtensionRegistry.registerDeserializer(PortType.class, Q_POLICY_ELEMENT_EXTENSION, deserializer); serializer = new BPELExtensionHandler(); deserializer = new BPELExtensionHandler(); wsdlExtensionRegistry.registerSerializer(Definition.class, BPEL_PLINKTYPE, serializer); wsdlExtensionRegistry.registerDeserializer(Definition.class, BPEL_PLINKTYPE, deserializer);
wsdlInterfaceContract.setLocation(location); String uri = getURIString(reader, INTERFACE); if (uri != null) { WSDLInterface wsdlInterface = createWSDLInterface(uri, monitor); if (wsdlInterface != null) wsdlInterfaceContract.setInterface(wsdlInterface); uri = getURIString(reader, CALLBACK_INTERFACE); if (uri != null) { WSDLInterface wsdlCallbackInterface = createWSDLInterface(uri, monitor); if (wsdlCallbackInterface != null) wsdlInterfaceContract.setCallbackInterface(wsdlCallbackInterface);
list.add(unresolved); map.put(unresolved.getNamespace(), list); resolved = aggregate(list, context); WSDLDefinition wsdlDefinition = (WSDLDefinition)artifact.getModel(); if (wsdlDefinition.getDefinition() == null) { loadDefinition(wsdlDefinition, context);
/** * Process an extension @callback attribute on a WSDL portType declaration * - the callback attribute must contain the QName of another portType * @param portType the portType * @return */ private WSDLInterface processCallbackAttribute( PortType portType, ModelResolver resolver, Monitor monitor ) { Object o = portType.getExtensionAttribute(CALLBACK_ATTRIBUTE); if(o != null && o instanceof QName) { WSDLInterface wsdlInterface = wsdlFactory.createWSDLInterface(); wsdlInterface.setUnresolved(true); wsdlInterface.setName( (QName)o ); wsdlInterface = WSDLInterfaceProcessor.resolveWSDLInterface( wsdlInterface, resolver, monitor, wsdlFactory ); return wsdlInterface; } else { return null; } // end if } // end method processCallbackAttribute
QName rolePortType = getQNameValue( def, portType ); theExtension.setRole( i, roleName, rolePortType );
loadDefinition(d, context); return d; loadDefinition(d, context);
Map<String, String> wsdlImports = indexRead(artifactURL); wsdlImports.putAll(wsdlDef.getWsdliLocations()); WSDLLocatorImpl locator = new WSDLLocatorImpl(context, artifactURL, is, wsdlImports); Definition definition = reader.readWSDL(locator); wsdlDef.setDefinition(definition); resolved = resolveImports(WSDLDefinition.class, wsdlDefinition, context); if (!resolved.isUnresolved()) { if (resolved.getImportedDefinitions().isEmpty()) { readInlineSchemas(wsdlDef, definition, context); } catch (WSDLException e) { throw new ContributionReadException(e);
public WSDLDefinition read(URL contributionURL, URI artifactURI, URL artifactURL, ProcessorContext context) throws ContributionReadException { try { WSDLDefinition definition = indexRead(artifactURL); definition.setURI(artifactURI); return definition; } catch (Exception e) { ContributionReadException ce = new ContributionReadException(e); error(context.getMonitor(), "ContributionReadException", artifactURL, ce); //throw ce; return null; } }
wsdlExtensionRegistry.registerExtensionAttributeType(PortType.class, Q_CALLBACK_ATTRIBUTE_EXTENSION, AttributeExtensible.QNAME_TYPE); serializer = new PolicyExtensionHandler(); deserializer = new PolicyExtensionHandler(); wsdlExtensionRegistry.registerSerializer(PortType.class, Q_POLICY_ELEMENT_EXTENSION, serializer); wsdlExtensionRegistry.registerDeserializer(PortType.class, Q_POLICY_ELEMENT_EXTENSION, deserializer); serializer = new BPELExtensionHandler(); deserializer = new BPELExtensionHandler(); wsdlExtensionRegistry.registerSerializer(Definition.class, BPEL_PLINKTYPE, serializer); wsdlExtensionRegistry.registerDeserializer(Definition.class, BPEL_PLINKTYPE, deserializer);
wsdlInterfaceContract.setLocation(location); String uri = getURIString(reader, INTERFACE); if (uri != null) { WSDLInterface wsdlInterface = createWSDLInterface(uri, monitor); if (wsdlInterface != null) wsdlInterfaceContract.setInterface(wsdlInterface); uri = getURIString(reader, CALLBACK_INTERFACE); if (uri != null) { WSDLInterface wsdlCallbackInterface = createWSDLInterface(uri, monitor); if (wsdlCallbackInterface != null) wsdlInterfaceContract.setCallbackInterface(wsdlCallbackInterface);
list.add(unresolved); map.put(unresolved.getNamespace(), list); resolved = aggregate(list, context); WSDLDefinition wsdlDefinition = (WSDLDefinition)artifact.getModel(); if (wsdlDefinition.getDefinition() == null) { loadDefinition(wsdlDefinition, context);
/** * Process an extension @callback attribute on a WSDL portType declaration * - the callback attribute must contain the QName of another portType * @param portType the portType * @return */ private WSDLInterface processCallbackAttribute( PortType portType, ModelResolver resolver, Monitor monitor ) { Object o = portType.getExtensionAttribute(CALLBACK_ATTRIBUTE); if(o != null && o instanceof QName) { WSDLInterface wsdlInterface = wsdlFactory.createWSDLInterface(); wsdlInterface.setUnresolved(true); wsdlInterface.setName( (QName)o ); wsdlInterface = WSDLInterfaceProcessor.resolveWSDLInterface( wsdlInterface, resolver, monitor, wsdlFactory ); return wsdlInterface; } else { return null; } // end if } // end method processCallbackAttribute
/** * Unmarshals the requires extension element from XML */ @SuppressWarnings("unchecked") public ExtensibilityElement unmarshall(Class theClass, QName elementType, Element theElement, Definition def, ExtensionRegistry extReg) throws WSDLException { // Check that this elementType really is a requires element if( !elementType.getLocalPart().equals("requires") ){ return null; } RequiresExt requires = new RequiresExt(); requires.setElementType(elementType); String intents = theElement.getAttribute("intents"); String[] intentArray = intents.split(" +"); for (int i=0; i < intentArray.length; i++){ String intentNameString = intentArray[i]; QName intentQName = getQNameValue( def, intentNameString); requires.getIntents().add(intentQName); } return requires; }
QName rolePortType = getQNameValue( def, portType ); theExtension.setRole( i, roleName, rolePortType );
loadDefinition(d, context); return d; loadDefinition(d, context);