9

I am trying to generate the java help classes that I need for a client (a.k.a consumer) for a SSL-protected web service (on Microsoft Biztalk) that is external to our company network. We can access it only over a proxy and we cannot change anything about the Webservice itself.

This is my command provided to the wsimport tool:

wsimport -keep -httpproxy:theProxy.net:8080 -s c:\generatedWebService_wsImport\ -p the.java.package.I.want.to.call.it -Xauthfile c:\generatedWebService_wsImport\auth https://meldeservice-test.oekb.at/Meldeservice/WebService_at_oekb_biztalk_MeldeService.asmx?WSDL

and this is the content of my auth file:

https://user:pwd@meldeservice-test.oekb.at:8080/Meldeservice/WebService_at_oekb_biztalk_MeldeService.asmx?WSDL

And this is the error I get:

[ERROR] Server returned HTTP response code: 401 for URL: https: //meldeservice-test.oekb.at/Meldeservice/WebService_at_oekb_biztalk_MeldeService.asmx?WSDL, "https: //meldeservice-test.oekb.at/Meldeservice/WebService_at_oekb_biztalk_MeldeService.asmx?WSDL" needs authorization, please provide authorization file with read access at C:\Documents and Settings\s6424.metro\auth or use -Xauthfile to give the authorization file and on each line provide authorization information using this format : http[s]://user:password@host:port//

Of course the proxy and credentials are different as in this post. The password contains a special character ! (exclamation mark).

Can someone help me with a working example under similar conditions. I had already searched a lot but couldn't find anything that would have helped me.

Is there somewhere a downloadable source code of the wsimport tool? This would be as the last resort to use.

JoseK
  • 31,141
  • 14
  • 104
  • 131
Lubos
  • 91
  • 1
  • 1
  • 4

2 Answers2

1

Try to open https://user:pwd@meldeservice-test.oekb.at:8080/Meldeservice/WebService_at_oekb_biztalk_MeldeService.asmx?WSDL

with your browser and save to local folder. Later you can use a wsimport like this:

wsimport -keep -s c:\generatedWebService_wsImport\ -p the.java.package.I.want.to.call.it /home/user/Download/example?WSDL

Regards,

linkamp
  • 215
  • 2
  • 5
  • IS it necessary to save a local copy of wsdl? Is there no valid way of importing client artifacts directly via wsimport? – nanosoft Dec 14 '14 at 10:58
1

in your request, you used

https://meldeservice-test.oekb.at/Meldeservice/WebService_at_oekb_biztalk_MeldeService.asmx?WSDL

in your auth file, it is

meldeservice-test.oekb.at:8080/Meldeservice/WebService_at_oekb_biztalk_MeldeService.asmx?WSDL

try removing the port number, change it to

https://user:pwd@meldeservice-test.oekb.at/Meldeservice/WebService_at_oekb_biztalk_MeldeService.asmx?WSDL
Titi Wangsa bin Damhore
  • 7,101
  • 4
  • 31
  • 36