/** * 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
o = portType.getExtensionAttribute(POLICY_REQUIRES); } catch (NoSuchMethodError e) {
o = portType.getExtensionAttribute(POLICY_REQUIRES); } catch (NoSuchMethodError e) {
/** * 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
public void process(Resource resource, IntrospectionContext context) throws InstallException { Definition definition = resolveLocalWsdl(resource); // Process callbacks here (as opposed to eagerly in #index(..) since the SCA callback attribute may reference a portType in another document. // Processing at this point guarantees the callback portType will be indexed and referenceable. for (ResourceElement<?, ?> element : resource.getResourceElements()) { if (element.getSymbol() instanceof WsdlServiceContractSymbol) { WsdlServiceContract contract = (WsdlServiceContract) element.getValue(); PortType portType = contract.getPortType(); QName callbackPortTypeName = (QName) portType.getExtensionAttribute(CALLBACK_ATTRIBUTE); if (callbackPortTypeName != null) { PortType callbackPortType = definition.getPortType(callbackPortTypeName); if (callbackPortType != null) { resolveLocalCallbackContract(callbackPortTypeName, contract, resource, context); } else { resolveExternalCallbackContract(callbackPortTypeName, contract, context); } } } } resource.setState(ResourceState.PROCESSED); }