Thanks for the suggestions. I understand that you can just typecast
TestTransaction and get a stub object as follows.
TestTransactionSoapBindingStub stub = (TestTransactionSoapBindingStub)
transaction;
But that doesn't solve my problem. Or maybe I am just missing the point.
Here is what I would like to append to the SOAP Header (not the BODY).
<AuthenticationInfo userid="xxxxx" password="yyyyy"/>
<AuthorizationInfo>
<From domain="foo.com" system="FOO"/>
<To domain="bar.com" system="BAR">
</AuthorizationInfo>
Is that possible using the setHeader() method on the Stub or do I have to
use Handlers? If so, are there any examples that anyone knows of that might
be helpful?
Thanks.
-----Original Message-----
From: Arno Huetter [mailto:[EMAIL PROTECTED]
Sent: Monday, December 22, 2003 9:26 AM
To: [EMAIL PROTECTED]
Subject: Re: Authentication Information in SOAP Header
Hello there,
I don't know the details of your code, but I suppose that you have to cast
"transaction" to Stub or TestTransactionSoapBindingStub - at compiletime
"transaction" is just of type TestTransaction, and not of type
TestTransactionSoapBindingStub (at runtime, it will be of type
TestTransactionSoapBindingStub as well).
Kind regards,
Arno Huetter
-----Urspr�ngliche Nachricht-----
Von: Pani, Gourav [mailto:[EMAIL PROTECTED]
Gesendet: Montag, 22. Dezember 2003 15:04
An: '[EMAIL PROTECTED]'
Betreff: RE: Authentication Information in SOAP Header
Here is what I am specifically doing in my code.
// creating the service locator obj
TestTransactionService serviceLocator = new
TestTransactionServiceLocator();
// creating and executing the transaction
TestTransaction transaction = serviceLocator.getFastWebService();
transaction.updateInventory("Foo", fooInfo);
I can't figure out how to use the TestTransactionSoapBindingStub to set the
header. Any suggestions?
-----Original Message-----
From: Arno Huetter [mailto:[EMAIL PROTECTED]
Sent: Monday, December 22, 2003 8:43 AM
To: [EMAIL PROTECTED]
Subject: AW: Authentication Information in SOAP Header
Hi there,
I don't employ a handler, but simply invoke Stub.setHeader() for passing
authentication data - works fine for me.
HTH
Kind regards,
Arno Huetter
-----Urspr�ngliche Nachricht-----
Von: Pani, Gourav [mailto:[EMAIL PROTECTED]
Gesendet: Montag, 22. Dezember 2003 14:30
An: [EMAIL PROTECTED]
Betreff: Authentication Information in SOAP Header
hi,
i am using axis 1.1 on resin 2.1.10 and am trying to send header level
authentication info to a service. from previous posts and some other
research i have gathered that using handlers would be the right way to go
about it. however, i cannot seem to find any documentation or sample code
on how to use handlers to manipulate the header of a SOAP envelope before it
is sent out to the service.
i am using WSDLToJava to generate the stub objects instead of the DII way of
using the Call object.
any help is greatly appreciated.
tia.
ps: the setUsername()/setPassword() solution does not work for my case.