Hi, folks. I have been seeing an apparent bug in the Axis2 WSDL2Java code. Specifically, I have WSDL that looks like this:
<wsdl:definitions targetNamespace="http://www.example.com/wsdl/router" xmlns:schema="http://www.example.com/schemas"> <wsdl:import namespace="http://www.example.com/schemas" location="MySchema.xsd"/> <wsdl:message name="routeEmergencyIncidentRequest"> <wsdl:part name="vehicularEmergencyIncident" type="schema:MyElement"/> </wsdl:message> which seems to correctly generate Java code for the types mentioned in MySchema.xsd, and also produces a RouteEmergencyIncidentRequest type as I would have expected. However, this code is supposedly illegal according to http://www.xml.com/pub/a/ws/2003/08/05/wsdl.html because it uses wsdl:import to import something that is not a WSDL document but is in fact an XML schema. However, if I replace it with the following, which is supposedly correct: <wsdl:definitions targetNamespace="http://www.example.com/wsdl/router" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:schema="http://www.example.com/schemas"> <wsdl:types> <xsd:schema> <xsd:import id="Something" namespace="http://www.example.com/schemas" schemaLocation="MySchema.xsd"/> </xsd:schema> </wsdl:types> <wsdl:message name="routeEmergencyIncidentRequest"> <wsdl:part name="vehicularEmergencyIncident" type="schema:MyElement"/> </wsdl:message> then if I run WSDL2Java, it generates Java code as before for the types mentioned in MySchema.xsd, but it does NOT produce a RouteEmergencyIncident class, leaving me nothing to use to parse the OMElement that the generated server skeleton takes as a parameter. (And, for that matter, I have no idea why a server skeleton method taking an OMElement parameter is produced, rather than a MyElement parameter. This also seems like a bug.). It seems to me that which form of import I use shouldn't determine whether or not Java types are generated for each message. The biggest problem for me in this respect is that the second form of the WSDL (the one using xsd:import) is the one actually used by the WSDL that I have been given by a third party. So just changing it is not an attractive option. Is this a bug? Any advice would be appreciated. Thanks! Derek --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]