namespaces

Passing serialized object through web service vs. Passing the object

I have a webservice in C#.NET with the following namespace: [WebService (Namespace = "http://enterpriseName/wsName")] The web service contains a WebMethod GetServiceObject and a class MyObject. This web method returns a string whose content is a serialized instance of MyObject. [WebMethod (MessageName = "GetServiceObjectXML" Descript...

WCF service URL ACL on windows 7 : Your process does not have access rights to this namespace

Porting an application from my previous development machine (XP) to a new one (w7), and having an issue with WCF. HTTP could not register URL http://+:8001/KolonistenVanCatan/MetaData/. Your process does not have access rights to this namespace (see http://go.microsoft.com/fwlink/?LinkId=70353 for details). Now, the page ...

Difference between "using MyNameSpace;" and "namespace MyNameSpace"

Hello I am new to asp.net. I am confused what is the difference between "using MyNameSpace;" and "namespace MyNameSpace". My demo code is as follow... using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using MyNameSpace; namespace MyNameSpa...

SimpleXML - add a new node using a namespace previously declared - how ?

Hello all, <epp> <domain:create xmlns:domain="urn:someurn"> <domain:name></domain:name> <domain:registrant></domain:registrant> <domain:contact></domain:contact> </domain:create> </epp> I would like to add a child, on a very specific place (so I'm also using DOM and not only simpleXML) for <domain:create> ...

Duplicate Symbol problem.

Hi, I have a header file MyNameSpace.h where i use namespace as under: namespace NameSpace1 { string first = "First"; ... } namespace NameSpace2 { string top = "Top"; } But when i use the namespace object in my other classes including the header file. I got Duplicate symbol error as NameSpace1::first. What exactly it means and how ...

How do I optimize schemaDocument.Namespaces code for performance ?

Hi, I have this code that is called thousands of times and I need to optimize it for performance. I thought about caching xmlQualifiedNames but it's not good enough. any ideas ? private static string GetPrefixForNamespace(string ns, XmlSchema schemaDocument) { string prefix = null; XmlQualifiedName[] xmlQualifi...

PHP: Extending a class with an other namespace with the same ClassName

I'm trying to use namespaces. I want to extend a class inside a different namespace. The name of the class is the same. Example: Parent: namespace Base; class Section extends Skeleton { protected $id; protected $title; protected $stylesheet; } Child: namespace Base2; use \Base\Section; class Section extends \Base\Section {...

JavaScript multiple namespaces

I have a large js file that I want to break into multiple namespaces. Is this a good/bad approach vs keeping everything in one namespace? In NAMESPACE_FIRST how do I call map build? var NAMESPACE_FIRST = { init:function() { alert("onload functions"); }, this.map:function() { this.length = 0; }, th...

Preprocessor based exclusion of namespace qualified function calls.

I’m currently working on a reporting library as part of a large project. It contains a collection of logging and system message functions. I’m trying to utilize preprocessor macros to strip out a subset of the functions calls that are intended strictly for debugging, and the function definitions and implementations themselves, using cond...

UsersController in Admin namespace seen as the one defining UsersController?

In rails console I get the following: >> UsersController LoadError: Expected /../app/controllers/admin/users_controller.rb to define UsersController I'm using Rails 3.0.0.rc. Exact same code works fine for 3.0.0.beta3 and 3.0.0.beta4 BTW. In short the controllers look like: app/controllers/admin/users_controller....

SWIG2 template return type namespace not detected

Hi there. I'm swigging to Java. I'm trying to get a templated member func to use some templated return type, which i have to give a name of course (since otherwise SWIG would not create the needed source). test.i is like: %module Test %{ #include <vector> namespace ns { class C { public: template <class T> void doit(con...

Named namespace in implementation file to group const string literals - Good/Bad?

I've grouped several message strings into a named (non anonymous) namespace in the .cpp file for a class handling output as seen in the code below: namespace Messages { static const std::string AppTitle = "The Widgetizer - Serving all your Widget needs"; static const std::string SuccessMsg = "Great success! Widgets for all! "; sta...

XJC namespace problem

Hello! I am trying to generate java source files from a package of *.xsd files using the xjc code generation tool. The namespaces used in those *.xsd files are as follows: h*p://www.domain.com/foo/bar.x h*p://www.domain.com/foo/bar.x.y h**p://www.domain.com/foo/bar.x.y.z XJC produces packages as follows: com.domain.foo.bar.x and...

Changing namespace for XML file in XSL Translation

So I have an input file that uses my company's namespace in the default namespace (xmlns="companyURL") but I want my output file to use something other than the default namespace (xmlns:cmp="companyURL"). So I construct my file using the cmp namespace, but then I want to copy some of the inner elements: <xsl:element name="cmp:container"...

template specialization inside class namespace

How to specialize a template defined in some external namespace in the body of my class? Concrete example using BGL which doesn't compile: class A { namespace boost { template <class ValueType> struct container_gen<SomeSelectorS, ValueType> { typedef std::multiset<ValueType,MyClass<ValueType> > type; }; } } ...

Visual Studio and root namespaces

Hello, I am using VS2010, is there a way, to disable full root namespaces, when VS is autogenerating code? From this: { global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged); } to this: using System.ComponentModel; { Collect...

Private class functions vs Functions in unnamed namespace

I've found myself that I tend not to have private class functions. If possible, all candidates to private class function rather I put in to unnamed namespace and pass all necessary information as function parameters. I don't have a sound explanation why I'm doing that but at least it looks more naturally to me. As a consequence I need to...

how to Custom build a javascript API based on Jquery and some questions about the syntax used in Jquery.

Hi all, I come here with quite a bunch of questions so lets start: I want to know some things about the syntax used to make jquery as I wish to learn from it an use it for my self. Question 1: The starting of the jQuery library (function( window, undefined ) { // Define a local copy of jQuery var jQuery = function( selector, conte...

Clojure namespace management - Is there a way to save and restore the state of clojure repl namespaces, imports etc. ?

Clojure has a large number functions/macros for working with namespaces and java package imports. To my (limited) understanding the set up of namespaces can be considered state in a clojure process (repl). When working iteratively at a REPL session, especially when source files are (re)-loaded, I can find it easy to get confused - often...

How to output xml namespace with Grails REST webservices

Its a Grails app and we'd like to be able to add XML namespaces to the xml produced for REST clients. Most of the xml is output using "render foo as XML" with the deep converter. So the output needs to be something like: <foo xmlns:myns='http://mycompany.com/myproduct/ver'&gt; ... </foo> ...