Hi,
I have exposed a Sonic ESB process as a webservice and wrote a .NET application to upload data to it by calling its methods.
To this end, I have a library of complex object on the .NET side that I added in xml format to the web service definition on the Sonic ESB side. This is a necessary step in exposing the Sonic ESB process, because the methods to be called should be able to recognize the objects being passed from the .NET application.
However, when I try to add the service reference to the .NET application, the same library is treated as two different ones on each side of the service, because they are assigned to different namespaces. Making sure that 'Reuse types in referenced assemblies' is checked when creating the service reference makes no difference: The different types corresponding to one another are kept apart.
The following code thus yields an error:
public string PushManifest(FargoGate.DtoLib.OutboundFargoMessage message)
{
FargoGateOnRampWSRequest wsRequest = new FargoGateOnRampWSRequest();
OutboundFargoMessage outMessage = new OutboundFargoMessage();
//TODO ERROR: Cannot convert source type 'FargoGate.DtoLib.OutboundMessage' to target type 'PollFargoJob.FargoGateOnrampWS.OutboundFargoMessage'
wsRequest.OutboundFargoMessage = message;
throw new NotImplementedException();
}
Any suggestions would be greatly appreciated!