Web serveces

N

news.online.no

Hello

Can someone tel me why My defined object wont work in a WEB servece.
The web servece does not return any XML when TestW is Invoked
<WebMethod()> Public Function TestW() As Returobjekt

TestW.mTest1 = "ABC"

TestW.mTest2 = "DEF"

End Function



' MY Object

Public Class Returobjekt

Public mTest1 As String

Public mTest2 As String

End Class



Regards

Vidar Martinsen
 
P

Philip Rieck

Try this instead:

<WebMethod()> Public Function TestW as Returobjekt
Dim ret as new Returobjekt()
ret.mTest1 = "ABC"
ret.mTest2 = "DEF"
Return ret
End Function
 

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

Top