{"action":"created","comment":{"url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/pulls/comments/32615442","id":32615442,"diff_hunk":"@@ -0,0 +1,272 @@\n+package eu.adlogix.appnexus.oas.client.certificate;\n+\n+import java.io.File;\n+import java.io.FileInputStream;\n+import java.io.FileOutputStream;\n+import java.io.InputStream;\n+import java.io.OutputStream;\n+import java.security.KeyStore;\n+import java.security.cert.CertificateException;\n+import java.security.cert.X509Certificate;\n+import java.util.Calendar;\n+import java.util.Date;\n+import java.util.GregorianCalendar;\n+\n+import javax.naming.ldap.LdapName;\n+import javax.naming.ldap.Rdn;\n+import javax.net.ssl.SSLContext;\n+import javax.net.ssl.SSLException;\n+import javax.net.ssl.SSLSocket;\n+import javax.net.ssl.SSLSocketFactory;\n+import javax.net.ssl.TrustManager;\n+import javax.net.ssl.TrustManagerFactory;\n+import javax.net.ssl.X509TrustManager;\n+\n+import org.slf4j.Logger;\n+\n+import eu.adlogix.appnexus.oas.utils.log.LogUtils;\n+\n+public class CertificateManager {\n+\n+\tprivate static final int PORT = 443;\n+\tprivate static char[] passphrase = \"changeit\".toCharArray();\n+\tprivate static final int NO_OF_DAYS_TO_EXPIRE = 3;\n+\tprivate static final Logger logger = LogUtils.getLogger(CertificateManager.class);\n+\n+\tprivate static final String CONF_DIRECTORY = \"conf\";\n+\tprivate static final String XAXIS_KEYSTORE_FILENAME = \"xaxisCACerts\";\n+\n+\tprivate static final String HTTPS_PREFIX = \"https://\";\n+\n+\tpublic synchronized void prepareKeyStoreForHost(final String host) {\n+\n+\t\tfinal File confDir = new File(\"conf\");\n+\n+\t\tif (!confDir.exists())","path":"src/main/java/eu/adlogix/appnexus/oas/client/certificate/CertificateManager.java","position":45,"original_position":45,"commit_id":"60e5bee32c85e39d795d666697f1cb744e6b9f88","original_commit_id":"60e5bee32c85e39d795d666697f1cb744e6b9f88","user":{"login":"tonivdv","id":1267658,"avatar_url":"https://avatars.githubusercontent.com/u/1267658?v=3","gravatar_id":"","url":"https://api.github.com/users/tonivdv","html_url":"https://github.com/tonivdv","followers_url":"https://api.github.com/users/tonivdv/followers","following_url":"https://api.github.com/users/tonivdv/following{/other_user}","gists_url":"https://api.github.com/users/tonivdv/gists{/gist_id}","starred_url":"https://api.github.com/users/tonivdv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tonivdv/subscriptions","organizations_url":"https://api.github.com/users/tonivdv/orgs","repos_url":"https://api.github.com/users/tonivdv/repos","events_url":"https://api.github.com/users/tonivdv/events{/privacy}","received_events_url":"https://api.github.com/users/tonivdv/received_events","type":"User","site_admin":false},"body":"can be written in one line","created_at":"2015-06-17T11:03:35Z","updated_at":"2015-06-17T11:03:35Z","html_url":"https://github.com/adlogix/appnexus-oas-java-client/pull/2#discussion_r32615442","pull_request_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/pulls/comments/32615442"},"html":{"href":"https://github.com/adlogix/appnexus-oas-java-client/pull/2#discussion_r32615442"},"pull_request":{"href":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/pulls/2","id":37866923,"html_url":"https://github.com/adlogix/appnexus-oas-java-client/pull/2","diff_url":"https://github.com/adlogix/appnexus-oas-java-client/pull/2.diff","patch_url":"https://github.com/adlogix/appnexus-oas-java-client/pull/2.patch","issue_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/issues/2","number":2,"state":"open","locked":false,"title":"Initial architecture jaxb","user":{"login":"piumika","id":7237953,"avatar_url":"https://avatars.githubusercontent.com/u/7237953?v=3","gravatar_id":"","url":"https://api.github.com/users/piumika","html_url":"https://github.com/piumika","followers_url":"https://api.github.com/users/piumika/followers","following_url":"https://api.github.com/users/piumika/following{/other_user}","gists_url":"https://api.github.com/users/piumika/gists{/gist_id}","starred_url":"https://api.github.com/users/piumika/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/piumika/subscriptions","organizations_url":"https://api.github.com/users/piumika/orgs","repos_url":"https://api.github.com/users/piumika/repos","events_url":"https://api.github.com/users/piumika/events{/privacy}","received_events_url":"https://api.github.com/users/piumika/received_events","type":"User","site_admin":false},"body":"Hello @tonivdv ,\r\nI did some research to see if we could use xjc to generate the java domain classes automatically using the dtd (something similar to what we did in smart).But the oas dtd is not in correct format therefore we cannot use it to automatically generate the java classes.\r\n\r\nHowever , we can use jaxb along with dom4j and use jaxb to generate objects from the xml and also generate the xml from the objects.In this branch I have used jaxb in the AdvertiserService and would like your opinion on using jaxb.Please let me know your option so that we can use jaxb for the project or parse the xml the way we did before.(Parsing the xml the old way might be faster as we already have the code) \r\n\r\nAlso let us know what you think of the structure/architecture of the project. Is there anything that is inappropriate ?\r\n\r\ncc @gunith ","created_at":"2015-06-17T05:29:21Z","updated_at":"2015-06-17T11:03:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8b9f81ad723c264700327b08e9bb4fb1f353b898","assignee":{"login":"tonivdv","id":1267658,"avatar_url":"https://avatars.githubusercontent.com/u/1267658?v=3","gravatar_id":"","url":"https://api.github.com/users/tonivdv","html_url":"https://github.com/tonivdv","followers_url":"https://api.github.com/users/tonivdv/followers","following_url":"https://api.github.com/users/tonivdv/following{/other_user}","gists_url":"https://api.github.com/users/tonivdv/gists{/gist_id}","starred_url":"https://api.github.com/users/tonivdv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tonivdv/subscriptions","organizations_url":"https://api.github.com/users/tonivdv/orgs","repos_url":"https://api.github.com/users/tonivdv/repos","events_url":"https://api.github.com/users/tonivdv/events{/privacy}","received_events_url":"https://api.github.com/users/tonivdv/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/pulls/2/commits","review_comments_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/pulls/2/comments","review_comment_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/pulls/comments{/number}","comments_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/issues/2/comments","statuses_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/statuses/60e5bee32c85e39d795d666697f1cb744e6b9f88","head":{"label":"adlogix:initial-architecture-jaxb","ref":"initial-architecture-jaxb","sha":"60e5bee32c85e39d795d666697f1cb744e6b9f88","user":{"login":"adlogix","id":584264,"avatar_url":"https://avatars.githubusercontent.com/u/584264?v=3","gravatar_id":"","url":"https://api.github.com/users/adlogix","html_url":"https://github.com/adlogix","followers_url":"https://api.github.com/users/adlogix/followers","following_url":"https://api.github.com/users/adlogix/following{/other_user}","gists_url":"https://api.github.com/users/adlogix/gists{/gist_id}","starred_url":"https://api.github.com/users/adlogix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adlogix/subscriptions","organizations_url":"https://api.github.com/users/adlogix/orgs","repos_url":"https://api.github.com/users/adlogix/repos","events_url":"https://api.github.com/users/adlogix/events{/privacy}","received_events_url":"https://api.github.com/users/adlogix/received_events","type":"Organization","site_admin":false},"repo":{"id":37311890,"name":"appnexus-oas-java-client","full_name":"adlogix/appnexus-oas-java-client","owner":{"login":"adlogix","id":584264,"avatar_url":"https://avatars.githubusercontent.com/u/584264?v=3","gravatar_id":"","url":"https://api.github.com/users/adlogix","html_url":"https://github.com/adlogix","followers_url":"https://api.github.com/users/adlogix/followers","following_url":"https://api.github.com/users/adlogix/following{/other_user}","gists_url":"https://api.github.com/users/adlogix/gists{/gist_id}","starred_url":"https://api.github.com/users/adlogix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adlogix/subscriptions","organizations_url":"https://api.github.com/users/adlogix/orgs","repos_url":"https://api.github.com/users/adlogix/repos","events_url":"https://api.github.com/users/adlogix/events{/privacy}","received_events_url":"https://api.github.com/users/adlogix/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/adlogix/appnexus-oas-java-client","description":"Java client to communicate with the SOAP api of AppNexus Open Adstream","fork":false,"url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client","forks_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/forks","keys_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/teams","hooks_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/hooks","issue_events_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/issues/events{/number}","events_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/events","assignees_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/assignees{/user}","branches_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/branches{/branch}","tags_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/tags","blobs_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/statuses/{sha}","languages_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/languages","stargazers_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/stargazers","contributors_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/contributors","subscribers_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/subscribers","subscription_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/subscription","commits_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/contents/{+path}","compare_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/merges","archive_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/downloads","issues_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/issues{/number}","pulls_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/pulls{/number}","milestones_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/milestones{/number}","notifications_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/labels{/name}","releases_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/releases{/id}","created_at":"2015-06-12T08:46:25Z","updated_at":"2015-06-12T08:46:25Z","pushed_at":"2015-06-17T07:18:56Z","git_url":"git://github.com/adlogix/appnexus-oas-java-client.git","ssh_url":"git@github.com:adlogix/appnexus-oas-java-client.git","clone_url":"https://github.com/adlogix/appnexus-oas-java-client.git","svn_url":"https://github.com/adlogix/appnexus-oas-java-client","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"adlogix:master","ref":"master","sha":"ce972dba52f8ae739d247874cd5ce4f0095c12d2","user":{"login":"adlogix","id":584264,"avatar_url":"https://avatars.githubusercontent.com/u/584264?v=3","gravatar_id":"","url":"https://api.github.com/users/adlogix","html_url":"https://github.com/adlogix","followers_url":"https://api.github.com/users/adlogix/followers","following_url":"https://api.github.com/users/adlogix/following{/other_user}","gists_url":"https://api.github.com/users/adlogix/gists{/gist_id}","starred_url":"https://api.github.com/users/adlogix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adlogix/subscriptions","organizations_url":"https://api.github.com/users/adlogix/orgs","repos_url":"https://api.github.com/users/adlogix/repos","events_url":"https://api.github.com/users/adlogix/events{/privacy}","received_events_url":"https://api.github.com/users/adlogix/received_events","type":"Organization","site_admin":false},"repo":{"id":37311890,"name":"appnexus-oas-java-client","full_name":"adlogix/appnexus-oas-java-client","owner":{"login":"adlogix","id":584264,"avatar_url":"https://avatars.githubusercontent.com/u/584264?v=3","gravatar_id":"","url":"https://api.github.com/users/adlogix","html_url":"https://github.com/adlogix","followers_url":"https://api.github.com/users/adlogix/followers","following_url":"https://api.github.com/users/adlogix/following{/other_user}","gists_url":"https://api.github.com/users/adlogix/gists{/gist_id}","starred_url":"https://api.github.com/users/adlogix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adlogix/subscriptions","organizations_url":"https://api.github.com/users/adlogix/orgs","repos_url":"https://api.github.com/users/adlogix/repos","events_url":"https://api.github.com/users/adlogix/events{/privacy}","received_events_url":"https://api.github.com/users/adlogix/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/adlogix/appnexus-oas-java-client","description":"Java client to communicate with the SOAP api of AppNexus Open Adstream","fork":false,"url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client","forks_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/forks","keys_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/teams","hooks_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/hooks","issue_events_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/issues/events{/number}","events_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/events","assignees_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/assignees{/user}","branches_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/branches{/branch}","tags_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/tags","blobs_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/statuses/{sha}","languages_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/languages","stargazers_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/stargazers","contributors_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/contributors","subscribers_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/subscribers","subscription_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/subscription","commits_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/contents/{+path}","compare_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/merges","archive_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/downloads","issues_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/issues{/number}","pulls_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/pulls{/number}","milestones_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/milestones{/number}","notifications_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/labels{/name}","releases_url":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/releases{/id}","created_at":"2015-06-12T08:46:25Z","updated_at":"2015-06-12T08:46:25Z","pushed_at":"2015-06-17T07:18:56Z","git_url":"git://github.com/adlogix/appnexus-oas-java-client.git","ssh_url":"git@github.com:adlogix/appnexus-oas-java-client.git","clone_url":"https://github.com/adlogix/appnexus-oas-java-client.git","svn_url":"https://github.com/adlogix/appnexus-oas-java-client","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/pulls/2"},"html":{"href":"https://github.com/adlogix/appnexus-oas-java-client/pull/2"},"issue":{"href":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/issues/2"},"comments":{"href":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/adlogix/appnexus-oas-java-client/statuses/60e5bee32c85e39d795d666697f1cb744e6b9f88"}}}}