[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.aspnet.webservices

Do webservices have a parameter length limitation?

Al Knowles

8/29/2003 11:33:00 AM

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.develop... ***
Don't just participate in USENET...get rewarded for it!