473,480 Members | 1,493 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Problem Importing Schema

Ali
I am having problem compiling schema contained in WSDL file when analyzing
schema types contained in it (for example
http://www.ebout.net/net/GoogleSearch.wsdl).

Following code demonstrates my problem:

using System.Diagnostics;
using System.IO;
using System.Xml;
using System.Xml.Schema;
using System.Net;
using System.Web.Services.Description;

namespace ProblemDemonstration
{
class Class1
{
[STAThread]
static void Main(string[] args)
{
//populate ServiceDescription
string s = @"http://www.ebout.net/net/GoogleSearch.wsdl";
//string s = @"http://sdm.lbl.gov/srm-wg/srm.v1.1.wsdl";

WebRequest oRequest = WebRequest.Create(s);
WebResponse oResponse = oRequest.GetResponse();
Stream oStream = oResponse.GetResponseStream();
ServiceDescription oServiceDescription = ServiceDescription.Read(oStream);
oStream.Close();
oResponse.Close();

//compile schema in it
XmlSchema oSchema = oServiceDescription.Types.Schemas[0];
oSchema.Compile(new ValidationEventHandler(ValidationHandler), new
XmlUrlResolver());
}

private static void ValidationHandler(object sender, ValidationEventArgs e)
{
Debug.WriteLine(e.Message);
}
}
}

It produces following validation events:
Namespace 'http://schemas.xmlsoap.org/soap/encoding/' is not available to be
referenced in this schema.
Namespace 'http://schemas.xmlsoap.org/soap/encoding/' is not available to be
referenced in this schema.
Namespace 'http://schemas.xmlsoap.org/soap/encoding/' is not available to be
referenced in this schema.
Namespace 'http://schemas.xmlsoap.org/soap/encoding/' is not available to be
referenced in this schema.
Undefined complexType 'http://schemas.xmlsoap.org/soap/encoding/:Array' is
used as a base for complex type restriction".
Undefined complexType 'http://schemas.xmlsoap.org/soap/encoding/:Array' is
used as a base for complex type restriction".

I must be missing some fundamental step but I cannot figure out what it is.
Any suggestion will be of great help.

PS:
I can import this WebService into the Visual Studio just fine but when I try
to use WSDL.EXE tool like this, it reports the same errors.

C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin>wsdl /l:cs
/o:GoogleProxy.cs http://www.ebout.net/net/GoogleSearch.wsdl
/n:GoogleWebService

Microsoft (R) Web Services Description Language Utility
[Microsoft (R) .NET Framework, Version 1.1.4322.573]
Copyright (C) Microsoft Corporation 1998-2002. All rights reserved.

Schema validation warning: Namespace
'http://schemas.xmlsoap.org/soap/encoding/' is not available to be referenced
in this schema.
Schema validation warning: Namespace
'http://schemas.xmlsoap.org/soap/encoding/' is not available to be referenced
in this schema.
Schema validation warning: Namespace
'http://schemas.xmlsoap.org/soap/encoding/' is not available to be referenced
in this schema.
Schema validation warning: Namespace
'http://schemas.xmlsoap.org/soap/encoding/' is not available to be referenced
in this schema.
Writing file 'GoogleProxy.cs'.

Nov 21 '05 #1
2 7276
CG
I compiled your code. it worked like a champ. I am not sure why you are
getting that error.

try again....

"Ali" wrote:
I am having problem compiling schema contained in WSDL file when analyzing
schema types contained in it (for example
http://www.ebout.net/net/GoogleSearch.wsdl).

Following code demonstrates my problem:

using System.Diagnostics;
using System.IO;
using System.Xml;
using System.Xml.Schema;
using System.Net;
using System.Web.Services.Description;

namespace ProblemDemonstration
{
class Class1
{
[STAThread]
static void Main(string[] args)
{
//populate ServiceDescription
string s = @"http://www.ebout.net/net/GoogleSearch.wsdl";
//string s = @"http://sdm.lbl.gov/srm-wg/srm.v1.1.wsdl";

WebRequest oRequest = WebRequest.Create(s);
WebResponse oResponse = oRequest.GetResponse();
Stream oStream = oResponse.GetResponseStream();
ServiceDescription oServiceDescription = ServiceDescription.Read(oStream);
oStream.Close();
oResponse.Close();

//compile schema in it
XmlSchema oSchema = oServiceDescription.Types.Schemas[0];
oSchema.Compile(new ValidationEventHandler(ValidationHandler), new
XmlUrlResolver());
}

private static void ValidationHandler(object sender, ValidationEventArgs e)
{
Debug.WriteLine(e.Message);
}
}
}

It produces following validation events:
Namespace 'http://schemas.xmlsoap.org/soap/encoding/' is not available to be
referenced in this schema.
Namespace 'http://schemas.xmlsoap.org/soap/encoding/' is not available to be
referenced in this schema.
Namespace 'http://schemas.xmlsoap.org/soap/encoding/' is not available to be
referenced in this schema.
Namespace 'http://schemas.xmlsoap.org/soap/encoding/' is not available to be
referenced in this schema.
Undefined complexType 'http://schemas.xmlsoap.org/soap/encoding/:Array' is
used as a base for complex type restriction".
Undefined complexType 'http://schemas.xmlsoap.org/soap/encoding/:Array' is
used as a base for complex type restriction".

I must be missing some fundamental step but I cannot figure out what it is.
Any suggestion will be of great help.

PS:
I can import this WebService into the Visual Studio just fine but when I try
to use WSDL.EXE tool like this, it reports the same errors.

C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin>wsdl /l:cs
/o:GoogleProxy.cs http://www.ebout.net/net/GoogleSearch.wsdl
/n:GoogleWebService

Microsoft (R) Web Services Description Language Utility
[Microsoft (R) .NET Framework, Version 1.1.4322.573]
Copyright (C) Microsoft Corporation 1998-2002. All rights reserved.

Schema validation warning: Namespace
'http://schemas.xmlsoap.org/soap/encoding/' is not available to be referenced
in this schema.
Schema validation warning: Namespace
'http://schemas.xmlsoap.org/soap/encoding/' is not available to be referenced
in this schema.
Schema validation warning: Namespace
'http://schemas.xmlsoap.org/soap/encoding/' is not available to be referenced
in this schema.
Schema validation warning: Namespace
'http://schemas.xmlsoap.org/soap/encoding/' is not available to be referenced
in this schema.
Writing file 'GoogleProxy.cs'.

Nov 21 '05 #2
Code works but event handler is reporting errors. Did you look at the Output
(it uses Debug.Writeline)?

Tomas

"CG" wrote:
I compiled your code. it worked like a champ. I am not sure why you are
getting that error.

try again....

"Ali" wrote:
I am having problem compiling schema contained in WSDL file when analyzing
schema types contained in it (for example
http://www.ebout.net/net/GoogleSearch.wsdl).

Following code demonstrates my problem:

using System.Diagnostics;
using System.IO;
using System.Xml;
using System.Xml.Schema;
using System.Net;
using System.Web.Services.Description;

namespace ProblemDemonstration
{
class Class1
{
[STAThread]
static void Main(string[] args)
{
//populate ServiceDescription
string s = @"http://www.ebout.net/net/GoogleSearch.wsdl";
//string s = @"http://sdm.lbl.gov/srm-wg/srm.v1.1.wsdl";

WebRequest oRequest = WebRequest.Create(s);
WebResponse oResponse = oRequest.GetResponse();
Stream oStream = oResponse.GetResponseStream();
ServiceDescription oServiceDescription = ServiceDescription.Read(oStream);
oStream.Close();
oResponse.Close();

//compile schema in it
XmlSchema oSchema = oServiceDescription.Types.Schemas[0];
oSchema.Compile(new ValidationEventHandler(ValidationHandler), new
XmlUrlResolver());
}

private static void ValidationHandler(object sender, ValidationEventArgs e)
{
Debug.WriteLine(e.Message);
}
}
}

It produces following validation events:
Namespace 'http://schemas.xmlsoap.org/soap/encoding/' is not available to be
referenced in this schema.
Namespace 'http://schemas.xmlsoap.org/soap/encoding/' is not available to be
referenced in this schema.
Namespace 'http://schemas.xmlsoap.org/soap/encoding/' is not available to be
referenced in this schema.
Namespace 'http://schemas.xmlsoap.org/soap/encoding/' is not available to be
referenced in this schema.
Undefined complexType 'http://schemas.xmlsoap.org/soap/encoding/:Array' is
used as a base for complex type restriction".
Undefined complexType 'http://schemas.xmlsoap.org/soap/encoding/:Array' is
used as a base for complex type restriction".

I must be missing some fundamental step but I cannot figure out what it is.
Any suggestion will be of great help.

PS:
I can import this WebService into the Visual Studio just fine but when I try
to use WSDL.EXE tool like this, it reports the same errors.

C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin>wsdl /l:cs
/o:GoogleProxy.cs http://www.ebout.net/net/GoogleSearch.wsdl
/n:GoogleWebService

Microsoft (R) Web Services Description Language Utility
[Microsoft (R) .NET Framework, Version 1.1.4322.573]
Copyright (C) Microsoft Corporation 1998-2002. All rights reserved.

Schema validation warning: Namespace
'http://schemas.xmlsoap.org/soap/encoding/' is not available to be referenced
in this schema.
Schema validation warning: Namespace
'http://schemas.xmlsoap.org/soap/encoding/' is not available to be referenced
in this schema.
Schema validation warning: Namespace
'http://schemas.xmlsoap.org/soap/encoding/' is not available to be referenced
in this schema.
Schema validation warning: Namespace
'http://schemas.xmlsoap.org/soap/encoding/' is not available to be referenced
in this schema.
Writing file 'GoogleProxy.cs'.

Nov 21 '05 #3

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

Similar topics

2
2415
by: Fezboy | last post by:
Greetings! I'm trying to import elements declared in the METS and MODS XML Schema into my own. I've gotten to the point where the xsd validates, but when I try to validate a document against...
1
2026
by: Andrew Ducker | last post by:
I created a Schema (see below) in VS.NET. I then tried to create an XML document so that I could enter data for it. It gives me the error "An Error occurred while loading the schema with...
2
1508
by: Rajesh Jain | last post by:
I Have 2 separate schemas. --------------Schema 1 is defined as below----------- <xs:schema targetNamespace="http://Schemas/1" xmlns="http://Schemas/1" xmlns:xs="http://www.w3.org/2001/XMLSchema"...
3
1844
by: farseer | last post by:
Hello, i have a schema which also imports the XHTML schema: <xsd:import namespace="http://www.w3.org/1999/xhtml" schemaLocation="http://www.w3.org/2002/08/xhtml/xhtml1-strict.xsd"/> This...
2
17263
by: valerio | last post by:
Hi all, I've some problem to import data to DB2 using the db2move and db2look tools. Follow the problem : I have exported data from db2 v. 7 database on windows server, using the db2look and...
1
1934
by: Emilio | last post by:
(MS Access 2002) Hello, I'm working with some big Census (PUMS) files, and I run into a peculiar problem once the data field exceeds five integers. I'll explain every step, since I am doing it in...
2
3663
by: Eric A. Johnson | last post by:
Hi All, I'm sure this is a newbie problem... but after all, I am a .NET newbie. I'm trying to use MessageBox.Show, according to my book. It tells me to use "Imports System.Windows.Forms". I...
2
10027
by: jereviscious | last post by:
Hi all - Last resort time. I'm importing data from a spreadsheet that I receive from one of my vendor using interop.excel. The date field in excel is entered as 4/7/2006, but when I retrieve...
6
2749
by: Michael Peters | last post by:
the Excel data that I would like to import into Access sometimes contain line breaks, like this: 623 749 in one cell. In Access, the imported data looks like this then: 623749
0
7044
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,...
0
6908
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
7045
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,...
0
6944
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
2995
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
2985
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1300
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
563
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
182
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...

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.