Kayıtlar

Ağustos, 2017 tarihine ait yayınlar gösteriliyor

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