473,804 Members | 3,185 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Schema building help

All -

I am very stuck on building a schema for the following xml message. I
feel I'm very close as the message validates if I remove the
soapenv:encodin gStyle="http://schemas.xmlsoap .org/soap/encoding/"
attribute from the doSpellingSugge stion element. Any help/pointers for
describing the encodingStyle attribute in my schema would be great.

Any help on this would be great.

Thanks.

-------------- Message -------------------

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelo pe
xmlns:soapenv=" http://schemas.xmlsoap .org/soap/envelope/"
xmlns:xsd="http ://www.w3.org/2001/XMLSchema"
xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body >

<ns1:doSpelling Suggestion
soapenv:encodin gStyle="http://schemas.xmlsoap .org/soap/encoding/"
xmlns:ns1="urn: GoogleSearch">
<key xsi:type="xsd:s tring">QLgFC0VQ FHJNq8RfD6sDbGC QD6710PlS</key>
<phrase xsi:type="xsd:s tring">rabbbit</phrase>
</ns1:doSpellingS uggestion>

</soapenv:Body>
</soapenv:Envelop e>

------------ Schema ---------------

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema
xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefa ult="qualified"
targetNamespace ="http://schemas.xmlsoap .org/soap/envelope/"
xmlns:ns1="urn: GoogleSearch"
version="1.0">

<xs:import namespace="urn: GoogleSearch"
schemaLocation= "GoogledoSpelli ngSuggestion.xs d" />

<xs:element name="Envelope" >
<xs:complexType >
<xs:sequence>
<xs:element name="Body">
<xs:complexType >
<xs:sequence>
<xs:element ref="ns1:doSpel lingSuggestion"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>

</xs:schema>

---------------

<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http ://www.w3.org/2001/XMLSchema"
xmlns:soapenv=" http://schemas.xmlsoap .org/soap/encoding/"
targetNamespace ="urn:GoogleSea rch"
xmlns:ns1="urn: GoogleSearch"
version="1.0">

<xsd:element name="doSpellin gSuggestion"
type="ns1:doSpe llingSuggestion "/>

<xsd:complexTyp e name="doSpellin gSuggestion">
<xsd:sequence >
<xsd:element name="key" type="xsd:strin g"/>
<xsd:element name="phrase" type="xsd:strin g"/>
</xsd:sequence>
</xsd:complexType >

</xsd:schema>

Jul 20 '05 #1
3 2618


jo******@gmail. com wrote:

I am very stuck on building a schema for the following xml message. I
feel I'm very close as the message validates if I remove the
soapenv:encodin gStyle="http://schemas.xmlsoap .org/soap/encoding/"
attribute from the doSpellingSugge stion element. Any help/pointers for
describing the encodingStyle attribute in my schema would be great.


Why do you need to write your own schema for that, a schema already
exists, you could just import it e.g.

<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http ://www.w3.org/2001/XMLSchema"
xmlns:soapenv=" http://schemas.xmlsoap .org/soap/envelope/"
targetNamespace ="urn:GoogleSea rch"
xmlns:ns1="urn: GoogleSearch"
version="1.0">

<xsd:import namespace="http ://schemas.xmlsoap .org/soap/envelope/"
schemaLocation= "http://schemas.xmlsoap .org/soap/envelope/" />

<xsd:element name="doSpellin gSuggestion"
type="ns1:doSpe llingSuggestion "/>

<xsd:complexTyp e name="doSpellin gSuggestion">
<xsd:sequence >
<xsd:element name="key" type="xsd:strin g"/>
<xsd:element name="phrase" type="xsd:strin g"/>
</xsd:sequence>
<xsd:attribut e ref="soapenv:en codingStyle" />
</xsd:complexType >

</xsd:schema>
If you really think you need to implement it yourself then look at the
schema at
<http://schemas.xmlsoap .org/soap/envelope/>
how that works. It has a global declaration for the attribute and its type.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 20 '05 #2
Thanks for the reply

The message fails to to compile with using xmllint using the above
schema

]# xmllint --schema GoogleSoapEnvel ope.xsd GoogleMessage.x ml
GoogledoSpellin gSuggestion.xsd :18: element attribute: Schemas parser
error : Attribute ref. 'soapenv:encodi ngStyle', attribute 'ref': The
QName value {'http://schemas.xmlsoap .org/soap/envelope/',
'encodingStyle' } does not resolve to a(n) attribute declaration.
WXS schema GoogleSoapEnvel ope.xsd failed to compile
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelo pe
xmlns:soapenv=" http://schemas.xmlsoap .org/soap/envelope/"
xmlns:xsd="http ://www.w3.org/2001/XMLSchema"
xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body >

<ns1:doSpelling Suggestion xmlns:ns1="urn: GoogleSearch"
soapenv:encodin gStyle="http://schemas.xmlsoap .org/soap/encoding/">

<key xsi:type="xsd:s tring">QLgFC0VQ FHJNq8RfD6sDbGC QD6710PlS</key>
<phrase xsi:type="xsd:s tring">rabbbit</phrase>

</ns1:doSpellingS uggestion>

</soapenv:Body>
</soapenv:Envelop e>
]#

Jul 20 '05 #3


jo******@gmail. com wrote:

The message fails to to compile with using xmllint using the above
schema

]# xmllint --schema GoogleSoapEnvel ope.xsd GoogleMessage.x ml
GoogledoSpellin gSuggestion.xsd :18: element attribute: Schemas parser
error : Attribute ref. 'soapenv:encodi ngStyle', attribute 'ref': The
QName value {'http://schemas.xmlsoap .org/soap/envelope/',
'encodingStyle' } does not resolve to a(n) attribute declaration.


I do not use xmllint and I am not familiar with its schema processor.
The message suggests that it does not find the referenced attribute
declaration so either an import is missing or you need to provide the
imported schemas on the command line too to have the processor find it.
--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 20 '05 #4

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

Similar topics

3
22475
by: Cy Huckaba | last post by:
I have been looking around for a sample on how to read an XSD schema and iterate through the elements to display them. I am working in VB.Net and I have looked at all of the docs on msdn and can find plenty of samples on how to read it in and then write it write back out...with no manipulation or analysis before writing. I load the XMLSchema object but can't get into the right collection of objects to get back any valid items. I was...
7
7386
by: Robert Stearns | last post by:
I ran the following bit of SQL and my PRIMARY KEY wound up in schema SYSIBM called SQL.... not schema is3 called primary. The index registation did wind up there. Obviously there's something I don't understand or see. If you have some insight into this problem that you are willing to share, I'd be grateful. One possibility is the uniqueness required: is the constraint required to be unique with table, schema or database? PS: Ignore the...
5
4653
by: dave71 | last post by:
Hi Could someone please advise me how to remove the schema name from linked tables within Access. For example when I connect to a Oracle database via Microsoft ODCB for Oracle the list of tables shown are of the nature username.tablename I would like this only to display the table name I have this arrangement on another PC here but I am not sure how it was configured. Thanks
6
8970
by: Emma Middlebrook | last post by:
Hi there, I have created an XmlSchema to represent the tables in my database and I have specified a primary key for each of the tables. However, to be able to execute the following code: DatabaseTables.CategoryInfoRow categoryRow = m_dtCategories.Rows.Find(selected.category_ID) as DatabaseTables.CategoryInfoRow;
3
5996
by: h4xPace | last post by:
I am building a MySQL query application, and I have run into a small snag. MySQL has released a set of classes that extend the .NET framework base data classes (command, connection, etc), and I am using them to interact with the MySQL server (on localhost). Everything works great on that side of the aisle. However, I have never worked with getting schema from a database before, so I am fumbling around for a workable solution to doing...
8
2735
by: send.me.all.email | last post by:
Hi experts, which approaches would you suggest for: - Reading a database schema (tables, fields, relationships) from SQL Server 2005? - Visualizing the DB schema? For developing a DB tool the schema should be read from the server and then be visualized, e.g. like the SQL Server BI Development Studio
0
1326
by: The Magpie | last post by:
Slightly odd question, but I'm building a Schema library for use in Open Source software and want to test each element of the library. Obviously, hand-testing is easy enough but I would like automated tests built in with something nice and standard - I have JUnit in mind to do the job so that I can deliver the unit tests with the library. Unfortunately, I'm not familiar with JUnit and am more than a bit stuck trying to figure out how I...
3
3232
by: Gladiator | last post by:
Any Suggestions on the below scenario will be helpful to us. # There are 10 tables in a schema “S1” and I have to give select privilege (Only read access) to a user on all the tables in the schema “S1”. # Initially I have given the required privileges to the user with grant command on every table.. # But the problem here is whenever there are new tables building in
3
9288
by: nitinpatel1117 | last post by:
Hi, I've got a slight issue which i'm trying to resolve and was wondering if anyone would help. Basically, I was building a web application, and while it was being built I was connecting to Oracle as a User with Full admin rights. Now the system is built and ready to be put live, so therefore, I decided to create a new user that can only do insert, select and update queries e.g. they can't run queries to create or drop tables. Now...
0
9704
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
10562
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...
0
9132
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
7608
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
6845
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();...
0
5508
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5639
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3803
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2978
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.