rafaelspock has asked for the wisdom of the Perl Monks concerning the following question:

hi to all, and sorry for my poor english
i am another guy with a problem with web services and perl i had a table in my postgresql with four like this

name adresss telf zipcode

In a remote machine had a web service to manage the information i'll send in a client of the web service, in perl ( please ) :) java is too much for me now.
i had a xsd file

file : webservice.xsd

<?xml version="1.0" encoding="utf-8"?> <shema targetNamespace="http://xxxxxx.com/webservice xmlns:impl= "http://xxxxxx.com/webservice" xmlns:wsdl= "http://shemas.xmlsoap.org/wsdl/" xmlns:soapenc="http://x +chemas.xmlsoap.org/soap/encoding/" xmlns="http://www.w3.org/2001/XMLShema" <complexType name="ENTRADA"> <sequence> <element name="name" nillable="true" type="string"/> <element name="address" nillable="true" type="string"/> <element name="telf" nillable="true" type="string"/> <element name="zipcode" nillable="true" type="string"/> </sequence> </complexType> <complexType name="SALIDA"> <sequence> <complexType name="EXCEPCION"> <sequence> <element name="errorname" nillable="true" type="string"/> <element name="erroraddress" nillable="true" type="string"/> <element name="erroratelf" nillable="true" type="string"/> <element name="errorzipcode" nillable="true" type="string"/> </sequece> </complexType> </schema>

too i had another file wsdl

webservice.wsdl

<?xml version="1.0" enconding="utf-8" ?> <wsdl:definitions targetNameespace= "http://xxxxxx.com/webservice" xmlns= "http://shemas.xmlsoap.org/wsdl" + xmlns:serv="http://xxxxxxx.com/webservice" xmlns:soapenc="http://sc +hemas.xmlsoap.org/soap/enconding/" xmlns:wsdl="http://shemas.xmlsoap. +org/wsdl" xmlns:wsdlsoap=" http://shemas.xmlsoap.org/wsdl/soap/" <import namespace= "http://xxxxxx.com/webservice" location="file:webservice.xsd"> <wsdl:message name="webservicepregunta"> <wsdl:part name="in0" type="serv:ENTRADA" /> </wsdl:message> <wsdl:message name="webservicerespuesta"> <wsdl:part name="out0" type="serv:SALIDA" /> </wsdl:message> <wsdl:message name="webservicefallo"> <wsdl:part name="fault0" type="serv:EXCEPCION" /> </wsdl:message> <wsdl:portType name="webservice"> <wsdl:operation name="webservice" parameterOrder="in0"> <wsdl:input message="serv:webservicepregunta" name="webservicepregunta +"/> <wsdl:output message="serv:webservicerespuesta" name="webservicerespue +sta"/> <wsdl:fault message="serv:webservicefallo" name="webservicefallo"/> </wsdl:operation> </wsdl:portType> <wsdl:binding name="webserviceSoapBinding" type="serv:webservice"> <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/so +ap/http"/> <wsdl:operation name="webservice"> <wsdlsoap:operation soapAction="webservice"/> <wsdl:input name="webservicepregunta"> <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding +/" namespace="http://xxxxxxxxx.com/webservice " use="encoded"/> </wsdl:input> <wsdl:output name="webservicerespuesta"> <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding +/" namespace="http://xxxxxxxxxx.com/webservice " use="encoded"/> </wsdl:output> <wsdl:fault name="webservicefallo"> <wsdlsoap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encodin +g/" namespace="http://xxxxxxx.com/webservice " use="encoded"/> </wsdl:fault> </wsdl:operation> </wsdl:binding> <wsdl:service name="webserviceService"> <wsdl:port binding="serv:webserviceSoapBinding" name="webservice"> <wsdlsoap:address location="http://xxxxx.com/webservice"/> </wsdl:port> </wsdl:service> </wsdl:definitions>

finally i ha a digital certificate , i suppose is a x.509 to use the webservice

a friend , a good friend tell me that the code to the web service cliente , must be this :

#!/usr/bin/perl -w use SOAP::Lite; print SOAP::Lite ->service('file:/home/user/rafael/webservice.wsdl') ->webservice('name', 'adress', 'telf', 'zipcode');

but the digital certificate where i put this in the code ? in the machine ?

i dont know how

can any body tell me where is the ligth to follow ? :) thank your for all , and for your articles, i learn much, very much

200060222 Janitored by Corion: Added formatting

Replies are listed 'Best First'.
Re: invoque a web service with wdsl and digital certificate, how can do it ?
by mda2 (Hermit) on Feb 23, 2006 at 04:16 UTC
    Rafael,

    To use certificate I think you need to use HTTPS transport, make your certificate and configure ENV vars (HTTPS_CERT_FILE and HTTPS_KEY_FILE)...

    More info at SOAP::Lite manuals at CPAN, section SSL CERTIFICATE AUTHENTICATION...

    PS: For https you need to configure Crypt::SSLeay usually with openssl into a medium complex install...

    --
    Marco Antonio
    Rio-PM

Re: invoque a web service with wdsl and digital certificate, how can do it ?
by arkturuz (Curate) on Feb 22, 2006 at 13:58 UTC
    A little advice: put code into code tags before posting a mess.

    Update: it's better now.

      thx for the code tags, is my first ask. sorry