Hi,

I am a .Net developer and doesn't know much about java stuff. A party is
hosting a WS and I need to consume it from .NET. The sample documentation
they sent me is:

--------------------------------------------- Code Sample
public static void main(String[] args) {
   Service serviceModel= (Service) new
ObjectServiceFactory().create(IRutbe.class);
   IRutbe service;
   try {
      service = (IRutbe) new XFireProxyFactory().create(serviceModel,
"https://10.10.10.10/PBSWebSrv/services/KodRutbe";);
      XFireProxyFactory factory2 =new
XFireProxyFactory(XFireFactory.newInstance().getXFire()); 
      Client client = ((XFireProxy)
Proxy.getInvocationHandler(service)).getClient();
      client.addOutHandler(new DOMOutHandler());
      Properties properties = new Properties();
      configureOutProperties(properties);
      client.addOutHandler(new WSS4JOutHandler(properties));
      KodDTO kod =new KodDTO();
      ArrayList l=new ArrayList();
      l= service.getRutbe();
      kod =(KodDTO) l.get(3);
   } 
   catch (MalformedURLException e){
      e.printStackTrace();
   } 
}
protected String getName()
{
    return "aliaspass";
}
protected static void configureOutProperties(Properties properties)
{
    properties.setProperty(WSHandlerConstants.ACTION,
WSHandlerConstants.USERNAME_TOKEN);
    properties.setProperty(WSHandlerConstants.PASSWORD_TYPE,
WSConstants.PW_DIGEST);
    properties.setProperty(WSHandlerConstants.USER, "serveralias");
    properties.setProperty(WSHandlerConstants.PW_CALLBACK_CLASS,
PasswordHandler.class.getName());
    
}
--------------------------------------------- Code Sample

But I need to write this client in .Net. Should I use WSE 3.0, or any other
solutions?

Regards.

Osman Kor

-- 
View this message in context: 
http://www.nabble.com/Consuming-a-Secure-XFire-WS-%28WSS4J%29-from-.NET-2.0-tf4770794.html#a13646642
Sent from the XFire - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to