|
Re: Validate WSDL Ant Task [message #1065101 is a reply to message #1065073] |
Mon, 24 June 2013 11:34 |
|
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 12:17 |
Jakob Braeuchi Messages: 69 Registered: July 2009 Location: Switzerland |
Member |
|
|
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 12:29] Report message to a moderator
|
|
|
|
Re: Validate WSDL Ant Task [message #1065136 is a reply to message #1065128] |
Mon, 24 June 2013 13:26 |
Jakob Braeuchi Messages: 69 Registered: July 2009 Location: Switzerland |
Member |
|
|
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 13:27] Report message to a moderator
|
|
|
|
Re: Validate WSDL Ant Task [message #1065164 is a reply to message #1065136] |
Mon, 24 June 2013 14:37 |
|
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
|
|
|
|
Powered by
FUDForum. Page generated in 0.04214 seconds