473,385 Members | 1,351 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Exposing Structures from WebService

In my WebService I have structure

Structure myStr1
Dim text as String
Dim Key as Byte()
End Structure

and a Web Method, containing Function which retruns data as this Structure

My qustion is, How to expose this structure to my apps, so they can use it?

TIA
Nov 21 '05 #1
24 2564
Nikolay,

I would never do it this way, however the shortest sample I could make from
it to give you an idea.
\\\
<WebMethod()> _
Public Function GiveFields() As MyFields
Dim myrecord As New MyFields
myrecord.fielda = "Hello"
myrecord.fieldb = "World"
Return myrecord
End Function
Structure MyFields
Public fielda As String
Public fieldb As String
End Structure
///
\\\add this to the webproject and set a reference to the project itself
\\\a listbox on this form
Private Sub Form1_Load(ByVal sender As Object, ByVal e _
As System.EventArgs) Handles MyBase.Load
Dim myservice As New localhost.NewService
Dim a As localhost.MyFields = myservice.GiveFields
ListBox1.Items.Add(a.fielda)
ListBox1.Items.Add(a.fieldb)
End Sub
///

I hope this helps you a little bit?

Cor
"Nikolay Petrov"
..
In my WebService I have structure

Structure myStr1
Dim text as String
Dim Key as Byte()
End Structure

and a Web Method, containing Function which retruns data as this Structure

My qustion is, How to expose this structure to my apps, so they can use
it?

TIA

Nov 21 '05 #2
Nikolay,

I would never do it this way, however the shortest sample I could make from
it to give you an idea.
\\\
<WebMethod()> _
Public Function GiveFields() As MyFields
Dim myrecord As New MyFields
myrecord.fielda = "Hello"
myrecord.fieldb = "World"
Return myrecord
End Function
Structure MyFields
Public fielda As String
Public fieldb As String
End Structure
///
\\\add this to the webproject and set a reference to the project itself
\\\a listbox on this form
Private Sub Form1_Load(ByVal sender As Object, ByVal e _
As System.EventArgs) Handles MyBase.Load
Dim myservice As New localhost.NewService
Dim a As localhost.MyFields = myservice.GiveFields
ListBox1.Items.Add(a.fielda)
ListBox1.Items.Add(a.fieldb)
End Sub
///

I hope this helps you a little bit?

Cor
"Nikolay Petrov"
..
In my WebService I have structure

Structure myStr1
Dim text as String
Dim Key as Byte()
End Structure

and a Web Method, containing Function which retruns data as this Structure

My qustion is, How to expose this structure to my apps, so they can use
it?

TIA

Nov 21 '05 #3
What way you would use, then?
"Cor Ligthert" <no************@planet.nl> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
Nikolay,

I would never do it this way, however the shortest sample I could make
from it to give you an idea.
\\\
<WebMethod()> _
Public Function GiveFields() As MyFields
Dim myrecord As New MyFields
myrecord.fielda = "Hello"
myrecord.fieldb = "World"
Return myrecord
End Function
Structure MyFields
Public fielda As String
Public fieldb As String
End Structure
///
\\\add this to the webproject and set a reference to the project itself
\\\a listbox on this form
Private Sub Form1_Load(ByVal sender As Object, ByVal e _
As System.EventArgs) Handles MyBase.Load
Dim myservice As New localhost.NewService
Dim a As localhost.MyFields = myservice.GiveFields
ListBox1.Items.Add(a.fielda)
ListBox1.Items.Add(a.fieldb)
End Sub
///

I hope this helps you a little bit?

Cor
"Nikolay Petrov"
.
In my WebService I have structure

Structure myStr1
Dim text as String
Dim Key as Byte()
End Structure

and a Web Method, containing Function which retruns data as this
Structure

My qustion is, How to expose this structure to my apps, so they can use
it?

TIA


Nov 21 '05 #4
What way you would use, then?
"Cor Ligthert" <no************@planet.nl> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
Nikolay,

I would never do it this way, however the shortest sample I could make
from it to give you an idea.
\\\
<WebMethod()> _
Public Function GiveFields() As MyFields
Dim myrecord As New MyFields
myrecord.fielda = "Hello"
myrecord.fieldb = "World"
Return myrecord
End Function
Structure MyFields
Public fielda As String
Public fieldb As String
End Structure
///
\\\add this to the webproject and set a reference to the project itself
\\\a listbox on this form
Private Sub Form1_Load(ByVal sender As Object, ByVal e _
As System.EventArgs) Handles MyBase.Load
Dim myservice As New localhost.NewService
Dim a As localhost.MyFields = myservice.GiveFields
ListBox1.Items.Add(a.fielda)
ListBox1.Items.Add(a.fieldb)
End Sub
///

I hope this helps you a little bit?

Cor
"Nikolay Petrov"
.
In my WebService I have structure

Structure myStr1
Dim text as String
Dim Key as Byte()
End Structure

and a Web Method, containing Function which retruns data as this
Structure

My qustion is, How to expose this structure to my apps, so they can use
it?

TIA


Nov 21 '05 #5
Cor,
I don't see the localhost.MyFields in my client app. I see the
myservice.GiveFields function, but not the structure. I've made it public,
but without improvement.

"Cor Ligthert" <no************@planet.nl> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
Nikolay,

I would never do it this way, however the shortest sample I could make
from it to give you an idea.
\\\
<WebMethod()> _
Public Function GiveFields() As MyFields
Dim myrecord As New MyFields
myrecord.fielda = "Hello"
myrecord.fieldb = "World"
Return myrecord
End Function
Structure MyFields
Public fielda As String
Public fieldb As String
End Structure
///
\\\add this to the webproject and set a reference to the project itself
\\\a listbox on this form
Private Sub Form1_Load(ByVal sender As Object, ByVal e _
As System.EventArgs) Handles MyBase.Load
Dim myservice As New localhost.NewService
Dim a As localhost.MyFields = myservice.GiveFields
ListBox1.Items.Add(a.fielda)
ListBox1.Items.Add(a.fieldb)
End Sub
///

I hope this helps you a little bit?

Cor
"Nikolay Petrov"
.
In my WebService I have structure

Structure myStr1
Dim text as String
Dim Key as Byte()
End Structure

and a Web Method, containing Function which retruns data as this
Structure

My qustion is, How to expose this structure to my apps, so they can use
it?

TIA


Nov 21 '05 #6
Cor,
I don't see the localhost.MyFields in my client app. I see the
myservice.GiveFields function, but not the structure. I've made it public,
but without improvement.

"Cor Ligthert" <no************@planet.nl> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
Nikolay,

I would never do it this way, however the shortest sample I could make
from it to give you an idea.
\\\
<WebMethod()> _
Public Function GiveFields() As MyFields
Dim myrecord As New MyFields
myrecord.fielda = "Hello"
myrecord.fieldb = "World"
Return myrecord
End Function
Structure MyFields
Public fielda As String
Public fieldb As String
End Structure
///
\\\add this to the webproject and set a reference to the project itself
\\\a listbox on this form
Private Sub Form1_Load(ByVal sender As Object, ByVal e _
As System.EventArgs) Handles MyBase.Load
Dim myservice As New localhost.NewService
Dim a As localhost.MyFields = myservice.GiveFields
ListBox1.Items.Add(a.fielda)
ListBox1.Items.Add(a.fieldb)
End Sub
///

I hope this helps you a little bit?

Cor
"Nikolay Petrov"
.
In my WebService I have structure

Structure myStr1
Dim text as String
Dim Key as Byte()
End Structure

and a Web Method, containing Function which retruns data as this
Structure

My qustion is, How to expose this structure to my apps, so they can use
it?

TIA


Nov 21 '05 #7
Nikolay,

Did you set a normal reference in you program to that project?

In the solution explorer
references ->right click ->add reference ->projects -> etc

And you have everytime to build and update the webservice when you make
changes in that.

Cor
"Nikolay Petrov" <jo**************@mail.bg>
Cor,
I don't see the localhost.MyFields in my client app. I see the
myservice.GiveFields function, but not the structure. I've made it public,
but without improvement.

"Cor Ligthert" <no************@planet.nl> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
Nikolay,

I would never do it this way, however the shortest sample I could make
from it to give you an idea.
\\\
<WebMethod()> _
Public Function GiveFields() As MyFields
Dim myrecord As New MyFields
myrecord.fielda = "Hello"
myrecord.fieldb = "World"
Return myrecord
End Function
Structure MyFields
Public fielda As String
Public fieldb As String
End Structure
///
\\\add this to the webproject and set a reference to the project itself
\\\a listbox on this form
Private Sub Form1_Load(ByVal sender As Object, ByVal e _
As System.EventArgs) Handles MyBase.Load
Dim myservice As New localhost.NewService
Dim a As localhost.MyFields = myservice.GiveFields
ListBox1.Items.Add(a.fielda)
ListBox1.Items.Add(a.fieldb)
End Sub
///

I hope this helps you a little bit?

Cor
"Nikolay Petrov"
.
In my WebService I have structure

Structure myStr1
Dim text as String
Dim Key as Byte()
End Structure

and a Web Method, containing Function which retruns data as this
Structure

My qustion is, How to expose this structure to my apps, so they can use
it?

TIA



Nov 21 '05 #8
Nikolay,

Did you set a normal reference in you program to that project?

In the solution explorer
references ->right click ->add reference ->projects -> etc

And you have everytime to build and update the webservice when you make
changes in that.

Cor
"Nikolay Petrov" <jo**************@mail.bg>
Cor,
I don't see the localhost.MyFields in my client app. I see the
myservice.GiveFields function, but not the structure. I've made it public,
but without improvement.

"Cor Ligthert" <no************@planet.nl> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
Nikolay,

I would never do it this way, however the shortest sample I could make
from it to give you an idea.
\\\
<WebMethod()> _
Public Function GiveFields() As MyFields
Dim myrecord As New MyFields
myrecord.fielda = "Hello"
myrecord.fieldb = "World"
Return myrecord
End Function
Structure MyFields
Public fielda As String
Public fieldb As String
End Structure
///
\\\add this to the webproject and set a reference to the project itself
\\\a listbox on this form
Private Sub Form1_Load(ByVal sender As Object, ByVal e _
As System.EventArgs) Handles MyBase.Load
Dim myservice As New localhost.NewService
Dim a As localhost.MyFields = myservice.GiveFields
ListBox1.Items.Add(a.fielda)
ListBox1.Items.Add(a.fieldb)
End Sub
///

I hope this helps you a little bit?

Cor
"Nikolay Petrov"
.
In my WebService I have structure

Structure myStr1
Dim text as String
Dim Key as Byte()
End Structure

and a Web Method, containing Function which retruns data as this
Structure

My qustion is, How to expose this structure to my apps, so they can use
it?

TIA



Nov 21 '05 #9
Yes, i've added Web reference. And I am updating it every time I make change
"Cor Ligthert" <no************@planet.nl> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Nikolay,

Did you set a normal reference in you program to that project?

In the solution explorer
references ->right click ->add reference ->projects -> etc

And you have everytime to build and update the webservice when you make
changes in that.

Cor
"Nikolay Petrov" <jo**************@mail.bg>
Cor,
I don't see the localhost.MyFields in my client app. I see the
myservice.GiveFields function, but not the structure. I've made it
public, but without improvement.

"Cor Ligthert" <no************@planet.nl> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
Nikolay,

I would never do it this way, however the shortest sample I could make
from it to give you an idea.
\\\
<WebMethod()> _
Public Function GiveFields() As MyFields
Dim myrecord As New MyFields
myrecord.fielda = "Hello"
myrecord.fieldb = "World"
Return myrecord
End Function
Structure MyFields
Public fielda As String
Public fieldb As String
End Structure
///
\\\add this to the webproject and set a reference to the project itself
\\\a listbox on this form
Private Sub Form1_Load(ByVal sender As Object, ByVal e _
As System.EventArgs) Handles MyBase.Load
Dim myservice As New localhost.NewService
Dim a As localhost.MyFields = myservice.GiveFields
ListBox1.Items.Add(a.fielda)
ListBox1.Items.Add(a.fieldb)
End Sub
///

I hope this helps you a little bit?

Cor
"Nikolay Petrov"
.
In my WebService I have structure

Structure myStr1
Dim text as String
Dim Key as Byte()
End Structure

and a Web Method, containing Function which retruns data as this
Structure

My qustion is, How to expose this structure to my apps, so they can use
it?

TIA



Nov 21 '05 #10
Yes, i've added Web reference. And I am updating it every time I make change
"Cor Ligthert" <no************@planet.nl> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Nikolay,

Did you set a normal reference in you program to that project?

In the solution explorer
references ->right click ->add reference ->projects -> etc

And you have everytime to build and update the webservice when you make
changes in that.

Cor
"Nikolay Petrov" <jo**************@mail.bg>
Cor,
I don't see the localhost.MyFields in my client app. I see the
myservice.GiveFields function, but not the structure. I've made it
public, but without improvement.

"Cor Ligthert" <no************@planet.nl> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
Nikolay,

