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 Asaf Lahav <as...@gmail.com> on 2008/02/06 09:57:10 UTC
Java Axis Client for a .NET Windows Integrated Security protected web service
Hello everybody,
I'm trying to build a.NET Windows Integrated Security protected web service
axis based client.
I followed the instructions on the following link:
http://people.etango.com/~markm/archives/2005/11/21/using_apache_axis_with_i
ntegrated_windows_security.html
And I'm still unable to consume the WS.
This is the code I'm using:
import org.apache.axis.EngineConfiguration;
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import org.apache.axis.configuration.FileProvider;
public class Test1 {
public static void main(String[] args) {
try {
EngineConfiguration config = new FileProvider(Test1.class
.getResourceAsStream("AxisClientDeployment.wsdd"));
try {
String endpoint =
"http://MyServer/wsApp/WebService.asmx";
Service service = new Service(config);
Call call = (Call) service.createCall();
call.setSOAPActionURI("http://tempuri.org/MyOperation1");
call.setUsername("MyDomain\\MyUser");
call.setPassword("MyPassword123456");
call.setTargetEndpointAddress(new
java.net.URL(endpoint));
call.setOperationName(new
QName("http://tempuri.org/",
" MyOperation1"));
Object ret = call.invoke(new Object[] {
"app","usr","ctxt" });
System.out.println("Response'" + ret + "'");
} catch (Exception e) {
e.printStackTrace();
}
} catch (Exception e) {
}
}
}
Any help would be highly appreciated.
Best,
Asaf