- This topic has 8 replies, 3 voices, and was last updated 20 years ago by
Riyad Kalla.
-
AuthorPosts
-
skirkMemberHello.
We’re using MyEclipse to deploy a large(ish)-scale servlet-based J2EE application which is split between roughly 40 projects. Of these, only one that is an actual “web project”, which contains the common web.xml file, along with a web-services.xml file that we use to define a user provisoning service.
We are using MyEcliipse 3.8.2, with Eclipse 3.0.1, and I have applied the latest two quick fix patches, but the problem I am getting is that the XML validator shows an error on the web-services.xml file, even though I cannot see anything wrong with it. The file is this:
<?xml version="1.0" encoding="UTF-8"?> <web-services> <web-service useSOAP12="false" targetNamespace="http://www.voxsurf.com/WebServices/ProvisioningWS" name="ProvisioningWS" style="rpc" uri="/ProvisioningWS"> <components> <java-class name="jcComp0" class-name="com.voxsurf.provisioning.VxsProvisioningService" /> </components> <operations> <operation name="load" method="load(long,java.lang.String)" component="jcComp0"> <params> <param style="in" xmlns:xsd="http://www.w3.org/2001/XMLSchema" type="xsd:long" location="body" name="longVal" class-name="long" /> <param style="in" xmlns:xsd="http://www.w3.org/2001/XMLSchema" type="xsd:string" location="body" name="string" class-name="java.lang.String" /> <return-param xmlns:xsd="http://www.w3.org/2001/XMLSchema" type="xsd:int" location="body" name="result" class-name="int" /> </params> </operation> <operation name="delete" method="delete(long)" component="jcComp0"> <params> <param style="in" xmlns:xsd="http://www.w3.org/2001/XMLSchema" type="xsd:long" location="body" name="longVal" class-name="long" /> <return-param xmlns:xsd="http://www.w3.org/2001/XMLSchema" type="xsd:int" location="body" name="result" class-name="int" /> </params> </operation> </operations> </web-service> </web-services>
The error in the validator is:
cvs-elt1.1: Cannot find the declaration of element 'web-services'.
So it seems as if the validator is using the XML schema defined for the xsd int and long types for the whole page.
Can anybody explain what’s going on? Even if just to remove the X’s from the error, as it makes everybody think that there is some problem with the project when they check it out of CVS. 🙂
Cheers,
Simon
skirkMemberSorry, my mistake, the error is actually:
cvc-elt.1: Cannot find the declaration of element 'web-services'.
I’m too used to writing “cvs”!
S
Riyad KallaMemberskirk,
I’ve thrown this XML document into a few online validators and none of them liked it… a few complained about the missing doctype but one gave a long list of problems pertaining to used-but-not-defined tags… are you sure that this file is valid? What happens if you turn on validation in your application server so it checks the files before it parses it… does it like this file?
skirkMemberHi Riyad.
It really is quite possible that it’s not valid. I’ve inherited a bit of a poison chalice here – nobody really seems to know (or be willing to own up to writing the file!) and I was hoping it would be something people had already seen before.
Could you tell me what validators you’ve tried it on? I can then use them as a basis for hopefully sorting the file out.
Incidentally, there IS a similar example to this file here in this url:
http://forums.bea.com/bea/thread.jspa?threadID=200076231&tstart=120
And the context is the same (a web-services deployment file for a J2EE application server). So perhaps it’s not as invalid as one might think? If I recall correctly, it does run up OK within the application servers it’s deployed on to.
Cheers,
S
Riyad KallaMemberskirk,
Its possible that this file isn’t a valid XML file as far as the the grant-scheme-of-xml-goes, but is valid for your app server… this problem is similar to how XDOclet chose to use the extension “xml” for its merge files and such, which are not valid XML documents either.In 3.8.3 we added the ability to turn off validation on a per-file or per-resource basis by marking it as derived. I’m thinking this is probably what will work around this for you and get rid of the bothersome validation message. We are beta testing 3.8.3 right now and it should be out in the next couple of weeks, are you able to work with this until then?
AFA the XML validators, just do a google for “XML Validator” And use the first 4 online ones, I think they were all within the first 2 pages.
jhalebliMemberIs this validation setting working in 3.8.3? I just tried setting some files to derived and it’s still running validation on them…
Thanks.
Riyad KallaMember1) Right click on your project root, MyEclipse > Remove all Validation markers
2) Right click > Properties on your resource that you don’t want validated, make sure “Derived” is checked, hit OK
3) Make sure Project > Build Automatically is checked
4) Project > Clean > <select current project> > Hit OKAfter the project has rebuilt, did the validation error still show up? Keep in mind that if you turn on derived for a resource that currently has validation errors, the errors won’t be removed until you manually remove them; it is just that every time after that validation will skip that file; but you need to first remove those validation errors (that was Step #1 in the outline above).
jhalebliMemberThanks, that was perfect. Worked like a charm!
Riyad KallaMemberGlad to hear it.
-
AuthorPosts