I would never do it this way, however the shortest sample I could make
from it to give you an idea.
\\\
<WebMethod()> _
Public Function GiveFields() As MyFields
Dim myrecord As New MyFields
myrecord.fielda = "Hello"
myrecord.fieldb = "World"
Return myrecord
End Function
Structure MyFields
Public fielda As String
Public fieldb As String
End Structure
///
\\\add this to the webproject and set a reference to the project itself
\\\a listbox on this form
Private Sub Form1_Load(ByVal sender As Object, ByVal e _
As System.EventArgs) Handles MyBase.Load
Dim myservice As New localhost.NewService
Dim a As localhost.MyFields = myservice.GiveFields
ListBox1.Items.Add(a.fielda)
ListBox1.Items.Add(a.fieldb)
End Sub
///

I hope this helps you a little bit?

Cor
"Nikolay Petrov"
.
In my WebService I have structure

Structure myStr1
Dim text as String
Dim Key as Byte()
End Structure

and a Web Method, containing Function which retruns data as this
Structure

My qustion is, How to expose this structure to my apps, so they can use
it?

TIA



Nov 21 '05 #11
Nikolay,

Not a webreference, you have to tell where the description of your structure
is with a normal reference. Did you try it as I said?

Cor
"Nikolay Petrov" <jo**************@mail.bg>
Yes, i've added Web reference. And I am updating it every time I make
change
"Cor Ligthert" <no************@planet.nl> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Nikolay,

Did you set a normal reference in you program to that project?

In the solution explorer
references ->right click ->add reference ->projects -> etc

And you have everytime to build and update the webservice when you make
changes in that.

Cor
"Nikolay Petrov" <jo**************@mail.bg>
Cor,
I don't see the localhost.MyFields in my client app. I see the
myservice.GiveFields function, but not the structure. I've made it
public, but without improvement.

"Cor Ligthert" <no************@planet.nl> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
Nikolay,

I would never do it this way, however the shortest sample I could make
from it to give you an idea.
\\\
<WebMethod()> _
Public Function GiveFields() As MyFields
Dim myrecord As New MyFields
myrecord.fielda = "Hello"
myrecord.fieldb = "World"
Return myrecord
End Function
Structure MyFields
Public fielda As String
Public fieldb As String
End Structure
///
\\\add this to the webproject and set a reference to the project itself
\\\a listbox on this form
Private Sub Form1_Load(ByVal sender As Object, ByVal e _
As System.EventArgs) Handles MyBase.Load
Dim myservice As New localhost.NewService
Dim a As localhost.MyFields = myservice.GiveFields
ListBox1.Items.Add(a.fielda)
ListBox1.Items.Add(a.fieldb)
End Sub
///

I hope this helps you a little bit?

Cor
"Nikolay Petrov"
.
> In my WebService I have structure
>
> Structure myStr1
> Dim text as String
> Dim Key as Byte()
> End Structure
>
> and a Web Method, containing Function which retruns data as this
> Structure
>
> My qustion is, How to expose this structure to my apps, so they can
> use it?
>
> TIA
>



Nov 21 '05 #12
Nikolay,

Not a webreference, you have to tell where the description of your structure
is with a normal reference. Did you try it as I said?

Cor
"Nikolay Petrov" <jo**************@mail.bg>
Yes, i've added Web reference. And I am updating it every time I make
change
"Cor Ligthert" <no************@planet.nl> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Nikolay,

Did you set a normal reference in you program to that project?

In the solution explorer
references ->right click ->add reference ->projects -> etc

And you have everytime to build and update the webservice when you make
changes in that.

Cor
"Nikolay Petrov" <jo**************@mail.bg>
Cor,
I don't see the localhost.MyFields in my client app. I see the
myservice.GiveFields function, but not the structure. I've made it
public, but without improvement.

"Cor Ligthert" <no************@planet.nl> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
Nikolay,

I would never do it this way, however the shortest sample I could make
from it to give you an idea.
\\\
<WebMethod()> _
Public Function GiveFields() As MyFields
Dim myrecord As New MyFields
myrecord.fielda = "Hello"
myrecord.fieldb = "World"
Return myrecord
End Function
Structure MyFields
Public fielda As String
Public fieldb As String
End Structure
///
\\\add this to the webproject and set a reference to the project itself
\\\a listbox on this form
Private Sub Form1_Load(ByVal sender As Object, ByVal e _
As System.EventArgs) Handles MyBase.Load
Dim myservice As New localhost.NewService
Dim a As localhost.MyFields = myservice.GiveFields
ListBox1.Items.Add(a.fielda)
ListBox1.Items.Add(a.fieldb)
End Sub
///

I hope this helps you a little bit?

Cor
"Nikolay Petrov"
.
> In my WebService I have structure
>
> Structure myStr1
> Dim text as String
> Dim Key as Byte()
> End Structure
>
> and a Web Method, containing Function which retruns data as this
> Structure
>
> My qustion is, How to expose this structure to my apps, so they can
> use it?
>
> TIA
>



Nov 21 '05 #13
JD
Yes, use a Web Reference. Once the web reference is added, look at the files
it creates. One of them should be Reference.vb, in there will be the
structure definition. On my maching it looks like:

