This is the response
"<?xml version='1.0' encoding='UTF-8'?>
<error xmlns=\"http://docs.oasis-open.org/odata/ns/metadata\">
<code>null</code>
<message>Resource - ID not found</message>
</error>"
And I need to parse the string that is coming in tag.
You're looking for an XML parser. The XML package's xmlParse function does a fair job:
XML::xmlToList(XML::xmlParse("<?xml version='1.0' encoding='UTF-8'?>
<error xmlns=\"http://docs.oasis-open.org/odata/ns/metadata\">
<code>null</code>
<message>Resource - ID not found</message>
</error>"))$message
#> [1] "Resource - ID not found"
Related
I want to remove the backslashes from the soap service response.
Is there any way to remove the single backslashes?
string;
<?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:xsd=\"http://www.w3.org/2001/XMLSchema\">
I am trying to send a POST request using RobotFramework where the body of the request is XML.
Here is a Sample Robot file:
*** Settings ***
Library REST
*** Variables ***
${SERVER_URL} https://www.w3schools.com/xml/tempconvert.asmx
*** Test Cases ***
CL 1
[Tags] TC-CL
# Send SOAP via POST <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">" <soap:Body>" <FahrenheitToCelsius xmlns="https://www.w3schools.com/xml/">" <Fahrenheit>100</Fahrenheit>" </FahrenheitToCelsius>" </soap:Body>"</soap:Envelope>
# Send SOAP via POST <?xml version=\"1.0\" encoding=\"utf-8\"?><soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\"> <soap:Body> <FahrenheitToCelsius xmlns=\"https://www.w3schools.com/xml/\">\" <Fahrenheit>100</Fahrenheit> </FahrenheitToCelsius> </soap:Body></soap:Envelope>
# Send SOAP via POST <?xml version=\"1.0\" encoding=\"utf-8\"?>\n<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">\n <soap:Body>\n <FahrenheitToCelsius xmlns=\"https://www.w3schools.com/xml/\">\n <Fahrenheit>100</Fahrenheit>\n </FahrenheitToCelsius>\n </soap:Body>\n</soap:Envelope>
Send SOAP via POST <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><FahrenheitToCelsius xmlns="https://www.w3schools.com/xml/"><Fahrenheit>100</Fahrenheit></FahrenheitToCelsius></soap:Body></soap:Envelope>
*** Keywords ***
Send SOAP via POST
[Arguments] ${body}
SET HEADERS {"SOAPAction": "https://www.w3schools.com/xml/FahrenheitToCelsius","Content-Type": "text/xml","Cache-Control": "no-cache"}
${resp}= POST ${SERVER_URL} data=${body}
Log ${resp} repr=true
When you run this code I get the error:
This is not a JSON string:
"data=<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/
soap/envelope/"><soap:Body><FahrenheitToCelsius xmlns="https://www.w3schools.com/xml/"><Fahrenheit>100</Fahrenheit></FahrenheitToCelsius></soap:Body></soap:Envelope>"
FYI: The commented out versions of "Send SOAP via POST" are different ways I tried to get around the issue.
Here is sample python code using requests to ensure my endpoint works (once I get around that pesky "This is not a JSON string issue":
import requests
url = "https://www.w3schools.com/xml/tempconvert.asmx"
payload = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">\r\n <soap:Body>\r\n <FahrenheitToCelsius xmlns=\"https://www.w3schools.com/xml/\">\r\n <Fahrenheit>100</Fahrenheit>\r\n </FahrenheitToCelsius>\r\n </soap:Body>\r\n</soap:Envelope>"
payload = "<?xml version=\"1.0\" encoding=\"utf-8\"?><soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\"> <soap:Body> <FahrenheitToCelsius xmlns=\"https://www.w3schools.com/xml/\">\" <Fahrenheit>100</Fahrenheit> </FahrenheitToCelsius> </soap:Body></soap:Envelope>"
payload = '<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><FahrenheitToCelsius xmlns="https://www.w3schools.com/xml/"><Fahrenheit>100</Fahrenheit></FahrenheitToCelsius></soap:Body></soap:Envelope>'
headers = {
'SOAPAction': "\"https://www.w3schools.com/xml/FahrenheitToCelsius\"",
'Content-Type': "text/xml",
'Cache-Control': "no-cache",
}
response = requests.request("POST", url, data=payload, headers=headers)
print(response.text)
The problem seems to be in the RESTInstance code here
The initial issue which is what throws the error (see Commented line below):
#keyword
def post(self, endpoint, body=None, timeout=None, allow_redirects=None,
validate=True, headers=None):
"""Make a ``POST`` request call to a specified ``endpoint``.
Example:
POST "Mr Potato" to endpoint and ensure status code is 201
| `POST` | /users | { "id": 11, "name": "Mr Potato" } |
| `Integer` | response status | 201 |
"""
endpoint = self._input_string(endpoint)
request = deepcopy(self.request)
request['method'] = "POST"
request['body'] = self.input(body) # <== ERROR THROWS HERE
if allow_redirects is not None:
request['allowRedirects'] = self._input_boolean(allow_redirects)
if timeout is not None:
request['timeout'] = self._input_timeout(timeout)
validate = self._input_boolean(validate)
if headers:
request['headers'].update(self._input_object(headers))
return self._request(endpoint, request, validate)['response']
The root issue is that the _request code forces body to be used in the json parameter of the requests.requests call (aka client based on import) see code snippet from same file below:
def _request(self, endpoint, request, validate=True):
if endpoint.endswith('/'):
endpoint = endpoint[:-1]
if not endpoint.startswith(('http://', 'https://')):
base_url = self.request['scheme'] + "://" + self.request['netloc']
if not endpoint.startswith('/'):
endpoint = "/" + endpoint
endpoint = urljoin(base_url, self.request['path']) + endpoint
request['url'] = endpoint
url_parts = urlparse(request['url'])
request['scheme'] = url_parts.scheme
request['netloc'] = url_parts.netloc
request['path'] = url_parts.path
try:
response = client(request['method'], request['url'],
params=request['query'],
json=request['body'], #<== ROOT CAUSE HERE
headers=request['headers'],
proxies=request['proxies'],
cert=request['cert'],
timeout=tuple(request['timeout']),
allow_redirects=request['allowRedirects'],
verify=request['sslVerify'])
When sending XML using the requests library you need to use body= not json=
I am trying to consume a Java web service that is on our intranet. I added a Service Reference to my client project and I am able to successfully make calls and by using Fiddler I am able to see the successfull SOAP response from the service but the method generated by WCF is returning Nothing. After many days of researching, the most common fault I found is a mismatch on the namespace of the response. So I modified the WSDL and recreated the reference but the method still returns Nothing. I don't know what else to look for.
Here is the auto-generated response class from the WSDL file.
<System.Diagnostics.DebuggerStepThroughAttribute(), _
System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0"), _
System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced), _
System.ServiceModel.MessageContractAttribute(WrapperName:="terminateCredentialRecordBySSNResponse", WrapperNamespace:="service.credential.epecs", IsWrapped:=true)> _
Partial Public Class terminateCredentialRecordBySSNResponse
<System.ServiceModel.MessageBodyMemberAttribute([Namespace]:="service.credential.epecs", Order:=0, Name:="return"), _
System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable:=True)> _
Public [return] As EpecsCredServ.[return]
Public Sub New()
MyBase.New
End Sub
Public Sub New(ByVal [return] As EpecsCredServ.[return])
MyBase.New
Me.[return] = [return]
End Sub
End Class
Here is the client code:
Dim ws As New EpecsCredentialServicePortTypeClient("EpecsCredentialServiceHttpSoap11Endpoint")
Dim wsparams As New params
With wsparams
.ssn = TextBox1.Text
.fascnPOA = "5"
.lModSSAPIN = "9e1365"
.credRevokeTrans = "css113655"
.credRevokeReason = "396"
.termActDate = Now.ToShortDateString
.credRevokeReasonOther = "css"
End With
Dim results As [return] = ws.terminateCredentialRecordBySSN(wsparams) '<== returns Nothing
If results IsNot Nothing Then
txtResponse.Text = results.status
End If
Endpoint configuration on my Web.config file:
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="EpecsCredentialServiceSoap11Binding" />
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://xxx.xxx.xxx:80/axis2_epecs/services/EpecsCredentialService.EpecsCredentialServiceHttpSoap11Endpoint/"
binding="basicHttpBinding" bindingConfiguration="EpecsCredentialServiceSoap11Binding"
contract="EpecsCredServ.EpecsCredentialServicePortType" name="EpecsCredentialServiceHttpSoap11Endpoint">
<headers>
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:UsernameToken wsu:Id="UsernameToken-4" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsse:Username>MYUSERNAME</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">MYPASSWORD</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</headers>
</endpoint>
</client>
</system.serviceModel>
The SOAP request sent as seen through Fiddler:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<ActivityId CorrelationId="c057bd17-4f9d-4f98-848e-e1ba8522727a" xmlns="http://schemas.microsoft.com/2004/09/ServiceModel/Diagnostics">ffc51799-9c34-43c2-bbac-9c49067f5f40</ActivityId>
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:UsernameToken wsu:Id="UsernameToken-4" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsse:Username>MYUSERNAME</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">MYPASSWORD</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</s:Header>
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<terminateCredentialRecordBySSN xmlns="service.credential.epecs">
<params xmlns="">
<ssn>999999999</ssn>
<fascnPOA>5</fascnPOA>
<lModSSAPIN>9e1365</lModSSAPIN>
<credRevokeTrans>css113655</credRevokeTrans>
<credRevokeReason>396</credRevokeReason>
<termActDate>6/6/2014</termActDate>
<credRevokeReasonOther>css</credRevokeReasonOther>
</param
</terminateCredentialRecordBySSN>
</s:Body>
</s:Envelope>
And the SOAP response:
<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<return xmlns="service.credential.epecs">
<status>-3</status>
<Credentials>
<credential>
<cred_uid>555558</cred_uid>
<cred_ssn>999999999</cred_ssn>
<cred_fascn_sc>0001</cred_fascn_sc>
<cred_fascn_cn>703608</cred_fascn_cn>
<cred_fascn_pi>1000702718</cred_fascn_pi>
<cred_dob>1975-03-12 00:00:00.0</cred_dob>
<cred_first_name>Demog</cred_first_name>
<cred_middle_name>C</cred_middle_name>
<cred_last_name>Rgstr</cred_last_name>
<cred_fascn_ici>1</cred_fascn_ici>
<cred_fascn_cs>1</cred_fascn_cs>
<cred_fascn_oc>1</cred_fascn_oc>
<cred_fascn_oi>2800</cred_fascn_oi>
<cred_fascn_poa>5</cred_fascn_poa>
<cred_fascn_b64>0gQQ2CEMLcDloRWhaFoBCHgUcgKCBBDX5w==</cred_fascn_b64>
<cred_fascn_ac>2800</cred_fascn_ac>
<cred_cert_profile>OBERTHUR_PIV_NOLOGICAL</cred_cert_profile>
<cred_status>44</cred_status>
<cred_sponsor_name>Max</cred_sponsor_name>
<cred_approval_transaction>EPECS9000007</cred_approval_transaction>
<cred_revoke_transaction>CSS20140425121200</cred_revoke_transaction>
<cred_term_code>396</cred_term_code>
<cred_reason_code>1</cred_reason_code>
<cred_pacs_badge_num>28000000000</cred_pacs_badge_num>
<cred_unqualified_cert_dn>cn=DemoRgstr (affiliate),ou=XXXXXXXX,ou=XXX,o=XXXXXX,c=US</cred_unqualified_cert_dn>
<cred_qualified_cert_dn>cn=Demo-Rgstr (affiliate) + dnQualifier=XXX,ou=XXXXXX,ou=XXX,o=XXXXXXXX,c=US</cred_qualified_cert_dn>
<cred_doors_code>AXX</cred_doors_code>
<cred_term_date>2014-04-25 00:00:00.0</cred_term_date>
<cred_mod_date>2014-04-25 15:14:12.0</cred_mod_date>
<cred_exp_date>2013-05-22 14:31:06.505941</cred_exp_date>
<cred_last_update_pin>9e1365</cred_last_update_pin>
<cred_last_update_date>2014-04-25 15:14:12.405946</cred_last_update_date>
<cred_term_code_other>CSS</cred_term_code_other>
</credential>
<credential />
</Credentials>
</return>
</soapenv:Body>
</soapenv:Envelope>
Thanks!
So, after trying for more than two weeks I decided to call the service using the HttpWebRequest class to build the request myself (example). After trying, it gave me a "401 - Unauthorized" error even though I was sending the Username/Password in the header. Turns out I needed to specify the credentials Network credentials like so:
proxy.Credentials = New System.Net.NetworkCredential(UserID, UserPassword)
Now I am getting the response back and ready to read.
Have the following code in my Default.aspx file, located at http://localhost/idss/Default.aspx:
<%# Page Language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head id="Head1" runat="server">
<title>Testing IDSS Return Values</title>
</head>
<body>
<%#
// how we do it
XmlDocument doc = new XmlDocument();
doc.Load(Server.MapPath("idss/requests/categoryList.xml"));
// create the request to your URL
HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://localhost/idss/Default.aspx");
// add the headers
// the SOAPACtion determines what action the web service should use
// YOU MUST KNOW THIS and SET IT HERE
request.Headers.Add("SOAPAction", "http://ws.idssasp.com/Members.asmx/GetCategoryList");
// set the request type
// we use utf-8 but set the content type here
request.ContentType = "text/xml;charset=\"utf-8\"";
request.Accept = "text/xml";
request.Method = "POST";
// add our body to the request
Stream stream = request.GetRequestStream();
doc.Save( stream );
stream.Close();
// get the response back
using(HttpWebResponse response = (HttpWebResponse)request.GetResponse())
{
request.Write(response);
}//end using
%>
</body>
</html>
The xml file located at: http://localhost/idss/requests/categoryList.xml looks like this:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<AuthorizeHeader xmlns="http://ws.idssasp.com/Members.asmx">
<UserName>MyUsername</UserName>
<Password>MyPassword</Password>
</AuthorizeHeader>
</soap:Header>
<soap:Body>
<GetCategoryList xmlns="http://ws.idssasp.com/Members.asmx" />
</soap:Body>
</soap:Envelope>
Where MyUsername and MyPassword is filled in with the correct username and password. The URL located here: http://ws.idssasp.com/members.asmx?op=GetCategoryList&pn=0 tells me that SOAP should send a request like this:
POST /members.asmx HTTP/1.1
Host: ws.idssasp.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://ws.idssasp.com/Members.asmx/GetCategoryList"
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<AuthorizeHeader xmlns="http://ws.idssasp.com/Members.asmx">
<UserName>string</UserName>
<Password>string</Password>
</AuthorizeHeader>
</soap:Header>
<soap:Body>
<GetCategoryList xmlns="http://ws.idssasp.com/Members.asmx" />
</soap:Body>
</soap:Envelope>
But when I browse to http://localhost/idss/Default.aspx I get an Internal Server Error (500). What exactly am I doing wrong here? Do I need to add namespaces? Or other References somewhere in the Default.aspx file? If so, which one's are needed? Also, am I pointing to the correct in (HttpWebRequest)WebRequest.Create("http://localhost/idss/Default.aspx");?
Am I doing this correctly? I just feel like something is missing here.
I've got a ASP.NET WebService that looks something like this:
[WebMethod]
public static void DoSomethingWithStrings(string stringA, string stringB)
{
// and so on
}
An third party application should call this webservice. However this application encodes strings as UTF-8 and all umlauts are replaced by '??'. I can view the call and the special characters are formatted well:
<?xml version="1.0" encoding="utf-8" ?>
<!-- ... -->
<SoapCall>
<DoSomethingWithStrings>
<stringA>Ä - Ö - Ü</stringA>
<stringB>This is a test</stringB>
</DoSomethingWithStrings>
</SoapCall>
This produces the following output, when I simply print the strings inside the webservice method:
?? - ?? - ??
This is a test
How can I configure the WebService to accept UTF-8 encoded strings?
Update
Fiddler also tells me that the content-type charset of the http request is UTF-8.
Update 2
I tried to add following code to global.asax for debugging purposes:
public void Application_BeginRequest(object sender, EventArgs e)
{
using (var reader = new System.IO.StreamReader(Request.InputStream))
{
string str = reader.ReadToEnd();
}
}
This reads the actual SOAP call. The StreamReaders encoding is set to UTF-8. The SOAP call looks correct:
<?xml version="1.0" encoding="UTF-8" ?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<DoSomethingWithStrings xmlns="http://www.tempuri.org/">
<stringA>Ä - Ö - Ü</stringA>
<stringB>This is a test!</stringB>
</DoSomethingWithStrings>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
In the web.config file the globalization settings are set correctly:
<globalization requestEncoding="UTF-8" responseEncoding="UTF-8" culture="de-DE" uiCulture="de-DE" />
So it looks like something that deserializes the SOAP message does not use UTF-8 but ASCII encoding.
Finally it turns out that something went wrong within accepting HTTP-Messages. I don't actually know what manipulates the HTTP-Request, but I found a workaround for this. Eventhough Fiddler showed me the correct content type (text/xml; charset=utf-8) in my Application_BeginRequest the Request.RequestContext.HttpContext.Request.ContentType was just text/xml, which lead to a fallback to default (ASCII) encoding within the ASMX serializer. I've added the following code to the Application_BeginRequest handler and everything works for now.
if (Request.RequestContext.HttpContext.Request.ContentType.Equals("text/xml"))
{
Request.RequestContext.HttpContext.Request.ContentType = "text/xml; charset=UTF-8";
}
Thanks for your help!
Try this:-
byte[] bytes=Encoding.UTF8.GetBytes(yourString);
NOTE:-
Strings never contain anything utf-* or anything else encoded
The SOAP call is being decoded as ASCII somewhere - each of the umlauts are 2 bytes with high bit being set, which turns into ?? when decoded as ASCII.
So, something like this is happening:
byte[] bytesSentFromClient = Encoding.UTF8.GetBytes("Ä - Ö - Ü");
string theStringIThenReceiveInMyMethod = Encoding.ASCII.GetString(bytesSentFromClient);
Console.WriteLine(theStringIThenReceiveInMyMethod);
//?? - ?? - ??
To verify this is happening for sure, you should compare stringA == "Ä - Ö - Ü" rather than printing it somewhere.
I guess you could start by doing a project-wide search for "ASCII" and then work from there if you find anything.
You could also try
<globalization requestEncoding="utf-8" responseEncoding="utf-8"/>
Under the <system.web> tag in Web.config file.
I had the same problem. Asmx web service converted my UTF-8 to ASCII or, better to say to ??????. Your post helped me a lot.
The solution I found was to change version of SOAP protocol from 1.1 to 1.2
I mean:
POST /WebService1.asmx HTTP/1.1
Host: www.tempuri.org
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://www.tempuri.org/HelloWorld"
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<HelloWorld xmlns="http://www.tempuri.org/">
<inputParam>Привет</inputParam>
</HelloWorld>
</soap:Body>
</soap:Envelope>
had the problem. But when I changed my request to SOAP 1.2:
POST /WebService1.asmx HTTP/1.1
Host: www.tempuri.org
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<HelloWorld xmlns="http://www.tempuri.org/">
<inputParam>Привет</inputParam>
</HelloWorld>
</soap12:Body>
</soap12:Envelope>
The issue was solved.