【发布时间】:2010-02-05 10:36:13
【问题描述】:
我正在使用一个 SOAP Web 服务,它有命名空间,有些类似于:
<?xml version="1.0" encoding="UTF-8" ?>
<wsdl:definitions targetNamespace="http://www.company.com/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:company="http://www.company.com/"
xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/">
<wsdl:types>
<xsd:schema elementFormDefault="qualified" targetNamespace="http://www.company.com/" version="0.1"
xmlns:cmp="http://www.company.com/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="Number" type="cmp:NumberType" />
我的问题是当 .net 序列化对象时,它在 xml 中不包含前缀 cmp。它呈现 <Number.... 而不是 <cmp:Number ...
我能解决什么问题?
【问题讨论】:
标签: c# web-services serialization soap