Package org.jboss.ws.metadata.wsdl

Examples of org.jboss.ws.metadata.wsdl.WSDLTypes


   
    WSDLDefinitionsFactory factory = WSDLDefinitionsFactory.newInstance();
    WSDLDefinitions wsdlDefinitions = factory.parse(wsdlFile.toURL());
    
    // check if the schema has been extracted
    WSDLTypes wsdlTypes = wsdlDefinitions.getWsdlTypes();
    assertNotNull(WSDLUtils.getSchemaModel(wsdlTypes));
  }
View Full Code Here


      WSDLDefinitionsFactory factory = WSDLDefinitionsFactory.newInstance();
      WSDLDefinitions wsdlDefinitions = factory.parse(wsdlFile.toURL());
      WSDLInterface wsdlInterface = wsdlDefinitions.getInterface(new QName(wsdlDefinitions.getTargetNamespace(), "JaxRpcTestService"));

      // check if the schema has been extracted
      WSDLTypes wsdlTypes = wsdlDefinitions.getWsdlTypes();
      assertNotNull(WSDLUtils.getSchemaModel(wsdlTypes));

      // check the echoString operation
      WSDLInterfaceOperation wsdlOperation = wsdlInterface.getOperation("echoString");
      assertEquals(Constants.URI_STYLE_DOCUMENT, wsdlOperation.getStyle());

      WSDLInterfaceOperationInput wsdlInput = wsdlOperation.getInput(new QName(TARGET_NAMESPACE, "echoString"));
      assertEquals(new QName(TARGET_NAMESPACE, "echoString"), wsdlInput.getXMLType());
      WSDLInterfaceOperationOutput wsdlOutput = wsdlOperation.getOutput(new QName(TARGET_NAMESPACE, "echoStringResponse"));
      assertEquals(new QName(TARGET_NAMESPACE, "echoStringResponse"), wsdlOutput.getXMLType());

      // check the echoSimpleUserType operation
      wsdlOperation = wsdlInterface.getOperation("echoSimpleUserType");
      assertEquals(Constants.URI_STYLE_DOCUMENT, wsdlOperation.getStyle());

      wsdlInput = wsdlOperation.getInput(new QName(TARGET_NAMESPACE, "echoSimpleUserType"));
      assertEquals(new QName(TARGET_NAMESPACE, "echoSimpleUserType"), wsdlInput.getXMLType());
      wsdlOutput = wsdlOperation.getOutput(new QName(TARGET_NAMESPACE, "echoSimpleUserTypeResponse"));
      assertEquals(new QName(TARGET_NAMESPACE, "echoSimpleUserTypeResponse"), wsdlOutput.getXMLType());

      QName xmlName = new QName(TARGET_NAMESPACE, "echoString");
      QName xmlType = new QName(TARGET_NAMESPACE, "echoString");
      assertEquals(xmlType, wsdlTypes.getXMLType(xmlName));
      xmlName = new QName(TARGET_NAMESPACE, "echoStringResponse");
      xmlType = new QName(TARGET_NAMESPACE, "echoStringResponse");
      assertEquals(xmlType, wsdlTypes.getXMLType(xmlName));

      xmlName = new QName(TARGET_NAMESPACE, "echoSimpleUserType");
      xmlType = new QName(TARGET_NAMESPACE, "echoSimpleUserType");
      assertEquals(xmlType, wsdlTypes.getXMLType(xmlName));
      xmlName = new QName(TARGET_NAMESPACE, "echoSimpleUserTypeResponse");
      xmlType = new QName(TARGET_NAMESPACE, "echoSimpleUserTypeResponse");
      assertEquals(xmlType, wsdlTypes.getXMLType(xmlName));
   }
View Full Code Here

      WSDLDefinitionsFactory factory = WSDLDefinitionsFactory.newInstance();
      WSDLDefinitions wsdlDefinitions = factory.parse(wsdlFile.toURL());
      WSDLInterface wsdlInterface = wsdlDefinitions.getInterface(new QName(wsdlDefinitions.getTargetNamespace(), "JaxRpcTestService"));

      // check if the schema has been extracted
      WSDLTypes wsdlTypes = wsdlDefinitions.getWsdlTypes();
      assertNotNull(WSDLUtils.getSchemaModel(wsdlTypes));

      // check the echoString operation
      WSDLInterfaceOperation wsdlOperation = wsdlInterface.getOperation("echoString");
      assertEquals(Constants.URI_STYLE_RPC, wsdlOperation.getStyle());
