best way to generate wsdl in php for java axis client - php

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.

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.

Difference between cURL and SOAP in PHP?

I am curious to know about different ways of implementing web services in PHP? Is there other ways except cURL and SOAP? How SOAP is different than cURL? Is there any similarities also between them?
Thanks,
ursitesion
You can implement a web service in PHP with SoapServer or with PHP - return JSON creating a REST interface. There are other ways, such as XML-RPC, but I usually end using either SOAP or REST, I prefer REST whenever possible.
Curl is a tool that you can use to consume a web service, it's not used to create a web service.
REST or SOAP reading that might help.
Probably best to think of cURL as just a way to send a request (eg GET,POST) to another server.
There are alternatives to cURL, including just straight file_get_contents()
Edit : replaced a rotted link. Also, having used SOAP quite a lot since this first reply, I'd add that another main reason you'd prefer SOAP to REST would be if you have to absolutely, positively double check that every transaction was received, else have the opportunity to resend it. No doubt you can do this with a suitably designed REST webservice, but that would need careful design and testing.

Create a webservice in Php native

I am new in web service. I was totally confused when seeing examples to create web service in internet. Actually, My client have xml to place the orders. what they want is they need to create a wsdl(web service) to call the xml by their vendor forms. So i need to create a webservice that integrate with xml and vendopform(it may be in any language). How i can do this, my mind has empty now to think this. Can any body help me to sort this issue.
If you're creating a SOAP service (which it sounds like you are, and I feel sorry for you ;)), try starting by looking at PHP's SOAP extension:
http://php.net/manual/en/book.soap.php
If you can create something more RESTful, Ruby on Rails does a good job at allowing you to throw together a quick and dirty web service without too many headaches, but even in PHP you can create RESTful APIs pretty easily.
You can read the HTTP request body via e.g. fgets(STDIN) if your requests will accept XML as a POST/PUT format.
But yes, your question is too broad to provide anything more than nudges towards the tools you might choose to use.

How to test a wsdl webservice?

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.

Categories