You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "Zerbst, Carsten" <Ca...@PROSTEP.com> on 2007/08/20 09:34:08 UTC

Problems using XMLBeans (xsi:type missing)

Hello, 

I created a webservice (from wsdl) using XMLBeans binding. Short before finishing the project I run into a problem
with the XML binding. 

The wsdl describes some abstract complex_types and specific elements in a different namespace. When using XMLBeans
the xsi:type is suppressed. E.g. when creating a query like this 

  QueryDocument query = QueryDocument.Factory.newInstance();
  QueryParameter par = query.addNewQuery();

  ExplicitItemQuery start = ExplicitItemQuery.Factory.newInstance();
  start.setName( "test" );
  par.setQuery( start );

the resulting xml is 

<query xmlns="urn:space.eads.net/ssrm/services/parameter" xmlns:spec="urn:space.eads.net/ssrm/services/specificQuery">
  <query>
    <spec:name>test</spec:name>
  </query>
</query>

Using the equivalent ADB code results in 

 <ns4:query xmlns:ns4="urn:space.eads.net/ssrm/services/parameter">
	<ns4:query xmlns:ns6="urn:space.eads.net/ssrm/services/specificQuery" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 			xsi:type="ns6:Explicit_item_query">
		<ns6:name>test</ns6:name>
	</ns4:query>
</ns4:query>

where the xsi:type contains the right type. Is there a way to persuade XMLBeans to use the xsi:type ?
A change from XMLBeans to ADB would take some time ...

Bye, Carsten 


___
Dr.-Ing. Carsten Zerbst 

PROSTEP ITS  GmbH
Hein-Saß-Weg 19, D-21129 Hamburg

Tel: +49 40 209 1608 12
Mobil: +49 178 950 9468
E-Mail: carsten.zerbst@prostep.com
http://www.prostep.com
________________________________________________
PROSTEP ITS GmbH, Dolivostr.11, D-64293 Darmstadt
HR: Amtsgericht Darmstadt, HRB 8805
Geschäftsführung: Dr. Markus Sachers, Reinhard Betz 
________________________________________________

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Problems using XMLBeans (xsi:type missing)

Posted by Amila Suriarachchi <am...@gmail.com>.
On 8/20/07, Zerbst, Carsten <Ca...@prostep.com> wrote:
>
> Hello,
>
> I created a webservice (from wsdl) using XMLBeans binding. Short before
> finishing the project I run into a problem
> with the XML binding.
>
> The wsdl describes some abstract complex_types and specific elements in a
> different namespace. When using XMLBeans
> the xsi:type is suppressed. E.g. when creating a query like this
>
>   QueryDocument query = QueryDocument.Factory.newInstance();
>   QueryParameter par = query.addNewQuery();
>
>   ExplicitItemQuery start = ExplicitItemQuery.Factory.newInstance();
>   start.setName( "test" );
>   par.setQuery( start );
>
> the resulting xml is
>
> <query xmlns="urn:space.eads.net/ssrm/services/parameter" xmlns:spec="urn:
> space.eads.net/ssrm/services/specificQuery">
>   <query>
>     <spec:name>test</spec:name>
>   </query>
> </query>
>
> Using the equivalent ADB code results in
>
> <ns4:query xmlns:ns4="urn:space.eads.net/ssrm/services/parameter">
>         <ns4:query xmlns:ns6="urn:
> space.eads.net/ssrm/services/specificQuery" xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance"
> xsi:type="ns6:Explicit_item_query">
>                 <ns6:name>test</ns6:name>
>         </ns4:query>
> </ns4:query>
>
> where the xsi:type contains the right type. Is there a way to persuade
> XMLBeans to use the xsi:type ?
> A change from XMLBeans to ADB would take some time ...


Can you replace the Axis2 generated Xmlbeans code with the xmlbeans code
directly generated from the xmlbeans scomp command.

what is the Axis2 version you use?

Amila.

Bye, Carsten
>
>
> ___
> Dr.-Ing. Carsten Zerbst
>
> PROSTEP ITS  GmbH
> Hein-Saß-Weg 19, D-21129 Hamburg
>
> Tel: +49 40 209 1608 12
> Mobil: +49 178 950 9468
> E-Mail: carsten.zerbst@prostep.com
> http://www.prostep.com
> ________________________________________________
> PROSTEP ITS GmbH, Dolivostr.11, D-64293 Darmstadt
> HR: Amtsgericht Darmstadt, HRB 8805
> Geschäftsführung: Dr. Markus Sachers, Reinhard Betz
> ________________________________________________
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Amila Suriarachchi,
WSO2 Inc.