axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sebastian.Be...@wettschereck-partner.de
Subject AW: Deploying the client
Date Fri, 13 Dec 2002 15:26:27 GMT
Hi Pascal,

thanks a lot and thousand times more and many greetings to Karlsruhe from
Hamburg! That was exactly that kind of explanation that I needed. Of course
I saw this code in the samples, but because of the missing decription I just
did not understand and did not know how to convert it to my code. Now this
funcionality wirks and I'm glad that I just need static invocation...

But I have another question. I need to work with session. What I know is (or
what I think I know): I need to define the scope of the service to session,
and I have to invoke the SessionHandler during request and response flow.
But: I think I have to define request and response-flow on both sides; the
client and the server. But in the wsdl-file there is no entry for that
flow-definitions I defined for the service on server-side.
If I really have to tell the client-side axis to invoke my Handler (i.e. the
SimpleSessionHandler) in request and response: How do I tell him without
including a wsdd-file? Or do I have to define other stuff to get this
working?

thanks in advance

Sebastian Beyer

-----Urspr√ľngliche Nachricht-----
Von: Pascal Wissler [mailto:wipa0011@fh-karlsruhe.de] 
Gesendet: Freitag, 13. Dezember 2002 14:44
An: axis-user@xml.apache.org
Betreff: AW: Deploying the client


Hi Sebastian,

you don't need "deployment on the client-side".
If you want to access your webservice in a static way, you could use the
wsdl2java tool to generate a client-side "static invocation interface"
rather than your implementation of a "dynamic invocation interface". That's
a kind of "proxy" for you to access the webservice. This is useful if you
want to use a really remote web service such as Babelfish (see
www.xmethods.net) - give wsdl2java the URL
http://www.xmethods.net/sd/2001/BabelFishService.wsdl and it generates for
you (static) java classes for calling the service. But you can invoke the
service dynamically, too. Just use your code and give it the right endpoint
URL (f.ex. http://services.xmethods.net:80/perl/soaplite.cgi) and the
required parameters (look in the wsdl-document) and you will get the same
result - but then you have to handle all that type casting and other stuff.
So that's shortly the difference between "static" and "dynamic" invocation
of a web service.

In the user's guide there is a simple example of using the generated static
code:
--------
        // Make a service
        AddressBookService service = new AddressBookServiceLocator();
        // Now use the service to get a stub which implements the SDI.
        AddressBook port = service.getAddressBook();
        // Make the actual call
        Address address = new Address(...);
        port.addEntry("Russell Butek", address);
-------

If you use wsdl2java, you haven't to deal with all the endpoint URL of the
service and that kind of stuff. Then, you access and treat your object as if
it were on your local machine.

Regards.
Pascal.


-----Urspr√ľngliche Nachricht-----
Von: Sebastian.Beyer@wettschereck-partner.de
[mailto:Sebastian.Beyer@wettschereck-partner.de]
Gesendet: Freitag, 13. Dezember 2002 14:22
An: axis-user@xml.apache.org
Betreff: Deploying the client


Hi there,

I'm using Axis 1.0 and I set up the server. It is running and a normal small
client is able to invoke the methods. Also Serialization/DeSerialization of
JavaBeans works perfectly. I wrote the client, as it is described in the
userguide:

Service service = new Service();
Call call = (Call)service.createCall(); call.setTargetEndpointAddress(new
java.net.URL(endpoint));

call.registerTypeMapping(beanClass, beanQName, new
org.apache.axis.encoding.ser.BeanSerializerFactory(beanClass, beanQName),
new 	org.apache.axis.encoding.ser.BeanDeserializerFactory(beanClass,
beanQName));

QName operation = new QName(nameSpace, methodName);
call.setOperationName(operation);
Object returnval = call.invoke(invokeArgs);

Now I want to go further with deployment on the client-side. I think there
are two ways: Using a wsdd-file or by using the wsdl2java-framework. Or did
I misunderstand something? Where can I learn something about that? I read
the articles on apache org about this, but I think they dont describe well.
Because they just dont explain how to really work with the generated files.
I already tried to include a wsdd-file by using class WSDDDocument but I
didnt manage that to the end. I also generated the files by using wsdl2java,
but I dont know how to handle these files! How to use the Stub, and the
BindingImpl, the Locator and Factory. What do this classes describe?

Every help is appreciated!

Greetings from Hamburg/Germany

Sebastian Beyer

Mime
View raw message