일부 배경의 경우 Passing IEnumerable Variables into .NET from ColdFusion과 관련이 있습니다. 대신 목록을 사용하도록 코드를 변경했으며 진행 상황을 확인했지만 .NET 및 ColdFusion에서 간단한 데이터 유형 이외의 다른 것을 사용할 때는 계속해서 장애물이되었습니다. 그래서 여기에 현재의 문제가 있습니다.메서드를 찾을 수 없음 ColdFusion의 목록이있는 .NET 메서드를 호출하는 중
첫째, 나는 다음과 같은 VideoWallEvent.cs 파일이있는 .DLL이 있습니다
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace CoStar.Utilities.VideoWall
{
public class VideoWallEventActivityCollection
{
public string CountryCode { get; set; }
public DateTime ActivityDate { get; set; }
public List<VideoWallEvent> Events { get; set; }
}
public class VideoWallEvent
{
public string ID { get; set; }
public decimal Latitude { get; set; }
public decimal Longitude { get; set; }
public VideoWallEvent(string EventID, decimal EventLatitude, decimal EventLongitude)
{
ID = EventID;
Latitude = EventLatitude;
Longitude = EventLongitude;
}
}
}
내가 또한 이전 질문에서 JNBProxyGUI.exe
다음 지침을 사용하여 프록시 객체의 객체를 생성했습니다.
당신이에서 볼 수 있듯이 :
<cfset UtilitiesProxy = ExpandPath("UtilitiesProxy.jar") />
<cfset CoStarUtilities = ExpandPath("CoStar.Utilities.dll") />
<cfset Paths = ArrayToList([CoStarUtilities, UtilitiesProxy])>
<cfset theEvent = CreateObject(".net", "CoStar.Utilities.VideoWall.VideoWallEvent", Paths) />
<cfset eventList = CreateObject(".net","System.Collections.Generic.List`1", Paths).init(theEvent.getDotNetClass()) />
<cfset eventList.Add(theEvent.Init("1234", javacast("bigdecimal","30.2669444"), javacast("bigdecimal","-97.7427778"))) />
<cfset eventList.Add(theEvent.Init("1235", javacast("bigdecimal","30.2669444"), javacast("bigdecimal","-97.7427778"))) />
<cfset eventCollection = CreateObject(".net", "CoStar.Utilities.VideoWall.VideoWallEventActivityCollection", CoStarUtilities) />
<cfdump var="#eventList.ToArray()#" label="Items in eventList" />
<hr />
<cfdump var="#eventCollection#" label="eventCollection" />
<cfdump var="#eventList#" label="eventList" />
<cfset eventCollection.Set_Events(eventList) />
이 나에게 다음과 같은 출력을 제공합니다 : 위의 DLL, 내가 생성 한 프록시 항아리 줘, 나는 다음과 같은 ColdFusion에서 코드를 실행 스크린 샷, 목록에 항목을 추가 할 수 있지만 List 객체를 예상하는 ActivityCollection 객체를 가져올 수 있지만 Set_Events
메서드를 호출하고 List를 전달하면 다음 오류가 발생합니다.
The Set_Events method was not found.
Either there are no methods with the specified method name and argument types
or the Set_Events method is overloaded with argument types that ColdFusion cannot
decipher reliably. ColdFusion found 0 methods that match the provided arguments.
If this is a Java object and you verified that the method exists, use the javacast
function to reduce ambiguity.
The error occurred in C:/inetpub/scribble/VideoWall/index.cfm: line 17
15 : <cfdump var="#eventList#" label="eventList" />
16 :
17 : <cfset eventCollection.Set_Events(eventList) />
이제이 목록을 Set_Events() 메서드로 올바르게 푸시하는 방법을 알아내는 데 도움이 필요합니다. (코멘트에서)
난 당신이 <하는 cfdump VAR = "#의 eventCollection.Get_Events() #"을 호출하면 당신이 얻을 무엇인지 알고 싶은데요/> –
정의되지 않습니다. –
DotNetProxy가 Set_Events() 뮤 테이터를 잘못 설정하면 궁금합니다. 구성 중에 빈 List로 Events 속성을 초기화하면 어떤 차이가 있는지 궁금합니다. –