Can';t使用Quickbooks web连接器/CFML进行身份验证
我正在尝试在Railo4.x中实现Quickbooks Web连接器(QBWC)Can';t使用Quickbooks web连接器/CFML进行身份验证,quickbooks,railo,cfml,qbwc,Quickbooks,Railo,Cfml,Qbwc,我正在尝试在Railo4.x中实现Quickbooks Web连接器(QBWC) <cfcomponent output="false"> <cffunction name = "authenticate" access="remote" returntype="string"> <cfargument name = "username" type="string" required="true"> <cfargument name
<cfcomponent output="false">
<cffunction name = "authenticate" access="remote" returntype="string">
<cfargument name = "username" type="string" required="true">
<cfargument name = "password" type = "string" required="true">
<cfset var loc = {}>
<cfset loc.retVal= []>
<cfset loc.retVal[1] = "MYSESSIONTOKEN">
<cfset loc.retVal[2] = "NONE">
<cfset loc.retVal[3] = "">
<cfset loc.retVal[4] = "">
<cfreturn loc.retVal >
</cffunction>
<cffunction name = "clientVersion" access="remote" returnType ="string">
<cfargument name = "productVersion" type="string" required="true">
<cfset var loc = {}>
<cfset loc.retVal = "">
<cfreturn loc.retVal>
</cffunction>
</cfcomponent>
我能再深入一点,发现Railo可能有铸造问题
<?xml version="1.0" encoding="UTF-8"?>
-<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">-<soap:Body>-
---
无法将复杂对象类型Struct强制转换为String使用内置函数“serialize(Struct):String”从Struct创建字符串 现在我知道你们中的一些人正在考虑“只是序列化”结构。嗯,据我所知,Railo中没有这样的函数
非常感谢您的任何想法。我看到的第一个问题是,您的“authenticate”方法的返回类型为字符串,但您返回的是数组。如果您试图返回一个字符串,可以使用return-serializeJSON(loc.retVal)而不是retVal,retVal将以JSON格式的字符串返回该字符串
Object reference not set to an instance of an object.
More info:
StackTrace = at QBWebConnector.WebService.do_authenticate(String& ticket, String& companyFileName)
Source = QBWebConnector
<?xml version="1.0" encoding="UTF-8"?>
-<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">-<soap:Body>-