J
Jack Wright
Dear All,
I am using SoapClient 1.0 to call a WebMethod that takes a name and
returns a string...but if i call this webmethof with umlaut characters
what gets returned in place of umlaut characters is ??...am I doing
something wrong here is there a solution to this?
Here is the code...
Dim ws As New MSSOAPLib.SoapClient
txtURL.Text = "http://localhost/MyTest/WSSimple/Service1.asmx?wsdl"
ws.mssoapinit txtURL
txtName.Text = ws.HelloWorld2(txtError.Text)
I even tried using XMLHTTP but got the same result...
here is the code...
Set xmldom = CreateObject("Microsoft.XMLDOM")
Set pi = xmldom.createProcessingInstruction("xml", "
version=""1.0"" encoding=""utf-8""")
xmldom.insertBefore pi, xmldom.childNodes.Item(0)
Set objXMLroot = xmldom.createNode(1, "SOAP:Envelope",
"http://schemas.xmlsoap.org/soap/envelope/")
xmldom.appendChild (objXMLroot)
objXMLroot.setAttribute "xmlns:soap",
"http://schemas.xmlsoap.org/soap/encoding/"
objXMLroot.setAttribute "xmlns:xsi",
"http://www.w3.org/2001/XMLSchema-instance"
objXMLroot.setAttribute "xmlns:xsd",
"http://www.w3.org/2001/XMLSchema"
Set objxmlbody = xmldom.createElement("SOAP:Body")
xmldom.documentElement.appendChild (objxmlbody)
Set objxmlmethod1 = xmldom.createNode(1, "HelloWorld2",
"http://tempuri.org/")
objxmlbody.appendChild (objxmlmethod1)
Set objxmlparam1 = xmldom.createNode(1, "myName",
"http://tempuri.org/")
objxmlparam1.Text = Trim(txtError.Text)
objxmlmethod1.appendChild (objxmlparam1)
Set XMLHTTP = CreateObject("Microsoft.XMLHTTP")
XMLHTTP.Open "POST",
"http://localhost/Mytest/WSSimple/Service1.asmx", False
XMLHTTP.setRequestHeader "SOAPAction",
"http://tempuri.org/HelloWorld2"
XMLHTTP.setRequestHeader "Content-Type", "text/xml; charset=utf-8"
XMLHTTP.send (xmldom)
MsgBox XMLHTTP.responseText, vbOKOnly, "Soap Response Payload from
Server"
Please help...
TALIA
Many Regards
Sunil
I am using SoapClient 1.0 to call a WebMethod that takes a name and
returns a string...but if i call this webmethof with umlaut characters
what gets returned in place of umlaut characters is ??...am I doing
something wrong here is there a solution to this?
Here is the code...
Dim ws As New MSSOAPLib.SoapClient
txtURL.Text = "http://localhost/MyTest/WSSimple/Service1.asmx?wsdl"
ws.mssoapinit txtURL
txtName.Text = ws.HelloWorld2(txtError.Text)
I even tried using XMLHTTP but got the same result...
here is the code...
Set xmldom = CreateObject("Microsoft.XMLDOM")
Set pi = xmldom.createProcessingInstruction("xml", "
version=""1.0"" encoding=""utf-8""")
xmldom.insertBefore pi, xmldom.childNodes.Item(0)
Set objXMLroot = xmldom.createNode(1, "SOAP:Envelope",
"http://schemas.xmlsoap.org/soap/envelope/")
xmldom.appendChild (objXMLroot)
objXMLroot.setAttribute "xmlns:soap",
"http://schemas.xmlsoap.org/soap/encoding/"
objXMLroot.setAttribute "xmlns:xsi",
"http://www.w3.org/2001/XMLSchema-instance"
objXMLroot.setAttribute "xmlns:xsd",
"http://www.w3.org/2001/XMLSchema"
Set objxmlbody = xmldom.createElement("SOAP:Body")
xmldom.documentElement.appendChild (objxmlbody)
Set objxmlmethod1 = xmldom.createNode(1, "HelloWorld2",
"http://tempuri.org/")
objxmlbody.appendChild (objxmlmethod1)
Set objxmlparam1 = xmldom.createNode(1, "myName",
"http://tempuri.org/")
objxmlparam1.Text = Trim(txtError.Text)
objxmlmethod1.appendChild (objxmlparam1)
Set XMLHTTP = CreateObject("Microsoft.XMLHTTP")
XMLHTTP.Open "POST",
"http://localhost/Mytest/WSSimple/Service1.asmx", False
XMLHTTP.setRequestHeader "SOAPAction",
"http://tempuri.org/HelloWorld2"
XMLHTTP.setRequestHeader "Content-Type", "text/xml; charset=utf-8"
XMLHTTP.send (xmldom)
MsgBox XMLHTTP.responseText, vbOKOnly, "Soap Response Payload from
Server"
Please help...
TALIA
Many Regards
Sunil