wsimport throws Server redirected too many times (20)

81 Views Asked by At

when trying to generate the client for an authenticated webservice, I'm getting:

    [ERROR] Server redirected too many  times (20),  "http://ip:port/WSDocumentum.asmx?WSDL" needs authorization, please provide authorization file with read access at C:\Users\user\.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//<url-path>


Exception in thread "main" com.sun.tools.internal.ws.wscompile.AbortException
        at com.sun.tools.internal.ws.wsdl.parser.MetadataFinder$WSEntityResolver.resolveEntity(MetadataFinder.java:187)
        at com.sun.tools.internal.ws.wsdl.parser.DOMForest.parse(DOMForest.java:198)
        at com.sun.tools.internal.ws.wsdl.parser.DOMForest.parse(DOMForest.java:134)
        at com.sun.tools.internal.ws.wsdl.parser.MetadataFinder.parseWSDL(MetadataFinder.java:96)
        at com.sun.tools.internal.ws.wscompile.WsimportTool.buildWsdlModel(WsimportTool.java:424)
        at com.sun.tools.internal.ws.wscompile.WsimportTool.run(WsimportTool.java:190)
        at com.sun.tools.internal.ws.wscompile.WsimportTool.run(WsimportTool.java:168)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at com.sun.tools.internal.ws.Invoker.invoke(Invoker.java:159)
        at com.sun.tools.internal.ws.WsImport.main(WsImport.java:42)

the command I'm running is:

wsimport -keep -p com.test.client http://ip:port/WSDocumentum.asmx?WSDL -Xauthfile C:\Users\user\.metro\auth

in then file that I created at "C:\Users\user\.metro\auth" I do have the user and password, I only had to change an @ for %40, and a # for a %23, is this right? or should I encode the user password in a different way?

this is the content of said file:

http://user%40:pass%23@ip:port/WSDocumentum.asmx?wsdl

what should i do? o what am i doing wrong? please anything would help :)

0

There are 0 best solutions below