Forum Discussion

pascalSoap's avatar
pascalSoap
Occasional Contributor
15 years ago

Assertion Schema Compliance failed -"not valid NCName error"

Hello ,

I have an error on a Schema Compliance assertion which failed with the message :

"
...
line 4: Invalid QName value: Localname not a valid NCName in 'GetListOfDocbaseFault:3'
...
"

And i have the following message in the SoapUI log :
"
...
Thu Feb 10 09:50:33 CET 2011:WARN:Missing matching Fault in wsdl for Fault Detail element [<detail/>] in bindingOperation [getListOfDocbase]
...
"
And Here is the output :
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<soapenv:Fault xmlns:GetListOfDocbaseFault="http://xxxxxxxxxxxxxx">
<faultcode>GetListOfDocbaseFault:3</faultcode>
<faultstring>Erreur : L'utilisateur n'est déclaré dans aucun des référentiels trouvés</faultstring>
<detail/>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>


1 / Are the two messages above linked ?
2 / I suppose the problem is that there is no opening <detail> tag in the output. Can somebody tell wether I am right or not ?
3 / If it's true wan someone tell what's the cause of such an error, wxhere it is formed and how o fix it ?

Thanks in advance,
Pascal

4 Replies

  • 1 / Yes
    2 / Yes without doubt. (vu la question, tu devrais sérieusement te replonger dans le baba du xml qui précise que toute balise ouvrante doit etre fermé)
    car tu sembles utilise l'assert schema compliance soit comprendre ce que cela signifie.

    3 / If it's true wan someone tell what's the cause of such an error, wxhere it is formed and how o fix it ?
    Soapui renvoie juste le résultat. Rien a faire du côté de Soapui.
    Soapui côté ws affiche basiquement. IL ne s'amuse pas à le transformer.
    Je pense que tu devrais aussi revoir à quoi sert Soapui.

    Sinon, L'erreur vient de la webapp. Corrige le code source qui génère le wsdl. Personne pourra t'aider sur cela.
    On a aucune indication comment cela est généré etc. Si tu est juste utilisateur du ws remonte cela a la MOE en charge.
  • pascalSoap's avatar
    pascalSoap
    Occasional Contributor
    Hello,

    Thanks for the answer

    Don't worry and please don't be bothering :
    - No problem for the closing tag, I've learned it for a long time ... and I know XML thanks.
    - It seems to me I have guessed the meaning of schema compliance. Just wanted to have confirmation.
    - I know for what use is Soap UI, thanks a lot.

    Well about the question itself, I have checked with the team I have asked to develop the Web Service : The cause is that they have choosen to send back a Fault Object which contains one more tag than the one specified in the WSDL ; this way it is easier for them to handle the set of error messages server-side. I have checked with the client application developpement team also : There is no impact client-side, the real client application (which is a WebPart component included in a SharePoint site) simply ignores this tag. The Soap UI tool, though, detects there is something unexpected in the response

    Salut,
    Pascal

    PS : je réponds en anglais pour m'entraîner !
  • see the wsdl file. If it is a customized soapfault this might be declare along with wsdl:input, wsdl:output and wsdl:fault
    Example :
        
    <wsdl:operation name="CloneStuff">
    <wsdl:input message="tns:CloneStuffRequest" name="CloneStuffRequest" />
    <wsdl:output message="tns:CloneStuffResponse" name="CloneStuffResponse"/>
    <wsdl:fault message="tns:KebabWsFault" name="KebabWsFault"/>
    </wsdl:operation>


    The client may have no problem because they are not using fault at all to catch some special fields or are already aware how the structure of the fault .

    So they can dig into if needed to retrieve customized elements in the soapfault (errorCode ...). (faultcode is a standard one for example )
  • pascalSoap's avatar
    pascalSoap
    Occasional Contributor
    Thank you for the answer
    I've learned a little bit about Soap Fault and so on since then and could manage it
    Bye