SOAP API HTTPS - 与传统的ASP连接 [英] SOAP API HTTPS - Connecting with Classic ASP

查看:217
本文介绍了SOAP API HTTPS - 与传统的ASP连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道有很多关于传统的ASP客户端连接到SOAP Web服务的讨论,但我在连接到启用HTTPS SOAP服务很有趣。

I know there are plenty of discussions relating to connecting a classic ASP client to a SOAP web service, but I'm interesting in connecting to a HTTPS enabled SOAP service.

我们已经写在WCF现有SOAP的Web服务,它的伟大工程......对于.NET客户端。我们已经从一个新客户的请求,我们使用传统的ASP? - 我们如何连接到你的Web服务API我没有一个线索从哪里开始,它开始了曙光,我说,我不知道什么实际的SOAP消息的结构。

We have an existing SOAP Web service written in WCF and it works great...for .NET clients. We've had a request from a new customer, "We use classic ASP - how do we connect to your Web Service API?" I didn't have a clue where to start, and it started to dawn on me that I had no idea what the structure of the actual SOAP messages are.

我见过的传统的ASP聊天SOAP Web服务在网络上的例子,但是没有它通过HTTPS交换消息。我们使用的WCF绑定的消息级安全性。

I've seen the examples of classic ASP chatting to SOAP web services on the web, but none which exchange messages over HTTPS. We're using message level security on the WCF bindings.

这是一个失败的事业 - 从一个HTTPS SOAP服务接口做的WS-Security prevent传统的ASP

Is this a lost cause - does WS-Security prevent classic ASP from interfacing with a HTTPS SOAP Service?

先谢谢了。

推荐答案

有点调查后,我想出了以下内容:

After a bit of investigation I came up with the following:


  1. WCF消息安全不能与传统的ASP中使用

  1. WCF Message security can't be used with classic ASP

我创建了具有下列绑定服务第二端点:

I created a second endpoint on the service which had the following bindings:

  <basicHttpBinding>
  <binding name="SecureBasic" >
  <security mode="TransportWithMessageCredential">
    <message clientCredentialType="UserName"/>
  </security>
  </binding>
 </basicHttpBinding>"


这个几个音符 -


  1. 您需要使用HTTPS(即安装自证书)

  1. You'll need to use HTTPS (i.e. install a self-certificate)

这不是安全的preffered方法使用在互联网上 - 最好你应该使用消息安全。

It's not the preffered method of security to use over the internet - ideally you should use Message security.

我用了一个客户的用户名和密码验证程序authentciate客户端请求

I used a customer username and password validator to authentciate the client request

下面的ASP code工作以及调用此服务:

The following ASP code works well calling this service:

        soapServer = "YourSOAPAddress"
        soapMessage = "Put Your SOAP Message in here use Charlies / Fiddler to determine the message"
        Set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP.3.0") 
        xmlhttp.setOption(2) = 13056
        xmlhttp.open "POST", soapServer, False
        xmlhttp.setRequestHeader "SOAPAction",   "urn:Alpha.Services.API.DeviceService/IDeviceService/GetDevices"
        xmlhttp.setRequestHeader "Content-Type", "text/xml; charset=utf-8"
        xmlhttp.send(soapMessage)   
        Response.Write "<br>Finished calling Web Service."
        Response.Write "<br>Status = " & xmlhttp.statusText
        Response.Write "<br>ResponseText = " &  xmlhttp.responseText

有关使用不支持的WS-Security(例如ASP),这是一种可能的解决方案,一种语言的客户端系统。

For client systems that use a language that does not support WS-Security (such as ASP) this is one possible solution.

这篇关于SOAP API HTTPS - 与传统的ASP连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