File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes Adding new element to exising xsd  and not generate client stub throwing exception in Apache Axis1. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Adding new element to exising xsd  and not generate client stub throwing exception in Apache Axis1." Watch "Adding new element to exising xsd  and not generate client stub throwing exception in Apache Axis1." New topic
Author

Adding new element to exising xsd and not generate client stub throwing exception in Apache Axis1.

anil reddi
Greenhorn

Joined: Oct 15, 2009
Posts: 1
Hi,

I have a webservice developed using Apache Axis 1.4 and is working fine. I have two clients A, B are using the webservice after some time only client B wants one extra element in the response from webservice, for that client B generated client stub with new wsdl and xsd and is working fine for client B.

But the client A is getting EXCEPTION, as its not regenerated the client stubs as client A does NOT need new field. could any one help me on this what should be done here. Client A does not want to regenerate every time the new element added to xsd for other clients.

Thanks in Advance.

Anil.
Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3704
    
    5

The thing about web services, is that they are about defining a solid contract between your provider and your clients. If you change that contract for one client, you need to change it for other clients as well.

There are some exceptions, for example if your serializing everything to XML and sending it over the wire (as opposed to a local VM connection), then as long as the XML your sending is valid from both clients the web service will accept it. For example, if you add an optional field added, both XML produced would be fine. The difference is if you make fields required. In that case, yes you would need to generate a new client since the data is not valid by the server's standpoint.

BTW switch to Axis 2 if you can... its far more stable IMHO.


My Blog: Down Home Country Coding with Scott Selikoff
 
Consider Paul's rocket mass heater.
 
subject: Adding new element to exising xsd and not generate client stub throwing exception in Apache Axis1.