org.apache.muse.tools.generator
Class WsdlMerge

java.lang.Object
  extended by org.apache.muse.tools.generator.util.AbstractCommandLineApp
      extended by org.apache.muse.tools.generator.WsdlMerge
All Implemented Interfaces:
WsdlMergeConstants

public class WsdlMerge
extends AbstractCommandLineApp
implements WsdlMergeConstants

Utility class to merge all the capability WSDLs into a single WSDL file to represent the resource type. This class will take all of the port types in the provided wsdls and make one port type. It will also combine the WS-RP documents into one.

Author:
Andrew Eberbach (aeberbac)

Field Summary
 
Fields inherited from class org.apache.muse.tools.generator.util.AbstractCommandLineApp
_logger, PATH_TO_POM_PROPERTIES, TOP_LEVEL_PACKAGE, VERSION_PROPERTY
 
Fields inherited from interface org.apache.muse.tools.generator.WsdlMergeConstants
ADDRESS_FLAG, HELP_FLAG, METADATA_NAME, OUTPUT_FLAG, OVERWRITE_FLAG, RMD_OUTPUT_FLAG, URI_FLAG, VERSION_FLAG
 
Constructor Summary
WsdlMerge()
           
 
Method Summary
static void addProperty(QName name, MetadataDescriptor source, MetadataDescriptor target)
          Copies one propert from a source MetadataDescriptor to a destination MetadataDescriptor.
static void main(String[] args)
          Venerable main method.
static javax.wsdl.Definition merge(String namespaceURI, Document[] wsdlFragments, String address)
          Merge the collection of WSDLs into one document.
static MetadataDescriptor merge(String wsdlLocation, QName interfaceName, MetadataDescriptor[] metadatas)
           
static void run(File[] files, String outputFileName, String outputRMDFileName, boolean overwrite, String uri, String address)
           
 
Methods inherited from class org.apache.muse.tools.generator.util.AbstractCommandLineApp
checkOverwriteArg, checkParentDirectory, createLogger, getFiller, getMetadataDescriptor, getMetadataDescriptor, getMetadataDescriptors, getVersion, getWSDLDocument, getWSDLDocuments, handleErrorAndExit, handleErrorAndExit, handleExit, handleMessage, hasNoArguments
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WsdlMerge

public WsdlMerge()
Method Detail

main

public static void main(String[] args)
Venerable main method. Take in the arguments, make sure they're valid and then try to do the WSDL merging.

Parameters:
args - The raw command line arguments

run

public static void run(File[] files,
                       String outputFileName,
                       String outputRMDFileName,
                       boolean overwrite,
                       String uri,
                       String address)
                throws FileNotFoundException
Throws:
FileNotFoundException

merge

public static MetadataDescriptor merge(String wsdlLocation,
                                       QName interfaceName,
                                       MetadataDescriptor[] metadatas)

merge

public static javax.wsdl.Definition merge(String namespaceURI,
                                          Document[] wsdlFragments,
                                          String address)
Merge the collection of WSDLs into one document. This will try to take the portTypes and merge them along with the WS-RP documents (if they exist).

Parameters:
namespaceURI - The target namespace URI of the generated WSDL
wsdlFragments - The WSDL files to merge
address - The address used for the location attribute on the generated service
Returns:
The Definition representing the newly created merged WSDL

addProperty

public static void addProperty(QName name,
                               MetadataDescriptor source,
                               MetadataDescriptor target)
                        throws Exception
Copies one propert from a source MetadataDescriptor to a destination MetadataDescriptor. Performs a deep-copy.

Parameters:
name -
source -
target -
Throws:
Exception


Copyright © 2005-2011 Apache Web Services - Muse. All Rights Reserved.