 |
|
|
| View previous topic :: View next topic |
| Author |
Message |
dearhunter
Joined: 26 Jun 2009 Posts: 2
|
Posted: Fri Jun 26, 2009 4:37 pm Post subject: WSDL does not parse parameters |
|
|
Looking to last post dates, seems like nobody is really using PEAR::SOAP. Or perhaps it works flawlessly for everyone
Still, I have this problem, a wsdl, provided by Glassfish-hosted java web service is not parsed completely. Operations are listed, but parameters are all missing, so when I try to call a method, my web service receives nulls. The parameters are of type String.
Same web service works perfectly when invoked with php_soap extension, which I cannot use due to hosting provider restriction.
This is sample packet from php_soap:
| Code: | <?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="<...edited...>">
<SOAP-ENV:Body>
<ns1:Login>
<sessionId>0ru4k44n1g138e7s0167jka8a4</sessionId>
<username>someuser@somehost.com</username>
<password>623465</password>
</ns1:Login>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope> |
Now this is the same from Pear Soap_Client:
| Code: | <?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns4="...edited, same as in php_soap case ...">
<SOAP-ENV:Body>
<ns4:Login/>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope> |
Anyone got any idea, what is wrong? Thank you. |
|
| Back to top |
|
 |
dearhunter
Joined: 26 Jun 2009 Posts: 2
|
Posted: Fri Jun 26, 2009 6:11 pm Post subject: |
|
|
In addition to that, here is the fragment of generated code, created by generateProxyCode() function:
| Code: | function &Login()
{
$result = $this->call('Login',
$v = null,
array('namespace' => '...edited, same as above...',
'soapaction' => '',
'style' => 'document',
'use' => 'literal'));
return $result;
}
|
As one can see, there is null in place for parameters. I'm not sure why this happens.
When creating a SOAP_WSDL instance, it can be seen that it is at least aware of WS method parameters, since it actually gets them from wsdl, as it turns out.
May be my syntax is frong. Here is my code:
| Code: | $params = array(
'sessionId' => session_id(),
'username' => $username,
'password' => $password
);
$response = $this->client->call('Login',
$params,
array('namespace' => '...edited, same stuff...',
'soapaction' => '',
'style' => 'document',
'use' => 'literal'));
|
$this->client is SOAP_Client instance. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|