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
Similar Messages
-
CE 7.1 - How to call CAF services from Web Dynpro
Hi,
whats the suggested way to call caf services from web dynpro?
Of course I can use the Web Service model. But can I call caf directly?
I read something about caf web dynpro model, but I cannot find it in nwds 7.1. On some older tutorial it was in context menu of caf project, but it seems to be removed.
best regards
tomHi ,
The standard way is to use the web service model.
You have to expose the the services as web service and then you can use the wsdl url in the Adaptive web service model option.
The above option will be available when you click the Model in the webdynpro application and the click create new model.
Hope it helps you.
Regards,
Srinivasan Subbiah -
Error while calling a web service in web dynpro through XI
Hello,
I was following a blog for Invoking Webservices using SAP XI
/people/siva.maranani/blog/2005/09/03/invoke-webservices-using-sapxi
I have done all the steps specified but when I import the wsdl file in web dynpro application and deploy the project I get the following error:
<b>"Exception on execution of web service with WSDL URL 'bankws_OUT_MI.wsdl' with operation 'bankws_OUT_MI' in interface 'bankws_OUT_MI'"</b>
where:
bankws_OUT_MI -
is the message interface name.
I have defined a web service in the integration reopsitory as follows:
<b>http://PEP:50000/XISOAPAdapter/MessageServlet?channel=:bankws:s_comm</b>
where
bankws --- service name
s_comm -
sender communication channel
selected 'bankws_OUT_MI' message interface from the given choices
'bankws_IN_MI' or 'bankws_OUT_MI'.
interface name: bankws_OUT_MI -
mesage interface name
Can anyone guide me how to proceed further. Also if possible can anyone send me some helpful documentation regarding how to call a web service in web dynpro through XI.
Thanks in advance.
Regards,
Imtoolhello everyone,
I made the whole scenario again and it is running succusfully in Xml spy. Now when i call the webservice in web dynpro... I get the following error:
<b>com.sap.engine.services.webservices.espbase.discovery.BaseIOException: Invalid Response Code 200 while accessing URL: http://PEP:50000/XISOAPAdapter/MessageServlet?channel=:OOMS_WS_OUT:CC_OOMS_WS_OUT. Response Message: OK. Content Type: text/html; charset=utf8. Body Content: <html> <head><title>MessageServlet</title></head> <body> <h3>Message Servlet is in Status OK</h3> <h3>Status information:</h3> Servlet com.sap.aii.af.mp.soap.web.MessageServlet (Version $Id: //tc/xi/645_VAL_REL/src/_adapters/_soap/java/com/sap/aii/af/mp/soap/web/MessageServlet.java#7 $) bound to /MessageServlet <br/>Classname ModuleProcessor: null <br/>Lookupname for localModuleProcessorLookupName: localejbs/ModuleProcessorBean <br/>Lookupname for remoteModuleProcessorLookupName: null <br/>ModuleProcessorClass not instantiated <br/>ModuleProcessorLocal is Instance of com.sap.aii.af.mp.processor.ModuleProcessorLocalLocalObjectImpl0 <br/>ModuleProcessorRemote not instantiated </body></html></b>
I have also made the entry in the visual administrator for metadata_dest and execution_dest.
Does anybody have an idea what mistake i am doing.
Thanks,
Imtool -
How to call PDF file in Web Dynpro Appl?
How to call PDF file in Web Dynpro Appl?
Hi Gobinath,
1. Create a value attribute of type byte called pdfSource.
2. Insert an UI element called Interactive Form in your layout
3. Set the source property of this Interactive From UI element to the context pdfSource.
4. Insert a button which would open your pdf file.
public void onActionsubmit(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
//@@begin onActionsubmit(ServerEvent)
IPrivate<viewname>.IContextElement contextElement = wdContext.currentContextElement();
byte[] bytes = contextElement.getPdfSource();
try
File file = new File("C:
temp
example.pdf");
FileOutputStream os = new FileOutputStream(file);
os.write(bytes);
os.close();
catch (IOException e)
// do something
e.printStackTrace();
//@@end
Warm Regards,
Murtuza -
What is best practice for calling XI Services with Web Dynpro-Java?
We are trying to expose XI services to Web Dynpro via "Web Services". Our XI developers have successfully generated the WSDL file(s) for their XI services and handed off to the Web Dynpro developers.
The Java developers put the WSDL file to their local PC's and import as "Adaptive Web Services" data models. When the application is constructed and deployed to our development box, the application abends because the J2EE server on that box cannot locate the WSDL file at runtime (it was on the developers box at, say, "C:\temp\" and that directory does not exist on the dev server).
Since XI does not have a way of directly associating the generated WSDL file to the XI service, where is the best place to put the WSDL so it is readable at design time and at run time? Also, how do we reconcile that we'll have 3 WSDL files for each service (one for Dev, one for QA and one for Prod) and how is the model in Web Dynpro configured so it gets the right ome?
Does anyone have any good guide on how to do this? Have found plenty of "how to consume a Web Service in Web Dynpro" docs on SDN, but these XI services are not really traditional Web Services so the instructions break down when it comes time to deploy.HI Bob,
As sometimes when you create a model using a local wsdl file then instead of refering to URL mentioned in wsdl file it refers to say, "C:\temp" folder from where you picked up that file. you can check target address of logical port. Due to this when you deploy application on server it try to search it in "c:\temp" path instead of it path specified at soap:address location in wsdl file.
Best way is re-import your Adaptive Web Services model using the URL specified in wsdl file as soap:address location.
like http://<IP>:<PORT>/XISOAPAdapter/MessageServlet?channel<xirequest>
or you can ask you XI developer to give url for webservice and username password of server -
Unable to consume secured Web service from a Dynpro application
Hello,
I have followed <a href="http://help.sap.com/saphelp_nw04/helpdata/en/c3/bac36a469e4c75aba646077e71516d/frameset.htm">this tutorial</a>
in order to protect and consume a secured Web service from a Dynpro application using SAP logon ticket.
The problem is that after implementing everything needed I receive 401 Unauthorized when I am trying to consume it from the web dynpro side.
If I manually transfer the request the credentials, before the execute i.e:
modObj._setUser
modObj._setPassword
modObj.execute();
I am able to call it, meaning the dynpro application doesn't transfer these credentials to the Webservice even though it's authentication property is set to true.
Any idea how to solve it?
Roy
Message was edited by:
Roy CohenTry below steps
Add jars
o security.class
o tc/sec/destinations/interface
Setting WebDynpro project property
o Project>Properties>Web Dynpro References-->Interface references
 Name=tcsecdestinations~interface
o Project>Properties>Web Dynpro References-->Service reference
 Name=webservices
 Name=tcsecdestinations~service
Dynamically Set httpdestination and Call web service
final InitialContext ctx = new InitialContext();
final DestinationService dstService = (DestinationService)ctx.lookup(DestinationService.JNDI_KEY);
if (dstService== null)
throw new NamingException ("Destination service not available");
final Destination destination = dstService.getDestination("HTTP"," DestinationName");
// getting user name
Properties destprop = destination.getDestinationProperties();
String username = destprop.getProperty("USERNAME");
String password = destprop.getProperty("PASSWORD");
final HTTPDestination httpDestination = (HTTPDestination) destination;
HttpURLConnection httpConnection = httpDestination.getURLConnection();
String httpURL = String.valueOf(httpConnection.getURL());
Request_AdvLocationVer1ViDocument_getLocation obj=wdContext.currentRequest_AdvLocationVer1ViDocument_getLocationElement().modelObject();
obj._setUser( user );
obj._setPassword(pass);
obj._setEndPoint(httpURL);
obj.execute();
Rahul -
Consuming External Web Services in Web Dynpro Java
Hi All,
I an trying to consume external web service in Web dynpro java using Adaptive Web Service Model.
But getting below mentioned error while executing the web service
Exception on execution of web service with WSDL URL 'D:\Web Service Project\CurrencyConvertor.asmx.xml' with operation 'ConversionRate' in interface 'CurrencyConvertorSoap'
Steps i followed are as below:
1. Created Adaptive Web Service Model for this i select WSDL source as "Local File System or URL"
In next step i select No logical destination radio button and click on next
In next step, browse the WSDL file and successfully import the WSDL file.
2. After successfully importing the WSDL file i wrote below code in Init method:
WebModel modelweb = new WebModel();
Request_ConversionRate reqConversion = new Request_ConversionRate(modelweb);
ConversionRate conversion= new ConversionRate(modelweb);
reqConversion.setConversionRate(conversion);
wdContext.nodeRequest_ConversionRate().bind(reqConversion);
3.After that execute the model - code is given below :
IWDMessageManager manager = wdComponentAPI.getMessageManager();
try
wdContext.currentRequest_ConversionRateElement().modelObject().execute();
wdContext.nodeResponse().invalidate();
wdContext.nodeConversionRateResponse().invalidate();
catch(Exception e)
manager.reportException(e.getMessage(), false);
Please let me know how to resolve this.
Thanks
SandyHi,
You need to use destinations for metadata and modeldata.
Configure those destination in Visula admin.
you can refer to following link.
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/b2bc0932-0d01-0010-6d8e-cff1b2f22bc7
Regards,
Shruti. -
Consume Web Service in Web Dynpro
Hi Experts,
I´m currently trying to learn web dynpro development.
Scenario: I have one component which embed two views. One view is for enter customer number and in the other view I will see the name of the customer. The name of this customer is provided in a sap erp2005. I have develop a function modul and wich gave me the appropriate data(customer name). Then I create a web service base on this function module.
When I test this web serviec in WSNavigator, I get the customer name, so the web service is working well.
My Problem is: I can´t invoke this Web Service in Web Dynpro. My steps to invoke web service were: create a model with the web service wsdl and then I add this model in the component (in "Used Models").
I have create a application and assign it to the component. When I "Deploy new archive and Run" the application I be come the error: "Configuration not found for application: demo.sap.com/test_wd3,serviceRefId:7fecf23b-0895-48f3-9902-0e7015a705c3. Please check the configuration details from the NWA. You may have not assigned the Service Group to a Provider System, or the generation of the configuration has failed."
What do I have to consider or to set up?
It is right to assign the input field to the context parameter?
PS: I have followed the steps in this tutorial, but I don´t use XI or PI
http://www.riyaz.net/blog/xipi-consuming-xi-web-services-using-web-dynpro-part-ii/technology/sap/7/
best regards
Anna von Landsberg
Edited by: Anna_von_Landsberg on Dec 8, 2010 4:48 PMHi,
I have the following message error:
Exception on execution of web service with WSDL URL
'http://j2eeserver:port/xxxx/Config1?wsdl'
with operation 'RequestNode' in interface
'urn:xxxxx'
When i debugged it, I found the following error:
Cannot find the required parameter [unTipoProducto] in request message content.
What is wrong?, I pasted the code of my method, that call to web service in the component controller.
public void Alta_Entrega( )
//@@begin Alta_Entrega()
String tipoProducto = wdContext.currentAlta_EntregaElement().getUnTipoProducto();
Request_Alta_Entrega entregaMO = wdContext.currentRequest_Alta_EntregaElement().modelObject();
if (!wdContext.currentAlta_EntregaElement().getUnTipoProducto().equalsIgnoreCase("")){
IWDMessageManager manager = wdComponentAPI.getMessageManager();
if (logger.beDebug()) {
entregaMO.wdSetInvocationLogEnabled(true); //switch on logging for this model object
try{
entregaMO.setInvokerProperty(Stub.USERNAME_PROPERTY,"xxx");
entregaMO.setInvokerProperty(Stub.PASSWORD_PROPERTY,"xxx");
entregaMO.execute();
wdContext.nodeResponse().invalidate();
wdContext.nodeAlta_Entrega().invalidate();
}catch (Exception e){
manager.reportException(e.getMessage(),false);
logger.debugT(entregaMO.wdGetRequestLog()); //request log (HTTP header + SOAP request)
logger.debugT(entregaMO.wdGetResponseLog()); //response log (HTTP header + SOAP response)
logger.debugT(entregaMO.associatedModelClassInfo().getModelInfo().toString()); //model metadata in XML format
logger.debugT(entregaMO.toString()); //model object tree in XML format (= model context node content)
I hope you can understand me, because my english is very bad!!.
Thank you. -
Consume XI web service in web dynpro application
HI All,
I have scenario access web service in web dynpro java, which is created by XI ..Now I have WSDL file. Using that WSDL file I have imported web service model(Adaptive web service method) in my web dynpro java.
By following the PDF document = https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b2bc0932-0d01-0010-6d8e-cff1b2f22bc7
I have created a Model as mentioned in the PDF.
Once model is created I have done the mapping from model to component controller, after that I need to execute the Web service model .For the execution I need to write a code in component controller :-
model class name = XIModel
XIModel obj = new XIModel();
Once I am done with the above coding , and when I try to run the application I get the following error :-
com.sap.engine.services.webservices.espbase.discovery.BaseIOException: Invalid Response Code 200 while accessing URL:http://atind037:50000/WSDL/GetPOPDF.wsdl. Response Message: OK. Content Type: content/unknown
Could you please help me with this at the earliest , as it is a urgent issue.
Regards,
Boopathi M.Hi boopathi,
It seems your wsdl url is not correct. Put the http://atind037:50000/WSDL/GetPOPDF.wsdl
in your browser and check whether you are getting the WSDLDefinitions in xml format or not ?
In wsdl url put ? instead of .
URL : http://atind037:50000/WSDL/GetPOPDF?wsdl
call adaptive web services mit Parameter
Regards,
Mithu -
Calling portal service from web service
Hello,
I'm trying to call portal service from web service. Is this possible? I'm getting an error.
For example, code:
IJCOClientService clientService = (IJCOClientService) PortalRuntime.getRuntimeResources().getService(IJCOClientService.KEY);
.. is generating exception:
java.lang.LinkageError: Class com/sapportals/portal/prt/runtime/IPortalRuntimeResources violates loader constraints
Do anybody knows what's wrong?
Best regards,
Josef MotlHi Josef,
Is the IJCOClientService located on the producer side or on the consumer side?
Amit -
how to call a form from WEB.SHOW_DOCUMENT
I would like to call a form using the WEB.SHOW_DOCUMENT the idea is from the menu that is attached to the form instead of use call_form use WEB.SHOW_DOCUMENT(...my_newform.fmx)
Is this possible?????Hi ,
I think yes...but under some circumstances....
In your formsweb.cfg file you should define a named configuration alias... such as:
[TEST]
workingDirectory=C:\TEST_DIR
form=C:\TEST_DIR\MY_NEWFORM.FMX
Then , after stopping , starting your OC4J instance..... you call that as (in a button , for example):
web.show_document('http:<your_server>:<port>/forms/frmservlet?config=[TEST]',_blank);
I have not tested it.....
Regards,
Simon -
How to call DOC file using web.show_documents
Hi friends ,
If I use the built-ins web.show_documents for open the *.doc file
I am getting the following error
ORA-06550: line 5, column 2:
PLS-00201: identifier 'README.DOC' must be declared
ORA-06550: line 5, column 2:
PL/SQL: Statement ignored
DAD name: WebDB
PROCEDURE : readme.doc
URL : http://132.148.160.3:80/WebDB/readme.doc?
PARAMETERS :
===========
ENVIRONMENT:
============
SERVER_PORT=80
SERVER_SOFTWARE=Oracle WebDb Listener 2.1
SERVER_NAME=132.148.160.3
GATEWAY_INTERFACE=CGI/1.1
SERVER_PROTOCOL=HTTP/1.0
REMOTE_HOST=132.148.160.251
REMOTE_ADDR=132.148.160.251
REQUEST_METHOD=GET
QUERY_STRING=
SCRIPT_NAME=
PATH_INFO=/WebDB/readme.doc
HTTP_ACCEPT=*/*
HTTP_ACCEPT_LANGUAGE=en-us
HTTP_ACCEPT_ENCODING=gzip, deflate
HTTP_USER_AGENT=Mozilla/4.0 (compatible; MSIE 5.01; Windows NT)
HTTP_HOST=132.148.160.3
HTTP_CONNECTION=Keep-Alive
Please advice How to call Doc file in web.
Thanx
nullThe syntax to execute web.show_document:
web.show_document('http://server_ip_or_server_name/virtual_path/filename.doc')
The virtual path has been defined in Apache (if you run on web with Apache) or has been defined in Internet Inoformation Server (if you are runing with Internet Information Server.)
null -
Consuming RepositoryFrameworkWS web service in WebDynpro for ABAP
HI All,
I would like to consume the below web service in Web Dynpro ABAP provided by SAP from Web Services Navigator.
RepositoryFrameworkWS
Using this web service I would like to write a file in KM repository. I am new to Web Dynpro ABAP and I am not sure how to use the below methods. The below methods will be shown once we import the Web Service on to SE80.
Please help writing the code for following methods in Web Dynpro ABAP.
CREATE_DOCUMENT
GET_CONTENT_NEXT_CHUNK
GET_CONTENT_FIRST_CHUNK
SET_CONTENT
Thanks
KrishHi,
I am able to call the service and create a document in KM . I am providing userid and password in HTTP destination as this service requires basic authentication. Right now I am giving the userid and password in SM59. But I want to pass the userid and password from program itself for logged in user. Please help me with the code for this.
Thanks
SK -
Error when querying REST web services from web-based InfoPath form 2013 environment
Error when querying REST web services from web-based InfoPath form 2013 environment, we are trying to consume REST web service in InfoPath form ( SharePoint 2013 version)
http://spapp/sites/litigation/Intake/_api/web/lists/getbytitle('Email%20Profiles')/items(1)
it works in preview but does not when it is published. because of claim based authentication i m getting below error
The form cannot run specified query, the underlying connection was closed. An expected error occurred
same works in 2010 environment .. are we missing anything in 2013 servers?? please let me know how we can resolve it.. thank you
gurueveryone face this issue, nothing in event viewer, its easy to reproduce error at ur end also..
just you need to use below web service in infopath and populate some data on form load like id = 1 pull the title and try to set in form any field...the
list has one item thats all
guru -
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
Maybe you are looking for
-
Details missing in default trace file of XI
Hi Experts, I am doing RFC to RFC scenario. I am getting checkered flag in SXMB_MONI. But for some reason i am not getting the details of my scenario in the default trace of XI. I'm not sure if the detiails of scenarios involving RFC's will be update
-
Using the ENABLE output of the UMI-7774
I have a motion control system using the NI-7354 4-Axis controller, and the UMI-7774 interface. I am trying to use the ENABLE line for each axis to manually enable and reset the drive for each axis. I am using NI-Motion calls in Visual Basic to do so
-
Is it possible to open a Safari document in Pages08?
I have saved a safari html document to my desktop and want to open it in Pages08. Is this possible? When I right-click the Safari icon and then "open with" I am presented with several possibilities but Pages08 is not one of them. If I click "others"
-
I find version 4 difficult to use, can I download an older version, and where
I cannot follow the instructions to install reload for example, it seems too complicated.
-
Received recent iOS 8 but unable to install 21/02/2015
ipad air 2 recent ios8 received 21/02/2015 but can not install the update. iPad is plugged in and full wifi available. Agreed to all ts & ca but no luck. Any suggestions