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.SchemaGlobalElement;
19 import org.apache.xmlbeans.SchemaType;
20
21 /***
22 * A message part in a Request
23 *
24 * @author ole.matzura
25 */
26
27 public interface MessagePart
28 {
29 public String getName();
30
31 public String getDescription();
32
33 public PartType getPartType();
34
35 public enum PartType
36 {
37 HEADER, CONTENT, ATTACHMENT, FAULT, PARAMETER
38 };
39
40 public abstract static class ContentPart implements MessagePart
41 {
42 public abstract SchemaType getSchemaType();
43
44 public abstract QName getPartElementName();
45
46 public abstract SchemaGlobalElement getPartElement();
47
48 public PartType getPartType()
49 {
50 return PartType.CONTENT;
51 }
52 }
53
54 public abstract static class AttachmentPart implements MessagePart
55 {
56 public abstract String[] getContentTypes();
57
58 public abstract boolean isAnonymous();
59
60 public PartType getPartType()
61 {
62 return PartType.ATTACHMENT;
63 }
64 }
65
66 public abstract static class HeaderPart extends ContentPart
67 {
68 public PartType getPartType()
69 {
70 return PartType.HEADER;
71 }
72 }
73
74 public abstract static class ParameterPart extends ContentPart
75 {
76 public PartType getPartType()
77 {
78 return PartType.PARAMETER;
79 }
80 }
81
82 public abstract static class FaultPart extends ContentPart
83 {
84 public PartType getPartType()
85 {
86 return PartType.FAULT;
87 }
88
89 public abstract Part[] getWsdlParts();
90 }
91 }