Академический Документы
Профессиональный Документы
Культура Документы
Copyright 2004 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, and Informix are trademarks or registered trademarks of IBM Corporation 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. SAP NetWeaver How-to Guides are intended to simplify the product implementation. While specific product features and procedures typically are explained in a practical business context, it is not implied that those features and procedures are the only approach in solving a specific business problem using SAP NetWeaver. Should you wish to receive additional information, clarification or support, please refer to SAP Consulting. 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.
1 2 3
Scenario............................................................................................................1 Introduction: Graphical overview ..........................................................................1 The Step By Step Solution.....................................................................................2 3.1 Prerequisites .........................................................................................2 3.2 Debugging of synchronous interfaces...................................3 3.3 Debugging of asynchronous interfaces ................................8 3.4 Testing Proxies...................................................................................15 3.5 Tracing proxy calls...........................................................................21 3.6 Recording proxy calls ....................................................................24 3.6.1 Client side recording ............................................................................24 3.6.2 Server side recording ...........................................................................26
1 Scenario
In XI it is sometimes necessary to debug an application which is connected to the XI via proxy framework to analyze problems within the receiving application.
Application
Application
Proxy Runtime
Proxy Runtime
XI System
WebService Scenario:
Application
Application
Proxy Runtime
Proxy Runtime
WebService Runtime
HTTP SOAP
WebService Runtime
-1-
-2-
-3-
Choose Utilities Settings in the menu and activate the HTTP debugging for the user you want to use for debugging in ABAP Editor HTTP Debugging:
Breakpoints
Set/Delete
When you send the message the debugger will stop at the breakpoint you have set.
-4-
Another possibility to activate the HTTP debugging is to activate the debugging for a specific user in transaction SICF. Select the path /sap/xi/engine:
Choose via the menu: Edit Debugging debugging (needs to be the sending user):
Activate debugging. In the popup you can set the user for
-5-
When you send the message the debugger will stop in the method IF_HTTP_EXTENSION~HANDLE_REQUEST of class CL_XMS_HTTP_HANDLER.
You can now set a breakpoint for your proxy class via menu: Breakpoints Choose the proxy class and method you are sending the message to.
Breakpoints at
Method.
-6-
You can analyze the proxy data type using parameter INPUT.
Please note: You need to have an open session (gui window) in the system/client at the moment the call receives the system!
-7-
-8-
If you can restart a message in error you can deregister the queue with exactly this name. This would be the better way as it does not stop the processing in all inbound queues. Start transaction SMQR and select the button Deregistration Enter the name of the queue you found in the last step:
If you have to send a new message you have to deregister a generic queue name as the name is given by the XI in runtime and you do not know it in advance. Then you have to deregister the queue name XBTR* for EO messages or XBQR* for EOIO messages:
-9-
If the queue is deregistered you see the Type U (unregistered) in the QIN Scheduler monitor:
Now restart or resend the message. This message will stop in the unregistered queue. Start transaction SMQ2 and select your specific queue or start transaction SXMB_MONI and select your message you can jump into the queue by clicking on the queue name in column Queue-ID.
By double clicking the queue name you jump into the detailed view for this queue:
- 10 -
Another double clicking on the queue name will show you all entries in this specific queue. The entry on top is the one you can debug. Select the entry and press the very right button or F8:
- 11 -
The debugger will come up and stop in the XI runtime. Once press F5 (otherwise the breakpoints may not work):
You can now set a breakpoint for your proxy class via menu: Breakpoints Choose the proxy class and method you are sending the message to.
Breakpoints at
Method.
- 12 -
You can analyze the proxy data type using parameter INPUT.
After you have finished debugging please dont forget to register the queue again! Start transaction SMQR and select the deregistered queue:
- 13 -
Press the button Registration to register the queue. In the popup press Continue. Afterwards the queue should be visible with type R again:
- 14 -
In the popup set the flag for xml to paste in your payload:
- 15 -
In the next window you can change the generated payload. You may use the payload of another message in SXMB_MONI. Download the payload in SXMB_MONI and upload it here. In the screen there are two possibilities for uploading files: 1. Upload the file unchanged: the payload is loaded in binary mode, so you can process exactly the same payload as in the already processed message in SXMB_MONI:
- 16 -
No further changes can be done to the payload from the editor anymore:
- 17 -
2. Upload the file: the payload is loaded in ASCII mode, so special characters may not be loaded correctly:
- 18 -
- 19 -
Press F8 to execute the call. In the results window you can check if the call could be processed without error:
- 20 -
Trace
- 21 -
In the popup select Client-specific and enter the name of the user that is used to send the message. Select the trace level 2 or 3 and press the Activate Button:
After you sent your message deactivate the trace via the menu Edit Trace Deactivate Trace. You will get a popup to select the user to deactivate the trace for. Select the correct user and press Deactivate:
- 22 -
You can check the trace via the menu Edit trace for:
Trace
- 23 -
3.6.1
If you want to record the call leaving the business system (outbound Proxy) you have to use client side recording. Call Transaction SICF and select Client Recording Activate Recording via the menu:
After you sent your message deactivate the trace via the menu Client Recording Deactivate Recording. You will get a popup to select the user to deactivate the recording for. Select the correct user and press Deactivate:
- 24 -
You can check the trace via the menu Client activated the recording for:
Recording
Now you will get to the server side recording screen and you have to press the button Client Requests:
Now you can select the request and response of your call:
- 25 -
3.6.2
Change to the application server where you sent the messages to via transaction SM51 by double clicking the correct application server:
- 26 -
Call Transaction SICF, select the path to the xi engine and select Edit via the menu:
Recorder
Activate Recording
In the popup select Client-specific and enter the name of the user that is used to send the message. Press the Activate Button:
- 27 -
After you sent your message deactivate the trace via the menu Edit Recorder Deactivate Recording. You will get a popup to select the user to deactivate the recording for. Select the correct user and press Deactivate:
You can check the trace via the menu Edit user you activated the recording for:
Recorder
- 28 -
Now you can check the recorded HTTP requests and responses:
- 29 -
www.sdn.sap.com/irj/sdn/howtoguides