Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [xml-dev] Looking for an example of importing an xsd into a wsdl

From: "Fraser Goffin" <goffinf@----------.--->
To: xml-dev@-----.---.---
Date: 2/14/2007 5:12:00 PM
Brett,

there are a few basic problems here :-

1. All of the types in your schema should be prefixed xsd: since the
XML Schema namespace is what is bound to that prefix and it is not the
default namespace.

So for example

<xsd:element name="publicKey" type="string"/>

should be :-

<xsd:element name="publicKey" type="xsd:string"/>

2. There is no such type as timeDate in XML schema and you don't
declare one of your own, so I assume you meant dateTime as in :-

<xsd:element name="expiration" type="xsd:dateTime"/>

3. Your import statement says that the namespace of the schema to be
imported is 'messages' when in fact it is 'http://www.example.org', so
it should read :-

<xsd:import id="Messages.xsd"
                  schemaLocation="../../XSDDocument/Messages.xsd"
                  namespace="http://www.example.org"/>

Regards

Fraser.

On 09/02/07, Bret Foreman <bret@s...> wrote:
> I'm looking for an example of importing an xsd schema into a wsdl. My
> current attempt is failing WS-I validation with a namespace error. This is
> my first attempt to import an xsd so I may be making a basic syntax error
> somewhere. Can anyone point out what is probably a really basic error?
> Here's what I'm doing:
>
> xsd file:
>
> <?xml version="1.0" encoding="windows-1252" ?>
> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>            xmlns="http://www.example.org"
>            targetNamespace="http://www.example.org"
>            elementFormDefault="qualified">
>  <xsd:complexType name="sigRequestMessage">
>    <xsd:sequence>
>      <xsd:element name="publicKey" type="string"/>
>      <xsd:element name="privateKey" type="string"/>
>    </xsd:sequence>
>  </xsd:complexType>
>  <xsd:complexType name="complexType1">
>    <xsd:sequence>
>      <xsd:element name="Signature" type="string"/>
>      <xsd:element name="expiration" type="timeDate"/>
>    </xsd:sequence>
>  </xsd:complexType>
> </xsd:schema>
>
> import section of wsdl:
>
>  <types>
>    <xsd:schema>
>      <xsd:import id="Messages.xsd"
>                  schemaLocation="../../XSDDocument/Messages.xsd"
>                  namespace="messages"/>
>    </xsd:schema>
>  </types>
>  <message name="ReturnSignature">
>    <part name="SigAndExp" type="messages:SigReplyMessage"/>
>  </message>
>  <message name="RequestSignature">
>    <part name="Keys" type="messages:SigRequestMessage"/>
>  </message>
>
> The WS-I test failes with a message:
>
> Unable to determine namespace of 'messages:SigReplyMessage'
>
> Thanks,
> Bret
>
> _______________________________________________________________________
>
> XML-DEV is a publicly archived, unmoderated list hosted by OASIS
> to support XML implementation and development. To minimize
> spam in the archives, you must subscribe before posting.
>
> [Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
> Or unsubscribe: xml-dev-unsubscribe@l...
> subscribe: xml-dev-subscribe@l...
> List archive: http://lists.xml.org/archives/xml-dev/
> List Guidelines: http://www.oasis-open.org/maillists/guidelines.php
>
>


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent