我有一个新的Web服务项目,并且我试图在同一项目中了解targetnamespace的用法。
以下是wsdl定义和模式标记:
<wsdl:definitions name="RaveServicesService"
targetNamespace="http://service.bergemal.is/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:tns="http://service.bergemal.is/" <----- What is purpose of this?
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<xs:schema
xmlns:tns="http://service.bergemal.is/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="unqualified"
targetNamespace="http://service.bergemal.is/" version="1.0">
在Web Service客户端中,我可以在生成的文件夹中看到以下Java包:
is.bergemal.service
|> Class1
|> Class2
|> Class3
在Web服务类中,我可以看到以下内容:
@Service("raveServicesImpl")
@WebService(portName = "RaveServicesPort",targetNamespace = "http://service.bergemal.is/",serviceName = "RaveServicesService",endpointInterface = "is.bergemal.service.RaveServices")
问题1 :“目标名称空间”是仅用于生成程序包名称还是其他用途(以通俗易懂的说法)?