Ignore:
Timestamp:
07/29/14 10:29:27 (10 years ago)
Author:
sherbold
Message:
  • added possibility to map paths to logical service names to HTTPLogParser
  • extended SOAPEventType with serviceName attribute
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/autoquest-plugin-http/src/main/java/de/ugoe/cs/autoquest/plugin/http/eventcore/SOAPEventType.java

    r1600 r1622  
    1717import java.net.MalformedURLException; 
    1818import java.net.URL; 
     19import java.util.Properties; 
    1920import java.util.logging.Level; 
    2021 
     
    6465    /** 
    6566     * <p> 
     67     * the name of the service; this is either the path or, if a path map is available 
     68     */ 
     69    private String serviceName; 
     70     
     71    /** 
     72     * <p> 
    6673     * the human readable name of this event type 
    6774     * </p> 
     
    7885     * @param soapRequest  the already extracted SOAP request 
    7986     * @param soapResponse the already extracted SOAP response 
    80      */ 
    81     public SOAPEventType(HttpExchange exchange, SOAPMessage soapRequest, SOAPMessage soapResponse) { 
     87     * @param urlNameMap   used to map paths of servives to logical names 
     88     */ 
     89    public SOAPEventType(HttpExchange exchange, SOAPMessage soapRequest, SOAPMessage soapResponse, Properties urlNameMap) { 
    8290        super(exchange); 
    8391        this.soapRequest = soapRequest; 
     
    102110        if (path != null) { 
    103111            nameBuffer.append("("); 
    104             nameBuffer.append(path); 
    105             somethingAdded = true; 
     112            if( urlNameMap==null ) { 
     113                serviceName = path; 
     114            } else { 
     115                String value = urlNameMap.getProperty(path); 
     116                if( value!=null ) { 
     117                    serviceName = value; 
     118                } else { 
     119                    serviceName = path; 
     120                } 
     121            } 
     122            nameBuffer.append(serviceName); 
     123            somethingAdded = true; 
     124        } else { 
     125            serviceName = "NA"; 
    106126        } 
    107127         
     
    149169    public String getCalledMethod() { 
    150170        return calledMethod; 
     171    } 
     172     
     173    /** 
     174     * <p> 
     175     * the name of the service called in this request 
     176     * </p> 
     177     * 
     178     * @return the name of the service called in this request 
     179     */ 
     180    public String getServiceName() { 
     181        return serviceName; 
    151182    } 
    152183 
Note: See TracChangeset for help on using the changeset viewer.