You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@synapse.apache.org by Sihem <st...@yahoo.fr> on 2007/11/28 09:31:57 UTC
RE : Re: RE : Re: SOAP fault messages
Hi Asankha,
thanks a lot for your answer. It is now clear for me. And you are right, the remaining exception was thrown because the secure2 endpoint does not exist.
To finish, I would like to describe you a strange behaviour of synapse when I tested the validate schema sample. Indeed I used an xsd file where the schema tag did not contain the "elementFormDefault="qualified"" attribute. As a consequence, the validation did not work. I added this attribute and it worked. I thought it was an optional element.
Sihem
---------------------------------
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail
RE : Re: RE : Re: RE : Re: SOAP fault messages
Posted by Sihem <st...@yahoo.fr>.
Ok!! I thought that by default, the value of elementFormDefault was "qualified"
Thanks a lot! I am progressing!
Sihem
---------------------------------
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail
Re: RE : Re: RE : Re: SOAP fault messages
Posted by indika kumara <in...@gmail.com>.
hi Sihem
When the schema tag did not contain the "elementFormDefault="qualified""
attribute, It is same as defining "elementFormDefault="unqualified"". The
attribute "elementFormDefault="unqualified"" indicates "whether or not
locally declared elements and attributes must be unqualified".Please look at
the following sample explanation. Consider the synapse sample number 7 .In
this sample , we get the first child of the SOAP body as the validation
source (Xml) and it looks like as follow.
<m0:getQuote xmlns:m0="http://services.samples/xsd">
<m0:request>
<m0:symbol>IBM</m0:symbol>
</m0:request>
</m0:getQuote>
If we use the schema as follows , then the validation will be success .
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="http://services.samples/xsd" elementFormDefault="qualified"
attributeFormDefault="unqualified"
targetNamespace="http://services.samples/xsd">
<xs:element name="getQuote">
<xs:complexType>
<xs:sequence>
<xs:element name="request">
<xs:complexType>
<xs:sequence>
<xs:element name="symbol" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
if we remove the attribute elementFormDefault="qualified" or set it as
elementFormDefault="unqualified", then validation will be failed , because
validation source (stock quote request – the first child of SOAP BODY)
contains the *qualified* local elements.
If we use attribute elementFormDefault="unqualified" in our schema , then to
success the validation, the request message should be as follows.
<m0:getQuote xmlns:m0="http://services.samples/xsd">
<request>
<symbol>IBM</symbol>
</request>
</m0:getQuote>
But both of following requests also will be failed.(contains one or more
qualified element )
<m0:getQuote xmlns:m0="http://services.samples/xsd">
<m0:request>
<symbol>IBM<symbol>
</m0:request>
</m0:getQuote>
<m0:getQuote xmlns:m0="http://services.samples/xsd">
<request>
<m0:symbol>IBM</m0:symbol>
</request>
</m0:getQuote>
Therefore If you have removed the elementFormDefault="qualified" attribute,
then validation must be failed if the source Xml (the first child of SOAP
Body) contains qualified elements. It is the correct behavior .
thanks
Indika
On Nov 28, 2007 2:01 PM, Sihem <st...@yahoo.fr> wrote:
> Hi Asankha,
> thanks a lot for your answer. It is now clear for me. And you are right,
> the remaining exception was thrown because the secure2 endpoint does not
> exist.
> To finish, I would like to describe you a strange behaviour of synapse
> when I tested the validate schema sample. Indeed I used an xsd file where
> the schema tag did not contain the "elementFormDefault="qualified""
> attribute. As a consequence, the validation did not work. I added this
> attribute and it worked. I thought it was an optional element.
> Sihem
>
>
> ---------------------------------
> Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo!
> Mail
>