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 { HEADER, CONTENT, ATTACHMENT, FAULT };
36
37 public abstract static class ContentPart implements MessagePart
38 {
39 public abstract SchemaType getSchemaType();
40
41 public abstract QName getPartElementName();
42
43 public abstract SchemaGlobalElement getPartElement();
44
45 public PartType getPartType()
46 {
47 return PartType.CONTENT;
48 }
49 }
50
51 public abstract static class AttachmentPart implements MessagePart
52 {
53 public abstract String[] getContentTypes();
54
55 public abstract boolean isAnonymous();
56
57 public PartType getPartType()
58 {
59 return PartType.ATTACHMENT;
60 }
61 }
62
63 public abstract static class HeaderPart extends ContentPart
64 {
65 public abstract SchemaType getSchemaType();
66
67 public PartType getPartType()
68 {
69 return PartType.HEADER;
70 }
71 }
72
73 public abstract static class FaultPart extends ContentPart
74 {
75 public abstract SchemaType getSchemaType();
76
77 public PartType getPartType()
78 {
79 return PartType.FAULT;
80 }
81
82 public abstract Part [] getWsdlParts();
83 }
84 }