Do webservices have a parameter length limitation?

A

Al Knowles

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
 

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,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top