-
Oct 5th, 2013, 04:31 PM
#1
Thread Starter
Hyperactive Member
Integrate with WebSphere Web Service in .Net
Hi,
I’m using .Net, C#...the usual.
Got a client web service to implement (WebSphere, not exposing wsdl, soap…was a total pain to get it working since I know near to nothing of any of these)
I eventually got to use the service by instead of adding a service reference, adding a web service reference.
Because the service does not expose its wsdl, but the client supplied me the wsdl file, I specified the file path as service location, and then edited the app config.
All working fine, until the client had to add security today and I now have to specify a username and password to call their service and I’m clueless.
A few extract from the client’s IT guy’s mails for what it might help (mostly greek to me):
- “We are going to secure the services using the industry standard WS-Security User Name Token”
- “Use the following credentials for the WS-Security UNT”
All I really can do here is supply my “demo code” which worked before the security have been added on their side:
App.Config:
Code:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="ABCD.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</sectionGroup>
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
<applicationSettings>
<ABCD_Login.Properties.Settings>
<setting name="ABCD_Login_AccessControlService_AccessControlService"
serializeAs="String">
<value>https://aaa.bbb.com/something/SecurityFacadeService/AccessControlService</value>
</setting>
<ABCD_Login.Properties.Settings>
</applicationSettings>
</configuration>
Program.cs
Code:
var client = new AccessControlService();
bool validUser = client.validate(username, password);
But now I have no clue where and how to set the username / password for calling the service (not the username / password for the validate method)
Anyone? Big Please!
-
Oct 7th, 2013, 06:39 AM
#2
Re: Integrate with WebSphere Web Service in .Net
Shouldn't they alter their web service to take credentials ? In a server/client environment, its not the client's responsibility to provide security, its the server's.
-
Oct 9th, 2013, 12:11 PM
#3
Re: Integrate with WebSphere Web Service in .Net
This is pretty standard in a lot of ecosystems.
What happens is that you receive a token string based on your credentials.
Then you send this token string with every webservice call you make. Your client.validate(username, password); method will return a token. This token will be used for the other calls.
Ask the client to supply you with a new wsdl, one that accepts tokens and you should be set.
Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz'
save a blobFileStreamDataTable To Text Filemy blog
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|