Invalid web service access code
Gemini 3.1.2....
I'm trying to call the web service but keep getting the error message, "Invalid web service access code". I am passing the code that's set in Administration->Security Settings->General; I even changed it in case something had gone wonky in the DB, but I'm still getting the error. Any idea what may be wrong?
Here's my code:
$client = new SoapClient('http://example.com/webservices/Gemini.asmx?WSDL');
$result = $client->GetAllProjects('AccessCodeSetInAdminSection');
What am I missing?
Thanks, Bob
bobw
· 1 |
|
Wednesday, April 8, 2009, 3:48:02 AM |
0
|
Can you please try and restart the web app? |
||||
|
0
|
We restarted Gemini, but I'm still seeing the same thing. Also tried resetting IIS with the same result. Any other ideas? |
||||
|
0
|
Here are the relevant bits from a network sniff; see anything off? TCP packet from 172.16.131.32:60867 to 208.106.255.129:http(80) (507 bytes) ACK PUSH POST /webservices/Gemini.asmx HTTP/1.1 Host: devbugs.webcontrolcenter.com Connection: Keep-Alive User-Agent: PHP-SOAP/5.2.5 Content-Type: text/xml; charset=utf-8 SOAPAction: "http://countersoft.com/gemini/webservices/GetAllProjects" Content-Length: 245
TCP packet from 208.106.255.129:http(80) to 172.16.131.32:60867 (1448 bytes) ACK HTTP/1.1 500 Internal Server Error Date: Wed, 08 Apr 2009 16:49:56 GMT Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET X-AspNet-Version: 2.0.50727 Cache-Control: private Content-Type: text/xml; charset=utf-8 Content-Length: 1220 http://schemas.xmlsoap.org/ws/2004/08/addressing/fault urn:uuid:bccef1b4-6766-4393-b49c-7c6f5258dc22 urn:uuid:35f2f4f4-15d4-4380-b2d5-ba2889f5e180 http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous 2009-04-08T16:49:56Z 2009-04- 08T16:54:56Z soap:Server Server was unable to process request. ---> Invalid web service access code |
||||
|
0
|
Sorry, the forum is hiding angle brackets above - it really does not want to let angle brackets go through. I also tried pre-converting them to entities, and the forum just passes those through in the raw - not sure how to make it happy. And I can't attach the file for insufficient permission. |
||||
|
0
|
Please send the attachment to support at countersoft dot com with a reference to this thread. |
||||
|
0
|
I figured out what the problem was. Turns out that there's a quirk of .NET web services that one must be aware of when not accessing them with .NET. In particular, you must always wrap up the parameters in a structure (array or object). Once I did that like this: $result = $client->GetAllProjects(array('accessCode' => 'access code')); it worked properly. |
||||
|
0
|
Good news. Thanks for the update and solution. FYI - in version 3.5 we will have REST web services so it should be even easier to use. |
||||
|