Answered by:
how to remove XML signature when invoking webservice

Question
-
User1449453972 posted
the return result when invoking webservice always returns <?xml version="1.0" encoding="UTF-8"?>
I need to remove it how it can be done?
below is my code
<WebMethod()> _
<ScriptMethod(UseHttpGet:=True)> _
Public Function FillByData(ByVal strUsername As String, ByVal strPassword As String, ByVal strPara As String, ByVal XMLData As String) As String
Dim boolCheck As New SecurityCheck
If boolCheck.CheckSecurity(strUsername, strPassword, strPara False Then
Return "wrong name "
' Exit Function
End If
Return Biz.BAL.FillByData(XMLData, strUsername, strPara, ipAd)
End Functionthis is the result of invoking
<?xml version="1.0" encoding="UTF-8"?>
<string xmlns="http://tempuri.org/">Invalid Username \ Password \ Company name </string>
I want to remove <?xml version="1.0" encoding="UTF-8"?>
is it possible to remove it?
Monday, January 6, 2014 1:15 AM
Answers
-
User1449453972 posted
I am closing this , solution not worked and I kept the XML signature
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Tuesday, February 25, 2014 1:13 AM
All replies
-
User-1509636757 posted
Based on the return type of the webmethod you can read the values directly like:
string returnValue = serviceObj.FillByData(strUsername, strPassword, strPara, XMLData) //--consider FillByData is a WebMethod that returns the string value.
Monday, January 6, 2014 3:31 AM -
User1449453972 posted
hi I have applied changes still didn t remove the root definition
can u please double check
Monday, January 6, 2014 7:42 AM -
User-1509636757 posted
I have applied changes still didn t remove the root definition
If you can post your code; will be helpful to get some hint.
Monday, January 6, 2014 7:43 AM -
User1449453972 posted
I am closing this , solution not worked and I kept the XML signature
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Tuesday, February 25, 2014 1:13 AM