You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Arkady Kasianski <Ar...@Amdocs.com> on 2006/05/31 11:01:37 UTC

JAX-RPC client with dynamic proxy

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}M
yServiceService"));

        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

Where to set server-port?

Posted by Felix Jungermann <fe...@do.isst.fraunhofer.de>.
Hi there,
I try to deploy a sample SOAP-Service but always get following error 
message:

H:\Tomcat 5.0\webapps\axis\WEB-INF>java -Dhttp.proxyHost=proxy 
-Dhttp.proxyPort=
80 org.apache.axis.client.AdminClient deploy.wsdd
log4j:WARN No appenders could be found for logger 
(org.apache.axis.i18n.ProjectR
esourceBundle).
log4j:WARN Please initialize the log4j system properly.
Processing file deploy.wsdd
Exception: AxisFault
 faultCode: {http://xml.apache.org/axis/}HTTP
 faultSubcode:
 faultString: (404)Not Found
 faultActor:
 faultNode:
 faultDetail:
        {}:return code:  404
&lt;!DOCTYPE HTML PUBLIC &quot;-//IETF//DTD HTML 2.0//EN&quot;&gt;
&lt;HTML&gt;&lt;HEAD&gt;
&lt;TITLE&gt;404 Not Found&lt;/TITLE&gt;
&lt;/HEAD&gt;&lt;BODY&gt;
&lt;H1&gt;Not Found&lt;/H1&gt;
The requested URL /axis/services/AdminService was not found on this 
server.&lt;P
&gt;
&lt;HR&gt;
&lt;ADDRESS&gt;Apache/1.3.33 Server at localhost Port 8080&lt;/ADDRESS&gt;
&lt;/BODY&gt;&lt;/HTML&gt;

        {http://xml.apache.org/axis/}HttpErrorCode:404

I thinks this error appears because of the try to connect to Port 8080, 
but my Tomcat is running on port 80. My question now is, where to set up 
the Port number???
Ich was searching the axis-folder but did not find any interesting 
properties - file.
Do you have any ideas?

Thanks and greetings,
Felix

-- 
Felix Jungermann

Fraunhofer Institut
Software- und Systemtechnik (ISST)

http://www.isst.fraunhofer.de 


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org