我创建了一个简单的头类:正确的XML为缓存Web服务的SOAP头发送
Class Sample.Headers Extends %SOAP.Header
{
Parameter NAMESPACE = "http://tempuri.org";
Property UserName As %String;
}
在我提出一定要设置正确的命名空间中SOAPHEADERS
参数的Web服务:
Parameter SOAPHEADERS = "UserName:Sample.Headers";
我送使用了SoapUI以下XML:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org">
<soapenv:Header>
<tem:UserName>This is the header</tem:UserName>
</soapenv:Header>
<soapenv:Body>
<tem:Test>
<!--Optional:-->
<tem:argAge>10</tem:argAge>
</tem:Test>
</soapenv:Body>
</soapenv:Envelope>
我得到以下错误:
ERROR #6254: Tag expected, XML input, This is the header, is not in proper format as child of UserName (ending at line 3 character 18).
什么是正确的XML格式,以便UserName设置正确?
我想他们的榜样与命名空间,我仍然得到同样的结果。 –