Re: Axis Client and Authentication
"Raymond Hooker (rhooker)" <[email protected]>
| Newsgroups | gmane.org.user-groups.trijug.juglist |
|---|---|
| Message-ID | <848DB51F3E58E146B08D188F803DCB6F074937D5@xmb-rtp-20c.amer.cisco.com> |
I am using the Axis WSDL2Java in Eclipse 3.3 and the Web Standard
Toolkit 2.01 to generate the client from the WSDL.
Ray
-----Original Message-----
From: Raymond Hooker (rhooker)
Sent: Tuesday, September 02, 2008 10:20 AM
To: Triangle Java Users
Cc: 'Shawn Hartsock'
Subject: Axis Client and Authentication
I am trying to call a webservice from Grails. Unfortunately it is an
internal app that does not expose the WSDL (e.g., ..?WSDL) so I can't
use GroovyWS. I wanted to use Axis2 (which is better supported and has
more examples) but the service is using RPC encoded. So I am down to
Axis WSDL2Java.
I can easily generate the client, but I need to pass userid/ password
for simple authentication. Not only are the examples fairly sparse for
Axis but none of them set a userid and password. For example, here is an
example from the Axis user's guide:
file:///C:/axis-1_4/docs/user-guide.html#soapmon
public class Tester
{
public static void main(String [] args) throws Exception {
// 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);
}}
Any suggestions or simple examples of calling the generated client.
Ray