cydewaze — 2012-10-01T18:36:01-04:00 — #1
I need to get my ColdFusion web apps to authenticate to a .NET server. The .NET people have given me a code snippet, but it's a .NET code snippet, so it doesn't help me much. I know I can use <cfinvoke> or CreateObject() to call the service, but I'm not exactly sure how.
Does anyone here have any experience with this?
cpradio — 2012-10-03T07:56:49-04:00 — #2
I've never done it with ColdFusion, but I've seen it done in C++, and in short, if you are truly calling a .NET web service you need to build the SOAP request exactly as .NET wants it to be built.
The easiest way to do this is use Fiddler and record the process of being authenticated by a .NET login page, capture the SOAP request sent to the server and make your code produce the same request.
cpradio — 2012-10-03T07:58:24-04:00 — #3
cydewaze — 2012-10-03T09:46:49-04:00 — #4
Yeah, I was looking at that page. I have a meeting with our .NET people tomorrow. I'm thinking that they'll need to create this .wsdl file for us, and I can throw a <cfinvoke> at it. They gave us some code, but I'm starting to think that it's old asp code from around 10 years ago that they keep reusing, and I'm not sure if I can do anything with it from CF.
We'll see what tomorrow's meeting brings.
cpradio — 2012-10-03T09:50:12-04:00 — #5
Usually if you know the Service URL, you can load it in your web browser (depending if the WSDL output is enabled), and then add ?wsdl to the URL and it should produce it (again, if it is enabled)
www.example.com/myservice/service.asmx?wsdl (Web Service)
www.example.com/myservice/service.svc?wsdl (WCF Service)
cydewaze — 2012-10-03T17:54:55-04:00 — #6
Yeah, what I need for them is the URL. I think I can figure out the rest from there.
cydewaze — 2012-10-04T15:33:44-04:00 — #7
Well this is interesting. I have to point users to another server where they log in, then carry them back to mine with a session ID. :goof:
cpradio — 2012-10-04T17:02:17-04:00 — #8
sigh no one builds services very well anymore... so sorry you have to go through that.
cydewaze — 2012-10-05T08:41:06-04:00 — #9
It's because all of our web apps need to use an access card (gov't) so we have to log in on the server that's set up to read the cards. I'm hoping that the session cookie from that server populates GetAuthUser(), in which case I'll be all set. Then I just have to figure out a way to tell the remote server that the session is still alive so it doesn't time out.
wwb_99 — 2012-10-05T09:42:20-04:00 — #10
It's probably not a cookie but rather a token that has little to do with a http session. You'll probably need to pass that token back in some form for each request.
cydewaze — 2012-10-05T10:00:03-04:00 — #11
Yep, I can probably do a cfinvoke to a web service they have for just this purpose. Any time a page is submitted, it triggers the cfinvoke.
system — 2012-10-18T07:46:37-04:00 — #12
i have not done this but my experience a bit says that it can b done by making a web methord and on every app request it should come to .net server and like this they can b connected.. same way as snippet.. but i don't think other then this will be easy work ..it might make this a large project