All of these are different from XInclude. They need to be processed at the WSDL and schema layers, so unless you base your handling on code that supports at least the basic schema operations you're probably out of luck. In my experience Axis's WSDL2Java code appears to handle <xsd:import> correctly, at least when the imported schema definition is included in the same WSDL. I don't think I've tried it with schema definitions that are external to the WSDL.
Castor's code generation from schema definitely works with <xsd:import> and <xsd:include>, though to use it you'd need to split the component schemas out of the WSDL (which will often have multiple schema definitions) and probably save them as local files, adding schemaLocation attributes to the <xsd:import> statements. The whole process is probably going to be a little involved, but that should point you in the right direction if you want to go with Castor.
- Dennis
-- Dennis M. Sosnoski Enterprise Java, XML, and Web Services Training and Consulting http://www.sosnoski.com Redmond, WA 425.885.7197
Frank Cohen wrote:
It suprises me how little knowledge is out there for a Java developer to learn how to write Web Service consumers (clients) that can handle document-literal encoding of complex data types. I found a very good article on this topic at: http://www.sys-con.com/webservices/article.cfm?id=674
I manage an open source utility and framework for testing Web Services for scalability and performance. (Details on TestMaker are at http://www.pushtotest.com) I'm working on a more advanced Wizard to create test agent scripts for SOAP-based Web Services. The new Wizard will write a Jython script that makes a doc-lit/complex-type call to a service.
One of the things I've noticed about WSDL from a .NET Web Service is the use of schema include statements. In a <types><schemas> element I'll find something like this:
<s:import namespace="http://schemas.webservices.payroll-service.biz/payroll/" schemaLocation="payroll.xsd"/>
WSDL4J, JDOM and other WSDL handling libraries do not appear to handle an import. I found an open-source library that tries to do an XML include: http://xincluder.sourceforge.net/
I'm wondering if anyone knows how to best handle an import?
-Frank Cohen
[EMAIL PROTECTED]