JWS Programming Best Practices

The following list provides some best practices when programming the JWS file:

  • When you create a document-literal-bare Web Service, use the @WebParam JWS annotation to ensure that all input parameters for all operations of a given Web Service have a unique name. Because of the nature of document-literal-bare Web Services, if you do not explicitly use the @WebParam annotation to specify the name of the input parameters, WebLogic Server creates one for you and run the risk of duplicating the names of the parameters across a Web Service.
  • In general, document-literal-wrapped Web Services are the most interoperable type of Web Service.
  • Use the @WebResult JWS annotation to explicitly set the name of the returned value of an operation, rather than always relying on the hard-coded name return, which is the default name of the returned value if you do not use the @WebResult annotation in your JWS file.

留言

這個網誌中的熱門文章

java.lang.NoClassDefFoundError: org/apache/xerces/jaxp/datatype/XMLGregorianCalendarImpl$Parser

10 Tips for Proper Application Logging

Turn off WebLogic basic authentication