0

我从客户那里收到了使用以下 SOAP 请求的文档。我以前从未使用过 SOAP,我正在使用此问题中列出的解决方案:Client to send SOAP request and received response

但是,当soapEnvelop.LoadXml运行时我得到:'head' is an undeclared prefix. Line 5, position 39.

这是我从客户端收到的 SOAP xml:

<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:Header>
        <head:CustomCredentials>
            <head:UserName>Username</head:UserName>
            <head:Password>Password</head:Password>
            <head:Source>Code</head:Source>
            <head:CurrentCulture>en-CA</head:CurrentCulture>
        </head:CustomCredentials>
    </soap:Header>
    <soap:Body>
        <WebServiceMethodName xmlns='Web Service Namespace' />                                        
    </soap:Body>
</soap:Envelope>

我不完全确定在这里做什么。通过谷歌搜索,我相信名称空间中不存在元素头。

4

0 回答 0