Hi all,
I developed a web service with an old version of JDeveloper some time ago, but now I have to migrate it to CXF. The WSDL uses elements from an schema (as operation parameters), but in the implementation the type of the parameters are org.w3c.dom.Element (that is because of the JDeveloper version used then). When I try to generate the service skeleton (using the same WSDL that the old web service has) using WSDL2Java tool, classes from the schema are generated, and the web service operations have parameters of these classes (classes from the schema). Then, several tests has been accomplished: - if I try to change the type of these parameters to type org.w3c.dom.Element (so as to include all the web service implementation I already have, as-is), I have an error when invoking that service, as the input parameter type is not the one expected. - If I keep the type of these parameters as generated by WSDL2Java tool, I marshall the input parameters, so as to obtain an object of type org.w3c.dom.Element, then I include all my web service implementation, and then I turn the result (an object of type org.w3c.dom.Element) into an object of the expected type (from the schema) by unmarshalling the org.w3c.dom.Element. However, some values of XML elements are lost, and the object returned is not correct (besides, the prefix namespaces are changed to ns2, ns3 and so). Is there is a way of indicating WSDL2Java tool a mapping from schema elements to java classes, so as to telling which classes has to use for specific schema element (that is, if an operation has a parameter of type x:ParameterType defined in the used schema, maybe I could say the WSDL2Java tool not to generate this element java class, but to use an existing java class instead)? I have to keep all the implementation of my old web service, as is a huge one and it is very expensive to use java classes generated by WSDL2Java tool within that implementation. Can you be so kind as to help me, please? Thank you very much in advance. Regards, Inma.
