Question: When’s a string not a string?

Answer: When it's not surrounded by quotation marks in the SWX Service Explorer.

If you the data type of a parameter that you're passing is string, please make sure that you enclose the argument you're entering with quotation marks. This is especially important for long numeric IDs (such as those used by the Flickr API) as, otherwise, Service Explorer will interpret these as integers and you'll end up with the wrong ID and failing call.

So, for instance, if a call takes a string ID, enter "72157600948554269" not 72157600948554269 into the input box for the ID parameter in the SWX Service Explorer.

Remember, when in doubt, enclose in quotes. :)

(By the way, I am aware that the SWX Service Explorer should be smarter about this and enclose string arguments in quotes for you. It should be smarter in a few other areas too and these are on my to-do list for Version 1 as they catch me out from time to time too.)

5 Responses to “Question: When’s a string not a string?”


  1. 1 Folkert

    I think not the service browser but the service class itself should take care of that. Service browser is not supposed to manipulate data in any case should it ?

  2. 2 Folkert

    Also when talking json, this ‘ is not a valid json, should use ” instead.

  3. 3 admin

    Hi Folkert,

    No, the Service Browser is not supposed to manipulate the data but it could a few things to make it easier for people to input it. Going to be looking into this before I release version 1.

  4. 4 Quint

    Hi,
    I’m trying to send a variable from an inputText.
    (…)
    args:[inputText.text],
    (…)
    When publishing for Flash7 there’s no problem passing the string, but when I publish for Flash8 the end result is:
    “r” the string.

    If I send the variable directly using quotation marks(Flash8):
    (…)
    args:["test"],
    (…)
    the result is fine.
    What am I doing wrong?

  1. 1 Why are my string values sometimes incorrectly interpreted as numbers in the SWX Service Explorer? at SWX: SWF Data Format

Leave a Reply




Bad Behavior has blocked 3327 access attempts in the last 7 days.