2023 Mar 06 9:57 AM
Hello all,
To put in a better word of my other question posted, I have a case where external system calls SAP to request for master data, in this case I am using SOAP wsdl.
I go through the regular procedure to create the wsdl binding url such as ( RFC creation, service definition creation , service binding creation from SOAMANAGER ). In my previous project, these 3 steps is enough for external system to use the wsdl. However, in this project (different SAP system from my previous project), when I asked my colleagues to test the API, he says that the url is not working as it returned error. Thus, I tried to run the service in SICF ( in this case, the name is ZWS_TEST2 ) using the 'test service' option, but it returned page error 415. Then, using the ICF recorder in SICF tcode it returned error response:
HTTP/1.1 415 Unsupported Media Type
Set-Cookie: sap-recorder_sid=%2cc%3dGDE%25-C0A8B708511C6405AA32159F00000000%25-%25-1%2co%3dgwdev_GDE_10%25-110%25-ABAP01; path=/; domain=mycompany.local
Content-Type: text/html
Content-Length: 0
So I set trace in SRT_UTIL, then re-run the service in SICF. Back to SRT_UTIL, it show error in performance trace tab
error logs:
To solve this issue, I assume that in order for wsdl to be successfully called from external system, the two service on image 1 and 2 below should be successfully run on 'test service' option (which is not, returning page error 415)
img 1.
img 2.
but so far, I haven't found any possible solution ( some mentioned like changing the content-type, which I'm not sure where to do so).
Please help.
*UPDATE 07 MARCH 2023
I tested my wsdl url using SOAPUI, it return with response 200, which seems OK
HTTP/1.1 200 OK
set-cookie: sap-usercontext=sap-client=110; path=/
content-type: text/xml; charset=utf-8
content-length: 281
accept: text/xml
sap-srt_id: 20230307/143248/v1.00_final_6.40/D8D385F858991EDDAF9748561B1CC302
sap-srt_server_info: GDE_110,44 ,urn:sap-com:document:sap:soap:functions:mc-style,ZWS_TEST2,ZfmTest,0
sap-srt_server_info_ext: 0
<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/"><soap-env:Header/><soap-env:Body><n0:ZfmTestResponse xmlns:n0="urn:sap-com:document:sap:soap:functions:mc-style"><OutMsg>Message Received</OutMsg></n0:ZfmTestResponse></soap-env:Body></soap-env:Envelope>
2023 Mar 06 11:43 AM
Hello xiswanto
xiswantoAs per note 1232144 - Empty or Wrong Content-Type received in HTTP Request
In HTTP Request Content-Type must be set explicitly either "text/xml" when SOAP 1.1 Protocol is used or "application/soap+xml" when SOAP 1.2 Protocol is used.
Hence, I'd say your HTTP request is incorrectly formulated.
Best regards
Dominik Tylczynski
2023 Mar 06 1:03 PM
You cannot test an ABAP-based Web service by just using "Test Service" which sends a generic request with very probably wrong content (especially true when it's SOAP).
You have the possibility to test such an ABAP-based Web service via SE80 > Service Definition (or more directly via SPROXY_START).
But in your case, you probably want to test via SoapUI or Postman.
Most importantly, spend time with your colleague who "says that the url is not working as it returned error". What is he doing? What request does he send? To which URL? What message does he see? Does it work for other Web services? Can the two servers connect to each other (ping)?
2023 Mar 07 3:48 AM
Hello Sandra,
I see.
I've test the service definition from se80 and it work just fine ( I'm using a single field as input and output parameter, both type string ).
As for the Web service, this is the first custom web service created in my current system, so I can't say whether the problem lies in my newly created web service or the system configuration itself.
Following the tutorial to call SOAP API using Postman, I'm stuck at steps where I need to retrieve the SOAP message to be used in the final step, because the location path I found in the wsdl url returned an error, which I traced on SRT_UTIL with error below:
as for the location path, I assume it looks something like this (perhaps the same one as the 'test service' of my web service in SICF):
http://gwdev.company.local:8010/sap/bc/srt/rfc/sap/zws_test2/110/zws_test2/zws_test2"/>
Perhaps, it might be related to the comment left by 3a9e4ce873a94034b33dc62b0ce600ee, although I have no idea how to make my HTTP request correctly formulated, is it configuration in my current system or something like that?
*UPDATED in original question, I tested using the SOAP UI and returned with response 200.
so, is the problem lies with how my colleague interact with the wsdl?
2023 Mar 07 8:58 AM
Well done for the SoapUI test. You may also debug ABAP (user/external breakpoints with the user that is running the WS) to make sure all the parameters are passed okay.
So, the WS works at your side.
Your colleague uses the WSDL to know the signature of the WS and its URL. You should discuss together as I said, not just say it's your business.
2023 Mar 07 10:30 AM
Noted.
I've actually discussed it with him, but somehow we reached the conclusion might be one of these 2:
- need purchase certain SAP license in order to allow external system integrate data into SAP
- from the external system, he need to go through another platform ( such as through mulesoft ), in order for the data to reach SAP
Not really sure if his code is correct since I'm not really familiar how external system consume SAP API but I do mentioned that it might be the content-type he's using to call the API.
or might it be that SAP HANA differ so much from EHP on the service provided?
Anyhow, we pretty much stuck here and can't proceed any further as I need to postpone this task as he is resigning today.
I appreciate the feedback so far.
2023 Mar 07 3:59 PM
I think that probably you don't need to buy an SAP license to just consume something developed in SAP, because you already have an SAP license.
I can't comment the conclusion about "go through another platform" as I don't know what the issue is. But I would be very surprised that an intermediate system is needed.