it.imolinfo.jbi4corba.schema
Class SchemaUtil

java.lang.Object
  extended by it.imolinfo.jbi4corba.schema.SchemaUtil

public class SchemaUtil
extends Object

This is an Utility class that contains the utility for the management Xmlschema.

Author:
Giancarlo Valeri

Field Summary
static QName Q_ELEMENT_SCHEMA
          The QName of the schema
 
Constructor Summary
SchemaUtil()
           
 
Method Summary
static void createW3CSchema(String path)
          This method create a ws-addr schema in the target Folder
static List<String> createXSD(List<javax.wsdl.extensions.schema.Schema> schemas, String path, String service)
          Creates XMLSchema from an list of schemas and writes the file
static Element generateElementSchemaFromSchemaImports(List<javax.wsdl.extensions.schema.SchemaImport> imports)
          Generates the org.w3c.dom.Element schema from list of SchemaImport
static String generateFileNameXSD(String targetNamespace, String service)
          Generates name's file of the file XSD
static List<javax.wsdl.extensions.schema.Schema> getSchemaWrapperList(org.apache.cxf.service.model.ServiceInfo serviceInfo, javax.wsdl.Definition wsdlDefinition)
          Returns the Schemas tha contains wrapper elements in a Wrapped-style wsdl
static void registerSchema(javax.wsdl.extensions.ExtensionRegistry registry)
          Utility method that registers the extensibility elements for WSDL4J.
static void writeElement(Element el, FileWriter fw)
          Writes the element in the FileWriter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

Q_ELEMENT_SCHEMA

public static final QName Q_ELEMENT_SCHEMA
The QName of the schema

Constructor Detail

SchemaUtil

public SchemaUtil()
Method Detail

generateElementSchemaFromSchemaImports

public static final Element generateElementSchemaFromSchemaImports(List<javax.wsdl.extensions.schema.SchemaImport> imports)
                                                            throws ParserConfigurationException
Generates the org.w3c.dom.Element schema from list of SchemaImport

Parameters:
imports - list of import tag
Returns:
element schema generated
Throws:
ParserConfigurationException

createXSD

public static List<String> createXSD(List<javax.wsdl.extensions.schema.Schema> schemas,
                                     String path,
                                     String service)
                              throws IOException,
                                     TransformerException
Creates XMLSchema from an list of schemas and writes the file

Parameters:
schemas - list schema
path - path file
service - name service
Throws:
IOException
TransformerException

generateFileNameXSD

public static String generateFileNameXSD(String targetNamespace,
                                         String service)
Generates name's file of the file XSD

Parameters:
targetNamespace - namespace
service - service name
Returns:

writeElement

public static void writeElement(Element el,
                                FileWriter fw)
                         throws IOException,
                                TransformerException
Writes the element in the FileWriter

Parameters:
el - element by write
fw - filewriter wrote
Throws:
IOException
TransformerException

registerSchema

public static void registerSchema(javax.wsdl.extensions.ExtensionRegistry registry)
Utility method that registers the extensibility elements for WSDL4J.

Parameters:
registry - The ExtensionRegistry where the partner link extension is registered.

getSchemaWrapperList

public static List<javax.wsdl.extensions.schema.Schema> getSchemaWrapperList(org.apache.cxf.service.model.ServiceInfo serviceInfo,
                                                                             javax.wsdl.Definition wsdlDefinition)
Returns the Schemas tha contains wrapper elements in a Wrapped-style wsdl

Parameters:
serviceInfo -
wsdlDefinition -
Returns:

createW3CSchema

public static void createW3CSchema(String path)
                            throws IOException,
                                   URISyntaxException
This method create a ws-addr schema in the target Folder

Throws:
IOException
URISyntaxException


Copyright © 2005-2010 Imola Informatica. All Rights Reserved.