Hi, I'm working with Visual Studio 2010 C#. I'm trying to access a SOAP-Endpoint of our server. Unfortunatelly I always get error because of authentification.
I added service reference there as described in following msdn doc: http://msdn.microsoft.com/en-us/library/bb386382.aspx
Now I have a app.config file which contains settings for connecting SOAP-Endpoint. I feel somewhat is wrong there:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="ReadEntriesSoapBinding" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Basic" proxyCredentialType="None"
realm="AXIS" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://****************:8080/soap/services/Calendar/Processes/ReadEntries"
binding="basicHttpBinding" bindingConfiguration="ReadEntriesSoapBinding"
contract="SoapServiceReference.Calendar_Processes_ReadEntries"
name="ReadEntries" />
</client>
</system.serviceModel>
</configuration>
And here is C#-Code:
SoapServiceReference.Calendar_Processes_ReadEntriesClient client = new SoapServiceReference.Calendar_Processes_ReadEntriesClient();
SoapServiceReference.XML xml;
SoapServiceReference.DATE end = new SoapServiceReference.DATE();
end.date = DateTime..Today.AddYears(100);
String impairedPersonUID = "**************";
SoapServiceReference.DATE start = new SoapServiceReference.DATE();
start.date = DateTime.Today.AddYears(-1);
// Dunno which of them is needed?
client.ClientCredentials.Windows.ClientCredential.UserName = "*********";
client.ClientCredentials.Windows.ClientCredential.Password = "12345678";
client.ClientCredentials.UserName.UserName = "*********";
client.ClientCredentials.UserName.UserName = "12345678";
xml = client.invoke(end, impairedPersonUID, start);
In the last C#-line (client.invoke(...);) I always get error message. Now I get such one:
"Die HTTP-Anforderung ist beim Clientauthentifizierungsschema "Basic" nicht autorisiert. Vom Server wurde der Authentifizierungsheader "Basic realm="AXIS"" empfangen."
Translated to English:
"The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'Basic realm=\"AXIS\"'."
In app.config before I tried some modifications the security-part was:
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None"
realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
So... I need your help, what did I wrong? Do you need some informations, then let me know please.
cu Floh
Views
Replies
Total Likes
I'm the first to admit that I'm not a .net expert, but I've worked on a few small proofs that use c# and LiveCycle.
There are a couple of things that I noticed about your code that are different from the way I've done things in the past:
I'm not sure which version of LiveCycle you are using, but the API Quickstarts have some good examples for .Net/C# calls. Have a look at:
http://help.adobe.com/en_US/livecycle/9.0/programLC/help/index.htm?content=000005.html
Views
Replies
Total Likes
Hi Hodmi,
sorry for not replying a long time ago. I was busy. Thank you for your help.
I found out what I did wrong:
I accidentally wrote UserName twice, the second line should be Password:
Now its fine and working.
cu Floh
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies