Posted: Mon Nov 23, 2009 1:11 am Post subject: Service Gateway route on payload data?
Novice
Joined: 25 Nov 2008 Posts: 14
Anyone have experience on how to get the ServiceGateWay to route on the payload data? Binding is SOAP/HTTP 1.1 and I want to route on the operation and namespace of the request (i.e "getData" + "http://namespace.to.route.on" in the example below)
When the message reaches the mediation flow in the SGW module the data in the body of the SMO is named "message" (type: anyType) and the namespace is set to the one defined in the interface of the SGW which in a way make sense.
Not sure how to solve this, but is there any way to not "type" the incoming message, or to read the source XML instead?
After hours of testing and pulling my hair I solved it. Perhaps someone else will stumble upon this problem later on so here is how I solved it.
The ServiceGateway is generated from the wizard (binding: HTTP/SOAP 1.1)
Created a business object (i.e "CommonData") that had a string called "compositeKey". Added the CommonData BO as the correlation context on the input primitive in the mediation flow.
After LogMessage I added a Custom Mediation primitive with the following code:
/**
* GENERATED COMMENT - DO NOT MODIFY
* Variables: for output terminals - out (com.ibm.wsspi.sibx.mediation.OutputTerminal)
* for user properties - <No user properties defined>
* Inputs: inputTerminal (com.ibm.wsspi.sibx.mediation.InputTerminal), smo (com.ibm.websphere.sibx.smobo.ServiceMessageObject)
* Exceptions: com.ibm.wsspi.sibx.mediation.MediationConfigurationException, com.ibm.wsspi.sibx.mediation.MediationBusinessException
*/
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum