Announcement Announcement Module
Collapse
No announcement yet.
org.springframework.xml.transform.ResourceSource nor any of its super class is known Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • org.springframework.xml.transform.ResourceSource nor any of its super class is known

    I am trying to get the spring ws client working. I am able to see the wsdl on the serverside. While connecting from spring ws client project I am getting the stacktrace as below.

    I have all the spring-xml in the classpath but it could not see. It is getting classnotfoundexception internally.

    Any help is appreciated. Looks like classpath issue, but could not figure out what is missing.


    Caused by: javax.xml.bind.JAXBException: class org.springframework.xml.transform.ResourceSource nor any of its super class is known to this context.
    at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getBea nInfo(JAXBContextImpl.java:556)
    at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsR oot(XMLSerializer.java:478)
    at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(M arshallerImpl.java:328)
    at com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal (MarshallerImpl.java:257)
    at org.springframework.oxm.jaxb.Jaxb2Marshaller.marsh al(Jaxb2Marshaller.java:379)

    client code:

    Source requestSource = new ResourceSource(request);
    StringResult result = new StringResult();
    Jaxb2Marshaller marshaller = new Jaxb2Marshaller();
    marshaller.setClassesToBeBound(new Class[]{<request classname>.class,<response classname>.class});

    marshaller.afterPropertiesSet();
    getWebServiceTemplate().setMarshaller(marshaller);
    getWebServiceTemplate().setUnmarshaller((Unmarshal ler)marshaller);


    getWebServiceTemplate().marshalSendAndReceive(requ estSource, new WebServiceMessageCallback() {

    public void doWithMessage(WebServiceMessage message) {

    ((SoapMessage)message).setSoapAction("http://localhost:9081/.../");
    }
    });
    Last edited by Lakshmanan; May 28th, 2009, 12:03 PM.
Working...
X