View Javadoc

1   /*
2    *  soapUI, copyright (C) 2004-2010 eviware.com 
3    *
4    *  soapUI is free software; you can redistribute it and/or modify it under the 
5    *  terms of version 2.1 of the GNU Lesser General Public License as published by 
6    *  the Free Software Foundation.
7    *
8    *  soapUI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without 
9    *  even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
10   *  See the GNU Lesser General Public License for more details at gnu.org.
11   */
12  
13  package com.eviware.soapui.impl.wsdl.panels.mockoperation;
14  
15  import java.util.Vector;
16  
17  import com.eviware.soapui.impl.wsdl.WsdlOperation;
18  import com.eviware.soapui.impl.wsdl.mock.WsdlMockOperation;
19  import com.eviware.soapui.impl.wsdl.mock.WsdlMockRequest;
20  import com.eviware.soapui.impl.wsdl.submit.AbstractWsdlMessageExchange;
21  import com.eviware.soapui.model.iface.Attachment;
22  import com.eviware.soapui.support.types.StringToStringMap;
23  
24  public class WsdlMockRequestMessageExchange extends AbstractWsdlMessageExchange<WsdlMockOperation>
25  {
26  	private final WsdlMockRequest request;
27  
28  	public WsdlMockRequestMessageExchange( WsdlMockRequest request, WsdlMockOperation mockOperation )
29  	{
30  		super( mockOperation );
31  		this.request = request;
32  	}
33  
34  	public String getEndpoint()
35  	{
36  		return request.getHttpRequest().getRequestURI();
37  	}
38  
39  	@Override
40  	public WsdlOperation getOperation()
41  	{
42  		return getModelItem().getOperation();
43  	}
44  
45  	public Vector<?> getRequestWssResult()
46  	{
47  		return null;
48  	}
49  
50  	public Vector<?> getResponseWssResult()
51  	{
52  		return null;
53  	}
54  
55  	public Attachment[] getRequestAttachments()
56  	{
57  		return request.getRequestAttachments();
58  	}
59  
60  	public String getRequestContent()
61  	{
62  		return request.getRequestContent();
63  	}
64  
65  	public StringToStringMap getRequestHeaders()
66  	{
67  		return request.getRequestHeaders();
68  	}
69  
70  	public Attachment[] getResponseAttachments()
71  	{
72  		return null;
73  	}
74  
75  	public String getResponseContent()
76  	{
77  		return null;
78  	}
79  
80  	public StringToStringMap getResponseHeaders()
81  	{
82  		return null;
83  	}
84  
85  	public long getTimeTaken()
86  	{
87  		return 0;
88  	}
89  
90  	public long getTimestamp()
91  	{
92  		return 0;
93  	}
94  
95  	public boolean isDiscarded()
96  	{
97  		return false;
98  	}
99  
100 	public int getResponseStatusCode()
101 	{
102 		return 0;
103 	}
104 
105 	public String getResponseContentType()
106 	{
107 		return null;
108 	}
109 }