>> THE ServiceJob - The class being passed back and forth
Private mJobID As String = "France"
Get
Return mJobID
End Get
Set(ByVal value As String)
mJobID = value
End Set
End Property
End Class
>> THE POST() Function on the Server : The Equivilent method on the interface has the
Public Function Post(ByVal Job As ServiceJob) As String Implements IServiceBus.Post
Return Job.JobID
End Function
>> THE CLIENT Side code
Dim x As New CDI.ServiceBusClient
Dim Job As New CDI.ServiceBusClient
Dim Result as String
Job.JobID = "123"
Result = X.Post(Job)
Msgbox(Result) ' IS Nothing
>> CONFIG Settings
<system.serviceModel>
<services>
<service
name="CDI.ServiceBus"
behaviorConfiguration="MyServiceBehavior">
<host>
<baseAddresses>
<add baseAddress="http://localhost:8231/CDI/"/>
baseAddresses>
host>
<endpoint address=""
binding="basicHttpBinding"
contract="CDI.IServiceBus"/>
service>
services>
<behaviors>
<serviceBehaviors>
<behavior name="MyServiceBehavior">
<serviceMetadata httpGetEnabled="True"/>
behavior>
serviceBehaviors>
behaviors>
system.serviceModel>
I've trimmed the code to the bare essentials ... ANY help would be appreciated. Thanks!!
Karlton KemeraitPosted Sep 16, 2009, 7:19 AM
Roei BarPosted Sep 16, 2009, 2:02 AM
and set the DataContract to return that ObjectType, you dont need to create the Object for the Server ....