• Post Reply Bookmark Topic Watch Topic
  • New Topic

Consume a .NET kerberized web service  RSS feed

 
Manuel Leiria
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!