Gert, I have a jsr 181 component between the two end points. The following is its xbean.xml
<beans xmlns:jsr181="http://servicemix.apache.org/jsr181/1.0" xmlns:scmservice="http://scm" xmlns:cmspecificwebservice="http://www.ibm.com/xmlns/db2/cm/webservices/1.0/schema"> <jsr181:endpoint pojo="#vdssbean" wsdlResource="classpath:service.wsdl" typeMapping="jaxb2" annotations="jsr181" style="document" /> <bean id="vdssbean" class="frontend.frontendImpl"> <property name="scmservice"> <jsr181:proxy context="#context" type="packageop.Operation" service="operation:Operation"/> </property> </bean> <classpath inverse="true"> <location>.</location> <location>lib/wsdl4j-1.6.1.jar</location> <location>lib/activation-1.1.jar</location> <location>lib/j2ee-1.0.jar</location> </classpath> </beans> Regards, Ganesh Gert Vanthienen wrote: > > Guru, > > Could you post your xbean files for whatever is in between these two > HTTP endpoints as well (servicemix-eip and servicemix-bean probably)? I > would like to see how you fitted your POJO in between these two. > > --- > Gert Vanthienen > http://www.anova.be > > nautilis22 wrote: >> Hi Gert, >> >> The idea is to get hold of the normalized message from the frontend >> http >> consumer end point and add the property. I tried using the "in" >> normalised >> message but results have been the same. I have pasted the http xbean.xml >> below. >> >> <http:endpoint service="frontend:Frontend" >> endpoint="Frontend" >> role="consumer" >> locationURI="http://0.0.0.0:8192/vdss" >> soap="true" /> >> >> >> >> <http:endpoint service="operation:Operation" >> endpoint="Operation" >> role="provider" >> locationURI="http://localhost:9080/OriginalService" >> soap="true" >> soapAction="" >> soapVersion="1.1" /> >> </beans> >> >> Regards, >> Guru >> >> >> >> Gert Vanthienen wrote: >> >>> nautilis22, >>> >>> Shouldn't you be modifying the 'in' normalized message of the >>> MessageExchange you're sending to your HTTP provider endpoint? Or is >>> this code being executed inside a pipeline to copy the out to in? >>> >>> Is the HTTP endpoint a <http:endpoint/> or an <http:provider/>? >>> >>> Gert >>> >>> nautilis22 wrote: >>> >>>> Hi Gert, >>>> >>>> I made the foolowing changes in the code >>>> >>>> public OpererationResponse operation(OpererationRequest request) { >>>> // throw new UnsupportedOperationException(); >>>> >>>> OpererationResponse responseobj = new OpererationResponse (); >>>> >>>> try{ >>>> >>>> /* Code to access the normalised message of the jsr-181 component >>>> >>>> */ >>>> MessageExchange exchange = >>>> org.apache.servicemix.jsr181.JBIContext.getMessageExchange() ; >>>> >>>> NormalizedMessage msg = exchange.getMessage("out"); >>>> if (msg == null) { >>>> System.out.println("2"); >>>> msg = exchange.createMessage(); >>>> exchange.setMessage(msg,"out"); >>>> >>>> } >>>> /* Setting the property >>>> */ >>>> >>>> msg.setProperty(JbiConstants.HTTP_DESTINATION_URI,"http://localhost:9080/AlternateService"); >>>> >>>> /* service object is a property declared in a xbean.xml of jsr-181 >>>> component. Calling the webservice. >>>> */ >>>> String responsestring = service.operation(request); >>>> >>>> >>>> responseobj.setOperationResponse(responsestring); >>>> return responseobj; >>>> }catch(Exception e){ >>>> String ex= e.getMessage(); >>>> return responseobj; >>>> } >>>> } >>>> >>>> However, the endpoint address is stiil pointing to >>>> http://localhost:9080/OriginalService that I have configured in >>>> Xbean.xml. >>>> The end point address is not getting dynamically changed. >>>> >>>> Regards, >>>> nautilis22 >>>> >>>> >>>> >>>> >>> >>> ----- >>> --- >>> Gert Vanthienen >>> http://www.anova.be >>> >>> >> >> > > > > ----- > --- > Gert Vanthienen > http://www.anova.be > -- View this message in context: http://www.nabble.com/JSR-0rchestration-Dynamic-Rouing-tp16790679p16930373.html Sent from the ServiceMix - User mailing list archive at Nabble.com.
