Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Wed May 24, 2017 2:50 pm
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Soap call without using soapmethod(directly with httpsocket)
PostPosted: Wed Mar 20, 2013 7:48 am 
Offline

Joined: Wed Feb 08, 2012 9:33 am
Posts: 9
Somebody knows how to do that?
Where Can I find some code example?
Thanks in advance.


Top
 Profile  
 
 Post subject: Re: Soap call without using soapmethod(directly with httpsoc
PostPosted: Wed Mar 20, 2013 8:02 am 
Offline

Joined: Tue Nov 13, 2007 11:48 am
Posts: 189
Location: Belgium
I use the 2 methods for interfacing to my webservices.
This is a method using the built in Soapmethod:
dim sm As new SOAPMethod
dim sr As SOAPResult
sm.LoadWSDLFromURL(IP_WSDL)
sm.Parameter("strVerpleegeenheid")=afdeling
sm.Parameter("strDatum")=20130320
sm.timeout=WSDL_timeout
sr=sm.Invoke("GetByDateVerpleegeenheid")

if sr<>nil then
if sr.error=True Then
MsgBox "error SOAP: "+str(sr.errorCode)+EndOfLine+sr.errorMessage
Else
Return sr.Result("GetByDateVerpleegeenheidResponse")
end if
end if

For using http-code, i must have a formatted string: vXml is an xml-string which holds the question for my server...
<?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:s="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://tempuri.org/" xmlns:s26="http://www.myservice.com/Webservices/v1.0/VerblijfSearch">
<soap:Body>
<tns:Search>
<tns:objSearch>
<s26:ViewType>Verblijf.View.All</s26:ViewType>
<s26:OffSet>1</s26:OffSet>
<s26:Length>0</s26:Length>
<s26:Verpleegeenheid>B4</s26:Verpleegeenheid>
<s26:TypeBedden>O</s26:TypeBedden>
<s26:AantalRijen>0</s26:AantalRijen>
</tns:objSearch>
</tns:Search>
</soap:Body>
</soap:Envelope>

This string is used by the following method:
dim webserviceserver As new HTTPSocket
webserviceserver.SetPostContent vXML, "text/xml"
Return webserviceserver.Post(IP_WSDL,WSDL_timeout)


Top
 Profile  
 
 Post subject: Re: Soap call without using soapmethod(directly with httpsoc
PostPosted: Wed Mar 20, 2013 9:29 am 
Offline

Joined: Wed Feb 08, 2012 9:33 am
Posts: 9
Thanks a lot.
It's working fine.
Best ergards.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group