Last post Apr 23, 2015 02:13 AM by Edwin Guru Singh
Apr 20, 2015 09:37 AM|ssramvinay.83|LINK
I am working on a cross platform IDE where most of the .NET classes wont support there.I am having xml document which is required to send to the server to get response.Please note that our server only accepts SOAP type(xml) messages for both request
& response.I have to use ChannelFactory to send the xml document to the server.Meanwhile i have to get the response from the server as a xml(soap)format only.Please help me on this as it's bit urgent.
NOTE:Channelfactory is the first option or else let me know is there any option.
Apr 20, 2015 10:51 AM|mgebhard|LINK
Not quite sure I understand what you're asking. If the IDE is cross platform then how can you get away with using the ChannelFactory which requires the .NET framework? Also SOAP is cross platform by design.
Apr 23, 2015 02:13 AM|Edwin Guru Singh|LINK
Please note that our server only accepts SOAP type(xml) messages for both request & response.I have to use ChannelFactory to send the xml document to the server.Meanwhile i have to get the response from the server as a xml(soap)format onl
1. the first step is to create a Message object, and give it a reader to the XmlDocument. then create a
ChannelFactory using the endpoint configuration generated by the previous client. Then create a channel and use it to sent the message a built with the XmlDocument like below :
how to invoke a service using the generic
var doc = new XmlDocument();
var message = Message.CreateMessage(MessageVersion.Soap11, "urn:someRequest", new XmlNodeReader(doc));
var factory = new ChannelFactory<IRequestChannel>("serviceHttpSoap11Endpoint");
var channel = factory.CreateChannel();
var response = channel.Request(message);
2. Here is the endpoint’s configuration:
contract="System.ServiceModel.Channels.IRequestChannel" name="serviceHttpSoap11Endpoint" />
for more information,
Click here to refer about Send XmlDocument using Windows Communication Foundation