validate element with attribute soapenv:encodingStyle="..."

Discussion in 'XML' started by johnsocs@gmail.com, Jun 24, 2005.

  1. Guest

    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>
     
    , Jun 24, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Himmat Dhange
    Replies:
    0
    Views:
    436
    Himmat Dhange
    Aug 26, 2003
  2. Replies:
    8
    Views:
    9,111
    Martin Honnen
    Jun 9, 2005
  3. anonymous
    Replies:
    1
    Views:
    5,972
  4. =?Utf-8?B?TWFyaw==?=
    Replies:
    4
    Views:
    635
    =?Utf-8?B?TWFyaw==?=
    Dec 14, 2006
  5. Fabien Penso

    SOAP / EncodingStyle

    Fabien Penso, Nov 25, 2005, in forum: Ruby
    Replies:
    2
    Views:
    181
    Fabien Penso
    Nov 28, 2005
Loading...

Share This Page