2

My Domino Web Service Provider broke when I upgraded the (Win64) server from 8.5.3FP2 to FP3. I wrote some information about it to XPage forum.

Instead of fighting with Axis based legacy stuff I'd like to use JAX WS which comes with Java 1.6. I decided to try this very simple example. I copy pasted the code to a Java project on my Designer Eclipse, run it and the Web Service was up and running on my local machine: it responded and returned the WSDL.

Next I copy pasted the code to an NSF on server as Code/Java elements and changed:

public static void main(String[] args)

to

public HelloWorldPublisher()

and called this constructor from SSJS in XPage. I got this error:

Exception in thread "main" com.sun.xml.internal.ws.model.RuntimeModelerException : A @WebService.targetNamespace must be specified on classes with no package. Class: HelloWorldImpl

The classes were in packages. I run it also with command line on Domino server JVM and got the same error. After googling I added this

@WebService(targetNamespace="http://mycompany.net/dev/ph")

to HelloWorld and

@WebService(endpointInterface="com.mkyong.ws.HelloWorld", targetNamespace="http://mycompany.net/dev/ph", portName="HelloWorldPort", name="HelloWorld", serviceName="HelloWorldService")

to HelloWorldImpl in NSF and run it. After that the web service seemed to be up and running!

Next I booted the server because it was slow and after that I have not seen the WSDL! I've run the code many times, restarted HTTP and tried removing @WebService attributes. I've also tried to run the code with command line on server again but that gives me always the above @WebService.targetNamespace error, I have no idea why.

Now I get always this to Domino console:

java.lang.NoClassDefFoundError: com.sun.xml.internal.ws.api.streaming.XMLStreamWriterFactory (initialization failure) at java.lang.J9VMInternals.initialize(J9VMInternals.java:140) at com.sun.xml.internal.ws.server.SDDocumentImpl.writeTo(SDDocumentImpl.java:266) at com.sun.xml.internal.ws.transport.http.HttpAdapter.publishWSDL(HttpAdapter.java:538) at com.sun.xml.internal.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:230) at com.sun.xml.internal.ws.transport.http.server.WSHttpHandler.handleExchange(WSHttpHandler.java:107) at com.sun.xml.internal.ws.transport.http.server.WSHttpHandler.handle(WSHttpHandler.java:92) at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:77) at sun.net.httpserver.AuthFilter.doFilter(AuthFilter.java:77) at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:80) at sun.net.httpserver.ServerImpl$Exchange$LinkHandler.handle(ServerImpl.java:569) at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:77) at sun.net.httpserver.ServerImpl$Exchange.run(ServerImpl.java:541) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:897) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:919) at java.lang.Thread.run(Thread.java:738)

when accessing this URL on server:

http://localhost:9999/ws/hello?wsdl

I'm a bit surprised I get anything to Domino log because I think this uses JVM http server. I don't understand why it worked first and now it cannot find this class.

How do I publish JAX WS endpoint to Domino Server?

EDIT

I downloaded the JAX WS jars from here:

http://jax-ws.java.net/

and placed the them in \jvm\lib\ext folder. The WSDL URL started to work again! Also the endpoint URL has some information now. I don't know why I had to do this because the functionality should be included in JVM 1.6. Next I will try to use Domino objects in the endpoint code.

Is it possible to make JAX WS to use Domino http server?

thanks,

  • Panu
Panu Haaramo
  • 2,932
  • 19
  • 41
  • 2
    JAX-WS is part of J2EE, not J2SE (see: http://en.wikipedia.org/wiki/Java_API_for_XML_Web_Services) – Egor Margineanu Dec 02 '12 at 21:55
  • OK and Domino comes with J2SE? My JAX WS client has worked fine on Domino server and as I wrote I even got the endpoint up and running once without adding any JARs. All this makes me believe that at least most of JAX WS is included in Domino. – Panu Haaramo Dec 03 '12 at 08:02
  • Can we start putting these suggestions in answers instead of comments so that these questions stop showing up as unanswered, please? – Vic Mar 08 '13 at 16:34

1 Answers1

1

JAX-WS is already included in Notes/Domino. I suspect there may have been some instability introduced within your server whilst you were round-tripping during development.

I've created custom providers and consumers within XPages applications c/w SSJS and Custom Java access without issue since 8.5.3 and in 9.0.

Are you past your issue now? (if so, can you close out this question accordingly please :-)

  • Thanks, that's great to hear! I got my existing Provider design element to work so I didn't go this route yet (explained behind the link to XPages forum). But I will try the JAX-WS approach with the next endpoint that I'll create. – Panu Haaramo Mar 23 '13 at 15:30
  • Did I understand correctly that you can make an XPage to be an Endpoint? If yes it would be very interesting to get some more info. – Panu Haaramo Mar 23 '13 at 15:38
  • @tony: could you provide some samples please? – Patrick Kwinten Apr 28 '14 at 11:07