Link to home
Start Free TrialLog in
Avatar of DavRent
DavRent

asked on

How to call web service from php

Hello,

I need to call a web service from php.
Attached you'll find:

1. The wsdl file I'm using (server.wsdl).
2. The php file that calls the web service (client.php).
3. A soap request message string that works (works.xml.txt). I generated this using the test client "saopUI". It's an example of a message that doesn't create a soap fault.
4. The soap request generated by client.php (request.php.xml) - which causes this soap fault: "Not enough message parts were received for the operation.".

You can see that the format of the message that works (works.xml.txt) is different than the format of the message generated by client.php (item 4).

How do I use php soap to create the appropriate format that will work?

Thanks.
You can see that the
server.wsdl.txt
works.xml.txt
client.php
Avatar of double_helix
double_helix

At first glance your code looks correct.
The file "request.php.xml" is missing from the attachments here, perhaps this could shed some light on the problem.
In addition to the above, it looks (from the WSDL) as though the "generateLicense" command only accepts one parameter, $params.
You should try dropping the $password parameter and only pass $params (password is included in the params anyway, which is expected by the "generateLicense" element sequence.

Hope this helps.

Regards,
James.
ASKER CERTIFIED SOLUTION
Avatar of DavRent
DavRent

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial