all groups > dotnet web services > november 2007 >
You're in the

dotnet web services

group:

1-dimensional array error


1-dimensional array error Louis Delouiser - Systems Consultant
11/7/2007 7:12:02 AM
dotnet web services: Hi all - I hope someone can help me out with this web services error I'm
receiving when trying to pass an XML string document to this simple web
service to create a PO. Here's my button click code:

Public Sub btn_ProcessImportXML_Click(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles btn_ProcessImportXML.Click

'Declare variable for the PO Entry Service
Dim MyService As POEntry.POEntryService = New POEntry.POEntryService()
'Declare variable for the results
Dim myResult As POEntry.MethodResponse()
Dim Doc = New XmlDocument()
Doc.Load("c:\temp\poentry.xml")
Dim thisXML As String = Doc.outerxml
myResult = MyService.POEntryimport("PO", "1", thisXML) ' expects
systemname as string, company_id as string, document as string

End Sub

I am unable to compile my application and run because I receive the
following error:

Error 20 Value of type 'PO_XML.POEntry.MethodResponse' cannot be converted
to '1-dimensional array of PO_XML.POEntry.MethodResponse'.

I'm new to web services. I've tried several options with no success.

Any help would be great.

Re: 1-dimensional array error John Saunders [MVP]
11/8/2007 9:15:10 AM
"Louis Delouiser - Systems Consultant" <Louis Delouiser - Systems
[quoted text, click to view]

This is telling you that the web method is not returning
'PO_XML.POEntry.MethodResponse' , but rather is returning an array of them.
Check the definition of the web service.
--
--------------------------------------------------------------------------------
John Saunders | MVP - Windows Server System - Connected System Developer

AddThis Social Bookmark Button