cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Li, Tao \(Tom\)" <Tao...@iona.com>
Subject Service Model problem with ws-policy
Date Tue, 05 Dec 2006 05:57:24 GMT
Hi Andrea,

Currently, if a wsdl file contains ws-policy assertions,
our cxf can't build service model correctly.

In WSDLServiceBuilder.buildBinding method, it assumed that
the first ext element is the one specify the protocol (such 
as soap), but if the wsdl has ws-policy assertion, the first
element of binding may be the wsp:PolicyReference.

our code:
String ns = ((ExtensibilityElement)binding.getExtensibilityElements()
       .get(0)).getElementType().getNamespaceURI();

wsdl sample:
    <wsdl:binding name="BasicHttpBinding_IMtomTest" type="i0:IMtomTest">
        <wsp:PolicyReference URI="#BasicHttpBinding_IMtomTest_policy" />
        <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
	...

But what make me confused is when I look up the wsdl spec
(http://www.w3.org/TR/wsdl), I found the binding chapter specify
the binding part should like below:

Digest from http://www.w3.org/TR/wsdl

The grammar for a binding is as follows:

<wsdl:definitions .... >
    <wsdl:binding name="nmtoken" type="qname"> *
        <-- extensibility element (1) --> *
        <wsdl:operation name="nmtoken"> *
           <-- extensibility element (2) --> *
           <wsdl:input name="nmtoken"? > ?
               <-- extensibility element (3) --> 
           </wsdl:input>
           <wsdl:output name="nmtoken"? > ?
               <-- extensibility element (4) --> *
           </wsdl:output>
           <wsdl:fault name="nmtoken"> *
               <-- extensibility element (5) --> *
           </wsdl:fault>
        </wsdl:operation>
    </wsdl:binding>
</wsdl:definitions>


Could we add a filter out map in WSDLServiceBuilder to filter out any 
well-known elements namespace which may precedes the protocol element of 
the binding to solve this type problem.

Thanks.
Tom

Mime
View raw message