Re: PEAR::soap woes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi there, thanks for the help. If I set propuesta to 1.00, my client sets
its type as float, which isn't correct either.

Something seems wrong when sending a complexType... 
How would I implement soap_wsdl? I can't seem to find documentation on
this...

outgoing data is 

OUTGOING:

POST /PruebaServiciosWeb/ConsultasDB HTTP/1.0
User-Agent: PEAR-SOAP 0.8.0RC2-devel
Host: 212.163.180.14
Content-Type: text/xml; charset=UTF-8
Content-Length: 3338
SOAPAction: ""

<?xml version="1.0" encoding="UTF-8"?>

<SOAP-ENV:Envelope 
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";
 xmlns:xsd="http://www.w3.org/2001/XMLSchema";
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
 xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/";
 xmlns:ns4="http://paire/ConsultasDB.xsd";
 xmlns:ns5="ConsultasDB"
 SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";>
<SOAP-ENV:Body>

<ns5:tarificacionautos>
<datos xsi:type="ns4:paire_SwdatostarificacionUser">
<propuesta xsi:type="xsd:float">1</propuesta>
..

Johnny wrote:

> Hi,

> As far as I see, the propuesta parameter should be of type double where you
> are sending it as int( if without decimal, php will assume it as int). Send
> it like 1.00 to make that parameter int. Furthermore, from my experience it
> is better to use soap_wsdl instead of soap_client for maximum compatibility
> with other type of soap servers.
> "Phpdiscuss - Php Newsgroups And Mailing Lists" <areher@sonoratec.biz> wrote
> in message 20040526201329.54321.qmail@pb1.pair.com">news:20040526201329.54321.qmail@pb1.pair.com...
> > I'm having trouble with a particular web service (see WSDL below message).
> > I've tried both NuSoap and PEAR and get the same response.
> > My client doesn't seem to send data types as they're defined in the WSDL,
> > so the service gives me an error. Anybody know what's going on?
> >
> > Thanks
> >
> > Here's my code, request and reply:
> >
> > <?php
> >
> > include("SOAP/Client.php");
> > $soapclient = new
> >
> SOAP_client("http://212.163.180.14:7777/PruebaServiciosWeb/ConsultasDB?wsdl";
> ,false);
> >
> > $params =
> > array (
> > 'datos' => array(
> > 'propuesta' => 1,
> > 'fechaefecto' => '2004-06-10T12:00:00.000Z',
> > 'mediador' => null,
> > 'submediador' => null,
> > 'coddocumtomador' => null,
> > 'nrodocumtomador' => null,
> > 'codigopostal' => 28010,
> > 'subcodigopostal' => 0,
> > 'coddocumpropietario' => null,
> > 'nrodocumpropietario' => null,
> > 'fecnacpropietario' => '1968-06-20T12:00:00.000Z',
> > 'feccarpropietario' => '1987-01-17T12:00:00.000Z',
> > 'sexopropietario' => 'V',
> > 'coddocumconductor' => null,
> > 'nrodocumconductor' => null,
> > 'fecnacconductor' => '1968-06-20T12:00:00.000Z',
> > 'feccarconductor' => '1991-08-31T12:00:00.000Z',
> > 'sexoconductor' => 'V',
> > 'coddocumocasional' => null,
> > 'nrodocumocasional' => null,
> > 'fecnacocasional' => null,
> > 'feccarocasional' => null,
> > 'sexoocasional' => null,
> > 'parentescoocasional' => null,
> > 'matricula' => null,
> > 'aniomatricula' => 1998,
> > 'codigouso' => 1,
> > 'marca' => 46,
> > 'modelo' => 1,
> > 'version' => 18,
> > 'codvehibase7' => null,
> > 'remolque' => null,
> > 'pesoremolque' => 0,
> > 'accesorio1' => 0,
> > 'accesorio2' => 0,
> > 'accesorio3' => 0,
> > 'accesorio4' => 0,
> > 'accesorio5' => 0,
> > 'accesorio6' => 0,
> > 'accesorio7' => 0,
> > 'accesorio8' => 0,
> > 'accesorio9' => 0,
> > 'modalidad' => 0,
> > 'franquicia' => 0,
> > 'ocupantes' => 1,
> > 'retiradacarnet' => 0,
> > 'asistenciaviaje' => 'S',
> > 'nroopera' => 0,
> > 'motivobonus' => 0,
> > 'bonusrc' => 0,
> > 'bonusdp' => 0,
> > 'bonuslunas' => 0,
> > 'siniestrosciaanterior' => 0,
> > 'aniosciaanterior' => 0,
> > 'sincocincodigitos' => null,
> > 'sincociaanterior' => null,
> > 'datosadicionales' => null
> > )
> > );
> > $soapclient->__options['trace'] = 1;
> > $soapclient->__options['timeout'] = 0;
> >
> > $result = $soapclient->call('tarificacionautos',$params);
> >
> > echo '<pre>'.$soapclient->__get_wire().'</pre>';
> >
> > print_r($result);
> > ?>
> > ##########################################
> > OUTGOING:
> >
> > POST /PruebaServiciosWeb/ConsultasDB HTTP/1.0
> > User-Agent: PEAR-SOAP 0.8.0RC2-devel
> > Host: 212.163.180.14
> > Content-Type: text/xml; charset=UTF-8
> > Content-Length: 3336
> > SOAPAction: ""
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> >
> > <SOAP-ENV:Envelope
> > xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";
> >  xmlns:xsd="http://www.w3.org/2001/XMLSchema";
> >  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> >  xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/";
> >  xmlns:ns4="http://paire/ConsultasDB.xsd";
> >  xmlns:ns5="ConsultasDB"
> >  SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";>
> > <SOAP-ENV:Body>
> >
> > <ns5:tarificacionautos>
> > <datos xsi:type="ns4:paire_SwdatostarificacionUser">
> > <propuesta xsi:type="xsd:int">1</propuesta>
> > <fechaefecto xsi:type="xsd:string">2004-06-10T12:00:00.000Z</fechaefecto>
> > <mediador xsi:nil='true' />
> > <submediador xsi:nil='true' />
> > <coddocumtomador xsi:nil='true' />
> > <nrodocumtomador xsi:nil='true' />
> > <codigopostal xsi:type="xsd:int">28010</codigopostal>
> > <subcodigopostal xsi:type="xsd:int" xsi:nil='true' />
> > <coddocumpropietario xsi:nil='true' />
> > <nrodocumpropietario xsi:nil='true' />
> > <fecnacpropietario
> > xsi:type="xsd:string">1968-06-20T12:00:00.000Z</fecnacpropietario>
> > <feccarpropietario
> > xsi:type="xsd:string">1987-01-17T12:00:00.000Z</feccarpropietario>
> > <sexopropietario xsi:type="xsd:string">V</sexopropietario>
> > <coddocumconductor xsi:nil='true' />
> > <nrodocumconductor xsi:nil='true' />
> > <fecnacconductor
> > xsi:type="xsd:string">1968-06-20T12:00:00.000Z</fecnacconductor>
> > <feccarconductor
> > xsi:type="xsd:string">1991-08-31T12:00:00.000Z</feccarconductor>
> > <sexoconductor xsi:type="xsd:string">V</sexoconductor>
> > <coddocumocasional xsi:nil='true' />
> > <nrodocumocasional xsi:nil='true' />
> > <fecnacocasional xsi:nil='true' />
> > <feccarocasional xsi:nil='true' />
> > <sexoocasional xsi:nil='true' />
> > <parentescoocasional xsi:nil='true' />
> > <matricula xsi:nil='true' />
> > <aniomatricula xsi:type="xsd:int">1998</aniomatricula>
> > <codigouso xsi:type="xsd:int">1</codigouso>
> > <marca xsi:type="xsd:int">46</marca>
> > <modelo xsi:type="xsd:int">1</modelo>
> > <version xsi:type="xsd:int">18</version>
> > <codvehibase7 xsi:nil='true' />
> > <remolque xsi:nil='true' />
> > <pesoremolque xsi:type="xsd:int" xsi:nil='true' />
> > <accesorio1 xsi:type="xsd:int" xsi:nil='true' />
> > <accesorio2 xsi:type="xsd:int" xsi:nil='true' />
> > <accesorio3 xsi:type="xsd:int" xsi:nil='true' />
> > <accesorio4 xsi:type="xsd:int" xsi:nil='true' />
> > <accesorio5 xsi:type="xsd:int" xsi:nil='true' />
> > <accesorio6 xsi:type="xsd:int" xsi:nil='true' />
> > <accesorio7 xsi:type="xsd:int" xsi:nil='true' />
> > <accesorio8 xsi:type="xsd:int" xsi:nil='true' />
> > <accesorio9 xsi:type="xsd:int" xsi:nil='true' />
> > <modalidad xsi:type="xsd:int" xsi:nil='true' />
> > <franquicia xsi:type="xsd:int" xsi:nil='true' />
> > <ocupantes xsi:type="xsd:int">1</ocupantes>
> > <retiradacarnet xsi:type="xsd:int" xsi:nil='true' />
> > <asistenciaviaje xsi:type="xsd:string">S</asistenciaviaje>
> > <nroopera xsi:type="xsd:int" xsi:nil='true' />
> > <motivobonus xsi:type="xsd:int" xsi:nil='true' />
> > <bonusrc xsi:type="xsd:int" xsi:nil='true' />
> > <bonusdp xsi:type="xsd:int" xsi:nil='true' />
> > <bonuslunas xsi:type="xsd:int" xsi:nil='true' />
> > <siniestrosciaanterior xsi:type="xsd:int" xsi:nil='true' />
> > <aniosciaanterior xsi:type="xsd:int" xsi:nil='true' />
> > <sincocincodigitos xsi:nil='true' />
> > <sincociaanterior xsi:nil='true' />
> > <datosadicionales xsi:nil='true' /></datos></ns5:tarificacionautos>
> > </SOAP-ENV:Body>
> > </SOAP-ENV:Envelope>
> >
> >
> > INCOMING
> >
> > HTTP/1.1 500 Internal Server Error
> > Date: Wed, 26 May 2004 19:47:34 GMT
> > Server: Oracle-Application-Server-10g/9.0.4.0.0 Oracle-HTTP-Server
> > Content-Length: 538
> > Cache-Control: private
> > Connection: close
> > Content-Type: text/xml; charset=utf-8
> >
> > <?xml version='1.0' encoding='UTF-8'?>
> > <SOAP-ENV:Envelope
> > xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";
> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> > xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
> > <SOAP-ENV:Body>
> > <SOAP-ENV:Fault>
> > <faultcode>SOAP-ENV:Client</faultcode>
> > <faultstring>Unable to set &apos;propuesta&apos; property: argument type
> > mismatch. [java.lang.IllegalArgumentException]</faultstring>
> > <faultactor>/PruebaServiciosWeb/ConsultasDB</faultactor>
> > </SOAP-ENV:Fault>
> >
> > </SOAP-ENV:Body>
> > </SOAP-ENV:Envelope>
> > #############################################
> > <?xml version = '1.0' encoding = 'UTF-8'?>
> > <!--Generated by the Oracle JDeveloper 10g Web Services WSDL Generator-->
> > <!--Date Created: Tue May 18 07:29:40 CEST 2004-->
> > <definitions
> >    name="ConsultasDB"
> >    targetNamespace="http://paire/ConsultasDB.wsdl";
> >    xmlns="http://schemas.xmlsoap.org/wsdl/";
> >    xmlns:xsd="http://www.w3.org/2001/XMLSchema";
> >    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
> >    xmlns:tns="http://paire/ConsultasDB.wsdl";
> >    xmlns:ns1="http://paire/ConsultasDB.xsd";>
> >    <types>
> >       <schema
> >          targetNamespace="http://paire/ConsultasDB.xsd";
> >          xmlns="http://www.w3.org/2001/XMLSchema";
> >          xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/";>
> >          <complexType name="paire_Swlistavalorestab"
> > jdev:packageName="paire"
> > xmlns:jdev="http://xmlns.oracle.com/jdeveloper/webservices";>
> >             <all>
> >                <element name="array"
> > type="ns1:ArrayOfpaire_SwlistavaloresUser"/>
> >             </all>
> >          </complexType>
> >          <complexType name="paire_SwlistavaloresUser"
> > jdev:packageName="paire"
> > xmlns:jdev="http://xmlns.oracle.com/jdeveloper/webservices";>
> >             <all>
> >                <element name="descripcion" type="string"/>
> >                <element name="valor" type="string"/>
> >                <element name="valordato" type="string"/>
> >             </all>
> >          </complexType>
> >          <complexType name="ArrayOfpaire_SwlistavaloresUser"
> > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";>
> >             <complexContent>
> >                <restriction base="SOAP-ENC:Array">
> >                   <attribute ref="SOAP-ENC:arrayType"
> > wsdl:arrayType="ns1:paire_SwlistavaloresUser[]"/>
> >                </restriction>
> >             </complexContent>
> >          </complexType>
> >          <complexType name="paire_SwdatostarificacionUser"
> > jdev:packageName="paire"
> > xmlns:jdev="http://xmlns.oracle.com/jdeveloper/webservices";>
> >             <all>
> >                <element name="propuesta" type="decimal"/>
> >                <element name="fechaefecto" type="dateTime"/>
> >                <element name="mediador" type="string"/>
> >                <element name="submediador" type="string"/>
> >                <element name="coddocumtomador" type="string"/>
> >                <element name="nrodocumtomador" type="string"/>
> >                <element name="codigopostal" type="decimal"/>
> >                <element name="subcodigopostal" type="decimal"/>
> >                <element name="coddocumpropietario" type="string"/>
> >                <element name="nrodocumpropietario" type="string"/>
> >                <element name="fecnacpropietario" type="dateTime"/>
> >                <element name="feccarpropietario" type="dateTime"/>
> >                <element name="sexopropietario" type="string"/>
> >                <element name="coddocumconductor" type="string"/>
> >                <element name="nrodocumconductor" type="string"/>
> >                <element name="fecnacconductor" type="dateTime"/>
> >                <element name="feccarconductor" type="dateTime"/>
> >                <element name="sexoconductor" type="string"/>
> >                <element name="coddocumocasional" type="string"/>
> >                <element name="nrodocumocasional" type="string"/>
> >                <element name="fecnacocasional" type="dateTime"/>
> >                <element name="feccarocasional" type="dateTime"/>
> >                <element name="sexoocasional" type="string"/>
> >                <element name="parentescoocasional" type="string"/>
> >                <element name="matricula" type="string"/>
> >                <element name="aniomatricula" type="decimal"/>
> >                <element name="codigouso" type="decimal"/>
> >                <element name="marca" type="decimal"/>
> >                <element name="modelo" type="decimal"/>
> >                <element name="version" type="decimal"/>
> >                <element name="codvehibase7" type="string"/>
> >                <element name="remolque" type="string"/>
> >                <element name="pesoremolque" type="decimal"/>
> >                <element name="accesorio1" type="decimal"/>
> >                <element name="accesorio2" type="decimal"/>
> >                <element name="accesorio3" type="decimal"/>
> >                <element name="accesorio4" type="decimal"/>
> >                <element name="accesorio5" type="decimal"/>
> >                <element name="accesorio6" type="decimal"/>
> >                <element name="accesorio7" type="decimal"/>
> >                <element name="accesorio8" type="decimal"/>
> >                <element name="accesorio9" type="decimal"/>
> >                <element name="modalidad" type="decimal"/>
> >                <element name="franquicia" type="decimal"/>
> >                <element name="ocupantes" type="decimal"/>
> >                <element name="retiradacarnet" type="decimal"/>
> >                <element name="asistenciaviaje" type="string"/>
> >                <element name="nroopera" type="decimal"/>
> >                <element name="motivobonus" type="decimal"/>
> >                <element name="bonusrc" type="decimal"/>
> >                <element name="bonusdp" type="decimal"/>
> >                <element name="bonuslunas" type="decimal"/>
> >                <element name="siniestrosciaanterior" type="decimal"/>
> >                <element name="aniosciaanterior" type="decimal"/>
> >                <element name="sincocincodigitos" type="string"/>
> >                <element name="sincociaanterior" type="string"/>
> >                <element name="datosadicionales" type="string"/>
> >             </all>
> >          </complexType>
> >          <complexType name="paire_ConsultasDBImpl_tarificacionautos_Out"
> > jdev:packageName="paire"
> > xmlns:jdev="http://xmlns.oracle.com/jdeveloper/webservices";>
> >             <all>
> >                <element name="datosrealeOut"
> > type="ns1:paire_SwdatostarificacionUser"/>
> >                <element name="modalidadesOut"
> > type="ns1:paire_Swmodalidadestab"/>
> >                <element name="observacionesOut"
> > type="ns1:paire_Swlistavalorestab"/>
> >                <element name="return" type="decimal"/>
> >             </all>
> >          </complexType>
> >          <complexType name="paire_Swmodalidadestab"
> > jdev:packageName="paire"
> > xmlns:jdev="http://xmlns.oracle.com/jdeveloper/webservices";>
> >             <all>
> >                <element name="array"
> > type="ns1:ArrayOfpaire_SwmodalidadesUser"/>
> >             </all>
> >          </complexType>
> >          <complexType name="paire_SwmodalidadesUser"
> > jdev:packageName="paire"
> > xmlns:jdev="http://xmlns.oracle.com/jdeveloper/webservices";>
> >             <all>
> >                <element name="inxmodalidad" type="decimal"/>
> >                <element name="codmodalidad" type="decimal"/>
> >                <element name="codfranquicia" type="decimal"/>
> >                <element name="descmodalidad" type="string"/>
> >                <element name="precioanual" type="decimal"/>
> >                <element name="preciosemestral" type="decimal"/>
> >                <element name="preciotrimestral" type="decimal"/>
> >                <element name="precioanualpts" type="decimal"/>
> >                <element name="preciosemestralpts" type="decimal"/>
> >                <element name="preciotrimestralpts" type="decimal"/>
> >             </all>
> >          </complexType>
> >          <complexType name="ArrayOfpaire_SwmodalidadesUser"
> > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";>
> >             <complexContent>
> >                <restriction base="SOAP-ENC:Array">
> >                   <attribute ref="SOAP-ENC:arrayType"
> > wsdl:arrayType="ns1:paire_SwmodalidadesUser[]"/>
> >                </restriction>
> >             </complexContent>
> >          </complexType>
> >       </schema>
> >    </types>
> >    <message name="listamarcas0Request"/>
> >    <message name="listamarcas0Response">
> >       <part name="return" type="ns1:paire_Swlistavalorestab"/>
> >    </message>
> >    <message name="listamodelos1Request">
> >       <part name="marca" type="xsd:decimal"/>
> >    </message>
> >    <message name="listamodelos1Response">
> >       <part name="return" type="ns1:paire_Swlistavalorestab"/>
> >    </message>
> >    <message name="listaversiones2Request">
> >       <part name="marca" type="xsd:decimal"/>
> >       <part name="modelo" type="xsd:decimal"/>
> >    </message>
> >    <message name="listaversiones2Response">
> >       <part name="return" type="ns1:paire_Swlistavalorestab"/>
> >    </message>
> >    <message name="tarificacionautos3Request">
> >       <part name="datos" type="ns1:paire_SwdatostarificacionUser"/>
> >    </message>
> >    <message name="tarificacionautos3Response">
> >       <part name="return"
> > type="ns1:paire_ConsultasDBImpl_tarificacionautos_Out"/>
> >    </message>
> >    <portType name="ConsultasDBPortType">
> >       <operation name="listamarcas">
> >          <input name="listamarcas0Request"
> > message="tns:listamarcas0Request"/>
> >          <output name="listamarcas0Response"
> > message="tns:listamarcas0Response"/>
> >       </operation>
> >       <operation name="listamodelos">
> >          <input name="listamodelos1Request"
> > message="tns:listamodelos1Request"/>
> >          <output name="listamodelos1Response"
> > message="tns:listamodelos1Response"/>
> >       </operation>
> >       <operation name="listaversiones">
> >          <input name="listaversiones2Request"
> > message="tns:listaversiones2Request"/>
> >          <output name="listaversiones2Response"
> > message="tns:listaversiones2Response"/>
> >       </operation>
> >       <operation name="tarificacionautos">
> >          <input name="tarificacionautos3Request"
> > message="tns:tarificacionautos3Request"/>
> >          <output name="tarificacionautos3Response"
> > message="tns:tarificacionautos3Response"/>
> >       </operation>
> >    </portType>
> >    <binding name="ConsultasDBBinding" type="tns:ConsultasDBPortType">
> >       <soap:binding style="rpc"
> > transport="http://schemas.xmlsoap.org/soap/http"/>
> >       <operation name="listamarcas">
> >          <soap:operation soapAction="" style="rpc"/>
> >          <input name="listamarcas0Request">
> >             <soap:body use="encoded" namespace="ConsultasDB"
> > encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
> >          </input>
> >          <output name="listamarcas0Response">
> >             <soap:body use="encoded" namespace="ConsultasDB"
> > encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
> >          </output>
> >       </operation>
> >       <operation name="listamodelos">
> >          <soap:operation soapAction="" style="rpc"/>
> >          <input name="listamodelos1Request">
> >             <soap:body use="encoded" namespace="ConsultasDB"
> > encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
> >          </input>
> >          <output name="listamodelos1Response">
> >             <soap:body use="encoded" namespace="ConsultasDB"
> > encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
> >          </output>
> >       </operation>
> >       <operation name="listaversiones">
> >          <soap:operation soapAction="" style="rpc"/>
> >          <input name="listaversiones2Request">
> >             <soap:body use="encoded" namespace="ConsultasDB"
> > encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
> >          </input>
> >          <output name="listaversiones2Response">
> >             <soap:body use="encoded" namespace="ConsultasDB"
> > encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
> >          </output>
> >       </operation>
> >       <operation name="tarificacionautos">
> >          <soap:operation soapAction="" style="rpc"/>
> >          <input name="tarificacionautos3Request">
> >             <soap:body use="encoded" namespace="ConsultasDB"
> > encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
> >          </input>
> >          <output name="tarificacionautos3Response">
> >             <soap:body use="encoded" namespace="ConsultasDB"
> > encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
> >          </output>
> >       </operation>
> >    </binding>
> >    <service name="ConsultasDB">
> >       <port name="ConsultasDBPort" binding="tns:ConsultasDBBinding">
> >          <soap:address
> > location="http://212.163.180.14:7777/PruebaServiciosWeb/ConsultasDB"/>
> >       </port>
> >    </service>
> > </definitions>

-- 
PHP Soap Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Kernel Newbies]     [PHP Database]     [Yosemite]

  Powered by Linux