Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

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

 
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.
 
author
Posts: 4173
29
jQuery Eclipse IDE Java
  • 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.
 
I didn't do it. You can't prove it. Nobody saw me. The sheep are lying! This tiny ad is my witness!
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic