Package org.apache.tuscany.sdo.helper

Examples of org.apache.tuscany.sdo.helper.XSDHelperImpl


    public static DataObject toWrappedDataObject(TypeHelper typeHelper,
                                                 Object ret,
                                                 Object[] os,
                                                 QName typeQN) {
        XSDHelper xsdHelper = new XSDHelperImpl(typeHelper);
        Property property = xsdHelper.getGlobalProperty(typeQN.getNamespaceURI(),
                typeQN.getLocalPart(), true);
        DataObject dataObject = new DataFactoryImpl(typeHelper).create(property.getType());
        List ips = dataObject.getInstanceProperties();
        int offset = 0;
        if (ret != null) {
View Full Code Here


        ClassLoader cl = Thread.currentThread().getContextClassLoader();
        try {
            Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
            typeHelper = SDOUtil.createTypeHelper();
            URL url = getClass().getResource("/wsdl/hello_world.wsdl");
            new XSDHelperImpl(typeHelper).define(url.openStream(), null);
        } finally {
            Thread.currentThread().setContextClassLoader(cl);
        }
       
View Full Code Here

   * @param scope the TypeHelper to use for locating and populating types.
   * @return the new XSDHelper.
   */
  public static XSDHelper createXSDHelper(TypeHelper scope)
  {
    return new XSDHelperImpl(scope);
  }
View Full Code Here

        // Initialize the SDO runtime
        DataObjectUtil.initRuntime();
        EPackage.Registry packageRegistry = new EPackageRegistryImpl(EPackage.Registry.INSTANCE);
        ExtendedMetaData extendedMetaData = new BasicExtendedMetaData(packageRegistry);
        XSDHelper xsdHelper = new XSDHelperImpl(extendedMetaData);

        try {
           
            // Load the WSDL file
            File inputFile = new File(wsdlFileName).getAbsoluteFile();
            InputStream inputStream = new FileInputStream(inputFile);
           
            // Define SDO metadata
            xsdHelper.define(inputStream, inputFile.toURI().toString());

            if (targetDirectory == null) {
                targetDirectory = new File(wsdlFileName).getCanonicalFile().getParent();
            } else {
                targetDirectory = new File(targetDirectory).getCanonicalPath();
View Full Code Here

  public static void generateFromXMLSchema(String xsdFileName, String targetDirectory, String javaPackage, String prefix, int genOptions)
  {
    DataObjectUtil.initRuntime();
    EPackage.Registry packageRegistry = new EPackageRegistryImpl(EPackage.Registry.INSTANCE);
    ExtendedMetaData extendedMetaData = new BasicExtendedMetaData(packageRegistry);
    XSDHelper xsdHelper = new XSDHelperImpl(extendedMetaData);

    try
    {
      File inputFile = new File(xsdFileName).getAbsoluteFile();
      InputStream inputStream = new FileInputStream(inputFile);
      xsdHelper.define(inputStream, inputFile.toURI().toString());

      if (targetDirectory == null)
      {
        targetDirectory = new File(xsdFileName).getCanonicalFile().getParent();
      }
View Full Code Here

  public static void generateFromXMLSchema(String xsdFileName, String namespace, String targetDirectory, String javaPackage, String prefix, int genOptions)
  {
    DataObjectUtil.initRuntime();
    EPackage.Registry packageRegistry = new EPackageRegistryImpl(EPackage.Registry.INSTANCE);
    ExtendedMetaData extendedMetaData = new BasicExtendedMetaData(packageRegistry);
    XSDHelper xsdHelper = new XSDHelperImpl(extendedMetaData);

    try
    {
      File inputFile = new File(xsdFileName).getAbsoluteFile();
      InputStream inputStream = new FileInputStream(inputFile);
      xsdHelper.define(inputStream, inputFile.toURI().toString());

      if (targetDirectory == null)
      {
        targetDirectory = new File(xsdFileName).getCanonicalFile().getParent();
      }
View Full Code Here

    protected void setUp() throws Exception {
        super.setUp();
        this.script = readResource(scriptName);
        TypeHelper th = SDOUtil.createTypeHelper();
        XSDHelper xsdHelper = new XSDHelperImpl(th);
        URL url = getClass().getResource("helloworld.wsdl");
        xsdHelper.define(url.openStream(), null);

        dataBinding = new E4XDataBinding(getClass().getClassLoader(),th);
        dataBinding.addElementQName("getGreetings", new QName("http://helloworld.samples.tuscany.apache.org", "getGreetings"));
    }
View Full Code Here

  public static void generateFromXMLSchema(String xsdFileName, String targetDirectory, String javaPackage, String prefix, int genOptions)
  {
    DataObjectUtil.initRuntime();
    EPackage.Registry packageRegistry = new EPackageRegistryImpl(EPackage.Registry.INSTANCE);
    ExtendedMetaData extendedMetaData = new BasicExtendedMetaData(packageRegistry);
    XSDHelper xsdHelper = new XSDHelperImpl(extendedMetaData);

    try
    {
      File inputFile = new File(xsdFileName).getAbsoluteFile();
      InputStream inputStream = new FileInputStream(inputFile);
      xsdHelper.define(inputStream, inputFile.toURI().toString());

      if (targetDirectory == null)
      {
        targetDirectory = new File(xsdFileName).getCanonicalFile().getParent();
      }
View Full Code Here

  public static void generateFromXMLSchema(String xsdFileName, String namespace, String targetDirectory, String javaPackage, String prefix, int genOptions)
  {
    DataObjectUtil.initRuntime();
    EPackage.Registry packageRegistry = new EPackageRegistryImpl(EPackage.Registry.INSTANCE);
    ExtendedMetaData extendedMetaData = new BasicExtendedMetaData(packageRegistry);
    XSDHelper xsdHelper = new XSDHelperImpl(extendedMetaData);

    try
    {
      File inputFile = new File(xsdFileName).getAbsoluteFile();
      InputStream inputStream = new FileInputStream(inputFile);
      xsdHelper.define(inputStream, inputFile.toURI().toString());

      if (targetDirectory == null)
      {
        targetDirectory = new File(xsdFileName).getCanonicalFile().getParent();
      }
View Full Code Here

   * @param scope the TypeHelper to use for locating and populating types.
   * @return the new XSDHelper.
   */
  public static XSDHelper createXSDHelper(TypeHelper scope)
  {
    return new XSDHelperImpl(scope);
  }
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sdo.helper.XSDHelperImpl

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.