How to call web service on a button click in Web UI
Hi Experts,
I have a requirement to call/consume external web service on a button click in CRM web UI. Can someone help me with the code sample for invoking web service from crm web ui?
Thanks in advance.
Cheers,
Sumit Mittal
Consuming external web service directly without xi system in between.
u2022 SE80
u2022 Create Enterprise Service-> Choose object type as u201CService Consumeru201D
u2022 Select URL HTTP destination in the next step
u2022 Give the WSDL url in the url point
u2022 Give any package name or store it in the local object.
u2022 Corresponding proxies and data types will be generated inside the enterprise service tag
Code sample for invoking the service via report.
u2022 Create an object of the client proxy type here itu2019s io_clientproxy.
u2022 Declare input and output parameters as per the structure of the service input/output parameters.
u2022 Fill in input parameters what your service expect and call the object methods for relevant task.
REPORT ZWEBSERVICE_CREATNUPDATE.
DATA: io_clientproxy TYPE REF TO zzco_user_data_service .
DATA: output_crnup TYPE zzcreate_or_update_user_data1,
input_crnup TYPE zzcreate_or_update_user_data_1.
DATA :
ls_param_crnup_in TYPE zzcreate_or_update_user_data, " CU input
ls_param_crnup TYPE zzcreate_or_update_user_data_r, "CU Response
ls_return_crnup TYPE zzcrm_user, " CU Response
ls_arg0 TYPE zzcrm_user.
ls_arg0-first_name = 'shashank'.
ls_arg0-last_name = 'testw/ouserid'.
ls_arg0-org_name = 'Test_Org'.
"ls_arg0-USER_ID = '369713'.
ls_param_crnup_in-arg0 = ls_arg0.
input_crnup-parameters = ls_param_crnup_in.
TRY.
CREATE OBJECT io_clientproxy
EXPORTING
logical_port_name = 'LP4'.
CATCH cx_ai_system_fault .
ENDTRY.
TRY.
CALL METHOD io_clientproxy->create_or_update_user_data
EXPORTING
input = input_crnup
IMPORTING
output = output_crnup.
CATCH cx_ai_system_fault .
CATCH cx_ai_application_fault .
ENDTRY.
ls_param_crnup = output_crnup-parameters.
ls_return_crnup = ls_param_crnup-return.
IF ls_return_crnup IS INITIAL.
WRITE : 'User creation failed'.
ELSE.
WRITE : 'Process Status : ',ls_return_crnup-process_status,
/'User Id : ',ls_return_crnup-user_id,
/'First Name :',ls_return_crnup-first_name,
/'Last Name :',ls_return_crnup-last_name,
/'Org Name : ',ls_return_crnup-org_name.
ENDIF.
Similar Messages
-
HOW TO CALL APPROVAL WORK FLOW ON BUTTON CLICK EVENT OF VISUAL WEB PART?
Hiall,
I created an OOB an approval work flow I want to start that approval work flow through visual web part button click event
In work flow Settings I selected to manually start .Is this possible ? if possible please guide me how to do this
Thanking you,
Arun kumarHi,
If you have an instance of SPListItem, and know the workflow association name, you can start it. First you need to find workflow assocation instance and tell SPSite.SPWorkflowManager to start your workflow.
See this for more information:
http://blog.mmasood.com/2012/06/programatically-start-workflow.html
Please remember to up-vote or mark the reply as answer if you find it helpful. -
How to call web service using J2SE 1.3?
Dear All,
i have developed a web service by jdev 10.1.3 (JAX-RPC with web service security
enabled).
i generate the ws proxy (jdev 10.1.3) and run it with wsclient_extended.jar (required JDK 1.4.1 or above??).
but one of my client say he has to use J2SE 1.3.x (as OS=AIX 4.3 that without J2SE
1.4.x ), could anyone tell me how can generate ws proxy (with supporting
library) for jdk 1.3.x?
if oracle don't have such library / tools, any third party tools / library available?
thank you.
lspI'm found answer:
Java and SAP Portal blog: How to call web service from java code example -
How to call web services in WEB DYNPRO ABAP
Hi ABAPER'S,
Please let me know how to call web services in web dynpro.
Thanks,
Sandy.Hi Sandy,
Please check this blog..
/people/riyaz.sayyad/blog/2006/05/08/consuming-xi-web-services-using-web-dynpro-150-part-ii
also cehck this...
call the webservices in webdynpro ABAP.
calling webservice in webdynpro component
Re: Web Services in WDA.
Cheers,
Kris.
Edited by: kissnas on May 24, 2011 11:37 AM -
How to call WEB Service From SAP
Hi Friends,
How to call WEB Service From SAP.
Thanks in advance,
Murali Krishna KHi,
if you mean calling a web service in Web Dynpro ABAP, see the <a href="http://help.sap.com/saphelp_nw70/helpdata/en/d7/951b42f828df2ce10000000a1550b0/frameset.htm">documentation</a>, if you mean calling a web service in general, this is not the correct forum. This here is the Web Dynpro ABAP forum, for general questions on ABAP, use the ABAP forum.
Regards, Heidi -
How to call web-service using only java code
Hello, how to call web-service using only java code. I can call it from BPM process or Web Dynpro Java Application, but if I need to call it from ejb component?
I'm found answer:
Java and SAP Portal blog: How to call web service from java code example -
How to call web services from HTML
Hi All,
Does anybody have an idea on how to call web services from HTML using axis and i am using jboss-4.0.5 as the application server.What did your Google search return?
-
How to call web services from PL/SQL?
Hi,
Can one help in how to call web services from PL/SQL? Steps, pros and cons, etc....
Thanks in advanceHere's some example skeleton code to get you started...
PROCEDURE p_soap_request(p_username IN VARCHAR2, p_password IN VARCHAR2, p_proxy IN VARCHAR2) IS
soap_request VARCHAR2(30000);
soap_respond CLOB;
http_req utl_http.req;
http_resp utl_http.resp;
resp XMLType;
soap_err exception;
v_code VARCHAR2(200);
v_msg VARCHAR2(1800);
v_len number;
v_txt Varchar2(32767);
BEGIN
UTL_HTTP.SET_PROXY(p_proxy);
-- Define the SOAP request according the the definition of the web service being called
soap_request:= '<?xml version = "1.0" encoding = "UTF-8"?>'||
'<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">'||
' <SOAP-ENV:Body>'||
' <m:DownloadRequest xmlns:m="http://www.website.net/messages/GetDetails">'||
' <m:UserName>'||p_username||'</m:UserName>'||
' <m:Password>'||p_password||'</m:Password>'||
' </m:DownloadRequest>'||
' </SOAP-ENV:Body>'||
'</SOAP-ENV:Envelope>';
http_req:= utl_http.begin_request
( 'http://www.website.net/webservices/GetDetailsService.asmx'
, 'POST'
, 'HTTP/1.1'
utl_http.set_header(http_req, 'Content-Type', 'text/xml');
utl_http.set_header(http_req, 'Content-Length', length(soap_request));
utl_http.set_header(http_req, 'Download', ''); -- header requirements of particular web service
utl_http.write_text(http_req, soap_request);
http_resp:= utl_http.get_response(http_req);
utl_http.get_header_by_name(http_resp, 'Content-Length', v_len, 1); -- Obtain the length of the response
FOR i in 1..CEIL(v_len/32767) -- obtain response in 32K blocks just in case it is greater than 32K
LOOP
utl_http.read_text(http_resp, v_txt, case when i < CEIL(v_len/32767) then 32767 else mod(v_len,32767) end);
soap_respond := soap_respond || v_txt; -- build up CLOB
END LOOP;
utl_http.end_response(http_resp);
resp:= XMLType.createXML(soap_respond); -- Convert CLOB to XMLTYPE
END;Using secure web services (https)...
Web serivces call in Plsql
As for 'pros and cons'... there's nothing to compare against... either you want to call a web service or you don't. -
How to call WEB Service From SAP 4.6 c
Hi Friend,
How to call WEB Service From SAP 4.6 c Report
Thanks in advance.It is not possible to directly call a web service from SAP 4.6c.
Indeed, web service enablement is available as from Web AS 6.20, thus as from SAP R/3 4.7
So as described above, the solution is indeed to make use of PI(XI) for this.
Rgds,
Karim -
How to call Web Dynpro from WAD
Hello,
How to call Web Dynpro Screens from WAD (Web Application Designer) and Vice Versa.
Are there any parameters changes at Web item level..? Also what we have to specify at Data Provider level..?
Your help highly appreciated.
Thanks,
Madhu
Edited by: Madhu on Feb 10, 2011 1:03 PMHi naveen ,
Check these threads for calling workbook from WAD ,
1. [SDN Help 1|/thread/268199 [original link is broken];
2. [SDN Help 2|Insert multiple queries using either WORKBOOK, WAD or Report Designer;
3. [SDN Help 3|http://help.sap.com/saphelp_nw04/helpdata/EN/9d/76563cc368b60fe10000000a114084/frameset.htm]
4. [SDN Help 4|How to call a BSP page or webdynpro from a WAD Template button;
Regards ,
Lokesh -
How is call web method in application?.
Hi,
I have created java web application(Web Service).
I want to call the setName() method in java application(GUI).
how is call web method in application?.
package sv;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
@WebService()
public class MyService {
@WebMethod(operationName = "setName")
public String setName(@WebParam(name = "name")
String name) {
return "my string is "+ name;
}The model layer should never depend on a specific view layer - this breaks reusability.
What you need to do is expose a service method on your AM. Then your view can call this method and pass a parameter into the model layer. -
How to call business service from xquery transformation in OSB ??
Hi All,
How to call business service from xquery transformation in OSB ??
I need to assign the response variable of Business Service to a target element in XQuery Transformation Mapper file.
It's urgent.
Regards,
Jyoti NayakTransformation is to mapping the source and target of 2 different schemas.
In your case you should have a XQuery transformation between, your Business Service output schema and the target schema.
Thanks,
Vijay -
Photoshop CS6 could not update successfully. Error codes Adobe Photoshop 13.0.1.3 Installation failed. Error Code: U44M1P7 Extension Manager 6.0.8 Update Installation failed. Error Code: U44M1P7 Please help me figure out how to call customer service. I would prefer to talk to someone directly.
Are you using any disk cleaner or optimization tools like CleanMymac or Mackeeper?
Regards,
Ashutosh -
***How to call BSP App when custom button event fired from toolbar group***
Dear PCUI Experts,
I have created one custom button for the transaction CRMD_BUS2000116.
And my urgnet requirement is , I need to call BSP application which is used to take data from custom fields and stores into BP table.
How to call the BSP App. when i clicks on the button.
Please help me..
I will reward with great points.
Regards,
Stella.Hi Purushothaman,
I have created a button in CRRM_ACCOUNT application.
Now i want to call a custom bsp application by clicking on that button.I have followed step given in this blog
https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1646. [original link is broken] [original link is broken] [original link is broken] [original link is broken]
But the event is not triggered.Do I have to create an iview for my bsp application?
How to do that?Plz help.
Regards,
Ruby. -
How is called the Services "OpsMgr Health Service" in the SCOM 2012 and Client machine?
Hi,
Can anybody tell me how is called the Services of OpsMgr Health Service in the SCOM 2012?
I have installed the agent of scom2012 on my client computer. But I dont find any agent called "OpsMgr Health Service" on the Client machine?
RegardsHi
If you look in the services.msc window then it is listed as the System Center Management Service. This is the display name.
The actual service name is HealthService
Cheers
Graham
Regards Graham New System Center 2012 Blog! -
http://www.systemcentersolutions.co.uk
View OpsMgr tips and tricks at
http://systemcentersolutions.wordpress.com/
The Ayman answer is god, It is called "Microsoft Monitoring Agent"
Maybe you are looking for
-
BPEL PM middle tier 10.1.2.0.2 error in installation
Hi, First of all, I have tried to find something related in the forum, but I haven't found anything. My problem is: My server is behind a firewall and all the HTTP access is using an authenticated proxy. During installation, I configure the proxy set
-
How to limit number of chars in a CFGRIDCOLUMN
Hi, I have a 2 column grid populated from a query. The grid is editable and will be submitted to an action page for database Delete, Insert, or Update. The first grid column corresponds to a MS SQL database column that is defined as varchar(3). Curre
-
How to install Oracle 11g on linux from VNC
Hi: I need to install oracle 11g from VNC viewer. The VNC is stalled on linux. I managed login. Now I have a screen that has some icons on the top like, Connection Options, "i", refresh, CTRl, ... under that I have Accept clipboard from viewers Send
-
Before I downloaded Lion every time I would upload a pic from iphoto there would be two files. One that was 1.8MB and another that was 50KB. Now I can only find the 1.8MB one. Did this option disappear with Lion? I really need this option!
-
Getting falsely charged for in app purchases from a game app and no response nor action taken to be reimbursed for the app as well as iTunes