469,085 Members | 1,007 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,085 developers. It's quick & easy.

XML Schema Google Web Service

All I'm trying to write an xml schema for the following xml from the
google web service api. In the schema I'm not sure how to describe the
soapenv:encodingStyle attribute.

Thanks.

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
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:doSpellingSuggestion
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns1="urn:GoogleSearch">
<key xsi:type="xsd:string">XXXXXXXXXXXXXXXXXXXXX</key>
<phrase xsi:type="xsd:string">rabbbit</phrase>
</ns1:doSpellingSuggestion>

</soapenv:Body>
</soapenv:Envelope>

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

<xsd:element name="doSpellingSuggestion"
type="ns1:doSpellingSuggestion"/>

<xsd:complexType name="doSpellingSuggestion">
<xsd:sequence>
<xsd:element name="key" type="xsd:string"/>
<xsd:element name="phrase" type="xsd:string"/>
</xsd:sequence>
<xsd:attribute name="encodingStyle" type="soapenv:encodingStyle" />
</xsd:complexType>

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

<xs:import namespace="urn:GoogleSearch"
schemaLocation="GoogledoSpellingSuggestion.xsd" />

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

</xs:schema>

Jul 20 '05 #1
0 955

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Gordon Dickens | last post: by
1 post views Thread by Mike P | last post: by
1 post views Thread by billa1972 | last post: by
2 posts views Thread by SteveChamp | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by kglaser89 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.