• Post Reply Bookmark Topic Watch Topic
  • New Topic

Developing custom Serializer/Deserializer  RSS feed

 
John Champine
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to solve a versioning problem we have at work. The scenario forces that I either implement a SOAP message handler and modify the response xml or implement custom serializer to manipulate the soap response that is going back to client. All of this is needed so that and older client does not choke on an element that it does not know how to de-serialize. Due to infrastructure issues this is the only option I/we have.

I am fairly new to this custom serializer/de-serializer scenary and am looking for a tutorial/book to figure out how I will go about plugging in my customer serializer at the server side and manipulate the outgoing SOAP message according the client's version. We use Websphere 6.0 at work.

Can anybody shed some light in to this topic? I did search for sometime but could not come up with much info in this forum. Also if you know of any better solution please share that with me.

Regards,

Green!!
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch "GreenMan",

Please check your private messages.
 
John Champine
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No responses.

So let me ask the question is a simpler form: How can I remove an element/attribute from a soap message body?
 
Paul Clapham
Sheriff
Posts: 22521
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would use XSLT for that. Start with the identity transformation and add templates that ignore the parts you want left out.
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by John Champine:
Also if you know of any better solution please share that with me.


I figure your infrastructure issues stop you from doing the obvious. When you introduce a new version of the interface, offer it through a new endpoint. That way old clients keep using the old interface on the old endpoint and the new clients can use the new interface on the new endpoint.
 
John Champine
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Peer Reynders:


I figure your infrastructure issues stop you from doing the obvious. When you introduce a new version of the interface, offer it through a new endpoint. That way old clients keep using the old interface on the old endpoint and the new clients can use the new interface on the new endpoint.


Yeah! Infrastructure is maintained by a different governing body and they use 2 or more older versions of our application at a time requiring multiple end points setup.

I will look into XSLT as you suggested. Thanks much!
[ August 23, 2007: Message edited by: GreenMan ]
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by John Champine:
they use 2 or more older versions of our application at a time requiring multiple end points setup.


If you have a separate endpoint (i.e. URL) for each web service interface there shouldn't be a problem because the variation should be handled by how you "wire" each service stub (i.e. web service delegate implementation) to the same central service application. Each stub should only have to deal with one version of SOAP request/response messages - no need to mess with XSLT (which can have a steep learning curve and impacts performance).
 
John Champine
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Paul Clapham:
I would use XSLT for that. Start with the identity transformation and add templates that ignore the parts you want left out.


I am in a state where I have intercepted a soap message using a soap message handler. Created xslt template to leave out element that older client cannot support. I am now stumped at how I can recreate a soap body and possibly add that to the soap message that is already intercepted by the handler.

Is that even possible?

If there are other options I am all ears..
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!