Tuesday, March 25, 2014

Create Proxy Service for secure web service call using Mule ESB

Mule is open source Enterprise Service Bus. You can create proxy service of a web-service easily with mule. You can transform request and response payload using Mule XSLT transformation.

Following figure is showing diagram of Mule proxy service and XSLT transformation.



Below is configuration XML.

 
  
   
  
  
   
  

 

 
  
  


  
  

  

  

   
    
     
     
     
     
     
    
   
   
    
   
   
    
   
  

  


  



  
   
    
     

    
   
   
    
     
    
   
  

 

To set password following code snippet is used for password callback
package lr.mule.security;

import java.io.IOException;

import javax.security.auth.callback.Callback;
import javax.security.auth.callback.CallbackHandler;
import javax.security.auth.callback.UnsupportedCallbackException;

import org.apache.ws.security.WSPasswordCallback;

public class PasswordCallback implements CallbackHandler
{
    public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException
    {
        WSPasswordCallback pc = (WSPasswordCallback) callbacks[0];

       
         
            pc.setPassword("password");
       
       
    }
}

Do you like this post? Please link back to this article by copying one of the codes below.

URL: HTML link code: BB (forum) link code:

2 comments:


  1. I am really enjoying reading your well written articles. It looks like you spend a lot of effort and time on your blog. I have bookmarked it and I am looking forward to reading new articles. Keep up the good work..

    Mulesoft online training india

    ReplyDelete
  2. This Blog Provides Very Useful and Important Information. I just Want to share this blog with my friends and family members. Mulesoft Certification Training

    ReplyDelete