org.apache.axis2.jaxws.runtime.description.marshal.impl
Class PackageSetBuilder

java.lang.Object
  extended by org.apache.axis2.jaxws.runtime.description.marshal.impl.PackageSetBuilder

public class PackageSetBuilder
extends java.lang.Object

In order to marshal or unmarshal the user data, we need to know the set of packages involved. The set of packages is used to construct an appropriate JAXBContext object during the marshalling/unmarshalling.

There are two ways to get this data.

Schema Walk (preferred): Get the list of packages by walking the schemas that are referenced by the wsdl (or generated wsdl). Each schema represents a different package. The package is obtained using the jaxb customization or JAXB default ns<->package rule.

Annotation Walk(secondary) : Walk the list of Endpoints, Operations, Parameters, etc. and build a list of packages by looking at the classes involved.

The Schema Walk is faster and more complete, but relies on the presence of the schema or wsdl.

The Annotation Walk is slower and is not complete. For example, the annotation walk may not discover the packages for derived types that are defined in a different schema than the formal parameter types.


Method Summary
static java.util.TreeSet<java.lang.String> getPackagesFromAnnotations(ServiceDescription serviceDesc, MarshalServiceRuntimeDescription msrd)
           
static java.util.TreeSet<java.lang.String> getPackagesFromSchema(ServiceDescription serviceDesc)
          Walks the schemas of the serviceDesc's wsdl (or generated wsdl) to determine the list of packages.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getPackagesFromSchema

public static java.util.TreeSet<java.lang.String> getPackagesFromSchema(ServiceDescription serviceDesc)
Walks the schemas of the serviceDesc's wsdl (or generated wsdl) to determine the list of packages. This is the preferred algorithm for discovering the package set.

Parameters:
serviceDesc - ServiceDescription
Returns:
Set of Packages

getPackagesFromAnnotations

public static java.util.TreeSet<java.lang.String> getPackagesFromAnnotations(ServiceDescription serviceDesc,
                                                                             MarshalServiceRuntimeDescription msrd)
Parameters:
serviceDescription - ServiceDescription
Returns:
Set of Packages


Copyright © 2007 Apache Web Services Project. All Rights Reserved.