Hi All,

I am trying generate stubs/proxy classes for a WSDL file with xfire wsgen.
The WSDL file is not publicly available and to access it I need to give user
credentials. I can access it with with web browsers since web browsers are
asking for user credentials when I am accessing the WSDL.

But when I am trying to generate proxy classes with wsgen it will give
following error.

-----------------------------------
generate-stubs:
     [java] Running WsGen...
     [java] wsdl    : http://<servername>/<service>.jws?wsdl
     [java] package : null
     [java] output  : work/build/classes/proxy
     [java] binding :
     [java] externalBindings :
     [java] baseURI :
     [java] profile :
     [java] explictAnnotation : false
     [java] overwrite : true
     [java] java.io.IOException: Server returned HTTP response code: 401 for
URL
: http://<servername>/<service>.jws?wsdl
     [java]     at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(Ht
tpURLConnection.java:1170)
     [java]     at java.net.URL.openStream(URL.java:1007)
     [java]     at
org.codehaus.xfire.util.Resolver.tryFileSystem(Resolver.java:
74)

-----------------------------------

I tried by giving user credentials in the url as well (e.g. 
http://user:password@<servername>/<service>.jws?wsdl) but still I am getting
the same error.

Appreciate your help :)

Thanks a lot!
 
-- 
View this message in context: 
http://old.nabble.com/how-to-use-wsgen-to-generate-stubs-when-service-need-user-credentials-tp28078491p28078491.html
Sent from the XFire - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to