You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "Gries, Matthias" <m....@t-online.net> on 2004/07/12 09:36:31 UTC
Axis client with https
Hi all,
allthaugh I've found some threads regarding my topic in the mailing list
this still seems to be a little bit unclear for me.
I've generated my client stubs via WSDL2JAVA. Using http my axis client
using these stubs works fine. But what do I have to consider if I'd have
to use https? Do I have to generate the stubs again, now with a new wsdl
which points to a https-endpoint-url? Or do I have to modify my client
code with statements like these:
System.setProperty("java.protocol.handler.pkgs",
"com.sun.net.ssl.internal.www.protocol");
System.setProperty("javax.net.ssl.trustStore", certificate);
Security.addProvider(new Provider());
By the way, I'm using JDK 1.3.
My client code (without specific https parts and just a short
extraction) until now looks like:
try
{
Booking service = new BookingLocator();
BookingPort port;
if ((endpoint != null) && !endpoint.trim().equalsIgnoreCase(""))
{
URL newEndpoint = new URL(endpoint);
port = service.getBookingPort(newEndpoint);
}
else
{
port = service.getBookingPort();
}
// here we're doing the webservice call
result = port.book(myParam1, myParam2,...);
}
Thanks and regards
Matthias