webmethod parameters issue 500 error

S

scot_m

I have 2 web methods in a .asmx file. IIS 5.0, Win2k server.

The first webmethod takes about 20 string parameters and when I cick
the invoke button, the pop-up page displays the soap exception that I
throw for a required field missing. All works fine.

The second webmethod takes only 2 string parameters. When I click the
invoke button, the pop-up page shows the http friendly message
internal server error, 500. The first thing I do is look for the two
required values and throw an exception if they are not sent, just like
webmethod #1. There is nothing different happening here. If I go to
IE tools options adavanced and turn off show friendly http error
messages, I actually see the soapexception.

I don't think this will cause a problem when consumed from another
application, but it does when invoking from the asmx page. Both WMs
throw the error the same exact way.

Things i have tried:
1. Changed the names of hte two webmethods. Worked opposite.
2. Added the code from WM1 to WM2. Nothing changed.
3. Added the parameters from WM1 to WM2. This is the kicker! When I
added the parameters, suddenly WM2 started showing the soap
exception. So, now it has about 20 string parameters and now it shows
the soapexception when IE is set to show friendly errors.

So, i guess I'm not sure if this is an issue of WM1 not showing a
friendly message or WM2 not showing the soapexception.

Any ideas or something I can test? Below are both WMs:

WM1
[ WebMethod(Description="Creates a new TP using the following
parameters:<BR><BR>ORIGUIC: 5 Character UIC [MANDATORY]<BR>ORIGSEQ: 4
Digit Sequence Number<BR>ORIGRPTDAT: Originator Report Date formatted
as the following 10 character string 'mm/dd/yyyy'.
[MANDATORY]<BR><BR>ORIGACTVTY: Character String
[MANDATORY]<BR>ORIGRANK: Character String<BR>ORIGNAME: Character
String [MANDATORY]<BR>ORIGDSN: Character String<BR>ORIGCOMM: Character
String [MANDATORY]<BR>ORIGEMAIL: Character String
[MANDATORY]<BR>TPLNAME: Character String<BR>TPLCOMM: Character
String<BR>TPLEMAIL: Character String<BR>PUBNO: Character
String<BR>PUBDATE: Character String [MANDATORY]<BR>CHGNO: Character
String<BR>CHGDATE: Character String<BR>WORKPACKNO: Character
String<BR>PAGE: Character String<BR>PARANO: Character
String<BR>FIGTABLE: Character String<BR>CATEGORY: 2, 3, or 4
[MANDATORY]<BR>SPARE: not used<BR>DEFICIENCY: 1 to 2000 characters
[MANDATORY]<BR>RECOMMEND: up to 2000 characters<BR>IMPACT: 1800 up to
1800 characters<BR>", EnableSession=false)]

public string NewTP(string ORIGUIC, string ORIGSEQ, string ORIGRPTDAT,
string ORIGACTVTY, string ORIGRANK, string ORIGNAME, string ORIGDSN,
string ORIGCOMM, string ORIGEMAIL, string TPLNAME, string TPLCOMM,
string TPLEMAIL, string PUBNO, string PUBDATE, string CHGNO, string
CHGDATE, string WORKPACKNO, string PAGE, string PARANO, string
FIGTABLE, string CATEGORY, string SPARE, string DEFICIENCY, string
RECOMMEND, string IMPACT)
....


WM2
[ WebMethod(Description="Retrieves the next TP sequence
number:<BR><BR>Country Code: 2 char[MANDATORY]<BR>Platform Code: 3
char[MANDATORY]<BR><BR>", EnableSession=false)]

public string GetSequenceNumber( string sCountryCode, string
sPlatformCode )
....
 

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,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top