Hi Asankha , On Nov 28, 2007 2:42 PM, Asankha C. Perera <[EMAIL PROTECTED]> wrote:
> Hi Eric > > ...I do not wish to use the webservice endpoint , but rather return > > the record set from the SQL select statement to the webservice client > > directly. > > > Ah.. I guess what you are really looking for is a Data Service (e.g. > http://wso2.org/library/2617). However, it should be still possible to > achieve this with Synapse to some extent. > > My client read the exposed Proxy WSDL and figured out what port to use > and > > dispatched the request. > > >From the synapse server logs, I observed that the DBLookup happened , > but > > after that there was an exception : > > > > 2007-11-28 13:02:19,683 [xxxx] [HttpServerWorker-3] ERROR Axis2Sender > > Unexpected error during send > > ing message out > > org.apache.axis2.AxisFault: The system cannot infer the transport > > information from the URL. > > ........ > > Was there something wrong in the proxy configuration that I wrote. > Please > > advise. > > > Yes, you could do the following, to convert the request message into a > response and send it back to the client (Note that unless you have a > WS-A ReplyTo in your request message, you will not be able to do <header > name="To" expression="get-property('ReplyTo')"/> to change the address > to return to the sender. > > <inSequence> > <dblookup> > ... > </dblookup> > * <property name="RESPONSE" value="true"/> > <header name="To" action="remove"/>* > <send/> > <drop/> > </inSequence> > Yes, this solved the exception. The response received by the client was the same as the request content. I think an XSLT mediator as you advised is required to set the response message content. One other question I have about the dblookup mediator is whether it can handle multiple record sets. In the SQL I used, I had a select * from company. (without a where clause). I wished to have all the matching records. However , the 'result' node seems capable of holding only one row. I want the client to get all the matching records out of an SQL query. Is it possible to achieve this in Synapse with the dblookup mediator. Thanks again, Eric. > > > You may also want to use a transformation (such as XSLT) that uses the > values from the DB lookup and creates the required response message to > be sent back. > > Hope this helps resolve your problem > asankha >
