Package javax.wsdl

Examples of javax.wsdl.Definition


  @Override
  protected void setUp() throws Exception
  {
    WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader();
    Definition wsdlDefinition = wsdlReader.readWSDL(WSDL_FILE);
    wsdlParser = new WSDLParser(wsdlDefinition);
  }
View Full Code Here


 
   public WSDLReference createWSDLReference(BPELEngineImpl engine, QName processId, QName serviceName, String portName)
    {
      File targetWSDLFile = findWSDLFile(engine, processId, serviceName, portName);
      Definition wsdlDefinition = getWSDLDefinition(engine, processId, serviceName);
      return new WSDLReference(wsdlDefinition, targetWSDLFile.toURI());
    }
View Full Code Here

        if(f.getName().endsWith(".wsdl"))
        {
          try
          {
            WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader();
            Definition def = wsdlReader.readWSDL(f.toURL().toExternalForm());
            URL url = new WSDLParser(def).getServiceLocationURL(serviceName, portName);
            if(url!=null && (def.getTargetNamespace().equals(serviceName.getNamespaceURI())))
            {
              targetWsdlFile = f;
              log.debug("Matching "+processId + " to WSDL file "+targetWsdlFile);
              break;
            }
View Full Code Here

    }
   
    private Definition getWSDLDefinition(BPELEngineImpl engine, QName processId, QName serviceName)
    {
      ProcessConf pconf = engine._store.getProcessConfiguration(processId);
      Definition wsdl = pconf.getDefinitionForService(serviceName);
      if (wsdl == null)
        throw new ContextException("Unable to access WSDL definition to activate MyRole endpoint for service " + serviceName
            + " on process "+ processId);

      return wsdl;
View Full Code Here

        MockHttpServletResponse response = new MockHttpServletResponse();
        exporter.handleRequest(request, response);
        InputSource source = new InputSource(new ByteArrayInputStream(response.getContentAsByteArray()));
        WSDLFactory factory = WSDLFactory.newInstance();
        WSDLReader reader = factory.newWSDLReader();
        Definition definition = reader.readWSDL("", source);
        Service service = definition.getService(new QName(namespace, name));
        assertNotNull(service);
        assertEquals(namespace, service.getQName().getNamespaceURI());
        // The service name should be equal to th
        assertEquals(name, service.getQName().getLocalPart());
        Binding binding = definition.getBinding(new QName(namespace, "EchoServiceHttpBinding"));
        assertNotNull(binding);
        SOAPBinding soapBinding = (SOAPBinding) binding.getExtensibilityElements().get(0);
        assertNotNull(soapBinding);
        assertEquals(SoapConstants.STYLE_DOCUMENT, soapBinding.getStyle());
    }
View Full Code Here

    public void testImports() throws Exception
    {
    }
    public void xtestImports() throws Exception
    {
        Definition d = WSDLFactory.newInstance().newWSDLReader().readWSDL(
            new ResolverWSDLLocator(null, new InputSource(getClass().getResourceAsStream("echoImport.wsdl"))));
       
        assertNotNull(d);
    }
View Full Code Here

        getServiceRegistry().register(service);
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        getXFire().generateWSDL(service.getSimpleName(), baos);
        System.out.println(baos.toString());
        InputSource is = new InputSource(new ByteArrayInputStream(baos.toByteArray()));
      Definition def = WSDLFactory.newInstance().newWSDLReader().readWSDL(null, is);
      javax.wsdl.Service wsdlSvc = def.getService(new QName("urn:EchoTest", "EchoTest"));
      assertNotNull(def.getPortType(new QName("urn:EchoInterface", "Echo")));
    }
View Full Code Here

        synchronized (definitionsMap) {
            if (definitionsMap.containsKey(url)) {
                return definitionsMap.get(url);
            }
        }
        Definition def = loadDefinition(url.toString());
        synchronized (definitionsMap) {
            definitionsMap.put(url, def);
        }
        return def;
    }
View Full Code Here

            }
        }
        WSDLReader reader = factory.newWSDLReader();
        reader.setFeature("javax.wsdl.verbose", false);
        reader.setExtensionRegistry(registry);
        Definition def = reader.readWSDL(null, el);
        synchronized (definitionsMap) {
            definitionsMap.put(el, def);
        }
        return def;
    }
View Full Code Here

        synchronized (definitionsMap) {
            if (definitionsMap.containsKey(sei)) {
                return definitionsMap.get(sei);
            }
        }
        Definition def = null;
        try {
            def = createDefinition(sei);
        } catch (Exception ex) {           
            throw new WSDLException(WSDLException.PARSER_ERROR, ex.getMessage());
        }
View Full Code Here

TOP

Related Classes of javax.wsdl.Definition

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.