Error 5011 when trying to connect to Project Server from Java

  • Thread starter Abbasi Dhilawala
  • Start date
A

Abbasi Dhilawala

hi all
I am getting an error 5011 when i am trying to connect to Ms
Project server programatically using the PDS. i am using a java code
that looks like below

import java.io.*;
import java.net.*;
public class Testing1
{
DataInputStream in;
PrintWriter out;
URL u;
HttpURLConnection con;
public Testing1(String url)
{
String str="",temp;
try{
u=new URL("http://emachine/projectserver/lgnpsau.asp?un=Administrator&pwd=tietronix");
con=(HttpURLConnection)u.openConnection();
in=new DataInputStream(new
BufferedInputStream(con.getInputStream()));
while(!(((temp=in.readLine()).trim())).equals("null"))
{
str+=temp;
}
}
catch(Exception e){}
System.out.println("XML:"+str);

}


public static void main(String[] args)
{
new Testing1(args[0]);
}
}


Will be a great help
Thanks
Abbas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top