<System.Xml.Serialization.XmlTypeAttribute([Namespace]:="http://tempuri.org/
TestWebService/Service1")> _
Public Class myStr1
'<remarks/>
Public [text] As String
'<remarks/>

<System.Xml.Serialization.XmlElementAttribute(Data Type:="base64Binary")> _
Public Key() As Byte
End Class

You should not use a regular reference.

JD

"Nikolay Petrov" <jo**************@mail.bg> wrote in message
news:uc**************@TK2MSFTNGP10.phx.gbl...
Yes, i've added Web reference. And I am updating it every time I make change

"Cor Ligthert" <no************@planet.nl> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Nikolay,

Did you set a normal reference in you program to that project?

In the solution explorer
references ->right click ->add reference ->projects -> etc

And you have everytime to build and update the webservice when you make
changes in that.

Cor
"Nikolay Petrov" <jo**************@mail.bg>
Cor,
I don't see the localhost.MyFields in my client app. I see the
myservice.GiveFields function, but not the structure. I've made it
public, but without improvement.

"Cor Ligthert" <no************@planet.nl> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
Nikolay,

I would never do it this way, however the shortest sample I could make
from it to give you an idea.
\\\
<WebMethod()> _
Public Function GiveFields() As MyFields
Dim myrecord As New MyFields
myrecord.fielda = "Hello"
myrecord.fieldb = "World"
Return myrecord
End Function
Structure MyFields
Public fielda As String
Public fieldb As String
End Structure
///
\\\add this to the webproject and set a reference to the project itself \\\a listbox on this form
Private Sub Form1_Load(ByVal sender As Object, ByVal e _
As System.EventArgs) Handles MyBase.Load
Dim myservice As New localhost.NewService
Dim a As localhost.MyFields = myservice.GiveFields
ListBox1.Items.Add(a.fielda)
ListBox1.Items.Add(a.fieldb)
End Sub
///

I hope this helps you a little bit?

Cor
"Nikolay Petrov"
.
> In my WebService I have structure
>
> Structure myStr1
> Dim text as String
> Dim Key as Byte()
> End Structure
>
> and a Web Method, containing Function which retruns data as this
> Structure
>
> My qustion is, How to expose this structure to my apps, so they can use> it?
>
> TIA
>



Nov 21 '05 #14
JD
Yes, use a Web Reference. Once the web reference is added, look at the files
it creates. One of them should be Reference.vb, in there will be the
structure definition. On my maching it looks like:

<System.Xml.Serialization.XmlTypeAttribute([Namespace]:="http://tempuri.org/
TestWebService/Service1")> _
Public Class myStr1
'<remarks/>
Public [text] As String
'<remarks/>

<System.Xml.Serialization.XmlElementAttribute(Data Type:="base64Binary")> _
Public Key() As Byte
End Class

You should not use a regular reference.

JD

"Nikolay Petrov" <jo**************@mail.bg> wrote in message
news:uc**************@TK2MSFTNGP10.phx.gbl...
Yes, i've added Web reference. And I am updating it every time I make change

"Cor Ligthert" <no************@planet.nl> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Nikolay,

Did you set a normal reference in you program to that project?

In the solution explorer
references ->right click ->add reference ->projects -> etc

And you have everytime to build and update the webservice when you make
changes in that.

Cor
"Nikolay Petrov" <jo**************@mail.bg>
Cor,
I don't see the localhost.MyFields in my client app. I see the
myservice.GiveFields function, but not the structure. I've made it
public, but without improvement.

"Cor Ligthert" <no************@planet.nl> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
Nikolay,

I would never do it this way, however the shortest sample I could make
from it to give you an idea.
\\\
<WebMethod()> _
Public Function GiveFields() As MyFields
Dim myrecord As New MyFields
myrecord.fielda = "Hello"
myrecord.fieldb = "World"
Return myrecord
End Function
Structure MyFields
Public fielda As String
Public fieldb As String
End Structure
///
\\\add this to the webproject and set a reference to the project itself \\\a listbox on this form
Private Sub Form1_Load(ByVal sender As Object, ByVal e _
As System.EventArgs) Handles MyBase.Load
Dim myservice As New localhost.NewService
Dim a As localhost.MyFields = myservice.GiveFields
ListBox1.Items.Add(a.fielda)
ListBox1.Items.Add(a.fieldb)
End Sub
///

I hope this helps you a little bit?

Cor
"Nikolay Petrov"
.
> In my WebService I have structure
>
> Structure myStr1
> Dim text as String
> Dim Key as Byte()
> End Structure
>
> and a Web Method, containing Function which retruns data as this
> Structure
>
> My qustion is, How to expose this structure to my apps, so they can use> it?
>
> TIA
>



Nov 21 '05 #15
JD,

You are right.

It should work direct after rebuilding the application and updating the
webservice.

Cor

"JD" <no@address.org>
Yes, use a Web Reference. Once the web reference is added, look at the
files
it creates. One of them should be Reference.vb, in there will be the
structure definition. On my maching it looks like:

<System.Xml.Serialization.XmlTypeAttribute([Namespace]:="http://tempuri.org/
TestWebService/Service1")> _
Public Class myStr1
'<remarks/>
Public [text] As String
'<remarks/>

<System.Xml.Serialization.XmlElementAttribute(Data Type:="base64Binary")> _
Public Key() As Byte
End Class

You should not use a regular reference.

JD

"Nikolay Petrov" <jo**************@mail.bg> wrote in message
news:uc**************@TK2MSFTNGP10.phx.gbl...
Yes, i've added Web reference. And I am updating it every time I make

change


"Cor Ligthert" <no************@planet.nl> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
> Nikolay,
>
> Did you set a normal reference in you program to that project?
>
> In the solution explorer
> references ->right click ->add reference ->projects -> etc
>
> And you have everytime to build and update the webservice when you make
> changes in that.
>
> Cor
>
>
> "Nikolay Petrov" <jo**************@mail.bg>
>
>> Cor,
>> I don't see the localhost.MyFields in my client app. I see the
>> myservice.GiveFields function, but not the structure. I've made it
>> public, but without improvement.
>>
>> "Cor Ligthert" <no************@planet.nl> wrote in message
>> news:%2****************@TK2MSFTNGP15.phx.gbl...
>>> Nikolay,
>>>
>>> I would never do it this way, however the shortest sample I could
>>> make
>>> from it to give you an idea.
>>> \\\
>>> <WebMethod()> _
>>> Public Function GiveFields() As MyFields
>>> Dim myrecord As New MyFields
>>> myrecord.fielda = "Hello"
>>> myrecord.fieldb = "World"
>>> Return myrecord
>>> End Function
>>> Structure MyFields
>>> Public fielda As String
>>> Public fieldb As String
>>> End Structure
>>> ///
>>> \\\add this to the webproject and set a reference to the project itself >>> \\\a listbox on this form
>>> Private Sub Form1_Load(ByVal sender As Object, ByVal e _
>>> As System.EventArgs) Handles MyBase.Load
>>> Dim myservice As New localhost.NewService
>>> Dim a As localhost.MyFields = myservice.GiveFields
>>> ListBox1.Items.Add(a.fielda)
>>> ListBox1.Items.Add(a.fieldb)
>>> End Sub
>>> ///
>>>
>>> I hope this helps you a little bit?
>>>
>>> Cor
>>>
>>>
>>> "Nikolay Petrov"
>>> .
>>>> In my WebService I have structure
>>>>
>>>> Structure myStr1
>>>> Dim text as String
>>>> Dim Key as Byte()
>>>> End Structure
>>>>
>>>> and a Web Method, containing Function which retruns data as this
>>>> Structure
>>>>
>>>> My qustion is, How to expose this structure to my apps, so they can use >>>> it?
>>>>
>>>> TIA
>>>>
>>>
>>>
>>
>>
>
>



Nov 21 '05 #16
JD,

You are right.

It should work direct after rebuilding the application and updating the
webservice.

Cor

"JD" <no@address.org>
Yes, use a Web Reference. Once the web reference is added, look at the
files
it creates. One of them should be Reference.vb, in there will be the
structure definition. On my maching it looks like:

<System.Xml.Serialization.XmlTypeAttribute([Namespace]:="http://tempuri.org/
TestWebService/Service1")> _
Public Class myStr1
'<remarks/>
Public [text] As String
'<remarks/>

<System.Xml.Serialization.XmlElementAttribute(Data Type:="base64Binary")> _
Public Key() As Byte
End Class

You should not use a regular reference.

JD

"Nikolay Petrov" <jo**************@mail.bg> wrote in message
news:uc**************@TK2MSFTNGP10.phx.gbl...
Yes, i've added Web reference. And I am updating it every time I make

change


"Cor Ligthert" <no************@planet.nl> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
> Nikolay,
>
> Did you set a normal reference in you program to that project?
>
> In the solution explorer
> references ->right click ->add reference ->projects -> etc
>
> And you have everytime to build and update the webservice when you make
> changes in that.
>
> Cor
>
>
> "Nikolay Petrov" <jo**************@mail.bg>
>
>> Cor,
>> I don't see the localhost.MyFields in my client app. I see the
>> myservice.GiveFields function, but not the structure. I've made it
>> public, but without improvement.
>>
>> "Cor Ligthert" <no************@planet.nl> wrote in message
>> news:%2****************@TK2MSFTNGP15.phx.gbl...
>>> Nikolay,
>>>
>>> I would never do it this way, however the shortest sample I could
>>> make
>>> from it to give you an idea.
>>> \\\
>>> <WebMethod()> _
>>> Public Function GiveFields() As MyFields
>>> Dim myrecord As New MyFields
>>> myrecord.fielda = "Hello"
>>> myrecord.fieldb = "World"
>>> Return myrecord
>>> End Function
>>> Structure MyFields
>>> Public fielda As String
>>> Public fieldb As String
>>> End Structure
>>> ///
>>> \\\add this to the webproject and set a reference to the project itself >>> \\\a listbox on this form
>>> Private Sub Form1_Load(ByVal sender As Object, ByVal e _
>>> As System.EventArgs) Handles MyBase.Load
>>> Dim myservice As New localhost.NewService
>>> Dim a As localhost.MyFields = myservice.GiveFields
>>> ListBox1.Items.Add(a.fielda)
>>> ListBox1.Items.Add(a.fieldb)
>>> End Sub
>>> ///
>>>
>>> I hope this helps you a little bit?
>>>
>>> Cor
>>>
>>>
>>> "Nikolay Petrov"
>>> .
>>>> In my WebService I have structure
>>>>
>>>> Structure myStr1
>>>> Dim text as String
>>>> Dim Key as Byte()
>>>> End Structure
>>>>
>>>> and a Web Method, containing Function which retruns data as this
>>>> Structure
>>>>
>>>> My qustion is, How to expose this structure to my apps, so they can use >>>> it?
>>>>
>>>> TIA
>>>>
>>>
>>>
>>
>>
>
>



Nov 21 '05 #17
No, I didn't. So I have to browse to my webservice project and add it as
normal reference?
I'll do it right now.

But this raises new question.
When I publish my web service, how other peaple will add this reference?
"Cor Ligthert" <no************@planet.nl> wrote in message
news:%2******************@tk2msftngp13.phx.gbl...
Nikolay,

Not a webreference, you have to tell where the description of your
structure is with a normal reference. Did you try it as I said?

Cor
"Nikolay Petrov" <jo**************@mail.bg>
Yes, i've added Web reference. And I am updating it every time I make
change
"Cor Ligthert" <no************@planet.nl> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Nikolay,

Did you set a normal reference in you program to that project?

In the solution explorer
references ->right click ->add reference ->projects -> etc

And you have everytime to build and update the webservice when you make
changes in that.

Cor
"Nikolay Petrov" <jo**************@mail.bg>

Cor,
I don't see the localhost.MyFields in my client app. I see the
myservice.GiveFields function, but not the structure. I've made it
public, but without improvement.

"Cor Ligthert" <no************@planet.nl> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
> Nikolay,
>
> I would never do it this way, however the shortest sample I could make
> from it to give you an idea.
> \\\
> <WebMethod()> _
> Public Function GiveFields() As MyFields
> Dim myrecord As New MyFields
> myrecord.fielda = "Hello"
> myrecord.fieldb = "World"
> Return myrecord
> End Function
> Structure MyFields
> Public fielda As String
> Public fieldb As String
> End Structure
> ///
> \\\add this to the webproject and set a reference to the project
> itself
> \\\a listbox on this form
> Private Sub Form1_Load(ByVal sender As Object, ByVal e _
> As System.EventArgs) Handles MyBase.Load
> Dim myservice As New localhost.NewService
> Dim a As localhost.MyFields = myservice.GiveFields
> ListBox1.Items.Add(a.fielda)
> ListBox1.Items.Add(a.fieldb)
> End Sub
> ///
>
> I hope this helps you a little bit?
>
> Cor
>
>
> "Nikolay Petrov"
> .
>> In my WebService I have structure
>>
>> Structure myStr1
>> Dim text as String
>> Dim Key as Byte()
>> End Structure
>>
>> and a Web Method, containing Function which retruns data as this
>> Structure
>>
>> My qustion is, How to expose this structure to my apps, so they can
>> use it?
>>
>> TIA
>>
>
>



Nov 21 '05 #18
No, I didn't. So I have to browse to my webservice project and add it as
normal reference?
I'll do it right now.

But this raises new question.
When I publish my web service, how other peaple will add this reference?
"Cor Ligthert" <no************@planet.nl> wrote in message
news:%2******************@tk2msftngp13.phx.gbl...
Nikolay,

Not a webreference, you have to tell where the description of your
structure is with a normal reference. Did you try it as I said?

Cor
"Nikolay Petrov" <jo**************@mail.bg>
Yes, i've added Web reference. And I am updating it every time I make
change
"Cor Ligthert" <no************@planet.nl> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Nikolay,

Did you set a normal reference in you program to that project?

In the solution explorer
references ->right click ->add reference ->projects -> etc

And you have everytime to build and update the webservice when you make
changes in that.

Cor
"Nikolay Petrov" <jo**************@mail.bg>

Cor,
I don't see the localhost.MyFields in my client app. I see the
myservice.GiveFields function, but not the structure. I've made it
public, but without improvement.

"Cor Ligthert" <no************@planet.nl> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
> Nikolay,
>
> I would never do it this way, however the shortest sample I could make
> from it to give you an idea.
> \\\
> <WebMethod()> _
> Public Function GiveFields() As MyFields
> Dim myrecord As New MyFields
> myrecord.fielda = "Hello"
> myrecord.fieldb = "World"
> Return myrecord
> End Function
> Structure MyFields
> Public fielda As String
> Public fieldb As String
> End Structure
> ///
> \\\add this to the webproject and set a reference to the project
> itself
> \\\a listbox on this form
> Private Sub Form1_Load(ByVal sender As Object, ByVal e _
> As System.EventArgs) Handles MyBase.Load
> Dim myservice As New localhost.NewService
> Dim a As localhost.MyFields = myservice.GiveFields
> ListBox1.Items.Add(a.fielda)
> ListBox1.Items.Add(a.fieldb)
> End Sub
> ///
>
> I hope this helps you a little bit?
>
> Cor
>
>
> "Nikolay Petrov"
> .
>> In my WebService I have structure
>>
>> Structure myStr1
>> Dim text as String
>> Dim Key as Byte()
>> End Structure
>>
>> and a Web Method, containing Function which retruns data as this
>> Structure
>>
>> My qustion is, How to expose this structure to my apps, so they can
>> use it?
>>
>> TIA
>>
>
>



Nov 21 '05 #19
Nikolay,

That is why I told that I would not do it in your way however take a more
common datasource.

Cor

"Nikolay Petrov" <jo**************@mail.bg>
No, I didn't. So I have to browse to my webservice project and add it as
normal reference?
I'll do it right now.

But this raises new question.
When I publish my web service, how other peaple will add this reference?
"Cor Ligthert" <no************@planet.nl> wrote in message
news:%2******************@tk2msftngp13.phx.gbl...
Nikolay,

Not a webreference, you have to tell where the description of your
structure is with a normal reference. Did you try it as I said?

Cor
"Nikolay Petrov" <jo**************@mail.bg>
Yes, i've added Web reference. And I am updating it every time I make
change
"Cor Ligthert" <no************@planet.nl> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Nikolay,

Did you set a normal reference in you program to that project?

In the solution explorer
references ->right click ->add reference ->projects -> etc

And you have everytime to build and update the webservice when you make
changes in that.

Cor
"Nikolay Petrov" <jo**************@mail.bg>

> Cor,
> I don't see the localhost.MyFields in my client app. I see the
> myservice.GiveFields function, but not the structure. I've made it
> public, but without improvement.
>
> "Cor Ligthert" <no************@planet.nl> wrote in message
> news:%2****************@TK2MSFTNGP15.phx.gbl...
>> Nikolay,
>>
>> I would never do it this way, however the shortest sample I could
>> make from it to give you an idea.
>> \\\
>> <WebMethod()> _
>> Public Function GiveFields() As MyFields
>> Dim myrecord As New MyFields
>> myrecord.fielda = "Hello"
>> myrecord.fieldb = "World"
>> Return myrecord
>> End Function
>> Structure MyFields
>> Public fielda As String
>> Public fieldb As String
>> End Structure
>> ///
>> \\\add this to the webproject and set a reference to the project
>> itself
>> \\\a listbox on this form
>> Private Sub Form1_Load(ByVal sender As Object, ByVal e _
>> As System.EventArgs) Handles MyBase.Load
>> Dim myservice As New localhost.NewService
>> Dim a As localhost.MyFields = myservice.GiveFields
>> ListBox1.Items.Add(a.fielda)
>> ListBox1.Items.Add(a.fieldb)
>> End Sub
>> ///
>>
>> I hope this helps you a little bit?
>>
>> Cor
>>
>>
>> "Nikolay Petrov"
>> .
>>> In my WebService I have structure
>>>
>>> Structure myStr1
>>> Dim text as String
>>> Dim Key as Byte()
>>> End Structure
>>>
>>> and a Web Method, containing Function which retruns data as this
>>> Structure
>>>
>>> My qustion is, How to expose this structure to my apps, so they can
>>> use it?
>>>
>>> TIA
>>>
>>
>>
>
>



Nov 21 '05 #20
Nikolay,

That is why I told that I would not do it in your way however take a more
common datasource.

Cor

"Nikolay Petrov" <jo**************@mail.bg>
No, I didn't. So I have to browse to my webservice project and add it as
normal reference?
I'll do it right now.

But this raises new question.
When I publish my web service, how other peaple will add this reference?
"Cor Ligthert" <no************@planet.nl> wrote in message
news:%2******************@tk2msftngp13.phx.gbl...
Nikolay,

Not a webreference, you have to tell where the description of your
structure is with a normal reference. Did you try it as I said?

Cor
"Nikolay Petrov" <jo**************@mail.bg>
Yes, i've added Web reference. And I am updating it every time I make
change
"Cor Ligthert" <no************@planet.nl> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Nikolay,

Did you set a normal reference in you program to that project?

In the solution explorer
references ->right click ->add reference ->projects -> etc

And you have everytime to build and update the webservice when you make
changes in that.

Cor
"Nikolay Petrov" <jo**************@mail.bg>

> Cor,
> I don't see the localhost.MyFields in my client app. I see the
> myservice.GiveFields function, but not the structure. I've made it
> public, but without improvement.
>
> "Cor Ligthert" <no************@planet.nl> wrote in message
> news:%2****************@TK2MSFTNGP15.phx.gbl...
>> Nikolay,
>>
>> I would never do it this way, however the shortest sample I could
>> make from it to give you an idea.
>> \\\
>> <WebMethod()> _
>> Public Function GiveFields() As MyFields
>> Dim myrecord As New MyFields
>> myrecord.fielda = "Hello"
>> myrecord.fieldb = "World"
>> Return myrecord
>> End Function
>> Structure MyFields
>> Public fielda As String
>> Public fieldb As String
>> End Structure
>> ///
>> \\\add this to the webproject and set a reference to the project
>> itself
>> \\\a listbox on this form
>> Private Sub Form1_Load(ByVal sender As Object, ByVal e _
>> As System.EventArgs) Handles MyBase.Load
>> Dim myservice As New localhost.NewService
>> Dim a As localhost.MyFields = myservice.GiveFields
>> ListBox1.Items.Add(a.fielda)
>> ListBox1.Items.Add(a.fieldb)
>> End Sub
>> ///
>>
>> I hope this helps you a little bit?
>>
>> Cor
>>
>>
>> "Nikolay Petrov"
>> .
>>> In my WebService I have structure
>>>
>>> Structure myStr1
>>> Dim text as String
>>> Dim Key as Byte()
>>> End Structure
>>>
>>> and a Web Method, containing Function which retruns data as this
>>> Structure
>>>
>>> My qustion is, How to expose this structure to my apps, so they can
>>> use it?
>>>
>>> TIA
>>>
>>
>>
>
>



Nov 21 '05 #21
I am missing something, JD
What sould I do with the definition in Reference.vb?

"JD" <no@address.org> wrote in message
news:uC**************@tk2msftngp13.phx.gbl...
Yes, use a Web Reference. Once the web reference is added, look at the
files
it creates. One of them should be Reference.vb, in there will be the
structure definition. On my maching it looks like:

<System.Xml.Serialization.XmlTypeAttribute([Namespace]:="http://tempuri.org/
TestWebService/Service1")> _
Public Class myStr1
'<remarks/>
Public [text] As String
'<remarks/>

<System.Xml.Serialization.XmlElementAttribute(Data Type:="base64Binary")> _
Public Key() As Byte
End Class

You should not use a regular reference.

JD

"Nikolay Petrov" <jo**************@mail.bg> wrote in message
news:uc**************@TK2MSFTNGP10.phx.gbl...
Yes, i've added Web reference. And I am updating it every time I make

change


"Cor Ligthert" <no************@planet.nl> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
> Nikolay,
>
> Did you set a normal reference in you program to that project?
>
> In the solution explorer
> references ->right click ->add reference ->projects -> etc
>
> And you have everytime to build and update the webservice when you make
> changes in that.
>
> Cor
>
>
> "Nikolay Petrov" <jo**************@mail.bg>
>
>> Cor,
>> I don't see the localhost.MyFields in my client app. I see the
>> myservice.GiveFields function, but not the structure. I've made it
>> public, but without improvement.
>>
>> "Cor Ligthert" <no************@planet.nl> wrote in message
>> news:%2****************@TK2MSFTNGP15.phx.gbl...
>>> Nikolay,
>>>
>>> I would never do it this way, however the shortest sample I could
>>> make
>>> from it to give you an idea.
>>> \\\
>>> <WebMethod()> _
>>> Public Function GiveFields() As MyFields
>>> Dim myrecord As New MyFields
>>> myrecord.fielda = "Hello"
>>> myrecord.fieldb = "World"
>>> Return myrecord
>>> End Function
>>> Structure MyFields
>>> Public fielda As String
>>> Public fieldb As String
>>> End Structure
>>> ///
>>> \\\add this to the webproject and set a reference to the project itself >>> \\\a listbox on this form
>>> Private Sub Form1_Load(ByVal sender As Object, ByVal e _
>>> As System.EventArgs) Handles MyBase.Load
>>> Dim myservice As New localhost.NewService
>>> Dim a As localhost.MyFields = myservice.GiveFields
>>> ListBox1.Items.Add(a.fielda)
>>> ListBox1.Items.Add(a.fieldb)
>>> End Sub
>>> ///
>>>
>>> I hope this helps you a little bit?
>>>
>>> Cor
>>>
>>>
>>> "Nikolay Petrov"
>>> .
>>>> In my WebService I have structure
>>>>
>>>> Structure myStr1
>>>> Dim text as String
>>>> Dim Key as Byte()
>>>> End Structure
>>>>
>>>> and a Web Method, containing Function which retruns data as this
>>>> Structure
>>>>
>>>> My qustion is, How to expose this structure to my apps, so they can use >>>> it?
>>>>
>>>> TIA
>>>>
>>>
>>>
>>
>>
>
>



Nov 21 '05 #22
I am missing something, JD
What sould I do with the definition in Reference.vb?

"JD" <no@address.org> wrote in message
news:uC**************@tk2msftngp13.phx.gbl...
Yes, use a Web Reference. Once the web reference is added, look at the
files
it creates. One of them should be Reference.vb, in there will be the
structure definition. On my maching it looks like:

<System.Xml.Serialization.XmlTypeAttribute([Namespace]:="http://tempuri.org/
TestWebService/Service1")> _
Public Class myStr1
'<remarks/>
Public [text] As String
'<remarks/>

<System.Xml.Serialization.XmlElementAttribute(Data Type:="base64Binary")> _
Public Key() As Byte
End Class

You should not use a regular reference.

JD

"Nikolay Petrov" <jo**************@mail.bg> wrote in message
news:uc**************@TK2MSFTNGP10.phx.gbl...
Yes, i've added Web reference. And I am updating it every time I make

change


"Cor Ligthert" <no************@planet.nl> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
> Nikolay,
>
> Did you set a normal reference in you program to that project?
>
> In the solution explorer
> references ->right click ->add reference ->projects -> etc
>
> And you have everytime to build and update the webservice when you make
> changes in that.
>
> Cor
>
>
> "Nikolay Petrov" <jo**************@mail.bg>
>
>> Cor,
>> I don't see the localhost.MyFields in my client app. I see the
>> myservice.GiveFields function, but not the structure. I've made it
>> public, but without improvement.
>>
>> "Cor Ligthert" <no************@planet.nl> wrote in message
>> news:%2****************@TK2MSFTNGP15.phx.gbl...
>>> Nikolay,
>>>
>>> I would never do it this way, however the shortest sample I could
>>> make
>>> from it to give you an idea.
>>> \\\
>>> <WebMethod()> _
>>> Public Function GiveFields() As MyFields
>>> Dim myrecord As New MyFields
>>> myrecord.fielda = "Hello"
>>> myrecord.fieldb = "World"
>>> Return myrecord
>>> End Function
>>> Structure MyFields
>>> Public fielda As String
>>> Public fieldb As String
>>> End Structure
>>> ///
>>> \\\add this to the webproject and set a reference to the project itself >>> \\\a listbox on this form
>>> Private Sub Form1_Load(ByVal sender As Object, ByVal e _
>>> As System.EventArgs) Handles MyBase.Load
>>> Dim myservice As New localhost.NewService
>>> Dim a As localhost.MyFields = myservice.GiveFields
>>> ListBox1.Items.Add(a.fielda)
>>> ListBox1.Items.Add(a.fieldb)
>>> End Sub
>>> ///
>>>
>>> I hope this helps you a little bit?
>>>
>>> Cor
>>>
>>>
>>> "Nikolay Petrov"
>>> .
>>>> In my WebService I have structure
>>>>
>>>> Structure myStr1
>>>> Dim text as String
>>>> Dim Key as Byte()
>>>> End Structure
>>>>
>>>> and a Web Method, containing Function which retruns data as this
>>>> Structure
>>>>
>>>> My qustion is, How to expose this structure to my apps, so they can use >>>> it?
>>>>
>>>> TIA
>>>>
>>>
>>>
>>
>>
>
>



Nov 21 '05 #23
JD
Use it to call the webservice.

"Nikolay Petrov" <jo**************@mail.bg> wrote in message
news:uF**************@TK2MSFTNGP14.phx.gbl...
I am missing something, JD
What sould I do with the definition in Reference.vb?

"JD" <no@address.org> wrote in message
news:uC**************@tk2msftngp13.phx.gbl...
Yes, use a Web Reference. Once the web reference is added, look at the
files
it creates. One of them should be Reference.vb, in there will be the
structure definition. On my maching it looks like:

<System.Xml.Serialization.XmlTypeAttribute([Namespace]:="http://tempuri.org/ TestWebService/Service1")> _
Public Class myStr1
'<remarks/>
Public [text] As String
'<remarks/>

<System.Xml.Serialization.XmlElementAttribute(Data Type:="base64Binary")> _ Public Key() As Byte
End Class

You should not use a regular reference.

JD

"Nikolay Petrov" <jo**************@mail.bg> wrote in message
news:uc**************@TK2MSFTNGP10.phx.gbl...
Yes, i've added Web reference. And I am updating it every time I make

change


"Cor Ligthert" <no************@planet.nl> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
> Nikolay,
>
> Did you set a normal reference in you program to that project?
>
> In the solution explorer
> references ->right click ->add reference ->projects -> etc
>
> And you have everytime to build and update the webservice when you make > changes in that.
>
> Cor
>
>
> "Nikolay Petrov" <jo**************@mail.bg>
>
>> Cor,
>> I don't see the localhost.MyFields in my client app. I see the
>> myservice.GiveFields function, but not the structure. I've made it
>> public, but without improvement.
>>
>> "Cor Ligthert" <no************@planet.nl> wrote in message
>> news:%2****************@TK2MSFTNGP15.phx.gbl...
>>> Nikolay,
>>>
>>> I would never do it this way, however the shortest sample I could
>>> make
>>> from it to give you an idea.
>>> \\\
>>> <WebMethod()> _
>>> Public Function GiveFields() As MyFields
>>> Dim myrecord As New MyFields
>>> myrecord.fielda = "Hello"
>>> myrecord.fieldb = "World"
>>> Return myrecord
>>> End Function
>>> Structure MyFields
>>> Public fielda As String
>>> Public fieldb As String
>>> End Structure
>>> ///
>>> \\\add this to the webproject and set a reference to the project

itself
>>> \\\a listbox on this form
>>> Private Sub Form1_Load(ByVal sender As Object, ByVal e _
>>> As System.EventArgs) Handles MyBase.Load
>>> Dim myservice As New localhost.NewService
>>> Dim a As localhost.MyFields = myservice.GiveFields
>>> ListBox1.Items.Add(a.fielda)
>>> ListBox1.Items.Add(a.fieldb)
>>> End Sub
>>> ///
>>>
>>> I hope this helps you a little bit?
>>>
>>> Cor
>>>
>>>
>>> "Nikolay Petrov"
>>> .
>>>> In my WebService I have structure
>>>>
>>>> Structure myStr1
>>>> Dim text as String
>>>> Dim Key as Byte()
>>>> End Structure
>>>>
>>>> and a Web Method, containing Function which retruns data as this
>>>> Structure
>>>>
>>>> My qustion is, How to expose this structure to my apps, so they
can use
>>>> it?
>>>>
>>>> TIA
>>>>
>>>
>>>
>>
>>
>
>



Nov 21 '05 #24
JD
Use it to call the webservice.

"Nikolay Petrov" <jo**************@mail.bg> wrote in message
news:uF**************@TK2MSFTNGP14.phx.gbl...
I am missing something, JD
What sould I do with the definition in Reference.vb?

"JD" <no@address.org> wrote in message
news:uC**************@tk2msftngp13.phx.gbl...
Yes, use a Web Reference. Once the web reference is added, look at the
files
it creates. One of them should be Reference.vb, in there will be the
structure definition. On my maching it looks like:

<System.Xml.Serialization.XmlTypeAttribute([Namespace]:="http://tempuri.org/ TestWebService/Service1")> _
Public Class myStr1
'<remarks/>
Public [text] As String
'<remarks/>

<System.Xml.Serialization.XmlElementAttribute(Data Type:="base64Binary")> _ Public Key() As Byte
End Class

You should not use a regular reference.

JD

"Nikolay Petrov" <jo**************@mail.bg> wrote in message
news:uc**************@TK2MSFTNGP10.phx.gbl...
Yes, i've added Web reference. And I am updating it every time I make

change


"Cor Ligthert" <no************@planet.nl> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
> Nikolay,
>
> Did you set a normal reference in you program to that project?
>
> In the solution explorer
> references ->right click ->add reference ->projects -> etc
>
> And you have everytime to build and update the webservice when you make > changes in that.
>
> Cor
>
>
> "Nikolay Petrov" <jo**************@mail.bg>
>
>> Cor,
>> I don't see the localhost.MyFields in my client app. I see the
>> myservice.GiveFields function, but not the structure. I've made it
>> public, but without improvement.
>>
>> "Cor Ligthert" <no************@planet.nl> wrote in message
>> news:%2****************@TK2MSFTNGP15.phx.gbl...
>>> Nikolay,
>>>
>>> I would never do it this way, however the shortest sample I could
>>> make
>>> from it to give you an idea.
>>> \\\
>>> <WebMethod()> _
>>> Public Function GiveFields() As MyFields
>>> Dim myrecord As New MyFields
>>> myrecord.fielda = "Hello"
>>> myrecord.fieldb = "World"
>>> Return myrecord
>>> End Function
>>> Structure MyFields
>>> Public fielda As String
>>> Public fieldb As String
>>> End Structure
>>> ///
>>> \\\add this to the webproject and set a reference to the project

itself
>>> \\\a listbox on this form
>>> Private Sub Form1_Load(ByVal sender As Object, ByVal e _
>>> As System.EventArgs) Handles MyBase.Load
>>> Dim myservice As New localhost.NewService
>>> Dim a As localhost.MyFields = myservice.GiveFields
>>> ListBox1.Items.Add(a.fielda)
>>> ListBox1.Items.Add(a.fieldb)
>>> End Sub
>>> ///
>>>
>>> I hope this helps you a little bit?
>>>
>>> Cor
>>>
>>>
>>> "Nikolay Petrov"
>>> .
>>>> In my WebService I have structure
>>>>
>>>> Structure myStr1
>>>> Dim text as String
>>>> Dim Key as Byte()
>>>> End Structure
>>>>
>>>> and a Web Method, containing Function which retruns data as this
>>>> Structure
>>>>
>>>> My qustion is, How to expose this structure to my apps, so they
can use
>>>> it?
>>>>
>>>> TIA
>>>>
>>>
>>>
>>
>>
>
>



Nov 21 '05 #25

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: TK | last post by:
Hi, I need help on datagrid. I have a dataset exposed as a webservice. I do have a web application that is supposed to consume the service on a datagrid.
0
by: Nikolay Petrov | last post by:
In my WebService I have structure Structure myStr1 Dim text as String Dim Key as Byte() End Structure and a Web Method, containing Function which retruns data as this Structure My qustion...
0
by: Symon | last post by:
Hi everyone, I'm writing a webservice where I'm trying to expose a framework that contains a number of classes which have read-only properties. I want to expose data-transfer proxies of these...
3
by: Dave | last post by:
Please - anyone that can help. I am getting confusing results while trying to expose a collection from a web service. I have a webservice in which a web method accepts a collection as a...
4
by: tascien | last post by:
Hi guys, I have a class object I want to expose in a webservice class... How can I make sure that all objects including subclasses are exposed in WSDL. here is an example: Public Class Lists '<...
4
by: =?Utf-8?B?Y2hyaXNjYXA=?= | last post by:
I tried searching the forums for this already and didn't find anything. I want to expose functionality from a vb6 COM component via a WCF service. I am trying to evaluate if exposing this...
1
by: Ken Fine | last post by:
I have set up Microsoft Search Server 2008 Express. I want to know how I can query against it and return results in a form that can be bound to ASP.NET controls like ListViews. If there's simply...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.