View Javadoc

1   /*
2    *  soapUI, copyright (C) 2004-2008 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.support.editor.inspectors.wsa;
14  
15  import java.beans.PropertyChangeEvent;
16  import java.beans.PropertyChangeListener;
17  
18  import com.eviware.soapui.config.MustUnderstandTypeConfig;
19  import com.eviware.soapui.config.WsaVersionTypeConfig;
20  import com.eviware.soapui.impl.wsdl.WsdlRequest;
21  import com.eviware.soapui.support.components.SimpleBindingForm;
22  import com.eviware.soapui.support.editor.xml.XmlInspector;
23  
24  public class WsdlRequestWsaInspector extends AbstractWsaInspector implements XmlInspector, PropertyChangeListener
25  {
26  	private final WsdlRequest request;
27  
28  	public WsdlRequestWsaInspector( WsdlRequest request )
29  	{
30  		super( request );
31  		this.request = request;
32  	}
33  
34  	public void propertyChange(PropertyChangeEvent arg0)
35  	{
36  	}
37  
38  	public void buildContent(SimpleBindingForm form)
39  	{
40  		form.addSpace( 5 );
41  		form.appendCheckBox("wsaEnabled", "Enable WS-A addressing", "Enable/Disable WS-A addressing");
42  		form.addSpace( 5 );
43  		//add mustUnderstand drop down list
44  		form.appendComboBox( "mustUnderstand", "Must understand", new String[] {MustUnderstandTypeConfig.NONE.toString(), 
45  				MustUnderstandTypeConfig.TRUE.toString(), MustUnderstandTypeConfig.FALSE.toString()},
46  			"The  property for controlling use of the mustUnderstand attribute" );
47  		
48  		form.appendComboBox( "version", "WS-A Version", new String[] {WsaVersionTypeConfig.X_200508.toString(), WsaVersionTypeConfig.X_200408.toString()},
49  			"The  property for managing WS-A version" );
50  		
51  		form.appendTextField( "action", "Action", "The action related to a message, will be generated if left empty and ws-a settings 'use default action...' checked " );
52  		form.appendTextField( "to", "To", "The destination endpoint reference, will be generated if left empty" );
53  		form.appendTextField( "replyTo", "Reply to", "The reply endpoint reference, will be generated if left empty" );
54  		form.appendTextField( "messageID", "MessageID", " The ID of a message that can be used to uniquely identify a message, will be generated if left empty and ws-a settings 'generate message id' checked " );
55  		form.addSpace( 10 );
56  		form.appendTextField( "from", "From", "The source endpoint reference" );
57  		form.appendTextField( "faultTo", "Fault to", "The fault endpoint reference" );
58  		form.appendTextField( "relatesTo", "Relates to", "The endpoint reference request relates to" );
59  		form.appendTextField( "relationshipType", "Relationship type", "Relationship type" );
60  		form.addSpace( 5 );
61  	}
62  }