mino98
Contributor
Contributor

"getFactoryJndiNameForUser" error in consuming webservice

Hello,

I'm trying to access to the VCO webservices from PHP, which should be trivial since there's a good documentation in the "developer manual" and since the WSDL is available.

However, I always get the following server-side exception (here is after a find("VC:Virtualmachine", ...), but I get the same error regardless of the called method):

Fatal error: Uncaught SoapFault exception: [soapenv:Server.userException] java.rmi.RemoteException: find(); nested exception is: 
	ch.dunes.util.DunesServerException: Unable to invoke method 'getFactoryJndiNameForUser' in /path/test2.php:5
Stack trace:
#0 [internal function]: SoapClient->__call('find', Array)
#1 /path/test2.php(5): SoapClient->find('VC:VirtualMachi...', NULL, 'user123', 'password123')
#2 {main}
  thrown in /path/test2.php on line 5

the code I'm using is a minimalist 2-liner, just a "proof of concept":

$vso = new SoapClient("http://url:8280/vmware-vmo-webcontrol/webservice?WSDL");
$result = $vso->find("VC:VirtualMachine", null, "user123", "password123");

What I am doing wrong?

0 Kudos
5 Replies
mino98
Contributor
Contributor

Sorry for bumping this thread, but I really cannot solve this...

did anyone notice the same error already?

0 Kudos
admin
Immortal
Immortal

Are you sure your username / password are correct? I got this error when I was using bad credentials. Try your credentials by connection with the vCO Smart client

0 Kudos
robrtb12
Enthusiast
Enthusiast

I got this message for not having access to vCenter.  took awhile to track down

0 Kudos
Andreas_Diemer
Enthusiast
Enthusiast

Hi mino98,

as mentioned from all others, normaly this shows and auth error (bad user and / or PWD).

What SOAP client did you use and which platform? There are / were known problems with nusoap client.

Regards, Andreas

------ for correct and / or useful answers please award points visit http://www.vcoteam.info & http://mighty-virtualization.blogspot.com
0 Kudos
karen6i
Contributor
Contributor

HI,

I try to do the some thing using asp.net and I got the some error.

I just simple replace the null with empty string "" and the problem is fixed.

0 Kudos