3

I am using one C# code Templating solution for generating an XML file from Category & Keywords. The code is working fine, however we now have a requirement to add some more XML tags in the existing file from outside source through web service WCF. So I am thinking of updating the templating code and call a WCF web service then update the XML.

My question.

  1. Is it possible to call a WCF service in C# template.
  2. When I am trying to do same. it's throwing exception "There was no endpoint listening at [myservicepath] that could accept the message".

Is there any other approach to do the above task I mean update in XML generated from C# template code and insert some custom tag from outside(CMS) source ?

1 Answer 1

2

Yes it's possible, however there're a few things to keep in mind:

  • Your template should have no app.config as it will not be able to read it
  • Think of security, as your webservice will be called by user who is running the rendering.

Looking at your error it seems that you are missing the configuration, i.e. template doesn't know where and how to connect, or usual suspects - firewall, typo in the address, server is down.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.