Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I'm trying to generate a webservice client using wsimport, but the wsdl requires authentication.

I'm using a command like this: wsimport https://username:password@url?wsdl

But it doesn't work.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
814 views
Welcome To Ask or Share your Answers For Others

1 Answer

After running your command you should get a message complaining about a missing web authorization file.

What you need to do is create an authorization file (usually the default name/location for it is $HOME_DIRECTORY/.metro/auth, but check the previous error message, you'll get the hint from there). Inside this file you just write the line: "https://username:password@url?wsdl"

Once the file is created, run the wsimport command again omitting the username/password info, like this:

wsimport https://url?wsdl

Hope it helps.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share

548k questions

547k answers

4 comments

86.3k users

...