Examples of WSDLInterfaceContract


Examples of org.apache.tuscany.sca.interfacedef.wsdl.WSDLInterfaceContract

     */
    private Reference generateReference( String name, PortType myRolePT,
        PortType partnerRolePT, Collection<WSDLInterface> theInterfaces) throws ContributionResolveException {
       
        Reference reference = assemblyFactory.createReference();
        WSDLInterfaceContract interfaceContract = wsdlFactory.createWSDLInterfaceContract();
        reference.setInterfaceContract(interfaceContract);

        // Establish whether there is just a call interface or a call + callback
        // interface
        PortType callPT = null;
View Full Code Here

Examples of org.apache.tuscany.sca.interfacedef.wsdl.WSDLInterfaceContract

     */
    private Service generateService( String name, PortType myRolePT,
        PortType partnerRolePT, Collection<WSDLInterface> theInterfaces )
        throws ContributionResolveException {
        Service service = assemblyFactory.createService();
        WSDLInterfaceContract interfaceContract = wsdlFactory.createWSDLInterfaceContract();
        service.setInterfaceContract(interfaceContract);

        // Set the name of the service to the supplied name
        service.setName(name);

View Full Code Here

Examples of org.apache.tuscany.sca.interfacedef.wsdl.WSDLInterfaceContract

                  ContributionResolveException ce = new ContributionResolveException("WSDL binding operation output name " + operation.getOutput().getName() + " does not match with PortType Definition");
                        error("ContributionResolveException", wsdlDefinition, ce);
                }
              }             
             
                WSDLInterfaceContract interfaceContract = wsdlFactory.createWSDLInterfaceContract();
                WSDLInterface wsdlInterface = null;
                try {
                    wsdlInterface = wsdlFactory.createWSDLInterface(portType, wsdlDefinition, resolver);
                    interfaceContract.setInterface(wsdlInterface);
                    model.setBindingInterfaceContract(interfaceContract);
                } catch (InvalidInterfaceException e) {
                  warning("InvalidInterfaceException", wsdlFactory, model.getName());
                }
            }
View Full Code Here

