|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Maybe there is a better way? |
« View previous topic :: View next topic » |
Author |
Message
|
simon.starkie |
Posted: Mon Dec 03, 2007 3:07 pm Post subject: Maybe there is a better way? |
|
|
Disciple
Joined: 24 Mar 2002 Posts: 180
|
Hi Jeff,
Well, basically the code (above) to invoke the web service:
GetMedicationResponseType gmrt = kpcs.Medication(MRN1, REGION1, DOB1, MRN2, REGION2, DOB2);
expects to get back a GetMedicationResponseType object if everything works.
But if something goes wrong, the service is supposed to send back a KPChartException message indicating something went wrong. So the client needs a way of gaining visibility to this KPChartException message. So throwing a custom exception seemed like the way to do that.
Perhaps an alternative approach would be to change the WSDL to include the KPChartException node at the end of GetMedicationResponseType message and then the Client could just interogate that to see if the request was successful or not. That would provide the desired result and obviate the need for a special exception to be thrown in the server and caught by the client. This seems a bit clunky, and it probably would work, but I was hoping something a little more elegant would be possible. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|