Dear colleagues,
I am trying to communicate WinCC OA via XML-RPC with a third-party system.
My goal is to download one file from the remote system (url) and read the content to decode information
When I use any web browser to open the url, it always redirect to the xml download ("http://IPADDRESS/xmlstatus.cgi?download_xml=1")
I also set up XML-RPC set of functions in WinCC OA (3.15 Patch 05) as in the example provided in the WinCC OA documentation:
#uses "CtrlXmlRpc"
main()
{
string id = "CM-DMG";
string func = "test";
dyn_mixed args = makeDynString("");
mixed res;
string host = "IPADDRESS";
string path = "/cgi-bin/xmlstatus.cgi?download_xml=1";
int port = "8080";
bool secure = FALSE;
xmlrpcClient();
xmlrpcConnectToServer(id, host, port, secure, path);
xmlrpcCall(id, func, args, res);
DebugN("Result of XmlRpc call", res);
xmlrpcCloseServer(id);
}
But XMLcall does not answer correctly. I sniffed network traffic in both situations and it seems that in the case of WinCC OA, the HTTP request is a "POST" request instead a "GET" request, in the case of the web browser.
After HTTP "POST" request, XMLRPC server does not answer and drops the TCP connection afterwards.
Any ideas on how to force this kind of request with xmlrpcCall?
Thanks a lot
Best regards,
Javier Fernandez
XMLRPC issues
- mkoller
- Posts:741
- Joined: Fri Sep 17, 2010 9:03 am
Re: XMLRPC issues
Are you sure that the server at the download url is really an XML-RPC Server ?
I have the feeling it is not.
Just try to use a netGet() on that url, just as a Web Browser would do
I have the feeling it is not.
Just try to use a netGet() on that url, just as a Web Browser would do