Web service 学习笔记(3):WSDL全面解析(除了Complex type)

20120323最新更新:

主要修改了之前代码的部分不足,比如解析不全,协议支持不完整等,下面贴最新的改进版代码(只附上action部分, 因为把控制台程序整合到了新学的jsp中了呵呵):

package BLL.action.ws;

import java.util.List;
import java.util.Map;
import java.util.Map.Entry;

import javax.wsdl.Definition;
import javax.wsdl.Input;
import javax.wsdl.Message;
import javax.wsdl.Operation;
import javax.wsdl.Output;
import javax.wsdl.Part;
import javax.wsdl.Port;
import javax.wsdl.PortType;
import javax.wsdl.Service;
import javax.wsdl.extensions.http.HTTPAddress;
import javax.wsdl.extensions.soap.SOAPAddress;
import javax.wsdl.extensions.soap12.SOAP12Address;
import javax.wsdl.factory.WSDLFactory;
import javax.wsdl.WSDLException;
import javax.wsdl.xml.WSDLReader;

import com.opensymphony.xwork2.ActionSupport;

import DAL.database.DBHelper;

@SuppressWarnings("unused")
public class RetrieveWSDLAction extends ActionSupport {
	private static final long serialVersionUID = 1L;
	private static final String PROTOCOL_IMPL_PREFIX = "com.ibm.wsdl.extensions";
	public  static final String FAIL_EXIST = "failExist";
	public  static final String FAIL_PROTOCOL = "failProtocol";
	public  static final String NULL = "null";
	
	private String wsdlURI;
	private String infoNull;
	private String infoSuccess;
	private String infoError;
	private String infoFailExist;
	private String infoFailProtocol;
	
	public String getInfoNull() {
		return "Please input a URI.";
	}
	
	public String getInfoSuccess() {
		return "Retrieve success.";
	}

	public String getInfoError() {
		return "Retrieve fail.";
	}
	
	public String getInfoFailExist() {
		return "Retrieve fail. Exist web service, please input another URI.";
	}
	
	public String getInfoFailProtocol() {
		return "Retrieve fail. Protocol retrieve failure.";
	}
	
	public String getWsdlURI() {
		return wsdlURI;
	}

	public void setWsdlURI(String wsdlURI) {
		this.wsdlURI = wsdlURI;
	}
	
	@SuppressWarnings("unchecked")
	public String execute() throws Exception  
    {
		if(wsdlURI == null){
			return NULL;
		}
		try{			
		   WSDLFactory factory = WSDLFactory.newInstance();
		   WSDLReader reader = factory.newWSDLReader();
		   reader.setFeature("javax.wsdl.verbose", true);
		   reader.setFeature("javax.wsdl.importDocuments", true);
		   Definition def = reader.readWSDL(wsdlURI);
		   
		   /**Service**/
		   Map<String, Service> services = def.getServices();
		   Map<String, Port> ports;
		   Service tempService;
		   Port tempPort;
		   HTTPAddress tempHTTPAddr;
		   SOAPAddress tempSOAPAddr;
		   SOAP12Address tempSOAP12Addr;
		   String tempProtocolImpl;
		   DBHelper DBconn = new DBHelper();
		   String serviceName, serviceURI = null, serviceDoc = null, sql;
		   int serviceId = 0;
		   
		   for (Map.Entry<String, Service> entryService : services.entrySet()) {
			   tempService = (Service)entryService.getValue();
			   ports = tempService.getPorts();
			   serviceName = tempService.getQName().getLocalPart();//Service name
			   sql = "select * from service where service_name = '" + serviceName + "'";
			   
			   if(DBconn.getResultSetNum(sql) <= 0)//If not exist
			   {
				   //Service invoke URI
				   for (Map.Entry<String, Port> entryPort : ports.entrySet()) {
					   tempPort = (Port)entryPort.getValue();
					   tempProtocolImpl = tempPort.getExtensibilityElements().get(0).getClass().getName(); 
					   //Access protocol type should be complete, only 3 types here: http, soap, soap1.2;
					   if(tempProtocolImpl == PROTOCOL_IMPL_PREFIX + ".soap.SOAPAddressImpl"){
						   tempSOAPAddr = (SOAPAddress) (tempPort.getExtensibilityElements().get(0));
						   serviceURI = tempSOAPAddr.getLocationURI();
					   }else if(tempProtocolImpl == PROTOCOL_IMPL_PREFIX + ".http.HTTPAddressImpl"){
						   tempHTTPAddr = (HTTPAddress) (tempPort.getExtensibilityElements().get(0));
						   serviceURI = tempHTTPAddr.getLocationURI();
					   }else if(tempProtocolImpl == PROTOCOL_IMPL_PREFIX + ".soap12.SOAP12AddressImpl"){
						   tempSOAP12Addr = (SOAP12Address) (tempPort.getExtensibilityElements().get(0));
						   serviceURI = tempSOAP12Addr.getLocationURI();
					   }else{
						   return FAIL_PROTOCOL;
					   }
				   }
				   
				   //Service documentation
				   if(tempService.getDocumentationElement() != null){
					   serviceDoc = tempService.getDocumentationElement().getTextContent();
				   }
				   
				   sql = "insert into service (service_name, service_documentation, service_URI, service_wsdl_URI) values ('" + serviceName + "','" + serviceDoc + "','" + serviceURI + "','" + wsdlURI + "')";
				   DBconn.update(sql);
				   serviceId = DBconn.getId("service", "id");
			   }else{
				   return FAIL_EXIST;
			   }
		   }	   
		   
		   /**PortType**/
		   Map<String, PortType> portTypes = def.getPortTypes();
		   PortType tempPortType;
		   List<Operation> operations;
		   org.w3c.dom.Element tempDocElem;
		   Input tempIn;
		   Output tempOut;
		   Message tempMsg;
		   Map<String, Part> tempParts;
		   Part tempPart;
		   
		   String portName, operationName, operationDoc = null, messageName, partName, partType = null;
		   int portId, operationId, messageId;
		   for (Entry<String, PortType> entryPortType : portTypes.entrySet()) {
			   tempPortType = (PortType)entryPortType.getValue();
			   portName = tempPortType.getQName().getLocalPart();
			   sql = "insert into port (port_name, service_id) values ('" + portName + "','" + serviceId + "')";
			   DBconn.update(sql);
			   portId = DBconn.getId("port", "id");
			   
			   /**Operation**/
			   operations = tempPortType.getOperations();
			   for(int i = 0; i < operations.size(); i ++)
			   {
				   operationName = operations.get(i).getName();//Operation name
				   if(operations.get(i).getDocumentationElement() != null){//Operation documentation
					   tempDocElem = operations.get(i).getDocumentationElement();
					   operationDoc = tempDocElem.getTextContent();
				   }
				   sql = "insert into operation (operation_name, operation_documentation, port_id) values " +
				   		"('" + operationName + "','" + operationDoc + "','" + portId + "')";
				   DBconn.update(sql);
				   operationId = DBconn.getId("operation", "id");//Operation id
				   
				   /**Message**/
				   tempIn = operations.get(i).getInput();//Input message 
				   messageName = tempIn.getMessage().getQName().getLocalPart();//Input message name
				   sql = "insert into message (message_name, message_IO, operation_id) values " +
			   			"('" + messageName + "', '0','" + operationId + "')";
				   DBconn.update(sql);
				   messageId = DBconn.getId("message", "id");					   
				   tempMsg = def.getMessage(tempIn.getMessage().getQName());
				   tempParts = tempMsg.getParts();
				   for(Entry<String, Part> entryPart : tempParts.entrySet())
				   {
					   tempPart = (Part)entryPart.getValue();
					   partName = tempPart.getName();//Parameter name
					   if(tempPart.getElementName() != null)//Complex type
					   {
						   partType = tempPart.getElementName().getLocalPart();
					   }else if(tempPart.getTypeName() != null)//Simple type 
					   {
						   partType = tempPart.getTypeName().getLocalPart();
					   }
					   sql = "insert into parameter (parameter_name, parameter_type, message_id) values " +
				   		"('" + partName +"','" + partType + "','" + messageId + "')";
					   DBconn.update(sql);
				   }
				   
				   tempOut = operations.get(i).getOutput();//Output message
				   messageName = tempOut.getMessage().getQName().getLocalPart();//Output message name
				   sql = "insert into message (message_name, message_IO, operation_id) values " +
			   		"('" + messageName + "','1','" + operationId + "')";
				   DBconn.update(sql);
				   operationId = DBconn.getId("message", "id");	
				   tempMsg = def.getMessage(tempOut.getMessage().getQName());
				   tempParts = tempMsg.getParts();
				   for(Entry<String, Part> entryPart : tempParts.entrySet())
				   {
					   tempPart = (Part)entryPart.getValue();
					   partName = tempPart.getName();//Parameter name
					   if(tempPart.getElementName() != null)//Complex type
					   {
						   partType = tempPart.getElementName().getLocalPart();
					   }else if(tempPart.getTypeName() != null)//Simple type 
					   {
						   partType = tempPart.getTypeName().getLocalPart();
					   }
					   sql = "insert into parameter (parameter_name, parameter_type, message_id) values " +
				   		"('" + partName +"','" + partType + "','" + messageId + "')";
					   DBconn.update(sql);
				   }
			   }
		   }
		}
		catch(WSDLException e){
			e.printStackTrace();
			return ERROR;
		} 
		return SUCCESS;
    }
}



-------------------------------------------------------------------------------------------------------------------------------------

前提: 当然是需要下载好wsdl4j的jar文件并引入Lib

1. 新建名为WSDL4J的Java project, 引入wsdl4j的类库, 并新建名为NavigatingWSDL的java类;

2. 首先,我们要知道wsdl4j的库中,读取wsdl文档的核心是接口WSDLReader, 要顺利解析wsdl文档必须用其实例方可。而继续查看API文档, 我们在类WSDLFactory下发现了这样的描述:This abstract class defines a factory API that enables applications to obtain a WSDLFactory capable of producing new Definitions, new WSDLReaders, and new WSDLWriters. Some ideas used here have been shamelessly copied from the wonderful JAXP and Xerces work. 哈哈,于是我们知道了:必须要创建WSDLFactory的实例,方可调用其newWSDLReader方法来生成WSDLReader的实例进行文档解析。而Definition接口则对应了wsdl文档中的<wsdl:definition>节点,略去了以繁杂的DOM方式解析的过程。

WSDLFactory factory = WSDLFactory.newInstance();
WSDLReader reader = factory.newWSDLReader();
reader.setFeature("javax.wsdl.verbose", true);
reader.setFeature("javax.wsdl.importDocuments", true);
Definition def = reader.readWSDL("http://www.xignite.com/xmoneymarkets.asmx?WSDL");

3.然后,首先开始解析的是Service信息,包括Service的名称和Service的调用URI。 查看API文档中的 Definition接口,知道了调用 getService方法可以获得service的表集合,由此我们可以循环遍历每一个service节点,获得其中的信息了。

/**Service**/
Map<String, Service> services = def.getServices();
Map<String, Port> ports;
Service tempService;
Port tempPort;
HTTPAddress tempHTTPAddr;
SOAPAddress tempSOAPAddr;
		   
for (Map.Entry<String, Service> entryService : services.entrySet()) {
    tempService = (Service)entryService.getValue();
	ports = tempService.getPorts();
	System.out.println("[Service Name]:" + tempService.getQName().getLocalPart());
	for (Map.Entry<String, Port> entryPort : ports.entrySet()) {//Should be modified
	tempPort = (Port)entryPort.getValue();
		if(tempPort.getExtensibilityElements().get(0).getClass().getName() == "SOAPAddress")
		{
		    tempSOAPAddr = (SOAPAddress) (tempPort.getExtensibilityElements().get(0));
			System.out.println("[Service Location URI]:" + tempSOAPAddr.getLocationURI());
		}else if(tempPort.getExtensibilityElements().get(0).getClass().getName() == "HTTPAddress")
		{
		    tempHTTPAddr = (HTTPAddress) (tempPort.getExtensibilityElements().get(0));
		    System.out.println("[Service Location URI]:" + tempHTTPAddr.getLocationURI());
		}			   
}
}


4. 接下来的解析PortType, Operation, Input, Output, 在API文档中都有详细说明,在下就只贴代码了。

/**PortType**/
Map<String, PortType> portTypes = def.getPortTypes();
PortType tempPortType;
List<Operation> operations;
org.w3c.dom.Element tempDocElem;
Input tempIn;
Output tempOut;
Message tempMsg;
Map<String, Part> tempParts;
Part tempPart;
		   
for (Entry<String, PortType> entryPortType : portTypes.entrySet()) {
    tempPortType = (PortType)entryPortType.getValue();
	System.out.println("-[PortType Name]:" + tempPortType.getQName().getLocalPart());
			   
	/**Operation**/
	operations = tempPortType.getOperations();
	for(int i = 0; i < operations.size(); i ++)
	{
	    System.out.println("--[Operation Name]:" + operations.get(i).getName());
		tempDocElem = operations.get(i).getDocumentationElement();
		System.out.println("---[Documentation]:" + tempDocElem.getTextContent());
				   
		/**Message**/
		tempIn = operations.get(i).getInput();
		System.out.println("---[Input]:" + tempIn.getMessage().getQName().getLocalPart());
		tempMsg = def.getMessage(tempIn.getMessage().getQName());
		tempParts = tempMsg.getParts();
		for(Entry<String, Part> entryPart : tempParts.entrySet())
		{
		    tempPart = (Part)entryPart.getValue();
			if(tempPart.getElementName() == null)
			{
			    System.out.println("----[Parameter]: Name = " +  tempPart.getName() + ", Type = " + tempPart.getTypeName().getLocalPart());
			}else
			{
			    System.out.println("----[Parameter]: Name = " +  tempPart.getName() + ", Type = " + tempPart.getElementName().getLocalPart());
			}
					   
		}
		tempOut = operations.get(i).getOutput();
		System.out.println("---[Output]:" + tempOut.getMessage().getQName().getLocalPart());
}
			   
}

这样,一个WSDL就基本解析完成了。 有可能有疏漏的地方就是获取URI时根据协议的不同貌似分为Http和 Soap,是否要分情况对待? wsdl中若存在ComplexType怎么办呢? 以后有时间一并解决。

下面附上全部代码:

import javax.wsdl.*;
import javax.wsdl.extensions.*;
import javax.wsdl.extensions.http.HTTPAddress;
import javax.wsdl.extensions.soap.SOAPAddress;
import javax.wsdl.factory.*;
import javax.wsdl.xml.*;
import javax.xml.namespace.QName;
import java.util.*;
import java.util.Map.Entry;

public class NavigatingWSDL 
{
	@SuppressWarnings("unchecked")	
	public static void main(String[]args)
	{
		try
		{
		   WSDLFactory factory = WSDLFactory.newInstance();
		   WSDLReader reader = factory.newWSDLReader();
		   reader.setFeature("javax.wsdl.verbose", true);
		   reader.setFeature("javax.wsdl.importDocuments", true);
		   Definition def = reader.readWSDL("http://www.xignite.com/xmoneymarkets.asmx?WSDL");	//地址写死
		   
		   /**Service**/
		   Map<String, Service> services = def.getServices();
		   Map<String, Port> ports;
		   Service tempService;
		   Port tempPort;
		   HTTPAddress tempHTTPAddr;
		   SOAPAddress tempSOAPAddr;
		   
		   for (Map.Entry<String, Service> entryService : services.entrySet()) {
			   tempService = (Service)entryService.getValue();
			   ports = tempService.getPorts();
			   System.out.println("[Service Name]:" + tempService.getQName().getLocalPart());
			   for (Map.Entry<String, Port> entryPort : ports.entrySet()) {//Should be modified
				   tempPort = (Port)entryPort.getValue();
				   if(tempPort.getExtensibilityElements().get(0).getClass().getName() == "SOAPAddress")
				   {
					   tempSOAPAddr = (SOAPAddress) (tempPort.getExtensibilityElements().get(0));
					   System.out.println("[Service Location URI]:" + tempSOAPAddr.getLocationURI());
				   }else if(tempPort.getExtensibilityElements().get(0).getClass().getName() == "HTTPAddress")
				   {
					   tempHTTPAddr = (HTTPAddress) (tempPort.getExtensibilityElements().get(0));
					   System.out.println("[Service Location URI]:" + tempHTTPAddr.getLocationURI());
				   }
				   
			   }
		   }
		   
		   /**PortType**/
		   Map<String, PortType> portTypes = def.getPortTypes();
		   PortType tempPortType;
		   List<Operation> operations;
		   org.w3c.dom.Element tempDocElem;
		   Input tempIn;
		   Output tempOut;
		   Message tempMsg;
		   Map<String, Part> tempParts;
		   Part tempPart;
		   
		   for (Entry<String, PortType> entryPortType : portTypes.entrySet()) {
			   tempPortType = (PortType)entryPortType.getValue();
			   System.out.println("-[PortType Name]:" + tempPortType.getQName().getLocalPart());
			   
			   /**Operation**/
			   operations = tempPortType.getOperations();
			   for(int i = 0; i < operations.size(); i ++)
			   {
				   System.out.println("--[Operation Name]:" + operations.get(i).getName());
				   tempDocElem = operations.get(i).getDocumentationElement();
				   System.out.println("---[Documentation]:" + tempDocElem.getTextContent());
				   
				   /**Message**/
				   tempIn = operations.get(i).getInput();
				   System.out.println("---[Input]:" + tempIn.getMessage().getQName().getLocalPart());
				   tempMsg = def.getMessage(tempIn.getMessage().getQName());
				   tempParts = tempMsg.getParts();
				   for(Entry<String, Part> entryPart : tempParts.entrySet())
				   {
					   tempPart = (Part)entryPart.getValue();
					   if(tempPart.getElementName() == null)
					   {
						   System.out.println("----[Parameter]: Name = " +  tempPart.getName() + ", Type = " + tempPart.getTypeName().getLocalPart());
					   }else
					   {
						   System.out.println("----[Parameter]: Name = " +  tempPart.getName() + ", Type = " + tempPart.getElementName().getLocalPart());
					   }
					   
				   }
				   tempOut = operations.get(i).getOutput();
				   System.out.println("---[Output]:" + tempOut.getMessage().getQName().getLocalPart());
			   }
			   
		   }

		}
		catch(WSDLException e){
			e.printStackTrace();
		} 
	}
}

