
Originally Posted by
johnhunsley
Hi,
I have successfully implemented spring ws services and clients and found it cumbersome to create end point marshaling using XPath or parsing the Elements and Nodes directly.
Spring ws does a great job of creating the WSDL file from an .xsd schema but why do I have to map the client request to an object manually in my end point using XPath or by getting the String value from each Element using element.getChildText(.......)
Does Spring ws have any way of automatically generating a mapping from a schema file, or is this planned in further releases?
I imagine it would be the obvious next step and should be fairly easy to implement, if its not planned could I raise a ticket for this enhancement on JIRA?
Kind regards,
John.
I do not think it is SWS responisbilty to generate such a mapping.
It is just a matter of using OXM solution that meets your requirements.
I am using jaxb2 and created ant script for my project
Code:
<path id="jaxb-lib" >
<fileset dir="../build/repository/jaxb-ri-20061211" includes="**/*.jar"/>
</path>
<taskdef name="xjc" classname="com.sun.tools.xjc.XJCTask" classpathref="jaxb-lib"/>
<target name="genJaxbSources">
<echo message="generating jaxb2 sources"/>
<xjc package="foo.bar.schema" destdir="${gen.destdir}">
<schema dir="directory_with_schema_files">
<include name="*.xsd"/>
</schema>
</xjc>
</target>