camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anthony Clegg <a.cl...@servicepower.com>
Subject Configuring Camel-Swagger
Date Thu, 10 Dec 2015 13:23:40 GMT
I have just downloaded the latest JBoss Fuse Environment 6.2.1 and I am told
that swagger now works? The red hat documentation
https://access.redhat.com/documentation/en-US/Red_Hat_JBoss_Fuse/6.2/html/Apache_Camel_Component_Reference/IDU-Swagger.html
is suggesting using camel-swagger however this is documented as being
deprecated? 

Also I am using a spring xml context file for my dependency injection and
not blueprint.

I have all my POJO's annotated correctly for swagger so could anyone please
help me get swagger working.

Here is my xml

<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
	xmlns:cxf="http://camel.apache.org/schema/cxf"
	xmlns:osgi="http://www.springframework.org/schema/osgi" 
	xmlns:context="http://www.springframework.org/schema/context"
	xmlns:tx="http://www.springframework.org/schema/tx"
	xsi:schemaLocation="
    http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd 
    http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd
    http://www.springframework.org/schema/osgi
http://www.springframework.org/schema/osgi/spring-osgi.xsd
    http://camel.apache.org/schema/cxf
http://camel.apache.org/schema/cxf/camel-cxf.xsd
    http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
    http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx.xsd
  ">
	<camelContext id="SPBCSRestAPI"
xmlns="http://camel.apache.org/schema/spring">
			
		<onException> 
			<exception>java.lang.Throwable</exception>
			<handled>
				<constant>true</constant>
			</handled>
			<bean method="statusAsException" ref="notificationsService" />
		</onException>
			
		<restConfiguration component="jetty" bindingMode="auto"
jsonDataFormat="sp-json-gson">
			<dataFormatProperty key="xml.out.mustBeJAXBElement"	value="false" />
		</restConfiguration>
		
		<rest path="{{rest.api.uri.prefix}}/bcs">
			<post uri="/workItemNotification"
type="com.servicepower.esb.dto.WorkItemNotification">
				<to uri="direct:notificationsPOST" />
			</post>
			<get uri="/workItemNotifications">
				<to uri="direct:notificationsGET" />
			</get>
			<get uri="/workItemNotification">
			<to uri="direct:notificationGET"/>
			</get>
			<get uri="/quartz">
			<to uri="direct:quartzGET"/>
			</get>
		</rest>
		
		<route id="notificationsPOST">

			<from uri="direct:notificationsPOST" />
			<log message="sending change notification to workItemRequest queue"/>
			<bean ref="notificationsService" method="post" />
			<bean ref="notificationsService" method="statusAsSuccessful" />
		</route>
		
		<route id="notificationGET">
			<from uri="direct:notificationGET" />
			<log message="returning work item notification"/>
			<bean ref="notificationsService" method="getWorkItemNotification" />
		</route>
				
		<route id="notificationsGET" >
			<from uri="direct:notificationsGET" />
			<log
				message="request notification GET resource: ${header.x-entityid}
${header.rowver} ${header.limit} ${header.type}" />
			<bean ref="notificationsService" method="get" />
		</route>
		
		<route id="quartzGET" >
			<from uri="direct:quartzGET" />			
			<bean ref="notificationsService" method="getQuartzJobs" />
		</route>
				
		<route id="batchActivationRequest">
			
			<from uri="activemq:queue:ActivationRequest"/>
			<unmarshal ref="activationJson"/>
			<bean ref="batchExecutionHandler" method="execute" />
		</route>

		<route id="realTimeActivationRequest">
			
			<from uri="activemq:queue:RTActivationRequest?concurrentConsumers=5" />
			<log message="removed real time activation" />
			<unmarshal ref="activationJson"/>
			<bean ref="realTimeExecutionHandler" method="execute" />
		</route>
		

		
               
		<route id="changedWorkItemsResponse">
			<from uri="activemq:queue:ChangedWorkItemsFRUs?concurrentConsumers=5" />
			<unmarshal ref="activationJson"/>
			<bean ref="changedWorkItemsService" method="processFruFromQueue" />
		</route>
		
	</camelContext>
</beans>



--
View this message in context: http://camel.465427.n5.nabble.com/Configuring-Camel-Swagger-tp5774922.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message