Package com.sun.xml.ws.wsdl.writer
Class WSDLGenerator
java.lang.Object
com.sun.xml.ws.wsdl.writer.WSDLGenerator
Class used to generate WSDLs from a
SEIModel.- Author:
- WS Development Team
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionWSDLGenerator(AbstractSEIModelImpl model, WSDLResolver wsdlResolver, WSBinding binding, Container container, Class implType, boolean inlineSchemas, boolean disableXmlSecurity, WSDLGeneratorExtension... extensions) Creates the WSDLGeneratorWSDLGenerator(AbstractSEIModelImpl model, WSDLResolver wsdlResolver, WSBinding binding, Container container, Class implType, boolean inlineSchemas, WSDLGeneratorExtension... extensions) Creates the WSDLGenerator -
Method Summary
Modifier and TypeMethodDescriptioncreateOutputFile(String namespaceUri, String suggestedFileName) Creates theResultobject used by JAXB to generate a schema for the namesapceUri namespace.voidPerformes the actual WSDL generationprotected voidGenerates the Binding section of the WSDLprotected voidgenerateBindingOperation(JavaMethodImpl method, Binding binding) protected voidgenerateDocumentParameterOrder(Operation operation, JavaMethodImpl method) Generates the parameterOrder for a PortType operationprotected voidgenerateInputMessage(Operation operation, JavaMethodImpl method) protected voidGenerates the WSDL messagesprotected voidgenerateOutputMessage(Operation operation, JavaMethodImpl method) protected voidgenerateParameterOrder(Operation operation, JavaMethodImpl method) Generates the parameterOrder for a PortType operationprotected voidGenerates the WSDL portTypeprotected voidgenerateRpcParameterOrder(Operation operation, JavaMethodImpl method) Generates the parameterOrder for a PortType operationprotected voidGenerates the Service section of the WSDLprotected voidgenerateSOAP12BindingOperation(JavaMethodImpl method, Binding binding) protected voidgenerateSOAP12Headers(com.sun.xml.txw2.TypedXmlWriter writer, List<ParameterImpl> parameters, QName message) protected voidgenerateSOAPHeaders(com.sun.xml.txw2.TypedXmlWriter writer, List<ParameterImpl> parameters, QName message) protected voidgenerateSOAPMessages(JavaMethodImpl method, SOAPBinding binding) Generates messages for a SOAPBindingprotected voidGenerates the types section of the WSDLprotected booleanisAttachmentParameter(ParameterImpl parameter) protected booleanisBodyParameter(ParameterImpl parameter) Determines if a parameter is associated with the message Bodyprotected booleanisHeaderParameter(ParameterImpl parameter) protected booleanisRpcLit(JavaMethodImpl method) Determines if aJavaMethodis rpc/literalprotected booleanisWrapperStyle(JavaMethodImpl method) Determines if themethodis wrapper styleprotected StringmangleName(String name) protected static Stringrelativize(String uri, String baseUri) Relativizes a URI by using another URI (base URI.)voidsetEndpointAddress(String address) Sets the endpoint address string to be written.protected List<ParameterImpl>sortMethodParameters(JavaMethodImpl method) Sorts the parameters for the method by their positionprotected voidsplitParameters(List<ParameterImpl> bodyParams, List<ParameterImpl> headerParams, List<ParameterImpl> params)
-
Field Details
-
XsdNs
- See Also:
-
-
Constructor Details
-
WSDLGenerator
public WSDLGenerator(AbstractSEIModelImpl model, WSDLResolver wsdlResolver, WSBinding binding, Container container, Class implType, boolean inlineSchemas, WSDLGeneratorExtension... extensions) Creates the WSDLGenerator- Parameters:
model- TheAbstractSEIModelImplused to generate the WSDLwsdlResolver- TheWSDLResolverto use resovle names while generating the WSDLbinding- specifies whichBindingTypeto generateextensions- an arrayWSDLGeneratorExtensionthat will be invoked to generate WSDL extensions
-
WSDLGenerator
public WSDLGenerator(AbstractSEIModelImpl model, WSDLResolver wsdlResolver, WSBinding binding, Container container, Class implType, boolean inlineSchemas, boolean disableXmlSecurity, WSDLGeneratorExtension... extensions) Creates the WSDLGenerator- Parameters:
model- TheAbstractSEIModelImplused to generate the WSDLwsdlResolver- TheWSDLResolverto use resovle names while generating the WSDLbinding- specifies whichBindingTypeto generatedisableXmlSecurity- specifies whether to disable the secure xml processing featureextensions- an arrayWSDLGeneratorExtensionthat will be invoked to generate WSDL extensions
-
-
Method Details
-
setEndpointAddress
Sets the endpoint address string to be written. Defaults toREPLACE_WITH_ACTUAL_URL.- Parameters:
address- wsdl:port/soap:address/[@location] value
-
mangleName
-
doGeneration
public void doGeneration()Performes the actual WSDL generation -
generateTypes
protected void generateTypes()Generates the types section of the WSDL -
generateMessages
protected void generateMessages()Generates the WSDL messages -
generateSOAPMessages
Generates messages for a SOAPBinding- Parameters:
method- TheJavaMethodto generate messages forbinding- TheSOAPBindingto add the generated messages to
-
generatePortType
protected void generatePortType()Generates the WSDL portType -
isWrapperStyle
Determines if themethodis wrapper style- Parameters:
method- TheJavaMethodto check if it is wrapper style- Returns:
- true if the method is wrapper style, otherwise, false.
-
isRpcLit
Determines if aJavaMethodis rpc/literal- Parameters:
method- The method to check- Returns:
- true if method is rpc/literal, otherwise, false
-
generateParameterOrder
Generates the parameterOrder for a PortType operation- Parameters:
operation- The operation to generate the parameterOrder formethod- TheJavaMethodto generate the parameterOrder from
-
generateRpcParameterOrder
Generates the parameterOrder for a PortType operation- Parameters:
operation- the operation to generate the parameterOrder formethod- theJavaMethodto generate the parameterOrder from
-
generateDocumentParameterOrder
Generates the parameterOrder for a PortType operation- Parameters:
operation- the operation to generate the parameterOrder formethod- theJavaMethodto generate the parameterOrder from
-
sortMethodParameters
Sorts the parameters for the method by their position- Parameters:
method- theJavaMethodused to sort the parameters- Returns:
- the sorted
Listof parameters
-
isBodyParameter
Determines if a parameter is associated with the message Body- Parameters:
parameter- the parameter to check- Returns:
- true if the parameter is a
bodyparameter
-
isHeaderParameter
-
isAttachmentParameter
-
generateBinding
protected void generateBinding()Generates the Binding section of the WSDL -
generateBindingOperation
-
generateSOAP12BindingOperation
-
splitParameters
protected void splitParameters(List<ParameterImpl> bodyParams, List<ParameterImpl> headerParams, List<ParameterImpl> params) -
generateSOAPHeaders
protected void generateSOAPHeaders(com.sun.xml.txw2.TypedXmlWriter writer, List<ParameterImpl> parameters, QName message) -
generateSOAP12Headers
protected void generateSOAP12Headers(com.sun.xml.txw2.TypedXmlWriter writer, List<ParameterImpl> parameters, QName message) -
generateService
protected void generateService()Generates the Service section of the WSDL -
generateInputMessage
-
generateOutputMessage
-
createOutputFile
Creates theResultobject used by JAXB to generate a schema for the namesapceUri namespace.- Parameters:
namespaceUri- The namespace for the schema being generatedsuggestedFileName- the JAXB suggested file name for the schema file- Returns:
- the
Resultfor JAXB to generate the schema into - Throws:
IOException- thrown if on IO error occurs
-
relativize
Relativizes a URI by using another URI (base URI.)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.
- Parameters:
uri- the URI to relativizebaseUri- the base URI to use for the relativization- Returns:
- the relative URI or the original URI if a relative one could not be computed
-