aspose file tools*
The moose likes Web Services and the fly likes Consume a .NET kerberized web service Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Consume a .NET kerberized web service" Watch "Consume a .NET kerberized web service" New topic
Author

Consume a .NET kerberized web service

Manuel Leiria
Ranch Hand

Joined: Jul 13, 2007
Posts: 171
Hi!

I'm trying to create a java client to access a .NET kerberized web service. Right now I have two pieces of code but I I don't know how to integrate them. The scenario is: I have a web application in WebLogic server and this application needs to access a .NET kerberized web service. I'm using SSO.
In one hand I developed all that stubs that make the client code to invoke the service.
On the other hand I have:



I've downloaded the wsdl and generated using Metro the client code. One doubt arises here: in the wsdl there's no security entry. Is it supposed to have?
Onother doubt: who is the client and who is the server? As far as I know, there are 3 entities: the person who's using the application; the weblogic server (the suapps208) and the web service.

I can login and get the TGT. I just don't know how to obtain the ticket for the webservice and how to use ti to access th service.

I know, this is a mess but my brain is completely kerberized. Anyway, you can ask me questions and I'll answer. I've read a lot of stuff but I'm having problems in putting all together.



Thanks in advance,
Manuel Leiria


Manuel Leiria<br /> <br />--------------<br />Peace cannot be kept by force; it can only be achieved by understanding. <br /> Albert Einstein
Manuel Leiria
Ranch Hand

Joined: Jul 13, 2007
Posts: 171
Hello,

I have new info on the subject.
The wsdl file doesn't have any security entry because the web service is not using WS-Security. The security is implemented at the web server level. Given this new info, my question is: is there some java class where I can pass the url of the wsdl file and the credentials?

The generated classes (using wsimport) gave me something like this:



and the Profiles class extends javax.xml.ws.Service

If I invoke Profiles service = new Profiles(), I get a 401 Unauthorized. My guess is that priori to create new Profiles() I must pass (some how) the credentials or ticket or something like that.

Any help is highly appreciated!!

Manuel Leiria
Pat Gonzalez
Greenhorn

Joined: Oct 18, 2009
Posts: 19
Here's an example, http://spnego.sourceforge.net/protected_soap_service.html, of how to do it from the command-line.

Perhaps you can take the code from the example and make it work for you.
Rodrigo Aguerre
Greenhorn

Joined: Aug 22, 2011
Posts: 1
Hi. Did you find the solution for your problem? I have the same problem here. I have the service ticket, I used a similar code to obtain it. And now I need to able to send the ticket so I can use the service but I don't known how. I read that you have to attach a custom handler to the HandlerRegistry of the stub object (I use axis to generate my client) and then you have to attach the ticket in a soap header. But I also read that this isn't enough, you also have to negotiate with the server the way you are going to send the ticket. I'm stuck with this.
 
 
subject: Consume a .NET kerberized web service