I am working on a webservice using PHP SoapClient.
The webservice url is:
And here is my code:
usuario = $ user; $ this-> password = $ pass;}} // token object For user and password $ token = new token ('USUURCF', 'PA $$ w0rd'); // XML 'enterda' string $ entrate = " 5786 & lt ; / NEG & gt; & lt; / CAT & gt; "; $ result = $ pin-> ObtenerMarcas ($ token, $ Entrada); But the following error message Prints:
Fatal Error: Uncooked Sapfault Exception: [a: Deserialization Failed] When I execute the script.
The company gave me a sample code written on C #
Private Zero Obtener_Catalogo_ABASeguros () {string strEntrada, StrSalida; StrEntrada = รข ???? & lt; Cat & gt; & lt; NEG & gt; 5786 & lt; / NEG & gt; & lt; / cat & gt; A ????; + ACCatalogosClient Proxy = New ACCatalogosClient (); token token = new token (); Token.usuario = "usuarioWCF"; token password = "pa $$ w0rd"; Try {strSalida = Proxy. Obtenar Markas (Token, Strontandra); } Hold (FaultException & lt; error & gt; east) {txtCotSalida.Text = string.Format ("Ocurrio un error en el WCF: \ n" + "Origin: {0} \ n" + "Mensa: {1} \ N "+" Stack: {2} ", Formerly D.T.T. Origen, pre.drypt.mansense, x.discet stacketrace); } But I am still unable to understand how the parameters are sent to both languages.
Any help?
Your soap client does not know how to deserialize the object token. You have to convert that token object to an Associate array and instead use that array as the parameter in the operation.
$ pin-> ObtenerMarcas (get_object_vars ($ token), $ intradha); I am afraid that you have also received this error, you will not be able to work with this service yet. It seems that the token in the soap header requires that the code written by you does not show you everything, it has the implementation of the incubation within the proxy class. You need to read that there is a document, otherwise you can The imported wsdl files embedded in the provided global wsdl link must be read.
No comments:
Post a Comment