Kayıtlar

Proxy Setting in Apache HttpClient

Problem:  Apache HttpClient does request without system proxy settings. And we want to use jvm proxy settings. Solution:  HttpClient httpclient = new DefaultHttpClient();     try { HttpGet httpget = new HttpGet("http://www.linkedin.com"); HttpHost proxy = new HttpHost(System.getProperty("http.proxyHost"), Integer.parseInt(System.getProperty("http.proxyPort"))); httpclient = new DefaultHttpClient(); httpclient.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY, proxy); HttpResponse response = httpclient.execute(httpget); HttpEntity entity = response.getEntity(); if (response.getStatusLine().getStatusCode() == HttpURLConnection.HTTP_OK) {         BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(entity.getContent()));         String line = "";         while ((line = bufferedReader.readLine()) != null) {     stringBuffer.append...

How To Add a Project To Team Foundation Server with Command Prompt

Resim
Hi Guys, If you dont have VS Command Prompt in Visual Studio, Tools>External Tools>Add, Command : C:\Windows\System32\cmd.exe Arguments : /k “C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\VsDevCmd.bat” Initial Directory : $(SolutionDir) When you add this, you can open it.  Then, Type your command line , tf.exe add XXXXXX /login:XXXX In shortly, you can do it in your ide with Add Items to Folder. Thanks!

How to connect Team Foundation Server in JDeveloper 12c

Resim
Hello Guys, In order to connect TFS server in JDeveloper 12c, we need to download an extension called  Microsoft Team System VCS. Get it and download below. http://www.oracle.com/webfolder/technetwork/jdeveloper/downloads/1213center.xml#oracle.jdeveloper.vsts When it finish, Help> Check For Updates with images that located below, select zip file and download it and restart IDE. If you have already mapped TFS server, for ex, C:\dev\workspace\JavaWebService Choose the directy of TFS that you have already mapped. And finish. The project will look like, Select the project and right click> Versioning > Add it. Icon will be changed as "+". Finally, you can check your project or a class in to your TFS. FOR ANY HELP, LEAVE A COMMENT! THANKS!

Solution of The field name is used by two different parts of a schema (Apache CXF)

While generating the client in any wsdl, it can be warn " The field name is used by two different parts of a schema" The solution is that putting jaxb-bindings.xml with, <jaxb:bindings xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" xmlns:jxb="http://java.sun.com/xml/ns/jaxb" xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc" version="2.1" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <jaxb:globalBindings generateElementProperty="false" fixedAttributeAsConstantProperty="true" choiceContentProperty="true" > <xjc:simple /> </jaxb:globalBindings> </jaxb:bindings> If you like this post, share and leave a comment! If you have any problems we can help you if you leave a comment!

How to Suppress StackTrace in Jax-RPC

Resim
In this post, we will remove or edit bea_fault:stacktrace. First of all, we ll put filter class in web.xml <filter>         <filter-name>ExceptionHandler</filter-name>         <filter-class>xxxPackage.ExceptionHandler</filter-class>     </filter>     <filter-mapping>         <filter-name>ExceptionHandler</filter-name>         <url-pattern>*</url-pattern>     </filter-mapping> Then, this class welcome all url pattern and apply filter. This class must be implemented javax.servlet.Filter. In below, we posted doFilter method. You can edit stack trace message whatever you want. By the way,Be careful about java.lang.IllegalStateException: strict servlet API: cannot call getWriter() after getOutputStream() . (If you get an error, just leave a comment! ) Thanks. ...