On 22 November 2010 11:35, bkrqpzef <bjornulf.frode@gmail.com> wrote: > > Hello, > > I have never use SOAP/WSDL before. I need to access to a webservice to get > some informations. > I don't understand the technical documentation i got. > > I need to use the method "Tarif" it should be like that (according to the > technical documentation) : > > <Tarif> > Â<Clef></Clef> > Â<TarifParams IdCo=""> > Â <Devis> > Â Â Â<Personne> > Â Â Â Â <Nom> </Nom> > Â Â Â Â<Prenom>Prenom</Prenom> > Â Â Â Â<Numero></Numero> > Â Â Â Â<Type>Adherent</Type> > Â Â Â Â<DateNaissance></DateNaissance> > Â Â Â</Personne> > Â Â Â<Parametres> > Â Â Â Â<DateEffet></DateEffet> > Â Â Â Â<CodePostal></CodePostal> > Â Â Â Â<Produit> </Produit> > Â Â Â Â <Garanties> > Â Â Â Â Â <Garantie> > Â Â Â Â Â Â Â Â<Libelle> </Libelle> > Â Â Â Â Â </Garantie> > Â Â Â Â</Garanties> > Â Â Â</Parametres> > Â Â</Devis> > Â</TarifParams> > </Tarif> > > > > But i'm not able to do it. :s > > I have something like : > > $client = new SoapClient('https://adresseweb.com/file.asmx?wsdl'); > $result = $client->Tarif(); > > > > Whatever i put into the "()" of "Tarif" I have a : > > Server was unable to process request. ---> Object reference not set to an > instance of an object. > > Thx for your help and sorry for my english. > -- > View this message in context: http://old.nabble.com/-PHP--Soap---Wsdl-Beginner-tp30277723p30277723.html > Sent from the Php - Soap mailing list archive at Nabble.com. > > > -- > PHP Soap Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > For me, the easiest way to use a SOAP service which provides a WSDL file is to take the WSDL file and from it, create a series of PHP classes which encapsulate all the necessary XML/SOAP logic for you. There is a small script which I use. It is available on SourceForge and is called wsdl2php [1]. The patches by RazorsEdgeUK certainly help also. If you want, I can email you directly a completely patched version. When you've got the script installed, you use it (as an example) ... wsdl2php https://adresseweb.com/file.asmx?wsdl That will create a single PHP script containing all the classes you need to work with the service. In your code, you can now use the those classes and all the XML/SOAP stuff is done for you. I have a small simple test block of code which can easily be amended to fit any service to allow you to build a test client. If you want the code, let me know. If you can supply a full WSDL url, I can create the service classes quickly enough. Regards, Richard. [1] http://sourceforge.net/projects/wsdl2php/ -- Richard Quadling Twitter : EE : Zend @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY -- PHP Soap Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php