IMPORTANT:
this is not a Support Forum! Experienced users might answer from time to time questions posted here. If you need a professional and reliable answer, or if you want to report a bug, please contact Altova Support instead.

How can I verify a SOAP request? Options · View
ceving
Posted: Thursday, October 1, 2009 8:19:38 AM
Rank: Newbie

Joined: 10/1/2009
Posts: 5
Location: DE
Hi,

I have created a XSD and a WSDL with XMLSyp. WSDL uses type definitions from the XSD.

Now I created a SOAP request with XMLSpy and I would like to validate the quest. The generated request is:
Code:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:m0="http://localhost/test/test-workflow.xsd">
    <SOAP-ENV:Body>
        <login xsi:type="m0:login_t">String</login>
        <password xsi:type="m0:password_t">String</password>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

I have installed a web server and placed the schema file at the correct place. So the URL http://localhost/test/test-workflow.xsd is valid and delivers the correct schema file.

But when I try to validate the SOAP request I get the error, that the request is invalid, because some referenced file could not be found:
Quote:
Die Datei C:\Dokumente und Einstellungen\tester\Eigene Dateien\Unbenannt9.xml ist nicht gültig.
Referenz auf einen in dieser Dokumenteninstanz unterstützten Schematyp (DTD, W3C Schema) konnte nicht gefunden werden.

Sorry but there seems to be no way to get an english error message out of the german XMLSpy.

So the question is: why does XMLSpy not find any URL which has been generated by itself?
And: where is the error and how can I fix it?

My problem is that XMLSpy even does not tell which file is missing. How can I find out this?

Regards,
Sascha
rip
Posted: Thursday, October 1, 2009 8:34:53 AM
Rank: Advanced Member

Joined: 7/17/2008
Posts: 185
Location: Minutiae, Triviality
in

Code:
xmlns:m0="http://localhost/test/test-workflow.xsd"

//

the text string "http://localhost/test/test-workflow.xsd"

is a text string which identifies as a globally unique ID the namespace herein referred to as "m0".

Given that, xmlns:m0="foo" should be not be read as "This is where you go to get this namespace definition: foo" because that isn't what it means.

see http://www.w3.org/TR/xmlschema-0/#schemaLocation

add

Code:
xsi:schemaLocation="http://localhost/test/test-workflow.xsd test-workflow.xsd"

//

to your SOAP-ENV:Envelope element.

add

Code:
targetNamespace="http://localhost/test/test-workflow.xsd"

//

to your test-workflow.xsd file. (edit) This assumes that the example9.xml file is in the same directory as the test-workflow.xsd file. If you want to use the actual url in place of the simple 'test-workflow.xsd' relative uri, you can and XMLSpy will follow it to get the xsd data as expected...

But, this leads to the next error:

Code:

File C:\ForumPosts\XMLSpy\Untitled15.xml is not valid.
    The element declaration was not found for root element <SOAP-ENV:Envelope>.
        Error location: SOAP-ENV:Envelope
        Details
            cvc-elt.1: The element declaration was not found for root element <SOAP-ENV:Envelope>.

//

Resolution of this error is left as an exercise :)

Users browsing this topic
guest

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Use of the Altova User Forum(s) is governed by the Altova Terms of Use.