Hi Everyone!!
Windev Version: 12
Has anyone ever used windev soap server?
I am using windev soap server to host my web service.
When I'm calling my web service from a Windev client application, it won't handle quite right empty tags on the format of <tag1/> but will do fine with <tag1></tag1>
I could just use <tag1></tag1>, but the problem is that the webservice will be used by third parties using other tools rather than windev and then they might just use <tag1/>.
For example, this code works fine ("<sForename></sForename>") returning "UserNameTest & & SurnameTest"
XMLMessage is string = "<?xml version=""1.0"" encoding=""utf-8""?>" + ...
"<soap:Envelope xmlns:xsi=""[
www.w3.org]; + ...
"xmlns:xsd=""[
www.w3.org]; +...
"xmlns:soap=""[
schemas.xmlsoap.org]; + ...
"<soap:Body>" + ...
"<GetDetails xmlns=""TestWebService"">" + ...
"<sUserName>UserNameTest</sUserName>" + ...
"<sForename></sForename>" + ...
"<sSurname>SurnameTest</sSurname>" + ...
"</GetDetails>" + ...
"</soap:Body>" + ...
"</soap:Envelope>"
bRes = SOAPRunXML("[
ITProg])
But this doesn't ("<sForename/>") returning a crazy "UserNameTest & <sSurname>SurnameTest</sSurname></TestWebService>"
XMLMessage is string = "<?xml version=""1.0"" encoding=""utf-8""?>" + ...
"<soap:Envelope xmlns:xsi=""[
www.w3.org]; + ...
"xmlns:xsd=""[
www.w3.org]; +...
"xmlns:soap=""[
schemas.xmlsoap.org]; + ...
"<soap:Body>" + ...
"<TestWebService xmlns=""TestWebService"">" + ...
"<sUserName>UserNameTest</sUserName>" + ...
"<sForename/>" + ...
"<sSurname>SurnameTest</sSurname>" + ...
"</TestWebService>" + ...
"</soap:Body>" + ...
"</soap:Envelope>"
bRes = SOAPRunXML("[
ITProg])
On the server side of it my procedure looks like this
PROCEDURE TestWebService(sUserName = "",sForeName = "", sSurname = "")
sRes is string = sUserName + " & " + sForeName + " & " + sSurname
RESULT sRes
Does any one know why this is happening?
Thanks!
Juliano.
Message forwarded from pcsoft.us.windev