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  /***
    22   * WsdlMessageExchange for a WsdlMockResponse, required for validations
    23   *
    24   * @author ole.matzura
    25   */
    26
    27  public class WsdlMockResponseMessageExchange extends WsdlMessageExchange
    28  {
    29  	private final WsdlMockResponse mockResponse;
    30
    31  	public WsdlMockResponseMessageExchange( WsdlMockResponse mockResponse )
    32  	{
    33  		this.mockResponse = mockResponse;
    34  	}
    35
    36  	public Attachment[] getRequestAttachments()
    37  	{
    38  		return null;
    39  	}
    40
    41  	public String getRequestContent()
    42  	{
    43  		return null;
    44  	}
    45
    46  	public StringToStringMap getRequestHeaders()
    47  	{
    48  		return null;
    49  	}
    50
    51  	public Attachment[] getResponseAttachments()
    52  	{
    53  		return mockResponse.getAttachments();
    54  	}
    55
    56  	public String getResponseContent()
    57  	{
    58  		return mockResponse.getResponseContent();
    59  	}
    60
    61  	public StringToStringMap getResponseHeaders()
    62  	{
    63  		return mockResponse.getResponseHeaders();
    64  	}
    65
    66  	public WsdlOperation getOperation()
    67  	{
    68  		return mockResponse.getMockOperation().getOperation();
    69  	}
    70
    71  	public long getTimeTaken()
    72  	{
    73  		return 0;
    74  	}
    75
    76  	public long getTimestamp()
    77  	{
    78  		return 0;
    79  	}
    80  }