It's all about the answers!

Ask a question

Unable to connect to design manger using DM SDK


Nilesh Patil (1733650) | asked Jul 27 '15, 4:57 a.m.
edited Jul 27 '15, 4:58 a.m.
 Hi All,
I am trying to connect to design manager server using DM Sdk. I have used following code to connect to server,
DmClient dmClient = new DmClient("XXXX", "XXX", "https://XXX/dm/");
OAuthCommunicator dc = dmClient.getHttpClient();
httpClient = (DefaultHttpClient) dc.getHttpClient();
//setupSSLSupport();
//HttpHost host = new HttpHost("XXX", XX);
//httpClient.getParams().setParameter("http.route.default-proxy", host);
ConnRouteParams.setDefaultProxy(httpClient.getParams(), host);
//Credentials credentials = new NTCredentials("XXX", "XXX", "XXX", "XXX");
//httpClient.getCredentialsProvider().setCredentials(new AuthScope("XXX", XX), credentials);
System.out.println("Connected to Dm server.");
System.out.println("DM URL : " + dmClient.getDmUrl());
System.out.println("DM URL : " + dmClient.getProjects());

But it fails with error when accessing project areas
Caused by: java.net.ConnectException: Connection timed out: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:412)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:271)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:258)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:376)
at java.net.Socket.connect(Socket.java:546)
at com.ibm.jsse2.SSLSocketImpl.connect(SSLSocketImpl.java:11)


Could you please let me know how to proceed on this?. I have proxy server in between

3 answers



permanent link
Donald Nong (14.5k414) | answered Jul 28 '15, 2:21 a.m.
You should first make yourself familiar with using a proxy in a default HTTP client, which is a broader concept than the DM connection. You can check out some examples here.
http://www.programcreek.com/java-api-examples/index.php?api=org.apache.http.conn.params.ConnRouteParams

Once you can make a connection through the proxy in a certain way, implement it in your DM SDK code.

I'm not convinced that you can add a proxy to your "dmClient" object as you did in your code. Dump the parameters of the "dmClient' object to double check.

permanent link
David Hirsch (1162) | answered Aug 30 '15, 4:06 a.m.
JAZZ DEVELOPER
Can you please specify more details about the versions of dm and dm.sdk you are using?

permanent link
Antonios Liamis (111) | answered Aug 15 '18, 11:30 a.m.

Hi all,

I have a similar issue regarding Proxy and Certificates.
I have followed the setup described here by David Hirsch which works fine while trying to connect
to my Jazz Sandbox https://jazz.net/sandbox01-dm. 

But the actual DM-Repo to which I want to connect to needs further Proxy and Certificate settings.
In order to get Rhapsody running to that DM-Repo the following lines have to be added to the DesignManager properties file:
-Dhttps.proxyHost=###
-Dhttps.proxyPort=###
-Djavax.net.ssl.keyStore="###.p12"
-Djavax.net.ssl.keyStoreType="PKCS12"
-Djavax.net.ssl.keyStorePassword="###"

How do I pass that lines to the DM SDK?
Eclipse VM-Arguments seem not to work regading this. 

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.