Announcement Announcement Module
Collapse
No announcement yet.
How to use JaxWsPortProxyFactoryBean Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to use JaxWsPortProxyFactoryBean

    I am working on accessing a web service using info from the Spring docs, chap 17. I have the JAX-RPC version working with JaxRpcPortProxyFactoryBean. Now I would like to get the the JAX-WS version working with JaxWsPortProxyFactoryBean. The configuration seems simple enough, as the two configurations are almost exactly alike. But I'm not having success.

    My Spring config is just like in section 17.5.8, and the same as the RPC version, except for the JaxWsPortProxyFactoryBean. My interface is also simple
    package edu.umich.med.ls3.service;
    public interface PagerService
    {
    public String SendPageRequest(String pagerId, String message, String ipAddress);
    }
    The note at the end of section 17.5.8 says that the example is simplified, and that my interface needs to be annotated. But if I add a @WebService annotation to the interface I get a BeanCreationException with the cause of
    class: edu.umich.med.ls3.service.jaxws.SendPageRequest could not be found

    I've no idea why that class would be looked for. SendPageRequest is the method call, not a class, and the edu.umich.med.ls3.service.jaxws package doesn't exist. I'm lost here. Can anyone help?

    More of the stack trace is:
    Caused by: class: edu.umich.med.ls3.service.jaxws.SendPageRequest could not be found
    at com.sun.xml.internal.ws.modeler.RuntimeModeler.get Class(RuntimeModeler.java:271)
    at com.sun.xml.internal.ws.modeler.RuntimeModeler.pro cessDocWrappedMethod(RuntimeModeler.java:562)
    at com.sun.xml.internal.ws.modeler.RuntimeModeler.pro cessMethod(RuntimeModeler.java:509)
    at com.sun.xml.internal.ws.modeler.RuntimeModeler.pro cessClass(RuntimeModeler.java:355)
    at com.sun.xml.internal.ws.modeler.RuntimeModeler.bui ldRuntimeModel(RuntimeModeler.java:251)
    at com.sun.xml.internal.ws.client.ServiceContextBuild er.processAnnotations(ServiceContextBuilder.java:1 19)
    at com.sun.xml.internal.ws.client.ServiceContextBuild er.completeServiceContext(ServiceContextBuilder.ja va:87)
    at com.sun.xml.internal.ws.client.WSServiceDelegate.p rocessServiceContext(WSServiceDelegate.java:136)
    at com.sun.xml.internal.ws.client.WSServiceDelegate.c reateEndpointIFBaseProxy(WSServiceDelegate.java:28 8)
    at com.sun.xml.internal.ws.client.WSServiceDelegate.g etPort(WSServiceDelegate.java:174)
    at javax.xml.ws.Service.getPort(Service.java:94)
    at org.springframework.remoting.jaxws.JaxWsPortClient Interceptor.prepare(JaxWsPortClientInterceptor.jav a:149)
    at org.springframework.remoting.jaxws.JaxWsPortClient Interceptor.afterPropertiesSet(JaxWsPortClientInte rceptor.java:136)
    at org.springframework.remoting.jaxws.JaxWsPortProxyF actoryBean.afterPropertiesSet(JaxWsPortProxyFactor yBean.java:47)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.invokeInitMethods(Abstr actAutowireCapableBeanFactory.java:1390)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.initializeBean(Abstract AutowireCapableBeanFactory.java:1359)
    ... 41 more

  • #2
    You have to generate the jaxws proxy classes with apt first.

    Comment


    • #3
      Thanks for your reply, but I need more information. Could you please expand on your reply?

      Comment


      • #4
        Goto the JAX-WS website an read the manual for the apt-tool.

        Comment

        Working...
        X