Hi Deepal,
Thanks for your quick response. Please check my client code attached
here. Also I am using stub generated by axis2. Attached is the WSDL that
I get from Axis2 and use for my stub generation using again axis2 1.2
jars in cmd line. 

Just to note here again, this service when deployed in Axis2 1.3 war
deployed in tomcat, works very fine without any error with the same
client.

Thanks and Regards
Lokajit Tikayatray
-----Original Message-----
From: Deepal Jayasinghe [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 03, 2008 12:50 AM
To: [email protected]
Subject: Re: org.apache.axis2.AxisFault: java.lang.RuntimeException:
[was class java.net.UnknownHostException] www.w3.org



>  
> Hi,
> I am facing the 'UnknownHostException' when I am accessing my service 
> deployed in Axis2-1.2 war which is in tomcat server. Same service .aar

> file when I am deploying in Axis2-1.3 war in tomcat is not giving any 
> error and is working fine. The exact stacktrace that I get when 
> accessing the service deployed in Axis2-1.2 is as below:
>
> org.apache.axis2.AxisFault: java.lang.RuntimeException: [was class 
> java.net.UnknownHostException] www.w3.org
>   
Seems like you are sending the request to www.w3.org Could you please
send us your client code , then we can see what actually happening.

Thank you!
Deepal


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

package client;

import java.rmi.RemoteException;
import java.util.ArrayList;

import org.apache.axis2.client.Options;
import org.apache.axis2.transport.http.HTTPConstants;
import org.apache.axis2.transport.http.HttpTransportProperties.Authenticator;

import 
com.citi.gwm.grid.package2.CheckGridPackageServiceCheckGridPackageServiceHttpportStub;
import 
com.citi.gwm.grid.package2.CheckGridPackageServiceCheckGridPackageServiceHttpportStub.ExposedMethod1;
import 
com.citi.gwm.grid.package2.CheckGridPackageServiceCheckGridPackageServiceHttpportStub.ExposedMethod1Response;
import 
com.citi.gwm.grid.package2.CheckGridPackageServiceCheckGridPackageServiceHttpportStub.MyPkg2SP1Class1;
import 
com.citi.gwm.grid.package2.CheckGridPackageServiceCheckGridPackageServiceHttpportStub.MyPkg2SP1Class2;
import 
com.citi.gwm.grid.package2.CheckGridPackageServiceCheckGridPackageServiceHttpportStub.OutPutResponse;
import 
com.citi.gwm.grid.package2.CheckGridPackageServiceCheckGridPackageServiceHttpportStub.SubOutPut1;
import 
com.citi.gwm.grid.package2.CheckGridPackageServiceCheckGridPackageServiceHttpportStub.SubOutPut2;


public class CGPServiceAxisClient {

        private CheckGridPackageServiceCheckGridPackageServiceHttpportStub stub 
= null;
        /**
         * @param args
         */
        public static void main(String[] args) {
                CGPServiceAxisClient classObj = new CGPServiceAxisClient();
                classObj.callService();
                System.out.println("Completed...");
        }
        
        public void callService(){
                
                try {
                        stub = 
getServiceStub("http://127.0.0.1:8080/axis2/services/CheckGridPackageService";);
                } catch (RemoteException e) {
                        System.out.println("Remote Exception: While calling the 
getServiceStub method from callService method in CSPAxisClient class.");
                        e.printStackTrace();
                } catch (Exception e) {
                        System.out.println("Exception: While calling the 
getServiceStub method from callService method in CSPAxisClient class.");
                        e.printStackTrace();
                }
                
                ExposedMethod1 reqObj = new ExposedMethod1();
                reqObj.setNumber1(981177);
                reqObj.setPassedString("SERVER Message: STRING PASSED BY AXIS 
CLIENT");
                try {
                        ExposedMethod1Response respObj = 
stub.exposedMethod1(reqObj);
                        OutPutResponse opRespObj = respObj.get_return();
                        String clientStringPassed = 
opRespObj.getClientStringPassed();
                        System.out.println("clientStringPassed: 
"+clientStringPassed);
                        String OpRespStrVar1 = opRespObj.getOpRespStrVar1();
                        System.out.println("OpRespStrVar1: "+OpRespStrVar1);
                        String OpRespStrVar2 = opRespObj.getOpRespStrVar2();
                        System.out.println("OpRespStrVar2: "+OpRespStrVar2);
                        SubOutPut1 SOP1Obj1 = opRespObj.getSubOP1ObjVar1();
                        String strSOP1Var1 = SOP1Obj1.getStrVAr1();
                        String strSOP1Var2 = SOP1Obj1.getStrVAr2();
                        System.out.println("SUBOUTPUT1: " + strSOP1Var1 + "--" 
+ strSOP1Var2);
                        SubOutPut2 SOP2Obj2 = opRespObj.getSubOP2ObjVar1();
                        String strSOP2Var1 = SOP2Obj2.getStrVAr1();
                        String strSOP2Var2 = SOP2Obj2.getStrVAr2();
                        String strSOP2Var3 = SOP2Obj2.getStrVAr3();
                        System.out.println("SUBOUTPUT2: " + strSOP2Var1 + "--" 
+ strSOP2Var2 + "--" + strSOP2Var3);
                        MyPkg2SP1Class1 pkg2Class1obj = 
SOP1Obj1.getPkg2Class1Obj();
                        System.out.println("pkg2Class1obj.getStrP2SP1C1ArrVar1: 
"+pkg2Class1obj.getStrP2SP1C1ArrVar1());
                        MyPkg2SP1Class2 pkg2Class2obj = 
pkg2Class1obj.getMyPkg2SP1Class2Obj();
                        System.out.println("pkg2Class2obj.getStrP2SP1C2ArrVar1: 
"+pkg2Class2obj.getStrP2SP1C2ArrVar1());
                                                
                } catch (RemoteException e) {
                        System.out.println("Remote Exception: While calling the 
exposedMethod1 method from callService method in CSPAxisClient class.");
                        e.printStackTrace();
                } catch (Exception e) {
                        System.out.println("Exception: While calling the 
exposedMethod1 method from callService method in CSPAxisClient class.");
                        e.printStackTrace();
                }
                System.out.println("DONE with callService method.");
                
        }
        
//      This method dynamically creates the stub depending upon the end point 
URL of the service passed.
        private CheckGridPackageServiceCheckGridPackageServiceHttpportStub 
getServiceStub(String endPointURL) throws RemoteException, Exception{
                System.out.println("Inside the getServiceStub method.");
                stub = new 
CheckGridPackageServiceCheckGridPackageServiceHttpportStub(endPointURL);
                System.out.println("Stub created for the given EPR: 
"+endPointURL);
                
                return stub;
                
        }

}

Attachment: CheckGridPackageService.wsdl
Description: CheckGridPackageService.wsdl

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to