Coverage Report - org.mule.module.cxf.builder.SimpleClientMessageProcessorBuilder
 
Classes in this File Line Coverage Branch Coverage Complexity
SimpleClientMessageProcessorBuilder
0%
0/14
0%
0/6
0
 
 1  
 /*
 2  
  * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
 3  
  * The software in this package is published under the terms of the CPAL v1.0
 4  
  * license, a copy of which has been included with this distribution in the
 5  
  * LICENSE.txt file.
 6  
  */
 7  
 package org.mule.module.cxf.builder;
 8  
 
 9  
 import org.mule.api.lifecycle.CreateException;
 10  
 import org.mule.module.cxf.support.CxfUtils;
 11  
 
 12  
 import org.apache.cxf.aegis.databinding.AegisDatabinding;
 13  
 import org.apache.cxf.endpoint.Client;
 14  
 import org.apache.cxf.frontend.ClientProxy;
 15  
 import org.apache.cxf.frontend.ClientProxyFactoryBean;
 16  
 
 17  0
 public class SimpleClientMessageProcessorBuilder extends AbstractClientMessageProcessorBuilder
 18  
 {
 19  
     @Override
 20  
     protected Client createClient() throws CreateException, Exception
 21  
     {
 22  0
         ClientProxyFactoryBean cpf = new ClientProxyFactoryBean();
 23  0
         cpf.setServiceClass(serviceClass);
 24  0
         if (databinding == null) 
 25  
         {
 26  0
             cpf.setDataBinding(new AegisDatabinding());
 27  
         }
 28  
         else 
 29  
         {
 30  0
             cpf.setDataBinding(databinding);
 31  
         }
 32  0
         cpf.setAddress(getAddress());
 33  0
         cpf.setBus(getBus());
 34  0
         cpf.setProperties(properties);
 35  
 
 36  0
         if (wsdlLocation != null)
 37  
         {
 38  0
             cpf.setWsdlLocation(wsdlLocation);
 39  
         }
 40  
 
 41  
         // If there's a soapVersion defined then the corresponding bindingId will be set
 42  0
         if(soapVersion != null)
 43  
         {
 44  0
             cpf.setBindingId(CxfUtils.getBindingIdForSoapVersion(soapVersion));
 45  
         }
 46  
 
 47  0
         return ClientProxy.getClient(cpf.create());
 48  
     }
 49  
 }