axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Amila Jayasekara <ami...@wso2.com>
Subject Issue in wsdl2java ?
Date Sun, 04 Jul 2010 06:37:44 GMT
Hi All,

I am working on issue, rampart-225. While working on it, I encountered 
an unusual structure in messages generated by the client. Later I found 
out that this unusual behavior is due to the way wsdl2java generates code.

I have attached the policy which I am using. (policy.xml)

According to attached policy file, my intension is to use asymmetric 
binding with a single user name token as a supporting token. But in the 
code generated by wsdl2java I found somewhat different policy. The 
policy-generated.xml contains the policy text used by generated client.

If you inspect generated policy, you would see that all top level policy 
components are duplicated. (See comment <!-- Repeating element –> comment.)

Within Rampart, most of the policy components are initialized using set 
methods. Therefore having a duplicate policy component has not much 
effect on generated messages. But problem occurs when an user wants to 
use supporting tokens, because supporting tokens are added to a list (or 
array). Therefore the output message generated by client will have two 
supporting tokens with the same structure. But policy defines only one.

The sample1.xml contains a message generated by client. Sample1.xml 
contains two user name tokens. But ideally there should only be one user 
name token element.

This problem will not surface when I purposefully load a policy and use 
it in client code. It seems that the issue lies within wsdl2java tool.

Is this an actual issue or an expected behavior ?

If it is an expected behavior, why we need to have that ?(Something to 
do with policy normalization ?)

If this is an expected behavior we definitely have work to do in rampart 
end.

Also policy components are not duplicate every time. I couldn't isolate 
a specific scenario and also couldn't fathom why it is duplicating for 
few cases and not for all.

Appreciate if someone with better knowledge about wsdl2java can give 
feedback.

Thank you
Regards,
AmilaJ


Mime
View raw message