{
WSDLReader wsdlReader = WSDLFactory.newInstance( ).newWSDLReader( );
String wsdlPath = "C:\\opt\\pubscribe-1.0-beta1\\webapps\\pubscribe\\wsdl\\FileSystem.wsdl";
Definition def = wsdlReader.readWSDL( wsdlPath );
PortType portType = (PortType) def.getPortTypes( ).values( ).toArray( )[0];
ResourceCapability wsResourceDef = null;
try
{
wsResourceDef = new ResourceCapabilityImpl( def, portType, null );
}
catch ( InvalidWsrfWsdlException iwwe )
{
System.err.println( iwwe );
System.exit( 1 );
}
System.out.println( wsResourceDef );
Map implementedResourceDefs = wsResourceDef.getImplementedResourceCapabilities( );
Iterator specDefs = implementedResourceDefs.values( ).iterator( );
while ( specDefs.hasNext( ) )
{
System.out.println( (ResourceCapability) specDefs.next( ) );
}
System.out.println( wsResourceDef.getMetadataDescriptorName( ) );
System.out.println( wsResourceDef.getMetadataDescriptorLocation( ) );
}