Hello,
I am using Sonic 8.0.1 and new to SonicConnect (and apache camel) service. I was looking for example on how to invoke externally hosted webService which has a POJO as input.
I've gone through the sample GetPatientInvoker and it calls external service but that takes a single String ssn its working fine but I was looking if there is a sample which takes in a POJO. Please see attachment and WSDL.
When my process is about to invoke this service - I am seeing the following error in container logs:
[11/09/21 19:09:06] ID=dev_ESBTest (info) member sent: Member [firstName=Joe, ssn=null, lastName=null]
[11/09/21 19:09:06] ID=dev_ESBTest (info) sending message to outgoing...
com.sonicsw.xq.XQContentTypeException: Unknown message type: (This part is not a message.) (This part is not a message.)
at com.sonicsw.xq.connector.jms.XQJMSMessage.setPartContent(XQJMSMessage.java:1275)
�
[11/09/21 19:09:06] ID=dev_ESBTest (severe) [ProcessEngine] Error sending service tracking messages: Unknown message type: (This part is not a message.)
[11/09/21 19:09:06] ID=dev_ESBTest (severe) Trace follows...
com.sonicsw.esb.itinerary.engine.ItineraryException: "text/plain" DataContentHandler requires String object, was given object of type class progress.message.jimpl.ObjectMessage: DestinationName=test.Entry ("text/plain" DataContentHandler requires String object, was given object of type class progress.message.jimpl.ObjectMessage)
�
Caused by: com.sonicsw.xq.XQEndpointException: "text/plain" DataContentHandler requires String object, was given object of type class progress.message.jimpl.ObjectMessage: DestinationName=test.Entry ("text/plain" DataContentHandler requires String object, was given object of type class progress.message.jimpl.ObjectMessage) ("text/plain" DataContentHandler requires String object, was given object of type class progress.message.jimpl.ObjectMessage)
at com.sonicsw.xq.connector.jms.JMSEndpoint$EndpointConnection.sendWithUnbound(JMSEndpoint.java:1616)
at com.sonicsw.xq.connector.jms.JMSEndpoint.sendWithUnbound(JMSEndpoint.java:292)
Do I have to serialize this member object into XML before call to external service or I have to define a Camel/CXF mapping in spring xml. I was thinking that JAXB/JAXWS will automatically bind this object to WSDL parameter.
Thanks a lot.
[View:~/cfs-file.ashx/__key/communityserver-discussions-components-files/23/getMember.wsdl.zip:550:0]
[View:~/cfs-file.ashx/__key/communityserver-discussions-components-files/23/Member.java.zip:550:0]
HI Rajneesh,
You have to serialize Java objects into XMLs before calling Web Services. Currently, Sonic Connect only supports Camel-CXF PAYLOAD mode (i.e. request ESB Message parts conttain SOAP header/body payloads in XML). POJO mode (which is what you are trying to do) is not supported.