Quantcast
Channel: SCN : Blog List - Process Integration (PI) & SOA Middleware
Viewing all articles
Browse latest Browse all 676

Michal's PO tips: How to send messages directly to AEX (ICO) - adapter independent - SOAPUI version

$
0
0

In one of the latest articlesHowTo - Send Test Messages to the Adapter Engine (to an Integrated Configuration)  Karsten Möhwald has shown an amazing idea on how we can send a message from RWB to any ICO (does not matter what kind of adapter is being used in the ICO).


Where can we use this idea?


a) if we need to test an ICO but we don't have a working connection with the existing adapter (for example JMS, JDBC, IDOC, etc.)

b) if we want to design regression testing tool which will skip the sender adapter and will always post the data in the same way to PI (via SOAP)

 

But how can we do the same trick without RWB?

 

If you have a look at the configuration in Karsten's blog you will see that in RWB we're using the URL:


http://<server_host>:<j2ee_port>/XISOAPAdapter/MessageServlet?channel=<party>:<service>:<channel>


to the dummy SOAP channel but where to put the information in case we'd like to do the same with SOAPUI or any other SOAP testing tool ?

 

If you think that we can try the second standard way of creating the URL for sender soap adapter:

 

http://<server_host>:<j2ee_port>/XISOAPAdapter/MessageServlet?senderParty=

&senderService=BC_Michal_Krawczyk&receiverParty=&receiverService=

&interface=SI_Michal_Out&interfaceNamespace=urn:michal.krawczyk.com

 

then this is not going to work as PO will let us know that it's not possible to use non SOAP channels (for example JDBC) like shown on the screenshot below:


 

michal_krawczyk_error_info_ICO.png

 

 

 

 

What do we need to do then? It turns out that we need to create a whole envelope for PO message (with XI header) where we need put:

 

- sender system

- interface & namespace

but also:

- message ID, timestamp, queueid, etc.



SOAPUI message data

 

 

<SOAP:Envelope xmlns:SOAP='http://schemas.xmlsoap.org/soap/envelope/'>

<SOAP:Header>

<sap:Main xmlns:sap='http://sap.com/xi/XI/Message/30' versionMajor='3' versionMinor='1' SOAP:mustUnderstand='1'>

<sap:MessageClass>ApplicationMessage</sap:MessageClass>

<sap:ProcessingMode>asynchronous</sap:ProcessingMode>

<sap:MessageId>30afd515-99b6-11e3-c37d-000000aecb5b</sap:MessageId>

<sap:TimeSent>2014-02-19T22:35:53Z</sap:TimeSent>

<sap:Sender><sap:Party agency='http://sap.com/xi/XI' scheme='XIParty'>

</sap:Party><sap:Service>BC_Michal_Krawczyk</sap:Service></sap:Sender>

<sap:Interface namespace='urn:krawczyk.com'>SI_Michal_Out</sap:Interface></sap:Main>

<sap:ReliableMessaging xmlns:sap='http://sap.com/xi/XI/Message/30' SOAP:mustUnderstand='1'>

<sap:QualityOfService>ExactlyOnce</sap:QualityOfService>

<sap:QueueId>55555</sap:QueueId></sap:ReliableMessaging>

</SOAP:Header><SOAP:Body>


<ns:MT_data xmlns:ns="http://michal.krawczyk.com/SDN">

  <row>

  <name>Michal</name>

  <surname>Krawczyk</surname>

  </row>

</ns:MT_resultset>


</SOAP:Body>

</SOAP:Envelope>


 

 

and then if we send it to the dummy SOAP channel like

http://<server_host>:<j2ee_port>/XISOAPAdapter/MessageServlet?channel=<party>:<service>:<channel>

the message will go to the correct service as per the information from the XI header.

 

 

If you know any other easier way to do the same thing, please do let me know,


Viewing all articles
Browse latest Browse all 676

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>