Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calling a webservice with SOAP input message
Message
From
23/12/2006 10:13:07
Ali Ihsan Turkoolu
Galaksi Bilgisayar A.Þ.
Ankara, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Web Services
Miscellaneous
Thread ID:
01179756
Message ID:
01179930
Views:
14
Thank you Mr.Rick. I read your paper, I will read again. But, I have a confusion. Using StrikeIron Web Services Analyzer, I get SOAP input message string as XML. I can easly replace this string with new data values. If there is a easy way to send this message to Webservice, My pain will be decreased.
Thank you again.
The SOAP input message of this methot 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>
 <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>
</provizyonGiris>

</impl:hastaKabul>

</soap:Body>

</soap:Envelope>
>No not really. The SOAP Toolkit requires XML DOM objects in order to represent complex types. It's a bit more involved than creating the proper XML string.
>
>You can find out more about how this works here:
>
>http://www.west-wind.com/presentations/foxpronetwebservices/foxpronetwebservices.asp
>
>+++ Rick ---
>
>>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
>>>>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform