targetNamespace and xmlns without prefix, what is the difference?

后端 未结 6 1688
忘掉有多难
忘掉有多难 2020-11-30 17:46

In an xml schema document, if I have both the targetNamespace and the xmlns without a prefix.



        
6条回答
  •  自闭症患者
    2020-11-30 18:18

    xmlns

    The xmlns attribute sets the default name space of the described element. The default name space is thus applied to all the elements inside the described element, which do not explicitly declare another name space for themselves.

    The default name space is set to a standard value for WSDL files: http://www.w3.org/ns/wsdl

    targetNameSpace

    This attribute contains the name space of your web service. You can choose this name space freely, but there is a convention saying that the URI should point to the WSDL of the service.

    xmlns:tns

    This name space should be set to the same URI as the targetNameSpace attribute. That way you can refer to the target name space via this name space prefix (tns).

    Source : http://tutorials.jenkov.com/wsdl/description.html

提交回复
热议问题