You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wsrf-user@ws.apache.org by Jyotishman Pathak <jy...@gmail.com> on 2005/09/14 07:09:19 UTC
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.FileSystemPropertiesDocumentpropsDoc
=
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