Whatever this is
This commit is contained in:
@@ -25,17 +25,20 @@ namespace PartSource.Services
|
||||
U content;
|
||||
|
||||
string x = textWriter.ToString();
|
||||
|
||||
using (HttpClient client = new HttpClient())
|
||||
System.Diagnostics.Debug.WriteLine(x);
|
||||
|
||||
using (HttpClient client = new HttpClient())
|
||||
{
|
||||
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", "QjM4ODAyMzM3QjQxNEM2QTk4M0RFMjM0Mjk4Rjk4M0UtOUIzNUUxNzNBQUYxNEE2QjhCQjI2RjZDOUY2ODk1NDU6MkMzOUVCOTYtRDBBRS00QkVBLTlCMzItMUYyNTA5MDJGQTE0");
|
||||
try
|
||||
{
|
||||
//HttpResponseMessage response = await client.PostAsync(ConfigurationManager.AppSettings["NexpartUrl"], (HttpContent)new StringContent(sb.ToString(), Encoding.UTF8, "text/xml"));
|
||||
HttpResponseMessage response = await client.PostAsync("https://acespssprod.nexpart.com:4085/partselect/2.0/services/PartSelectService.PartSelectHttpSoap11Endpoint", new StringContent(textWriter.ToString(), Encoding.UTF8, "text/xml"));
|
||||
HttpResponseMessage response = await client.PostAsync("http://acespssprod.nexpart.com:8085/partselect/2.0/services/PartSelectService.PartSelectHttpSoap11Endpoint", new StringContent(textWriter.ToString(), Encoding.UTF8, "text/xml"));
|
||||
Stream result = await response.Content.ReadAsStreamAsync();
|
||||
|
||||
string str = await response.Content.ReadAsStringAsync();
|
||||
|
||||
System.Diagnostics.Debug.WriteLine(str);
|
||||
|
||||
content = (U)((Envelope)serializer.Deserialize(result)).Body.Content;
|
||||
;
|
||||
}
|
||||
@@ -44,6 +47,7 @@ namespace PartSource.Services
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
return content;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user