[BNM] php nusoap and wsdl error
Jason Bailey
j.bailey at sussex.ac.uk
Fri Jun 15 13:23:32 BST 2007
Hello,
I'm getting the following error from a web service I'm trying to get stuff
from:
wsdl error: phpType is struct, but value is not an array
I'm using nusoap 0.72 with php to access the wsdl.
It seems to be related to the parameters I'm trying to pass to the Login
function. Something to do with how php serialises the array before passing
to the wsdl. Does this make sense to anyone? Anyone know a way around it?
I have the following....
$WSDL= "https://.... ...//WebServices.asmx?WSDL";
$client = new soapclient($WSDL,'wsdl',true);
I've been messing with the $login_para variable which is expecting a
Username and Password e.g.
$login_para= array('param' => array("Username" => "my_username","Password"
=> "my_password"));
$login = $client->call('Login',$login_para);
The WSDL starts....
-
<wsdl:definitions targetNamespace="https://blahblahblah/WebService">
-
<wsdl:types>
-
<s:schema elementFormDefault="qualified"
targetNamespace="https://blahblahblah/WebService">
-
<s:element name="Login">
-
<s:complexType>
-
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="Username" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="Password" type="s:string"/>
</s:sequence>
</s:complexType>
</s:element>
-
<s:element name="LoginResponse">
-
<s:complexType>
-
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="LoginResult" type="s:string"/>
</s:sequence>
</s:complexType>
</s:element>
-
<s:element name="Logout">
The login call produces the error and I'm a bit stumped. A colleague has
just tried it with JSP/Axis and got it to work but this complex types thing
with PHP has thrown me. The webservice is written in VB NET I think and the
information I have is:
public function Login (ByVal Username as string, ByVal Password as string)
as String
Any suggestions?
Thanks
Jason
More information about the BNMlist
mailing list. Powered by Wessex Networks