ABAP Webservice expecting Optional parameters
Hi,
I have developed an ABAP web service from an existing RFC which calculates the prices of products. I am trying to test the same and I have various mandatory and optional parameters. Somehow the web service is expecting for Optional parameters and it is checking for every parameter from the deep structures also. When I try to test the RFC from SE37, it doesn't ask for an optional parameters.
Thanks to help me on why the web service is expecting the optional parameters.
Regards,
Aruna.
Hi,
Yes, processing all those exceptions (say, by catching them into lx_ex type cx_root) and outputting the error messages using message lx_ex type 'E' would not hurt and may actually help to understand what's wrong, isn't it?
cheers
Jānis
Similar Messages
-
Optional parameters to webservice method over FORM-GET
Hi.
I'm developing a proof of concept webservice using Workshop and my test method looks something like this:
* @common:operation
* @jws:protocol soap-style="rpc" http-xml="false"
form-post="true" http-soap="true"
public void foobar(
String param1, String param2, String param3)
}The schema elements I map to the parameters specifies that they are optional.
There are no problems when using this as a webservice - I'm able to specify these optional parameters (or not). When I invoke this using FORM-GET, it seems that these parameters are all required (although I can specify an empty value).
E.g. The following works fine:
http://localhost:7001/TestWebService/Test.jws?param1=abc¶m2=def¶m3=ghi
The following works fine and calls my code with param1 being an empty string:
http://localhost:7001/TestWebService/Test.jws?param1=¶m2=def¶m3=ghi
The following returns an error:
http://localhost:7001/TestWebService/Test.jws?param2=def¶m3=ghi
The error is: "Unable to transform query arguments to Java arguments Parameter 'param1' - No value found"
Can anyone advise on how to not require the presence of optional parameters using FORM-GET?
Regards,
Michael.Hi,
thanks for the quick turn-around. Jdev version that i am using is Studio Edition Version 11.1.1.6.0. And i am using SOAP. Isnt there a way without using a backing bean? I am planning to use it as a portlet. Would'nt creating a backing bean cause a problem in that case?? Also i am confused here . The method that i am dragging is GET_ACCOUNTOperation(Object). I tried passing the hashmap . It gave the following exception :
javax.el.MethodNotFoundException: Method not found: GET_ACCOUNTOperation.execute(java.util.HashMap)
Rampal -
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 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 -
Hi,
SAP is initiating a SOAP request to DataPower ESB which gets an asynchronous SOAP response and gives it back to SAP.
It is a pass through service and there is no transformation done.
SAP is creating ABAP webservices. The webservices are created using the request wsdl currently. Can it be done using 2 wsdl as request wsdl and response wsdls are different. Combining them is another option but later on the provider changes the wsdl , the wsdl again needs to be combined . Instead of that can we maintain 2 different wsdl one for request and one for response and create ABAP webservices.
Kindly suggest.Hi,
Since this is async communication you can make two services in ABAP using 2 different wsdl. These two wsdls are two different services (in your case).
Regards,
Gourav -
How to consume a ABAP webservice in a webdynpro app?
Hi,
I have a BAPI in ABAP that is exposed as a webservice. I want to use this to build a webdynpro app so that i can consume this webservice. This BAPI returns the Employee data. As soon as the person logs into the portal i am going to pass his login id to this BAPI so that it retrieves the Employee data for that user id. But i need to know the procedure of consuming this webservice in a webdynpro app. Any pointers in this regard will be greatly appreciated.
Thanks,
Arun E VHi Arun,
Consumption of a web service is univesal I guess so it wont matter if it is an ABAP webservice. For consumtion of webservice in Web Dynpro you can go through the following tutorials
<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/using%20car%20rental%20web%20service%20with%20web%20dynpro.pdf">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/using%20car%20rental%20web%20service%20with%20web%20dynpro.pdf</a>
<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/creating%20an%20email-client%20using%20web%20dynpro%20and%20web%20services.pdf">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/creating%20an%20email-client%20using%20web%20dynpro%20and%20web%20services.pdf</a>
Do reward points if it helps
Regards
Sid -
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. -
How to create optional parameters in discoverer 10.1.2
I am new to discoverer, Can any one tell me how to create optional parameters in Discoverer desktop edition in 10.1.2
I looked at the following thread which says optional parameters can be created in 10.1.2 but doesn't tell how tro create it
How to create optional parameters in Discoverer
Thanks in AdvanceHi.
In the thread you quoted Michael Armstrong-Smith says that optional parameters can be created in Plus but not in Desktop and that's true.
So your question "how to create optional parameters in Discoverer desktop" is already answered in that thread.
Assume that it is a typo and you wanted to ask how to create optional parameters in Plus.
Then the answer is simple: Just uncheck the "Require users to enter a value" checkbox when creating new parameter.
Regards Jakub -
How to use ABAP Webservice to Trigger the start of BPMN
Hello,
My scenario is that i define a webservice in the SAP ECC system and import it in the process composer as the service interface. As to the start event, i set the above service interface and operation as the trigger service.
After then, i call this webservice in the user exit of a T-Code. However, the BPMN is not started by this webservice call.
Anyone can explain on this and tell me how to use the ABAP webservice as the starting event service interface?
Thanks in advance
ErickHi Erick,
When you develop a process model and use some arbitrary service interface in the message start event then this will be exposed on the Java / BPM system you deploed the process definition on.
That allows you to start the process via this web service once you know its endpoint.
So in case you want to start your process from the ABAP side you would need to call this endpoint on the Java side out of your ABAP system.
Simply calling the web service / code on your ABAP system and hoping that this will also invoke the Java stack won't work I AFAIK.
Best regards,
Martin -
Is WebDynpro ABAP a viable option?
Hi all
Some generic questions, is WebDynpro ABAP a viable option? Can I suggest it to the customers? Is it a good practice to have UI and Business logic on the same server? Y are two strains of webdynpro one for ABAP and one for Java necessary?
I have also heard ESS MSS runs on both ABAP and Java WebDynpro. Y is SAP complicating the skillset required to deal with Business Packages? Please give me links or direct answers as suitable. Thank you all.
reg
LNVHi Volker
All that I have written is based on help.sap.com. And here is the link (Go to WDJ in Travel manangement and look at constraints).
<a href="http://help.sap.com/erp2005_ehp_02/helpdata/en/46/51f0e994b85e40e10000000a11466f/frameset.htm">ECC 7.0 WDA</a>
And yes you are right, ECC 6.00 is enhanced using EHPs -> enhancement package. I am talking abt EHP 2.
I am using CAF on NW 7.0 and hence the concern. And when I say composite my UI is essentially calling faceless services. That alone gives me the power to orchestrate processes quickly. The only reason I put these questions is because the same are coming out of my customers too!! And I need to give a concrete answer on the UI paradigm as well. Though I have made up my mind the future releases of ESS MSS is troubling to hear. Thank you for the patience shown in answering my questions.
regards
LNV
Message was edited by:
vln
Message was edited by:
vln -
Database Adapter & Optional Parameters?
I'm working on creating a web service that accepts two parameters. Parameter A is required while parameter B is optional.
I then need to pass these parameters on to the database adapter that will perform my query. Is it possible to set things up so that parameter B is optional at this stage as well?
When I turn on XML validation on the domain, an error is thrown because null is not a valid value for the parameter.If you use the DB adapter for stored procedures then you have control of the input parameters based on the instance XML that is supplied to the procedure. If a parameter is optional and you don't want to supply a value (i.e. you want the parameter's default value), then simply omit the XML element corresponding to the optional parameter from the instance XML. Note that this only works for optional parameters.
-
Optional Parameters in a linked SubReport
Hi All,
I'm trying to get something to work, but can't figure out how to do it ! I think that possibly optional parameters will do the trick.
I have a report that is based on a SQL Server stored procedure takes about 20 parameters and is used as a sub report to display header information on what was selected for the report that it is linked to.
For example, there is a "Supplier Report" that takes SupplierID, CategoryID and Sub CategoryID. These parameters are linked to parameters in the stored procedure in the header sub-report which then goes off to the database to get the descriptions for those IDs and displays them. This is standard across all reports. Now, other reports may not use the Category ID and Sub CategoryID, so in those reports, a value of -1 is passed to the header sub-report and in the logic for the header sub report, those sections are hidden.
At the moment, to set the values as -1, I just have a formula in the main report called DummyXXXID which returns -1. For example if CategoryID and SubCategoryID were not used I would have DummyCategoryID and DummySubCategoryID. This works fine.
However, as more reports are created, the header sub-report gets more parameters to display the descriptions of, which means I have to go back and add 'dummy' formulas to all the other reports that use the header sub-report. e.g. If I have a new report that takes 'WidgetID' as a parameter, the underlying stored procedure for the header report gets @WidgetID as a new parameter and returns a new column of Widget Information to be displayed in the header. I then have to add a DummyWidgetID set to -1 to all reports that don't use the WidgetID parameter so that the header of those reports doesn't try and show Widget information.
What I'd like to do is have the sub report default to -1 (or other values as appropriate to indicate no value) for all parameters in it. In that way, if I add a new parameters to the header sub-report, existing reports will not have to be changed and sub-report links refreshed, since the new parameters in the sub report will have default values.
Is this possible ?? I can't seem to set the parameters in the sub-report to "optional prompt"= true, as they are all fixed at false and there is no drop down to change them.
I hope that makes sense !Moving to the Design Forum, not an DB question.
-
Hi Experts,
Can any once explain about ABAP Web services , can handles high volumes of data and how much it is good in terms performance ?
Which is the best one in ABAP webservices and XI webservices?
Regards,
Praveen KumarHi
Web Services Development in ABAP [original link is broken]
https://www.sdn.sap.com/irj/sdn/webservices-elearning
http://www.sappro.com/downloads/UDDI.pdf -
Passing select-options parameters type to the class
Hi All,
I am creating one class and I want to pass the select-options parameters directly to it like s_plant,s_mtart etc .
So while specifying these as paramters what type I should give them?
Rgds,
MadhuriWhatever you finally decide upon, you must have a Data Dictionary definition. So either create one for each type (bukrs, vkorg, etc.) or use a general one like RSELOPTION. However with the general one you have to put extra code in the class to convert back from a CHAR 45 field to your special field.
Anyway, using the Data Dictionary is fun! So go create as many new tables as you need. In the long term, the work you do in the Data Dictionary is never wasted and it may save you time in the future when you need that structure / table again for a different program.
Creating these structures and tables is easy if you use shortcuts. For example in local definitions in your program you can code...
data range1 type range of bukrs.
or
data wa_bukrs type bukrs.
ranges range1 for wa_bukrs.
either of these gives you the structure... no need to manually type sign, option, low, high...
What about Global (data dictionary) definitions? yes, there are also shortcuts...
start transaction SE11, enter range table name in the 'Data' field (e.g. ZMYRANGETAB), Hit Create, choose to create a Table Type... now you are on the blank new Maintain Table Type screen. enter a short text for your new table, then choose
Edit->Define as ranges table type
next enter your data element (e.g. BUKRS) under 'data element', hit Save and activate. You just created your range table without manually entering sign, option, low, high...
But wait there's more... on the same screen you can now (after saving the range table) also enter a structure name such as ZMYRANGE in the field 'structured row type'. Hit Create and you are taken to the Maintain Structure screen where the sign, option, low and high are already populated... add a short description and save and activate... you just created a workarea for your range table.
You just created a table type ZMYRANGETAB and a structure ZMYRANGE with minimal effort. -
Hello,
I am trying to design a fillable form for our payroll department to calculate payroll adjustments. I am using a OLEDB Database connection to our SQL Server and grab information from a stored procedure. I want the form to populate certain fields when the user passes the check # parameter to the stored procedure.
My problem is that I can't figure out how to pass the parameter. When I set up the data connection in the form, I get an error message that "Stored procedure has non-optional parameters".
How can I design the form to allow the user to pass this parameter before the form loads so that the check informtion is displayed in the form?Hi,
As far as I know InDesign takes flat files or XML. Conversion may be required in database before input.
Imran
Maybe you are looking for
-
Use of HP 5550 Deskjet in England
I would like to give my 5550 to my daughter in England. I am confused about what electrical connections are necessayr. The power cord box seems to indicate a 110 v input, but other specs seem to say the printer is dual voltage. I know about the UK po
-
I am using Photoshop Elements 8 and I successfully created and saved 3 albums and copied them to my IPAD using ITUNES. They were in the correct sorted sequence. I then went back and tried to make a best of show album with my 3 star pictures and every
-
How many Airport Extremes can I use to create a network?
Hi all. I've taken to using two of the dual-band Airport Extremes whenever I need to create a wireless network over a larger than usual space, obviously using one as base and using the other to extend the network. Can I add a third or fourth Apple Ai
-
Program not working with Integrated ITS
We are calling program SAPLXUSR at log-on and the program is not carrying out the funtions when being used with the Integrated ITS. This program works correctly with the Standalone ITS but we are unable to execute it using the Integrated ITS. We are
-
Restrict the user to deselect records
Hello Freinds, I have a requirment where I have obstruct the user to deselect the records selected in the VA01 when refrenced from the invoice. The screen appears while creating a sales order in the tab of Billing Document. How can I achieve this pro