WSDL2Java fails when the WSDL contains an optional unsupported policy
---------------------------------------------------------------------

                 Key: AXIS2-3927
                 URL: https://issues.apache.org/jira/browse/AXIS2-3927
             Project: Axis 2.0 (Axis2)
          Issue Type: Bug
          Components: wsdl
            Reporter: Wen Zhu


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