各位好,
现在遇到的问题是,打算用.NET生成的客户端代理System.ServiceModel.ClientBase<T>,去调用寄存在JBoss中的服务。但服务需要Http Header的Authorization,需要输入用户名和密码,如以下格式:
POST /scrumworks-api/scrumworks HTTP/1.1
Content-Type: text/xml;charset=UTF-8
SOAPAction: ""
User-Agent: Jakarta Commons-HttpClient/3.1
Content-Length: 246
Authorization: Basic YWRtaW5pc3RyYXRvcjpwYXNzd29yZA==
Host: 172.16.4.209:8080
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:typ="http://api.scrumworks.danube.com/ScrumWorks/types">
<soapenv:Header/>
<soapenv:Body>
<typ:getProducts/>
</soapenv:Body>
</soapenv:Envelope>
请问如何实现呢,希望给出代码或相关类、config字段等等,或者相关链接也可以,我Google了半天都没有结果。