Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calling a webservice with SOAP input message
Message
From
22/12/2006 09:54:24
Ali Ihsan Turkoolu
Galaksi Bilgisayar A.Þ.
Ankara, Turkey
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Web Services
Title:
Calling a webservice with SOAP input message
Miscellaneous
Thread ID:
01179756
Message ID:
01179756
Views:
80
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
Next
Reply
Map
View

Click here to load this message in the networking platform