Index: branches/OKBJavaConnector/ECJClient/src/META-INF/AdministrationService.svc.xml
===================================================================
--- branches/OKBJavaConnector/ECJClient/src/META-INF/AdministrationService.svc.xml	(revision 6085)
+++ branches/OKBJavaConnector/ECJClient/src/META-INF/AdministrationService.svc.xml	(revision 6145)
@@ -5,8 +5,7 @@
         <wsp1:ExactlyOne>
             <wsp1:All>
-                <tcp:AutomaticallySelectOptimalTransport/>
                 <sc:CallbackHandlerConfiguration wspp:visibility="private">
-                    <sc:CallbackHandler default="okbtester" name="usernameHandler"/>
-                    <sc:CallbackHandler default="okbtester" name="passwordHandler"/>
+                    <sc:CallbackHandler name="usernameHandler" classname="handler.UserNameHandler"/>
+                    <sc:CallbackHandler name="passwordHandler" classname="handler.UserNameHandler"/>
                 </sc:CallbackHandlerConfiguration>
             </wsp1:All>
Index: branches/OKBJavaConnector/ECJClient/src/META-INF/AuthenticationService.svc.xml
===================================================================
--- branches/OKBJavaConnector/ECJClient/src/META-INF/AuthenticationService.svc.xml	(revision 6085)
+++ branches/OKBJavaConnector/ECJClient/src/META-INF/AuthenticationService.svc.xml	(revision 6145)
@@ -5,6 +5,6 @@
             <wsp1:All>
                 <sc:CallbackHandlerConfiguration wspp:visibility="private">
-                    <sc:CallbackHandler default="okbtester" name="usernameHandler"/>
-                    <sc:CallbackHandler default="okbtester" name="passwordHandler"/>
+                    <sc:CallbackHandler name="usernameHandler" classname="authservice.handler.UserNameHandler"/>
+                    <sc:CallbackHandler name="passwordHandler" classname="authservice.handler.UserNameHandler"/>
                 </sc:CallbackHandlerConfiguration>
             </wsp1:All>
Index: branches/OKBJavaConnector/ECJClient/src/META-INF/QueryService.svc.xml
===================================================================
--- branches/OKBJavaConnector/ECJClient/src/META-INF/QueryService.svc.xml	(revision 6085)
+++ branches/OKBJavaConnector/ECJClient/src/META-INF/QueryService.svc.xml	(revision 6145)
@@ -100,9 +100,7 @@
             <wsp1:All>
                 <sc:CallbackHandlerConfiguration wspp:visibility="private">
-                    <sc:CallbackHandler default="okbtester" name="usernameHandler"/>
-                    <sc:CallbackHandler default="okbtester" name="passwordHandler"/>
+                    <sc:CallbackHandler name="usernameHandler" classname="handler.UserNameHandler"/>
+                    <sc:CallbackHandler name="passwordHandler" classname="handler.UserNameHandler"/>
                 </sc:CallbackHandlerConfiguration>
-                <wsam:Addressing wsp1:Optional="false"/>
-                <sc1:KeyStore wspp:visibility="private"/>
             </wsp1:All>
         </wsp1:ExactlyOne>
Index: branches/OKBJavaConnector/ECJClient/src/META-INF/RunCreationService.svc.xml
===================================================================
--- branches/OKBJavaConnector/ECJClient/src/META-INF/RunCreationService.svc.xml	(revision 6085)
+++ branches/OKBJavaConnector/ECJClient/src/META-INF/RunCreationService.svc.xml	(revision 6145)
@@ -5,9 +5,7 @@
             <wsp1:All>
                 <sc:CallbackHandlerConfiguration wspp:visibility="private">
-                    <sc:CallbackHandler default="okbtester" name="usernameHandler"/>
-                    <sc:CallbackHandler default="okbtester" name="passwordHandler"/>
+                    <sc:CallbackHandler name="usernameHandler" classname="handler.UserNameHandler"/>
+                    <sc:CallbackHandler name="passwordHandler" classname="handler.UserNameHandler"/>
                 </sc:CallbackHandlerConfiguration>
