Thanks Chris!!! I was able to solve the problem.
It was related to the type of parameter passed (By Ref, By Value). Was wrongly passing by Value data type as By reference.
I have one more query for the example you provided to me in the above thread to handle EndPoint error.
class-id WcfCOMTest.Class1.
working-storage section.
method-id callWCFTest.
local-storage section.
01 wcfservice type ServiceReference1.Service1Client.
01 remoteAddress type System.ServiceModel.EndpointAddress value new System.ServiceModel.EndpointAddress("localhost/Service1.svc").
procedure division using by value theValue as binary-long
returning theString as string.
set wcfservice to new ServiceReference1.Service1Client(new type System.ServiceModel.BasicHttpBinding(), remoteAddress)
set theString to wcfservice::GetData(theValue)
goback.
end method.
in the example above you have hard coded the endpoint address as "localhost/Service1.svc"
and while creating the object of Service1Client we have provided the (Binding and remote address) parameters.
here we are using the one constructor of Service.
public Service1Client(Binding binding, EndpointAddress remoteAddress) : { }
public Service1Client (string endpointConfigurationName) : { }
public CalculatorClient(string endpointConfigurationName, string remoteAddress) : { }
public CalculatorClient(string endpointConfigurationName, EndpointAddress remoteAddress) : { }
Is there a way where we can use the second consturctor and avoid using the hard coded http address?
we want to use the second constructor by providing only endPointConfigurationName parameter. but not sure how to do it and it will work or not.
Rgerads,
Charan