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.mock.WsdlMockResponse;
21  import com.eviware.soapui.support.components.SimpleBindingForm;
22  import com.eviware.soapui.support.editor.xml.XmlInspector;
23  
24  public class WsdlMockresponseWsaInspector extends AbstractWsaInspector implements XmlInspector, PropertyChangeListener
25  {
26  	private final WsdlMockResponse response;
27  
28  	public WsdlMockresponseWsaInspector( WsdlMockResponse response )
29  	{
30  		super( response );
31  		this.response = response;
32  	}
33  
34  	public void propertyChange(PropertyChangeEvent arg0)
35  	{
36  		// TODO Auto-generated method stub
37  		
38  	}
39  
40  	public void buildContent(SimpleBindingForm form)
41  	{
42  		form.addSpace( 5 );
43  		form.appendCheckBox("wsaEnabled", "Enable WS-A addressing", "Enable/Disable WS-A addressing");
44  		form.addSpace( 5 );
45  		//add mustUnderstand drop down list
46  		form.appendComboBox( "mustUnderstand", "Must understand", new String[] {MustUnderstandTypeConfig.NONE.toString(), 
47  				MustUnderstandTypeConfig.TRUE.toString(), MustUnderstandTypeConfig.FALSE.toString()},
48  			"The  property for controlling use of the mustUnderstand attribute" );
49  		
50  		form.appendComboBox( "version", "WS-A Version", new String[] {WsaVersionTypeConfig.X_200508.toString(), WsaVersionTypeConfig.X_200408.toString()},
51  			"The  property for managing WS-A version" );
52  		
53  		form.appendTextField( "action", "Action", "The action related to a message, will be generated if left empty and ws-a settings 'use default action...' checked " );
54  		form.appendTextField( "to", "To", "The destination endpoint reference, will be set to request replyTo if left empty" );
55  		form.appendTextField( "relatesTo", "Relates to", "The endpoint reference Mock Response relates to, will be set to 'unspecified' if left empty and ws-a settings 'use default...' checked  " );
56  		form.appendTextField( "relationshipType", "Relationship type", "Relationship type, will be set to 'reply' if left empty and ws-a settings 'use default...' checked  " );
57  		form.addSpace( 10 );
58  		form.appendTextField( "from", "From", "The source endpoint reference" );
59  		form.appendTextField( "faultTo", "Fault to", "The fault endpoint reference" );
60  		form.appendTextField( "replyTo", "Reply to", "The reply endpoint reference" );
61  		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 " );
62  		form.addSpace( 5 );
63  	}
64  }