Generate xml from java object

M

mike

Hi,

I need to generate the following xml for a 100 users so I thougth I
generate it.

<typ:WOUser>
<typ:id>
<typ:serviceProviderId>AOne</typ:serviceProviderId>
<typ:companyId>Acme</typ:companyId>
<typ:userId>Alice</typ:userId>
</typ:id>
<typ:sipAddress>sip:[email protected]</typ:sipAddress>
<typ:firstName>Alice</typ:firstName>
<typ:lastName>Wonderland</typ:lastName>
<typ:password>{SHA}gpw4BEAbByf3D3PUQV4WJADL5Xs=</
typ:password>
</typ:WOUser>
</wopi:createUser>

The problem I have is to add the prefix typ when I generate it from an
WOUser object. Is there a good framework that can do it?

All hints and ideas are welcome.
 
A

Arne Vajhøj

mike said:
I need to generate the following xml for a 100 users so I thougth I
generate it.

<typ:WOUser>
<typ:id>
<typ:serviceProviderId>AOne</typ:serviceProviderId>
<typ:companyId>Acme</typ:companyId>
<typ:userId>Alice</typ:userId>
</typ:id>
<typ:sipAddress>sip:[email protected]</typ:sipAddress>
<typ:firstName>Alice</typ:firstName>
<typ:lastName>Wonderland</typ:lastName>
<typ:password>{SHA}gpw4BEAbByf3D3PUQV4WJADL5Xs=</
typ:password>
</typ:WOUser>
</wopi:createUser>

The problem I have is to add the prefix typ when I generate it from an
WOUser object. Is there a good framework that can do it?

Maybe JAXB.

Arne
 
A

Arved Sandstrom

mike said:
Hi,

I need to generate the following xml for a 100 users so I thougth I
generate it.

<typ:WOUser>
<typ:id>
<typ:serviceProviderId>AOne</typ:serviceProviderId>
<typ:companyId>Acme</typ:companyId>
<typ:userId>Alice</typ:userId>
</typ:id>
<typ:sipAddress>sip:[email protected]</typ:sipAddress>
<typ:firstName>Alice</typ:firstName>
<typ:lastName>Wonderland</typ:lastName>
<typ:password>{SHA}gpw4BEAbByf3D3PUQV4WJADL5Xs=</
typ:password>
</typ:WOUser>
</wopi:createUser>

The problem I have is to add the prefix typ when I generate it from an
WOUser object. Is there a good framework that can do it?

All hints and ideas are welcome.

You might want to investigate JAXB.

AHS
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top