Do webservices have a parameter length limitation?

Discussion in 'ASP .Net Web Services' started by Al Knowles, Aug 29, 2003.

  1. Al Knowles

    Al Knowles Guest

    I am calling a web service from a VB6 application using the following
    code. The idea is to pass a file (stored in XML) to the service for it
    to be stored on the server. Everything works as expected unless the
    file size is greater than around 2500kb. At the point, the webservice
    doesn't respond at all. It won't even activate to the point where I can
    debug.

    Is there a limit to the length of the string that can be posted to a web
    service? If so, it it overridable? Or is this an option that can be
    set on IIS?

    Any responses greatly appreciated. Thanks in advance.

    Public Sub wsStoreObject()

    Dim xXMLHTTP As New XMLHTTP ' XMLHTTP

    Dim xResponse As String
    Dim xURL As String 'Web service url
    Dim xSendParms As String

    '>>> Web service parameters
    Dim iBinStream As String
    Dim iDirectory As String
    Dim iName As String
    Dim iOverwrite As String
    Dim iOptions As String
    Dim iFileLen As Long
    Dim iFileType As String


    Dim ll_callnum As Integer

    On Error GoTo oops:

    ll_callnum = ll_callnum + 1

    Dim ls_shortfilename As String
    Dim ls_path As String
    Dim ls_longname As String

    ls_shortfilename = "test.oin"

    ls_path = "d:\images\"

    ls_longname = ls_path + ls_shortfilename
    iBinStream = SerializeImageToXML(ls_longname)

    '>>> Set web service url

    xURL = "http://idev/ccms/eservices/CCMSService.asmx/StoreObject"

    '>>> set XMLHTTP object
    xXMLHTTP.Open "POST", xURL
    xXMLHTTP.setRequestHeader "Content-Type",
    "application/x-www-form-urlencoded"


    iDirectory = "Image"
    iName = ls_shortfilename
    iOverwrite = "TRUE"
    iOptions = "TheOptions"



    '>>> Concatenate individual parms into the xSendParms variable
    xSendParms = "iBinStream=" & iBinStream & "&"
    xSendParms = xSendParms & "iDirectory=" & iDirectory & "&"
    xSendParms = xSendParms & "iName=" & iName & "&"
    xSendParms = xSendParms & "iOverwrite=" & iOverwrite & "&"
    xSendParms = xSendParms & "iOptions=" & iOptions


    '>>> Call web service and pass its parameters
    xXMLHTTP.send xSendParms



    '>>> Loop until the call comes back
    Do Until xXMLHTTP.readyState = 4
    DoEvents
    Loop

    '>>> When exiting the loop, get the response from the webservice
    xResponse = xXMLHTTP.responseText

    ' >>xResponse is empty if file size over about 2500 KB

    Set xXMLHTTP = Nothing

    Exit Sub

    oops:


    MsgBox Err.Description


    End Sub




    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
    Al Knowles, Aug 29, 2003
    #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. =?Utf-8?B?SG96aQ==?=
    Replies:
    1
    Views:
    6,954
    Ken Cox [Microsoft MVP]
    Jun 2, 2004
  2. Replies:
    2
    Views:
    5,927
  3. Brad
    Replies:
    4
    Views:
    5,360
    Jim Higson
    Apr 5, 2006
  4. ctk70
    Replies:
    2
    Views:
    475
    ctk70
    Feb 10, 2005
  5. Replies:
    0
    Views:
    472
Loading...

Share This Page