Especifications: - Server: Weblogic 9.2 installed by the client. - Web services defined by wsdl and xsd files fixed by the client; no changes are allowed.
Hi,
In the project, we need to develop a mail system. This should do the overall job with the webservice. We create a Bean that receives an automatically generated class from a non-root xsd element (and not wsdl); this bean does this common job. The mail system receives xml with the elements defined in the xsd file, and we need to drop this element information into the classes generated by wsdlc. With these objects we can use this common bean. Unable to redirect email request to web service.
We are looking for code for this with WL9.2 resources, but we did not find anything. At the moment, we tried to use JAXB for this unmarshalling:
JAXBContext c = JAXBContext.newInstance(new Class[]{WasteDCSType.class});
Unmarshaller u = c.createUnmarshaller();
WasteDCSType w = u.unmarshal(waste, WasteDCSType.class).getValue();
the waste variable is an object of the DOM Element. This is not the root element because the root is not included in the XSD
First we needed to add the no-arg constructor in some auto-generated classes. No problem, we solved it, and finally, we unmarshalled xml with no exception errors. But we had problems with attributes. Nesarchalling did not set attributes; none of them in any class, simple attributes, large or short enumeration attributes. No problem with xml elements of any type.
We cannot create unmarshaller from the "context line" (package name) because ObjectFactory was not created by wsldc. If we install the circuit, the descriptions of the elements will not be based, but the failure is unmarshall.
:
<taskdef name="jwsc" classname="weblogic.wsee.tools.anttasks.JwscTask" />
<taskdef name="wsdlc" classname="weblogic.wsee.tools.anttasks.WsdlcTask"/>
<target name="generate-from-wsdl">
<wsdlc
srcWsdl="${src.dir}/wsdls/e3s-environmentalMasterData.wsdl"
destJwsDir="${src.dir}/webservices"
destImplDir="${src.dir}/webservices"
packageName="org.arc.eterws.generated"
/>
<wsdlc
srcWsdl="${src.dir}/wsdls/e3s-waste.wsdl"
destJwsDir="${src.dir}/webservices"
destImplDir="${src.dir}/webservices"
packageName="org.arc.eterws.generated"
/>
</target>
<target name="webservices" description="">
<jwsc srcdir="${src.dir}/webservices" destdir="${dest.dir}" classpathref="wspath">
<module contextPath="E3S" name="webservices">
<jws file="org/arc/eterws/impl/IE3SEnvironmentalMasterDataImpl.java"
compiledWsdl="${src.dir}/webservices/e3s-environmentalMasterData_wsdl.jar"/>
<jws file="org/arc/eterws/impl/Ie3SWasteImpl.java"
compiledWsdl="${src.dir}/webservices/e3s-waste_wsdl.jar"/>
<descriptor file="${src.dir}/webservices/META-INF/web.xml"/>
</module>
</jwsc>
</target>
:
- Weblogic "unmarshall" xml
JAX-RPC,
xsd?
- , ?
- , -
?
- , XMLBean.
XSD JAXB.?
?
. xsd, xsd.