Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
anil reddi
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
author
Saloon Keeper
Posts: 4010
18
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic