2016-11-28 30 views
0

我必須找出WSDL URL來獲取webservice中存在的方法的定義,以便我可以使用數據。如何從給定的SOAP Web服務的請求XML中查找WSDL URL?

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:met="http://schemas.esb.ams.com/meterusagesource"> 
<soapenv:Header/> 
<soapenv:Body> 
<met:processMeterUsage> 
<MeterUsageReqList> 
<userId>JONBREZON</userId> 
<userType>THRD</userType> 
<reportTypeArray> 

<reportFormat>CSV</reportFormat> 
<ESIIDArray> 
<!--1 or more repetitions:--> 
<ESIID>1008901022900060000000</ESIID> 
</ESIIDArray> 
</MeterUsageReqList> 
</met:processMeterUsage> 
</soapenv:Body> 
</soapenv:Envelope> 
+0

你的意思是找到所求的終點?或者找到所有的服務操作? – Rao

+0

@Rao請求的終點 – niran

+0

您需要在哪裏訪問請求的端點?在一個groovy腳本? – Rao

回答

0

假設測試用例有兩個測試步驟,即

  • step1,肥皂請求測試步驟
  • step2,groovy腳本測試步驟;在這裏你需要訪問step1的端點。

這裏是Groovy腳本

//Getting the step1 using its index 0, change if need to suite your environment 
​def step = context.testCase.getTestStepAt(0) 
//Get the endpoint of step1 
def endPoint = step.getPropertyValue('Endpoint')​ 
//log the value 
log.info "End point of step1 is ${endPoint}"