[ 
https://issues.apache.org/jira/browse/AXIS2-3927?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Amila Chinthaka Suriarachchi resolved AXIS2-3927.
-------------------------------------------------

    Resolution: Fixed

Resolve this issue since this type of wsdl policy references works with 
WS-Security policies. 

If you still get this problem with the current trunk please reopen the issue 
with the wsdl file.

> WSDL2Java fails when the WSDL contains an optional unsupported policy
> ---------------------------------------------------------------------
>
>                 Key: AXIS2-3927
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3927
>             Project: Axis2
>          Issue Type: Bug
>          Components: codegen
>            Reporter: Wen Zhu
>            Assignee: Amila Chinthaka Suriarachchi
>
> The WSDL we use contains an WS-AtomicTransaction policy assertion with 
> wsp:Optional set to true:
> ... ...
>     <wsp:Policy wsu:Id="TransactionPolicy" 
> xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"; >
>         <wsp:ExactlyOne>
>             <wsp:All>
>                 <wsat:ATAssertion 
> xmlns:wsat="http://schemas.xmlsoap.org/ws/2004/10/wsat";  wsp:Optional="true"/>
>             </wsp:All>
>         </wsp:ExactlyOne>
>     </wsp:Policy>
> ... ...
> And this policy is referenced in WSDL through reference:
>        <wsp:PolicyReference URI="#TransactionPolicy"/>
> While we know Axis2 does not currently support WS-AT, we did not expect it to 
> throw an exception complaining about "TransactionPolicy" not being a 
> malformed URL. After examine the code, we realized that WSDL2Java generate 
> policy related code in two phases:
> During the first phase it registers the policies in a registery. In this 
> case, because it does understand wsat:ATAssertion, the assertion was not put 
> in the policy registry. During the second phase of the generation process, it 
> tries to look up the policy in the registery using the key 
> "TransactionPolicy" (without the '#'). And when that fails, it tries to 
> lookup the policy using the url "TransactionPolicy", resulting a malformed 
> URL exception.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to