Databases Reference
In-Depth Information
For the target, expand QuoteInput and select /ns1:GetSingleQuote/ns1:Symbol .
You will notice that for both the source and target, JDeveloper has created the
equivalent XPath expression (circled in the preceding screenshot).
The source and target can either be a simple type (for example, xsd:int ,
xsd:date , or xsd:string ), as in the preceding example. Or a complex
type (for example, ns2:getQuote ), but make sure the source and target
are either of the same type, or at least compatible.
Testing the process
At this stage, even though the process isn't complete, we can still save, deploy, and
run our composite. Do this in the same way as previously covered in Chapter 2,
Writing your First Composite . When you run the composite from the console you will
notice that it doesn't return anything (as we haven't specified this yet). But if you
look at the audit trail, you should successfully see the GetSingleQuote operation
being invoked. Assuming this is the case, we know we have implemented that part
of the process correctly.
Calling the exchange rate web service
The next step of the process is to determine the exchange rate between the
requested currency and the US dollar (the currency used by the GetSingleQuote
operation). For this, we are going to use the currency convertor service provided by
webserviceX.NET .
For more information on this and other services provided by webserviceX.NET, go to
www.webservicex.net .
This service provides a single operation ConversionRate , which gets the conversion
rate from one currency to another. The WSDL file for this service can be found at the
following URL:
http://www.webservicex.net/CurrencyConvertor.asmx?wsdl
For convenience, we have included a local copy of the WSDL for webserviceX.NET's
currency convertor service, called CurrencyConvertor.wsdl . It's included with the
samples of Chapter 5 .
To invoke the ConversionRate operation, we will follow the same basic steps that
we did in the previous section to invoke the GetSingleQuote operation. For brevity,
we won't repeat them here, but will allow the reader to do this.
 
Search WWH ::




Custom Search