以编程方式注册SOAP扩展 [英] Programmatically registering a SOAP Extension
问题描述
Hello Everyone ..
所以基本上它就像这样..
我需要使用一个Web服务(用java编写),它不会暴露它需要SOAP头中的安全性令牌。
然后我发现了一篇帖子( http://www.codeproject.com/KB/cpp/ SOAP_Header_Extension.aspx )由一个名叫Jim Roth的好人编写。
这显示了如何将SOAP标头添加到传出的SOAP调用中。
这样做很好,我可以成功将安全令牌添加到我的标头并使用Web服务。
现在..我需要将我的应用程序移植到启用COM的类库,以便我可以使用某些vbscripts中的服务..(该库是我们的结算api支持众多提供商)
注册soap扩展我添加以下内容到我的app.config
<? xml version = " ; 1.0" encoding = " utf-8" ?> |
< 配置 > |
< system.web > |
< webServices > |
< soapExtensionTypes > |
< add type = " SOAPTestApp.myExtension, SOAPTestApp " priority = " 1" group = " Low" /> |
< / soapExtensionTypes > |
< / < font style ="font-size:11px"> webServices > |
< / system.web > |
< / 配置 > |
很抱歉在错误的论坛发帖:)< BR>
Hello Everyone..
So basically it's like this..
I need to consume a web service (written in java) that doesn't expose that it requires a security token in the SOAP header.
I then found a post (http://www.codeproject.com/KB/cpp/SOAP_Header_Extension.aspx) written by a nice guy named Jim Roth..
This shows how to add a SOAP header to an outgoing SOAP call.
This works well and i could successfully add the security token to my header and consume the web service.
Now.. I need to port my application to a COM enabled class library so i can use the service from some vbscripts.. (the library is our billing api which supports numerous providers)
To register the soap Extension i added the following to my app.config
<?xml version="1.0" encoding="utf-8" ?> <configuration> <system.web> <webServices> <soapExtensionTypes> <add type="SOAPTestApp.myExtension,SOAPTestApp" priority="1" group="Low"/> </soapExtensionTypes> </webServices> </system.web> </configuration> 解决方案Sorry for posting in the wrong forum :)
这篇关于以编程方式注册SOAP扩展的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文