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