on 12-12-2007 12:05 PM
Hi all,
I developed a web service in Development server then I transported it to the production server. There I configured using Tcode WSCONFIG.
Again I want to use this web service in my Development server.Created a proxy. Attached Logical port in Tcode 'lpconfig' of production server. Then I write my program. Its compiled well. But when I executed it, its giving a error..
ShrtText
Access not possible using 'NULL' object reference.
I am attaching the error. At line 27 error occured...
What happened?
Error in ABAP application program.
The current ABAP program "ZWS_CUSTNAME" had to be terminated because one of the
statements could not be executed.
This is probably due to an error in the ABAP program.
Error analysis
An exception occurred. This exception will be dealt with in more detail
below. The exception, assigned to the class 'CX_SY_REF_IS_INITIAL', was not
caught, which
led to a runtime error. The reason for this exception is:
Attempt to access a component using 'NULL' object reference (points
to nothing).
An object reference must point to an object (an instance of a class)
before you can use it to access components (variable: "CUSTOMER").
Either the reference has not yet been set, or it has been reset to
'NULL' by a CLEAR statement.
9 REPORT ZWS_CUSTNAME.
10
11 DATA: customer TYPE REF TO zzco_zvi_customer .
12
13 Parameters: custno type kna1-kunnr.
14 *TRY.
15 * CREATE OBJECT xxxxxxxx
16 * .
17 * CATCH cx_ai_system_fault .
18 *ENDTRY.
19
20 data: OUTPUT type ZZZWS_CUSTOMERRESPONSE .
21 data: INPUT type ZZZWS_CUSTOMER .
22
23 *TRY.
24
25 input-custno = custno.
26
>>>>> CALL METHOD customer->zws_customer
28 EXPORTING
29 input = input
30 IMPORTING
31 output = output
32 .
33 * CATCH cx_ai_system_fault .
34 * CATCH cx_ai_application_fault .
35 *ENDTRY.
thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
all the required information is already in your post.
what object do you call the method zws_customer on?
and what is the state of that object the moment you call the method?
why did you comment the constructor? and why comment the try-catch statement?
to me you code looks like...but that's none of my business.
anton
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.