Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

GeneralMappingStrategy using XML

See original GitHub issue

HI all

Really useful library! Saving me a lot of time, however I have an issue I currently don’t know how to fix. I am trying to use XML for my GeneralMappingStrategy in Asternet. I have my program working fine using List such as:

agiServer.MappingStrategy = new GeneralMappingStrategy( new List<ScriptMapping>() { new ScriptMapping() { ScriptName = "testIVR", ScriptClass = "Asterisk_Test.testIVR", } });

But I’d rather have it read an XML file as it says it can do in the documentation, however it does not seem to say anywhere what the XML format is required. I have tried:

string pathtoxml = "test.xml"; agiServer.MappingStrategy = new GeneralMappingStrategy(pathtoxml);

With my XML as:

<?xml version="1.0"?> <ScriptMapping> <ScriptName>testIVR</ScriptName> <ScriptClass>Asterisk_Test.testIVR</ScriptClass> </ScriptMapping>

As a complete guess, seemed to make sense, but this won’t compile, I get errors of:

System.InvalidOperationException: ‘There was an error reflecting type ‘System.Collections.Generic.List`1[AsterNET.FastAGI.MappingStrategies.ScriptMapping]’.’

If possible can you let me know what I am doing wrong please?



Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

DaveTTScommented, Apr 27, 2017

Worked out the pull request!!! First time contributor to GitHub - Sorry!

skrustycommented, Apr 28, 2017

Fixed by #99

Read more comments on GitHub >

github_iconTop Results From Across the Web

XML Mapping - Doctrine Object Relational Mapper (ORM)
The XML mapping driver enables you to provide the ORM metadata in form of XML documents. The XML driver is backed by an...
Read more >
Marshalling XML by Using Object-XML Mappers
Object-XML Mapping (O-X mapping for short) is the act of converting an XML document to and from an object. This conversion process is...
Read more >
XML Mapping - castor
A Castor mapping file is a good way to dissociate the changes in the structure of a Java object model from the changes...
Read more >
Hibernate - Table Per Hierarchy using XML File
In this strategy, the entire hierarchy is mapped to a single table. All attributes of all the classes in the hierarchy are stored...
Read more >
MyBatis 3 | Mapper XML Files
The Mapper XML files have only a few first class elements (in the order ... Result maps are the most powerful feature of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found