Hi,

Thanks for the info. It works finally! Just a word of warning, there are
about 50 errors in the printer example wsdl and xsd. 

I suggest someone try building it and solving each problem. :(

Thanks
Shahzad 

-----Original Message-----
From: Ian Springer [mailto:[EMAIL PROTECTED] 
Sent: 18 March 2005 22:58
To: [email protected]
Subject: Re: WSDL2Java error

Hi,

This means you need to define your RP properties via element refs, as
follows:

        <xsd:element name="Comment" type="xsd:string" >

        <xsd:element name="CreateShibbolethBrowserSession_properties" >
                <xsd:complexType>
                        <xsd:sequence>
                                <xsd:element ref="wsrf-shibb:Comment" />
                        </xsd:sequence>
                </xsd:complexType>
        </xsd:element>

As opposed to the way you are doing it.

The ResourceProperties spec dictates that this is how the resource property
document must be defined (using element refs). See chapter 4 of the spec
(http://docs.oasis-open.org/wsrf/2004/11/wsrf-WS-ResourceProperties-1.2-draf
t-05.pdf).

Ian


Shahzad Younas wrote:

> Now I am getting the error: - what does this mean?
>
> *C:\Junk2\ShibbolethBrowserSession\build.xml:13: 
> org.apache.ws.resource.InvalidWsrfWsdlException: All element defs 
> within the resource property document def must have a 'ref' attribute 
> that points at a global element def.*
>         at
> org.apache.ws.resource.tool.Wsdl2JavaTask.execute(Wsdl2JavaTask.java:229)
>         at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>         at org.apache.tools.ant.Task.perform(Task.java:364)
>         at org.apache.tools.ant.Target.execute(Target.java:341)
>         at org.apache.tools.ant.Target.performTasks(Target.java:369)
>         at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
>         at org.apache.tools.ant.Project.executeTargets(Project.java:1062)
>         at org.apache.tools.ant.Main.runBuild(Main.java:673)
>         at org.apache.tools.ant.Main.startAnt(Main.java:188)
>         at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
>         at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)
> Caused by: org.apache.ws.resource.InvalidWsrfWsdlException: All 
> element defs within the resource property document def must have a 
> 'ref' attribute that points at a global element def.
>         at
> org.apache.ws.util.WsrfWsdlUtils.getElementRefName(WsrfWsdlUtils.java:210)
>         at
>
org.apache.ws.util.WsrfWsdlUtils.getResourcePropertyNames(WsrfWsdlUtils.java
:166)
>         at
>
org.apache.ws.resource.impl.ResourceCapabilityImpl.initPropertyNames(Resourc
eCapabilityImpl.java:158)
>         at
>
org.apache.ws.resource.impl.ResourceCapabilityImpl.<init>(ResourceCapability
Impl.java:74)
>         at
>
org.apache.ws.resource.impl.ResourceDefinitionImpl.<init>(ResourceDefinition
Impl.java:45)
>         at
> org.apache.ws.resource.tool.Wsdl2Java.processWsdlFile(Wsdl2Java.java:205)
>         at
> org.apache.ws.resource.tool.Wsdl2Java.generate(Wsdl2Java.java:188)
>         at
> org.apache.ws.resource.tool.Wsdl2JavaTask.execute(Wsdl2JavaTask.java:225)
>         ... 10 more
> --- Nested Exception ---
> org.apache.ws.resource.InvalidWsrfWsdlException: All element defs 
> within the resource property document def must have a 'ref' attribute 
> that points at a global element def.
>         at
> org.apache.ws.util.WsrfWsdlUtils.getElementRefName(WsrfWsdlUtils.java:210)
>         at
>
org.apache.ws.util.WsrfWsdlUtils.getResourcePropertyNames(WsrfWsdlUtils.java
:166)
>         at
>
org.apache.ws.resource.impl.ResourceCapabilityImpl.initPropertyNames(Resourc
eCapabilityImpl.java:158)
>         at
>
org.apache.ws.resource.impl.ResourceCapabilityImpl.<init>(ResourceCapability
Impl.java:74)
>         at
>
org.apache.ws.resource.impl.ResourceDefinitionImpl.<init>(ResourceDefinition
Impl.java:45)
>         at
> org.apache.ws.resource.tool.Wsdl2Java.processWsdlFile(Wsdl2Java.java:205)
>         at
> org.apache.ws.resource.tool.Wsdl2Java.generate(Wsdl2Java.java:188)
>         at
> org.apache.ws.resource.tool.Wsdl2JavaTask.execute(Wsdl2JavaTask.java:225)
>         at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>         at org.apache.tools.ant.Task.perform(Task.java:364)
>         at org.apache.tools.ant.Target.execute(Target.java:341)
>         at org.apache.tools.ant.Target.performTasks(Target.java:369)
>         at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
>         at org.apache.tools.ant.Project.executeTargets(Project.java:1062)
>         at org.apache.tools.ant.Main.runBuild(Main.java:673)
>         at org.apache.tools.ant.Main.startAnt(Main.java:188)
>         at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
>         at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)
>
> Total time: 6 seconds
>
>
> -----Original Message-----
> From: Shahzad Younas [mailto:[EMAIL PROTECTED]
> Sent: 18 March 2005 22:19
> To: [email protected]
> Subject: RE: WSDL2Java error
>
> Hi Ian,
>
> Thanks for your explanation with the resource ID thing. I get it now!
>
> Re the ant error, it still doesn't work. Ive added:
>
>         <xsd:element name="CreateShibbolethBrowserSession_properties" >
>                 <xsd:complexType>
>                         <xsd:sequence>
>                                 <xsd:element name="Comment"
> type="xsd:string"/>
>                         </xsd:sequence>
>                 </xsd:complexType>
>         </xsd:element>
>
> To my xsd, and modified the line to read (in my wsdl)
>
>         <wsdl:portType name="CreateShibbolethBrowserSession"
> wsrf-rp:ResourceProperties="wsrf-shibb:CreateShibbolethBrowserSession_
> proper
> ties">
>
> But I am still getting the same error.
> I think we are on the right lines though, but it strikes me as odd 
> that the printer wsdl gives the same error.
>
> Shahzad
>
> -----Original Message-----
> From: Ian Springer [mailto:[EMAIL PROTECTED]
> Sent: 18 March 2005 21:56
> To: [email protected]
> Subject: Re: WSDL2Java error
>
> Hi Shahzad,
>
> I think it's happening because the CreateShibbolethBrowserSession 
> portType does not have a wsrf-rp:ResourceProperties attribute that 
> points to a props doc. This is a bug in Wsdl2Java, since WSRF does not 
> require all portTypes to have resource props; we'll fix this in the 
> source. In the meantime, as a workaround, try adding the attribute to 
> the portype and pointing it at an empty props doc.
>
> Thanks,
> Ian
>
> Shahzad Younas wrote:
>
> > I've tried to run the same ant task using the wsdl of the Printer 
> > example, and I am getting the same error! However, with the 
> > FileSystem example, it works fine.
> > Its got me stumped.
> > 
> > Shahzad
> >
> > --------------------------------------------------------------------
> > --
> > --
> > *From:* Campana Jr., Salvatore J [mailto:[EMAIL PROTECTED]
> > *Sent:* 18 March 2005 18:54
> > *To:* [email protected]
> > *Subject:* RE: WSDL2Java error
> >
> > Maybe send your wsdl ...I'm suspecting there may be something else...
> >
> > --------------------------------------------------------------------
> > --
> > --
> > *From:* Campana Jr., Salvatore J
> > *Sent:* Friday, March 18, 2005 1:50 PM
> > *To:* [email protected]
> > *Subject:* RE: WSDL2Java error
> >
> > Shahzad,
> > 
> > You found a bug...good work!
> > 
> > The work around for you would be to define at least one resource 
> > property in your wsdl, once you've done that you should be fine.
> > 
> > We'll add an issue for this in Jira...
> > 
> > thx!
> >
> > --------------------------------------------------------------------
> > --
> > --
> > *From:* Shahzad Younas [mailto:[EMAIL PROTECTED]
> > *Sent:* Friday, March 18, 2005 1:26 PM
> > *To:* [email protected]
> > *Subject:* RE: WSDL2Java error
> >
> > BTW, i missed abit which goes at the end of the output given by ant:
> > 
> > BUILD FAILED
> > C:\Junk2\ShibbolethBrowserSession\build.xml:13:
> > java.lang.NullPointerException
> >         at
> > 
> org.apache.ws.resource.tool.Wsdl2JavaTask.execute(Wsdl2JavaTask.java:2
> 29)
> >         at
> > org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
> >         at org.apache.tools.ant.Task.perform(Task.java:364)
> >         at org.apache.tools.ant.Target.execute(Target.java:341)
> >         at org.apache.tools.ant.Target.performTasks(Target.java:369)
> >         at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
> >         at
> org.apache.tools.ant.Project.executeTargets(Project.java:1062)
> >         at org.apache.tools.ant.Main.runBuild(Main.java:673)
> >         at org.apache.tools.ant.Main.startAnt(Main.java:188)
> >         at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
> >         at 
> > org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)
> > Caused by: java.lang.NullPointerException
> >         at java.util.Arrays$ArrayList.<init>(Arrays.java:2342)
> >         at java.util.Arrays.asList(Arrays.java:2328)
> >         at
> >
> org.apache.ws.resource.impl.ResourceCapabilityImpl.validateProperties(
> Resour
> ceCapabilityImpl.java:87)
> >         at
> >
> org.apache.ws.resource.impl.ResourceCapabilityImpl.<init>(ResourceCapa
> bility
> Impl.java:80)
> >         at
> >
> org.apache.ws.resource.impl.ResourceDefinitionImpl.<init>(ResourceDefi
> nition
> Impl.java:45)
> >         at
> > 
> org.apache.ws.resource.tool.Wsdl2Java.processWsdlFile(Wsdl2Java.java:2
> 05)
> >         at
> > org.apache.ws.resource.tool.Wsdl2Java.generate(Wsdl2Java.java:188)
> >         at
> > 
> org.apache.ws.resource.tool.Wsdl2JavaTask.execute(Wsdl2JavaTask.java:2
> 25)
> >         ... 10 more
> > --- Nested Exception ---
> > java.lang.NullPointerException
> >         at java.util.Arrays$ArrayList.<init>(Arrays.java:2342)
> >         at java.util.Arrays.asList(Arrays.java:2328)
> >         at
> >
> org.apache.ws.resource.impl.ResourceCapabilityImpl.validateProperties(
> Resour
> ceCapabilityImpl.java:87)
> >         at
> >
> org.apache.ws.resource.impl.ResourceCapabilityImpl.<init>(ResourceCapa
> bility
> Impl.java:80)
> >         at
> >
> org.apache.ws.resource.impl.ResourceDefinitionImpl.<init>(ResourceDefi
> nition
> Impl.java:45)
> >         at
> > 
> org.apache.ws.resource.tool.Wsdl2Java.processWsdlFile(Wsdl2Java.java:2
> 05)
> >         at
> > org.apache.ws.resource.tool.Wsdl2Java.generate(Wsdl2Java.java:188)
> >         at
> > 
> org.apache.ws.resource.tool.Wsdl2JavaTask.execute(Wsdl2JavaTask.java:2
> 25)
> >         at
> > org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
> >         at org.apache.tools.ant.Task.perform(Task.java:364)
> >         at org.apache.tools.ant.Target.execute(Target.java:341)
> >         at org.apache.tools.ant.Target.performTasks(Target.java:369)
> >         at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
> >         at
> org.apache.tools.ant.Project.executeTargets(Project.java:1062)
> >         at org.apache.tools.ant.Main.runBuild(Main.java:673)
> >         at org.apache.tools.ant.Main.startAnt(Main.java:188)
> >         at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
> >         at 
> > org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)
> > 
> >
> > --------------------------------------------------------------------
> > --
> > --
> > *From:* Shahzad Younas [mailto:[EMAIL PROTECTED]
> > *Sent:* 18 March 2005 18:21
> > *To:* [email protected]
> > *Subject:* RE: WSDL2Java error
> >
> > That gave alot of output!
> > 
> > The stack trace is attached. Thanks for your help. It has worked 
> > previously on my system because I have completed this task 
> > successfully previously.
> > Shahzad
> >
> > --------------------------------------------------------------------
> > --
> > --
> > *From:* Campana Jr., Salvatore J [mailto:[EMAIL PROTECTED]
> > *Sent:* 18 March 2005 17:50
> > *To:* [email protected]
> > *Subject:* RE: WSDL2Java error
> >
> > run ant with the -d flag you should see a stack trace which will 
> > give us more to go on...
> > 
> > thx!
> >
> > --------------------------------------------------------------------
> > --
> > --
> > *From:* Shahzad Younas [mailto:[EMAIL PROTECTED]
> > *Sent:* Friday, March 18, 2005 12:41 PM
> > *To:* [email protected]
> > *Subject:* WSDL2Java error
> >
> > Hi,
> > 
> > I have created my wsdl file, but I am hitting an error when I run 
> > the ant task to wsdl2java it.
> > I get:
> > 
> > [wsdl2Java] --> 03-18-05 17:36:37 DEBUG [main] ProjectResourceBundle:
> > org.apache.ws.resource.i18n.resource::handleGetObject(OPT_ENABLE_DEB
> > UG
> > ) [wsdl2Java] --> 03-18-05 17:36:41 ERROR [main] velocity:
> > ResourceManager : unable to find resource 'VM_global_library.vm' in 
> > any resource loader.
> > [wsdl2Java] Processing WSDL file
> > "C:\Junk2\ShibbolethBrowserSession\ShibbolethBrowserSession.wsdl"...
> > [wsdl2Java] Retrieving document at
> > 'C:\Junk2\ShibbolethBrowserSession\ShibbolethBrowserSession.wsdl'.
> > [wsdl2Java] Retrieving document at
> > './spec/wsrf/WS-ResourceProperties-1_2-Draft_05.wsdl', relative to
> > 
> 'file:/C:/Junk2/ShibbolethBrowserSession/ShibbolethBrowserSession.wsdl' 
>
<file:/C:/Junk2/ShibbolethBrowserSession/ShibbolethBrowserSession.wsdl%27>.
> > [wsdl2Java] Retrieving document at
> > './spec/wsrf/WS-ResourceLifetime-1_2-Draft_04.wsdl', relative to
> > 
> 'file:/C:/Junk2/ShibbolethBrowserSession/ShibbolethBrowserSession.wsdl' 
>
<file:/C:/Junk2/ShibbolethBrowserSession/ShibbolethBrowserSession.wsdl%27>.
> > 
> > BUILD FAILED
> > C:\Junk2\ShibbolethBrowserSession\build.xml:13:
> > java.lang.NullPointerException
> > 
> > Any ideas?
> > 
> > Thanks
> > Shahzad
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to