![]() ' since the return class contains an array ' we just display its first element ' each instance and its values can be easily accessed ' display the value for objWSJRate(0).Value ' other values could be consumed in the same manner Console.WriteLine(objWSJRate(0). Console.WriteLine("Service is unavailable at this time.") Case Else ' add processing for displaying the results, e.g. ' you could pass back the info message received from the service Console.WriteLine(objWSJRate(0).Message) Case ' add processing for handling system problems, e.g. Console.WriteLine(objWSJRate(0).Message) Case ' add processing for handling request problems, e.g. ObjGE.HeaderValue = objHeader Dim objWSJRate() As RemoteGE.WSJRate _ = objGEService.GetWSJRates("") If Not objWSJRate Is Nothing Then Select Case objWSJRate(0).Outcome Case ' display the error to facilitate diagnostics, e.g. ![]() Feel free to ask questions, I'm here to assist. You can also reference the link you sent above if you'd like to check out the exchange rates. '' ?> PHPĭim objGEService As New RemoteGE.XigniteGE() Dim objHeader As New RemoteGE.Header = new RemoteGE.Header() objHeader.Username = "YOUR_TOKEN" QBO uses the exchange rates from Wall Street on Demand. htmlspecialchars($client->debug_str, ENT_QUOTES). '' // print the PHP debugging trace echo 'Debug'. htmlspecialchars($client->response, ENT_QUOTES). '' // print the SOAP response echo 'Response'. htmlspecialchars($client->request, ENT_QUOTES). GetWSJRates("") if (objWSJRate = null) // print the SOAP request echo 'Request'. RemoteGE.WSJRate objWSJRate objWSJRate = objGEService. Note that the default name for a web reference is generally " objGEService objGEService = new RemoteGE.XigniteGE() // add authentication info RemoteGE.Header objHeader = new RemoteGE.Header() Here, RemoteGE is the web reference to the web service. This code could be used in any type of application (Windows, console. Response.Write("Service is unavailable at this time.") End Select Else ' add error processing here ' this condition could be caused by an HTTP error (404,500.) Response.Write("Service is unavailable at this time.") End If End Sub C# (CSharp) ' you could pass back the info message received from the service Response.Write(objWSJRate(0).Message) Case OutcomeTypes.SystemError ' add processing for handling system problems, e.g. Yelp’s shares rose after the Wall Street Journal reported that TCS Capital Management has built a stake in the company and is recommending a sale or merger. Response.Write("Our subscription to this service has expired.") Case OutcomeTypes.RequestError ' add processing for handling request problems, e.g. GetWSJRates("") If Not objWSJRate Is Nothing Then Select Case objWSJRate(0).Outcome Case OutcomeTypes.RegistrationError ' add processing for handling subscription problems, e.g. ' call the operation and load the return object objWSJRate = objGEService. ' declare the return object globally so that you can reuse it around the page Dim objWSJRate() As WSJRate ' call the service inside the Page_Load routine Sub Page_Load(obj as object, e as eventargs) ' create an instance of the web service Dim objGEService As New XigniteGE() ' add authentication info Dim objHeader As New RemoteGE.Header = new Header() objHeader.Username = "YOUR_TOKEN"
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |