Results 1 to 2 of 2
  1. #1
    yakupemre is offline Member
    Join Date
    Aug 2007
    Posts
    2
    Rep Power
    0

    Default Changing plugins source code

    Hi,

    I have to make a BIRT report based on a "Web Services Data Source".
    My web service is basic secured but the org.eclipse.datatools.enablement.oda.ws connection does'nt support basic authentication and so it does'nt work for me.

    I learned that i need to change org.eclipse.datatools.enablement.oda.ws.RawMessage Sender class by adding:

    => a specific Authenticator :
    static class SoapAuthenticator extends Authenticator {
    private String username, password;
    public SoapAuthenticator(String user, String pass) {
    username = user;
    password = pass;
    }
    protected PasswordAuthentication getPasswordAuthentication() {
    return new PasswordAuthentication(username,
    password.toCharArray());
    }
    }

    => authentication in RawMessageSender::SOAPResponseCollector :
    public void run() {
    try {
    URL url = new URL(spec);
    if(url.getUserInfo() != null) {
    String [] loginInfo = url.getUserInfo().split(":");
    String user = (loginInfo.length > 0)? loginInfo[0] :
    WSUtil.EMPTY_STRING;
    String pwd = (loginInfo.length > 1)? loginInfo[1] :
    WSUtil.EMPTY_STRING;
    HttpURLConnection.setDefaultAllowUserInteraction(t rue);
    Authenticator.setDefault(new SoapAuthenticator(user, pwd));
    }
    connection = (HttpURLConnection) url.openConnection();
    ...


    I have the source code of org.eclipse.datatools.enablement.oda.ws and the jar file. I need to add that code and create a new jar file. When i import the source code to eclipse as an existing project i get some errors.
    How can i create the new jar file?
    Attached Files Attached Files

  2. #2
    yakupemre is offline Member
    Join Date
    Aug 2007
    Posts
    2
    Rep Power
    0

    Default

    I solved my problem. All i had to do was connecting with CVS and checking out the project then i changed the source code and export it as a plugin.

Similar Threads

  1. Copying Eclipse Plugins
    By gapper in forum Eclipse
    Replies: 1
    Last Post: 01-23-2008, 11:37 AM
  2. Making Plugins for Eclipse
    By javaplus in forum New To Java
    Replies: 0
    Last Post: 12-17-2007, 09:31 AM
  3. GUI Plugins
    By ravian in forum Eclipse
    Replies: 1
    Last Post: 11-13-2007, 12:18 PM
  4. how to convert source code to xml
    By valery in forum XML
    Replies: 2
    Last Post: 08-06-2007, 09:29 PM
  5. Need a source code
    By vissu007 in forum New To Java
    Replies: 1
    Last Post: 07-05-2007, 08:08 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •