Re: Newbie question about using axis as webservice client
Hi DelGurth, As you say the webservice changed then the wsdl also should be different, so IMO there is no option other than regenerating the client using wsdl2java tool (via Eclipse), because its an interface level change. Thanks Lahiru Sandakith On 8/3/07, DelGurth [EMAIL PROTECTED] wrote: Hi, I recently stated using axis as my web service client. I've used the wsdl2java tool (via Eclipse) to generate the client code based on the wsdl file of the service. Now the web service changed, it contains a new field, and my client application doesn't work anymore. Is there a way to make my client ignore fields that are unknown to it? I tried finding an answer in the client-side axis documentation, but I can't find it, unfortunately. That's why I end up here. Regards, Wessel van Norel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thanks Lahiru Sandakith http://sandakith.wordpress.com/ GPG Key Fingerprint : 8CD8 68E0 4CBC 75CB 25BC 1AB1 FE5E 7464 1F01 9A0F
Re: Newbie question about using axis as webservice client
On 8/3/07, Lahiru Sandakith [EMAIL PROTECTED] wrote: Hi DelGurth, As you say the webservice changed then the wsdl also should be different, so IMO there is no option other than regenerating the client using wsdl2java tool (via Eclipse), because its an interface level change. Thanks Lahiru Sandakith Hi Lahiru, Thanks for your quick response. It indeed seems that the only resolution is to regenerate the client. I guess I shouldn't generate stubs for the client if I want my application to be able to handle WSDL changes automatically (with the assumption that all changes are backwards compatible). Btw, resolving nullpointer exceptions in the client code (for example if an extended get method, to arrange sorting of data, is not written null save) is pretty darn hard. You don't get the original nullpointer exception, only the message that during the population a nullpointer exception occurred. Not sure where I should address that (is 1.x still under development?) Regards, Wessel van Norel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Newbie question about using axis as webservice client
Axis2 adb style clients can be made tolerant of new elements added to a web service by modifying ADBBeanTemplate.xsl contained in axis2-adb-codegen-1.2.jar. This xsl is used to generate the Java code which pull-parses responses from the web service. This generated code is what throws exceptions when it encounters unrecognized elements. It is fairly trivial to modify the xsl to generate code which is tolerant of newly-added elements (i.e. just silently consumes and discards them) instead of crashing. I have done this. To some no doubt this is heresy, to others (myself included) it is worthwhile because it can be used to achieve looser coupling between the client and service, and that is good. There are many business use cases where a service is extended with some new elements which are not needed by existing clients. The notion that every previously deployed client should have to be recompiled and redeployed just because the service was extended is broken, IMHO. From: Lahiru Sandakith [mailto:[EMAIL PROTECTED] Sent: Friday, August 03, 2007 4:13 AM To: axis-user@ws.apache.org Subject: Re: Newbie question about using axis as webservice client Hi DelGurth, As you say the webservice changed then the wsdl also should be different, so IMO there is no option other than regenerating the client using wsdl2java tool (via Eclipse), because its an interface level change. Thanks Lahiru Sandakith On 8/3/07, DelGurth [EMAIL PROTECTED] wrote: Hi, I recently stated using axis as my web service client. I've used the wsdl2java tool (via Eclipse) to generate the client code based on the wsdl file of the service. Now the web service changed, it contains a new field, and my client application doesn't work anymore. Is there a way to make my client ignore fields that are unknown to it? I tried finding an answer in the client-side axis documentation, but I can't find it, unfortunately. That's why I end up here. Regards, Wessel van Norel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thanks Lahiru Sandakith http://sandakith.wordpress.com/ GPG Key Fingerprint : 8CD8 68E0 4CBC 75CB 25BC 1AB1 FE5E 7464 1F01 9A0F
Re: Newbie question about using axis as webservice client
Norris, FYI, We've added the following option in Axis2-1.3 RC3. would love your input on if that is enough for your use case. -Eosv (for ADB) - off strict validation. thanks, dims On 8/3/07, Merritt, Norris [EMAIL PROTECTED] wrote: Axis2 adb style clients can be made tolerant of new elements added to a web service by modifying ADBBeanTemplate.xsl contained in axis2-adb-codegen-1.2.jar. This xsl is used to generate the Java code which pull-parses responses from the web service. This generated code is what throws exceptions when it encounters unrecognized elements. It is fairly trivial to modify the xsl to generate code which is tolerant of newly-added elements (i.e. just silently consumes and discards them) instead of crashing. I have done this. To some no doubt this is heresy, to others (myself included) it is worthwhile because it can be used to achieve looser coupling between the client and service, and that is good. There are many business use cases where a service is extended with some new elements which are not needed by existing clients. The notion that every previously deployed client should have to be recompiled and redeployed just because the service was extended is broken, IMHO. From: Lahiru Sandakith [mailto:[EMAIL PROTECTED] Sent: Friday, August 03, 2007 4:13 AM To: axis-user@ws.apache.org Subject: Re: Newbie question about using axis as webservice client Hi DelGurth, As you say the webservice changed then the wsdl also should be different, so IMO there is no option other than regenerating the client using wsdl2java tool (via Eclipse), because its an interface level change. Thanks Lahiru Sandakith On 8/3/07, DelGurth [EMAIL PROTECTED] wrote: Hi, I recently stated using axis as my web service client. I've used the wsdl2java tool (via Eclipse) to generate the client code based on the wsdl file of the service. Now the web service changed, it contains a new field, and my client application doesn't work anymore. Is there a way to make my client ignore fields that are unknown to it? I tried finding an answer in the client-side axis documentation, but I can't find it, unfortunately. That's why I end up here. Regards, Wessel van Norel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thanks Lahiru Sandakith http://sandakith.wordpress.com/ GPG Key Fingerprint : 8CD8 68E0 4CBC 75CB 25BC 1AB1 FE5E 7464 1F01 9A0F -- Davanum Srinivas :: http://davanum.wordpress.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Newbie question about using axis as webservice client
Outstanding, thanks, I'll try it. -Original Message- From: Davanum Srinivas [mailto:[EMAIL PROTECTED] Sent: Friday, August 03, 2007 10:36 AM To: axis-user@ws.apache.org Cc: [EMAIL PROTECTED] Subject: Re: Newbie question about using axis as webservice client Norris, FYI, We've added the following option in Axis2-1.3 RC3. would love your input on if that is enough for your use case. -Eosv (for ADB) - off strict validation. thanks, dims On 8/3/07, Merritt, Norris [EMAIL PROTECTED] wrote: Axis2 adb style clients can be made tolerant of new elements added to a web service by modifying ADBBeanTemplate.xsl contained in axis2-adb-codegen-1.2.jar. This xsl is used to generate the Java code which pull-parses responses from the web service. This generated code is what throws exceptions when it encounters unrecognized elements. It is fairly trivial to modify the xsl to generate code which is tolerant of newly-added elements (i.e. just silently consumes and discards them) instead of crashing. I have done this. To some no doubt this is heresy, to others (myself included) it is worthwhile because it can be used to achieve looser coupling between the client and service, and that is good. There are many business use cases where a service is extended with some new elements which are not needed by existing clients. The notion that every previously deployed client should have to be recompiled and redeployed just because the service was extended is broken, IMHO. From: Lahiru Sandakith [mailto:[EMAIL PROTECTED] Sent: Friday, August 03, 2007 4:13 AM To: axis-user@ws.apache.org Subject: Re: Newbie question about using axis as webservice client Hi DelGurth, As you say the webservice changed then the wsdl also should be different, so IMO there is no option other than regenerating the client using wsdl2java tool (via Eclipse), because its an interface level change. Thanks Lahiru Sandakith On 8/3/07, DelGurth [EMAIL PROTECTED] wrote: Hi, I recently stated using axis as my web service client. I've used the wsdl2java tool (via Eclipse) to generate the client code based on the wsdl file of the service. Now the web service changed, it contains a new field, and my client application doesn't work anymore. Is there a way to make my client ignore fields that are unknown to it? I tried finding an answer in the client-side axis documentation, but I can't find it, unfortunately. That's why I end up here. Regards, Wessel van Norel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thanks Lahiru Sandakith http://sandakith.wordpress.com/ GPG Key Fingerprint : 8CD8 68E0 4CBC 75CB 25BC 1AB1 FE5E 7464 1F01 9A0F -- Davanum Srinivas :: http://davanum.wordpress.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]