You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pubscribe-dev@ws.apache.org by sc...@apache.org on 2005/06/10 19:00:32 UTC
svn commit: r189989 -
/incubator/hermes/trunk/src/java/org/apache/ws/notification/tool/WsnWsdl2Java.java
Author: scamp
Date: Fri Jun 10 10:00:31 2005
New Revision: 189989
URL: http://svn.apache.org/viewcvs?rev=189989&view=rev
Log:
fixed bad logic where someone has a resourceprop contained from a porttype we handle..but they don't implement the porttype...I was not generating the rp
Modified:
incubator/hermes/trunk/src/java/org/apache/ws/notification/tool/WsnWsdl2Java.java
Modified: incubator/hermes/trunk/src/java/org/apache/ws/notification/tool/WsnWsdl2Java.java
URL: http://svn.apache.org/viewcvs/incubator/hermes/trunk/src/java/org/apache/ws/notification/tool/WsnWsdl2Java.java?rev=189989&r1=189988&r2=189989&view=diff
==============================================================================
--- incubator/hermes/trunk/src/java/org/apache/ws/notification/tool/WsnWsdl2Java.java (original)
+++ incubator/hermes/trunk/src/java/org/apache/ws/notification/tool/WsnWsdl2Java.java Fri Jun 10 10:00:31 2005
@@ -39,18 +39,18 @@
private static final String VCTY_CTX_RESOURCE_TERMINATION = "resourceTermination";
private static final String VCTY_CTX_NOTIF_PRODUCER = "notificationProducer";
- public WsnWsdl2Java( File[] wsdlFiles, File outputDir, File[] classpath, Wsdl2JavaOptions options )
+ public WsnWsdl2Java(File[] wsdlFiles, File outputDir, File[] classpath, Wsdl2JavaOptions options)
throws Exception
{
- super( wsdlFiles, outputDir, classpath, options );
+ super(wsdlFiles, outputDir, classpath, options);
initPortTypeInfoMap();
}
private void initPortTypeInfoMap()
{
- addPortType2JavaInfo( new NotificationConsumerPortType2JavaInfo() );
- addPortType2JavaInfo( new NotificationProducerPortType2JavaInfo() );
- addPortType2JavaInfo( new SubscriptionManagerPortType2JavaInfo() );
+ addPortType2JavaInfo(new NotificationConsumerPortType2JavaInfo());
+ addPortType2JavaInfo(new NotificationProducerPortType2JavaInfo());
+ addPortType2JavaInfo(new SubscriptionManagerPortType2JavaInfo());
}
protected ServiceProperties buildServiceProperties(ResourceDefinition resourceDefinition, File file, File file1)
@@ -59,9 +59,12 @@
serviceProperties.setNamespaceVersionHolder(WsnNamespaceVersionHolderImpl.class);//make sure to add different ones as new versions comeout
//tell service props which properties we handle for the user...
- serviceProperties.addImplementedProperty(NotificationProducerPortType.PROP_QNAME_FIXED_TOPIC_SET);
- serviceProperties.addImplementedProperty(NotificationProducerPortType.PROP_QNAME_TOPIC);
- serviceProperties.addImplementedProperty(NotificationProducerPortType.PROP_QNAME_TOPIC_EXPRESSION_DIALECTS);
+ if (hasNotificationProducer(resourceDefinition))
+ {
+ serviceProperties.addImplementedProperty(NotificationProducerPortType.PROP_QNAME_FIXED_TOPIC_SET);
+ serviceProperties.addImplementedProperty(NotificationProducerPortType.PROP_QNAME_TOPIC);
+ serviceProperties.addImplementedProperty(NotificationProducerPortType.PROP_QNAME_TOPIC_EXPRESSION_DIALECTS);
+ }
return serviceProperties;
}
@@ -79,19 +82,19 @@
protected VelocityContext updateVelocityContext(VelocityContext context, ResourceDefinition resourceDef)
{
VelocityContext velocityContext = super.updateVelocityContext(context, resourceDef);
- if(hasPropChange(resourceDef))
+ if (hasPropChange(resourceDef))
{
- velocityContext.put(VCTY_CTX_PROP_CHANGE,"true");
+ velocityContext.put(VCTY_CTX_PROP_CHANGE, "true");
}
- if(hasResourceTermination(resourceDef))
+ if (hasResourceTermination(resourceDef))
{
- velocityContext.put(VCTY_CTX_RESOURCE_TERMINATION,"true");
+ velocityContext.put(VCTY_CTX_RESOURCE_TERMINATION, "true");
}
- if(hasNotificationProducer(resourceDef))
+ if (hasNotificationProducer(resourceDef))
{
- velocityContext.put(VCTY_CTX_NOTIF_PRODUCER,"true");
+ velocityContext.put(VCTY_CTX_NOTIF_PRODUCER, "true");
}
return velocityContext;
@@ -105,10 +108,10 @@
private boolean hasResourceTermination(ResourceDefinition resourceDef)
{
- if(resourceDef.implementsResourceCapability(org.apache.ws.resource.lifetime.v2004_06.porttype.ImmediateResourceTerminationPortType.NAME)
+ if (resourceDef.implementsResourceCapability(org.apache.ws.resource.lifetime.v2004_06.porttype.ImmediateResourceTerminationPortType.NAME)
|| resourceDef.implementsResourceCapability(org.apache.ws.resource.lifetime.v2004_06.porttype.ScheduledResourceTerminationPortType.NAME)
|| resourceDef.implementsResourceCapability(org.apache.ws.resource.lifetime.v2004_11.porttype.ImmediateResourceTerminationPortType.NAME)
- || resourceDef.implementsResourceCapability(org.apache.ws.resource.lifetime.v2004_11.porttype.ScheduledResourceTerminationPortType.NAME) )
+ || resourceDef.implementsResourceCapability(org.apache.ws.resource.lifetime.v2004_11.porttype.ScheduledResourceTerminationPortType.NAME))
{
return true;
}
@@ -117,7 +120,7 @@
private boolean hasPropChange(ResourceDefinition resourceDef)
{
- if(resourceDef.implementsResourceCapability(org.apache.ws.resource.properties.v2004_06.porttype.SetResourcePropertiesPortType.NAME)
+ if (resourceDef.implementsResourceCapability(org.apache.ws.resource.properties.v2004_06.porttype.SetResourcePropertiesPortType.NAME)
|| resourceDef.implementsResourceCapability(org.apache.ws.resource.properties.v2004_11.porttype.DeleteResourcePropertiesPortType.NAME)
|| resourceDef.implementsResourceCapability(org.apache.ws.resource.properties.v2004_11.porttype.InsertResourcePropertiesPortType.NAME)
|| resourceDef.implementsResourceCapability(org.apache.ws.resource.properties.v2004_11.porttype.SetResourcePropertiesPortType.NAME)
---------------------------------------------------------------------
To unsubscribe, e-mail: hermes-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: hermes-dev-help@ws.apache.org