Re: Question about webservices

Tech-Archive recommends: Fix windows errors by optimizing your registry



Bert VdA <bert.vanderauwera@xxxxxxxxx> wrote in
news:1188222435.446086.287870@xxxxxxxxxxxxxxxxxxxxxxxxxxx:

Is it acceptable to create a webmethod which uses a string as
parameter that contains all the productnumbers and amount ordered,
separated by a delimitter?

I personally prefer using arrays for lists. However, on some platforms a
delimited string might be easier to generate + pass in.

Or should i create an XML Serialized custom Order class, which the
clients can use to store the data in and submit the data by calling a
function, without having to build up that string themselves.

This is my preferred method. Keep the class simple and stick to the
supported web service data types.

What do you guys say? Is it the first method acceptable in a
professional environment ?

I guess either is OK, but the object method will save you a lot of coding
(i.e. string validation, deserialization of the string, etc.)

.



Relevant Pages

  • Re: string stuff
    ... searching for a way to skip 7 'whitespace areas'... ... subroutine find_field (string, field, position, delims, delim, found) ... the default delimitter set is a blank. ... if (present(position)) pos = position ...
    (comp.lang.fortran)
  • Re: Writing an online calculator in fortran
    ... I have a bit of special handling for blanks. ... !-- Find a delimitted field in a string. ... !-- removed from the returned field and the end delimitter may ... if (present(position)) pos = position ...
    (comp.lang.fortran)
  • Re: How do I construct this string?
    ... > return a string with the strings put together with the delimiter as glue. ... format is too inefficient. ... (defun join (delimitter list) ... note that delimitter must be s string not a char so ...
    (comp.lang.lisp)
  • ArrayList in String Konvertieren
    ... ich möchte eine ArrayList in einen String Konvertieren wobei ... ich die einzelnen ArrayList Indezies durch einen bestimmten Delimitter ... public static String convert2String (ArrayListlist, ... newString +=lineDelimiter; ...
    (de.comp.lang.java)
  • TOC of Python Cookbook now online (was Re: author index for Python Cookbook 2?)
    ... Processing a String One Character at a Time ... Finding a File on the Python Search Path ... Constructing Lists with List Comprehensions ... Looping over Items and Their Indices in a Sequence ...
    (comp.lang.python)