View Javadoc

1   /*
2    *  soapUI, copyright (C) 2004-2010 eviware.com 
3    *
4    *  soapUI is free software; you can redistribute it and/or modify it under the 
5    *  terms of version 2.1 of the GNU Lesser General Public License as published by 
6    *  the Free Software Foundation.
7    *
8    *  soapUI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without 
9    *  even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
10   *  See the GNU Lesser General Public License for more details at gnu.org.
11   */
12  
13  package com.eviware.soapui.impl.wsdl.support.soap;
14  
15  import java.text.Collator;
16  import java.util.Comparator;
17  
18  import javax.wsdl.Binding;
19  import javax.wsdl.BindingOperation;
20  import javax.wsdl.Definition;
21  
22  import com.eviware.soapui.impl.wsdl.WsdlInterface;
23  import com.eviware.soapui.impl.wsdl.support.BindingImporter;
24  import com.eviware.soapui.impl.wsdl.support.policy.PolicyUtils;
25  import com.eviware.soapui.impl.wsdl.support.wsdl.WsdlUtils;
26  
27  public abstract class AbstractSoapBindingImporter implements BindingImporter
28  {
29  
30  	protected static final class BindingOperationComparator implements Comparator<BindingOperation>
31  	{
32  		public int compare( BindingOperation o1, BindingOperation o2 )
33  		{
34  			return Collator.getInstance().compare( o1.getOperation().getName(), o2.getOperation().getName() );
35  		}
36  	}
37  
38  	protected void initWsAddressing( Binding binding, WsdlInterface iface, Definition def ) throws Exception
39  	{
40  		iface.setWsaVersion( WsdlUtils.getUsingAddressing( binding ) );
41  		// if (iface.getWsaVersion().equals(WsaVersionTypeConfig.NONE.toString()))
42  		// {
43  		iface.processPolicy( PolicyUtils.getAttachedPolicy( binding, def ) );
44  		// }
45  	}
46  
47  	public AbstractSoapBindingImporter()
48  	{
49  		super();
50  	}
51  
52  }