Hi Sal,

Thanks for your reply. I can see the jar file under $CATALINA_HOME/webapps/wsrf/WEB-INF/lib. So, I need to include this jar in my Java build path to actually compile all the code generated after running WSDL2Java (or the ant script). Right ?

What I am wondering is: how do I change the package name/structure of XmlBeans-generated classes? As of now, they are in the "org.apache.ws.resource.example.filesystem" package. Is there something in the build.xml that needs to be modified ? Or I have to look at the WSDL file?

Kindly suggest.

Regards,
Jyoti





On 9/14/05, Campana Jr., Salvatore J <[EMAIL PROTECTED]> wrote:
Jyoti,
 
The classes you are asking about are XmlBeans-generated classses and are in the FileSystem-xbeans.jar under the lib directory....
 
If you walk through the tutorial in the docs you will see that they are generated when you run our Wsdl2Java on the Filesystem.wsdl file.  Basically anything defined in the schema portion of your wsdl will be run through XmlBeans and a jar will be created containing the beans for the types....
 
-Sal


From: Jyotishman Pathak [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 14, 2005 1:09 AM
To: wsrf-user@ws.apache.org
Cc: Jyotishman Pathak
Subject: Question about FilesystemResource

Hi,

I am a trying to learn/understand the Apache implementation of WSRF specs. In doing so, your sample example (filesystem), has been quite helpful. However, I have 2 small (and perhaps trivial) questions:

1.) In AbstractFilesystemResource class, there is a method init(), which is as follows:

 public void init()
    {
        org.apache.ws.resource.example.filesystem.FileSystemPropertiesDocument propsDoc = org.apache.ws.resource.example.filesystem.FileSystemPropertiesDocument.Factory.newInstance();
        m_propSet = new org.apache.ws.resource.properties.impl.XmlBeansResourcePropertySet( propsDoc );

.....
.... [snip]
}

Where is this FileSystemPropertiesDocument class? Am I suppose to write it? If so, how ? I understand it is the Java representation of the ResourceProperties document.

2.) In FilesystemResource class, there is a method init(), which is as follows:

      /**
     * Initializes this resource's state (properties, etc.).
     */
    public void init()
    {
         super.init();
 
        m_filesystem = new example.filesystem.backend.UnixFileSystem( (String)getID() );  // create a mock filesystem object
 
        /*
         * The resource property set which contains all of resource properties that were defined in the WSDL.
         */
        org.apache.ws.resource.properties.ResourcePropertySet resourcePropertySet = getResourcePropertySet();
        org.apache.ws.resource.properties.ResourceProperty resourceProperty = null;
 
        try
        {
            /*
             * Initialize each of our properties by calling resourceProperty.add(propElem) and/or resourceProperty.setCallback(callback)...
             */
            resourceProperty = resourcePropertySet.get( FilesystemPropertyQNames.DEVICESPECIALFILE );
            DeviceSpecialFileDocument deviceDocXBean = DeviceSpecialFileDocument.Factory.newInstance();
            deviceDocXBean.setDeviceSpecialFile( m_filesystem.getDeviceSpecialFile() );
            resourceProperty.add( deviceDocXBean );

          .... .... [snip]

    }

}

Again, where is the DeviceSpecialFileDocument class? I do understand this class corresponds to one of the resource properties exposed. But, am I supposed to code this class? If so, how?

Please let me know your thoughts/comments.

Regards,
Jyoti





Reply via email to