Hi People,

I have this service engine exposed as a jaxws because I needed to give it an
nmr address.

Below is the SE impl fxn:
public PaymentResponse notifyPayment(PaymentRequest payload)
        {
                PaymentResponse response = new PaymentResponse();

                LOG.info("Notification received for student " +
payload.getStudentNumber());
                LOG.info("Receipt Number: " + payload.getPINReceiptNumber());
                LOG.info("Student Name: " + payload.getStudentName());
                LOG.info("Amount: " + payload.getAmountPaid());
                LOG.info("College Name: " + payload.getCollegeName());
                LOG.info("Bank: " + payload.getBankName());
                LOG.info("Reference Number: " + 
payload.getPaymentReferenceNumber());

                response.setReturn("OK");

                return response;
        }

and here is my bean.xml file:
<jaxws:endpoint id="CollegeServices"
                        implementor="com..services.CollegeServicesImpl"
                        address="nmr:nauCollegeService"/>


I also have another endpoints that retrieve messages from a queue and
forwards to this nmr:nauCollegeService address, see camel-context.xml below:

<osgi:camelContext xmlns="http://camel.apache.org/schema/spring";>
                <route>
                        <from 
uri="jms:queue:CollegeRequestQueue?replyTo=CollegeResponseQueue" />
                        <convertBodyTo 
type="javax.xml.transform.stream.StreamSource" />
                        <to uri="log:jmsRequestMessagesLog" />
                        <bean ref="CollegeRecipientList" method="route" />
                        <to uri="log:jmsResponseMessagesLog" /> 
                </route>
        </osgi:camelContext>

This is what my log looks like when I send a message into the queue:
10:53:08,651 | INFO  | tenerContainer-1 | jmsRequestMessagesLog            |
rg.apache.camel.processor.Logger   88 |
Exchange[BodyType:org.apache.camel.converter.jaxp.StringSource, Body:<?xml
version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
<soap:Body>
<ser:PaymentRequest xmlns:ser="http://services.colleges.com";>
<StudentNumber>91283123</StudentNumber>
</ser:PaymentRequest>
</soap:Body>
</soap:Envelope>]

10:53:08,667 | INFO  | tenerContainer-1 | jmsResponseMessagesLog           |
rg.apache.camel.processor.Logger   88 | Exchange[BodyType:String[],
Body:[Ljava.lang.String;@fe09a1]

And whenever I tried to retrieve this message from my JMS response queue i
couldnt cast as any of Text, Stream, byte, or Map?

 if (aMessage instanceof javax.jms.TextMessage)
{}
 if (aMessage instanceof javax.jms.StreamMessage)
{}
 if (aMessage instanceof javax.jms.BytesMessage)
{}

How do I get the OK response returned?
-- 
View this message in context: 
http://old.nabble.com/Transforming-Decoding-Data-en-route-tp26572002p26572002.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to