[英]Generating WSDL files
I want to implement a WSDL service.我想实现一个 WSDL 服务。 To generate its codes, I use from different tools.
为了生成它的代码,我使用了不同的工具。 When I use SoapUI, the generated file's method is as below:
当我使用 SoapUI 时,生成文件的方法如下:
*******************************************************
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:tem="http://tempuri.org/">
<soapenv:Header>
<tem:AuthenticationHeader>
<tem:TicketID>?</tem:TicketID>
</tem:AuthenticationHeader>
</soapenv:Header>
<soapenv:Body>
<tem:GetInfo>
<tem:sNo>?</tem:sNo>
<tem:source>?</tem:source>
</tem:GetInfo>
</soapenv:Body>
</soapenv:Envelope>
and when I use https://app.boomerangapi.com/ on Chrome, this method will be:当我在 Chrome 上使用https://app.boomerangapi.com/时,此方法将是:
<x:Envelope
xmlns:x="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:tem="http://tempuri.org/">
<x:Header>
<tem:AuthenticationHeader>
<tem:TicketID>?</tem:TicketID>
</tem:AuthenticationHeader>
</x:Header>
<x:Body>
<tem:GetInfo>
<tem:sNo>?</tem:sNo>
<tem:source>?</tem:source>
</tem:GetInfo>
</x:Body>
</x:Envelope>
Why the generated methods are different in namespaces?!为什么生成的方法在命名空间中不同?!
What can be the problem in the source of this service?!该服务的来源可能有什么问题?!
Those two SOAP bodies are exactly the same.这两个 SOAP 主体完全相同。
A namespace prefix in an element tag is just a symbolic shorthand for a namespace URI.元素标签中的命名空间前缀只是命名空间 URI 的符号简写。
An XML document can define a namespace prefix using an attribute that starts with xmlns:
: XML 文档可以使用以
xmlns:
开头的属性定义命名空间前缀:
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
That attribute means “all names in this element and its descendants starting with soapenv:
are actually names associated with the URI http://schemas.xmlsoap.org/soap/envelope/
.”该属性意味着“此元素中的所有名称及其以
soapenv:
实际上是与URI http://schemas.xmlsoap.org/soap/envelope/
关联的名称。”
The following namespace definition is exactly the same thing;下面的命名空间定义是完全一样的; it just specifies a different prefix to use as shorthand for the same URI:
它只是指定了一个不同的前缀来用作相同 URI 的简写:
xmlns:x="http://schemas.xmlsoap.org/soap/envelope/"
So, the only difference is that the two XML documents is how they refer to the “http://schemas.xmlsoap.org/soap/envelope/” URI:所以,唯一的区别是这两个 XML 文档是如何引用“http://schemas.xmlsoap.org/soap/envelope/”URI:
soapenv:
are associated with that URI.soapenv:
开头的元素与该 URI 相关联。x:
are associated with that URI.x:
开头的元素与该 URI 相关联。 The notation is different, but the meaning is the same.符号不同,但意思是一样的。 They literally have identical content.
它们实际上具有相同的内容。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.