SpecWsEditorUI
Web Service Editor UI Specification
WORK IN PROGRESS...
Author: Petr Pisl, Lukas Jungmann
Version: 2
Previous version can be found on Saturn
[[{TableOfContents} | {TableOfContents }]]
Code Completion
The basic annotation code completion is provided with java editor. Java editor has to provide as well the dynamic help for all annotations that are from JSR 181 and as well for the attributes of these annotations. When user selects an attribute in code completion window the code completion completes the name of the attribute and adds char '=' after the name of parameters. Then code completion window offers appropriate values for the attribute.
Many attributes of these annotations have string value. Even for FQN. The provider
has to be able to offer packages and classes between "".
When the attribute has value of an enum, then the enum values has to be offered
as the first items in the code completion window. It is not supported by java code
completion provider now (Marek F.?).
| Annotation | Attribute | Type | Values | Note |
|---|---|---|---|---|
| WebService | wsdlLocation | String | go through the file system | As the result is relative path to the preexisting WSDL File. (ex: wsdls/my.wsdl), completions should start in META-INF/WEB-INF directory |
| endpointInterface | String | offers packages and classes like java cc, but in the "" | The value is FQN | |
| WebParam | mode | enum | WebParam.Mode.IN WebParam.Mode.OUT WebParam.Mode.INOUT | |
| header | boolean | true false | ||
| HandlerChain | file | String | go through the file system | As their result is relative path to the existing xml file. (ex: bar/handlerfile.xml) |
| SOAPBinding | style | enum | SOAPBinding.Style.DOCUMNET SOAPBinding.StyleRPC | |
| use | enum | SOAPBinding.Use.LITERAL SOAPBinding.Use.ENCODED | ||
| parameterStyle | enum | SOAPBinding.ParameterStyle.BARE SOAPBinding.ParameterStyle.WRAPPED | ||
| Deprecated SOAPMessageHandler | className | offers packages and classes like java cc, but in the "" | The value is FQN | |
| roles | List of SOAP roles | We need to find out how to find them | ||
| headers | List of SOAP roles | |||
| BindingType | value | String | SOAPBinding.SOAP11HTTP_BINDING SOAPBinding.SOAP11HTTP_MTOM_BINDING SOAPBinding.SOAP12HTTP_BINDING SOAPBinding.SOAP12HTTP_MTOM_BINDING HTTPBinding.HTTP_BINDING | |
Dynamic help
- When the value of an attribute is text FQN, then for the selected classes in code
completion window is offered approriate java doc.
- For the enum items is offered appropriate help if it's needed.
Hints
The serviceName attribute is not allowed on interfaces
When user mark an interface as web service and use attribute serviceName.
Error Annotation: The serviceName with the attribute value is underline.
Error hint: The serviceName attribute is not allowed on interface
Hint Label: Remove serviceName attribute
Generated Result:
Removing the serviceName attribute with its value from the WebService annotation.
The service implementation bean is inconsistent with the portType
Conditions for the error:
- User defines attribute wsdlLocation for WebService annotation
- The attribute is defined in a class not in an interface
- The ide is able to access the wsdl file for parsing
- There is not corresponding portType definition to class name or value of name attribute if is defined in the wsdl file.
- <portType name="class name"> if there is not defined the name attribute for @WebService annotation
- <portType name="value of name attribute"> if there is defined the name attribute.
Error Annotation: The attribute wsdlLocation is underline.
Error hint: The service implementation bean is inconsistent with the portType
Hint Label: Set the name attribute to correspond an portType
When user select the hint, this dialog appears:
http://saturn.czech.sun.com/wiki/attach/WebServicesPromoGEditorUISpec/WebServiceName.jpg
The list box contains or portType names from the wsdl file.
Generated Result:
- If there is not attribute name, then is created with value that is selected in the listbox
- If there is the attribute name, then the value is set on the selected name.
The endpointInterface attribute is not allowed on interfaces
When user mark an interface as web service and use attribute endpointInterface.
Error Annotation: The endpointInterface with the attribute value is underline.
Error hint: The endpointInterface attribute is not allowed on interface
Hint Label: Remove endpointInterface attribute
Generated Result:
Removing the endpointInterface attribute with its value from the WebService annotation.
Is not possible to annotate a method with the @Oneway annotation without a corresponding @WebMethod annotation.
To be removed see issue 96238
User annotate a method with @Oneway annotation, but there is not @WebMethod annotation for the method.
Error Annotation: Underline the @Oneway annotation. Error hint: Is not possible to annotate a method with the @Oneway annotation without a corresponding @WebMethod annotation.
Hint Label: Add @WebMethod annotation
Hint Label: Remove @Oneway annotation
Generated Result: Adding the @WebMethod annotation on the line before @Oneway annotation Removing the @Oneway annotation.
An operation marked @Oneway must not have a return value
When user annotate an method with @Oneway annotation and this method has a return value.
Error Annotation: Underline the @Oneway annotation.
Error hint: An operation marked @Oneway must not have a return value
Hint Label: Remove @Oneway annotation
Generated Result:
Removing the @Oneway annotation.
An operation marked @Oneway must not have out/in-out parameters.
When user annotate an method with @Oneway annotation and this method has out/in-out parameters.
Error Annotation: Underline the @Oneway annotation.
Error hint: An operation marked @Oneway must not have out/in-out parameters.
Hint Label: Remove @Oneway annotation
Generated Result:
Removing the @Oneway annotation.
An operation marked @Oneway must not declare any exception
When user annotate an method with @Oneway annotation and this method declare an exception
Error Annotation: Underline the @Oneway annotation.
Error hint: An operation marked @Oneway must not declare any exception
Hint Label: Remove @Oneway annotation
Generated Result:
Removing the @Oneway annotation.
It is not allowed to combine @HandlerChain annotation with @SOAPMessageHandlers annotation.
When user annotate a class or an interface with @HandlerChain and @SOAPMeassageHandlers annotation.
Error Annotation: Underline the @Oneway annotation.
Error hint: It is not allowed to combine @HandlerChain annotation with @SOAPMessageHandlers annotation.
Hint Label: Remove @HandlerChain annotation
Hint Label: Remove @SOAPMessageHandlers annotation
Generated Result:
Removing the @HandlerChain annotation or @SOAPMessageHandlers annotation.
It is not allowed to use @WebParam.mode=Mode.OUT/INOUT if parameter is not of type javax.xml.ws.Holder.
When user annotate web service operation's parameter with @WebParam(mode=Mode.OUT) or @WebParam(mode=Mode.INOUT) annotation and the parameter is not of type javax.xml.ws.Holder.
Error Annotation: Underline mode attribute of WebParam annotation
Error hint: It is not allowed to use @WebParam.mode=Mode.OUT/INOUT if parameter type is not of type javax.xml.ws.Holder.
Hint Label: Remove mode attribute
Generated Result:
Removing the mode attribute from @WebParam annotation.
Overrided methods should have different names.
Having two methods with the same name leads to a clash in generated WSDL, therefore the IDE should identify and should suggest putting @WebMethod, @Requestwrapper and @ResponseWrapper automatically with different name.
Error Annotation: Underline method name(s)
Error hint: It is not recomended to have overrided methods.
Hint Label: Add name attribute of @WebMethod
Add ??? attribute of @RequestWrapper
Add ??? attribute of @ResponseWrapper
Generated Result:
Removing the mode attribute from @WebParam annotation.
Web service does not implement method(s) from service endpoint interface.
IZ: issue 78610
Conditions for the error:
- File is a java class
- User defines enpointInterface attribute for WebService annotation
- The class does not implement method(s) from endpointInterface
Error Annotation: Underline class name
Error hint: Web service does not implement method(s) from service endpoint interface.
Hint Label: Implement all abstract methods
Generated Result:
Implementing all abstract methods.
The service implementation bean must not contain any JSR-181 annotations other than @WebService and @HandlerChain
IZ: issue 78806
Conditions for the error:
- File is a java class
- User defines enpointInterface attribute for WebService annotation on a class
- The class contains JSR-181 annotations other than @WebService and @HandlerChain
Error Annotation: Underline all JSR-181 related annotation(s) other than @WebService and @HandlerChain
Error hint: The service implementation bean must not contain any JSR-181 annotations other than @WebService and @HandlerChain
Hint Label: Remove JSR-181 annotation(s)
Generated Result:
Removing all JSR-181 annotation(s) other than @WebService and @HandlerChain
The @WebService annotation must not include the name annotation element
IZ: 78806 IZ: issue 78806
Conditions for the error:
- File is a java class
- User defines enpointInterface attribute for WebService annotation on a class
- User defines name attribute for WebService annotation on a class
Error Annotation: Underline name attribute of @WebService annotation
Error hint: The @WebService annotation must not include the name annotation element
Hint Label: Remove name attribute
Generated Result:
Removing name attribute with its value from @WebService annotation
The targetNamespace attribute of @WebService annotation does not match namespace attribute of @XmlSchema annotation
IZ: issue 82748
Conditions for the error:
- File is a java class
- User have package-info.java in jaxws sub-package and it contains @XmlSchema annotation with namespace attribute
- User defines targetNamespace attribute for WebService annotation on a class
- The values of @WebService.targetNamespace and @XmlSchema.namespace are not equals
Error Annotation: Underline targetNamespace attribute of @WebService annotation
Error hint: The targetNamespace attribute of @WebService annotation does not match namespace attribute of @XmlSchema annotation
Hint Label: Rename value of targetNamespace attribute
Generated Result:
The value of the targetNamespace attribute of @WebService annotation is replaced by the value of the namespace
attribute of @XmlSchema annotation
The target namespace must be specified for Web services in no package
IZ: issue 78745
Conditions for the error:
- File is a java class or interface in default package
- The file contains @WebService annotation
- The targetNamespace attribute of @WebService annotation is missing
Error Annotation: Underline @WebService annotation
Error hint: The target namespace must be specified for Web services in no package
Hint Label: Add targetNamespace attribute
Generated Result:
The targetNamespace attribute is added to @WebService annotation with some default value, eg. "http://my.org/ns/"
@WebMethod must not have exclude element set to true
IZ: issue 78749, see also https://jax-ws.dev.java.net/issues/show_bug.cgi?id=272
Conditions for the error:
- File is a java interface
- The file contains @WebService annotation
- Some method contains @WebMethod annotation with exclude attribute set to true
Error Annotation: Underline exclude atribute in @WebMethod annotation
Error hint: @WebMethod must not have exclude element set to true
Hint Label: Remove exclude attribute
Generated Result:
The exclude attribute is removed from @WebMethod annotation
Use of RPC style requires use of WRAPPED parameter style
IZ: issue 78790
Conditions for the error:
- File is a java class or interface
- The file contains @WebService annotation
- The file contains @SOAPBinding annotation with style attribute set to Style.RPC,
parameterStyle set to ParameterStyle.BARE and use set to default (= Use.LITERAL)
Error Annotation: Underline value of parameterStyle atribute in @SOAPBinding annotation
Error hint: Use of RPC style requires use of WRAPPED parameter style
Hint Label: Set parameterStyle attribute to ParameterStyle.WRAPPED
Generated Result:
The parameterStyle attribute is set to ParameterStyle.WRAPPED

