View Javadoc

1   /*
2    *  soapUI, copyright (C) 2004-2007 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 com.eviware.soapui.impl.wsdl.WsdlOperation;
16  import com.eviware.soapui.impl.wsdl.mock.WsdlMockResponse;
17  import com.eviware.soapui.impl.wsdl.submit.WsdlMessageExchange;
18  import com.eviware.soapui.model.iface.Attachment;
19  import com.eviware.soapui.support.types.StringToStringMap;
20  
21  public class WsdlMockResponseMessageExchange extends WsdlMessageExchange
22  {
23  	private final WsdlMockResponse mockResponse;
24  
25  	public WsdlMockResponseMessageExchange( WsdlMockResponse mockResponse )
26  	{
27  		this.mockResponse = mockResponse;
28  	}
29  	
30  	public Attachment[] getRequestAttachments()
31  	{
32  		return null;
33  	}
34  
35  	public String getRequestContent()
36  	{
37  		return null;
38  	}
39  
40  	public StringToStringMap getRequestHeaders()
41  	{
42  		return null;
43  	}
44  
45  	public Attachment[] getResponseAttachments()
46  	{
47  		return mockResponse.getAttachments();
48  	}
49  
50  	public String getResponseContent()
51  	{
52  		return mockResponse.getResponseContent();
53  	}
54  
55  	public StringToStringMap getResponseHeaders()
56  	{
57  		return mockResponse.getResponseHeaders();
58  	}
59  
60  	public WsdlOperation getOperation()
61  	{
62  		return mockResponse.getMockOperation().getOperation();
63  	}
64  
65  	public long getTimeTaken()
66  	{
67  		return 0;
68  	}
69  
70  	public long getTimestamp()
71  	{
72  		return 0;
73  	}
74  }