I'm trying to put together a contract-first web application using Spring-WS. I want to define an operation that the client can invoke by providing no parameters and simply get back from the server an Image that it can draw on the screen.
My guess for how to do this is to define an ImageRequest XML snippet, such as:
<ImageRequest xmlns="http://www.mycompany.com/example/schemas">
</ImageRequest>
and an ImageResponse snippet something along the lines of:
<ImageResponse xmlns="http://www.mycompany.com/example/schemas">
<ImageData>
<!-- What should I do here???
Is this even the proper way for doing this? -->
&l开发者_运维技巧t;/ImageData>
</ImageResponse>
And then to create an XSD for these two operations and include them in the Spring example. How do I do the above? Once I get the XML snippets defined above, I was planning on using Trang to generate the XSD.
Thanks very much for any help.
Looks like there are two XSD types for binary data (which is what this is, no?):
- base64Binary (Base64-encoded binary data)
- hexBinary (hexadecimal-encoded binary data)
Source
精彩评论