Posting Messages into XI Applies to: SAP NetWeaver Exchange Infrastructure Summary This article demonstrates how easy it is to post XML/SOAP messages into SAP NetWeaver Exchange Infrastructure (XI) using SOAPUI as a message posting tool. By referring to this article one will be able to simulate one such scenario and see how user friendly and powerful this tool is. Author(s): S Venkataraman, Vijay Kalyan Ganala and Goutam Dev Company: SAP Consulting, Global Delivery Centre, SAP India Pvt. Ltd. Created on: 14 March 2007 Author Bio S Venkataraman is a SAP Netweaver XI Consultant working for SAP Consulting, Global Delivery Center (GDC), Bangalore. His areas of interest include Middleware Technologies, Enterprise Application Integration and Java. Goutam Dev is a SAP Netweaver Portal Consultant working for SAP Consulting, Global Delivery Center (GDC), Bangalore. His areas of interest are Netweaver Technologies (primarily Enterprise Portals and XI) and Java. Vijay Kalyan Ganala is a SAP Enterprise Portal Consultant working for SAP Consulting, Global Delivery Center (GDC), Bangalore. His work area revolves around Java, SAP Enterprise Portals and SAP Exchange Infrastructure. 2007 SAP AG 1
Table of Contents Introduction... 3 Scenario... 4 Configurations on XI... 4 Obtain the WSDL... 7 On Altova XML Spy... 8 On SOAPUI... 11 Additional Helpful Features of SOAPUI... 13 Related Content... 14 Copyright... 15 2007 SAP AG 2
Introduction Recently while implementing numerous XI Interface scenarios, we felt the need of a tool to POST messages into XI and also execute Load Test in the Development Phase. Some of the scenarios where this could prove handy are: Message Sender (Outbound) 1. XML JMS (Asynchronous) 2. SOAP SOAP (Synchronous) After some research, we found some tools available to POST HTTP message to XI, primarily: 1. HTTP Tool (HTML) 2. SOAP Tool (Java Applet) 3. SOAP UI After trying all of them, SOAP UI, an open source tool turned out to be a neat option, which suited our requirements of posting a XML or a SOAP message. This article talks about the simulation of one such scenario. Details about conducting a LOAD Test will be dealt in a separate article. 2007 SAP AG 3
Scenario A SOAP Request will be posted to XI, where the SOAP and XI Adapter will further propagate it onto an R/3 System using a Proxy. Configurations on XI The following Configurations would be required on the XI Box. Integration Repository 1. Data Type : DT_SOAPUI_Test 2. Message Type : MT_SOAPUI_Test 3. Message Interface (Outbound - Synchronous) : MIOS_SOAP2XI_SOAPUI_Test 4. Message Interface (Inbound - Synchronous) : MIIS_SOAP2XI_SOAPUI_Test 5. Message Mapping : MM_SOAP2XI_SOAPUI_Test 6. Interface Mapping : IM_SOAP2XI_SOAPUI_Test 2007 SAP AG 4
Integration Configuration 1. Configuration Scenario : CS_SOAPUI_Test 2. Business System : <SAP System> 3. Business Service : <HTTP System> 4. Communication Channel (Sender)* : CC_SOAP_SND_SOAPUI_Test 5. Communication Channel (Receiver) : CC_XI_REC_SOAPUI_Test 4. Sender Agreement 5. Receiver Agreement 6. Interface Determination 7. Receiver Determination 2007 SAP AG 5
*Make sure the sender communication channel is of a SOAP adapter to accept the SOAP message. 2007 SAP AG 6
Obtain the WSDL WSDL (Web Service that can accept the SOAP message) can be derived from the Outbound Message Interface (MIOS) WSDL may also be obtained via ID using Tools Define Web Service menu option in XI. However we prefer the following approach. In IR, go to the Outbound Message Interface and export the WSDL. The file will be saved as an XML, which should be renamed with WDSL extension. Important As this is a SOAP Proxy scenario, we need to have the connection from XI to R/3, where we need to create and activate Proxy (through SPROXY transaction), relevant to the Inbound Message Interface (MIIS_SOAP2XI_SOAPUI_Test, here). 2007 SAP AG 7
On Altova XML Spy Open the WSDL file with Altova XML Spy Create a Binding by right clicking on the Port Type. 2007 SAP AG 8
Create a Port by right clicking on the Binding. 2007 SAP AG 9
Enter the following entries 1. soapaction : http://sap.com/xi/xi/message/30 2. Location : http://<hostnameoripaddressofxi>:<j2eeportno>/xisoapadapter/messageservlet?ch annel=:<service>:<sendercommunicationchannelwithsoapadapter> (If there is a Party, then the URL will be http://<hostnameoripaddress>:<j2eeportno>/xisoapadapter/messageservlet?channel=<party>:< Service>:<SenderCommunicationChannelWithSOAPadapter>) 2007 SAP AG 10
On SOAPUI Open SOAP UI and create a New WSDL Project as follows Give a name for your project Leave the naming convention as it is. 2007 SAP AG 11
Select the WSDL that is derived from XI. Now there is an Interface under which there is an Operation. Note: A WSDL Interface may have more than one Operation. Double Click on the default request and click on the Green Arrow icon, to send the SOAP request to the specified SOAP target location. Finally, you can see the SOAP response for the request you have send as in the screenshot. Errors, if any can be monitored through SXMB_MONI transaction of XI for these requests. 2007 SAP AG 12
Additional Helpful Features of SOAPUI 1. Based on the same WSDL you can post the SOAP request to a different Target Location. You can maintain them as Service Endpoints and select them as and when necessary. 2. You can also post a simple XML message by using any dummy WSDL. Just import a dummy WSDL and copy-paste an XML message you want to send to a target location. An XML message can be posted into XI, using the following URL: http://<hostnameoripaddress:<icmport>/sap/xi/adapter_plain?bs=<service>&namespace=<namesp ace>&interface=<outboundinterfacename>&qos=eo A SOAP request can be posted into XI, using the following URL: http://<hostnameoripaddress:<j2eeport>/xisoapadapter/messageservlet?channel=<party>:<servi ce>:<sendercommunicationchannel> If there is no party: http://<hostnameoripaddress:<j2eeport>/xisoapadapter/messageservlet?channel=:<service>:<se ndercommunicationchannel> In addition to the above, a SOAP message can also be posted into XI at: http://<hostnameoripaddress:<icmport>/sap/xi/engine?type=entry&version=3.0&sender.service=< service>&interface=<namespace>^<outboundmessageinterface> 2007 SAP AG 13
Related Content Download SOAP UI. http://sourceforge.net/project/downloading.php?group_id=136013&use_mirror=jaist&filename=soapui-1.6- installer.exe&69281446 Official webpage for SOAP UI. http://www.soapui.org SOAP UI can also used for SOAP with Attachments. http://www.soapui.org/userguide/attachments.html 2007 SAP AG 14
Copyright Copyright 2007 SAP AG. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice. Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors. Microsoft, Windows, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation. IBM, DB2, DB2 Universal Database, OS/2, Parallel Sysplex, MVS/ESA, AIX, S/390, AS/400, OS/390, OS/400, iseries, pseries, xseries, zseries, z/os, AFP, Intelligent Miner, WebSphere, Netfinity, Tivoli, Informix, i5/os, POWER, POWER5, OpenPower and PowerPC are trademarks or registered trademarks of IBM Corporation. Adobe, the Adobe logo, Acrobat, PostScript, and Reader are either trademarks or registered trademarks of Adobe Systems Incorporated in the United States and/or other countries. Oracle is a registered trademark of Oracle Corporation. UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc. HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C, World Wide Web Consortium, Massachusetts Institute of Technology. Java is a registered trademark of Sun Microsystems, Inc. JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape. MaxDB is a trademark of MySQL AB, Sweden. SAP, R/3, mysap, mysap.com, xapps, xapp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary. These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty. These materials are provided as is without a warranty of any kind, either express or implied, including but not limited to, the implied warranties of merchantability, fitness for a particular purpose, or non-infringement. SAP shall not be liable for damages of any kind including without limitation direct, special, indirect, or consequential damages that may result from the use of these materials. SAP does not warrant the accuracy or completeness of the information, text, graphics, links or other items contained within these materials. SAP has no control over the information that you may access through the use of hot links contained in these materials and does not endorse your use of third party web pages nor provide any warranty whatsoever relating to third party web pages. Any software coding and/or code lines/strings ( Code ) included in this documentation are only examples and are not intended to be used in a productive system environment. The Code is only intended better explain and visualize the syntax and phrasing rules of certain coding. SAP does not warrant the correctness and completeness of the Code given herein, and SAP shall not be liable for errors or damages caused by the usage of the Code, except if such damages were caused by SAP intentionally or grossly negligent. 2007 SAP AG 15