【发布时间】:2016-06-22 19:09:18
【问题描述】:
我在 Jetty 上部署了一个 Web 服务。我使用 SOAP UI 通过http://ip:port/DefaultRequestListener?workflow=WsdlCPF&soapAction=Import 之类的链接调用它,它可以工作。
我一直在使用 ?wsdl 在 url 末尾的服务,但现在我很困惑。
为什么url末尾没有?wsdl?
【问题讨论】:
-
对于 Web 服务来说,url 看起来很奇怪。将
wsdl参数添加到端点url 告诉底层soap 实现生成部署的wsdl 的内容。通常在ws url中只有一个参数,这就是我们添加?wsdl的原因。例如,SoapUI 需要一个返回 wsdl 内容的 url(即 url+?wsdl)或存储在磁盘中的 wsdl 文件。您必须提供更多信息: -
- 您使用哪个库来创建 ws? - 如果您在浏览器中转到
http://ip:port/DefaultRequestListener?workflow=WsdlCPF&soapAction=Import,您会看到什么? - 如果你去http://ip:port/DefaultRequestListener?workflow=WsdlCPF&soapAction=Import?wsdl? -
大卫,感谢您的回复。我没有创建这个 ws。在浏览器 wia 链接中,我看到:
HTTP ERROR: 400 Problem accessing /DefaultRequestListener. Reason: Error executing the request Powered by Jetty://如果我添加 ?wsdl,我看到:1 Processflow error occured. Please check programm Logs! -
我在写url的时候在最后一个问题中犯了一个错误。我想检查您是否可以在浏览器中看到 wsdl。我的意思是转到:
http://ip:port/DefaultRequestListener?workflow=WsdlCPF&soapAction=Import&wsdl请注意,我将最后一个?更改为&。 -
我也在 SOAP UI 响应中看到:
Content-Type: text/html。但如果是肥皂,我应该看到`text/xml`。对吗?
标签: web-services soap wsdl