Hi,

 

I have to develop Web service client application which should be portable and vendor independent. So, I write the program once, and it may run with different JAX-RPC implementaiton on the client side, say with AXIS, or BEA or any other….

 

Using  static stub approach does not fit me, since here vendor-specific stub should be created before run-time during WSDL to Java amapping stage.

 

        MyServiceServiceLocator locator = new MyServiceServiceLocator();

        proxy = locator.getMyService(targetURL);

 

where locator is javax.xml.rpc.Service.

….

 

I have prefered to use Dynamic proxy approach.

 

        ServiceFactory serviceFactory = ServiceFactory.newInstance();

        Service service = serviceFactory.createService(wsdlURL,QName.valueOf("{http://ws.test.my}MyServiceService"));

        proxy = (my.test.ws.MyService)  service.getPort(QName.valueOf("{http://ws.test.my}MyService"), my.test.ws.MyService.class);

 

So, as I understand I need only to change ServiceFactory.SERVICEFACTORY_PROPERTY to

 

org.apache.axis.client.ServiceFactory -  for Axis

weblogic.webservice.core.rpc.ServiceFactoryImpl  -  for BEA WLS

com.sun.xml.rpc.client.ServiceFactoryImpl – for Sun JWSDP

 

and code above should run. So, the idea behind having dynamic proxy is that dynamic proxy is created at run-time. , Yes I have to know WSDL  URL at development time and I need to run WSDL to Java mapping against the WSDL  before runtime ( at least I have to have my.test.ws.MyService class which extends Remote)

 

So, I generated all artifacts with Axis and WLS. I put them into the classpath. When I refere to Axis SerficeFacory  it works, bit when I am pointing to Weblogic service factory – does not work.

 

Any idea why ?

 

Thanks in advance….

 

This message and the information contained herein is proprietary and confidential and subject to the Amdocs policy statement,
you may review at http://www.amdocs.com/email_disclaimer.asp

Reply via email to