cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrea Smyth <andrea.sm...@iona.com>
Subject Re: Service Model problem with ws-policy
Date Wed, 06 Dec 2006 12:02:57 GMT
+1 for this approach.
We should also consider using a default (soap 1.1) if no binding factory 
is found this way, and apply the same approach to the transports 
(default to http).
It will obsolete the fields transportId and bindingId in 
EndpointInfo/BindingInfo.

Andrea.

Dan Diephouse wrote:

> Yeah, I brought this up once before but never did anything about it. 
> We need
> a much more robust way to select the appropriate namespace. One option 
> would
> be to just loop through the elements until we find a bindingfactory:
>
> BindingFactory bindingFactory = null;
> for (ExtensibilityElement e : extensibilityElements) {
>  bindingFactory = bindingFactoryManager.getBinding(e.getElementType
> ().getNamespaceURI());
>  if (bindingFactory != null) break;
> }
>
> Regards,
> - Dan
>
> On 12/5/06, Li, Tao (Tom) <Tao.Li@iona.com> wrote:
>
>>
>> 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