簡體   English   中英

使用ColdFusion消耗ASP.Net Web服務

[英]Consume ASP.Net Web Service using ColdFusion

這是我到目前為止所擁有的。 我正在創建一個ASP.NET Web服務來記錄我們的內部網站活動。 我們的大多數內部站點都是用ColdFusion編寫的。 我以前在ASP.Net世界中使用過Web服務,但是ColdFusion對我來說是個新手。 我剛剛開始嘗試這種情況。 為了解釋為什么我們要混合兩種技術:我們目前正在遠離ColdFusion,並且處於過渡階段。

首先是C#代碼。 我相信這是正確的。

 [WebService(Namespace = "http://oursite.org:86")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.ComponentModel.ToolboxItem(false)]

[System.Web.Script.Services.ScriptService]
public class LogEvent : System.Web.Services.WebService
{
    private IContainer components = null;


    public LogEvent()
    {
        InitalizeComponent();
    }

    private void InitalizeComponent()
    {
    }

    protected override void Dispose(bool disposing)
    {
        if (disposing && components != null)
        {
            components.Dispose();
        }

        base.Dispose(disposing);
    }



    [WebMethod]
    public string InsertEvent()
    {

        return "HellWorld";

    }
}

我只有一個簡單的CFC來調用Web服務。

<cffunction name="TestWebService" access="remote" returntype="Any" >

        <cfinvoke webservice="oursite.org:86/LogEvent.asmx?wsdl" method="InsertEvent" returnvariable="result"   >

        <cfdump var="#result#">       
  </cffunction>

當我運行CFC方法時,出現以下錯誤。

Unable to read WSDL from URL: 

我搜索並遵循了發現的所有教程和建議,但是我不是ColdFusion的專家。 我想念什么嗎?

任何幫助,將不勝感激。

因此,我完全確定ColdFusion服務器是一台雲服務器(即不在我們的網絡中),並且Web服務正在本地網絡服務器上運行。 一旦將ColdFusion代碼移動到本地服務器,該服務就會像預期的那樣工作。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM