Skip to main content

(wsimport) Problem with authFile URL formatting....

2 replies [Last post]
predatorvi
Offline
Joined: 2006-06-26
Points: 0

I am trying to generate the Java client for a service written in .NET that uses NTLM to authenticate.

It seems when wsimport runs on Windows, it knows how to use NTML and works fine (using Maven w/ org.jvnet.jax-ws-commons:jaxws-maven-plugin:2.1).

On Linux I am using an NTLM proxy (http://cntlm.sourceforge.net/) which seems to work okay. I started by hard coding the user/domain/password in the CNTLM config file, but now I am trying to pass it the specific credentials I want to use.

In the wsimport settings, I entered the address/port of the CNTLM proxy and in the authFile I include the URLs in the format:

http://user:password@server1.myserver.com/MyService/Service.svc?wsdl
http://user:password@server2.myserver.com/MyService/Service.svc?xsd=xsd0
http://user:password@server2.myserver.com/MyService/Service.svc?xsd=xsd1
http://user:password@server2.myserver.com/MyService/Service.svc?xsd=xsd2
http://user:password@server2.myserver.com/MyService/Service.svc?xsd=xsd4

QUESTION 1:
Is there a way to specify a wild card to allow the same user:password for all urls with the same host name instead of having to specify each URL specifically? I don't want to have to worry about changes in the endpoints of either the WSDL or XSD when the auth mechanism is the same on the server.

QUESTION 2:
I want to use our "service account" credentials instead of my personal ones. However the service account password was auto generated by our OPS team, very cryptic and has special characters in it. I tried URL encoding it but wsimport couldn't parse it correctly.

Can I encode the password so wsimport reads it correctly?

Thanks!

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
jungicz
Offline
Joined: 2004-08-17
Points: 0

Hi,

re Question 1: no, there isn't. I filed http://java.net/jira/browse/JAX_WS-1100 to allow it

re Question 2: can you file a bug for this at http://java.net/jira/browse/JAX_WS + include some example of character which does not work, please.

Thanks,
--lukas

jungicz
Offline
Joined: 2004-08-17
Points: 0

just for the record:

as of JAX-WS RI 2.2.8+ support for auth files has been improved a bit so you can use:

  • glob matching in url - use http://user:password@server1.myserver.com/MyService/Service.svc* to match all at once
  • comments - line starting with '#' is treated as comment and it is not processed
  • strong passwords in URL - they're now being handled correctly

--lukas