This is a bug in the newly introduced options class. We actually found the problem few days back and fixed it in the latest codebase. The problem is that the stub wise options object (you'll see this when you open the generated stub code) attaches itself to the operation clients options object once a method has been called!
Here is the fix if you have the .94 code. (Unfortunatley I can't think of a workaround that does not include manipulating code :()
Open the org.apache.axis2.client.Options class in the core module.
at line 223 change the soapAction = parent.getSOAPAction();
to return parent.getSOAPAction();
Now that method should look like this
public String getSoapAction() {
if (soapAction == null && parent != null) {
return parent.getSoapAction();
}
return (soapAction != null) ? soapAction : "";
}
Other getter methods also need to be modified in this way but essentially this is the method that would make the difference.
Ajith
On 1/21/06, Aaron Evans <[EMAIL PROTECTED]> wrote:
Hi,
I generated a client stub based on some wsdl from a third party. The client stub
uses ADB for data binding.
I've noticed some strange behaviour and was wondering if anyone else has seen
something similar or can explain it to me.
Basically, there are two web service methods (wsdl:operation) that I am using,
call them A and B.
Now say I need to call A twice, then B twice.
If I instantiate a new instance of the stub for each invocation, then everything
works fine.
However, if I only instantiate the client stub once and try to reuse it for
all service method invocations, it works fine for the two calls to A, but
as soon as I start calling B, things don't work as they should.
B is supposed to return a complex type called 'BResponse' that simply contains
a sequence (of max lenght 1) of a complex type, C.
B comes back non-null, but C is coming back null.
If I reverse the order of the method calls (so, B,B,A,A), then the first two
calls to B then work fine, but as soon as I start calling A, the same thing
happens.
A is supposed to return an object, AResponse that contains an object D, but
D ends up coming back as null.
Any ideas?
I have been out of the web service world for a little while now, so excuse
me if this isn't very clear.
Incidentally, I remember a few years back when I was using axis 1, there was
a java tool that was very nice for debugging that you could use as a proxy in
between the client and the ws endpoint and it would show you the soap headers
and payloads that were going back and forth. Does anyone know what I'm talking
about and where to get it?
thx,
aaron
--
Ajith Ranabahu
