I have following xsd, from which I'm trying to generate JAXB bindings using maven plugin.
As you see above I have the above schema defined, such thta request type is completely defined in the above schema, but response is referred to a type defined in another schema.
Now, when I ran the JAXB, I see MainRequest.java something like below
but I do not see any response object as below
but instead see below class being generated as expected under shared/simpleInfo
Is there any way, like customizing the binding, so that JAXB generates class what I want, as changing the xsd is out of scope for us. Please advice.
The very reason I'm expecting to see an class MainResponse.java instead of simpleResponseType.java, is during the unmarshalling of the webservice response, we receive and the root element of the response would be <MainResponse> but not <SimpleResponseType>.
Before one can jump to any conclusion, I think one has to make sure the schema is properly constructed to define the vocabulary one is intended to define.
As far as I can see, you missed out the targetNamespace and that is critical. I wold say add that attribute and make sure you mean to have MainRequest and MainResponse defined in that namespace or which one in which namespace (the target namespace or the imported namespace).
subject: How to generate JAXB Bindings for the xml element definition which is extending from other xml