How Can we set Proxy authorization ?

Hi,

I'm building one 'Document" through SAXBuilder.but my application is working with my IDE(NetBeans).But When I'm deploying on weblogic 8.1 SP5.I'm getting follwing error before build

"weblogic.net.http.HttpUnauthorizedException: Proxy or Server Authentication Required".

my code like:public static Document parseString(String Parse) throws JDOMException, IOException {

Document doc = null;

try{

if(!Parse.startsWith("<?xml")){

dataToParse = XML_Header + dataToParse;

System.out.println("XmlParser +++++++++"+Parse);

}

SAXBuilder saxBuilder = new SAXBuilder();

saxBuilder.setIgnoringElementContentWhitespace(true);

InputSource inputSource = new InputSource(newStringReader(dataToParse));

System.out.println("XmlParser Before Document++++++++ "+ dataToParse);

doc=saxBuilder.build(inputSource);

System.out.println("XmlParser after++");

}

catch(Exception ex)

{

ex.printStackTrace();

System.out.println("XMLParser"+ex);

}

return doc;

}

So I need setting my proxy authorization before build.

Note : already i set proxy before calling this particular parser method.

Please any body tell me how can I set proxy authorization using Java. It's urgent . I have one release tomorrow morning.

Regards,

Pattanaik

[1401 byte] By [pattanaikhra] at [2007-11-27 9:07:03]
# 1
pls reply me
pattanaikhra at 2007-7-12 21:43:17 > top of Java-index,Java Essentials,Java Programming...
# 2

private void transFormProperty( String name ) throws IOException

{

Stringvalue = getProperty( name, true );

if ( value == null )

{

return;

}

setSystemProperty( "http." + name, value );

setSystemProperty( "https." + name, value );

}

private void transFormProperties() throws IOException

{

transFormProperty( "proxyHost" );

transFormProperty( "proxyPort" );

transFormProperty( "proxyUserName" );

transFormProperty( "proxyPassword" );

StringproxyUserName = getProperty( "proxyUserName", true );

StringproxyPassword = getProperty( "proxyPassword", true );

if ( proxyUserName != null && proxyPassword != null )

{

Authenticatorauth = new MyAuthenticator( proxyUserName, proxyPassword, DEBUG );

if ( DEBUG )

{

log( "Authenticator.setDefault" + auth );

}

Authenticator.setDefault( auth );

}

}

BIJ001a at 2007-7-12 21:43:17 > top of Java-index,Java Essentials,Java Programming...
# 3
sorry this one is not working for weblogic 8.1 SP5
pattanaikhra at 2007-7-12 21:43:17 > top of Java-index,Java Essentials,Java Programming...