These are SOAP APIs that only return XML. You won't be able to get a JSON response from these. If you need a JSON response, you would need to write your own web service that calls this SOAP API and then converts the XML to a JSON response. If you are calling this from PowerShell, it's actually pretty easy to call this SOAP endpoint and then convert the XML response to JSON. There are numerous examples on the internet showing how to convert XML to JSON in PowerShell.
‎Aug 25, 2023 01:06 PM
I can't say as I've ever seen an exception when invoking this API. Does this happen for all request ID's? You will likely see an exception written out to website.log when the error occurs. Can you please let me know what that exception is? Also, can you invoke the GetResolvedRequestVariables API by going directly to the integraion.asmx page, by hitting the following URL in a browser on the App Broker server: http://localhost/esd/ws/integration.asmx?
‎Aug 25, 2023 10:58 AM
Thanks for your reply, yes, invoke the GetResolvedRequestVariables API by going directly to the integraion.asmx page, hitting the url working perfectly, but postman does not work. I went to the website.log, and here is the error i am getting
Unhandled Exception https://*/esd/ws/integration.asmx/GetResolvedRequestVariables Only Web services with a [ScriptService] attribute on the class definition can be called from script. at System.Web.Script.Services.WebServiceData..ctor(Type type, Boolean pageMethods)
at System.Web.Script.Services.WebServiceData.GetWebServiceData(HttpContext context, String virtualPath, Boolean failIfNoData, Boolean pageMethods, Boolean inlineScript)
at System.Web.Script.Services.RestHandler.CreateHandler(HttpContext context)
at System.Web.Script.Services.ScriptHandlerFactory.GetHandler(HttpContext context, String requestType, String url, String pathTranslated)
at System.Web.HttpApplication.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
‎Aug 25, 2023 11:04 AM
I assume the asterisk in your error message was just you replacing the server name for confidentiality reasons? I just tried this against my test server with no issue. In my case, I used Postman to issue a GET request to https://servername/esd/ws/integration.asmx/GetResolvedRequestVariables?requestID=3022 with NTLM authentication. This gave me an HTTP 200 OK response and the expected XML response body.
‎Aug 25, 2023 01:01 PM
Unhandled Exception https://*/esd/esd/ws/integration.asmx/GetResolvedRequestVariables?requestID=44 The file '/esd/esd/ws/integration.asmx' does not exist. at System.Web.UI.Util.CheckVirtualFileExists(VirtualPath virtualPath)
at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath)
at System.Web.UI.WebServiceParser.GetCompiledType(String inputFile, HttpContext context)
at System.Web.Services.Protocols.WebServiceHandlerFactory.GetCompiledType(String url, HttpContext context)
at System.Web.Services.Protocols.WebServiceHandlerFactory.GetHandler(HttpContext context, String verb, String url, String filePath)
at System.Web.Script.Services.ScriptHandlerFactory.GetHandler(HttpContext context, String requestType, String url, String pathTranslated)
‎Aug 25, 2023 11:05 AM
With this error, there are too many "/esd" in your URL, i.e. /esd/esd/ws/integration.asmx
That isn't the case with the other error you posted, so we'll have to look into that a bit more.
‎Aug 25, 2023 12:06 PM - edited ‎Aug 25, 2023 01:02 PM
Thanks, I tried with request make sure no duplicate esd, and this time the same error show up, any other log files may have more details?
thanks,
Feng
Unhandled Exception https://*/esd/ws/integration.asmx/GetResolvedRequestVariables?requestID=44 Only Web services with a [ScriptService] attribute on the class definition can be called from script. at System.Web.Script.Services.WebServiceData..ctor(Type type, Boolean pageMethods)
at System.Web.Script.Services.WebServiceData.GetWebServiceData(HttpContext context, String virtualPath, Boolean failIfNoData, Boolean pageMethods, Boolean inlineScript)
at System.Web.Script.Services.RestHandler.CreateHandler(HttpContext context)
at System.Web.Script.Services.ScriptHandlerFactory.GetHandler(HttpContext context, String requestType, String url, String pathTranslated)
at System.Web.HttpApplication.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
‎Aug 25, 2023 12:23 PM
Thanks everyone's help with this, the reason why is we are getting xml as a return, but we actually need json, so we have json in the header, that's causing the issue. We are just wondering
‎Aug 25, 2023 12:53 PM
These are SOAP APIs that only return XML. You won't be able to get a JSON response from these. If you need a JSON response, you would need to write your own web service that calls this SOAP API and then converts the XML to a JSON response. If you are calling this from PowerShell, it's actually pretty easy to call this SOAP endpoint and then convert the XML response to JSON. There are numerous examples on the internet showing how to convert XML to JSON in PowerShell.
‎Aug 25, 2023 01:06 PM