Direction Needed - Web Service User Defined Property

B

BigJohn

I am calling a web service with a return value (long) of a success/fail
value. Depending on a call attribute, a requested result can either be
returned in a string value or Byte group or a long value of a database ID.

Where can I look to define three of my properties to the service so the
caller can make the call and get the needed information depending on the
return code?

Thank you
 
B

BigJohn

The function is called with a set of parameters. One of the parameters is a
return type.
Based on the return type, either a String, Integer or Byte data type should
be available.
The result is a dynamically built PDF file from 5 - 100 other Crystal Report
entries
or stored PDF supporting documents. The return is either the files fully
qualified name,
database key, or a byte array so it can be sent to a browser respectively.
Based upon planned use, the resulting file may be sent to a browser for
viewing
(e.g. editors making changes and wanting to temporarily preview),
a file to be sent via subsequent email for review and approval, or the final
version
to the database for archive.
 
J

Josh Twist

In that case I'd just create three webmethods with different names that
describe the response type.

i.e.

[WebMethod]
public byte[] GetThingyAsBytes(object parameter1, object parameter2);

[WebMethod]
public string GetThingyFullName(object parameter1, object parameter2);

[WebMethod]
public int GetThingyDatabaseKey(object parameter1, object parameter2);

How does this sound? It should be easier to write and easier to use for
your clients.

Josh
http://www.thejoyofcode.com/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top