开发者

Why is my integer parameter being ignored/converted on this SOAP call?

I am making a 开发者_JS百科call to a .Net WebService using this soap package...

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
               xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
               xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
        <RunData xmlns="http://applecorepixels.com.au/dwwService/">
            <AccessCode xsi:type="xsd:int">6744</AccessCode>
        </RunData>
    </soap:Body>
</soap:Envelope>

The call is being received ok, however, the 6744 parameter value is being received as 0 by the web service.

Initially, I was passing the parameter as just <AccessCode>6744</AccessCode> and thought the zero conversion was because the incoming integer parameter was being interpreted as a string, and added the xsd.

What is missing that will indicate the parameter is an integer?


Make sure the parameter name specified in the SOAP call is exactly the same as the parameter name in the Web Service.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