[英]How to create wsdl file to access api with soap?
i have example xml request and xsd schema to validate the xml and url 我有示例xml请求和xsd模式来验证xml和url
how to create the wsdl file 如何创建wsdl文件
URL http://somewebsite:10806
is this the wsdl file on my server ?
targetNamespace="http://www.examples.com/wsdl/HelloService.wsdl"
also should i change <soap:address location="http://www.examples.com/SayHello/"> with
<soap:address location="http://somewebsite:10806">
<definitions name="HelloService"
targetNamespace="http://www.examples.com/wsdl/HelloService.wsdl"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://www.examples.com/wsdl/HelloService.wsdl"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<service name="Hello_Service">
<documentation>WSDL File for HelloService</documentation>
<port binding="tns:Hello_Binding" name="Hello_Port">
<soap:address
location="http://www.examples.com/SayHello/">
</port>
</service>
Use Apache XSD to WSDL . 使用Apache XSD到WSDL 。
Is the targetNameSpace the wsdl file on my server ? targetNameSpace是服务器上的wsdl文件吗? No; 没有; it's a namespace declaration that you make up. 这是您组成的名称空间声明。 More info: here in this SO answer . 更多信息: 在此SO答案中 。
Yes, you should change the soap:address from 是的,您应该将soap:address更改为
<soap:address location="http://www.examples.com/SayHello/">
to the correct address such as: 到正确的地址,例如:
<soap:address location="http://somewebsite:10806/SayHello/">
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.