Search This Blog

Showing posts with label SOAPUI. Show all posts
Showing posts with label SOAPUI. Show all posts

Thursday, June 22, 2017

Adding Attachments using GOS and testing a webservice with SOAPUI

SAP Tips:
  • Make SAP import parameter for file type XSTRING
  • Pseudo code:
    • call function 'SCMS_XSTRING_TO_BINARY'
    • Use include and SWC macros to build objects for calling cl_binary_relation->create_link
    • call cl_binary_relation - create_link 
      • Example params:
        • is_object_a-instid = vendor number or custom value
        • is_object_a-typeid = LFA1 or custom value
        • is_object_a-catid = 'BO'
        • is_object_b-instid = swc_get_object_key lo_message  lv_message_key
        • is_object_b-typeid = 'MESSAGE'
        • is_object_b-catid = 'BO'
        • ip_reltype = 'ATTA'


SOAPUI tips:

  • Click on attachments tab and upload attachment
  • Use cid:notation (i.e. cid:) in the element tag
  • Double click on UNKOWN in the TYPE column and select filename
  • Use the drop down in the PART column to select the filename, the TYPE column should change to CONTENT

Change URL to httpS

References:


Note: After adding the attachment and adding the "cid" notation I had to double-click on the "UNKNOWN" type, this somehow allowed me to select the file name under the Part field.

Wednesday, December 15, 2010

How to create a WSDL / webservice:

How to create a WSDL / webservice:

1. Create RFC enabled function.

2. Create webservice:
a. SE37 -> Utilities -> more Utilities -> create webservice -> from function module
b. Follow the on-screen prompts (give the service a name, usually the same name as FM; X-Mapping der Namen; SOAP Application: soap:runtime:rfc:710; Profie: PRF_DT_IF_SEC_NO; X-Deploy Service)

3. Create WSDL:
a. /nSOAMANAGER -> Application and Scenario Communication
b. -> Single Service Administration
c. -> Search for your service -> Select it and click apply
d. -> Open WSDL document for selected binding, change WSDL Format to"Standard"
e. Save XML locally (this is the WSDL)

4. Maintain service:
a. /nSICF -> enter “service name” -> execute
b. Double click on lowest node and setup “logon data”

5. Test using SOAPUI
a. Download SOAPUI freeware and install
b. File -> New soapUI Project
c. Enter “Project Name” and location your WSDL saved in step 3.e -> ok
d. Open up request -> update XML with input -> click green arrow to run

Change function module / webservice:

6. If you have made changes to the interface of your FM:
a. SE80 -> Edit Object -> Enterprise Services
b. -> enter service name in Service Definition
c. -> change -> activate

7. Repeat steps 3-5.