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 "Miller, Janet" <Mi...@pbworld.com> on 2005/07/06 02:33:30 UTC
Client Code Question
Someone just asked a question about their client code:
Service srv = new
Service("http://localhost:49950/iflowws/services/IFWebServices?wsdl",
new QName(ns, "IFService"));
Call call = (Call)srv.createCall(new QName(ns, "IFPort"), new QName(ns,
"getWorkItemChoices"));
Object result = call.invoke( new Object[] { u, p, new Long(id)} );
My client code looks like this:
TZCService service = new TZCServiceLocator();
TZCServiceSoap port = service.getTZCServiceSoap();
test = port.getTransactions("Test");
I'm brand new to Axis and Web Services. Why does my client code look
totally different from someone else's? I'm using Axis 1.2.1.
Are different versions of Axis that much different or am I doing
something completely wrong? I am not able to access the web service
that I just deployed with my client and can't figure out why. All the
call and invoke stuff is in my Stub.java file.
Jan
RE: Client Code Question
Posted by Steven Smith <st...@geometryit.com>.
Janet,
There are 2 ways to access a Web Service: Using generic classes and
using the Service implementation created for you by Axis or your client
language. Both ways do the same job, but the way you have done it is more
readable. It is immediately obvious from your code what you are accessing.
But with the other, generic way, it is very difficult to see what it being
called.
--
Steven Smith <st...@geometryit.com>
Software Developer / Analyst
Telephone : 03 6223 1999
Facsimile : 03 6223 1988
Web : www.geometryit.com <outbind://225/www.geometryit.com>
Address : 31 Salamanca Square, Battery Point, TAS 7004, Australia
Postal : PO Box 844, Sandy Bay, TAS 7006, Australia
_____
From: Miller, Janet [mailto:MillerJa@pbworld.com]
Sent: Wednesday, 6 July 2005 10:34 AM
To: axis-user@ws.apache.org
Subject: Client Code Question
Someone just asked a question about their client code:
Service srv = new
Service("http://localhost:49950/iflowws/services/IFWebServices?wsdl", new
QName(ns, "IFService"));
Call call = (Call)srv.createCall(new QName(ns, "IFPort"), new QName(ns,
"getWorkItemChoices"));
Object result = call.invoke( new Object[] { u, p, new Long(id)} );
My client code looks like this:
TZCService service = new TZCServiceLocator();
TZCServiceSoap port = service.getTZCServiceSoap();
test = port.getTransactions("Test");
I'm brand new to Axis and Web Services. Why does my client code look
totally different from someone else's? I'm using Axis 1.2.1.
Are different versions of Axis that much different or am I doing something
completely wrong? I am not able to access the web service
that I just deployed with my client and can't figure out why. All the call
and invoke stuff is in my Stub.java file.
Jan