|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.muse.ws.wsdl.WsdlUtils
public class WsdlUtils
WsdlUtils is a collection of utility methods related to WSDL 1.1.
Field Summary | |
---|---|
static QName |
ADDRESS_QNAME
|
static QName |
BINDING_QNAME
|
static String |
DEFAULT_SERVICE_NAME
|
static QName |
DEFINITIONS_QNAME
|
static QName |
IMPORT_QNAME
|
static QName |
INPUT_QNAME
|
static String |
LOCATION
|
static QName |
MESSAGE_QNAME
|
static String |
NAME
|
static String |
NAMESPACE_URI
The WSDL 1.1 namespace URI. |
static QName |
OPERATION_QNAME
|
static QName |
OUTPUT_QNAME
|
static QName |
PORT_QNAME
|
static QName |
PORT_TYPE_QNAME
|
static String |
PREFIX
|
static QName |
SERVICE_QNAME
|
static String |
SERVICES
|
static String |
SOAP_PREFIX
|
static String |
SOAP_URI
The "WSDL-SOAP" namespace used for SOAP bindings. |
static QName |
TYPES_QNAME
|
static String |
WSDL4J_VERBOSE_FLAG
|
Constructor Summary | |
---|---|
WsdlUtils()
|
Method Summary | |
---|---|
static Document |
addSchemaImports(Document wsdl,
String wsdlPath,
Environment environment,
Set namespaces)
This is a convenience method that resolves all of the schema imports referenced in a WSDL. |
static Document |
addSchemaIncludes(Document wsdl,
String wsdlPath,
Environment environment,
Set namespaces)
This is a convenience method that resolves all of the schema includes referenced in a WSDL. |
static javax.wsdl.Definition |
createDefinition(Document wsdlDoc,
File wsdlDir)
|
static Document |
createWSDL(Environment environment,
String wsdlPath,
boolean resolveReferences)
Loads the WSDL at the given path, resolving any imports if desired. |
static String |
getAction(javax.wsdl.Operation op)
|
static Element |
getComplexTypeDeclaration(Node wsdl,
QName qname)
Searches a WSDL document's types section for a complex type defined with the given name. |
static Element |
getElementDeclaration(Node wsdl,
QName qname)
Searches a WSDL document's types section for a type defined with the given name. |
static Element |
getFirstPortType(Node wsdl)
Returns the first portType (in document order) that's found in a given WSDL or null if the WSDL contains no portTypes. |
static QName |
getInputPartName(javax.wsdl.Operation op)
|
static QName |
getOutputPartName(javax.wsdl.Operation op,
Document wsdlDoc)
This method is somewhat painful because of the lack of restrictions that WSDL 1.1 has for how you can specify input and output names and types. |
static Element |
getPortType(Node wsdl,
QName qname)
Searches a WSDL document for a portType defined with the given name. |
static Set |
getSchemaNamespaces(Document wsdl)
Gathers the target namespaces for each schema in the WSDL's types section. |
static String |
getServiceName(Element wsdlDefinition)
Given a WSDL document try to get the address and parse out the name of the service. |
static Collection |
getWsdlImports(Document wsdl,
String wsdlPath,
Environment environment)
Creates the WSDLs that are imported in the given WSDL as independent Documents. |
static void |
mergeWSDL(Document from,
Document to,
Set namespaces)
Determines which schema content the first WSDL has that the second one doesn't and adds that content to the second WSDL. |
static Element |
removeSchemaReferences(Element wsdl)
|
static Element |
removeWsdlReferences(Element wsdl)
Iterates over a WSDL document and removes all WSDL imports and XSD imports. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String NAMESPACE_URI
public static final String PREFIX
public static final String SOAP_URI
public static final String SOAP_PREFIX
public static final QName ADDRESS_QNAME
public static final QName BINDING_QNAME
public static final QName DEFINITIONS_QNAME
public static final QName IMPORT_QNAME
public static final QName INPUT_QNAME
public static final String LOCATION
public static final QName MESSAGE_QNAME
public static final String NAME
public static final QName OPERATION_QNAME
public static final QName OUTPUT_QNAME
public static final QName PORT_QNAME
public static final QName PORT_TYPE_QNAME
public static final QName SERVICE_QNAME
public static final QName TYPES_QNAME
public static final String WSDL4J_VERBOSE_FLAG
public static final String DEFAULT_SERVICE_NAME
public static final String SERVICES
Constructor Detail |
---|
public WsdlUtils()
Method Detail |
---|
public static Document addSchemaImports(Document wsdl, String wsdlPath, Environment environment, Set namespaces)
public static Document addSchemaIncludes(Document wsdl, String wsdlPath, Environment environment, Set namespaces)
public static javax.wsdl.Definition createDefinition(Document wsdlDoc, File wsdlDir)
public static Document createWSDL(Environment environment, String wsdlPath, boolean resolveReferences)
environment
- The Muse environment is used to load the WSDL file.wsdlPath
- The relative path of the WSDL file.resolveReferences
- True if you want the method to process and WSDL and XSD
imports that are in the WSDL document. The resulting Document
may be much larger depending on how many imports are
discovered while the method recurses through the other
WSDLs/XSDs.
public static String getAction(javax.wsdl.Operation op)
public static Element getComplexTypeDeclaration(Node wsdl, QName qname)
wsdl
- The WDSL document to search.qname
- The name of the type definition to find.
public static Element getElementDeclaration(Node wsdl, QName qname)
wsdl
- The WDSL document to search.qname
- The name of the type definition to find.
public static Element getFirstPortType(Node wsdl)
wsdl
- The WSDL document to search
public static QName getInputPartName(javax.wsdl.Operation op)
public static QName getOutputPartName(javax.wsdl.Operation op, Document wsdlDoc)
public static Element getPortType(Node wsdl, QName qname)
wsdl
- The WDSL document to search.qname
- The name of the portType definition to find.
public static Set getSchemaNamespaces(Document wsdl)
wsdl
-
public static String getServiceName(Element wsdlDefinition)
wsdlDefinition
- The WSDL definition we're trying to parse
DEFAULT_SERVICE_NAME
public static Collection getWsdlImports(Document wsdl, String wsdlPath, Environment environment)
wsdl
- The original WSDL whose imports must be resolved.wsdlPath
- The relative path of the given WSDL. This is used to resolve
the paths of the imported WSDLs.environment
- The Muse environment is used to load the WSDL files.
public static void mergeWSDL(Document from, Document to, Set namespaces)
from
- The WSDL that may have unique schema content.to
- The WSDL that will receive the first WSDL's unique schema
content.namespaces
- The schema namespaces that have been processed by the second
WSDL.public static Element removeSchemaReferences(Element wsdl)
public static Element removeWsdlReferences(Element wsdl)
wsdl
- The WSDL Document whose import elements will be removed.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |