tags:

views:

324

answers:

1

Hi i have this issue, I am trying to invoke a web service dynamically from my Jax-WS web service. I tried with glass fish,it is working fine. but now i shited to apache,and it is giving me the exception

javax.xml.rpc.ServiceException: java.lang.ClassNotFoundException: org.apache.axis.client.ServiceFactory

Note: i added the **jaxrpc.iar**

the code is as shown:

enter code here
    ServiceFactory factory = ServiceFactory.newInstance();

  Service service = factory.createService(serviceName);


call = service.createCall();


QName operationName = new QName(TargetNamesSpace,strOperationName,"");

call.setOperationName(operationName);


call.addParameter(
    "arg0",                 // parameter name
    XMLType.XSD_LONG,       // parameter XML type QName
    Long.class,             // parameter Java type class
    ParameterMode.IN);      // parameter mode
//  set the the return type.

call.setReturnType(XMLType.XSD_DOUBLE);

//call.setProperty( Call.OPERATION_STYLE_PROPERTY,"");



call.setProperty(Call.ENCODINGSTYLE_URI_PROPERTY,"");

call.setTargetEndpointAddress(endpoint);


Object[] actualArgs={entityId};

Double computedRating =(Double)call.invoke(operationName,actualArgs);

I have one doubt,does the server change make any difference since i am not adding any jar when i tried this on glassfish.

Thanks you.:)

A: 

try also add commons-discovery-0.2.jar and axis.jar, can be found as plug in in eclipse

dionsaurus