Posts

Showing posts from June, 2008

How to deploy Apache Axis2 on Resin and JBoss application servers

Image
Axis2 can be deployed very easily on most of the application servers. Lets see how we can deploy axis2 on JBoss and Resin application servers. Deploying Axis2 on Resin application server 1. Download and install Resin from here 2. Download Axi2.war 3. Copy axis2.war to RESIN_HOME/webapps (i.e:- D:\resin-3.1.6\webapps) 4. Start Resin server Go to RESIN_HOME/lib and enter the following command to start the server java -jar resin.jar start 5. Open a browser and issue http://localhost:8080/axis2 Axis2 welcome page will be displayed. 6. Verify the status of installation. Click on 'Validate' link. You should see the following 'Axis2 Happiness' page. Deploying Axis2 on JBoss 1. Download JBoss (I used JBoss 4.2.2 GA but the same procedure can be applied for any version) 2. Download Axi2.war 3. Copy axis2.war to JBOSS_HOME/server/default/deploy 4. Start JBoss (Just execute JBOSS_HOME/bin/run.bat or run.sh) 5. Jboss will explode and deploy Axis2 when starting the server. Explo

How to avoid "Unable to generate EPR for transport" error in Axis2

" Unable to generate EPR for transport: http " is a FAQ in Axis2 mailing list. You may have experienced this when invoking a service using generated stubs. Solution: It's really simple. When creating the instance of stub, pass the actual service end point (epr) to the constructor as follows. YourserviceStub stub = new YourserviceStub("http://<IP>:<PORT>/axis2/services/YourService") Ideally when u generate a stub for a service it will pick up the Endpoint reference from the WSDL. So just instantiating stub with YourserviceStub stub = new YourserviceStub() could send the request to the address defined in the WSDL. In case you get the "Unable to generate EPR for transport: http" error, give a try with the above as well.

WS-Reliable Messaging with WSO2 WSAS - II

Image
This is the part two of my previous post on WS-Reliable messaging with WSO2 WSAS - 1 I'd suggest you to follow the steps given in there before proceeding with this. We looked at how WSO2 WSAS and WSO2 Mercury module are used in one-way (IN-ONLY) message interaction in reliable manner. In this post I'll explain the procedure to do the same with Request Reply(IN-OUT) messaging system using single transport channel. Step 1 Follow the step 1 - Service Configuration and step 2 - Generate stubs of part one of this post with the service implementation class given below. package org.wso2.wsas.service; public class MercuryService{ //Twoway messaging public int Add(int a, int b){ try { Thread.sleep(3000); } catch (InterruptedException e) { e.printStackTrace(); } return a+b; } } Note that I inserted a Thread.sleep() in service to wait ~3 seconds before returning results so that we may have enough time to block the transport channel when testing reliable message transm

Short notes on SOAP messaging

SOAP is the fundamental messaging framework for web services. It is the first piece of thing you should learn and understand when starting to deal with web services. I think most of the readers of this blog possess a good understanding of the concepts and techniques of SOAP. However, this blog is not restricted to folks who are working with SOA and web services. QA testers and non-web service specific developers are also a part of target audience. I thought to describe a set of commonly used terms in SOA and web services in fairly simple and non-technical user oriented manner so that most novice users get benefit from it. SOAP defines a standard message format based on XML. It provides a mechanism to bind messages to different network protocols. It also defines a processing model to serialize/de-serialize messages. Structure of a soap message <Envelope> <Header> <headerBlock1/> </Header> <Body> <payload/> &

Retrieving web service metadata using wso2-mex module

I have published a Knowledge base post at Wso2 oxygen tank which describes the procedure to retrieve web service metadata using wso2 WSAS and wso2-mex module . You will find it useful since there are no much documents available on the web regarding ws-MEX (ws-MetaDataExchange) configuration and usage.

WS-Reliable messaging with WSO2 WSAS -1

Image
Web services are an essential component of distributed computing. Reliable communication between services and service consumers should be taken in to account when designing SOA based systems. WS-Reliability is a SOAP-based specification that fulfills reliable messaging requirements critical to web service applications. The objective of this post is not to discuss the features and architectural details of WS-Reliable Messaging (WS-RM). You can find the WS-RM specification from here and a lot of useful materials are available on the web. I'm going to demonstrate the simplest RM scenario, one-way single channel invocation using WSO2 mercury, which is an implementation of WS-RM using Apache Axis2. WSO2 mercury is shipped as a module with WSO2 web services application server version 2.3 (WSO2 WSAS-2.3) as well as a separate piece of product. I'm going to describe the scenario using WSO2 WSAS, however you may also follow the given steps with Axis2-1.4 . We are going to send a set o

WSO2 WSAS -2.3 is out!

WSO2 Web services application server (WSAS) - 2.3 was released yesterday. It was an extremely tough release. We were given the June 10th deadline less than 2 weeks back (on 27th of May). There were major changes happened in core Axis2. We were supposed to ship with Axis2-1.4 which had not been gone through a rigorous QA/test cycle to verify compatibility with WSO2 WSAS. It was one of the most challenging test/QA cycles I have ever gone through. It is obvious that less than 2 weeks are not enough to do a full scale functional/regression test, no option, we had to mange somehow. Milestone builds were planned to out for QA testing on every friday though it did not happen. There were a lot of regression issues and most of them were uncovered during the initial QA tests. Fixes were getting delayed and some blockers avoided exercising some major features until last moment. Worked around the clock to complete functional as well as regression testing. During the last few days 2-3 release candi