I am new to use all this stuff. I am just moving forward by reading the spring-ws tutorial. I am using Jaxb2Marshaller for marshalling and unmarshalling. All that I want to do is just Marshalling and Unmarshalling. I don't want to go through webservice stuff and all. Please see below what I have done so far.
1. Downloaded JWSDP2.0 pack, which contains Jaxb2.0 and am added the jars (jaxb1-impl.jar,jaxb-api.jar,jaxb-impl.jar,jaxb-xjc.jar and the jars coming with spring-ws-1.0.1 release) into class path.
2. Ran Jaxb Schemangen.bat against java file (Settings.java bean) for generating XSD file.
3. After XSD generated, then I ran xjc.bat (Jaxb compiler) against this XSD file.
4. Then it has generated two files: ObjectFactory.java and Settings.java in generated folder.
5. Configured Jaxb2Marshaller in applicationContext as specified below.
<bean id="application" class="testing.Application">
<property name="marshaller" ref="jaxb2Marshaller" />
<property name="unmarshaller" ref="jaxb2Marshaller" />
<bean id="jaxb2Marshaller" class="org.springframework.oxm.jaxb.Jaxb2Marshalle r">
<property name="contextPath" value="generated">
Here, "generated" folder contains the java files ObjectFactory.java and Settings.java generated xjc compiler.
6. Then I ran into two exceptions one after the other
i. java.lang.NoClassDefFoundError: javax.activation.DataSource - I have added Activation.jar into class path to resolve this problem.
ii. java.lang.NoClassDefFoundError: javax.xml.stream.XMLStreamException - I have added jsr173_1.0_api.jar into class path to resolve this problem.
7. Now I am getting the following exception when it calls marshall method.
org.springframework.oxm.jaxb.JaxbSystemException: Settings nor any of its super class is known to this context; nested exception is
javax.xml.bind.JAXBException: Settings nor any of its super class is known to this context
As I am spending lot of time so far in resolving the above exception, I thought of letting you know about this. I would be very happy if you can provide any clues/suggestions for resolving this error. Also, point me if am doing anything wrong here.
Marshalling and unMarshalling using Jaxb2Marshaller
Thanks. Marshalling and unMarshalling using Jaxb2Marshaller works fine for me