1
所以我有一个简单的web服务,它有一个userid输入并从sql数据库获取一个标志(最初设置为'1')。Web服务返回初始值设置响应的定义
然而,当我询问用户使用该标志的默认值(这是我在SQL Server设置为1),我得到如下回应:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<result xsi:type="ns1:getPWFlagResponse" xsi:nil="1" xmlns:ns1="<NamespaceURL>"/>
</soapenv:Body>
</soapenv:Envelope>
但是,如果我改变的价值该标志,我得到所有其他请求的正确答案:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<result>
<result>1</result>
</result>
</soapenv:Body>
</soapenv:Envelope>
(相同的结果为0)。
我认为它可能是我一开始没有初始化的东西,但是如果我没有在表中的PWResetFlag列上设置初始值,那么webService会返回正确的响应。
这是SQL服务器和设置默认值或什么在我的结束?
感谢
这可能取决于您的代码。请展示给我们。 – 2011-01-05 22:11:57