axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jaime Meritt <jmer...@sonicsoftware.com>
Subject RE: JMS, TypeMapping, and the SoapBindingImpl
Date Wed, 17 Dec 2003 13:19:09 GMT
Chris,

Have you tried the latest from cvs? A couple of weeks ago we added in JMS
URL support and the bindings should be correctly generated now and no longer
require modification.  Let me know if I can be of further assistance.

-Jaime
Sonic Software

-----Original Message-----
From: Celia Berry [mailto:chrisberry@austin.rr.com] 
Sent: Tuesday, December 16, 2003 11:20 PM
To: Axis-User
Subject: JMS, TypeMapping, and the SoapBindingImpl

Greetings,
I am trying to use Axis with JMS as a transport, and have managed to get it
all working. But unfortunately I had to hack one thing which I suspect has a
cleaner solution.

I generate XML Bean classes for an existing WSDL in the normal way using
WSDL2Java. No problem there. But when I try to use the generated code from a
client I run into problems.

As far as I can tell the SoapBindingStub does not provide any means to get
at the TypeMappings, etc. unless one goes through the actual, public Service
call.(i.e. MyResponse xyz( MyRequest req ); or whatever).  Within the
SoapBindingStub, createCall() is private, and all of the
_call.setOperation(), etc stuff happens only from within the actual Service
call. But with JMS we do not make an explicit Service call -- instead we
create the call, setup it's transport, etc, and then use call.invoke()...

To make this work I had to hack XYZSoapBindingStub to provide a new public
method named buildCall() which looks like this (I've omitted some lines for
brevity)::

public Call buildCall() throws RemoteException {
   Call _call = createCall();
   _call.setOperation( operations[0] );
   _call.setUseSOAPAction( true );
   ....
   return _call;
}

And in the Client I have::

Service service = new Service( provider );
XYZSoapBindingStub stub = new XYZSoapBindingStub( service );
stub.setPortName(...);
Call call = stub.buildCall()
call.setOperationName(...);
call.setTransport( new JMSTransport(...) );
....
response = call.invoke( ... );

Is there a better way to do this??
Surely hacking the generated SoapBindingImpl is not the answer.
Any help would be greatly appreciated.
Thanks,
-- Chris Berry








Mime
View raw message