Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Unable to connect to design manger using DM SDK

 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

0 votes



3 answers

Permanent link
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.

0 votes


Permanent link
Can you please specify more details about the versions of dm and dm.sdk you are using?

0 votes


Permanent link

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. 

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,939
× 1,700

Question asked: Jul 27 '15, 4:57 a.m.

Question was seen: 3,741 times

Last updated: Aug 15 '18, 11:30 a.m.

Confirmation Cancel Confirm