rrubio
16 years agoContributor
unable to get result (datasets) when calling a web service
Hi all,
working with Web Services in TestComplete 8.0, I have noticed that sometimes I can not get the result from a web service call (a dataset data type), but in some other web services, I do get.
Below, you can find the project web services definition (xml files):
- web service Sessions - method GetList (this is working)
- web service Speciments - method GetList (this is NOT working)
Here, I put the program wrote in VBasic.
Set var1 = WebServices.login.GetList("raul3")
Log.Message "Any.text vale (" & var1.Any.text & ")"
Log.Message "Any.xml vale (" & var1.Any.xml & ")"
==> This is WORKING
Set var2 = WebServices.muestras.GetList("raul3", 1, null)
==> This is NOT WORKING. See attached error screenshot (VBerror.png)
If I execute this web service in the internet browser, it does work
I attached two files with the web services definition in TestComplete.
Can anybody help me with this? Do you have any idea about why the first call is working and not the second one?
Regards,
Raul
====================================================================================
Sessions - GetList: Web Service definition file (return value)
- <Method name="GetList">
<ClassMethod>1</ClassMethod>
<FormalSpec>pstrSessionKey:%String</FormalSpec>
<ReturnType>%XML.DataSet</ReturnType>
<WebMethod>1</WebMethod>
- <Implementation>
- <![CDATA[
]]>
</Implementation>
</Method>
Specimens - GetList: Web Service definition file (return value)
- <Method name="GetList">
<ClassMethod>1</ClassMethod>
- <FormalSpec>
- <![CDATA[
]]>
</FormalSpec>
<ReturnType>%XML.DataSet</ReturnType>
<WebMethod>1</WebMethod>
- <Implementation>
- <![CDATA[
]]>
</Implementation>
</Method>
working with Web Services in TestComplete 8.0, I have noticed that sometimes I can not get the result from a web service call (a dataset data type), but in some other web services, I do get.
Below, you can find the project web services definition (xml files):
- web service Sessions - method GetList (this is working)
- web service Speciments - method GetList (this is NOT working)
Here, I put the program wrote in VBasic.
Set var1 = WebServices.login.GetList("raul3")
Log.Message "Any.text vale (" & var1.Any.text & ")"
Log.Message "Any.xml vale (" & var1.Any.xml & ")"
==> This is WORKING
Set var2 = WebServices.muestras.GetList("raul3", 1, null)
==> This is NOT WORKING. See attached error screenshot (VBerror.png)
If I execute this web service in the internet browser, it does work
I attached two files with the web services definition in TestComplete.
Can anybody help me with this? Do you have any idea about why the first call is working and not the second one?
Regards,
Raul
====================================================================================
Sessions - GetList: Web Service definition file (return value)
- <Method name="GetList">
<ClassMethod>1</ClassMethod>
<FormalSpec>pstrSessionKey:%String</FormalSpec>
<ReturnType>%XML.DataSet</ReturnType>
<WebMethod>1</WebMethod>
- <Implementation>
- <![CDATA[
New gobjSession
New objDataSet
Set $ETRAP = "GOTO GetListErrorHandler"
// validate session
Set gobjSession = ##class(co.sys.cSessions).CheckSession(pstrSessionKey)
If ($ZERROR = "")
{
// get session list
Set objDataSet = ##class(co.sys.cSessions).GetList()
if ($ZERROR = "")
{
// return dataset
Quit objDataSet
}
}
// error listing sessions
Do ..RaiseError($ZERROR)
Quit:$QUIT "" Quit
GetListErrorHandler
Do Err1^ErrRoutine
Do ..RaiseError($ZERROR)
Quit:$QUIT "" Quit
]]>
</Implementation>
</Method>
Specimens - GetList: Web Service definition file (return value)
- <Method name="GetList">
<ClassMethod>1</ClassMethod>
- <FormalSpec>
- <![CDATA[
pstrSessionKey:%String,pintStatus:%Integer,&pstrList:%String=""
]]>
</FormalSpec>
<ReturnType>%XML.DataSet</ReturnType>
<WebMethod>1</WebMethod>
- <Implementation>
- <![CDATA[
New gobjSession
New objResult
Set $ETRAP = "GOTO GetListErrorHandler"
// validate session
Set gobjSession = ##class(co.sys.cSessions).CheckSession(pstrSessionKey)
If ($ZERROR = "")
{
// get specimens list
Set objResult = ##class(co.acb.cSpecimens).GetList(pintStatus, .pstrList)
If ($ZERROR = "")
{
// return dataset
Quit objResult
}
}
// error found
Do ..RaiseError($ZERROR)
Quit:$QUIT "" Quit
GetListErrorHandler
Do Err1^ErrRoutine
Do ..RaiseError($ZERROR)
Quit:$QUIT "" Quit
]]>
</Implementation>
</Method>