1
2
3
4
5
6
7
8
9
10
11
12
13 package com.eviware.soapui.model.iface;
14
15 import javax.wsdl.Part;
16 import javax.xml.namespace.QName;
17
18 import org.apache.xmlbeans.SchemaType;
19
20 /***
21 * A message part in a Request
22 *
23 * @author ole.matzura
24 */
25
26 public interface MessagePart
27 {
28 public String getName();
29
30 public String getDescription();
31
32 public PartType getPartType();
33
34 public enum PartType { HEADER, CONTENT, ATTACHMENT, FAULT };
35
36 public abstract static class ContentPart implements MessagePart
37 {
38 public abstract SchemaType getSchemaType();
39
40 public abstract QName getPartElement();
41
42 public PartType getPartType()
43 {
44 return PartType.CONTENT;
45 }
46 }
47
48 public abstract static class AttachmentPart implements MessagePart
49 {
50 public abstract String[] getContentTypes();
51
52 public abstract boolean isAnonymous();
53
54 public PartType getPartType()
55 {
56 return PartType.ATTACHMENT;
57 }
58 }
59
60 public abstract static class HeaderPart extends ContentPart
61 {
62 public abstract SchemaType getSchemaType();
63
64 public PartType getPartType()
65 {
66 return PartType.HEADER;
67 }
68 }
69
70 public abstract static class FaultPart extends ContentPart
71 {
72 public abstract SchemaType getSchemaType();
73
74 public PartType getPartType()
75 {
76 return PartType.FAULT;
77 }
78
79 public abstract Part [] getWsdlParts();
80 }
81 }