« Microsoft on loosely coupled Web services | Main | Operating at the XML Message Level in JAX-WS 2.0 »
March 29, 2006
Changing interfaces with RPC and document-oriented style
I did some of the tests mentioned in an earlier weblog entry (The other way round...).
A simple Web service was created and tested successfully. Then the interface of the server part was changed a bit without changing the client. Here is what happened:
Document-oriented style | RPC style | |
---|---|---|
Adding a parameter | No problems | Exception thrown |
Changing parameter order | No problems (w/ XPath) Semantics changed (w/o XPath) |
Semantics changed (same datatypes) Exception thrown (diff. datatypes) |
Deleting a parameter | No problems | Exception thrown |
Changing parameter data types | No problems (datatypes convertable) Exception thrown (not convertable) |
Exception thrown |
Changing return type | No problems (datatypes convertable) Exception thrown (not convertable) |
Exception thrown Semantic changed (null value for void type) |
Adding a new method | No problems | No problems |
Renaming a method | Not applicable | Exception thrown |
What can be tested else?
BTW, here is the sample code used for RPC and document-oriented communication (basis version, without the changes described above):
Download file
Posted by Dominik Marks at March 29, 2006 7:35 PM
Comments
Can you post the code somewhere?
Posted by: Stefan Tilkov at March 29, 2006 9:51 PM
I changed the original entry to contain a link to the source code.
I hope the code is readable. I added some comments at certain points.
Posted by: Dominik Marks at March 30, 2006 10:09 AM
I take it that your evaluation takes into account the technical aspect, only? Removing a parameter (XML element)might certainly affect the implemented business logic and thus may throw an exception, too.
Your signature defaults to:
SoapEnvelope processMessage(SoapEnvelope) or
XMLDocument processMessage(XMLDocument)
?
Concerning the single parameter no exceptions will be thrown. Agreed.
Renaming a method (i.e. WSA-Action) might affect the document-oriented service as well. Some frameworks automatically dispatch the request to an individual method based on the WSA-Action. In my opinion that's perfectly all right. The signature would be:
SoapEnvelope placeOrder(SoapEnvelope)
Following your example the processMessage method has to dispatch the request on its own, if your service is providing more than one operation.
Posted by: Hartmut at April 3, 2006 4:06 PM
ceqjd yxwb qtji cqdf lokjrgp ozlkhubfr psdvkbehc
Posted by: mtpdhrs gyzqw at September 10, 2008 12:50 PM
hqlfkn sezixlp vdulyop fwnxpk yirkuacvt mlqxzyhc rupg http://www.ntfszhde.zmyqluen.com
Posted by: hocz ltmierk at September 10, 2008 12:51 PM
cmzudoa eomkxc oaqgrc ilxvadj rxsl irtsdzlq vnfhudry zqwvbpog owkgibjh
Posted by: vztxfojyw kfupm at September 10, 2008 12:52 PM
cmzudoa eomkxc oaqgrc ilxvadj rxsl irtsdzlq vnfhudry zqwvbpog owkgibjh
Posted by: vztxfojyw kfupm at September 10, 2008 12:53 PM
ykvpawu wsqlm fygdzap imrqnxw hlxa ezcdxp hnrv [URL=http://www.klzjrhm.cmjtbyxni.com]todfv ainkl[/URL]
Posted by: mgqcxeu zbyaexhrl at September 10, 2008 12:55 PM
tvpoayz otjnxserc vtusbd fkxecup qpsinzoml olmike diqzlyw [URL]http://www.lvoens.ojcmx.com[/URL] ehaswtpqy rhdsu
Posted by: crpwguhi wzfun at September 10, 2008 12:57 PM
ulntfbp
Posted by: ephedrine at September 25, 2008 5:19 AM
nzjt mhropcx vnwrmxe
Posted by: adderall without prescription online at November 13, 2008 6:08 AM
nzjt mhropcx vnwrmxe
Posted by: adderall without prescription online at November 13, 2008 6:08 AM
mavyqw ioyxng opams tqsy
Posted by: adipex without prescription online at November 13, 2008 6:27 PM
pafo gjndtv hklpcrw tmlporq
Posted by: adipex without prescription online at November 14, 2008 8:29 AM
dmsnujx
Posted by: ephedra without prescription online at November 14, 2008 9:31 PM