关于WSDL文件中命名空间,急
wsdl文件自动生成的内容如下:
<wsdl:definitions targetNamespace="http://127.0.0.1:8080/test/services/Bean1" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://127.0.0.1:8080/test/services/Bean1" xmlns:intf="http://127.0.0.1:8080/test/services/Bean1" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns1="urn:BeanService" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
我现在想把targetNamespace的内容修改成其他的,例如:targetNamespace="csland.cn.com/test/services/Bean1",该这么做?
还有,<wsdl:types>
- <schema targetNamespace="urn:BeanService" xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
- <complexType name="PersonBean">
- <sequence>
<element name="id" type="xsd:int" />
<element name="name" nillable="true" type="xsd:string" />
</sequence>
</complexType>
</schema>
</wsdl:types>
这个里面,我想将namespace的内容改成namespace="schemas.xmlsoap.org/soap/encoding/"该如何做?
[解决办法]
<wsdl:definitions targetNamespace= "csland.cn.com/test/services/Bean1 " xmlns= "http://schemas.xmlsoap.org/wsdl/ " xmlns:apachesoap= "http://xml.apache.org/xml-soap " xmlns:impl= "csland.cn.com/test/services/Bean1 " xmlns:intf= "csland.cn.com/test/services/Bean1 " xmlns:soapenc= "http://schemas.xmlsoap.org/soap/encoding/ " xmlns:tns1= "urn:BeanService " xmlns:wsdl= "http://schemas.xmlsoap.org/wsdl/ " xmlns:wsdlsoap= "http://schemas.xmlsoap.org/wsdl/soap/ " xmlns:xsd= "http://www.w3.org/2001/XMLSchema " >
直接改了就应该行了。 你怎么不用URI形式的namespace呢?