Hi Alessio, I tested the new patch and it works in my scenario. Thanks. 2012/12/12 Alessio Soldano <[email protected]>
> Hi Bin, > I've created https://issues.apache.org/jira/browse/CXF-4695 to deal with > the issue, given CXF-4677 has already been included in a release. > Please have a look at the patch I've attached to CXF-4695, I believe > that should be fine for both your scenario and mine (the patch you > previously attached to 4677 was not ok for me). > If the patch is fine I'll likely add a testcase and commit. > Cheers > Alessio > > On 12/10/2012 10:58 AM, Bin Zhu wrote: > > Thanks Alessio :-) > > > > 2012/12/10 Alessio Soldano <[email protected]> > > > >> Hi Bin, > >> just read your message (Friday was bank holiday here). I'll check your > >> patch and improve my fix to cover your scenario too. > >> Will create a new jira and link to the current one, as the release > >> process for 2.7.1 has been started in the meantime. > >> Cheers > >> Alessio > >> > >> On 12/07/2012 09:28 AM, Bin Zhu wrote: > >>> Hi Alessio, > >>> > >>> I've attached the patch here > >>> > https://issues.apache.org/jira/secure/attachment/12559830/CXF-4677.patch > >>> Can you help review it? Thanks. > >>> > >>> > >>> 2012/12/6 Alessio Soldano <[email protected]> > >>> > >>>> Hi Bin, > >>>> ok, either commit or attach an additional patch to CXF-4677 jira and > let > >>>> me review before the upcoming release ;-) > >>>> > >>>> Alessio > >>>> > >>>> On 12/06/2012 08:23 AM, Bin Zhu wrote: > >>>>> Hi, > >>>>> > >>>>> Thanks for the quick response. I've tried this patch but it doesn't > >>>> update > >>>>> all the soapaddress locations in my test. > >>>>> > >>>>> Looked into the code and find that reason is an Exception will be > throw > >>>> in > >>>>> the following line in new added > >>>> WSDLGetUtils.rewriteAddressProtocolHostPort > >>>>> method: > >>>>> URL locUrl = new URL(location); // Exception will be thrown in this > >> line > >>>>> since the value of location is like"/InventoryService" > >>>>> > >>>>> It is suggested to get the http base path by using " String > basePath = > >>>>> (String) message.get("http.base.path")" in rewriteAllSoapAddress > logic, > >>>>> then append it to the soapaddress location > >>>>> in WSDLGetUtils.rewriteAddressProtocolHostPort method. > >>>>> > >>>>> I made the changes and it works in my local box. I would like to make > >>>> this > >>>>> fix if you don't mind. Thanks. > >>>>> > >>>>> > >>>>> > >>>>> 2012/12/5 Alessio Soldano <[email protected]> > >>>>> > >>>>>> Hi, > >>>>>> I've committed a patch for supporting > >>>>>> 'autoRewriteSoapAddressForAllServices' option. The main difference > >> with > >>>>>> what the already existing 'autoRewriteSoapAddress' option did, is > that > >>>>>> when rewriting the other service/ports soap:address location > >> attributes, > >>>>>> the existing path component of the address is not changed, as that > >> would > >>>>>> not really make sense. > >>>>>> > >>>>>> The new option is an extension of the former one; so setting the new > >> one > >>>>>> to true implies also enable the former one (IOW the current > >> service/port > >>>>>> address is also fully rewritten). > >>>>>> > >>>>>> Cheers > >>>>>> Alessio > >>>>>> > >>>>>> On 12/05/2012 11:51 AM, Andrei Shakirin wrote: > >>>>>>> Issue https://issues.apache.org/jira/browse/CXF-4677 is created. > >>>>>>> Would you like to deliver the patch yourself? > >>>>>>> > >>>>>>> Cheers, > >>>>>>> Andrei. > >>>>>>> > >>>>>>>> -----Original Message----- > >>>>>>>> From: Bin Zhu [mailto:[email protected]] > >>>>>>>> Sent: Mittwoch, 5. Dezember 2012 07:24 > >>>>>>>> To: [email protected] > >>>>>>>> Subject: Re: service location in WSDL generated by CXF > >>>>>>>> > >>>>>>>> Many thanks to all of you about the suggestions. > >>>>>>>> > >>>>>>>> To Alessio, > >>>>>>>> As we are working on migrating our application to CXF and these > >>>>>> application > >>>>>>>> needs this function to work, can you estimate when the fix could > be > >>>>>>>> delivered? It will be helpful for us to size and schedule the > whole > >>>>>> migration > >>>>>>>> work. Thanks. > >>>>>>>> > >>>>>>>> 2012/12/4 Alessio Soldano <[email protected]> > >>>>>>>> > >>>>>>>>> I agree with the need of such a functionality. > >>>>>>>>> I'm likely going to work on this soon, will post the jira > reference > >>>>>> later. > >>>>>>>>> Default behaviour can for sure stay as is, but I see scenarios > >>>>>>>>> requiring a different configuration (e.g. all endpoints, > belonging > >> to > >>>>>>>>> the same wsdl service, to be updated using the configured > >>>> EndpointInfo > >>>>>>>>> published url property before writing the wsdl definition and > >>>>>>>>> returning it for the current query). > >>>>>>>>> > >>>>>>>>> Cheers > >>>>>>>>> Alessio > >>>>>>>>> > >>>>>>>>> On 12/03/2012 05:56 PM, Andrei Shakirin wrote: > >>>>>>>>>> Hi Ivan, > >>>>>>>>>> > >>>>>>>>>> I can imagine that in some cases it makes sense to update all > WSDL > >>>>>>>>> service endpoints, but I wouldn't configure it by default. > >>>>>>>>>> We can introduce additional context property > >>>>>>>>> "rewriteSoapAddressForAllServices" (like autoRewriteSoapAddress , > >>>>>>>>> publishedEndpointUrl) and if it is activated, endpoint of all > >>>> relevant > >>>>>>>>> services will be updated. Default value will be false. > >>>>>>>>>> Logic located in WSDLGetUtils.updateDoc(). > >>>>>>>>>> > >>>>>>>>>> Cheers, > >>>>>>>>>> Andrei. > >>>>>>>>>> > >>>>>>>>>>> -----Original Message----- > >>>>>>>>>>> From: Ivan [mailto:[email protected]] > >>>>>>>>>>> Sent: Sonntag, 2. Dezember 2012 16:08 > >>>>>>>>>>> To: [email protected] > >>>>>>>>>>> Subject: Re: service location in WSDL generated by CXF > >>>>>>>>>>> > >>>>>>>>>>> Well, I agree that, the accessing address for other ports may > not > >>>>>>>>> correct > >>>>>>>>>>> in some scenarios. While thinking the common usage in the Java > EE > >>>>>>>>>>> environment, we usually publish those endpoints in one web app, > >> and > >>>>>>>>>>> the target web app will be accessed in one host, which > associated > >>>>>>>>>>> with web connectors. So, I am thinking that this is a good > idea, > >>>>>>>>>>> and maybe a flag could be used to determine the behavior. > >>>>>>>>>>> > >>>>>>>>>>> I added the similar function in Apache Geronimo, and think that > >> it > >>>>>>>>>>> will > >>>>>>>>> be > >>>>>>>>>>> better that CXF could provide kind of native support for this. > >>>>>>>>>>> [1] > >>>>>>>>>>> > >>>> https://svn.apache.org/repos/asf/geronimo/server/branches/3.0/plugi > >>>>>>>>>>> ns/a > >>>>>>>>>>> xis2/geronimo- > >>>>>>>>>>> > >>>>>>>> > axis2/src/main/java/org/apache/geronimo/axis2/WSDLQueryHandler.java > >>>>>>>>>>> > >>>>>>>>>>> Thoughts ? > >>>>>>>>>>> > >>>>>>>>>>> 2012/11/29 Andrei Shakirin <[email protected]> > >>>>>>>>>>> > >>>>>>>>>>>> Proposed update of all services endpoints can be in some cases > >>>>>>>>> incorrect. > >>>>>>>>>>>> The absolute endpoint URL can be determined only from incoming > >>>>>>>> request. > >>>>>>>>>>> As > >>>>>>>>>>>> far as you request InventoryService, not InventoryProvider; > only > >>>>>>>>>>>> InventoryService endpoint is updated. > >>>>>>>>>>>> Imagine, you request InventoryProvider using other URL (for > >>>>>>>>>>>> example > >> http://127.0.0.1:9080/jaxws-wsdlfaults2/InventoryProvider > >>>> , > >>>>>>>>>>>> or even > >>>>>>>>> using > >>>>>>>>>>>> other port) and InventoryProvider will have absolute URL > >> different > >>>>>>>>>>>> as InventoryService. > >>>>>>>>>>>> > >>>>>>>>>>>> Cheers, > >>>>>>>>>>>> Andrei. > >>>>>>>>>>>> > >>>>>>>>>>>>> -----Original Message----- > >>>>>>>>>>>>> From: Bin Zhu [mailto:[email protected]] > >>>>>>>>>>>>> Sent: Dienstag, 27. November 2012 07:30 > >>>>>>>>>>>>> To: [email protected] > >>>>>>>>>>>>> Subject: service location in WSDL generated by CXF > >>>>>>>>>>>>> > >>>>>>>>>>>>> Hi All, > >>>>>>>>>>>>> I find that when define 2 service using a SEI class and a > >> Service > >>>>>>>>>>>> provider class, > >>>>>>>>>>>>> if query the service defined by SEI, then in the WSDL > generated > >>>>>>>>>>>>> by > >>>>>>>>> CXF, > >>>>>>>>>>>> it will > >>>>>>>>>>>>> only update the service location for this SEI service, but > the > >>>>>>>>> location > >>>>>>>>>>>> defined > >>>>>>>>>>>>> by service provider will not be updated. > >>>>>>>>>>>>> Is this behavior as design? Could it update all the service > >>>>>>>>>>>>> location > >>>>>>>>>>>> rather than > >>>>>>>>>>>>> only the requested one? Thanks in advance. > >>>>>>>>>>>>> > >>>>>>>>>>>>> Service defined by SEI: > >>>>>>>>>>>>> > >>>>>>>> @WebService(targetNamespace="http://inventory.wsdlfaults.jaxws", > >>>>>>>>>>>>> wsdlLocation="WEB-INF/wsdl/Inventory.wsdl", > >>>>>>>>>>>>> serviceName="InventoryService", > >>>>>>>>>>>>> portName="InventoryPort", > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>> > >>>> endpointInterface="jaxws.wsdlfaults.wsfvt.server.inventory.InventoryPo > >>>>>>>>> rtT > >>>>>>>>>>>>> ype") > >>>>>>>>>>>>> Service defined by Service Provider: > >>>>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>> @WebServiceProvider(targetNamespace=" > http://inventory.wsdlfaults.ja > >>>>>>>>>>> xw > >>>>>>>>>>>>> s", > >>>>>>>>>>>>> > wsdlLocation="WEB-INF/wsdl/Inventory.wsdl", > >>>>>>>>>>>>> serviceName="InventoryProvider", > >>>>>>>>>>>>> portName="InventoryProviderPort") > >>>>>>>>>>>>> > >>>>>>>>>>>>> WSDL generated by CXF using this URL: > >>>>>>>>>>>>> > http://localhost:9080/jaxws-wsdlfaults2/InventoryService?wsdl > >>>>>>>>>>>>> > >>>>>>>>>>>>> <service name="InventoryService"> <port > >>>>>>>>>>>>> binding="tns:InventoryBinding" name="InventoryPort"> > >>>>>>>>>>>>> <soap:address location=" > >>>>>>>>>>>>> http://localhost:9080/jaxws-wsdlfaults2/InventoryService > >>>>>>>>>>>> "></soap:address> > >>>>>>>>>>>>> </port> > >>>>>>>>>>>>> </service> > >>>>>>>>>>>>> <service name="InventoryProvider"> <port > >>>>>>>>>>>>> binding="tns:InventoryBinding" name="InventoryProviderPort"> > >>>>>>>>>>>>> <soap:address location="/InventoryProvider"></soap:address> > >>>>>>>>>>>>> </port> > >>>>>>>>>>>>> </service> > >>>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> -- > >>>>>>>>>>> Ivan > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> -- > >>>>>>>>> Alessio Soldano > >>>>>>>>> Web Service Lead, JBoss > >>>>>>>>> > >>>>>> > >>>>>> > >>>>>> -- > >>>>>> Alessio Soldano > >>>>>> Web Service Lead, JBoss > >>>>>> > >>>>> > >>>> > >>>> > >>>> -- > >>>> Alessio Soldano > >>>> Web Service Lead, JBoss > >>>> > >>> > >> > >> > >> -- > >> Alessio Soldano > >> Web Service Lead, JBoss > >> > > > > > -- > Alessio Soldano > Web Service Lead, JBoss >
