Welcome! Log In Create A New Profile

Advanced

Empty tag xml / web service / windev soap

Posted by Juliano Sippel.pcs.crosspost 
Juliano Sippel.pcs.crosspost
Empty tag xml / web service / windev soap
July 29, 2008 03:41PM
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
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: