Kim Lokøy wrote:
anonymous wrote:
Kim Lokøy wrote:
I want to create a web service operation called CreateAnalysis, and I
want this operation to handle several types of analysis as input
(AnalysisTypeA, AnalysisTypeB, etc). I want CreateAnalysis to accept
different types of input to avoid having to create
CreateAnalysisTypeA, CreateAnalysisTypeB, etc operations. Is this
possible using WSDL?
Any reference to a document describing this is highly appreciated.
Thanks Kim
Accept XML. Supply a schema for each type of xml content you accept.
Thanks for your response, could you elaborate a bit please...
Kim
Assuming that AnalysisTypeX can map to an XML structure, design an (XML)
structure for each AnalysisType. Have the client pass the XML file to
your Web Service which has but one argument: a String. The String is the
XML file.
Your WS implemtation parses the supplied XML file and uses it to build
the real world object you need on the server side.
For your convenience supply the client(s) with an XML schema definition
for each of the AnalysisType(X) that you support. Using that schema, the
client can validate their XML before sending it to your WS, and you can
validate the XML when receiving it, so you know that your parser won't
croak.