I have the following tags on my WSDL:
<?xml version='1.0' encoding='UTF-8'?>
<definitions name="" targetNamespace="http://xxxxx/ws"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:s0="http://xxxxx/ws"
xmlns:s1="http://schemas.xmlsoap.org/wsdl/soap/">
<types>
<xsd:schema attributeFormDefault="qualified"
elementFormDefault="qualified"
targetNamespace="http://xxxxx/ws/comments"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:s0="http://xxxxx/ws"
xmlns:s1="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns="http://xxxxx/ws"
xmlns:tnsc="http://xxxxx/ws/comments"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:y="http://new.webservice.namespace">
The types are thereafter qualified to a be in the s0,s1... namespaces.
The question is whether the namespace end-point(="http://xxxxx/ws") needs to be a valid url?
If the endpoint no longer exists - does it mean that we need to re-generate the stub proxy for the Web Service again?
Note: The endpoint of the Web Service itself is different from that of the namespaces and does still exist.
A Uniform Resource Identifier (URI) is a string of characters which identifies an Internet Resource. The most common URI is the Uniform Resource Locator (URL) which identifies an Internet domain address. Another, not so common type of URI is the Uniform Resource Name (URN).
What Is an XML Namespace? An XML namespace is a collection of names that can be used as element or attribute names in an XML document. The namespace qualifies element names uniquely on the Web in order to avoid conflicts between elements with the same name.
One of the primary motivations for defining an XML namespace is to avoid naming conflicts when using and re-using multiple vocabularies. XML Schema is used to create a vocabulary for an XML instance, and uses namespaces heavily.
When you use multiple namespaces in an XML document, you can define one namespace as the default namespace to create a cleaner looking document. The default namespace is declared in the root element and applies to all unqualified elements in the document. Default namespaces apply to elements only, not to attributes.
From @jww question:
The question is whether the namespace end-point(="http://xxxxx/ws") needs to be a valid url?
No, an XML namespace takes the lexical form of a URI but does not have to be retrievable according to W3C Recommendation: Namespaces in XML 1.0 (Third Edition):
The attribute's normalized value MUST be either a URI reference — the namespace name identifying the namespace — or an empty string. The namespace name, to serve its intended purpose, SHOULD have the characteristics of uniqueness and persistence. It is not a goal that it be directly usable for retrieval of a schema (if any exists).
From @jww follow-up in comments:
What is the purpose of
http:
if its not retrievable? Shouldn't they use something likenull:
to signal its private? Otherwise, how do folks like me know when it's private, and when it's deprecated or withdrawn? I guess what I am asking is, what is the signalling mechanism?
Many, including myself, do indeed recommend that the namespace URI be retrievable as a document or as the governing XSD itself. However, as shown above it is not required. Further, a conformant, validating XML processor need not even report when a namespace name is not a URI:
To conform to this specification, a processor MUST report violations of namespace well-formedness, with the exception that it is not REQUIRED to check that namespace names are URI references [RFC3986].
For this reason, you'll sometimes see non-URI used in namespace names, especially for quick, throw-away examples. (However, it's probably better to use http://www.example.org/topic
in such cases to be proper.)
URIs are used because they are a convenient mechanism for expressing uniqueness of a resource with a built-in authority specification -- the owner of the domain is the one responsible for namespaces defined using the domain.
From @jww follow-up in comments:
If the endpoint no longer exists - does it mean that we need to re-generate the stub proxy for the webservice again?
No, and you should not even refer to the namespace as an endpoint. The retrievability of the namespace name URI has no bearing at anytime on the specification or operation of your Web Service.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With