How to test a wsdl webservice? - php

i'm completely new to webservices (and especially with SOAP / WSDL)
Right now, i have a .WSDL in the root of my server which i have fully automatically generated.
How to test that my webservice is functionning (echoing the right results) without bugs ?
*How to interact with that .wsdl file ?*
Regards.

Or use SOAP UI.

If you want to use PHP, I would say you look into PHP SoapClient.

Related

PHP SOAP OTA Connection

for a customer I want to implement the OTA service in an interface to check availabilty and things like that.
I've downloaded the 2017 specifications from OpenTravel. But I lack some information. I want to realize it with PHP and SOAP and later connect it to Magento. But I can't find any url for the SOAP client to send those XMLs to.
I would greatly appreciate any help on this topic or maybe suggestions to do it in an easier way.
Greetings
Consuming OTA SOAP web services is tricky as PHP SoapClient class does not handle it properly.
First you should generate the PHP sdk from the WSDL corresponding to the availabilities you need to send requests to. You should give the PackageGenerator project from Github a try.
Nevertheless, as I said, the native PHP SoapClient class does not map the parameters to the XML request correctly. This is where you have to write your proper code to handle the mapping from the PHP objects to the XML request.
As I work regularly on these sorte of issues, I can help you further but only privately at contact#wsdltophp.com.

Making a Soap Call to Given WSDL

I have a soap server and i want to make a login request.
https://github.com/haruntuncay/soapClient In this repo, you can see generated php code from "WSDL2PHP". How can i do a proper login request.I could not get it working.You can see what i have tried in final 20 lines of server.php.
TIA
You should definitively use a WSDL to php generator as I think you're not sending the request as it should be.
So using a WSDL to php generator, you will know exactly how to send the request and its associated parameters using PHP objects and the native PHP SoapClient class without having to deal directly with it.
I advise you to try the PackageGenerator project.

best way to generate wsdl in php for java axis client

I am consuming a web service written in PHP. I am using axis to generate client jar on my side but when i generate client code from WSDL and make request, request xml contains multiRef tag and the php server can not understand this tag. I will ask them to generate a wsdl in a new way. I searched and there are many ways in php to create wsdl. Which method is the best way for the clients using axis? Have you experienced such a problem before? if yes what did you do?
Thanks.
The service was rpc-encoded, i ask them to change it to rpc-literal and the problem is solved.

Raw text SOAP message with PHP

I´m trying to do an integration between my own PHP application, and other external software which is 'waiting for' (listening) SOAP messages. But the key question on my situation is that this software which is listening for SOAP messages only accepts RAW contents and has no method which could be called, or Wsdl to be used.
Yes I know... it´s quite strange because with SOAP you usually should send a method request with some parameters, but in this case the only that I have is a URL where I should send with SOAP message that should contain only an string (formatted in a special way which is not a problem), and then this server will return to my PHP application another SOAP message that will contain a string. And that´s all.
Seems that in my case I can not use a PHP SOAP library because I have no method (or function) to call; the only thing that I have is a URL and a string that I should pass like a parameter. I´ve been thinking of using PHP sockets to create a basic SOAP message to that 'strange soap server', but I have no clue about how to do it, or how I woule create with PHP a way to keep my application waiting for the answer comming from that external server.
Thank you so much for your help in advance.
You might be best of by just making the WSDL on your own. It isn't the most trivial thing to do, but it is well documented so you should be able to figure it out.
THere is no need to get the WSDL from the service you're sinding your requests to (it is rather better to have WSDL locally in some cases), so you just initialize the default SOAP client in PHP with that local WSDL, and off you go.

Passing a Soap message from PHP

I know almost nothing about PHP. So I have a coworker doing the PHP stuff. It's not going well so I need some help.
Here is the task.
Receive a SOAP message (in this case from SalesForce) in a PHP site on Linux.
Take that soap message and simply pass it along to a web service (as a parameter) running on a windows server. Which I am writing. The reason we need to do it this way is far beyond the scope of this question. We have no choice.
The communication between the PHP page and the webservice works. The problem is taking the soap message and sending it to the method in the webservice as a parameter.
Here is the big question:
How can we accept a soap message and send it as a prameter. Even converting it to a simple string and sending that would work.
Thanks in advance.
It looks to me like you need to use a SOAP handler, and then reformat the request accordingly.
I'd suggest you start by taking a look at NuSOAP, which provides PHP SOAP support. Go here - for a nifty tutorial on NuSOAP

Categories