Dice service working on WLS

As mentioned in a previous post the Dice service, which is my JAX-WS example for a cross platform service implementation, was not working on BEA WebLogic Servier v10. It turns out I missed a key part of JAX-WS & WLS documentation when putting the build script together. The guidelines in the WLS documentation states that the ant tasks need to have a type=”JAXWS” attribute set. Without this, WLS was treating the web service as a JAX-RPC one and that was the cause of the strange WSDL and the runtime exception.

The build-service target now looks like this:







So the only change is setting the type attribute to JAXWS. The WSDL generated for this service is identical to the one generated on Glassfish.

More problems with Dice service on WLS

As mentioned before, the Dice service does not auto deploy on WebLogic Server 10. According to the WLS Web Service documentation a weblogic ant task ‘JwscTask’ is needed to compile the annotated web service and produce the necessary WAR and EAR for deployment.

The build script I put together looks like this:

It successfully builds and deploys the web service. The deployed web service endpoint is /Dice/Dice so the service name makes up the context and the servlet url-pattern. As mentioned in a previous post both JBoss and OC4J default the servlet url-pattern to diceserviceport while Glassfish defaults to DiceService.

Also of note is that the WSDL on WLS is so different from the others by using the SOAP array type and ignoring the Die structure in the schema. That means that the size attribute is missing.

The big thing to note though is that there is a runtime error when trying to test the web service:
com.bea.xbean.values.XmlValueOutOfRangeException
at com.bea.xml.soap.SOAPArrayType.
at com.bea.staxb.runtime.internal.LiteralUnmarshalResult.extractSoapArrayType

So the mystery tour continues. I might just try the top down route based on a WSDL from the Dice service deployed on another platform. Naturally, I will keep you posted.

Dice Service does not auto deploy on WLS 10

I really wanted to see if WLS 10 would auto deploy the Dice Service WAR file just as easily as the OC4J, JBoss and Glassfish containers did. Since my early J2EE days (I started developing with Tengah WebLogic before BEA bought the small San Francisco based company) WLS has been a platform of choice for me. However, I have found that the Dice Service does not automatically deploy on WLS like it does on the other platforms.

The deployment error is:
weblogic.application.ModuleException: [HTTP:101216]Servlet: “DiceServicePort” failed to preload on startup in Web application: “WebServices.war”.
javax.servlet.ServletException: Servlet class: ‘soastation.jaxwsdice.Dice’ does not implement javax.servlet.Servlet

This will require some investigation, perhaps running through some of the WLS JAX-WS examples to find out what it’s real dependancies are. Watch this space.