GPathResult 到 org.w3c.dom.Node
这可能很简单,但我还是会问。
我有以下代码,用于向网络服务发布信息。我正在使用 HttpBuilder 来构建请求并发布有效负载。该方法返回一个 GPathResult,我需要将其更改为 org.w3c.dom.Node
我正在使用 Node 进行 xpath 评估,并且需要结果为 org.w3c.dom.Node。
def responseXml def onResponseHandler = { resp, content -> def soapResponse = content instanceof java.io.InputStreamReader ? content.getText() : content responseXml = soapResponse.Body } http.post(body: payload, headers: ['Content-Type:': 'text/xml'], onResponseHandler) return responseXml
我对此进行了广泛的搜索,但无法弄清楚。有什么想法吗?
This might be a very simple, but I'll ask anyway.
I have the following code that does a post to a web service. I am using HttpBuilder to build the request and post the payload. The method returns a GPathResult that I need to change into a org.w3c.dom.Node
I am using the Node for xpath evaluation, and need the result to be a org.w3c.dom.Node.
def responseXml def onResponseHandler = { resp, content -> def soapResponse = content instanceof java.io.InputStreamReader ? content.getText() : content responseXml = soapResponse.Body } http.post(body: payload, headers: ['Content-Type:': 'text/xml'], onResponseHandler) return responseXml
I've searched quite extensively for this, but couldn't figure it out. Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论