以下是控制台输出:

Retrieving document at 'http://www.xignite.com/xmoneymarkets.asmx?WSDL'.
[Service Name]:XigniteMoneyMarkets
-[PortType Name]:XigniteMoneyMarketsHttpGet
--[Operation Name]:ListRates
---[Documentation]:List supported interest rates.
---[Input]:ListRatesHttpGetIn
---[Output]:ListRatesHttpGetOut
----[Parameter]: Name = Body, Element = ArrayOfRateDescription
--[Operation Name]:SearchRates
---[Documentation]:Search rate names and description
---[Input]:SearchRatesHttpGetIn
----[Parameter]: Name = Pattern
---[Output]:SearchRatesHttpGetOut
----[Parameter]: Name = Body, Element = ArrayOfRateDescription
--[Operation Name]:GetForwardRateAgreement
---[Documentation]:Returns a calculated Forward Rate Agreement as of a date
---[Input]:GetForwardRateAgreementHttpGetIn
----[Parameter]: Name = AsOfDate
----[Parameter]: Name = FirstType
----[Parameter]: Name = SecondType
----[Parameter]: Name = Currency
---[Output]:GetForwardRateAgreementHttpGetOut
----[Parameter]: Name = Body, Element = ForwardRateAgreement
--[Operation Name]:GetEuroDollarFRAStrip
---[Documentation]:Returns an IMM EuroDollar Synthetic Forward Rate strip
---[Input]:GetEuroDollarFRAStripHttpGetIn
---[Output]:GetEuroDollarFRAStripHttpGetOut
----[Parameter]: Name = Body, Element = ArrayOfEuroDollarFRA
--[Operation Name]:GetSwaption
---[Documentation]:Returns a Swaption rate
---[Input]:GetSwaptionHttpGetIn
----[Parameter]: Name = FirstType
----[Parameter]: Name = SecondType
----[Parameter]: Name = Currency
---[Output]:GetSwaptionHttpGetOut
----[Parameter]: Name = Body, Element = Swaption
--[Operation Name]:GetSwaptionFamily
---[Documentation]:Returns a Swaption rate Family
---[Input]:GetSwaptionFamilyHttpGetIn
----[Parameter]: Name = Currency
---[Output]:GetSwaptionFamilyHttpGetOut
----[Parameter]: Name = Body, Element = ArrayOfSwaption
--[Operation Name]:GetHistoricalSwaption
---[Documentation]:Returns a Swaption as of a historical date
---[Input]:GetHistoricalSwaptionHttpGetIn
----[Parameter]: Name = AsOfDate
----[Parameter]: Name = FirstType
----[Parameter]: Name = SecondType
----[Parameter]: Name = Currency
---[Output]:GetHistoricalSwaptionHttpGetOut
----[Parameter]: Name = Body, Element = Swaption
--[Operation Name]:GetHistoricalSwaptionFamily
---[Documentation]:Returns a Swaption rate Family
---[Input]:GetHistoricalSwaptionFamilyHttpGetIn
----[Parameter]: Name = AsOfDate
----[Parameter]: Name = Currency
---[Output]:GetHistoricalSwaptionFamilyHttpGetOut
----[Parameter]: Name = Body, Element = ArrayOfSwaption
--[Operation Name]:GetSwapRate
---[Documentation]:Returns a Swap rate
---[Input]:GetSwapRateHttpGetIn
----[Parameter]: Name = Type
----[Parameter]: Name = Currency
---[Output]:GetSwapRateHttpGetOut
----[Parameter]: Name = Body, Element = SwapRate
--[Operation Name]:GetSwapRateFamily
---[Documentation]:Returns a Swap rate Family
---[Input]:GetSwapRateFamilyHttpGetIn
----[Parameter]: Name = Currency
---[Output]:GetSwapRateFamilyHttpGetOut
----[Parameter]: Name = Body, Element = ArrayOfSwapRate
--[Operation Name]:GetHistoricalSwapRate
---[Documentation]:Returns a Swap rate as of a historical date
---[Input]:GetHistoricalSwapRateHttpGetIn
----[Parameter]: Name = AsOfDate
----[Parameter]: Name = Type
----[Parameter]: Name = Currency
---[Output]:GetHistoricalSwapRateHttpGetOut
----[Parameter]: Name = Body, Element = SwapRate
--[Operation Name]:GetHistoricalSwapRateRange
---[Documentation]:Returns a Swap rate as of a historical date
---[Input]:GetHistoricalSwapRateRangeHttpGetIn
----[Parameter]: Name = EndDate
----[Parameter]: Name = StartDate
----[Parameter]: Name = Type
----[Parameter]: Name = Currency
---[Output]:GetHistoricalSwapRateRangeHttpGetOut
----[Parameter]: Name = Body, Element = ArrayOfSwapRate
--[Operation Name]:GetTreasuryRate
---[Documentation]:Returns a real-time Treasury rate
---[Input]:GetTreasuryRateHttpGetIn
----[Parameter]: Name = Type
----[Parameter]: Name = Currency
---[Output]:GetTreasuryRateHttpGetOut
----[Parameter]: Name = Body, Element = InterestRate
--[Operation Name]:GetTreasuryRateFamily
---[Documentation]:Returns a real-time Treasury rate family.
---[Input]:GetTreasuryRateFamilyHttpGetIn
----[Parameter]: Name = Currency
---[Output]:GetTreasuryRateFamilyHttpGetOut
----[Parameter]: Name = Body, Element = ArrayOfInterestRate
-[PortType Name]:XigniteMoneyMarketsHttpPost
--[Operation Name]:ListRates
---[Documentation]:List supported interest rates.
---[Input]:ListRatesHttpPostIn
---[Output]:ListRatesHttpPostOut
----[Parameter]: Name = Body, Element = ArrayOfRateDescription
--[Operation Name]:SearchRates
---[Documentation]:Search rate names and description
---[Input]:SearchRatesHttpPostIn
----[Parameter]: Name = Pattern
---[Output]:SearchRatesHttpPostOut
----[Parameter]: Name = Body, Element = ArrayOfRateDescription
--[Operation Name]:GetForwardRateAgreement
---[Documentation]:Returns a calculated Forward Rate Agreement as of a date
---[Input]:GetForwardRateAgreementHttpPostIn
----[Parameter]: Name = AsOfDate
----[Parameter]: Name = FirstType
----[Parameter]: Name = SecondType
----[Parameter]: Name = Currency
---[Output]:GetForwardRateAgreementHttpPostOut
----[Parameter]: Name = Body, Element = ForwardRateAgreement
--[Operation Name]:GetEuroDollarFRAStrip
---[Documentation]:Returns an IMM EuroDollar Synthetic Forward Rate strip
---[Input]:GetEuroDollarFRAStripHttpPostIn
---[Output]:GetEuroDollarFRAStripHttpPostOut
----[Parameter]: Name = Body, Element = ArrayOfEuroDollarFRA
--[Operation Name]:GetSwaption
---[Documentation]:Returns a Swaption rate
---[Input]:GetSwaptionHttpPostIn
----[Parameter]: Name = FirstType
----[Parameter]: Name = SecondType
----[Parameter]: Name = Currency
---[Output]:GetSwaptionHttpPostOut
----[Parameter]: Name = Body, Element = Swaption
--[Operation Name]:GetSwaptionFamily
---[Documentation]:Returns a Swaption rate Family
---[Input]:GetSwaptionFamilyHttpPostIn
----[Parameter]: Name = Currency
---[Output]:GetSwaptionFamilyHttpPostOut
----[Parameter]: Name = Body, Element = ArrayOfSwaption
--[Operation Name]:GetHistoricalSwaption
---[Documentation]:Returns a Swaption as of a historical date
---[Input]:GetHistoricalSwaptionHttpPostIn
----[Parameter]: Name = AsOfDate
----[Parameter]: Name = FirstType
----[Parameter]: Name = SecondType
----[Parameter]: Name = Currency
---[Output]:GetHistoricalSwaptionHttpPostOut
----[Parameter]: Name = Body, Element = Swaption
--[Operation Name]:GetHistoricalSwaptionFamily
---[Documentation]:Returns a Swaption rate Family
---[Input]:GetHistoricalSwaptionFamilyHttpPostIn
----[Parameter]: Name = AsOfDate
----[Parameter]: Name = Currency
---[Output]:GetHistoricalSwaptionFamilyHttpPostOut
----[Parameter]: Name = Body, Element = ArrayOfSwaption
--[Operation Name]:GetSwapRate
---[Documentation]:Returns a Swap rate
---[Input]:GetSwapRateHttpPostIn
----[Parameter]: Name = Type
----[Parameter]: Name = Currency
---[Output]:GetSwapRateHttpPostOut
----[Parameter]: Name = Body, Element = SwapRate
--[Operation Name]:GetSwapRateFamily
---[Documentation]:Returns a Swap rate Family
---[Input]:GetSwapRateFamilyHttpPostIn
----[Parameter]: Name = Currency
---[Output]:GetSwapRateFamilyHttpPostOut
----[Parameter]: Name = Body, Element = ArrayOfSwapRate
--[Operation Name]:GetHistoricalSwapRate
---[Documentation]:Returns a Swap rate as of a historical date
---[Input]:GetHistoricalSwapRateHttpPostIn
----[Parameter]: Name = AsOfDate
----[Parameter]: Name = Type
----[Parameter]: Name = Currency
---[Output]:GetHistoricalSwapRateHttpPostOut
----[Parameter]: Name = Body, Element = SwapRate
--[Operation Name]:GetHistoricalSwapRateRange
---[Documentation]:Returns a Swap rate as of a historical date
---[Input]:GetHistoricalSwapRateRangeHttpPostIn
----[Parameter]: Name = EndDate
----[Parameter]: Name = StartDate
----[Parameter]: Name = Type
----[Parameter]: Name = Currency
---[Output]:GetHistoricalSwapRateRangeHttpPostOut
----[Parameter]: Name = Body, Element = ArrayOfSwapRate
--[Operation Name]:GetTreasuryRate
---[Documentation]:Returns a real-time Treasury rate
---[Input]:GetTreasuryRateHttpPostIn
----[Parameter]: Name = Type
----[Parameter]: Name = Currency
---[Output]:GetTreasuryRateHttpPostOut
----[Parameter]: Name = Body, Element = InterestRate
--[Operation Name]:GetTreasuryRateFamily
---[Documentation]:Returns a real-time Treasury rate family.
---[Input]:GetTreasuryRateFamilyHttpPostIn
----[Parameter]: Name = Currency
---[Output]:GetTreasuryRateFamilyHttpPostOut
----[Parameter]: Name = Body, Element = ArrayOfInterestRate
-[PortType Name]:XigniteMoneyMarketsSoap
--[Operation Name]:ListRates
---[Documentation]:List supported interest rates.
---[Input]:ListRatesSoapIn
----[Parameter]: Name = parameters, Type = ListRates
---[Output]:ListRatesSoapOut
----[Parameter]: Name = parameters, Element = ListRatesResponse
--[Operation Name]:SearchRates
---[Documentation]:Search rate names and description
---[Input]:SearchRatesSoapIn
----[Parameter]: Name = parameters, Type = SearchRates
---[Output]:SearchRatesSoapOut
----[Parameter]: Name = parameters, Element = SearchRatesResponse
--[Operation Name]:GetForwardRateAgreement
---[Documentation]:Returns a calculated Forward Rate Agreement as of a date
---[Input]:GetForwardRateAgreementSoapIn
----[Parameter]: Name = parameters, Type = GetForwardRateAgreement
---[Output]:GetForwardRateAgreementSoapOut
----[Parameter]: Name = parameters, Element = GetForwardRateAgreementResponse
--[Operation Name]:GetEuroDollarFRAStrip
---[Documentation]:Returns an IMM EuroDollar Synthetic Forward Rate strip
---[Input]:GetEuroDollarFRAStripSoapIn
----[Parameter]: Name = parameters, Type = GetEuroDollarFRAStrip
---[Output]:GetEuroDollarFRAStripSoapOut
----[Parameter]: Name = parameters, Element = GetEuroDollarFRAStripResponse
--[Operation Name]:GetSwaption
---[Documentation]:Returns a Swaption rate
---[Input]:GetSwaptionSoapIn
----[Parameter]: Name = parameters, Type = GetSwaption
---[Output]:GetSwaptionSoapOut
----[Parameter]: Name = parameters, Element = GetSwaptionResponse
--[Operation Name]:GetSwaptionFamily
---[Documentation]:Returns a Swaption rate Family
---[Input]:GetSwaptionFamilySoapIn
----[Parameter]: Name = parameters, Type = GetSwaptionFamily
---[Output]:GetSwaptionFamilySoapOut
----[Parameter]: Name = parameters, Element = GetSwaptionFamilyResponse
--[Operation Name]:GetHistoricalSwaption
---[Documentation]:Returns a Swaption as of a historical date
---[Input]:GetHistoricalSwaptionSoapIn
----[Parameter]: Name = parameters, Type = GetHistoricalSwaption
---[Output]:GetHistoricalSwaptionSoapOut
----[Parameter]: Name = parameters, Element = GetHistoricalSwaptionResponse
--[Operation Name]:GetHistoricalSwaptionFamily
---[Documentation]:Returns a Swaption rate Family
---[Input]:GetHistoricalSwaptionFamilySoapIn
----[Parameter]: Name = parameters, Type = GetHistoricalSwaptionFamily
---[Output]:GetHistoricalSwaptionFamilySoapOut
----[Parameter]: Name = parameters, Element = GetHistoricalSwaptionFamilyResponse
--[Operation Name]:GetSwapRate
---[Documentation]:Returns a Swap rate
---[Input]:GetSwapRateSoapIn
----[Parameter]: Name = parameters, Type = GetSwapRate
---[Output]:GetSwapRateSoapOut
----[Parameter]: Name = parameters, Element = GetSwapRateResponse
--[Operation Name]:GetSwapRateFamily
---[Documentation]:Returns a Swap rate Family
---[Input]:GetSwapRateFamilySoapIn
----[Parameter]: Name = parameters, Type = GetSwapRateFamily
---[Output]:GetSwapRateFamilySoapOut
----[Parameter]: Name = parameters, Element = GetSwapRateFamilyResponse
--[Operation Name]:GetHistoricalSwapRate
---[Documentation]:Returns a Swap rate as of a historical date
---[Input]:GetHistoricalSwapRateSoapIn
----[Parameter]: Name = parameters, Type = GetHistoricalSwapRate
---[Output]:GetHistoricalSwapRateSoapOut
----[Parameter]: Name = parameters, Element = GetHistoricalSwapRateResponse
--[Operation Name]:GetHistoricalSwapRateRange
---[Documentation]:Returns a Swap rate as of a historical date
---[Input]:GetHistoricalSwapRateRangeSoapIn
----[Parameter]: Name = parameters, Type = GetHistoricalSwapRateRange
---[Output]:GetHistoricalSwapRateRangeSoapOut
----[Parameter]: Name = parameters, Element = GetHistoricalSwapRateRangeResponse
--[Operation Name]:GetTreasuryRate
---[Documentation]:Returns a real-time Treasury rate
---[Input]:GetTreasuryRateSoapIn
----[Parameter]: Name = parameters, Type = GetTreasuryRate
---[Output]:GetTreasuryRateSoapOut
----[Parameter]: Name = parameters, Element = GetTreasuryRateResponse
--[Operation Name]:GetTreasuryRateFamily
---[Documentation]:Returns a real-time Treasury rate family.
---[Input]:GetTreasuryRateFamilySoapIn
----[Parameter]: Name = parameters, Type = GetTreasuryRateFamily
---[Output]:GetTreasuryRateFamilySoapOut
----[Parameter]: Name = parameters, Element = GetTreasuryRateFamilyResponse


  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值