|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.xml.ws.wsdl.writer.WSDLGenerator
public class WSDLGenerator
Class used to generate WSDLs from a SEIModel.
| Nested Class Summary | |
|---|---|
protected class |
WSDLGenerator.JAXWSOutputSchemaResolver
Implements the SchemaOutputResolver used by JAXB to |
| Field Summary | |
|---|---|
(package private) List<WSDLGeneratorExtension> |
extensionHandlers
|
| Constructor Summary | |
|---|---|
WSDLGenerator(AbstractSEIModelImpl model,
WSDLResolver wsdlResolver,
WSBinding binding,
Container container,
Class implType,
boolean inlineSchemas,
WSDLGeneratorExtension... extensions)
Creates the WSDLGenerator |
|
| Method Summary | |
|---|---|
Result |
createOutputFile(String namespaceUri,
String suggestedFileName)
Creates the Result object used by JAXB to generate a schema for the
namesapceUri namespace. |
void |
doGeneration()
Performes the actual WSDL generation |
protected void |
generateBinding()
Generates the Binding section of the WSDL |
protected void |
generateBindingOperation(JavaMethodImpl method,
Binding binding)
|
protected void |
generateDocumentParameterOrder(Operation operation,
JavaMethodImpl method)
Generates the parameterOrder for a PortType operation |
protected void |
generateInputMessage(Operation operation,
JavaMethodImpl method)
|
protected void |
generateMessages()
Generates the WSDL messages |
protected void |
generateOutputMessage(Operation operation,
JavaMethodImpl method)
|
protected void |
generateParameterOrder(Operation operation,
JavaMethodImpl method)
Generates the parameterOrder for a PortType operation |
protected void |
generatePortType()
Generates the WSDL portType |
protected void |
generateRpcParameterOrder(Operation operation,
JavaMethodImpl method)
Generates the parameterOrder for a PortType operation |
protected void |
generateService()
Generates the Service section of the WSDL |
protected void |
generateSOAP12BindingOperation(JavaMethodImpl method,
Binding binding)
|
protected void |
generateSOAP12Headers(com.sun.xml.txw2.TypedXmlWriter writer,
List<ParameterImpl> parameters,
QName message)
|
protected void |
generateSOAPHeaders(com.sun.xml.txw2.TypedXmlWriter writer,
List<ParameterImpl> parameters,
QName message)
|
protected void |
generateSOAPMessages(JavaMethodImpl method,
SOAPBinding binding)
Generates messages for a SOAPBinding |
protected void |
generateTypes()
Generates the types section of the WSDL |
protected boolean |
isAttachmentParameter(ParameterImpl parameter)
|
protected boolean |
isBodyParameter(ParameterImpl parameter)
Determines if a parameter is associated with the message Body |
protected boolean |
isHeaderParameter(ParameterImpl parameter)
|
protected boolean |
isRpcLit(JavaMethodImpl method)
Determines if a JavaMethod is rpc/literal |
protected boolean |
isWrapperStyle(JavaMethodImpl method)
Determines if the method is wrapper style |
protected String |
mangleName(String name)
|
protected static String |
relativize(String uri,
String baseUri)
Relativizes a URI by using another URI (base URI.) |
void |
setEndpointAddress(String address)
Sets the endpoint address string to be written. |
protected List<ParameterImpl> |
sortMethodParameters(JavaMethodImpl method)
Sorts the parameters for the method by their position |
protected void |
splitParameters(List<ParameterImpl> bodyParams,
List<ParameterImpl> headerParams,
List<ParameterImpl> params)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
List<WSDLGeneratorExtension> extensionHandlers
| Constructor Detail |
|---|
public WSDLGenerator(AbstractSEIModelImpl model,
WSDLResolver wsdlResolver,
WSBinding binding,
Container container,
Class implType,
boolean inlineSchemas,
WSDLGeneratorExtension... extensions)
model - The AbstractSEIModelImpl used to generate the WSDLwsdlResolver - The WSDLResolver to use resovle names while generating the WSDLbinding - specifies which BindingType to generateextensions - an array WSDLGeneratorExtension that will
be invoked to generate WSDL extensions| Method Detail |
|---|
public void setEndpointAddress(String address)
REPLACE_WITH_ACTUAL_URL.
address - wsdl:port/soap:address/[@location] valueprotected String mangleName(String name)
public void doGeneration()
protected void generateTypes()
protected void generateMessages()
protected void generateSOAPMessages(JavaMethodImpl method,
SOAPBinding binding)
method - The JavaMethod to generate messages forbinding - The SOAPBinding to add the generated messages toprotected void generatePortType()
protected boolean isWrapperStyle(JavaMethodImpl method)
method is wrapper style
method - The JavaMethod to check if it is wrapper style
protected boolean isRpcLit(JavaMethodImpl method)
JavaMethod is rpc/literal
method - The method to check
protected void generateParameterOrder(Operation operation,
JavaMethodImpl method)
operation - The operation to generate the parameterOrder formethod - The JavaMethod to generate the parameterOrder from
protected void generateRpcParameterOrder(Operation operation,
JavaMethodImpl method)
operation - the operation to generate the parameterOrder formethod - the JavaMethod to generate the parameterOrder from
protected void generateDocumentParameterOrder(Operation operation,
JavaMethodImpl method)
operation - the operation to generate the parameterOrder formethod - the JavaMethod to generate the parameterOrder fromprotected List<ParameterImpl> sortMethodParameters(JavaMethodImpl method)
method - the JavaMethod used to sort the parameters
List of parametersprotected boolean isBodyParameter(ParameterImpl parameter)
parameter - the parameter to check
body parameterprotected boolean isHeaderParameter(ParameterImpl parameter)
protected boolean isAttachmentParameter(ParameterImpl parameter)
protected void generateBinding()
protected void generateBindingOperation(JavaMethodImpl method,
Binding binding)
protected void generateSOAP12BindingOperation(JavaMethodImpl method,
Binding binding)
protected void splitParameters(List<ParameterImpl> bodyParams,
List<ParameterImpl> headerParams,
List<ParameterImpl> params)
protected void generateSOAPHeaders(com.sun.xml.txw2.TypedXmlWriter writer,
List<ParameterImpl> parameters,
QName message)
protected void generateSOAP12Headers(com.sun.xml.txw2.TypedXmlWriter writer,
List<ParameterImpl> parameters,
QName message)
protected void generateService()
protected void generateInputMessage(Operation operation,
JavaMethodImpl method)
protected void generateOutputMessage(Operation operation,
JavaMethodImpl method)
public Result createOutputFile(String namespaceUri,
String suggestedFileName)
throws IOException
Result object used by JAXB to generate a schema for the
namesapceUri namespace.
namespaceUri - The namespace for the schema being generatedsuggestedFileName - the JAXB suggested file name for the schema file
Result for JAXB to generate the schema into
IOException - thrown if on IO error occurs
protected static String relativize(String uri,
String baseUri)
For example, relative("http://www.sun.com/abc/def","http://www.sun.com/pqr/stu") => "../abc/def"
This method only works on hierarchical URI's, not opaque URI's (refer to the java.net.URI javadoc for complete definitions of these terms.
This method will not normalize the relative URI.
uri - the URI to relativizebaseUri - the base URI to use for the relativization
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||