webmethod parameters issue 500 error

Discussion in 'ASP .Net Web Services' started by scot_m@hotmail.com, Apr 27, 2007.

  1. Guest

    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 )
    ....
     
    , Apr 27, 2007
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. James
    Replies:
    2
    Views:
    9,114
    Jacek Dziedzic
    Nov 3, 2004
  2. Daniel Barisch

    How to use own classes as WebMethod-Parameters?

    Daniel Barisch, Aug 19, 2003, in forum: ASP .Net Web Services
    Replies:
    1
    Views:
    157
    Simon Smith
    Sep 1, 2003
  3. Ash

    Internal Server Error 500 WebMethod Session=true

    Ash, Sep 9, 2003, in forum: ASP .Net Web Services
    Replies:
    1
    Views:
    610
    Toby Riley
    Oct 23, 2003
  4. Alin Popovici

    Carriage Return in WebMethod parameters

    Alin Popovici, Jan 8, 2004, in forum: ASP .Net Web Services
    Replies:
    1
    Views:
    271
    Jan Tielens
    Jan 9, 2004
  5. PMCG

    WebMethod and WSDL with optional parameters

    PMCG, Mar 2, 2004, in forum: ASP .Net Web Services
    Replies:
    1
    Views:
    779
    Jan Tielens
    Mar 2, 2004
Loading...

Share This Page