Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calling a webservice with SOAP input message
Message
From
22/12/2006 13:03:03
Alexandre Palma
Harms Software, Inc.
Alverca, Portugal
 
 
To
22/12/2006 12:50:04
Ali Ihsan Turkoolu
Galaksi Bilgisayar A.Þ.
Ankara, Turkey
General information
Forum:
Visual FoxPro
Category:
Web Services
Miscellaneous
Thread ID:
01179756
Message ID:
01179807
Views:
18
You can if u build your own soapproxy, not if you use a build proxy that generates the soap XML message for you.
For the soap proxy you are accessing the parameters that he is expecting is an object from that type, so to call that method you will need to send that object, or else create your own soap proxy, and not use the soap toolkit 3 that's what VFP uses.


>Yes, You right. But, at the end, I think that complex object elements are also send as XML.Am I right?
>That object elements are:
>
> <devredilenKurum>3</devredilenKurum>
> <hastaKarneNo>111111216</hastaKarneNo>
> <hastaSosyalGuvNo>1111111111126</hastaSosyalGuvNo>
> <hastaTCKimlikNo>49000719000</hastaTCKimlikNo>
> <provizyonTarihi>22.12.2006</provizyonTarihi>
> <provizyonTipi>N</provizyonTipi>
> <saglikTesisKodu>10662</saglikTesisKodu>
> <sigortaliTuru>2</sigortaliTuru>
> <takipNo></takipNo>
> <takipTuru>1</takipTuru>
> <yakinlikKodu></yakinlikKodu>
>
>I don't sure, if I put this xml to a string and I send this string as a parameter to the method?
>
>>Ali tha methos is expecting to receive an object and not a string.
>>
>>>I tried so many different configuration, but I couldn't obtain return object from a webservice.
>>>
>>>WebService address is :
>>>http://43000210000:43000210000@test.sgk.gov.tr/saglikws/services/ProvizyonIs
>>>lemleri/wsdl/ProvizyonIslemleri.wsdl
>>>
>>>43000210000:43000210000 are username and password.
>>>
>>>I need to call HastaKabul method.
>>>
>>>Input parameter of this method as SOAP message is:
>>>
>>>
>>><?xml version="1.0" encoding="utf-8"?>
>>>
>>><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
>>>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>>>xmlns:enc="http://schemas.xmlsoap.org/soap/encoding" >
>>>
>>><soap:Body>
>>>
>>><impl:hastaKabul xmlns:impl="http://servisler.ws.gss.sgk.gov.tr">
>>>
>>><provizyonGiris>
>>>
>>><devredilenKurum>3</devredilenKurum><hastaKarneNo>111111216</hastaKarneNo><h
>>>astaSosyalGuvNo>1111111111126</hastaSosyalGuvNo><hastaTCKimlikNo>4900071
>>>astaSosyalGuvNo>9000
>>></hastaTCKimlikNo><provizyonTarihi>22.12.2006</provizyonTarihi><provizyonTip
>>>i>N</provizyonTipi><saglikTesisKodu>10662</saglikTesisKodu><sigortaliTur
>>>i>u>2<
>>>/sigortaliTuru><takipNo></takipNo><takipTuru>1</takipTuru><yakinlikKodu></ya
>>>kinlikKodu>
>>>
>>></provizyonGiris>
>>>
>>></impl:hastaKabul>
>>>
>>></soap:Body>
>>>
>>></soap:Envelope>
>>>
>>>
>>>I obtain this SOAP message by using StrikeIron Web Services Analyzer. With this analyzer, I can call the WS easly.
>>>
>>>How should I call this method?
>>>
>>>
>>>lcXml = ??
>>>
>>>LOCAL loProvizyonIslemleri AS "XML Web Service"
>>>LOCAL loException, lcErrorMsg, loWSHandler TRY
>>>        loWSHandler =
>>>NEWOBJECT("WSHandler",IIF(VERSION(2)=0,"",HOME()+"FFC\")+"_ws3client.vcx")
>>>        loProvizyonIslemleri =
>>>loWSHandler.SetupClient("http://43000210000:43000210000@test.sgk.gov.tr/sagl
>>>ikws/services/ProvizyonIslemleri/wsdl/ProvizyonIslemleri.wsdl",
>>>"ProvizyonIslemleriService", "ProvizyonIslemleri")
>>>
>>>        leResult = loProvizyonIslemleri.hastaKabul(lcXml)
>>>
>>>CATCH TO loException
>>>        lcErrorMsg="Error: "+TRANSFORM(loException.Errorno)+" - "+loException.Message
>>>        DO CASE
>>>        CASE VARTYPE(loProvizyonIslemleri)#"O"
>>>               * Handle SOAP error connecting to web service
>>>        CASE !EMPTY(loProvizyonIslemleri.FaultCode)
>>>               * Handle SOAP error calling method
>>>               lcErrorMsg=lcErrorMsg+CHR(13)+loProvizyonIslemleri.Detail
>>>        OTHERWISE
>>>               * Handle other error
>>>        ENDCASE
>>>        * Use for debugging purposes
>>>        MESSAGEBOX(lcErrorMsg)
>>>FINALLY
>>>ENDTRY
>>>
Alexandre Palma
Senior Application Architect
Previous
Reply
Map
View

Click here to load this message in the networking platform