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 theResult
object used by JAXB to generate a schema for the namesapceUri namespace.void
Performes the actual WSDL generationprotected void
Generates the Binding section of the WSDLprotected void
generateBindingOperation
(JavaMethodImpl method, Binding binding) protected void
generateDocumentParameterOrder
(Operation operation, JavaMethodImpl method) Generates the parameterOrder for a PortType operationprotected void
generateInputMessage
(Operation operation, JavaMethodImpl method) protected void
Generates the WSDL messagesprotected void
generateOutputMessage
(Operation operation, JavaMethodImpl method) protected void
generateParameterOrder
(Operation operation, JavaMethodImpl method) Generates the parameterOrder for a PortType operationprotected void
Generates the WSDL portTypeprotected void
generateRpcParameterOrder
(Operation operation, JavaMethodImpl method) Generates the parameterOrder for a PortType operationprotected void
Generates the Service section of the WSDLprotected 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 SOAPBindingprotected void
Generates the types section of the WSDLprotected boolean
isAttachmentParameter
(ParameterImpl parameter) protected boolean
isBodyParameter
(ParameterImpl parameter) Determines if a parameter is associated with the message Bodyprotected boolean
isHeaderParameter
(ParameterImpl parameter) protected boolean
isRpcLit
(JavaMethodImpl method) Determines if aJavaMethod
is rpc/literalprotected boolean
isWrapperStyle
(JavaMethodImpl method) Determines if themethod
is wrapper styleprotected 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 positionprotected void
splitParameters
(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
- TheAbstractSEIModelImpl
used to generate the WSDLwsdlResolver
- TheWSDLResolver
to use resovle names while generating the WSDLbinding
- specifies whichBindingType
to generateextensions
- an arrayWSDLGeneratorExtension
that 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
- TheAbstractSEIModelImpl
used to generate the WSDLwsdlResolver
- TheWSDLResolver
to use resovle names while generating the WSDLbinding
- specifies whichBindingType
to generatedisableXmlSecurity
- specifies whether to disable the secure xml processing featureextensions
- an arrayWSDLGeneratorExtension
that 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
- TheJavaMethod
to generate messages forbinding
- TheSOAPBinding
to add the generated messages to
-
generatePortType
protected void generatePortType()Generates the WSDL portType -
isWrapperStyle
Determines if themethod
is wrapper style- Parameters:
method
- TheJavaMethod
to check if it is wrapper style- Returns:
- true if the method is wrapper style, otherwise, false.
-
isRpcLit
Determines if aJavaMethod
is 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
- TheJavaMethod
to generate the parameterOrder from
-
generateRpcParameterOrder
Generates the parameterOrder for a PortType operation- Parameters:
operation
- the operation to generate the parameterOrder formethod
- theJavaMethod
to generate the parameterOrder from
-
generateDocumentParameterOrder
Generates the parameterOrder for a PortType operation- Parameters:
operation
- the operation to generate the parameterOrder formethod
- theJavaMethod
to generate the parameterOrder from
-
sortMethodParameters
Sorts the parameters for the method by their position- Parameters:
method
- theJavaMethod
used to sort the parameters- Returns:
- the sorted
List
of 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
body
parameter
-
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 theResult
object 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
Result
for 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
-