View Full Code Here

      WSDLDefinitionsFactory factory = WSDLDefinitionsFactory.newInstance();
      WSDLDefinitions wsdlDefinitions = factory.parse(wsdlFile.toURL());

      // check if all schemas have been extracted
      WSDLTypes wsdlTypes = wsdlDefinitions.getWsdlTypes();
      Object o1 = WSDLUtils.getSchemaModel(wsdlTypes).getNamespaceItem("http://math.java/jaws");
      Object o2 = WSDLUtils.getSchemaModel(wsdlTypes).getNamespaceItem("http://org.jboss.ws/marshall/rpclit/types");

      assertNotNull("NS item for 'http://math.java/jaws' not found", o1);
      assertNotNull("NS item for 'http://org.jboss.ws/marshall/rpclit/types' not found", o2);
View Full Code Here

{
   public void testXMLTypeReturned()
   {
      String filename = "StandardJavaTypesService_DOC_11.wsdl";
      File wsdlFile = getResourceFile("tools/wsdlfixture/" + filename);
      WSDLTypes types = null;
      try
      {
         WSDLToJavaIntf wsdljava = new WSDLToJava();
         wsdljava.setTypeMapping(new LiteralTypeMapping());
         WSDLDefinitions wsdl = wsdljava.convertWSDL2Java(wsdlFile.toURL());
         types = wsdl.getWsdlTypes();
      }
      catch (IOException e)
      {
         e.printStackTrace();
      }

      assertNotNull("WSDLTypes is null?", types);
      QName n = new QName("http://org.jboss.ws/types", "echoCalendar", "tns");
      QName type = types.getXMLType(n);
      assertNotNull("Type returned is null?", type);
      assertEquals("Type match", "echoCalendar", type.getLocalPart());
   }
View Full Code Here

   public void testXMLSchemaReturned()
   {
      String filename = "StandardJavaTypesService_DOC_11.wsdl";
      File wsdlFile = getResourceFile("tools/wsdlfixture/" + filename);
      WSDLTypes types = null;
      try
      {
         WSDLToJavaIntf wsdljava = new WSDLToJava();
         wsdljava.setTypeMapping(new LiteralTypeMapping());
         WSDLDefinitions wsdl = wsdljava.convertWSDL2Java(wsdlFile.toURL());
View Full Code Here

   private void processTypes(Definition srcWsdl, URL wsdlLoc) throws IOException, WSDLException
   {
      log.trace("BEGIN processTypes: " + wsdlLoc);

      WSDLTypes destTypes = destWsdl.getWsdlTypes();

      Types srcTypes = srcWsdl.getTypes();
      if (srcTypes != null && srcTypes.getExtensibilityElements().size() > 0)
      {
         List extElements = srcTypes.getExtensibilityElements();
View Full Code Here

         errorList.add("targetNamespace cannot be null");
   }

   private void validateTypes() throws IOException
   {
      WSDLTypes types = wsdl.getWsdlTypes();

      String targetNS = wsdl.getTargetNamespace();
      if (types == null)
         errorList.add("types cannot be null");
   }
View Full Code Here

      return bool;
   }

   private XSTypeDefinition getTypeDefinition(QName xmlType, WSDLDefinitions wsdl)
   {
      WSDLTypes types = wsdl.getWsdlTypes();
      JBossXSModel xsmodel = WSDLUtils.getSchemaModel(types);
      return xsmodel.getTypeDefinition(xmlType.getLocalPart(),xmlType.getNamespaceURI());
   }
View Full Code Here

   final Logger log = Logger.getLogger(JAXRPCMetaDataBuilder.class);

   protected QName lookupSchemaType(WSDLInterfaceOperation operation, QName element)
   {
      WSDLDefinitions wsdlDefinitions = operation.getWsdlInterface().getWsdlDefinitions();
      WSDLTypes wsdlTypes = wsdlDefinitions.getWsdlTypes();
      return wsdlTypes.getXMLType(element);
   }
View Full Code Here

TOP

Related Classes of org.jboss.ws.metadata.wsdl.WSDLTypes

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.