Is there a standard for representing the return type of Webservice incase of Complex Type. We have a Document style WS returning a String whose definition is huge and complex.
i'm thinking of returning a String of XML which when invoked will contain the schema location, which can be used for validation in client side. However the problem is from the WSDL there is no way the client can understand the Structure of return type other just basic String.
Any thoughts/Comments or standards?
PS: I'm using Axis...
Sorry, maybe I have misunderstood what you are asking, but if you are using Document-centric Web Services then the inputs and outputs from a WSDL operation are XML documents. In RPC-centric WS's you have to worry about return types but with Document-centric there is no problem.
Have I missed something?
I agree in Document style WS input and output are single XML document. But the definiton/schema of document has to be part of WSDL(if i'm not wrong) what if the schema is too large ? Should i seperate schema from WSDL? or have a never ending WSDL..??
Hope this helps
OK, I see what you are saying.
You have two choices:
1. You could have all of the schema within the WSDL by using <wsdl:types> tag, or
2. You can use wsdl:import and drag in the schema from some URL.
Option 2 is far better as you can easily reuse the schema in other apps/web services and you won't end up with a massive WSDL.
Sorry for the delay in replying.