What did you set up in your restExtensions.config?
It's in the config file you setup assembly reference, class name alias etc. - from your example above it looks like you add the class name to the base-url. Instead you should use the alias you specify in the config file. Maybe this is the reason?
Using /base
Hi, im having trouble using /base, iv followed the instrucional video on umb.tv but it doesnt work. This is what iv got:
A user control that implements the following jQuery call:
<script language="javascript" type="text/javascript">
$(document).ready(function(){
jQuery.get("/base/productNavigationXml/getXmlNodes.aspx", function(data)
{
alert(data);
});
});
</script>
and my class that im, calling:
public class productNavigationXml
{
public static int getXmlNodes()
{
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load("<node><hej></hej></node>");
XPathNodeIterator it = xmlDoc.CreateNavigator().Select("//node");
return it.Count;
}
}
Error message is
<error>Method has to be public and static</error>
--------------------------------------------
This is just my test class, when i got it working im going to let it iterate and return xml nodes.
Why do I get an error for this? my webservice metod is static and public???
Could there be a problem that im calling from a usercontrol?
this is my structure:
-masterpage
- <asp:content id="menu"> the usercontrol
please do help!
What did you set up in your restExtensions.config?
It's in the config file you setup assembly reference, class name alias etc. - from your example above it looks like you add the class name to the base-url. Instead you should use the alias you specify in the config file. Maybe this is the reason?
See http://umbraco.org/documentation/books/package-actions-reference/add-rest-extension
>Tommy
...and here http://umbraco.org/documentation/books/introduction-to-base/simple-base-samples
is working on a reply...