Package org.apache.cxf.wsdl

Examples of org.apache.cxf.wsdl.WSDLManager


                                                           Map<QName, String> attributes) {
        //CHECKSTYLE:ON
        if (serviceName != null && portName != null
            && wsdlDocumentLocation != null && interfaceName == null) {
            Bus bus = BusFactory.getThreadDefaultBus();
            WSDLManager wsdlManager = bus.getExtension(WSDLManager.class);         
            try {
                Definition def = wsdlManager.getDefinition(wsdlDocumentLocation);
                interfaceName = def.getService(serviceName).getPort(portName.getLocalPart()).getBinding()
                    .getPortType().getQName();
            } catch (Exception e) {
                // do nothing
            }
View Full Code Here


        try {
            W3CEndpointReference w3cEpr = callbackObject.getCallback();
           
            EndpointReferenceType callback = ProviderImpl.convertToInternal(w3cEpr);

            WSDLManager manager = new WSDLManagerImpl();
       
            QName interfaceName = EndpointReferenceUtils.getInterfaceName(callback, bus);
            String wsdlLocation = EndpointReferenceUtils.getWSDLLocation(callback);
            QName serviceName = EndpointReferenceUtils.getServiceName(callback, bus);
            String address = EndpointReferenceUtils.getAddress(callback);
           
            String portString = EndpointReferenceUtils.getPortName(callback);
           
            QName portName = new QName(serviceName.getNamespaceURI(), portString);
           
            StringBuffer seiName = new StringBuffer();
            seiName.append(JAXBUtils.namespaceURIToPackage(interfaceName.getNamespaceURI()));
            seiName.append(".");
            seiName.append(JAXBUtils.nameToIdentifier(interfaceName.getLocalPart(),
                                                      JAXBUtils.IdentifierType.INTERFACE));
           
            Class<?> sei = null;
            try {
                sei = Class.forName(seiName.toString(),
                                    true, manager.getClass().getClassLoader());
            } catch (ClassNotFoundException ex) {
                ex.printStackTrace();
            }
           
            URL wsdlURL = new URL(wsdlLocation);           
View Full Code Here

    }

    @SuppressWarnings("unchecked")
    protected void parseWSDL(String wsdlURL) {
        try {
            WSDLManager mgr = bus.getExtension(WSDLManager.class);
            registerWSDLExtensibilityPlugins(mgr.getExtensionRegistry());
            wsdlDefinition = mgr.getDefinition(wsdlURL);

            parseImports(wsdlDefinition);

            if (wsdlDefinition.getServices().isEmpty()) {
                for (Definition def : importedDefinitions) {
View Full Code Here

    public void testEmptyWsdlAndNoServiceClass() throws Exception {
        final String dummyWsdl = "target/dummy.wsdl";
        ReflectionServiceFactoryBean bean = new ReflectionServiceFactoryBean();
        Bus bus = control.createMock(Bus.class);
       
        WSDLManager wsdlmanager = control.createMock(WSDLManager.class);
        EasyMock.expect(bus.getExtension(WSDLManager.class)).andReturn(wsdlmanager);
        EasyMock.expect(wsdlmanager.getDefinition(dummyWsdl))
            .andThrow(new WSDLException("PARSER_ERROR", "Problem parsing '" + dummyWsdl + "'."));
        EasyMock.expect(bus.getExtension(FactoryBeanListenerManager.class)).andReturn(null);
       
        control.replay();
       
View Full Code Here

        WSDLDefinitionBuilder builder = new WSDLDefinitionBuilder(bus);
        wsdlDefinition = builder.build(wsdlURL);
        if (env.fullValidateWSDL()) {
            validate(wsdlDefinition, env, bus);
        }
        WSDLManager mgr = bus.getExtension(WSDLManager.class);
        mgr.removeDefinition(wsdlDefinition);
       
        wsdlFactory = mgr.getWSDLFactory();
        extReg = mgr.getExtensionRegistry();
        wsdlPlugins = builder.getWSDLPlugins();
    }
View Full Code Here

*/
@NoJSR250Annotations
public final class AddressingWSDLExtensionLoader implements WSDLExtensionLoader {
   
    public AddressingWSDLExtensionLoader(Bus b) {
        WSDLManager manager = b.getExtension(WSDLManager.class);
       
        createExtensor(manager, javax.wsdl.Binding.class,
                       org.apache.cxf.ws.addressing.wsdl.UsingAddressing.class);       
    }
View Full Code Here

*/
@NoJSR250Annotations
public final class JMSWSDLExtensionLoader implements WSDLExtensionLoader {
   
    public JMSWSDLExtensionLoader(Bus b) {
        WSDLManager manager = b.getExtension(WSDLManager.class);
       
        createExtensor(manager, javax.wsdl.Port.class,
                       org.apache.cxf.transport.jms.AddressType.class);
        createExtensor(manager, javax.wsdl.Port.class,
                       org.apache.cxf.transport.jms.ClientBehaviorPolicyType.class);
View Full Code Here

*/
@NoJSR250Annotations
public final class HTTPWSDLExtensionLoader implements WSDLExtensionLoader {
   
    public HTTPWSDLExtensionLoader(Bus b) {
        WSDLManager manager = b.getExtension(WSDLManager.class);
       
        createExtensor(manager, javax.wsdl.Port.class,
                       org.apache.cxf.transports.http.configuration.HTTPClientPolicy.class);
        createExtensor(manager, javax.wsdl.Port.class,
                       org.apache.cxf.transports.http.configuration.HTTPServerPolicy.class);
View Full Code Here


    private void createSoapBinding(final SoapBindingInfo bi) throws WSDLException {
        boolean isSoap12 = bi.getSoapVersion() instanceof Soap12;
        Bus bs = getBus();
        WSDLManager m = bs.getExtension(WSDLManager.class);
        ExtensionRegistry extensionRegistry = m.getExtensionRegistry();

        SoapBinding soapBinding = SOAPBindingUtil.createSoapBinding(extensionRegistry, isSoap12);
        soapBinding.setStyle(bi.getStyle());
        soapBinding.setTransportURI(bi.getTransportURI());
        bi.addExtensor(soapBinding);
View Full Code Here

        String wsdlURL = (String)context.get(ToolConstants.CFG_WSDLURL);
        return build(wsdlURL);
    }

    public Definition build(String wsdlURL) {
        WSDLManager mgr = bus.getExtension(WSDLManager.class);
        registerJaxwsExtension(mgr.getExtensionRegistry());
       
        WSDLDefinitionBuilder builder = new WSDLDefinitionBuilder(this.bus);
        wsdlDefinition = builder.build(wsdlURL);
        context.put(Bus.class, bus);
        context.put(ToolConstants.IMPORTED_DEFINITION, builder.getImportedDefinitions());
View Full Code Here

TOP

Related Classes of org.apache.cxf.wsdl.WSDLManager

Copyright © 2018 www.massapicom. 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.