Gemini Community Support Site

This Gemini community support site can be used to find solutions to product issues. You can log in using Open Id, Google Profile and even Facebook. Feel free to ask a question or browse FAQs and documentation. Product tour videos are also available along with how-to videos demonstrating key Gemini capabilities.




Invalid web service access code

api

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
bobw
Replies (7)
helpful
0
not helpful

Can you please try and restart the web app?


Mark Wing
· 9108
Mark Wing
helpful
0
not helpful

We restarted Gemini, but I'm still seeing the same thing. Also tried resetting IIS with the same result. Any other ideas?


bobw
· 1
bobw
helpful
0
not helpful

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


bobw
· 1
bobw
helpful
0
not helpful

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.


bobw
· 1
bobw
helpful
0
not helpful

Please send the attachment to support at countersoft dot com with a reference to this thread.


Saar Cohen
· 5000
Saar Cohen
helpful
0
not helpful

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.


bobw
· 1
bobw
helpful
0
not helpful

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.


Saar Cohen
· 5000
Saar Cohen