Functionality Creating/regenerating ABAP proxy objects based on a WSDL description. The WSDL source can be a URL (direct or by using an HTTP destination),local file, or XI repository. The source is described in the WSDL_TYPE . The individual function module parameters describe the procedure. Example Generate an XI proxy: Parameter,,Value
WSDL_SOURCE_TYPE,,XI>
IFR_TYPE,,ifmmessif>
IFR_NAME,,if_proxy_in>
IFR_NAMESPACE,,http://kth_test>
IFR_COMPONENT_NAME,,PointToPoint Scenarios>
IFR_COMPONENT_VERS,,1.0>
PREFIX,,ZKTH_>
DEVCLASS,,$TMP>
ACTIVATE,,X>Generate a Web service proxy: Parameter,,Value
WSDL_SOURCE_TYPE,,URL>
WSDL_SOURCE_STRING,,http://www.quisque.com/fr/chasses/crypto/cesar.asmx?WSDL>
PREFIX,,ZKTH_>
DEVCLASS,,$TMP>
ACTIVATE,,X>Notes
- To generate XI proxies, a connection to the Integration Builder needs to
be established and the user must have the relevant authorizations. Tocheck this, simply call transactionSPROXY>. (choosemenu option Goto -> Connection Test)
- Delete generated proxies: function module
SPRX_BCKG_DELETE>Description CHANGED is always set if differences arise between the active and newversions after generation. This only affects the current status if ACTIVATE = 'X'>.Default Description
GENERATED_PROXIES >contains the list of all generated/changed ABAPobjects Note the following for GENERATED_PROXIES-IFR_TYPE>
- 'portType'
In the case of inbound (provider proxies), the name of the class is infield OBJ_NAME >in the line for IFR_TYPE = 'portType' >AND OBJECT = 'INTF' >. The implementing class is in OBJ_NAME> for line IFR_TYPE = 'portType' AND OBJECT = 'CLAS'>. In the case of outbound (consumer proxies), the name is in line (
IFR_TYPE = 'portType' > and OBJECT = 'CLAS' >)
- 'type'
For and structures (OBJECT='TABL'>), data elements (OBJECT='DTEL'>) and table types (OBJECT='TTYP'>)
- 'message'
For message types (OBJECT='TABL'>) and fault messages (
OBJECT='CLAS'>)Default Description Log handle of application log. For information about using the log handle, see the documentation on the Application Log> If the log handle is requested by the caller (IS SUPPLIED), then thecaller must ensure that 'BAL_LOG_REFRESH' is deleted from the memory again by using a functionmodule.Default Description Default names for proxy generation. Contains the mapping of WSDL names to ABAP names. If a name mapping was specified in NAMES_PROPOSAL_IN<(>,<)> whether the name mapping was kept is documented here. This is indicated by the fact that NAMES_PROPOSAL_OUT-*R3_NAME_CORR> is initial. If ACTIVATE was set, the corrected default is activated.Value range See also->Struktur PRX_PRPS_PROXY>Default Description Worst message type occurs in function call. Parameter can used to decidewhether a generation was successful or not. Value range SPACE, 'S'uccess,'I'nformation,'W'arning,'E'rror,'A'bort,E'X'ception' Default Description When you activate the generated proxies, the proxy metadata is convertedto ABAP objects and activated provided ACTIVATE = 'X'. Existing proxieswill only be persisted or overwritten if ACTIVATE is set. If ACTIVATE = space, you can use the exporting parameter CHANGED to findout if a proxy is still up-to-date. If ACTIVATE = 'S', the proxy will be saved only. Value range Default Description ABAP package in which the proxy objects will be generated. If DEVCLASS does not equal '$TMP' then TRANSPORT_NUMBER must be suppliedotherwise you have to enter the relevant information. Default Description Name of software component from Repository Value range For example, SAP_BASIS Description Version of software component from XI repository Value range for example, 640 Default Description Object type from XI Repository Value range See fixed values for domain PRX_TYPE Description Do not use this parameter any more. Use parameter NAME_PROPOSAL instead. For documentation see BADI SPRX_PROXY_NAMEPROPOSAL>. Note that if the Badi is implemented, when generating the names firstthe Badi is called, then the implementation passed via parameterNAME_PROPOSAL is called.Value range Description Use this parameter to pass a reference to an implementation for analternative name proposal. For documentation see BADISPRX_PROXY_NAMEPROPOSAL>. Note that if the Badi is implemented, when generating the names firstthe Badi is called, then the implementation passed via parameterNAME_PROPOSAL is called.Description If PERSIST_LOG is set, all messages are written to the application log. You can display all persisted logs in transactionSLG1>(object: "SPRX", subobject: "*"), or deleted in transaction SLG2>.Default Prefix> for the names of ABAP objects to begenerated.Value range Default Description If SHOW_LOG is set, all messages from the generation run are displayedat the end as a dialog. Default SPACE Description For WSDL_TYPE = 'URL' this parameter can be used to pass an instance ofIF_SLIB_RETRIEVER into the proxy generation. For a scenario where the function module is used more than once for thesame target host, multiple authentications can be avoided by creating aninstance and passing and reusing it for the each call. Also if the WSDL has to be processed before and/or after the call arepeated authentications can be avoided.
data l_xstring type xstring.>
data l_url type string.>
data o_retriever type ref to if_slib_retriever.>
>
l_url =>
'http://.../sap/bc/srt/wsdl/sdef_BOXED_SYNC_IN/wsdl11/ws_policy/>
document?sap-client=000'.>
>
o_retriever = cl_slib_entity_container=>create_retriever( ).>
>
call function 'SPRX_BCKG_CREATE_OR_CHANGE'>
exporting>
wsdl_source_type = 'URL'>
wsdl_source_string = l_url>
prefix = 'KTH_'>
devclass = '$TMP'>
activate = space>
show_log = 'X'>
slib_retriever = o_retriever.>
>
l_xstring = o_retriever->get_content( uri = l_url ).> Path suffix for HTTP destinationDescription Relative path to the basis URL defined using the HTTP destination andits path prefix. Default Description Type of WSDL source. This can be a URL (direct or indirect using HTTP destination), localfile or XI repository. The type determines how parameter WSDL_SOURCE_STRING is interpreted. Value range In the case of
- WSDL_SOURCE_TYPE = 'XI'
IFR_TYPE, IFR_NAME, IFR_NAMESPACE, IFR_COMPONENT_NAME,IFR_COMPONENT_VERS must be supplied. Otherwise WSDL_SOURCE_STRING is set according to the value forWSDL_SOURCE_TYPE:
- WSDL_SOURCE_TYPE = 'URL'
The URL address of the WSDL document, for examplehttp://www.quisque.com/fr/chasses/crypto/cesar.asmx?WSDL
- WSDL_SOURCE_TYPE = 'HTTP'
- WSDL_SOURCE_TYPE = 'PC'
local path for WSDL document, for example 'c:\temp\my_service.wsdl'
- WSDL_SOURCE_TYPE = 'DATA'
WSDL is provided via parameter WSDL. WSDL_SOURCE_STRING is ignored inthat case. Note: > Only one PortType (including the underlying objects) can be generatedper call. For external WSDLs (WSDL_SOURCE_TYPE = URL,HTTP or PC) that have morethan one PortType, you can use IFR_NAME to specify the name of thePortType for which a proxy is to be generated. Otherwise you have toenter this when asked.
|