473,772 Members | 2,442 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 attributeFormDe fault="unqualif ied"
elementFormDefa ult="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 attributeFormDe fault="unqualif ied"
elementFormDefa ult="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 CreateSchemaRoo t(string strNameSpace, bool
bElemFormDefaul t, bool bAttrForm, string strTargetNamesp ace)
{

if (strTargetNames pace.Length > 0)
{
schema.TargetNa mespace = strTargetNamesp ace;
System.Xml.S
XmlSerializerNa mespaces efilens = new XmlSerializerNa mespaces();
efilens.Add("", strTargetNamesp ace);
schema.Namespac es= 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 (bElemFormDefau lt)
schema.ElementF ormDefault = XmlSchemaForm.Q ualified;
else
schema.ElementF ormDefault = XmlSchemaForm.U nqualified;
if (bAttrForm)
schema.Attribut eFormDefault = XmlSchemaForm.Q ualified;
else
schema.Attribut eFormDefault = XmlSchemaForm.U nqualified;

schema.Version = "1.0";
XmlSerializerNa mespaces ns = new XmlSerializerNa mespaces();
ns.Add(strNameS pace, schemaNS);
schema.Namespac es = ns;
}

Nov 12 '05 #1
0 1234

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

Similar topics

0
1702
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 .NET. I'm using ZSI 1.2.7 (this was easy to install on my Debian system). I have no problem with functions with parameters and return values
1
18388
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 which have no prefix are somehow now part of the namespace - would it need to upload the definitions?
2
10029
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 others' thoughts on it (disclaimer, obviously I'm no XML expert so forgive me if these are basic). --------Exhibit A: The start of a response message schema----------- <xsd:schema targetNamespace="http://www.QQQ.com"
5
5402
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 separate files for ease of maintainability. These schemas are all part of the same namespace. When defining a web service that access more than one of these entities, the wsdl file generated by BEA contains multiple schema elements with the same...
4
3730
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, the English terms might not be exact) : "Error in the custom tool : Impossible to import WebService/Schema. Impossible to import binding 'cmsserverbinding' (it's the name of the binding in my WSDL file) from namesapce 'urn:cms. Impossible to...
0
1373
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 see a performance issue on the J2EE (CPU utilisation max's out) the load testing tool can hit the web service directly using HTTP posts and for the same amount of load the webservice performs considerably better. So the JAVA guys have asked me if...
0
2631
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 test client, it gives an error "unable to download http://..myservise.asmx?wsdl" with a promt for skip the file and continue. when i skip and continue to add the referencee, following error comes " E:\My...
1
4028
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 XmlSchema.Write() is changing <xsd:element minOccurs="1" name="AccountId" type="s-xsd:primarykey" /> to be
0
3137
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 ones that had been working now returned a SOAP fault. The faults look something like: <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"> <soap:Body> <soap:Fault> <soap:Code>
0
9621
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9454
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10264
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10039
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8937
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7461
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6716
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
3610
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2851
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.