C
chriscorbell
I have a question about best practice for using complex XML as input
or output to a WebService in a Jax-WS, Axis or similar SOAP stack.
I want to have some webservice methods that either take or return a
complex but standard XML format. An example might be a scientific
service that can export MathML, or a financial app that can accept and
return a subset or particular taxonomy of XBLR. The difference
between this and "normal" webservice params or return types is that
there's no expectation that the SOAP stack understand and transform
these XML formats as it would for JAX-WS-annotated POJO's, or XML
Schema <type> and <message> declarations in the WSDL.
An obvious approach is just to use an xs:string parameter or return
type (and String Java type) and put the unparsed XML in; presumably it
will just be treated like any other unparsed string, angle brackets
will be escaped for transport and reconstituted on the other side,
then client or server can parse the string contents as XML.
Is this the standard way to provide this type of integration with a
complex but standard XML format where the application (not the SOAP
stack) is responsible for parsing?
TIA,
Chris
or output to a WebService in a Jax-WS, Axis or similar SOAP stack.
I want to have some webservice methods that either take or return a
complex but standard XML format. An example might be a scientific
service that can export MathML, or a financial app that can accept and
return a subset or particular taxonomy of XBLR. The difference
between this and "normal" webservice params or return types is that
there's no expectation that the SOAP stack understand and transform
these XML formats as it would for JAX-WS-annotated POJO's, or XML
Schema <type> and <message> declarations in the WSDL.
An obvious approach is just to use an xs:string parameter or return
type (and String Java type) and put the unparsed XML in; presumably it
will just be treated like any other unparsed string, angle brackets
will be escaped for transport and reconstituted on the other side,
then client or server can parse the string contents as XML.
Is this the standard way to provide this type of integration with a
complex but standard XML format where the application (not the SOAP
stack) is responsible for parsing?
TIA,
Chris