JAX WS xsd:任何类型都是 XMLSchema 元素
处理 xsd:any 类型是 XMLSchema 元素 JAX WS
<types>
<schema targetNamespace="http://www.iona.com/artix/wsdl"
xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<complexType name="unmappedType">
<sequence>
<xsd:any namespace="##other"
processContents="skip"/>
</sequence>
</complexType>
<element name="request" type="tns:requestType"/>
</schema>
</types>
xml 以 STring 形式存在,如何将其作为文档对象,然后将其内容传输到 SOAPElement 实例
需要实现和客户端代码的指导。
将 XML 字符串转换为元素。并在收到响应后将其读回。
Handling xsd:any type is an XMLSchema element JAX WS
<types>
<schema targetNamespace="http://www.iona.com/artix/wsdl"
xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<complexType name="unmappedType">
<sequence>
<xsd:any namespace="##other"
processContents="skip"/>
</sequence>
</complexType>
<element name="request" type="tns:requestType"/>
</schema>
</types>
The xml is there as a STring how to have it as a document object, and then transfer its contents into a SOAPElement instance
Need guidance for the implementation and client code.
Convertng the XML String into the Element. and also reading it back once the response is received .
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我看到有人否决了您的问题...如果您不介意,我会首先指出您的问题似乎存在的问题:该片段很可能来自 WSDL,但架构相当无效。你应该做的第一件事就是把事情做好。也许是这样的:
一旦你完成了它,我建议创建一个看起来像你想要的方式的 XML;确保你验证了这一点。将其与您的问题一起发布...
然后,当涉及 JAXB 时,我将使用一个免费且易于使用的工具(我推荐 NetBeans ,它有一个简单的界面)。然后编写一个使用您的代码的小型 Java 控制台应用程序;进行调试,看看解组 XML 时会得到什么。也许阅读一点文档,然后最终发帖寻求更具体问题的帮助。
xsd:any 和 JAXB 有很好的文档记录:尝试一下 JAXB.. 。
I see that someone has downvoted your question... If you don't mind, I would first point out the issues your question seems to have: the snippet most likely comes from an WSDL, but the schema is rather invalid. The first thing you should do is to make it right. Maybe something like this:
Once you've done it, I suggest making up an XML that looks the way you want; make sure you validate that. Post it along with your question...
I would then use a tool that's free and easy to use when it comes to JAXB (I recommend NetBeans, it has a straightforward interface). Then write a small Java console app that uses your code; debug through, and see what you get when you unmarshall the XML. Maybe read a little bit the documentation, and then eventually post to ask for help with a more specific question.
The xsd:any and JAXB is pretty well documented: try this about JAXB...