Introduction
You might be thinking: how is consuming WebServices in ABAP really related to BSP. Is it because the WebAS and the ICM (Internet Communication Manager) are at the core of both technologies? Or perhaps it is because you might describe Consuming WebServices in ABAP as BSP turned inside out? When it comes right down to it, I included this in BSP Weblog because for me using WebServices just goes hand-in-hand with the applications that I happen to be developing in BSP. But don’t feel that this technology is limited to BSP. In fact all the samples I am going to share today run within good old traditional ABAP. There is even one with – gasp – just plain List Output (talk about combining old technology with new!).
Release 620
First off there is no easy, good way of consuming SOAP WebServices in 620. There is a client API realized as an ABAP Class Library. But if you read the SOAP Processor section on the service marketplace , you see that this method in 620 is basically incompatible with release 640. You have to work directly with the SOAP request at a fairly low level in the 620 API because proxy generation is not supported. All this and then you read the statement:
applications based on this interface therefore will face a considerable migration workload. Automatic conversion will not be possible.
Well that was enough to convince me to wait until 640 for full SOAP WebServices.
I was faced with a problem. I have a requirement to build an application that sends SMS messages to cell phones in Poland. Our SMS provider was only giving me the option of interfacing via a SOAP WebService. I needed the working interface up in running by September 2004. But at this time, our 640 upgrade was more than 6 months away. I didn’t even have a copy of the install media yet! But as people in the area I live in are prone to say, there is more than one way to skin a cat (makes you wonder what we do for fun around here). In 620 I may not have a good SOAP WebService client, but I do have a HTTP Client. Meaning I can make HTTP requests and process the response from ABAP. So why not simplify the interface by removing the SOAP. We make a request and on the URL we specify certain parameters (SMS Number, Priority, Message, etc). The service provider processes the request and sends us back a confirmation number and status in the response object. Little did we know at the time that we were flirting in the SOAP vs. REST area of WebServices. Now I have never been the type of person to get involved in theoretical debates about the potential uses of technology. I’m more of Git-‘R-Done kind of guy. Does the solution meet the requirements, budget, and timeline? Can I support it after we go live. If yes – then I say go for it. If you are interested in the SOAP vs. REST debate you can find plenty of articles on the web (and a few right here in SDN).
Configuration
Before we could really get started with this solution, we needed to configure a few things in the WebAS of course. First we will be passing HTTP(s) out of our Corporate Network, across the public Internet, and finally reaching our Service Provider (hopefully!). That means that like most corporations, we needed to configure our proxy settings for passing through the firewall. You can find these settings in Transaction SICF under GOTO->HTTP Client Proxy. You can probably just copy the same settings that you find in your web browser to complete these settings. If not have a chat with your network administrator.
We are going to be using HTTPS for our communication. Therefore we need to add our provider’s certificate to our Trust Manager. We can do this from transaction STRUST. Choose Environment->SSL Client Identities from the menu. This screen allows us to create a short SSL ID that we will attach our certificate to. We will also use this same ID later in our ABAP code to include this certificate in our HTTP Processing. We can return to the main screen in STRUST and upload their certificate. I had already navigated to the HTTPS URL that we would be using with my Internet Explorer browser. Therefore all I had to do was go into Certificates Listing in IE and Export the certificate. If you export as DER encoded binary X.509 (.CER) this matches up to the import option in SAP of File Format Binary.
You then should see your certificate under your SSL ID with a green light.
Coding
We are ready to look at the coding now. We will break it down into little parts so that is can be easily digested. First I implemented this functionality as a function module so that it can be called via RFC from our 46C R/3 system. I take in the SMS number, the Message Class, the Message, and the Priority as importing parameters. I then pass back the unique SMS confirmation number, the status and the entire HTTP response as a string.
*”—-
““Local interface:
*” IMPORTING
*” VALUE(SMS_NUMBER) TYPE AD_PAGNMBR
*” VALUE(CLASS) TYPE CHAR1 DEFAULT 1
*” VALUE(MESSAGE) TYPE STRING
*” VALUE(PRIORITY) TYPE CHAR1 DEFAULT 3
*” EXPORTING
*” VALUE(SMS_ID) TYPE ZZES_SMS_ID
*” VALUE(STATUS) TYPE ZZES_SMS_RESULT_STATUS
*” VALUE(P_CONTENT) TYPE STRING
*” EXCEPTIONS
*” MESSAGE_TOO_LONG
*” UNKNOWN_ERROR
*”—-
I wanted to make it easy to support different SMS providers or to make changes to the URL and SSL_ID; so ended up setting up everything in a configuration table.
So we can then start of function module with a little bit of code to read the configuration settings from the config table.
****Lookup the setting for Webt data: page_srv type zes_sms_page_srv. select single * from zes_sms_page_srv into page_srv where serv = ‘WEBT’.
Next up I want to perform some checks on the input data. First I will check to make sure the message isn’t too long. Next up I want to check for Polish Characters. Even though we are going through a Polish SMS provider, they asked us not to send any Polish National Characters. So we will use some SAP function modules to check the codepage of the string and then transliterate any national characters back to ASCII7. Finally we will replace any + in the SMS number and remove any spaces.
****Check the Lenght of the Message data: msg_len type i. msg_len = numofchar( message ). if msg_len > page_srv-max_chars. status = ’21’. raise message_too_long. endif.****Check Character set of the incomming message data: is_ok type scpuserec. call function ‘SCP_CHECK_CHARSET_OF_STRING’ exporting text = message langu = ‘E’ importing is_ok = is_ok exceptions internal_error = 1 fields_not_char = 2 overflow = 3 others = 4. if sy-subrc <> 0 or is_ok is initial.****Lookup the Codepage for Polish data: i_codepage type cpcodepage. call function ‘SCP_CODEPAGE_FOR_LANGUAGE’ exporting language = ‘L’ importing codepage = i_codepage exceptions no_codepage = 1 others = 2. call function ‘SCP_REPLACE_STRANGE_CHARS’ exporting intext = message in_cp = i_codepage importing outtext = message exceptions invalid_codepage = 1 codepage_mismatch = 2 internal_error = 3 cannot_convert = 4 fields_not_type_c = 5 others = 6. endif.****Check the recipient Number replace all occurrences of ‘+’ in sms_number with ‘ ‘. condense sms_number no-gaps.
Next up is where things get really interesting. We will build our full Request URL by adding on all of the outbound parameters. We create the client object for this URL.
data: client type ref to if_http_client, url type string.****Build the Sending URL concatenate page_srv-send_url `&Message=` message `&Class=` class `&Number=` sms_number `&Priority=` priority `&Project=` page_srv-project_name `&Sendingnumber=` page_srv-sending_number into url.****Create the HTTP client call method cl_http_client=>create_by_url exporting url = url ssl_id = page_srv-ssl_id importing client = client exceptions others = 1.
Next up we set our request type to ‘GET’ and start the HTTP communications.
****Set the Request type to GET client->request->set_header_field( name = ‘~request_method’ value = ‘GET’ ). “#EC *****Make the call client->send( ).
Now we are ready to receive the response back. We read it in character format. We then pull out the return parameters from this response block.
****Receive the Response Object call method client->receive exceptions http_communication_failure = 1 http_invalid_state = 2 http_processing_failed = 3 others = 4.****Get the response content in Character format p_content = client->response->get_cdata( ). data: result_string type string, id_string type string, junk type string.****Pull out the Result and the ID split p_content at `&` into result_string id_string. if result_string cs `Result`. split result_string at `=` into junk status. else. raise unknown_error. endif.
In the end we have fairly simple approach to what could have been a complex problem. We leverage the ability of the WebAS to act as an HTTP client and create an end result that functions very much like a WebService.
Release 640
If you really had your heart set on consuming SOAP WebServices from ABAP, you aren’t out of luck. WebAS 640 comes along and makes the process relatively painless by offering the ability to generate proxy classes. Since this technology is so new, I thought I might just build and walkthough a complete example here. I wanted to use a public webservice that was available for free for several reasons. First I wanted to demonstrate how flexible the technology was. Second I wanted anyone with a 640 system to be able to recreate the steps in this weblog on their own with the same webservice. I found a nice collection of webservices at the following web address: www.xmethods.com . I finally decided upon a simple service that returns book information when given an ISBN. It even gives us the current price of the book at several on-line retailers. The Service Description can be found here: http://www.winisp.net/cheeso/books/books.asmx .
Now that we have our webservice picked out, we are ready to generate our ABAP Proxy. To get the process started, we turn to our old friend SE80. From the Enterprise Services Tab, we are going to select Client Proxy and then hit create.
Next up we have to choose where our WSDL file is going to come from. We could connect directly to a UDDI server or XI repository and query for our object. Or we might have saved the WSDL definition to a file on our local machine. But in this case we are going to connect directly to the WSDL definition using the URL that we got from our on-line search.
Now we are asked what Package (Development Class for those you upgrading from 46C or lower) we want to place the generated object in as well as what prefix we want to use. I’m just playing around so I am going to make the object Local Private by putting in my $TMP package. To follow SAP naming standards, as well as my company’s standards, I will get the object a prefix of ZES_ (In case you are wondering – the object starts with Z to follow SAP’s naming standard for customer development. The next letter E standard for Electronics – the division I work for. Finally the S stands for Basis – the application area that this development belongs to.)
We have our generated Client Proxy. The following are some screen shots of what this should look like in SE80. You can see that not only do we have an ABAP class, but the process also generated structures and table types to represent all the importing and exporting data.
There is only one last thing we need to do to our Client Proxy before we are ready to use it: we need to configure a Logical Port for it. We can do this in transaction LPCONFIG. We can configure more than one Logical Port and specify the one we want at runtime. However for this solution we will just configure one port and make it the default.
Inside the definition of the Logical Port we can adjust settings for the Client Proxy such as the URL we going to call, the logging, State Management, etc. Since this is the default Logical Port, we will just save it with all the settings that were imported from the WSDL definition.
We can then return to SE80 and perform a test on the WebService by hitting F8. We then get a dialog that allows us to set parameters for our test.
We then choose which method we want to invoke. We are going to be using the GET_INFO method later in our example, so let’s test that.
Hopefully you get a success message like the following:
Once everything checks out OK in the test tool, we are ready to start programming against our Client Proxy. The following program example has one parameter for supplying the ISBN. We then take this parameter and use it to fill out the request object for our Client Proxy. After the call to the Client Proxy, all the returned data is contained in our response object. The response object has the format of the generated table types and structures as defined in the WSDL file. We can loop through this data and process as we see fit. For this case we are just going to output a simple ABAP list.
PARAMETER: p_isbn(100) TYPE c OBLIGATORY.
DATA:
-
Reference variables for proxy and exception class
lo_clientproxy TYPE REF TO zes_co_looky_book_service_soap,
lo_sys_exception TYPE REF TO cx_ai_system_fault,
-
Structures to set and get message content
ls_request TYPE zes_get_info_soap_in,
ls_response TYPE zes_get_info_soap_out.
****Set the input parameter ISBN into the Request of the SOAP Object
ls_request-isbn = p_isbn.
****Create the Proxy and Clall it.
CREATE OBJECT lo_clientproxy.
TRY.
CALL METHOD lo_clientproxy->get_info
EXPORTING
input = ls_request
IMPORTING
output = ls_response.
CATCH cx_ai_system_fault INTO lo_sys_exception.
-
Error handling
ENDTRY.
COMMIT WORK.
****Write Out the Basic Information
WRITE: / ‘ISBN:’, ls_response-get_info_result-isbn.
WRITE: / ‘Title: ‘, ls_response-get_info_result-title.
WRITE: / ‘Author: ‘, ls_response-get_info_result-author.
WRITE: / ‘Publish Date: ‘, ls_response-get_info_result-pubdate.
WRITE: / ‘Publisher: ‘, ls_response-get_info_result-publisher.
WRITE: / ‘Format: ‘, ls_response-get_info_result-format.
****Loop through the listing of Vendor Prices and output each one
FIELD-SYMBOLS
What I showed you here today is the tip of the iceberg for this technology. The possibilities for connecting applications through WebServices (even with different implementing technologies) are quite exciting. This is just one of the many new areas of NetWeaver that we all have to look forward to.
My objective is to get an SAP system integrated via the ABAP stack and not the java stack.
The application being connected to is generating complex WSDL files.
Has anyone been able to solve the liimitations of the proxy generator? For instance, when the "extension" element is used or when recursion is defined.
Do i need to use the SOAP framework to solve this problem?
Any help would be greatly appreciated.
Best regards
Marcus
If you can't find such a solution, I might suggest that you open a problem with SAP. You might just find out that the ABAP Soap runtime doesn't support such structures. On the other hand, this might make SAP aware that such features are required by their customers.
Did you get any solution for this problem as I am exactly facing the same problem(I have some extension tags in my wsdls).
I am glad to know if you get any kind of solution waither from SAP or anybody else.
If you get any efficient and quicker solution for this problem please send me that to venkatmarni@gmail.com
thanks in advance.
Regards,
Venkat Marni
thanks for this great weblog! It really helped me to get started in this matter.
Unfortunately I receive an error when testing the generated proxy (using the "test-functionallity" in SE80). I get a "SaupFaultCode:1" with the following error-text:
Found 0 operation definitions using keys:
Key name:'first-body-element-ns'
key value:'urn:EdilogUserManagementWebserviceWsd/EdilogUserManagementWebserviceVi/document';
Key name:'SoapRequestWrapper'
key value:'getDisplayName';
Do You have an idea whta might cause this error?
Thanks in advance, Regards
Jan Hempel
the webservice is running on one of our SAP-J2EE, I have written it by myself. I have tested it with the testing-tool of the Netweaver-Developer-Studio (which I used to create this weservice), and it is working fine there.
I followed Your suggestion with the tracing. Basically two things are conspicious:
After sending the soap-message to the server I receive an internal server error:
XRFC> INFO 09:22:52: SOAP HTTP Binding CL_SOAP_HTTP_TPBND_ROOT->HANDLE
XRFC> _STATUS_CODE() Received return code 500 ( Internal Server Error )
The soap-message which is then received from the server says that there is a security-exception:
com.sap.security.core.server.ws.service.WSSecurityException
Starnge thing, because I did not set up any security-settings for the webservice when devolping it. It has no Authentication, no Authorization.
Regards
Jan Hempel
This is probably due to the restricted fieldlength of ABAP-programnames.
Regards
Jan Hempel
Thanks a lot for the weblogs! It's really helpful. But I come to a situation that I need to create an abap client to consume some stateful web services, which I implemented by JAX-RPC. In java, JAX-RPC requires client to special stub property. How can I do that in abap?
In general, how to create and consume stateful ws in abap?
Thanks a lot!
Song
After you generate your proxy client, you should go to the preconfiguration tab. On this tab you can set your stub properties (such as authentication, transport guarantee, message id, etc). On of the options is for Session-Oriented Communication. You should just have to select this feature and activate the proxy.
Thanks a lot for your reply. I did set the session property as Session-Oriented Communication. But it still works as stateless. I found another place need to set is in creating Logical Port. It seems I need selecting the State Management checkbox activates state management by means of http cookies. Dose it make sense to you? then there is a problem is that it only work with choosing HTTP destination in Call Parameters section. Then my question is: how can I change from url to HTTP destionation? I can't create http destionation for my url of wsdl file, since it's a query string.
Thanks a lot!
Song
I'm also not suprised that you must setup an HTTP destination. Anything beyond a basic anonymous setup generally requires an HTTP destination.
As to setting up the HTTP destination - have a look at the following weblog:
Calling WebServices from ABAP via HTTPS
In it, I just took the URL that had been stored in the Logical Port and broke it up into the separate fields of the HTTP Connection.
Thanks for your reply. It's very helpful. Following your instruction, I regenerated the client proxy with session feature checked and setup the Logical Port with state management and Http destination. But it still doesn't work statefully.
My abap code is trying to consume a email WS, which is stateful to keep a mail session alive as long as the user doesn't close it. In my abap client side it seems still working stateless as:
after "CALL METHOD mail_proxy->open_mail_session" to open a mail session, the "CALL METHOD mail_proxy->open_mail_store" throws an exception: "ICF Error when receiving the response: HTTP COMMUNICATION FAILURE".
Do you have any idea about it? Is it still the client proxy or logical port stateful setting problem?
Thank you very much!
Song
Thanks a lot for the tutorial about webservices, I was able to create a client proxy based on the XI Repository but when executing the generated method I always get a popup for entering user and password. The popup has following info
Resource XISOAPApps
username .....
password .....
Is it possible the define a default user & password? Or determine the user & password at runtime?
The sap system I use is a 2004s
Thanks a lot,
Vincent.
Calling WebServices from ABAP via HTTPS
Thanks a lot,
Vincent.
Is it possible to give this information in the client consumption program itself ?
I came across this blog and wanted to use it in one of the scenarions in our project. I am trying to get stock price by consuming a web service but I get the error when I try to do it.
HTTP error (return code 400, message "ICM_HTTP_CONNECTION_FAILED")
I tried the same books example to start with. Is there any setting which needs to be done before I can use this?
Thanks,
Kiran
That is usually the most likely suspect. However you might check the HTTP logs (transaction SMICM) to see if they have more details. A 400 HTTP error according to the w3.org is a Bad Request:
10.4.1 400 Bad Request
The request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications.
http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
When I go to the SICF transaction and to client proxy config, I see two check boxes
1. Proxy Setting Active
2. No Proxy setting for Local Server
None these are ticked, and below these two I see a table which says
"No proxies for the following addresses" where I can enter entries which can be filtered from proxy settings...
If I enter my webservice in those filter address, will it solve the problem? Or what exactly should I configure here?
The other option I have is to download the WSDL file and upload it into WebAS. How can I download the WSDL? When I tried doing that it gave me error saying "text format not allowed".
Thanks,
Kiran
As far a downloading the WSDL file, that depends upon where you are getting the file from. Different sites will have different mechanisms. I ususally view the WSDL file in my browser (it is just XML) and the do a Save As to get the file local. However loading the WSDL file locally, isn't going to help you get around your proxy problem. The WSDL is just the service definition, you still need to pass through the firewall when you make the Web Service call itself.
Thanks
Kiran
Hi Thomas,Benjamin Hindelang
This might get your proxy to generate, but then what happens at runtime. The proxy class encounters something different than what it expected - since the source webservice hasn't changed. That is exactly the situation you have here - the proxy doesn't match the web service it is calling and therefore produces an error.
If the source Web Service is structured in such a way that you can't generate a proxy for it, then you can't expect to call it at runtime. You need to change the source webservice settings, not just the WSDL defition of the webservice.
The webservice settings can't be that wrong, because the the nwds webservice test tool copes with it and even a simple java client is without any problems able to call the service. But in both ways I've got a support for rpc encoded wsdls. Obviously, as mentioned in some sdn forums, r/3 does only support document/literal but not rpc/encoded wsdls. So if I can't do anything at generation time, I have only two possibilities left:
1. not using soap with attachments but simple soap and having a large amount of bytes in my soap body.
2. making an rfc call to ejb which provides the webservice.
Both ways are not really what I wanted to do, but if there's no other way.
Maybe you have another solution for my problem.
Regards,
Benjamin
First of all, I'd like to thank you for all your very comprehensive blogs about this subject, they've helped me so much.
I've followed this page step by step (the 6.40 part) in order to consume an external Web Service. The WS I'm using is a very simple one I found on xmethods, 'Quote of the day', which requires no input (minimizing the areas I might make a mistake in...)
At first I had a connection problem (HTTP error 400, which many have had) which I've fixed by entering all the correct proxy info.
Now, after I've created the client proxy, created the logical port for it, and activated both, I test them just as you suggest by hitting F8.
This is where I'm stuck, I get an ERROR_WEBSERVICE_RUNTIME_INIT error message. I've tried looking up this error, and have found nothing on SDN, google, or CSS notes. I was wondering if you've ever encountered this problem and if you know what the reason for this error is?
I've tried it with other webservices (to see if the error is maybe due to the WS itself?) and have gotten the same error, so I guess the error is coming from my side...
I'd like to find out if the error is due to something I might have done wrong while creating the proxy object (I won't bore you with the details of my step by step procedure unless you're curious) or whether this error indicates to some wrong settings in my system, or maybe some missing building blocks? I have no clue ...
Thanks in advance,
Micol Lazar
I would suggest two things. First turn on trace for that logical port and try and run it again. The trace will hopefully give you a better description of what is going wrong or at least where it is going wrong.
Also have you tried consuming a webservice from the J2EE stack or even from the same ABAP system? This would give you an even more controlled enviornment.
You final option is to go ahead and open a support issue with SAP on the issue. They can connect to your system and see exactly what is going on.
I've applied the process on WAS640 and I've got the same error message when testing the WS.
"...
ERROR_WEBSERVICE_RUNTIME_INIT
..."
Please help if you succeed in going through.
Thanks.
Philippe
Hello Thomas, Thilo
I found a workaround for that specific problem. When debugging the ABAP code I discovered a bug that causes this error. The framework cannot handle
tags correctly. When using complexTypes, it works fine. I will open a CSN note for that issue.
Best regards,
Thilo
Is there any cure for this issue? -I really need to make a WS client from wsdl that generated by JBoss... Thanx a lot.
Your inquiry should be turned in as a formal support ticket however so that they can determine if this is a problem with the proxy generation on the ABAP side.
My SAP version is 6.20 and i use your example to access an http web.
Can you help me to describe the connection type 'G' in the SM59?
Thanks for your help.
Géraldine LAVENANT.
http://help.sap.com/saphelp_nw2004s/helpdata/en/22/04262b488911d189490000e829fbbd/frameset.htm
Can you help me on this exception .
Thanks .
Thanks for your help : The subrc equal 0 now.
Other question : I Get the response content in Character format but can i have an XML document in my version 6.20
Your going to get whatever format the response body was sent in. If it is actually XML in a character string then just use the iXML library to import the stream and then you can process it as XML.
My version SAP is 6.20.
Can i receive a pdf file to an external application HTML? I want to receive the pdf file and i want to save the pdf file in a change document (CV01N).
Thanks a lot.
I receive the xml document :<br/>----
<br/> <?xml version="1.0" encoding="UTF-8" ?> <br/>- <resultatCalculPrix><br/>- <codeRetour><br/> <code>0</code> <br/> <message>tout va bien</message> <br/> </codeRetour><br/> <prix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SBHdWlsbG9jaG9uKS9Nb2REYXRlKEQ6MjAwNzA0MjMxNjUwMDMrMDInMDAnKT4CmVuZG9iagp4cmVmCjAgMTMKMDAwMDAwMDAwMCA2NTUzNSBmIAowMDAwMDA0ODI5IDAwMDAwIG4gCjAwMDAwMDUwNDEgMDAwMDAgbiAKMDAwMDAwNDczNyAwMDAwMCBuIAowMDAwMDA0NjUwIDAwMDAwIG4gCjAwMDAwMDAwMTUgMDAwMDAgbiAKMDAwMDAwMTE3MiAwMDAwMCBuIAowMDAwMDA1MzAzIDAwMDAwIG4gCjAwMDAwMDMxNzYgMDAwMDAgbiAKMDAwMDAwMzM4NCAwMDAwMCBuIAowMDAwMDA0NDQxIDAwMDAwIG4gCjAwMDAwMDUzNjAgMDAwMDAgbiAKMDAwMDAwNTQwNSAwMDAwMCBuIAp0cmFpbGVyCjw8L0lEIFs8MDZlMzViODNjNjVmNzZmOWRhN2Y4ODBkZGM4MDAxNzYPDU3NjNkNzc0MmUyZWJjYTdkMTZkMzQyOTM3ZjA3MzIxPl0vUm9vdCAxMSAwIFIvU2l6ZSAxMy9JbmZvIDEyIDAgUj4CnN0YXJ0eHJlZgo1NzUzCiUlRU9GCg==</structureFormulePrix> <br/> </resultatCalculPrix><br/><br/>----
<br/><br/>In the resultatCalculPrix>, i want to receive a path or file pdf.<br/>how can i receive the file pdf from an xml document?
I'm not sure why you would want to receive a path and filename when it looks like you already have the full PDF in the XML? The binary content of the XML file is in the field structureFormulePrix. You just need to pull this out of the XML (I suggest using the iXML classes) and then you can process it as you see fit. As far as processing it into CV04N - like I said that is very application specific and very far off topic. I suggest you ask that question in the ABAP forum. As I remember the Document Management system has some BAPIs, but the coding is also dependent upon if you use the SAP Content and Cache server in conjunction with CV04N.
Oh and in the future it really isn't necessary to post the entire binary string of the XML into the comments. Most blog authors get their comments via Email - that created one heck of big email that my blackberry had problems dealing with. 🙂
Hi,Regards, Mathias
CREATE OBJECT lo_clientproxy.
If I wanted to supply the logical port name at runtime, I would just change this code to:
CREATE OBJECT lo_clientproxy
exporting
LOGICAL_PORT_NAME = LPORT.
LPORT would need to be a variable of type PRX_LOGICAL_PORT_NAME and contain the name of an existing logical port that had already been configured in LPCONFIG.
Thanks for a great bolg. It really helped me to learn in how to consume a webservice.
As of now I am facing an error when calling a method from the webservice. Following is the error 'Index was outside the bounds of the array'. Can you please tell me why this error is coming and is it from SAP end.
Thanks in advance for your help.
Great tutorial.
I was wondering if you know whether it is possible to use a DTD file as opposed to a WSDL file in your second example (Release 6.4). Do you have a similar solution that would consume a webservice using a DTD file?
Thanks in advance.
I have run into another error while trying to consume a WebService that was created in .NET.
When I test the service, I get the following error message:
SoapFaultCode:2
This is a little strange, since I previously created a different webservice in the same manner and did not run into any errors while consuming it.
Do you have any ideas?
Thanks in advance.
Error during XML => ABAP conversion (Response Message; error ID: CX_ST_GROUP_MISSING_CASE; (/1SAI/TXS00000000000000000005 XML Bytepos.: 3013 XML Path: root(1)ns1:getEmployeeByPayrollCompanyResponse(1)ns1:result(1)ns_level1MgmtOrg:level1MgmtOrg(11)
What is strange is that I seem to only get the error when certain data get returned but for other data I do not get this error, please tell me what this error means and if this is a error on the web services side or on my side in ABAP.
Thanks for all your help
Thanks for your reply, we have determined the problem, it seems the ABAP conversion routine can not process NULL values in the XML tags.
So I asked the service provider to exclude sending fields that have NULL values and this worked.
I want to ask you a question please and hopefully you can point me in the right direction here.I am at a client and they are using ESS Portal so that their employees can update their personal data like addresses etc.My requirement is that I want to catch whatever the user changes in the portal in R/3 ABAP but I do not know how to achieve this.Maybe you can help me on that.
Thanks in advance!
Mark
I want to ask you a question please and hopefully you can point me in the right direction here.I am at a client and they are using ESS Portal so that their employees can update their personal data like addresses etc.My requirement is that I want to catch whatever the user changes in the portal in R/3 ABAP but I do not know how to achieve this.Maybe you can help me on that.
Thanks in advance!
Mark
Hi Thomas
Hi Thomas,
Web Services: The Case of the Missing SOAP Action Header
I doubt that overwriting the response payload with the requestion one would work. You would need to set the new URL directly. However if I remember correctly from trying to work with SalesForce.com in the past - there is a set_url method but either didn't work or wasn't public - I can't remember.
First of all thank you very much for your valuable time and quick response.
You are correct I tried to set the url directly with "set_url" method in transporting binding (CL_WS_TRANSPORT_BINDING). This method doesn't work.
I have gone through your blog "The Case of the Missing SOAP Action Header" and tried getting the response payload(GET_SENT_RESPONSE_PAYLOAD) from WS protocol and set it to request payload (SET_REQUEST_PAYLOAD) of WS protocol. Do you think this should work?
In this case, do you think the new url set in request payload will be used in further WS calls to salesforce?
Could you please help me pointing any documentation/help on request/response protocol payloads.
Thanks,
Anil
If you want to research it further I suggest you check out the online help:
http://help.sap.com/saphelp_nw70/helpdata/EN/47/3d95b07e1a20cae10000000a155369/frameset.htm
when I was using SalesForce.Com I used the enhancement framework to modify the set_url method so that it worked. I think from memory the correct codeing was commented out. The change was only a line or so.
Once I had fixed this method it all worked fine.
Cheers
Graham Robbo
Thanks a lot for the clear explanation. However, when testing the webservice, I don't receive a success message but:
ERROR_WEBSERVICE_RUNTIME_INIT
What might be the problem?
Hmm, still not working. This ne doesn't seem as simple as the previous one. I see no references to 'error_text' anywhere else.:
http://help.sap.com/saphelp_nw70/helpdata/EN/16/285d32996b25428dc2eedf2b0eadd8/frameset.htm
Then use Transaction ST11 to view the trace:
http://help.sap.com/saphelp_nw70/helpdata/EN/1f/8311664bc511d189750000e8322d00/frameset.htm
SoapFaultCode:1
It seems like my first parameter is used as name of a method.
I am also getting the same error ..How did you overcome error? .Please advise.
Thanks
Kris
The Error that I mention here is
SRT: Invalid settings in Web Service Registry detected
ESRT_LPREG 043
Thanks
kris
There is raised an exception of type CX_SOAP_CORE:
E_TEXT = SRT: Invalid settings in Web Service Registry detected
E_ID = 1019
E_FAUL_LOCATION = 1
As a way to give back I wanted to post here a tracing tip i've discovered for WS client debugging purposes, which is an (easier?) alternative to activating tracing in LPCONFIG and then checking system logs:
If you go inside method CL_PROXY_FRAMEWORK->WS_CALL_OUTBOUND( ) -which is called by the client proxies-, you'll see there (among other coding) this method calls:
ws_process_payload( ). <-- This creates the XML request payload
ws_process_call( ). <-- This invokes the service
ws_process_payload( ). <-- This receives the XML response payload
Now, if you put a breakpoint inside method ws_process_payload( ) you'll see there's a local variable L_SHOW, set that to 'X', and when you hit F7/F8, the XML payload gets shown on screen in a nice XML editor.
I'm just beginning with web services and this discovery is helping me a lot while troubleshooting, hope it helps others as well.
Regards
This is a very useful weblog that I have tried to implement for a POC.
I was using SAP ECC 5. The proxy generation form the WSDL file is just fine, but the soap request sent from the sap server is wrong...
The WSDL defines an operation AAAA with input and output message types. In the soap request, it is the input message that is called and not th operation...
This is the SOAP request that is generated :
can anyone help ???
Nicolas
I have still got the problem of the soap request that is wrong.
Have you any idea of how I can find out why request is wrong. I have debugged the call and even when changing data manually before the actual SOAP call, the request is wrong...
Thanks for any help you can provide.
Nicolas.
Thank you Thomas for the reply...
The solution to our problem is a support package... We were in SP12 on ABAP Basis. I have tested on a SP14 system and the Soap message is OK...
I hope this will help others...
Regards,
Nicolas
i followed your blog and created abap proxy.then i used the method of the class generated in proxy for extraction program.But when i tested it in i am setting Exception(In tranx:SM21) saying:SOAP Runtime Protocol: SOAP Fault exception occurred in program CL_SOAP_RUNTIME_ROOT==========CP in include CL_SOAP_RU NTIME_ROOT===
==========CM004 at position 80.
Please suggest me wht kind of exception is this and is it related to XSD type.
thanks
Snehasish Das
SOAP Exception just means that something went wrong. You need to provide the details listed along with the SOAP Exception before anyone will be able to help you.
"Cannot figure out operation name. Bad SOAPAction or wsa:Action."
When i tested the created proxy ,it always hangs.
Thanks
Snehasish Das
"Cannot figure out operation name. Bad SOAPAction or wsa:Action."
Thanks
snehasish
Hi Thomas,Kumar
Have you checked via your PC/browser to see if the URL listed in the WSDL is actually reachable? Is the service outside your firewall? If so, you probably need proxy settings (just like on your client machine). Proxy settings can be maintained within transaction SICF.
I am also facing a similar error.Can you please suggest me how you resolved the issue.
Thanks,
Chakram Govindarajan
The ABAP client proxy was generated successfully.
On Proxy-Test and selecting a method, an error message comes back.
It turns out that the receiver cannot understand the SOAP header which is sent.
We also tested with an external test application (soapUI), where the service can be called qithout any problem.
It seems that the receiver has some problems with header tags like
http://conterra.de/waage/InitMapSession http://janus2.bsh.bvbs.bund.de:8080/axis2/services/MapClientWS
My question is if the 'MustUnderstand=1' can be removed. Is there a configuration?
The second one is if the header is correct at all.
If you look at the Action definition (n2) the action http://conterra.de/waage/InitMapSession is a little strange, since it consists out of the namespace http://conterra.de/waage and the operation name 'InitMapSession'.
How should this action be interpreted?
Can I configure the webservice runtime in a way that these header data are not sent?
Thanks,
Michael
Do you know for sure that the mustUnderstand is the cause of the problem. mustUnderstand does appear to be a valid element:
http://www.w3.org/TR/2000/NOTE-SOAP-20000508/#_Toc478383500
In SOA Manager did you use WDSL based or manual configuration of the logical port?
my webservice contain total 6 methods.
thanx for ur reply..
I checked the ST22.it contains no errors..
and another issue is
if my proxy’s contain the errors(cx_root)
When I call the methods in a function module they executed successfully..
Is there any problem in future???????
wait's for ur reply..
lakshman
A SOAP Runtime Core Exception occurred in method configure_features of class CL_SOAP_APPLICATION at position 32 with internal error 1019 and error text SRT: Invalid setting in Web Service Registry detected (fault location is 1).
The feature it is working on is http://www.sap.com/webas/630/soap/features/transportguarantee/ and the property is null. It needs to be either "Level" or "TlsType" or the error is produced.
Can you tell me if this is a problem with perhaps the WSDL, or an SAP product error, or something else on the server side?
Testing the proxy site, a simple validation app, with my web browser is successful.
Thanks.
I am no expert in proxies or when it comes to runtime environment of Services.
Am using ECC 6.0 & CE 7.1 EP06
I have a Composite Application(CAF, using Java) which consumes BAPIs and Enterprise Service.
For connecting the CAF(Java) layer to communicate with ECC I need to perform mapping between the destinations of the BAPI(RFC destination) and the Web Service destination.
For authentication, in the case of RFC destination I have used the assertion ticket and is working fine. But for the Web Service Destination, when I try using the Logon Ticket I get the error
" Error while creating assertion ticket on demand. No logged in user found. "
and when using the Logon Ticket I get this error
" Properties not set:
NS: http://www.sap.com/webas/630/soap/features/transportguarantee/ Name: IncludeTimestamp "
Please help me in this issue. Any information is appreciated.
Thanks Brian
I just started to play with the ABAP service consumer proxy. I am using it to call a web service in a .Net server on my company's intranet. I am facing the problem with the authentication. When testing in the SOAPUI tool I need to enter the username, password, and the domain. I could also enter the domain like domain\\username. It worked fine either way in SOAPUI. When I tried to call the service through an ABAP consumer proxy in an ABAP program it did prompt me for username and password but not the domain. I entered domain\\username and password but got the 401 unauthorized error. The .Net server and the SAP server running the ABAP proxy and program are all on the same domain.
I have searched in SDN and google without much luck. Can you please provide some idea on how this can be resolved or where I can find more information? Thanks.
Regards,
Jiannan
Hi Thomas,Chakram Govindarajan
If this isn't the case, then the service might actually be unreachable - hence an invalid URL or the authentication might be incorrect.
Below is my thread Posted: Apr 8, 2009. Still without answer. I think I don't need to create any Webservices - I'm not sure for this! Please help me to solve my problem exchanging xml file via https. We have in the company Netweaver, so there is the posibility to use xi. We don't provide BSP Applications. I tried with an abap report: /community [original link is broken], which was failed!
Which configurations must be done for a correct comunication via https.
My Thread:
I try to send/receive files via HTTPS. To send and receive files to/from the Server my script must include the following steps:
1. Open an HTTPS connection to Server using the URL that describes the action (send, retrieve, etc.).
2. Send the necessary HTTP headers.
3. Send any data needed for the action.
4. Read the answer from Server.
5. Close the connection.
To open the connection I would like to use:
HTTPS.Open(“http://www.xxx.com?user=xxx&password=xxx&action=send”)
Which Server (SAP Netweaver) configurations are necessary to get the connection?
Regards
You have to have something that you are connecting to on the sever - a service handler, a BSP application, a webservice. This isn't a file server you are talking to.
Also if this is a thread from the forum, then it would courteous to at least provide a link to that thread.
Please tell me what is my mistake? I always become the http_communication_failure Exception calling client->receive method?Kind regards!
Thats waht I get as from the ICM Monitor:
[Thr 5540] *** ERROR => NiBufIConnect: non-buffered connect pending after 5000ms (hdl 9;www.w3schools.com:80) [nibuf.cpp 4611
[Thr 5540] *** WARNING => Connection request from (21/13936/0) to host: www.w3schools.com, service: 80 failed (NIECONN_REFUSED)
RM-T21, U13936, 040 AGI, localhost:0, 14:53:46, M0, W1, SEU_, 4/2 {000321e0} [icxxconn.c 2321]
--
Go to transaction SICF. Execute to get the service node hiearchy. Then choose Client->Proxy Settings from the menu. Maintain the settings according to the demands of your network.
Now I have a little success. I am able to receive a correct response from my BSP Applications. An Also the Test with http://***//sap/public/bc/sicf_login_run?sap-client=###' was successful.
But I am still unable to get get the data from external server like http://www.w3schools.com I will ask to fire wall settings from the administrator and will turn to here again.
Thank you.
But I also don't get the requested file.
Perhaps you tell me about this error?
"The requested URL could not be retrieved... Access Denied..."
But the URL: http://w3schools.com/Xml/note.xml is public and doesn't need login.
Thanks for such a wonderful blog.
I am having problem in consuming a Internet webservice. I am getting the following error
404 connection failed.
when i go to the message information it says to maintain the proxy settings.
In SICF>Client>proxy setting
Now I am really confused that which settings I have to make there.
Like what host name and the etc, and where to get them all
Kindly Suggest.
Warm Regards
Upendra Agrawal
we try to do the same on new NetWeaver 7.0 ENH1, where are all stuff regarding SOA and WS upside-down.
Right now we are stuck with a problem, how to set up a LogicalPort for Client proxy to connect to WS via HTTPS with authentication via client certificate. Simply there is NO field to mark "use X.509 certificate" for authentication.
Do you have any experience with new SOAMANAGER in this matter ?
Thank you in advance.
Best regards
Tomas
This is a very helpful blog.I am trying to consume a web service in abap.
Here is the piece of code which does the job:
data: proxy type ref to ZPM_ESRICO_LOCATOR_HUB_SOAP,
input type ZPM_ESRIMATCH_SOAP_IN,
output type ZPM_ESRIMATCH_SOAP_OUT,
exception type ref to CX_AI_SYSTEM_FAULT,
data type string.
data = 'High Street Glasgow'.
input-MATCHER = data.
create object proxy.
TRY.
CALL METHOD proxy->match
EXPORTING
INPUT = input
IMPORTING
OUTPUT = output
.
CATCH CX_AI_SYSTEM_FAULT into exception.
CATCH CX_AI_APPLICATION_FAULT .
ENDTRY.
When I execute it, I get a cx_ai_system_fault exception with error_text saying 'Server was unable to process request. ---> Object reference not set to an instance of an object'.
Hi Thomas,
After I created the client proxy I tested it and it worked but not perfectly. The web service I am consuming receives an XML file and returns a message with information about that XML file. The problem is that I am not getting that message back. I checked the data types created by the client proxy and some of them look like they were not created right. When I try to access to those objects I get the following error:
No proxy exists for object comprobante (namespace http://ec.gob.sri.ws.recepcion)”
ZCH_COMPROBANTE_TAB looks like a table use for sending the information about the XML file back to us. Please help me, I need any help you can give me.
I wrote this blog in 2004. Much has changed about the web service tools since then. I would strongly recommend that you post your question to one of the appropriate SCN forums instead.
Hi Thomas,
I am consuming Microsoft .NET webservice in ABAP but after completing the proxy wizard it results in error 'No Vendor specified' error. I used report RSSIDL_DESERIALIZE_DEMO to test WSDL correctness. The report showed the exception like ' Incorrect value:Namespace prefix q1 of Qname q1 Exception is undeclared'.Bu the same WSDL works and gets consumed in SAP system with higher Releases.Please advise .
Your help is highly appreciated.
Thanks
Prabaharan
Hi thomas , i trying to create a service consumer usin se80 and i get this error..
"message part refers a type, not an element"
SPRX 338
have you any idea about issue?
please.. Thanks for you attention