我正在尝试使用 Spring-WS 组合一个合同优先的 Web 应用程序。我想定义一个客户端可以通过不提供参数来调用的操作,并且只需从服务器返回一个它可以在屏幕上绘制的图像。
我对如何做到这一点的猜测是定义一个 ImageRequest XML 片段,例如:
<ImageRequest xmlns="http://www.mycompany.com/example/schemas">
</ImageRequest>
和 ImageResponse 片段类似于以下内容:
<ImageResponse xmlns="http://www.mycompany.com/example/schemas">
<ImageData>
<!-- What should I do here???
Is this even the proper way for doing this? -->
</ImageData>
</ImageResponse>
然后为这两个操作创建一个 XSD 并将它们包含在 Spring 示例中。我该怎么做以上?一旦我得到上面定义的 XML 片段,我就计划使用 Trang 来生成 XSD。
非常感谢您的帮助。