Posts

Showing posts from March, 2012

How to generate wsdl using spring-ws application -Part-2

 PART_1-- goes here http://jtechspace.blogspot.in/2012/03/how-to-generate-wsdl-using-spring-ws.html The xsd should contain xmlns --xml name space targetnamespace-- usally same as xmlns--add this to the     xs:schema xmlns="http://echo.com/sample-spring-ws"     targetNamespace="http://echo.com/sample-spring-ws" example: 2 elements -request and response element org.springframework.web.servlet.DispatcherServlet -reference to be added to web.xml file update the dependecies  in pom.xml file-- when using a maven web-project             org.springframework             spring-context-support             2.5.6                                        org.springframework.ws             spring-oxm             1.5.7                     org.springframework.ws             spring-oxm-tiger             1.5.7                                    org.springframework.ws             spring-ws-core-tiger             1.5.7                                    org.springframe

How to generate wsdl using spring-ws application -Part:1

Spring web-service package supports first-contract. The api generates the wsdl by reading the spring-ws-servlet.xml file. All the below classes needs to be packaged as .war file. Its easier to create a maven web-project src/main/webapp-> create a folder "xsd" and add all the xsd files in this. I have deployed it on jboss5.1 steps for creating a simple spring-ws application create Servicename_Request.java - src/main/java Create Servicename_Reponse.java - src/main/java create servicename.xsd- src/main/webapp/xsd create Servicename_Endpoint.java - src/main/java create spring-ws-servlet.xml - src/main/webapp/web-inf/ spring-servlet.xm l -file will have the following references Servicename_Request.java--->Pojo Servicename_Response.java->Pojo servicename.xsd-xsd-define the request and response schema Servicename_Endpoint.java---create a method with requestObject as a parameter and responseObject as the retrun type name of the wsdl that should

org.jboss.xb.binding.JBossXBRuntimeException: Failed to create a new SAX parser

org.jboss.xb.binding.JBossXBRuntimeException: Failed to create a new SAX parser remove xerces.jar from web-inf/lib

Cruise Control- Continuous Integration tool

Cruise Control is built on java.It comes with built in ant tool  and jetty server.  Its a free open source build engine. You dont have to the build but cruise control will do the build and will execute the test case and will also give the status of the build. The build process can be scheduled. It can be integrated with svn,cvs,vss. Whenever a new code checks in the build is triggered. It works with maven as well. watch out for more posts on Cruise Control. Installtion - sturcture and more.. http://cruisecontrol.sourceforge.net/ http://maven.apache.org/maven-1.x/plugins/cruisecontrol/ http://www.exubero.com/ccintro/ccintro-s5.html

Download Maven quick start Guide pdf-Updated

The pdf contains steps to quickly start using maven 3.0. DOWNLOAD -MAVEN QUICKSTART GUIDE https://docs.google.com/open?id=0Bw0JiVGLs_kUekhFanFNc0tTbXlKVnYwM1F1U3hodw http://mavenize.blogspot.in/  good site for learning maven.

Let Maven project in Eclipse -point to local respository

Using eclipse Indigo Download the maven pulgin to eclipse and install URL is -->-maven - http://download.eclipse.org/technology/m2e/releases Click on New->Project Select " Maven Project " check-Use Default Workspace location select " All Catalogs " select maven-archetype-quickstart click on next In the screen Enter artifactid,groupid and click on finish Click on the Maven dependecies on the right side you can see that it is pointing to a deefualt location. We need to point it to our local repostiory. So local repository location is avialable in in conf/settings.xml file of maven folder. Click on window->preferences->Maven click on user Settings- browse and enter the settings.xml file location. Click on Update settings click on apply Click on ok Now go to the project on the left side of the eclipse right click->run->maven test you can see build successfull message

Quick start with maven and Create a Sample Central Repo for your team

Download maven-apache-maven-3.0.3-bin Unzip open conf folder edit the " settings.xm l" (before editing take a back up). In settings.xml file uncomment the localrepository -replace with the below one E:/maven_local_repo Create a folder by name- " maven_local_repo " share the folder.(right click and share) Create a .bat file and name it as "mavenstartup.bat" the contents of the mavenstartup.bat file is given below @echo on echo setting java_home set JAVA_HOME=C:\Program Files\Java\jdk1.6.0_07 echo JAVA_HOME to path set PATH=%JAVA_HOME%\bin;%PATH% echo setting MAVEN home set MAVEN_HOME=E:\maven echo adding maven home to PATH set PATH=%MAVEN_HOME%\bin;%PATH% echo test maven version mvn --version PAUSE type the command--> mvn archetype:create -DgroupId=com.mysampleproject1 -DartifactId=mysampleproject the above command will create a sample java project type command--> mvn compile  if things are fine you will get " Build S

Jmeter and JUnit Testing.

Jmeter and JUnit Testing.  I was asked to test my junit class in a multi-threaded environment.  I choose JMeter.  Download-apache-jmeter-2.6.zip for the apache jmeter site.  Unzip the apache-jmeter-2.6.zip file.  Use Eclipse to create a Executable jar.  In Eclipse-click on Export  An Export Dialogue should appear. Click on Java->runnable JAR file. Select a main Class of your project.If you dont have create a dummy main class. Under-Library Handling:Select -"Extract required libraries into generated JAR" Click on Finish. A executable Jar will be created in the specified folder with lib extracted . Also remeber the JUNIT test version,i.eJunit3 or Junit4. Also take care of the libs--dont have duplicate libs in the jar.   In Jmeter;  Go to the installation folder of Jmeter  Browse Lib->junit here you will find a test.jar.Thats meant for example.  Drop your application jar here.  Browse to the bin dir of jmeter  click on jme

How to create a src/main/java source folder in Eclipse

  How to create a src/main/java source folder in Eclipse Click on new->Java Project Click on next Click on Source tab--usally source tab will be selected by default.. Under Details-click on-Create new source folder link. Enter the folder name as "src/main/java" Click on finish. Start creating packages under this.