Error with webservice

  • 26 July 2009
  • 1 reply
  • 0 views

Badge

I use the currency converter webservice from webservicex.net in a blackpoint workflow. (link)

But the workflow gives the error in K2 administration:

"KoersOphalen  Invalid cast from 'System.String' to 'CurrencyConverter.Currency'."

The webservice needs two currencies (strings): FromCurrency (EUR) and ToCurrency (USD).

 How can I declare a "eur" string as currency?

 Thanks for your help!

 


1 reply

Badge +6

Hi there,

I have not seen the service definition for this web service, but it *sounds* like the service is using complex data types, which is not supported by the web service reference wizard. You would have to create an intermediary assembly that calls the web service and does the translation between the complex types and the K2 data, and then call this custom assembly from your reference wizard, instead of the web service directly. I know it's a bit more extra work, but if you think about it, there is no (easy/elegant) way that the K2 wizard can accomodate all complex types out there.

 Hope that makes sense?

 

Reply