i created a CGI Server and Client with the wizard using Binary mode. This cgi server is used with apache webserver.
Calling the URL in a browser shows the webservice library website with available dispatchers. So it seems as if the server works.
But on calling a method of this webservice from the client only an exception is raised showing
the first 500 characters of the RODL, saying
'Invalid binary header. Either incompatible or not a binary message.
<?xml version=“1.0” encoding=“utf-8”?>
<Library Name=“HPQRWebServiceLib” UID="{13F12D27-B186-4CF1-B1DC-F466E64C2A4C}" Version=“3.0”>
<Services>
<Service Name=“HPQRWebService” UID="{0AD2894A-D6E8-488E-A453-70824E4FF55B}">
<Interfaces>
<Interface Name=“Default” UID="{A8BA8729-1230-4303-AA28-3F4352853939}">
<Documentation><![CDATA[Service HPQRWebService. This service has been automatically generated using the RODL template you can find in the Templates directory.]]></Documentation>
<Operatio’
After creating a VCL standalone Server project and connecting the client to this locally running server the client works, so I think is has to do with the CGI Server and not the client.
What am I doing wrong with the cgi server ? I only implemented the method. All the other code is generated by RO preprocessor and the wizard.
Check please have you set right targetURL for client channel, it should contain ‘/bin’ part at the end in the case of using binary message, for example: http://localhosst/NewProject.exe/bin
Just for interest purposes, I am having the exact same problem with a CGI Server of mine. Weird thing is that this error only occurs on one particular server machine. Other server machines installations work perfectly and other types of server (service, dll) work fine too despite sharing all code. Like I said, this is just for interest – I am still investigating here.
I’ve established that it’s definitely not a URL problem btw.
I was on the site where this problem occurs yesterday. There are two IIS 7 setups and one hosts the CGI module fine, and the other (the Live system of course) exhibits the original problem in this thread.
After much testing I discovered that the problem in my case is that the software I am connecting with uses the Channel.OnLoginNeeded event to login to the CGI Server. When I forced the login (via a LoginEx call) prior to accessing any server methods or data, the problem went away.
Clearly there is a configuration difference between these two IIS 7 setups, which I have had to leave with the hosting company to sort out. (It’s fair to say I am no IIS expert).