1
2
3
4
5
6
7
8
9
10
11
12
13 package com.eviware.soapui.impl.wsdl.panels.teststeps;
14
15 import javax.swing.JPanel;
16
17 import com.eviware.soapui.impl.EmptyPanelBuilder;
18 import com.eviware.soapui.impl.wsdl.WsdlRequest;
19 import com.eviware.soapui.impl.wsdl.teststeps.WsdlTestRequest;
20 import com.eviware.soapui.impl.wsdl.teststeps.WsdlTestRequestStep;
21 import com.eviware.soapui.support.components.JPropertiesTable;
22 import com.eviware.soapui.support.types.StringList;
23
24 /***
25 * PanelBuilder for WsdlTestRequest
26 *
27 * @author Ole.Matzura
28 */
29
30 public class WsdlTestRequestPanelBuilder extends EmptyPanelBuilder<WsdlTestRequestStep>
31 {
32 public WsdlTestRequestPanelBuilder()
33 {
34 }
35
36 public WsdlTestRequestDesktopPanel buildDesktopPanel( WsdlTestRequestStep testStep )
37 {
38 return new WsdlTestRequestDesktopPanel( testStep );
39 }
40
41 public boolean hasDesktopPanel()
42 {
43 return true;
44 }
45
46 public JPanel buildOverviewPanel( WsdlTestRequestStep testStep )
47 {
48 WsdlTestRequest request = testStep.getTestRequest();
49 JPropertiesTable<WsdlTestRequest> table = new JPropertiesTable<WsdlTestRequest>( "TestRequest Properties" );
50
51
52 table.addProperty( "Name", "name", true );
53 table.addProperty( "Description", "description", true );
54 table.addProperty( "Message Size", "contentLength", false );
55 table.addProperty( "Encoding", "encoding", new String[] { null, "UTF-8", "iso-8859-1" } );
56 table.addProperty( "Endpoint", "endpoint", request.getInterface().getEndpoints() );
57 table.addProperty( "Bind Address", "bindAddress", true );
58 table.addProperty( "Follow Redirects", "followRedirects", JPropertiesTable.BOOLEAN_OPTIONS );
59
60 table.addProperty( "Interface", "interfaceName" );
61 table.addProperty( "Operation", "operationName" );
62
63
64 table.addProperty( "Username", "username", true );
65 table.addProperty( "Password", "password", true );
66 table.addProperty( "Domain", "domain", true );
67 table.addProperty( "WSS-Password Type", "wssPasswordType", new String[] { WsdlRequest.PW_TYPE_NONE,
68 WsdlRequest.PW_TYPE_TEXT, WsdlRequest.PW_TYPE_DIGEST } );
69 table.addProperty( "WSS TimeToLive", "wssTimeToLive", true );
70
71 StringList keystores = new StringList( request.getOperation().getInterface().getProject().getWssContainer()
72 .getCryptoNames() );
73 keystores.add( 0, null );
74 table.addProperty( "SSL Keystore", "sslKeystore", keystores.toStringArray() );
75
76 table.addProperty( "Skip SOAP Action", "skipSoapAction", JPropertiesTable.BOOLEAN_OPTIONS );
77
78
79 table.addProperty( "Enable MTOM", "mtomEnabled", JPropertiesTable.BOOLEAN_OPTIONS );
80 table.addProperty( "Force MTOM", "forceMtom", JPropertiesTable.BOOLEAN_OPTIONS );
81 table.addProperty( "Inline Response Attachments", "inlineResponseAttachments", JPropertiesTable.BOOLEAN_OPTIONS );
82 table.addProperty( "Expand MTOM Attachments", "expandMtomResponseAttachments", JPropertiesTable.BOOLEAN_OPTIONS );
83 table.addProperty( "Disable multiparts", "multipartEnabled", JPropertiesTable.BOOLEAN_OPTIONS );
84 table.addProperty( "Encode Attachments", "encodeAttachments", JPropertiesTable.BOOLEAN_OPTIONS );
85
86
87 table.addProperty( "Enable Inline Files", "inlineFilesEnabled", JPropertiesTable.BOOLEAN_OPTIONS )
88 .setDescription( "Enables inline file references in elements with binary content; file:<path>" );
89 table.addProperty( "Strip whitespaces", "stripWhitespaces", JPropertiesTable.BOOLEAN_OPTIONS );
90 table.addProperty( "Remove Empty Content", "removeEmptyContent", JPropertiesTable.BOOLEAN_OPTIONS );
91 table.addProperty( "Entitize Properties", "entitizeProperties", JPropertiesTable.BOOLEAN_OPTIONS );
92
93
94 table.addProperty( "Pretty Print", "prettyPrint", JPropertiesTable.BOOLEAN_OPTIONS );
95 table.addProperty( "Dump File", "dumpFile", true ).setDescription( "Dumps response message to specified file" );
96 table.addProperty( "Max Size", "maxSize", true ).setDescription( "The maximum number of bytes to receive" );
97
98 table.addProperty( "WS-Addressing", "wsAddressing", JPropertiesTable.BOOLEAN_OPTIONS );
99
100 table.setPropertyObject( request );
101
102 return table;
103 }
104
105 public boolean hasOverviewPanel()
106 {
107 return true;
108 }
109 }