Recent Notes

Displaying keyword search results 1 - 5
Created by Dr. Xi on March 22, 2013 12:18:39    Last update: March 22, 2013 12:18:39
This is a step-by-step guide to create a "contract-first" web service with Apache CXF. It's a lot easier than doing the same thing with Spring-WS. The project uses standard Maven directory layout. Define the data types ( src/main/resources/hello.xsd ): <xs:schema xmlns:xs=" Define the service ( src/main/resources/hello.wsdl ): <?xml version='1.1' encoding='UTF-8'?> <wsdl:de... Create pom.xml : <project xmlns=" Generate jaxb bindings: $ mvn generate-sources Code the web service ( src/main/java/com/example/cxfdemo/ ): package com.example.cxfdemo; import javax.j... Declare the CXF servlet in web.xml ( src/main/webapp/WEB-INF/web.xml ): <?xml version="1.0" encoding="UTF-8"?> <web-app... Wire up the web service implementation ( src/main/webapp/WEB-INF/cxf-servlet.xml ): <?xml version="1.0" encoding="UTF-8"?> <beans x... Build the WAR: $ mvn clean package After the webapp is deployed (Tomcat running on port 8080), the web service (WSDL) is available via...
Created by Fang on February 23, 2012 14:25:57    Last update: March 01, 2012 13:53:59
Some example snippets for Spring message configuration and usage. To configure a message source in Spring context (basename=messages): <bean id="messageSource" class="org.springf... Locale change interceptor can also be setup with: <?xml version="1.0" encoding="UTF-8"?> <beans x... The messages file should be named (or , etc.) and located on CLASSPATH , for example: WEB-INF/classes . To use a message resource in JSP: <%@ taglib prefix="spring" uri="http://www.springf...
Created by Fang on November 10, 2011 09:26:12    Last update: November 10, 2011 09:26:12
Syntax highlighted XML schema for JSF 2.0 Application Configuration Resource File ( faces-config.xml ). Almost 3000 lines! <?xml version="1.0" encoding="UTF-8"?> <xsd:sch...
Created by freyo on May 13, 2011 15:45:29    Last update: September 20, 2011 08:08:12
This is an Android app that dumps any binarized xml file as plain text - to the sdcard on the device or emulator. build.xml : <?xml version="1.0" encoding="UTF-8"?> <project... AndroidManifest.xml <?xml version="1.0" encoding="utf-8"?> <man... res/layout/main.xml <?xml version="1.0" encoding="utf-8"?> <Lin... res/values/strings.xml : <?xml version="1.0" encoding="utf-8"?> <res... src/com/android/xmltool/ package; import java.ut... Screenshot Pre-built APK can be downloaded from:
Created by nogeek on September 29, 2010 19:22:15    Last update: September 29, 2010 19:22:15
Assuming you are using the default server. Edit the file server/default/conf/login-config.xml Copy & paste the section: <application-policy name="web-console"> ... Change the copy to: <application-policy name="myapp"> <auth... Create users properties file Copy server/default/conf/props/ to server/default/conf/props/ . Change contents to: # file for use with the Users... Create roles properties file Copy server/default/conf/props/ to server/default/conf/props/ . Change contents to: # file for use with the Users... Edit web.xml in the application myapp . Add security constraints: <security-constraint> <web-resource-col... Add file WEB-INF/jboss-web.xml with the following contents: <?xml version='1.0' encoding='UTF-8' ?> ... where myapp corresponds to the name attribute for application-policy in step 1.