-                <wsam:Addressing wsp1:Optional="false"/>
-                <sc1:KeyStore wspp:visibility="private"/>
             </wsp1:All>
         </wsp1:ExactlyOne>
Index: branches/OKBJavaConnector/ECJClient/src/handler/UserNameHandler.java
===================================================================
--- branches/OKBJavaConnector/ECJClient/src/handler/UserNameHandler.java	(revision 6145)
+++ branches/OKBJavaConnector/ECJClient/src/handler/UserNameHandler.java	(revision 6145)
@@ -0,0 +1,140 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package handler;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.PushbackInputStream;
+import java.util.Arrays;
+import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.callback.NameCallback;
+import javax.security.auth.callback.PasswordCallback;
+import javax.security.auth.callback.UnsupportedCallbackException;
+
+/**
+ *  Username/Password Callbackhandler
+ * @author MartinH
+ */
+public class UserNameHandler implements CallbackHandler {
+
+    static String user;
+    static String pwd;
+
+    static {
+        setUser("okbtester");
+        setPassword("okbtester");
+    }
+
+    public static void setUser(String userName) {
+        user = userName;
+    }
+
+    public static void setPassword(String passwd) {
+        pwd = passwd;
+    }
+
+    /**
+     * Invoke an array of Callbacks.
+     *
+     * <p>
+     *
+     * @param callbacks an array of <code>Callback</code> objects which contain
+     *			the information requested by an underlying security
+     *			service to be retrieved or displayed.
+     *
+     * @exception java.io.IOException if an input or output error occurs. <p>
+     *
+     * @exception UnsupportedCallbackException if the implementation of this
+     *			method does not support one or more of the Callbacks
+     *			specified in the <code>callbacks</code> parameter.
+     */
+    public void handle(Callback[] callbacks)
+            throws IOException, UnsupportedCallbackException {
+
+        for (int i = 0; i < callbacks.length; i++) {
+            if (callbacks[i] instanceof NameCallback) {
+
+                // prompt the user for a username
+                NameCallback nc = (NameCallback) callbacks[i];
+
+                System.err.print(nc.getPrompt());
+                System.err.flush();
+                nc.setName(user);
+                //nc.setName((new BufferedReader(new InputStreamReader(System.in))).readLine());
+
+            } else if (callbacks[i] instanceof PasswordCallback) {
+
+                // prompt the user for sensitive information
+                PasswordCallback pc = (PasswordCallback) callbacks[i];
+                System.err.print(pc.getPrompt());
+                System.err.flush();
+
+                pc.setPassword(pwd.toCharArray());
+                //pc.setPassword(readPassword(System.in));
+
+            } else {
+                throw new UnsupportedCallbackException(callbacks[i], "Unrecognized Callback");
+            }
+        }
+    }
+
+    // Reads user password from given input stream.
+    private char[] readPassword(InputStream in) throws IOException {
+
+        char[] lineBuffer;
+        char[] buf;
+        int i;
+
+        buf = lineBuffer = new char[128];
+
+        int room = buf.length;
+        int offset = 0;
+        int c;
+
+        loop:
+        while (true) {
+            switch (c = in.read()) {
+                case -1:
+                case '\n':
+                    break loop;
+
+                case '\r':
+                    int c2 = in.read();
+                    if ((c2 != '\n') && (c2 != -1)) {
+                        if (!(in instanceof PushbackInputStream)) {
+                            in = new PushbackInputStream(in);
+                        }
+                        ((PushbackInputStream) in).unread(c2);
+                    } else {
+                        break loop;
+                    }
+
+                default:
+                    if (--room < 0) {
+                        buf = new char[offset + 128];
+                        room = buf.length - offset - 1;
+                        System.arraycopy(lineBuffer, 0, buf, 0, offset);
+                        Arrays.fill(lineBuffer, ' ');
+                        lineBuffer = buf;
+                    }
+                    buf[offset++] = (char) c;
+                    break;
+            }
+        }
+
+        if (offset == 0) {
+            return null;
+        }
+
+        char[] ret = new char[offset];
+        System.arraycopy(buf, 0, ret, 0, offset);
+        Arrays.fill(buf, ' ');
+
+        return ret;
+    }
+}