Examples of org.apache.tuscany.sca.interfacedef.wsdl.WSDLInterfaceContract

        return wsdlInterface;
    }

    public WSDLInterfaceContract read(XMLStreamReader reader) throws ContributionReadException, XMLStreamException {
        // Read an <interface.wsdl>
        WSDLInterfaceContract wsdlInterfaceContract = wsdlFactory.createWSDLInterfaceContract();
       
        // Read wsdlLocation
        String location = reader.getAttributeValue(WSDLI_NS, WSDL_LOCATION);
        wsdlInterfaceContract.setLocation(location);
       
        String uri = reader.getAttributeValue(null, INTERFACE);
        if (uri != null) {
            WSDLInterface wsdlInterface = createWSDLInterface(uri);
            if (wsdlInterface != null)
                wsdlInterfaceContract.setInterface(wsdlInterface);
        }
       
        uri = reader.getAttributeValue(null, CALLBACK_INTERFACE);
        if (uri != null) {
            WSDLInterface wsdlCallbackInterface = createWSDLInterface(uri);
            if (wsdlCallbackInterface != null)
                wsdlInterfaceContract.setCallbackInterface(wsdlCallbackInterface);
        }
       
        // Handle extended attributes
        for (int a = 0; a < reader.getAttributeCount(); a++) {
            QName attributeName = reader.getAttributeName(a);
            if( attributeName.getNamespaceURI() != null && attributeName.getNamespaceURI().length() > 0) {
                if( (! Constants.SCA10_NS.equals(attributeName.getNamespaceURI()) &&
                    (! Constants.SCA10_TUSCANY_NS.equals(attributeName.getNamespaceURI()) ))) {
                    Object attributeValue = extensionAttributeProcessor.read(attributeName, reader);
                    Extension attributeExtension;
                    if (attributeValue instanceof Extension) {
                        attributeExtension = (Extension) attributeValue;
                    } else {
                        attributeExtension = extensionFactory.createExtension(attributeName, attributeValue, true);
                    }
                    wsdlInterfaceContract.getAttributeExtensions().add(attributeExtension);
                }
            }
        }               
           
        // Skip to end element
View Full Code Here

Examples of org.apache.tuscany.sca.interfacedef.wsdl.WSDLInterfaceContract

     */
    private Reference generateReference( String name, PortType myRolePT,
        PortType partnerRolePT, Collection<WSDLInterface> theInterfaces, Monitor monitor) throws ContributionResolveException {
       
        Reference reference = assemblyFactory.createReference();
        WSDLInterfaceContract interfaceContract = wsdlFactory.createWSDLInterfaceContract();
        reference.setInterfaceContract(interfaceContract);

        // Establish whether there is just a call interface or a call + callback interface
        PortType callPT = null;
        PortType callbackPT = null;
View Full Code Here

Examples of org.apache.tuscany.sca.interfacedef.wsdl.WSDLInterfaceContract

     */
    private Service generateService( String name, PortType myRolePT,
        PortType partnerRolePT, Collection<WSDLInterface> theInterfaces, Monitor monitor )
        throws ContributionResolveException {
        Service service = assemblyFactory.createService();
        WSDLInterfaceContract interfaceContract = wsdlFactory.createWSDLInterfaceContract();
        service.setInterfaceContract(interfaceContract);

        // Set the name of the service to the supplied name
        service.setName(name);

View Full Code Here

Examples of org.apache.tuscany.sca.interfacedef.wsdl.WSDLInterfaceContract

            JavaInterface javaInterface = (JavaInterface)javaInterfaceContract.getInterface();
            if (javaInterface.isUnresolved()){            
                extensionProcessor.resolve(javaInterfaceContract, resolver, context);
            }
           
            WSDLInterfaceContract wsdlInterfaceContract = (WSDLInterfaceContract)javaInterfaceContract.getNormalizedWSDLContract();
            if(wsdlInterfaceContract != null){
                // The user has explicitly associated a WSDL with the Java implementation
                // using a @WebService(wsdlLocation="...") annotation
                WSDLInterface wsdlInterface = (WSDLInterface)wsdlInterfaceContract.getInterface();
                if (wsdlInterface.isUnresolved()){
                    //WSDLDefinition resolved = resolver.resolveModel(WSDLDefinition.class, wsdlInterface.getWsdlDefinition(), context);
                    extensionProcessor.resolve(wsdlInterfaceContract, resolver, context);
                   
                    // check that the Java and WSDL contracts are compatible
                    interfaceContractMapper.checkCompatibility(wsdlInterfaceContract,
                                                               javaInterfaceContract,
                                                               Compatibility.SUBSET,
                                                               false,
                                                               false);
                   
                    // retrieve the resolved WSDL interface
                    wsdlInterface = (WSDLInterface)wsdlInterfaceContract.getInterface();
                   
                    // copy policy from the WSDL interface to the Java interface
                    javaInterface.getPolicySets().addAll(wsdlInterface.getPolicySets());
                    javaInterface.getRequiredIntents().addAll(wsdlInterface.getRequiredIntents());
                   
View Full Code Here

Examples of org.apache.tuscany.sca.interfacedef.wsdl.WSDLInterfaceContract

        DefaultDataBindingExtensionPoint dataBindings = new DefaultDataBindingExtensionPoint(registry);
        JAXWSFaultExceptionMapper faultExceptionMapper = new JAXWSFaultExceptionMapper(dataBindings, null);
        new JAXWSJavaInterfaceProcessor(registry).visitInterface(iface);
        new DataBindingJavaInterfaceProcessor(registry).visitInterface(iface);
        javaIC.setInterface(iface);
        WSDLInterfaceContract wsdlIC = BindingWSDLGenerator.createWSDLInterfaceContract(javaIC, false, new XSDModelResolver(null, null), dataBindings, wsdlFactory, xsdFactory, documentBuilderFactory, null);
        assertNotNull(wsdlIC);
       
        UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class);
        InterfaceContractMapper interfaceContractMapper = utilities.getUtility(InterfaceContractMapper.class);
View Full Code Here

Examples of org.apache.tuscany.sca.interfacedef.wsdl.WSDLInterfaceContract

        getComponent().getServices().add(service);
       
        // if the reference has a WSDL contract reset the response endpoint to be WSDL also
        InterfaceContract referenceInterfaceContract = getComponentTypeReferenceInterfaceContract();
        if (referenceInterfaceContract instanceof WSDLInterfaceContract){
            WSDLInterfaceContract wsdlInterfaceContract = (WSDLInterfaceContract)endpoint.getGeneratedWSDLContract(interfaceContract);
            service.setInterfaceContract(wsdlInterfaceContract);
        }        

        // Create a binding
        // Mike had to go via the XML but I don't remember why
View Full Code Here

Examples of org.apache.tuscany.sca.interfacedef.wsdl.WSDLInterfaceContract

     */
    public static WSDLInterfaceContract createWSDLInterfaceContract(ExtensionPointRegistry registry, String wsdl, String wsdlCallback) {
        FactoryExtensionPoint modelFactories = registry.getExtensionPoint(FactoryExtensionPoint.class);
        org.apache.tuscany.sca.interfacedef.wsdl.WSDLFactory wsdlFactory = modelFactories.getFactory(org.apache.tuscany.sca.interfacedef.wsdl.WSDLFactory.class);
       
        WSDLInterfaceContract wsdlInterfaceContract = wsdlFactory.createWSDLInterfaceContract();
        wsdlInterfaceContract.setInterface(createWSDLInterface(registry, wsdl));
        if (wsdlCallback != null && wsdlCallback.length() > 0){
            wsdlInterfaceContract.setCallbackInterface(createWSDLInterface(registry, wsdlCallback));
        }
       
        return wsdlInterfaceContract;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.