Consuming ABAP Webservice in webdynpro java.
hi All,
i tried the all ways provided in sdn to create a webservice in ABAP when i test its working fine on j2ee server.
when i call the same webservice from webdynpro its throughing this error can any body kindly help me in this.
java.rmi.RemoteException: Service call exception; nested exception is: com.sap.engine.services.webservices.jaxrpc.exceptions.InvalidResponseCodeException: Invalid Response Code: (502) Proxy Error ( The ISA Server denied the specified Uniform Resource Locator (URL). ). The requested URL "xxxxxxxxxx".
Thank you.
venkat.
Hi Venkatramana,
The class of the ProxyGenerator is com.inqmy.lib.wsdl.ProxyGenerator. It is located in <SAPj2eeEngine_install_dir>/cluster/server/additional-lib/inqmysoap.jar or <SAPj2eeEngine_install_dir>/alone/additional-lib/inqmysoap.jar file. In addition the following JAR files must be included in your classpath - mail.jar, activation.jar, inqmyxml.jar, inqmysoap.jar, located in <SAPj2eeEngine_install_dir>/cluster/server/additional-lib/ or <SAPj2eeEngine_install_dir>/alone/additional-lib/ directory. You need also the inqmy-lib.jar file in <SAPj2eeEngine_install_dir>/cluster/server/lib/ or <SAPj2eeEngine_install_dir>/alone/lib/ directory in order to run the generator.
SAP Note : <a href="https://websmp201.sap-ag.de/~form/handler?_APP=01100107900000000342&_EVENT=REDIR&_NNUM=547847&_NLANG=E">547847</a>
Before deploying make sure the JCos are up and running
Go to http://server:port/webdynpro/dispatcher/sap.com/tcwdtools/Explorer to check the status of JCos.
Regards,
Mithu
Similar Messages
-
Consuming ABAP Webservice in Webdynpro app
Hi,
I have wrote a webdynpro app for consuming ABAP webservice. I used the procedure in the link below
http://wiki.sdn.sap.com/wiki/display/WDJava/ConsumingABAPWebServiceinJavaWD
Everything seemed to be went well, I created model and Webservice destinations. I have written the code for calling the webservice, which does not return data as part of response. I mean though the RFC returns data at the backend,its not showing the returned records in the webdynpro table.
I have also tried checking the same by setting external break point. when the webservice is executed from my webdynpro app,it goes to the ABAP debugger and i could clearly see the records in the export parameters of RFC,but the same is not returned in the reponse object.
Could any one let me know what could be missing. Any help is greatly appreciated?
I have used the following code in Init method of my View
Request_ZMYRFC input=new Request_ZMYRFC (model);
wdContext.nodeRequest_ZMYRFC ().bind(input);
ZMYRFC req= new ZMYRFC (model);
req.setPUserid("EDLAS00C");
req.setPLtc("E");
input.setMYRFC (req);
IWDMessageManager manager = wdComponentAPI.getMessageManager();
try
wdContext.currentRequest_ZMYRFCElement().modelObject().execute();
wdContext.nodeResponse().invalidate();
wdContext.nodeZMYRFCResponse().invalidate();
wdContext.nodeReturn_res().invalidate();
wdContext.nodeItem_res_ret().invalidate();
wdContext.nodeILtcg_res().invalidate();
wdContext.nodeItem_res_ltcg().invalidate();
catch(Exception e)
manager.reportException(e.getMessage(), false);
Thanks
Santhoshsantosh,
Check provider system defination in nwa for webservice.After this mapp the provider system and service group after wd app deployed.This is mandatory while consuming webservice in webdynpro for latest versions of CE7.11 or later.for reference check this article/document. http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/50d70a19-45a3-2b10-bba0-807d819daf46
Thanks,
Murthy.
Edited by: Murthy Karaka on Mar 22, 2010 12:59 PM -
Consuming PI Webservice from Webdynpro Java Not working
Hello SAP,
Environment: CE 7.2.
Resolution expected immediately, Helpful answer is highly appreciated.
Is the namespace should not exceed 60char for PI Webservice, for executing the webservice from Webdynpro Java.
I tried with all the options in executing the PI Service from Webdynpro Java, None of the options worked. I am facing the below error while I was calling the PI Webservice.
I don't see any problem from Webdynpro Java, what ever the procedure I have followed is the standard procedure.
Fortunately when I execute the service from Webservice Navigator, it is working as expected. The same webservice when I consume it from Webdynpro Java it is not working
Options tried so far:
1) Published the Services to Service Registry and there by consuming the PI Service from Service Registry - Not worked
2) Tweaked the URL with few options - Not worked (Tweaking the URL, ex: portType, Binding)
3) Changing the Business Systems in PI and there after calling the service - Not worked
4) Initializing the code, instead of creating Service Controller and calling the PI Service - Not worked.
5) Created a Provider System and tried to call the PI Webservice from Provider System - Not Worked
For all the Options, I am facing the same error which is provided in the screenshot.
Below procedure which I have followed for calling the PI Webservice:
1) Created Adaptive Webservice Model
2) Provided PI Webservice URL (It prompts for PI System UserId and Password)
3) Selected Option - No Service Group Configuration
4) Provided Logical Destination
6) Completed creation of Model
7) Added the model as a UsedModel
8) Right Click on Comp Contr. and selected Apply Template and Created a ServiceController for the model (Entire mapping to comp contr, Initializing the nodes is taken care by Service Contr.)
9) Created an Template Action button and there by calling execute method which is auto rendered from CompContr..
10) Build the project.
11) Activated the code and Run the Application.
12) Getting the below error which is showed in the message.
ERROR MESSAGE:
Exception on execution of web service on destination 'GetPIHRPeopleData' for operation 'SI_CreateHRPeopleData_OS' in interface 'SI_CreatePeopleCompany_OS'Hi Sankar,
If the webservice is working fine in the Wsnavigator then there is some problem with importing the webservice in webdynpro for Java. Please check the required parameter for creating the Adaptive Webservice Model. After adding in the used model and compoent controller binding, you need to write code for to execute the webservice model.
Please check the code for initialization and execution for the webservice and then test it.
Best Regards,
Arun Jaiswal -
Creating webservice using webdynpro java calling bapi from r/3
hi all,
as i am new to this area can anyone provide me a guide to create a simple webservice using webdynpro java to call bapi's from r/3?
i want to consume the created webservice on a .net client.
Thanks in advance,
RaghunandanYou can use the SAP .NET Connector to do it.
Download from [http://service.sap.com/connectors|http://service.sap.com/connectors]. -
Error in consuming RFC Webservice in webdynpro
Hi,
I am trying to consume RFC Webservices in webdynpro.For that i created Z- functional module for availability check.But once i am deploying this application ,all the input fields of the corresponding application are disabled.
The error is like
Exception on execution of web service on destination 'DEFAULT_WS_EXECUTION_DEST' for operation 'ZwrMaterialAvailability' in interface 'ZWebService'
Can someone help me to resolve this error?
Thanks,
KundanHi Saravanan ,
Thanks for your replay.
Once i am testing the WSDL URL in netweaver webservice navigator,it showing an error like like
Cannot download WSDL from http://host name.sap.com:8000/sap/bc/srt/wsdl/sdef_ZWEBSERVICE/wsdl11/ws_policy/document?sap-client=800: It is not allowed to access this service.
But same URL is working fine in browser.It's displaying the XML file.
Can you provide the solution to resolve this error?
Thanks,
Kundan -
Access ABAP table in Webdynpro Java application
Hi All
Is it possible to access ABAP table in Webdynpro Java application
Please provide your input
Thanks
Karthi D.Hi you will connect to the remote SAP system, the
backend, using an Adaptive RFC MOdel. To access database tables, you can make use of existing functions in terms of RFC function modules. For each function module you need, the system generates a corresponding Java proxy class. All the generated proxy classes and interface are bundled together in the RFC model and treated as part
of your Web Dynpro project
In WebDynpro java you RFC by using Model :
Adaptive RFC Model
1. automatically adapts to changes in function module signature
2 provides support for data types and extensibility
3.support for different structure definitions in different backend
systems (release dependent structures, custom adaptation)
Basic principles and guidelines
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/11c3b051-0401-0010-fe9a-9eabd9c216de
See this blog
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/wdjava/faq%2b-%2bmodels%2b-%2badaptive%2brfc
http://help.sap.com/saphelp_nw04s/helpdata/en/6a/11f1f29526944e8580c5e59333d96d/frameset.htm
Thanks,
Tulasi -
How to create webservice in Webdynpro java
Hi Experts,
I need to develop one application in Visual Composer.Since VC doesn't support coding so i need to create Webservice in webdynpro java and use that webservice in VC.Can any one of you please suggest how to create Webservice in Webdynpro Java.
Regards,
Prasanna.Hi prasanna,
Refer this links.
/people/sridhar.k2/blog/2006/09/12/creating-and-exposing-bapi-as-web-service-and-using-it-in-web-dynpro
BAPI Exposed as Web Service
Connect R/3 from Java web application
Web Dynpro integration with R/3
http://help.sap.com/saphelp_nw04s/helpdata/en/82/6a0e7bbe744276bf393654b9b576ed/frameset.htm
Regards,
karthik. -
Consuming external webservice in webdynpro
Hi colleagues
I am trying to consume a webservice "BORM_API_A1S_GET_UPD_SW_VECTOR" in webdynpro, it is an external webservice
i have followed the below steps and ended up with an error
Steps:
1) created a Adaptive web service model
2) got the WSDL source from "Remotelocation/fileSystem"
3) given the WSDL URL Acess as "e:///C:\Documents and Settings\Desktop\BORM_API_A1S_GET_UPD_SW_VECTOR.wsdl"
4) created a service group
5) then i have done the " model to controller" binding and "controller to view" binding
6) in the INIT method of controller i have creted the instance of the model and binded it to the context element
7) set some some values in the init methiod(for input parameters)
8) designed a view to get the values that are set into the input parameters
9) Configured the service group
i am getting an error saying
"*java.io.IOException: Cannot connect to https://service.sap.com:443/sap/bc/bsp/spn/swdc/slm/accessctrl.do, used user to connect: S0004119795, message : Unable to connect to service.sap.com:443 - service.sap.com*"
I think i am doing wrong service confuguration
steps i have followed to Configure the service group are given below
1) logged into http://ldcidwd.wdf.sap.corp:50000/nwa
2) SOA management-->technical information --> system connections
here i have selected the provider systems tab, and created a new provider system of system type "Java"
Here i need to provide someother information which i am not sure about what to provide, Could any one let me know what to be provided for the other fields
u2022 System Type: Java
u2022 System Name: <System ID> ?( what is this)
u2022 Host: <Host>?
u2022 System Description: My Web Service System
u2022 Username: <Administrator>?
u2022 Password: <Password for Administrator>?
u2022 Profile Name: SAP_DEFAULT_PROFILE
u2022 Mode: Multiple Services
u2022 Services Source: WSIL
u2022 WSIL URL: ?(what should be provided here
u2022 Socket Timeout: 60.000
Please let me know what shall i fill in this fields
Thanks & Regards
SwethaHi Gayathri,
i have opened the WSDL file and i found there are two URLS
1) "<soap:operation
soapAction="http://www.sap.com/BORM_API_A1S_GET_UPD_SW_VECTOR" />"
2)<soap:address
location="http://pwdf4431.wdf.sap.corp:1080/sap(bD1lbiZjPTAwMQ==)/bc/bsp/sap/bosf_swdc_slm/accessctrl.do" />
i have tried pasting the address URL ina n other IE and i was asked for Authentication
Thanks & Regards
Swetha -
Access "Business Intelligence Consumer Services (BICS)" over WebDynpro Java
Dear all
I have to access the SAP BI from WebDynpro Java.
At the moment I do this over the BI-JAVA-SDK which has unfortunately no integration with the BEx-QueryDesigner.
Therefore my question:
1. Is it possible to access the SAP BI over the "Business Intelligence Consumer Services (BICS)"? And if yes, where can I find the corresponding documentation? (I have not found it by myself)
2. What is your preferred way to get data from the SAP BI in WebDynpro Java?
Greetings
RolfHi
Did you solve problem with number 1?
Aleksander -
Integrating ABAP workflow in WebDynpro java
Hi Friends,
I have a requirement from the client where I need to add some additional services (Functionalities) to the existing ESS application.
1. The ESS package already contains many standard DC's such as for "Address","Who is Who" etc.Now I am adding a new functionality "Allowances" to that.
2. I am not using FPM based development architecture to acheive the same.Instead the ABAP team has created a workflow ,so that the approvers in this "Allowance" service can get their approval in their UWL.
3. Please help me in finding a sample code or let me know how do I do the same using webdynpro java and integrate it as a service in the standard ESS package.
If anyone has got some documents pls share the same : meet.raj34ATgmail.com
Regards,
RanjanHello Giang,
You will need at least a placeholder object. Have a look at ESS Leave request - WS12300111 - it functions exactly as per your scenario.
Cheers,
Mike -
Consume ABAP Webservice using AJAX javascript
Hi,
We created webservice for ABAP BAPI. And I want to consume this using AJAX javascript.
But I am getting "Access Denied" javascript error.
Please let me know how to pass the credentials while trying to consume this webservice
I tried below code, but its NOT workng
var URL ="http://hostname/sap/bc/srt/rfc/sap/servicename?sap-client=400&sap-user=testuser&sap-password=testpassword";
xmlhttprequest.open("POST", URL, true);
Please let me know your thoughts ...
Thanks
Edited by: sona p on Feb 27, 2010 12:18 AMHi,
Thanks for your response. I did the same as mentioned in the link provided by you. But it is not working . I am still getting "Access denied" javascript error in the second line ( xmlhttprequest.open) . Below is my code.
var auth = make_base_auth('userid','password');
xmlhttprequest.open("POST", URL, true);
xmlhttprequest.setRequestHeader('Authorization', auth);
xmlhttprequest.setRequestHeader ("Content-Type", "text/xml");
xmlhttprequest.onreadystatechange = getDataList;
xmlhttprequest.send(SOAPEnvelope);
Please let me know your thoughts. Thanks again for your response. -
Serialisation failed : ABAP webservices as webdynpro model
Hi All,
I have created a webdynpro application consisting of a ABAP webservice model . This webservice takes some input parameters which are optional and give output which we are displaying as webdynpro table.. we have successfully deployed and run it on our development server .
We have transported the EAR to Quality server after changing the target address under model> webservice> logical port corresponding to Quality webservice URL..
But at quality server it is giving "Serialisation failed" for particular input parameter. for rest of the input parameter proper output is coming .
Please tell the possible solution.
regards
PoonamThe input that you are trying to give might not be complaint with the data that you are providing .. go to http://server:port/wsnavigator and give the data there and test .If the data type and the length of the input parameter are not complaint with the data that you are providing u will get that error
-
Consuming ABAP Webservice from Android device
Dear Experts,
I am ABAP developer (limited knowledge on android) trying to connect Android device to a.SAP Webservice
Through trial and error and help from SDN and Android forums i managed to link up the ABAP webservice and android using KSOAP2 API.Its working perfectly now but only when i save the username password for SAP access in the webservice settings in transaction SICF.I need to access the service by passing the username and password values through the SOAP request header but so far my efforts have failed me.im presently using the following code to pass my auth values.
I would be grateful if you can point me in the proper direction.
String NAMESPACE = "mynamespace (works properly without auth)";
String METHOD_NAME = "mymethod (works properly without auth)";
String SOAP_ACTION = "mynamespace/mymethod (works properly without auth)";
String URL = "myURL{works properly without auth)";
SoapObject Request = new SoapObject(NAMESPACE, METHOD_NAME);
Request.addProperty("Purchaseorder","4500001168");
Request.addProperty("Username", "myusername");
Request.addProperty("Password", "mypassword");
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.setOutputSoapObject(Request);
HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);
try
androidHttpTransport.call(SOAP_ACTION, envelope);
SoapObject response = (SoapObject)envelope.bodyIn;
String testValue = response.getProperty("PoHeader").toString();
AlertDialog alertDialog = new AlertDialog.Builder(this).create();
alertDialog.setMessage(testValue);
alertDialog.show();
catch(Exception e)
e.printStackTrace();
Thanx & Best RegardsHi,
you can develop a custom Transport class wich extends the: HttpTransportSE class by authentication features.
example:
public class AuthTransportSE extends HttpTransportSE{
private String username;
private String password;
public AuthTransportSE(String url, String username, String password) {
super(url);
this.username = username;
this.password = password;
protected ServiceConnection getServiceConnection() throws IOException {
ServiceConnection midpConnection = new ServiceConnectionSE(url);
addBasicAuthentication(midpConnection);
return midpConnection;
protected void addBasicAuthentication(ServiceConnection midpConnection) throws IOException {
if (username != null && password != null) {
StringBuffer buf = new StringBuffer(username);
buf.append(':').append(password);
byte[] raw = buf.toString().getBytes();
buf.setLength(0);
buf.append("Basic ");
org.kobjects.base64.Base64.encode(raw, 0, raw.length, buf);
midpConnection.setRequestProperty("Authorization", buf.toString());
Afterwards you can initialize the Webservice with:
AuthTransportSE androidHttpTransport = new AuthTransportSE(URL, userName, pasword);
Cheers,
Dennis. -
Consuming ABAP webservice in Java
Hi Gurus,
We are publishing webservices from SAP and Java team is consuming them. For accessing the webservice from java , we are maintaining User name and Password in SICF for that service.
Now if we donot maintain the User name and Password in SICF for that service then Exception "Unauthorised " is coming in Java.
We want to pass the User name and Password from Java. How to achieve this.
Thanks
JitendraHi John,
thnx for quick response. i have given WSDL to Java team but they are unable to find " Logon service in the WSDL".
Can u tell us for which XML tags we should search.
Thanks
Jitendra -
Consuming XI Webservice in WebDynpro - Data Type error
HI All,
I have a scenario, to 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(DEPRECATED method) in my web dynpro java.
Once web service model is imported I have done the mapping 'model to component controller'. After that I did not write any coding, and just deploy the application. While deploying the application I am getting an error as given below,
com.sap.tc.webdynpro.services.exceptions.TypeNotFoundException: type java:byte not found.
Reason of this error:
Attribute type does not support web dynpro java ,Because XI side that corresponding attribute type is base64binary once model is imported in to web dynpro that base64binary attribute type is automatically taken as byte.
Please help me ASAP
Error Trace:
com.sap.tc.webdynpro.services.exceptions.TypeNotFoundException: type java:byte not found
at com.sap.tc.webdynpro.services.datatypes.core.DataTypeBroker.getDataType(DataTypeBroker.java:224)
at com.sap.tc.webdynpro.progmodel.context.DataAttributeInfo.init(DataAttributeInfo.java:319)
at com.sap.tc.webdynpro.progmodel.context.NodeInfo.initUnmappedAttributes(NodeInfo.java:687)
at com.sap.tc.webdynpro.progmodel.context.DataNodeInfo.doInit(DataNodeInfo.java:238)
at com.sap.tc.webdynpro.progmodel.context.NodeInfo.init(NodeInfo.java:671)
at com.sap.tc.webdynpro.progmodel.context.NodeInfo.init(NodeInfo.java:674)
at com.sap.tc.webdynpro.progmodel.context.NodeInfo.init(NodeInfo.java:674)
at com.sap.tc.webdynpro.progmodel.context.NodeInfo.init(NodeInfo.java:674)
at com.sap.tc.webdynpro.progmodel.context.NodeInfo.init(NodeInfo.java:674)
at com.sap.tc.webdynpro.progmodel.context.Context.init(Context.java:40)
at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:199)
at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.init(ClientComponent.java:430)
at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.init(ClientApplication.java:362)
at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.initApplication(ApplicationSession.java:756)
at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:291)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingStandalone(ClientSession.java:713)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:666)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:250)
at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:150)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doGet(DispatcherServlet.java:46)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365)
at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944)
at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266)
at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
Regards,
Boopathi M.Hi Saravanan ,
Thanks for your replay.
Once i am testing the WSDL URL in netweaver webservice navigator,it showing an error like like
Cannot download WSDL from http://host name.sap.com:8000/sap/bc/srt/wsdl/sdef_ZWEBSERVICE/wsdl11/ws_policy/document?sap-client=800: It is not allowed to access this service.
But same URL is working fine in browser.It's displaying the XML file.
Can you provide the solution to resolve this error?
Thanks,
Kundan
Maybe you are looking for
-
Hi I've been checking the topics for a problem similar to mine but haven't found any. I've had my creative zen for about 3 years now and have loved it. However, in the past few months I've been having trouble with it. While playing a song (either whi
-
Why can't I log in to elements 10?....
Why can't I log in to my elements 10? every time I try it just says adobe services are unavailable, my network connection is perfect, it's been doing this for about 2 weeks now, it doesn't matter what time of day or night I try to log in, it just won
-
Place a SUM of a selected column in an EASY CALENDAR region
Hello, I'd like to SUM a particular field (SCHEDULE_TABLE.SCHEDULE_PERCENT_FORECAST) And place it in EASY CALENDAR. The idea is that if a resource had 3 records in the SCHEDULE_TABLE for a given date, the sum of the 3 SCHEDULE_PERCENT_FORECAST fields
-
Unable to use device as an iSCSI target
My intended purpose is to have iSCSI targets for a virtualbox setup at home where block devices are for the systems and existing data on a large RAID partition is exported as well. I'm able to successfully export the block files by using dd and added
-
Getting directions with blackberry map application doesn't work
i merely want to get the written directions but once i type in my to and from locations, and fastest route and it goes to give me the directions, i can't scroll thru the directions. it posts on the screen the to and from addresses on the screen tog