Return-Path: Delivered-To: apmail-incubator-cxf-dev-archive@locus.apache.org Received: (qmail 5895 invoked from network); 6 Dec 2006 12:04:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Dec 2006 12:04:13 -0000 Received: (qmail 46305 invoked by uid 500); 6 Dec 2006 12:04:21 -0000 Delivered-To: apmail-incubator-cxf-dev-archive@incubator.apache.org Received: (qmail 46279 invoked by uid 500); 6 Dec 2006 12:04:21 -0000 Mailing-List: contact cxf-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cxf-dev@incubator.apache.org Delivered-To: mailing list cxf-dev@incubator.apache.org Received: (qmail 46270 invoked by uid 99); 6 Dec 2006 12:04:21 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Dec 2006 04:04:21 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of Andrea.Smyth@iona.com designates 62.221.12.33 as permitted sender) Received: from [62.221.12.33] (HELO emea-smg1.iona.com) (62.221.12.33) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Dec 2006 04:04:10 -0800 Received: from emea-ems1.ionaglobal.com (dutec.ie [10.2.1.125]) by emea-smg1.iona.com (Switch-3.1.7/Switch-3.1.7) with ESMTP id kB6D2NY3022222 for ; Wed, 6 Dec 2006 13:02:23 GMT Received: from [10.5.2.41] ([10.5.2.41]) by emea-ems1.ionaglobal.com with Microsoft SMTPSVC(5.0.2195.6713); Wed, 6 Dec 2006 12:03:47 +0000 Message-ID: <4576B171.6070308@iona.com> Date: Wed, 06 Dec 2006 12:02:57 +0000 From: Andrea Smyth User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: cxf-dev@incubator.apache.org Subject: Re: Service Model problem with ws-policy References: <9A4696F35B459043970EE4A85A317390176889@amer-ems1.IONAGLOBAL.COM> <7b774c950612051947p491b8d35yc8dcfa6ccb853cc@mail.gmail.com> In-Reply-To: <7b774c950612051947p491b8d35yc8dcfa6ccb853cc@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 06 Dec 2006 12:03:47.0237 (UTC) FILETIME=[9598FD50:01C7192E] X-Virus-Checked: Checked by ClamAV on apache.org +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) 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: >> >> >> > 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: >> >> >> * >> <-- extensibility element (1) --> * >> * >> <-- extensibility element (2) --> * >> ? >> <-- extensibility element (3) --> >> >> ? >> <-- extensibility element (4) --> * >> >> * >> <-- extensibility element (5) --> * >> >> >> >> >> >> >> 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 >> > > >