Skip to main content



      Home
Home » Archived » Buckminster » Validate WSDL Ant Task
Validate WSDL Ant Task [message #1065073] Mon, 24 June 2013 04:49 Go to next message
Eclipse UserFriend
hi,

i have the following ant-script to validate a WSDL

	<path id="validation.class.path">
		<fileset dir="${eclipse.home}/plugins">
			 <include name="**/*.jar"/>
		</fileset>
	</path>

	<taskdef name="wsdl.validate" classname="org.eclipse.wst.wsdl.validation.internal.ui.ant.WSDLValidate">
		<classpath refid="validation.class.path" />
	</taskdef>


	<target name="validate.wsdl">
		<property name="wsdl.file" value="${wsdl.name}" />

		<echo message="Validate WSDL: ${wsdl.file}"/>
		
		<wsdl.validate file="${wsdl.file}"/>
	</target>


This ant script is called from a Buckminster Action.
When invoking the action i get this error:

[ant] ERROR 13:62:cvc-elt.1: Cannot find the declaration of element 'wsdl:definitions'.

When i validate the WSDL using Context Menu->Validate it works.

I also wrote a Buckminster Actor in Java to validate the WSDL using org.eclipse.wst.wsdl.validation.internal.eclipse.WSDLValidator .
Invoking this actor from an action also works.

What's wrong with the ant actor here ?

thanks
jakob

see http://www.eclipse.org/forums/index.php/t/489318/
Re: Validate WSDL Ant Task [message #1065101 is a reply to message #1065073] Mon, 24 June 2013 07:34 Go to previous messageGo to next message
Eclipse UserFriend
It looks as though it finds the WSDLValidate class OK but then the task fails somehow. Where is the reference to
'wsdl:definitions' declared?

- thomas

On 2013-06-24 10:49, Jakob Braeuchi wrote:
> hi,
>
> i have the following ant-script to validate a WSDL
>
>
> <path id="validation.class.path">
> <fileset dir="${eclipse.home}/plugins">
> <include name="**/*.jar"/>
> </fileset>
> </path>
>
> <taskdef name="wsdl.validate" classname="org.eclipse.wst.wsdl.validation.internal.ui.ant.WSDLValidate">
> <classpath refid="validation.class.path" />
> </taskdef>
>
>
> <target name="validate.wsdl">
> <property name="wsdl.file" value="${wsdl.name}" />
>
> <echo message="Validate WSDL: ${wsdl.file}"/>
>
> <wsdl.validate file="${wsdl.file}"/>
> </target>
>
>
> This ant script is called from a Buckminster Action.
> When invoking the action i get this error:
>
> [ant] ERROR 13:62:cvc-elt.1: Cannot find the declaration of element 'wsdl:definitions'.
>
> When i validate the WSDL using Context Menu->Validate it works.
>
> I also wrote a Buckminster Actor in Java to validate the WSDL using
> org.eclipse.wst.wsdl.validation.internal.eclipse.WSDLValidator .
> Invoking this actor from an action also works.
> What's wrong with the ant actor here ?
>
> thanks
> jakob
>
> see http://www.eclipse.org/forums/index.php/t/489318/
Re: Validate WSDL Ant Task [message #1065113 is a reply to message #1065101] Mon, 24 June 2013 08:17 Go to previous messageGo to next message
Eclipse UserFriend
hi thomas,

this is at the beginning of the WSDL:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
	xmlns:tns="http://www.example.org/NewWSDLFile/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
	xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="NewWSDLFile"
	targetNamespace="http://www.example.org/NewWSDLFile/">
...



additional hint:
when i was debugging my java-actor (started an eclipse within an eclipse) i also got the cvc-elt error. same happened when i was debugging the context-menu action.
after exporting the bundle containing the java-actor into the dropins-folder the WSDL validated fine.


jakob

[Updated on: Mon, 24 June 2013 08:29] by Moderator

Re: Validate WSDL Ant Task [message #1065128 is a reply to message #1065113] Mon, 24 June 2013 09:07 Go to previous messageGo to next message
Eclipse UserFriend
My guess is that it doesn't find this file at all. You echo the value of ${wsdl.file} just before the call. Does it show
the correct (full) path?

- thomas

On 2013-06-24 14:17, Jakob Braeuchi wrote:
> hi thomas,
>
> this is at the beginning of the WSDL:
>
>
> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
> <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:tns="http://www.example.org/NewWSDLFile/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="NewWSDLFile"
> targetNamespace="http://www.example.org/NewWSDLFile/">
> ...
>
>
> jakob
Re: Validate WSDL Ant Task [message #1065136 is a reply to message #1065128] Mon, 24 June 2013 09:26 Go to previous messageGo to next message
Eclipse UserFriend
this is the output:

[start ch.rtc.jabas.esb.test.srv2.interfaces:osgi.bundle$1.0.0.qualifier#ws.validate.ant]
[ant] Validate WSDL: src/java/ch/rtc/jabas/esb/test/srv2/neutral/impl/NewWSDLFile.wsdl
[ant] ---------------------------------------
[ant] Validating file:///C:/Eclipse_Workspaces/Jabas_ESB/plugins/ch.rtc.jabas.esb.test.srv2.interfaces/src/java/ch/rtc/jabas/esb/test/srv2/neutral/impl/NewWSDLFile.wsdl - INVALID
[ant] ---------------------------------------
[ant] ERROR   5:56:cvc-elt.1: Cannot find the declaration of element 'wsdl:definitions'.
[ant] 
[end ch.rtc.jabas.esb.test.srv2.interfaces:osgi.bundle$1.0.0.qualifier#ws.validate.ant]


"Validate WDSL" comes from my ANT-Actor, "Validating file" from the ANT-Task i suppose.


The file can be found. I slightly modified it (replaced "wsdl:definitions" with "Xwsdl:definitions"), then I get the following errors:

[start ch.rtc.jabas.esb.test.srv2.interfaces:osgi.bundle$1.0.0.qualifier#ws.validate.ant]
[ant] Validate WSDL: src/java/ch/rtc/jabas/esb/test/srv2/neutral/impl/NewWSDLFile.wsdl
[ant] ---------------------------------------
[ant] Validating file:///C:/Eclipse_Workspaces/Jabas_ESB/plugins/ch.rtc.jabas.esb.test.srv2.interfaces/src/java/ch/rtc/jabas/esb/test/srv2/neutral/impl/NewWSDLFile.wsdl - INVALID
[ant] ---------------------------------------
[ant] ERROR   5:56:The prefix "Xwsdl" for element "Xwsdl:definitions" is not bound.
[ant] 
[end ch.rtc.jabas.esb.test.srv2.interfaces:osgi.bundle$1.0.0.qualifier#ws.validate.ant]


[Updated on: Mon, 24 June 2013 09:27] by Moderator

Re: Validate WSDL Ant Task [message #1065139 is a reply to message #1065136] Mon, 24 June 2013 09:37 Go to previous messageGo to next message
Eclipse UserFriend
i added a small sample containing a WSDL, the ANT-Script and the CSPEX.

[Updated on: Mon, 24 June 2013 09:42] by Moderator

Re: Validate WSDL Ant Task [message #1065164 is a reply to message #1065136] Mon, 24 June 2013 10:37 Go to previous messageGo to next message
Eclipse UserFriend
On 2013-06-24 15:26, Jakob Braeuchi wrote:
> this is the output:
>
>
> [start ch.rtc.jabas.esb.test.srv2.interfaces:osgi.bundle$1.0.0.qualifier#ws.validate.ant]
> [ant] Validate WSDL: src/java/ch/rtc/jabas/esb/test/srv2/neutral/impl/NewWSDLFile.wsdl
> [ant] ---------------------------------------
> [ant] Validating
> file:///C:/Eclipse_Workspaces/Jabas_ESB/plugins/ch.rtc.jabas.esb.test.srv2.interfaces/src/java/ch/rtc/jabas/esb/test/srv2/neutral/impl/NewWSDLFile.wsdl
> - INVALID
> [ant] ---------------------------------------
> [ant] ERROR 5:56:cvc-elt.1: Cannot find the declaration of element 'wsdl:definitions'.
> [ant] [end ch.rtc.jabas.esb.test.srv2.interfaces:osgi.bundle$1.0.0.qualifier#ws.validate.ant]
>
>
> "Validate WDSL" comes from my ANT-Actor, "Validating file" from the ANT-Task i suppose.
>
>
> The file can be found. I slightly modified it (replaced "wsdl:definitions" with "Xwsdl:definitions"), the I get the
> following errors:
>
>
>
> [start ch.rtc.jabas.esb.test.srv2.interfaces:osgi.bundle$1.0.0.qualifier#ws.validate.ant]
> [ant] Validate WSDL: src/java/ch/rtc/jabas/esb/test/srv2/neutral/impl/NewWSDLFile.wsdl
> [ant] ---------------------------------------
> [ant] Validating
> file:///C:/Eclipse_Workspaces/Jabas_ESB/plugins/ch.rtc.jabas.esb.test.srv2.interfaces/src/java/ch/rtc/jabas/esb/test/srv2/neutral/impl/NewWSDLFile.wsdl
> - INVALID
> [ant] ---------------------------------------
> [ant] ERROR 5:56:The prefix "Xwsdl" for element "Xwsdl:definitions" is not bound.
> [ant] [end ch.rtc.jabas.esb.test.srv2.interfaces:osgi.bundle$1.0.0.qualifier#ws.validate.ant]
>
>
>
Ok, so the taskdef is bound (which is Buckminster and Ants responsibility with respect to class loaders and such), the
file parameter is passed on correctly and the task starts OK. I'm afraid that what happens after that is beyond what I
can help out with.

- thomas
Re: Validate WSDL Ant Task [message #1065269 is a reply to message #1065164] Tue, 25 June 2013 04:03 Go to previous message
Eclipse UserFriend
hi thomas,

i can reproduce the problem with a plain ANT-script (no Buckminster involved). So I'll try to get an answer from WTP.


the idea was to validate the WSDL before generating the artifacts. This does not work because of the ANT problems; so I decided to force validation of the WSDL whenever it is saved with a builder defined in .project.


jakob
Previous Topic:CQuery import issues on Mac using SVN reader
Next Topic:Buckminster does not resolve fragment host plugin
Goto Forum:
  


Current Time: Wed Jun 18 11:08:04 EDT 2025

Powered by FUDForum. Page generated in 0.05536 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top