Hello Karl:

Thanks for your message.

1) Use JSR181 annotations?
2) My sample is an abstract POJO structure for these classes, and it does
can get the Style1 XML that I represented.

Jing.


Karl Palsson wrote:
> 
> 
> There are annotations I believe you can use to say attribute rather than
> element, but you've over simplifying.
> 
> Your sample doesn't handle this case:
> 
>> 1) User.class
>>        String userId
>>        GroupInfo groupInfoArray[]
>          GroupInfo enemyGroups[]
>> 
>> 2) GroupInfo
>>        String groupId
>>        RoleInfo roleInfoArray[]
>          RoleInfo roleInfoSubservientTo[]
>> 
>> 3) RoleInfo
>>        String roleId
> 
> XML is not generally regarded as a byte efficient representation format. 
> It is well regarded as being extremely machine readable, yet still human
> readable.  If you feel that this is insufficient for your needs, by all
> means, use your own proprietary serialization methods :)
> 
> Cheers,
> Karl P
> 
> 
> 
>> -----Original Message-----
>> From: jzs11 [mailto:[EMAIL PROTECTED] 
>> Sent: Thursday, April 12, 2007 10:03 PM
>> To: user@xfire.codehaus.org
>> Subject: [xfire-user] How can I change the WebService(Xfire) 
>> response message style?
>> 
>> 
>> Hello All:
>> 
>> I will try to explain things as simple as possible here.
>> Currently I can get the Web Service SOAP response message in 
>> this Style1:
>> <user>
>>    <userId>1</userId>
>>    <groupInfoArray>
>>       <GroupInfo>
>>          <groupId>1</groupId>
>>          <roleInfoArray>
>>             <RoleInfo>
>>                <roleId>1</roleId> 
>>             </RoleInfo>      
>>          </roleInfoArray>  
>>       </GroupInfo>
>>       <GroupInfo>
>>          <groupId>2</groupId>
>>          <roleInfoArray>
>>             <RoleInfo>
>>                <roleId>1</roleId> 
>>             </RoleInfo>      
>>             <RoleInfo>
>>                <roleId>2</roleId> 
>>             </RoleInfo>     
>>          </roleInfoArray>  
>>       </GroupInfo>       
>>    </groupInfoArray>
>> </user>
>> 
>> This is the Style1 POJO structure
>> 1) User.class
>>        String userId
>>        GroupInfo groupInfoArray[]
>> 
>> 2) GroupInfo
>>        String groupId
>>        RoleInfo roleInfoArray[]
>> 
>> 3) RoleInfo
>>        String roleId
>>        
>> It looks really dumm.
>> In this Style1 lots of redundent information has been 
>> transfered, so I must make some improvements:
>> 
>> This is the Style2 I prefer:
>> <user id="1">
>>    <group id="1">
>>       <role id="1"/>
>>    </group>
>>    <group id="2">
>>       <role id="1"/>
>>       <role id="2"/>
>>    </group>
>> </user>
>> 
>> How can I achieve the Style2 by using the Xfire? Let the 
>> attributes carray the information instead of elements?
>> Thank you.
>> Jing.
>> --
>> View this message in context: 
>> http://www.nabble.com/How-can-I-change-the-WebService%28Xfire%
>> 29-response-message-style--tf3568571.html#a9969280
>> Sent from the XFire - User mailing list archive at Nabble.com.
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe from this list please visit:
>> 
>>     http://xircles.codehaus.org/manage_email
>> 
>> 
> 
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
> 
>     http://xircles.codehaus.org/manage_email
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-can-I-change-the-style-of-WebService%28Xfire%29-response-message--tf3568571.html#a10006918
Sent from the XFire - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to