Hi Dennis,
You can change your schema (assuming it's under your control) to use
element substitution groups. With a substitution group, each element
name can be tied to a specific extension of the base type.
I realize that if you're not schema-knowledgeable this suggestion may
not make much sense directly, but hopefully it gives you a starting
point for searching. :-)
- Dennis
--
Dennis M. Sosnoski
SOA and Web Services in Java
Axis2 Training and Consulting
http://www.sosnoski.com - http://www.sosnoski.co.nz
Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117
Dennis Korbar wrote:
Hello,
I'm using axis2 for stub-generation on a webservice.
I was wondering if it is possible to turn off the use of xsi:type for
the type definition, to be a bit more specific consider the following
example:
Let's say I have a "vehicle" definition which is an abstract type, and
derived from this I have a car definition, now the generated stub will
produce a request like the following:
<myRequest xmlns="myNamespace" xmlns:typ="anotherNamespace"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<sometag>
<typ:Vehicle xsi:type="typ:Car">
<typ:Engine xsi:type="typ:ElectricEngine"/>
</typ:Vehicle>
</sometag>
</myRequest>
But what I want, is to have it look like this:
<myRequest xmlns="myNamespace" xmlns:typ="anotherNamespace"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<sometag>
<typ:Car>
<typ:ElectricEngine/>
</typ:Car>
</sometag>
</myRequest>
Is it possible to configure the stub generation to create requests the
way described above? Or is there some config parameter I can set?
I'm neither a xml or webservice expert, so I'm sorry if I'm confusing
some terms here, maybe I'm even posting on the wrong mailing list?
(Maybe xmlbeans mailing list will be more appropriate?) :-)
Cheers,
Dennis