473,406 Members | 2,698 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

problems with adding the targetnamespace with the xmlns component in my xsd file

Hi,

I am trying to add the targetNamespace with the xmlns to my xml schema
file, but I am getting the following

<?xml version="1.0" encoding="utf-8"?>
<xsd:schema attributeFormDefault="unqualified"
elementFormDefault="qualified"
targetNamespace="http://www.ciber.com/myfile" version="1.0"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">

The correct schema root is

<?xml version="1.0" encoding="utf-8"?>
<xsd:schema attributeFormDefault="unqualified"
elementFormDefault="qualified"
targetNamespace="http://www.ciber.com/myfile"
xmlns="http://www.ciber.com/myfile" version="1.0"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">

Here is my code sofar.

public void CreateSchemaRoot(string strNameSpace, bool
bElemFormDefault, bool bAttrForm, string strTargetNamespace)
{

if (strTargetNamespace.Length > 0)
{
schema.TargetNamespace = strTargetNamespace;
System.Xml.S
XmlSerializerNamespaces efilens = new XmlSerializerNamespaces();
efilens.Add("", strTargetNamespace);
schema.Namespaces= efilens;
The error is in this line. It will get overwritten by the last line in
the function. How do I add the targetNamespace xmlns next to the
targetNamespace?
}

if (bElemFormDefault)
schema.ElementFormDefault = XmlSchemaForm.Qualified;
else
schema.ElementFormDefault = XmlSchemaForm.Unqualified;
if (bAttrForm)
schema.AttributeFormDefault = XmlSchemaForm.Qualified;
else
schema.AttributeFormDefault = XmlSchemaForm.Unqualified;

schema.Version = "1.0";
XmlSerializerNamespaces ns = new XmlSerializerNamespaces();
ns.Add(strNameSpace, schemaNS);
schema.Namespaces = ns;
}

Nov 12 '05 #1
0 1218

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Michiel | last post by:
Hello, I am not sure this is the right place to ask. I tried the ZSI mailing list, but got no response there. My goal is to write some web services with ZSI to be used by a client written in...
1
by: kevin bailey | last post by:
hi there, i'm reading up on schema - but am probably missing something obvious RE targetnamespace i know there can only be one... is it that the elements which are defined in the schema...
2
by: Charles Fineman | last post by:
I've been asked to look over an integration toolkit that has a bunch of schemas to specify message format. There are a couple of strange things I noticed right off the bat and I wanted to get...
5
by: Jeff | last post by:
We are using .Net and the wsdl Utility to generate proxies to consume web services built using the BEA toolset. The data architects on the BEA side create XML schemas with various entities in...
4
by: glebur | last post by:
Hi, I'm trying to create a web service client in C# but I get stuck at one of the first steps. When adding a Web reference to the Visual Studio project; I get this error (this is a translation,...
0
by: ben | last post by:
OK so there are a few things going on. I succesfully created a SOAP webreference in VS IDE which when built works fine under small amounts of load, however under heavy amounts of load we start to...
0
by: Sanjaya | last post by:
Hi, I'm using a custom wsdl for my webservice. this is how have done it http://pluralsight.com/blogs/craig/archive/2005/12/15/17482.aspx. When i try to add a webreference to my service from a...
1
by: Ryan | last post by:
Hello Xml Gurus, I'm trying to build an XML schema in memory using the System.Xml.XmlSchema namespace objects, validate it, and then write it to a file. The problem I'm facing is that...
0
by: Default User | last post by:
I work on creating test cases for a SOAP-based set of servers, using soapUI. I received and updated set of WSDL and schema files, and when I made new tests and mock server operations, all of the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.