Regarding Exception in WebService
Hi all,
I have installed Business One in my system.My requirement is to display the sales order details.I am using java connector and SAP NetWeaver Developer Studio for this purpose.
process:
--I've also included external jar files sboapi.jar and sbowrapper.jar
--I've written a query to get salesorder details from ORDR table.
--I am handling the IRecordSet object.
--I have written a method which returns an object array of SalesOrder class which i have created for this purpose only.
By writing normal java program it is working fine and records are displaying form that SalesOrder object which i've created.
I've created a webservice with the same code and deployed in the WAS of SAP.While testing it is showing an exception
"Exception in method getSalesOrderDetails()".
Any one please guide me in this issue.
Thanks and Regards
Madhu
Hi Madhu,
I don't know details about WAS, but regarding Java connector (JCo) for DI API please note the following:
JCo is just a thin wrapper around the DI API COM library to facilitate using DI API in a Java enviroment.
Therefore the DLL file which encapsulates the business logic (i.e. OBServerDLL.DLL) will be copied into a local temporary directory on the file system as well - ready to be loaded from the webservice then.
I could imagine that you would need to apply some settings in WAS to enable creating a directory, copying files into it + loading files from there, but this is beyond what I know.
...I assume getSalesOrderDertails() does handle the Logon as well?
For usage in a WebService, DI Server (DI API exposed as a SOAP capable Windows service = WebService to be built on top of it) may be the better alternative... - though it also works like DI API, but inside the DI Server process - not in your WebService...
...despite some limitations (no DB structure can be changed through it etc.) ...
HTH,
Frank
Similar Messages
-
*** Doubt regarding Exception Block ***
Hi,
I have a doubt regarding exception.
My SP has 5-6 select queries that is used in" open <cursor name> for select ...."
also a 'select count(id) into...' statement.
Do I need to have an Exception block inside? I dont have any user defined execptions at all. So will there be any exceptions that gets generated in a select query?
Also 'WHEN OTHERS THEN' is it OK to use where I dont know what all excaptions might occur?
Regds,
SHi,
Oracle will raise an error NO_DATA_FOUND , if any of your SELECT statement returns zero records, If you want your process to fail then you can have one common handler (either write to a error_log_table) do all the error_handling.
If you want to continue for some SQL's to move to the next statement then you can do some thing like this.
begin
select statement
when no_data_found then --not an issue, if no data is returned.
NULL;
Refere to this link for more information.
http://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96624/07_errs.htm#1079
thanks -
Regarding Exceptions in Reporting!!!
Hi BI Experts,
Is there any way to get or change the available colors in Exceptions on a query.
I mean it gives three colors for exception reporting Green, Yellow and Red, but instead I want Green, <b>Blue</b> and Yellow.Hi Arun,
You can change the color of exception at workbook level not query level.
Please go through this Bhanu Gupta Post,
Customizing color for defined exceptions
and
Re: regarding exceptions
if it is useful assign points
Regards,
Senthil -
Query regarding 'EXCEPTION'.Please see.
I have a question regarding Exception.
Lets assume that I have a method that throws an 'ArithmeticException',but
instead of catching this exception,I will catch the 'Exception' object.
try {
}catch(Exception e){
} Now correct me if I am mistaken in my analysis :
Normally having a 'superclass and subclass heirarchy' gives you polymorphism.
The subclass will override the method defined in the superclass and gives it
its own implementation.
I can then use the 'superclass reference' as a argument to a method which can execute
the overridden method dynamically.
Because the subclass has overridden the base class method,polymorphism takes place.
Am I right in the above analysis?
Now look at the exception example on top.
I am passing the Exception reference to the catch clause (which is an indirect parent
of ArithmeticException).
My Question is:
1)Which method has ArithmeticException overridden for polymorphism to take place?
(ie,I am passing the superclass of the exception,and the JVM knows which exception to
generate)
2)Am I right in my analysis?Lets assume that I have a method that throws an
'ArithmeticException',butThen your app is buggy.
instead of catching this exception,I will catch the
'Exception' object.Don't do that. Better fix your code.
Am I right in the above analysis?Yepp, I guess so.
1)Which method has ArithmeticException overridden for
polymorphism to take place?Look at its source. Probably none.
(ie,I am passing the superclass of the exception,and
the JVM knows which exception to
generate)That doesn't make sense. You're not passing anything. The code or JVM knows which exception to generate, and you just tell it which one to catch. -
Query regarding Exception and invocation.
I have a query regarding Exception.
In my code, which throws an ArithmeticException:
<code>
public class TestArithmeticException{
public static void main(String[] args)
int a,b ;
try {
b=0;
a = 50/b;
}catch(Exception ex) {
ex.printStackTrace()
</code>
The above code is catching exception of type Exception(which is superclass of all RuntimeExceptions)
and which inturn extends the Throwable class.
ie. Throwable -
Exception -
RuntimeException
ArithmeticException
Am I correct in my assumption below:
a Because ArithmeticException is an indirect subclass of Throwable and has access to its inherited methods,
it overrides the methods defined in 'Throwable', and then via polymorphism(superclass reference 'ex' in the catch clause)
invokes the method ex.printStackTrace() ?
Does it mean that all runtime exception child classes override the methods defined in Throwable, and then via polymorphism execute overridden
methods?Yes.
-
Regarding exception in the WebService(Business One)
Hi all,
I have installed Business One in my system.My requirement is to display the sales order details.I am using java connector and SAP NetWeaver Developer Studio for this purpose.
process:
--I've also included external jar files sboapi.jar and sbowrapper.jar
--I've written a query to get salesorder details from ORDR table.
--I am handling the IRecordSet object.
--I have written a method which returns an object array of SalesOrder class which i have created for this purpose only.
By writing normal java program it is working fine and records are displaying form that SalesOrder object which i've created.
I've created a webservice with the same code and deployed in the WAS of SAP.While testing it is showing an exception
"Exception in method getSalesOrderDetails()".
Any one please guide me in this issue.
Thanks and Regards
MadhuHi Madhu,
I don't know details about WAS, but regarding Java connector (JCo) for DI API please note the following:
JCo is just a thin wrapper around the DI API COM library to facilitate using DI API in a Java enviroment.
Therefore the DLL file which encapsulates the business logic (i.e. OBServerDLL.DLL) will be copied into a local temporary directory on the file system as well - ready to be loaded from the webservice then.
I could imagine that you would need to apply some settings in WAS to enable creating a directory, copying files into it + loading files from there, but this is beyond what I know.
...I assume getSalesOrderDertails() does handle the Logon as well?
For usage in a WebService, DI Server (DI API exposed as a SOAP capable Windows service = WebService to be built on top of it) may be the better alternative... - though it also works like DI API, but inside the DI Server process - not in your WebService...
...despite some limitations (no DB structure can be changed through it etc.) ...
HTH,
Frank -
Hey Experts,
I am using an FM to create a webservice. In the FM I have defined an exception. When the webservice is created it should have some fault parameters with faultcodes which correspond to the exceptions in the FM. However, this is not happening.
Any ideas?
Thanks and Regards,
Ravi BhatnagarHey Experts,
I am using an FM to create a webservice. In the FM I have defined an exception. When the webservice is created it should have some fault parameters with faultcodes which correspond to the exceptions in the FM. However, this is not happening.
Any ideas?
Thanks and Regards,
Ravi Bhatnagar -
Difference in Fault message types & exceptions for Webservice in ABAP
Hello all,
I am relatively new to the web service framework in SAP. My problem scenario is as follows.
I have a WSDL file of a webservice from 3rd party non-SAP s/w and I want to replicate the same webservice into SAP by creating FM in SE37 with same imp/exp parameters and functionality.
So I first created a consumer proxy using the external WSDL file of non-SAP webservice. This generated imp/exp DDIC structures in SAP. Now I created a RFC FM in SE37 with similar Imp/exp parameters and relesed this FM as a webservice. I then created another consumer proxy using WSDL of this newly created webservice in SAP.
In the old consumer proxy I see a structure as SOAPFault as a Fault message type which has 3 fields ERRORCODE, TEXT, DETAILS but in the newly created consumer proxy I don't see Fault message types but i see exceptions which i mentioned in exception tabs while creating the FM. The imp/exp parameters are identical.
So my question is while creating a web service in SAP using a FM in SE37, what needs to be done in order to get the Fault message types getting created automatically when we create a consumer proxy for this webserivice?
Also based on the WSDL of 3rd party system , can i replicate the same web service in SAP ?
Appreciate your expert advice on this.
BR
Nilesh PuranikHi Krishna,
I've read the SAP description about Fault Message Types but I'm still struggling on how to use them correctly.
Why do we need them if I can't do nothing with it on the BPM side? After the mapping of the FMT, I'd like to acess it so that I can send a description back to the original system...The thing is, in BPM you can't acess the FMT, you can only create a new BRANCH (on a block step) for it...
I've tried to acess the description text on trace which comes with the message, but it seems that the trace only serves for posting info, and not for getting any...
The Mapping Runtime Constants have some information where you can read some descriptions, but nothing related to the errors....You can read the Receiver service, sender, interface_namespace, but nothing from the ERROR tag...
Is there a way to get the description? Or anything related to the error tag?
Thanks in advance -
Regarding Exceptions of a SQL query
Hi,
We have a problem regarding the sql query shown below:
select max(column1) into var1
from table1
where column2 = 100;
We don't have any rows in the table1 but we are not getting the "NO data exception" while executing the query in a procedure.
If we modify the query to
select column1 into var1
from table1
where column2 = 100;
then 'No data found' exception is raised.
Can you please let us the reason behind this.
Thanks in advance.
LakshmiCut from Oracle documentation
If a query with an aggregate function returns no rows or only rows with nulls for the argument to the aggregate function, the aggregate function returns null.
AVG
COUNT
GROUPING
MAX
MIN
STDDEV
Aggregate function don't return 'No datafound Exception" I believe....Correcte me if i am Worng
Ashok -
Regarding Exception Messages in MD04
Hi Gurus,
Can any body explain what's the main scenario where we get 'Exception message 30' i.e. Plan the process according to Schedule?
Is there any standard report which will display all the firmed planned/prod.ord based on MRP controller?
Helpful answers will be rewarded with points,
Thanks,
SekharHi,
If your order start date of the planned order lies in past and the order start date in past indicator is not allowed in OPPQ the system automatically switches to forward scheduling taking todays date starting date of the planned order. In this case the system issues a exception message 30 Plan process according to schedule.
System Current Date : 14.07.2007
Reqmts date : 01.07.2007
Planned order start date : 14.07.2007 with exception message 30 .
If order start date in the past indicator is not allowed during MRP Run the system creates planned order on 14.07.2007 with exception message 30 plan process according to schedule since your reqmt date is 01.07.2007.
If the order start date in the past indicator is allowed in OPPQ during MRP run
the system creates planned orders on 01.07.2007since the reqmts date is 01.07.2007.
Regards,
nandha -
Regarding exception handling in webdynpro
Dear frds..
I am using webservice for webdynpro application.,,,
when i call a particular method of webservice in webdynpro i get o/ps but when i give wrong outputs the webservice exception is shown in webdynpro at the bottom
I dont wanna to display the exception mesage doen the bottom,
Instead of dispalying the exception message, i want to dispaly some other things like confirmation box or dialog box..
How to catch exceptions in webdynpro?
if use try catch finally block in webdynpro,
and in catch block i kept messaeg of popup confiramtion box, it is not been displayed....
Thanks in advance
ShravanFor displaying error in confirmation box, try following code:
Create a eventhandler named as "Exception"
try
//Some statements
catch(Exception e)
IWDControllerInfo controllerInfo =wdControllerAPI.getViewInfo().getViewController();
String dialogText = "TYPE UR ERROR MESSAGE";
IWDConfirmationDialog dialog = wdComponentAPI.getWindowManager().createConfirmationWindow(dialogText,
controllerInfo.findInEventHandlers("Exception"),"OK");
dialog.open();
OR
To display error message at some place other than bottom( which is default), add a UI element named as MessageArea and placed it at the required location in View and trying executing the application. -
Regarding Exception handling for Value mapping
Hi
We have a requirement for resending the message (using SXMB_MONI)for Value mapping and other message mapping related errors . Is there any others way we could achieve this , Any help on this is appreciated ?
Thanks in advance,
JishiHi Jishi,
I don't think that SXMB_MONI is the solution.
If you have a mapping error this can belong to two things:
a) either your mapping is wrong
b) or your message is wrong.
In case a) you have to correct your mapping
In b) The sending system must look what happend.
In my opinion in both cases (a & b) the process must be restartet from the source system. That's the way we do it.
Additionally we send a information message in the exception branch to the sending system
Regards Mario -
Exception in webservices - Endpoint cannot handle requests in state: CREATE
Hi All
urgent help needed in webservices.
we have a webservice deployed. and i have made a web service client (a java application client), it is registered with the deployed web service, but when running this clinet, we are getting the following excption
Please let me know if you have any idea? It is very urgent........ :(
Following is the stack trace of the Exception:
Exception = Endpoint cannot handle requests in state: CREATED
javax.xml.ws.soap.SOAPFaultException: Endpoint cannot handle requests in state: CREATED
at com.sun.xml.ws.encoding.soap.ClientEncoderDecoder.toMessageInfo(ClientEncoderDecoder.java:84)
at com.sun.xml.ws.encoding.soap.client.SOAPXMLDecoder.toMessageInfo(SOAPXMLDecoder.java:209)
at com.sun.xml.ws.protocol.soap.client.SOAPMessageDispatcher.receive(SOAPMessageDispatcher.java:538)
at com.sun.xml.ws.protocol.soap.client.SOAPMessageDispatcher.doSend(SOAPMessageDispatcher.java:258)
at com.sun.xml.ws.protocol.soap.client.SOAPMessageDispatcher.send(SOAPMessageDispatcher.java:137)
at com.sun.xml.ws.encoding.soap.internal.DelegateBase.send(DelegateBase.java:84)
at com.sun.xml.ws.client.EndpointIFInvocationHandler.implementSEIMethod(EndpointIFInvocationHandler.java:172)
at com.sun.xml.ws.client.EndpointIFInvocationHandler.invoke(EndpointIFInvocationHandler.java:106)
at $Proxy15.tellFortune(Unknown Source) Attached is the source of client............
* Main.java
* Created on February 20, 2007, 11:53 AM
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
package client_ws;
* @author ic005332
public class Main {
/** Creates a new instance of Main */
public Main() {
* @param args the command line arguments
public static void main(String[] args) {
System.out.println("@@@@@@@@@@@@@@@@@@@@@");
try { // Call Web Service Operation
client_ws.FirstWebService service = new client_ws.FirstWebService();
System.out.println("******************");
client_ws.FirstWebServiceSEI port = service.getFirstWebServiceSEIPort();
System.out.println("^^^^^^^^^^^^^^");
// TODO process result here
java.lang.String result = port.tellFortune(); //Exception is coming at this line
System.out.println("###################@");
System.out.println("Result = "+result);
} catch (Exception ex) {
System.out.println("Exception = "+ex.getMessage());
ex.printStackTrace();
}Thanks in advanvce
Inder Jeet SinghDo you see any exception on the server side ? May be endpoint is throwing some exception. If you use JAX-WS 2.1 the error diagnostics are much better.
-
Regarding exception aggregation based on 2 infobjects
Hi All,
I have a report in which I have to use Exception aggregation based on two Infoobjects.
How we can do it ?
I have tried using nested aggregation but its not working.
Example:
I have three Infoobject :
0Material
0Sold_To
ZSalesRep (Sales representative of Sold to)
In Report:
Rows section, I will have only ZSalesRep Infoobject.
Column Section (i.e. the Keyfigures) I will have one keyfigure which should be calculated based on 0Sold_to and 0Material.
Any inputs will be helpful.
Thank you.
Vamsi.Hi,
I think exception aggregation should work in your scenario, first you get the total with reference to material and then put that key figure in reference to sold to party.
Just check the below article for more information,
[http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d08b56a8-daf5-2e10-2397-904d6aeb55c2?QuickLink=index&overridelayout=true]
Regards,
Durgesh. -
Need help regarding configuring the WebService Call from RTD to Siebel
Hi All,
Can someone help me with the information on how do i configure a Webservice Call from RTD to Siebel?
Any high-level or granular details on this would be very helpful as I am new working on this product. How can a jax-ws be utilized to achieve the same?
Thanks in advance.
Best Regards,
HariharanIf you actually need a portal service though, this will not work. However, you could have the portal service return a Document object, which is basically the text of the HTML file you want to display. Then, when calling the portal service, you can simply output the text to the IPortalComponentResponse object
I hope this helps
Darrell
Maybe you are looking for
-
Need help adding wifi to a wired network with multiple hardwired ethernet
Hello all , I have a question that I can't seem to find the exact answer for and so I solicit your help. I am renovating a large old farm which has 4 main buildings, arranged in a line that spans 150 feet in length. I had installed hardwire ethernet
-
How to use table control in bdc, plz somebody tell me.
Hi Gurus, Ples tell me how to use table control in bdc, plz somebody tell me. And send Sample CODE also. Thnaks in advance.
-
Standard Report for Organizational Unit
Hello Team, Is there any standard report to fetch orgunit and their parent org unit ID in Organizational Management? Can we do it through Adhoc query?? Please suggest suitable solution. Best Regards, RP
-
I would like some keyword replacement feauture. Where I should be able to specify what to be replaced with what. Lets say I give Bridge a txt file with the format like this player14 Niklas Andersson Then in the keywords and description as well if I e
-
Hi, In Our system , GL Raw mat Consumption ( Good s Issue) value is differs from Cost element (Raw Mat Consumption). Pls advice why this differance and how to get solve this. Thanx in advance