|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.wsif.util.WSIFUtils
public class WSIFUtils
This class provides utilities for WSIF runtime and generated stubs.
Constructor Summary | |
---|---|
WSIFUtils()
|
Method Summary | |
---|---|
static void |
addDefinedItems(java.util.Map fromItems,
java.lang.String itemType,
java.util.Map toItems)
|
static void |
createSimpleTypesMap()
Create a map of all schema simple types and there Java equivalents. |
static java.util.Map |
getAllItems(javax.wsdl.Definition def,
java.lang.String itemType)
|
static javax.wsdl.BindingOperation |
getBindingOperation(javax.wsdl.Binding binding,
javax.wsdl.Operation portTypeOp)
Get a binding operation for a portType operation. |
static javax.wsdl.BindingOperation |
getBindingOperation(javax.wsdl.Binding binding,
java.lang.String opName,
java.lang.String inName,
java.lang.String outName)
Get a binding operation for a portType operation. |
static javax.wsdl.Definition |
getDefinitionFromContent(java.lang.String contextURL,
java.lang.String content)
|
static javax.wsdl.Definition |
getDefinitionFromLocation(java.lang.String contextURL,
java.lang.String location)
|
static javax.wsdl.extensions.ExtensionRegistry |
getExtensionRegistry()
Gets the WSIF WSDL Extensions Registry This calls initializeProviders to ensure all providers have registered any custom WSDL extensions. |
static WSIFFormatHandler |
getFormatHandler(javax.wsdl.Part part,
javax.wsdl.Definition definition,
javax.wsdl.Binding binding)
|
static java.lang.String |
getFormatHandlerName(javax.wsdl.Part part,
javax.wsdl.Definition definition,
javax.wsdl.Binding binding)
|
static java.lang.String |
getFormatStylePackage(javax.wsdl.Binding bindingModel)
|
static java.lang.String |
getJavaClassNameFromXMLName(java.lang.String xmlName)
|
static java.lang.String |
getJavaClassNameFromXMLName(java.lang.String xmlName,
java.lang.String delims)
|
static java.lang.String |
getJavaNameFromXMLName(java.lang.String xmlName)
|
static java.lang.String |
getJavaNameFromXMLName(java.lang.String xmlName,
java.lang.String delims)
|
static java.lang.Object |
getNamedItem(java.util.Map items,
javax.xml.namespace.QName qname,
java.lang.String itemType)
|
static java.lang.String |
getPackageNameFromNamespaceURI(java.lang.String namespaceURI)
|
static java.lang.String |
getPackageNameFromXMLName(java.lang.String xmlName)
|
static java.util.Map |
getSimpleTypesMap()
Get a map of all schema simple types and there Java equivalents. |
static javax.wsdl.Part |
getWrappedDocLiteralPart(java.util.List parts,
java.lang.String operationName)
Deprecated. use org.apache.wsif.providers.ProviderUtils.getWrapperPart |
static java.lang.String |
getXSDNamespaceFromPackageName(java.lang.String packageName)
|
static void |
initializeProviders()
Initialize the WSIF providers. |
static boolean |
isJNDIAvailable()
This checks whether JNDI classes are available at runtime. |
static boolean |
isWrappedDocLiteral(java.util.List parts,
java.lang.String name)
Deprecated. use org.apache.wsif.providers.ProviderUtils.isWrappedDocLiteral |
static javax.wsdl.Definition |
readWSDL(java.lang.String documentBaseURI,
org.w3c.dom.Document wsdlDocument)
Read WSDL - it is different from a WSDLReader readWSDL method in that it specifies the use of the WSIF WSDLFactory implementation which registers the extensiblity elements used by the WSIF providers. |
static javax.wsdl.Definition |
readWSDL(java.lang.String documentBaseURI,
org.w3c.dom.Element wsdlServicesElement)
Read WSDL - it is different from a WSDLReader readWSDL method in that it specifies the use of the WSIF WSDLFactory implementation which registers the extensiblity elements used by the WSIF providers. |
static javax.wsdl.Definition |
readWSDL(java.lang.String documentBaseURI,
java.io.Reader reader)
Read WSDL - it is different from a WSDLReader readWSDL method in that it specifies the use of the WSIF WSDLFactory implementation which registers the extensiblity elements used by the WSIF providers. |
static javax.wsdl.Definition |
readWSDL(java.lang.String documentBase,
java.io.Reader reader,
java.lang.ClassLoader cl)
Read WSDL - it is different from a WSDLReader readWSDL method in that it specifies the use of the WSIF WSDLFactory implementation which registers the extensiblity elements used by the WSIF providers. |
static javax.wsdl.Definition |
readWSDL(java.lang.String contextURL,
java.lang.String wsdlLoc)
Read WSDL - it is different from a WSDLReader readWSDL method in that it specifies the use of the WSIF WSDLFactory implementation which registers the extensiblity elements used by the WSIF providers. |
static javax.wsdl.Definition |
readWSDL(java.net.URL documentBase,
java.io.Reader reader,
java.lang.ClassLoader cl)
Read WSDL - it is different from a WSDLReader readWSDL method in that it specifies the use of the WSIF WSDLFactory implementation which registers the extensiblity elements used by the WSIF providers. |
static javax.wsdl.Definition |
readWSDL(java.net.URL contextURL,
java.lang.String wsdlLoc,
java.lang.ClassLoader cl)
Read WSDL - it is different from a WSDLReader readWSDL method in that it specifies the use of the WSIF WSDLFactory implementation which registers the extensiblity elements used by the WSIF providers. |
static javax.wsdl.Definition |
readWSDL(javax.wsdl.xml.WSDLLocator loc)
Read WSDL - it is different from a WSDLReader readWSDL method in that it specifies the use of the WSIF WSDLFactory implementation which registers the extensiblity elements used by the WSIF providers. |
static javax.wsdl.Definition |
readWSDLThroughAuthProxy(java.lang.String wsdlLoc,
java.net.PasswordAuthentication pa)
Read WSDL through an authenticating proxy. |
static javax.wsdl.PortType |
selectPortType(javax.wsdl.Definition def,
java.lang.String portTypeNS,
java.lang.String portTypeName)
|
static javax.wsdl.Service |
selectService(javax.wsdl.Definition def,
java.lang.String serviceNS,
java.lang.String serviceName)
|
static java.util.List |
unWrapPart(javax.wsdl.Part p,
javax.wsdl.Definition def)
Deprecated. use org.apache.wsif.providers.ProviderUtils.unWrapPart |
static boolean |
wildcardCompare(java.lang.String s1,
java.lang.String s2,
char wild)
Compares two strings taking acount of a wildcard. |
static void |
writeWSDL(javax.wsdl.Definition def,
java.io.Writer sink)
Write WSDL. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WSIFUtils()
Method Detail |
---|
public static boolean isJNDIAvailable()
public static javax.wsdl.Service selectService(javax.wsdl.Definition def, java.lang.String serviceNS, java.lang.String serviceName) throws WSIFException
WSIFException
public static javax.wsdl.PortType selectPortType(javax.wsdl.Definition def, java.lang.String portTypeNS, java.lang.String portTypeName) throws WSIFException
WSIFException
public static void addDefinedItems(java.util.Map fromItems, java.lang.String itemType, java.util.Map toItems)
public static java.util.Map getAllItems(javax.wsdl.Definition def, java.lang.String itemType)
public static java.lang.Object getNamedItem(java.util.Map items, javax.xml.namespace.QName qname, java.lang.String itemType) throws WSIFException
WSIFException
public static javax.wsdl.Definition readWSDL(java.lang.String contextURL, java.lang.String wsdlLoc) throws javax.wsdl.WSDLException
contextURL
- The context in which to resolve the wsdlLoc, if the wsdlLoc is
relative. Can be null, in which case it will be ignored.wsdlLoc
- a URI (can be a filename or URL) pointing to a WSDL XML definition.
javax.wsdl.WSDLException
- Exception thrown if wsdl cannot be readpublic static javax.wsdl.Definition readWSDLThroughAuthProxy(java.lang.String wsdlLoc, java.net.PasswordAuthentication pa) throws javax.wsdl.WSDLException
wsdlLoc
- a URI (must be an http or ftp URL) pointing to a WSDL filepa
- A username and password for the proxy, encapsulated as a
java.net.PasswordAuthentication object
javax.wsdl.WSDLException
- Exception thrown if wsdl cannot be readpublic static javax.wsdl.Definition readWSDL(javax.wsdl.xml.WSDLLocator loc) throws javax.wsdl.WSDLException
loc
- A WSDLLocator to use in locating the wsdl file and its imports
javax.wsdl.WSDLException
- Exception thrown if wsdl cannot be readpublic static javax.wsdl.Definition readWSDL(java.net.URL documentBase, java.io.Reader reader, java.lang.ClassLoader cl) throws javax.wsdl.WSDLException
documentBase
- A URL for the document base URI for the wsdlreader
- A Reader "pointing at" the wsdl filecl
- A ClassLoader used to resolve relative imports when files are in
in the classpath
javax.wsdl.WSDLException
- Exception thrown if wsdl cannot be readpublic static javax.wsdl.Definition readWSDL(java.lang.String documentBase, java.io.Reader reader, java.lang.ClassLoader cl) throws javax.wsdl.WSDLException
documentBase
- The document base URI for the wsdlreader
- A Reader "pointing at" the wsdl filecl
- A ClassLoader used to resolve relative imports when files are in
in the classpath
javax.wsdl.WSDLException
- Exception thrown if wsdl cannot be readpublic static javax.wsdl.Definition readWSDL(java.net.URL contextURL, java.lang.String wsdlLoc, java.lang.ClassLoader cl) throws javax.wsdl.WSDLException
contextURL
- The context in which to resolve the wsdlLoc, if the wsdlLoc is
relative. Can be null, in which case it will be ignored.wsdlLoc
- a URI (can be a filename or URL) pointing to a WSDL XML definition.cl
- A ClassLoader used to resolve relative imports when files are in
in the classpath
javax.wsdl.WSDLException
- Exception thrown if wsdl cannot be readpublic static javax.wsdl.Definition readWSDL(java.lang.String documentBaseURI, java.io.Reader reader) throws javax.wsdl.WSDLException
documentBaseURI
- the document base URI of the WSDL definition
described by the element. Will be set as the documentBaseURI
of the returned Definition. Can be null, in which case it
will be ignored.reader
- A Reader "pointing at" the wsdl file
javax.wsdl.WSDLException
- Exception thrown if wsdl cannot be readpublic static javax.wsdl.Definition readWSDL(java.lang.String documentBaseURI, org.w3c.dom.Document wsdlDocument) throws javax.wsdl.WSDLException
documentBaseURI
- the document base URI of the WSDL definition
described by the element. Will be set as the documentBaseURI
of the returned Definition. Can be null, in which case it
will be ignored.wsdlDocument
- The base wsdl document
javax.wsdl.WSDLException
- Exception thrown if wsdl cannot be readpublic static javax.wsdl.Definition readWSDL(java.lang.String documentBaseURI, org.w3c.dom.Element wsdlServicesElement) throws javax.wsdl.WSDLException
documentBaseURI
- the document base URI of the WSDL definition
described by the element. Will be set as the documentBaseURI
of the returned Definition. Can be null, in which case it
will be ignored.definitionsElement
- the <wsdl:definitions> element
javax.wsdl.WSDLException
- Exception thrown if wsdl cannot be readpublic static void writeWSDL(javax.wsdl.Definition def, java.io.Writer sink) throws javax.wsdl.WSDLException
wsdlDef
- the WSDL definition to be written.sink
- the Writer to write the xml to.
javax.wsdl.WSDLException
- Exception thrown if wsdl cannot be writtenpublic static javax.wsdl.Definition getDefinitionFromLocation(java.lang.String contextURL, java.lang.String location) throws WSIFException
WSIFException
public static javax.wsdl.Definition getDefinitionFromContent(java.lang.String contextURL, java.lang.String content) throws WSIFException
WSIFException
public static void initializeProviders()
public static void createSimpleTypesMap()
public static java.util.Map getSimpleTypesMap()
public static WSIFFormatHandler getFormatHandler(javax.wsdl.Part part, javax.wsdl.Definition definition, javax.wsdl.Binding binding) throws java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.ClassNotFoundException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.ClassNotFoundException
public static java.lang.String getPackageNameFromNamespaceURI(java.lang.String namespaceURI)
public static java.lang.String getJavaNameFromXMLName(java.lang.String xmlName, java.lang.String delims)
public static java.lang.String getJavaNameFromXMLName(java.lang.String xmlName)
public static java.lang.String getPackageNameFromXMLName(java.lang.String xmlName)
public static java.lang.String getFormatStylePackage(javax.wsdl.Binding bindingModel)
public static java.lang.String getFormatHandlerName(javax.wsdl.Part part, javax.wsdl.Definition definition, javax.wsdl.Binding binding) throws java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.ClassNotFoundException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.ClassNotFoundException
public static java.lang.String getJavaClassNameFromXMLName(java.lang.String xmlName)
public static java.lang.String getJavaClassNameFromXMLName(java.lang.String xmlName, java.lang.String delims)
public static java.lang.String getXSDNamespaceFromPackageName(java.lang.String packageName)
public static javax.wsdl.BindingOperation getBindingOperation(javax.wsdl.Binding binding, javax.wsdl.Operation portTypeOp) throws WSIFException
binding
- the WSLD binding the operation will choosen fromportTypeOp
- the portType operation the binding operation
must match
WSIFException
public static javax.wsdl.BindingOperation getBindingOperation(javax.wsdl.Binding binding, java.lang.String opName, java.lang.String inName, java.lang.String outName) throws WSIFException
binding
- the WSLD binding the operation will choosen fromopName
- the portType operation name of the wanted operationinName
- the portType operation input nameoutName
- the portType operation outpur name
WSIFException
public static boolean wildcardCompare(java.lang.String s1, java.lang.String s2, char wild)
public static boolean isWrappedDocLiteral(java.util.List parts, java.lang.String name)
public static javax.wsdl.Part getWrappedDocLiteralPart(java.util.List parts, java.lang.String operationName)
public static java.util.List unWrapPart(javax.wsdl.Part p, javax.wsdl.Definition def) throws WSIFException
WSIFException
public static javax.wsdl.extensions.ExtensionRegistry getExtensionRegistry()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |