1-dimensional array error - DOTNET
This is a discussion on 1-dimensional array error - DOTNET ; 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 ...
-
1-dimensional array error
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.
Thanks!
-
Re: 1-dimensional array error
"Louis Delouiser - Systems Consultant" <Louis Delouiser - Systems
Consultant@discussions.microsoft.com> wrote in message
news:2BC82378-4F6F-4364-AE97-8D9D1480DB1E@microsoft.com...
> 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'.
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
Similar Threads
-
By Application Development in forum CSharp
Replies: 5
Last Post: 10-24-2007, 05:22 PM
-
By Application Development in forum RUBY
Replies: 7
Last Post: 10-19-2007, 04:36 PM
-
By Application Development in forum c++
Replies: 8
Last Post: 09-19-2007, 01:21 PM
-
By Application Development in forum DOTNET
Replies: 0
Last Post: 09-12-2006, 09:16 PM