I‘m currently using JWSPD to develop some prototypes and I thought it might be
useful to document a few things that are not immediately clear from the
documentation (at least, they were not to me).
Why use Sun’s
JWSDP (JAX-RPC Standard Implementation)?
-
From my experience, it has better WSDL and document-style web services support
than Axis. For example, you can read this
article or my
blog entry about the problems that Axis has with document/literal services (alhough
these problems might be fixed in Axis2). - It‘s a reference implementation which should have better JAX -RPC compliance.
On the downside, JWSDP is more difficult to use than Axis, you have to use “wscomplile“
and “wsdeploy“ tools and it takes some time to set it up.
First of all, you probably want to run JWSDP under the latest version of the
Jakarta/ Tomcat. JWSDP documentation says that it requires modified Tomcat 5.0
which you can download from Sun‘s website (or Sun‘s application server), but you
don‘t need it. From my experience, it works with jakarta-tomcat-5.5.9 just fine.
You just need to pull all JWSDP jars under “WEB-INF/libâ€. Here is the list (I
may have some extras there, I did not try to figure out which ones are not
needed):
FastInfoset.jar
activation.jar
commons-beanutils.jar
commons-collections.jar
commons-digester.jar
commons-logging.jar
dom.jar
jaas.jar
jax-qname.jar
jaxb-api.jar
jaxb-impl.jar
jaxb-libs.jar
jaxb-xjc.jar
jaxp-api.jar
jaxrpc-api.jar
jaxrpc-impl.jar
jaxrpc-spi.jar
jsr173_api.jar
mail.jar
namespace.jar
saaj-api.jar
saaj-impl.jar
sjsxp.jar
xmlsec.jar
xsdlib.jar
You need to read this
article first to understand the difference between wrapped and unwrapped
mode.
I‘m assuming that you‘ll be generating Java classes from WSDL , not the other
way around.
-
If you‘re implementing document/literal service with wrapper (JAX-RPC style):
This is the default in JWSDP . From my experience, JWSDP uses this style even if
operation name does not match the outer element name in the schema as prescribed
by JAX -RPC. -
If you‘re implementing document/literal non-wrapper (WS-I style):
You need to use “-f:wsi“ to switch to this mode. Note that in this case you must
use model file (“-model“). Model file is used to pass the information to “wsdeploy“
utility. “wsdeploy“ calls “wscompile“ under the covers, but you can‘t directly
set “wscompile“ options on “wsdeploy“ command line. Model file is what‘s used to
pass these options to “wsdeploy“. Also, don‘t forget to use “-f:wsi“ for the
client‘s stub generation (“-gen:clientâ€) option.
Finally, a sample build file is available here.
Tags: Web services, JAX-RPC, JWSDP, Sun