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 Pratiksha Powar <pr...@onmobile.com> on 2008/02/05 11:57:21 UTC

Re: FW: Consuming a .NET Windows Integrated Security protected web service

Yes it works.

On Tue, 2008-02-05 at 12:53 +0200, Asaf Lahav wrote:
> Did anyone get my email? (If you did please reply to it… I'm not sure
> my news group registration works)
> 
>  
> 
> From: Asaf Lahav [mailto:asaf.lahav@gmail.com] 
> Sent: Monday, February 04, 2008 8:26 PM
> To: 'axis-user@ws.apache.org'
> Subject: Consuming a .NET Windows Integrated Security protected web
> service
> 
> 
>  
> 
> Hello everybody,
> 
> I need your help in consuming a .NET Windows Integrated Security
> protected web service.
> 
> I followed the instructions on the following link:
> http://people.etango.com/~markm/archives/2005/11/21/using_apache_axis_with_integrated_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
> 
>