Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calling a webservice with SOAP input message
Message
 
To
22/12/2006 12:55:08
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Web Services
Miscellaneous
Thread ID:
01179756
Message ID:
01179893
Views:
8
You can't just send XML strings using the SOAP Toolkit. You need to properly store the XML as an XML NodeList.

It's a royal pain in the a s s <s>...

My recommendation: build a .NET component and using the Web Service proxy in it to pass the data back and forth.

+++ Rick ---

>Ali,
>XML sounds to be wrong. If you correct it then it'd be something like:
>
>oWS = Createobject("MSSOAP.SoapClient30")
>oWS.MSSoapInit("http://43000210000:43000210000@test.sgk.gov.tr/saglikws/services/ProvizyonIslemleri/wsdl/ProvizyonIslemleri.wsdl")
>ows.ConnectorProperty("AuthUser")="43000210000"
>ows.ConnectorProperty("AuthPassword")="43000210000"
>
>TEXT TO m.lcXML noshow
><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>u>2</sigortaliTuru>
><takipNo></takipNo>
><takipTuru>1</takipTuru>
><yakinlikKodu></yakinlikKodu>
></provizyonGiris>
>ENDTEXT
>leResult = oWS.hastaKabul(m.lcXml)
>
Cetin
>
>>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
>>
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Previous
Reply
Map
View

Click here to load this message in the networking platform