Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Logical port problem

Former Member
0 Likes
5,479

Hi All

I create logical port in LPCONFIG for a WS and i put the proxy class and logcal port (just variable like abc ) i choose defult port

and in runtime i choose webservice and in in call parameters in URL i put the WSDl of the WS i create via se37 .

when i activate it i get message : Web service requires state management

What i need to do to overcome this issue?

Best Regards

Nina

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
3,155

HI ,

when I enter in the debuger into this method i get pop-up for user and pass and I provide the server(where the web service is persist ) user and password

and Method below i have exception.

TRY.
    CALL METHOD lref_client_proxy->z_tst_performance
      EXPORTING
        input  = in
      IMPORTING
        output = out.
  CATCH cx_ai_system_fault.
  CATCH cx_ai_application_fault.
ENDTRY.

CX_AI_SYSTEM_FAULT

What it can be ?

BR

Nina

18 REPLIES 18
Read only

Former Member
0 Likes
3,155

hello nina,

after clicking the create under application specific settings there is a global settings tab

under it there is a chekc box for statement , check it and it allows to create the logical port

and u try to create logicla port using transaction SOAMANAGER as it seems ur sap version is latest

regards

afzal

Read only

0 Likes
3,155

HI mohammad

Thanks!!!!

I did it (active the state management check box) and the warning is gone ,

The problem is that I still don't get the data in the OUT ?

Maybe you have any idea ?

Best Regards

Nina

Read only

0 Likes
3,155

hi nina,

what is the exact scenario ur doing i mean what are the input parameters and outparamters of ur RFC

and how r u executing the proxy i mean r u executing from SE80 or u have written any abap code for the same , and one more thing u cna check ru logical port in this table SRT_CFG_CLI_ASGN , the logical port u created should be availbe in this table,

regards

afzal

Read only

0 Likes
3,155

Hi Mohammad,

I try to do that via code see below.

and i don't find the logical port entry in table SRT_CFG_CLI_ASGN but i found it in table SRT_LP.

DATA:  lv_port_name          TYPE srt_lp_name,
       lv_text               TYPE string,
       lt_return             TYPE bapirettab.

DATA: lref_client_proxy TYPE REF TO zhco_zread_ser_test_perfomance,
      in TYPE  z_ser_tst_performance,
      out TYPE z_ser_tst_performance_r.

* Get Default Logical Port for Proxy
CONSTANTS: lc_proxy TYPE srt_lp_proxyclass VALUE 'ZHCO_SER_T_PER'.


in-user = 'AST'.
in-workitem_id = '00570538637'.




CALL METHOD cl_srt_lp_maintenance=>get_default_port_by_proxy
  EXPORTING
    proxyclass = lc_proxy
  RECEIVING
    lp_name    = lv_port_name.


TRY.
    CREATE OBJECT lref_client_proxy
      EXPORTING
        logical_port_name = lv_port_name.
  CATCH cx_ai_system_fault.
ENDTRY.

TRY.
    CALL METHOD lref_client_proxy->z_tst_performance
      EXPORTING
        input  = in
      IMPORTING
        output = out.
  CATCH cx_ai_system_fault.
  CATCH cx_ai_application_fault.
ENDTRY.

Best Regards

Nina

Read only

0 Likes
3,155

Hi Nina,

GO to t-code Sm58..and see the error if the port is properly triggering or not..

Regards,

Prabhudas

Read only

Former Member
0 Likes
3,156

HI ,

when I enter in the debuger into this method i get pop-up for user and pass and I provide the server(where the web service is persist ) user and password

and Method below i have exception.

TRY.
    CALL METHOD lref_client_proxy->z_tst_performance
      EXPORTING
        input  = in
      IMPORTING
        output = out.
  CATCH cx_ai_system_fault.
  CATCH cx_ai_application_fault.
ENDTRY.

CX_AI_SYSTEM_FAULT

What it can be ?

BR

Nina

Read only

0 Likes
3,155

Retrieve the long text and hopefully you find out.


data: lr_error type ref to CX_AI_SYSTEM_FAULT.
data: lv_message type string.
catch CX_AI_SYSTEM_FAULT into lr_error.
lv_message = lr_error->get_text( ).

Edited by: Micky Oestreich on May 5, 2009 4:10 PM

Read only

0 Likes
3,155

Hi Nina,

Purpose

The options for error handling depend on the type of communication chosen:

· Asynchronous Communication: On the sender side, the application can only handle errors that occur when the message is being sent (for example, the outbound queue is full). You can catch and persist these errors by using the exception class CX_AI_SYSTEM_FAULT. On the receiver side, as in the synchronous case, you can define fault messages, which are then only forwarded to monitoring (and not to the sender).

If you want to define how the sender is to process asynchronous errors, see the Acknowledgments section. The Web service runtime only supports synchronous communication.

· Synchronous Communication: You can use fault messages to handle errors that have occurred on the receiver side. To confirm an error, the proxy runtime sends the fault message from the receiver back to the sender, which can then respond to it.

Process Flow

The example used here works with the XI runtime standardized structure. When using the Web service runtime, follow the same procedure to trigger an exception on the receiver side and handle it on the sender side (indicated in the source text by the comments with a hash symbol (#)). The fault message structure is defined by the WSDL description in both cases and is found in the exception class.

1. If an application on the receiver side triggers an error, the ABAP proxy runtime converts the corresponding exception class to a fault message and transfers it to the sender system.

2. In the sender system, the ABAP proxy runtime interprets the fault message and triggers the exception for the client proxy.

3. In the sender system, the application can catch and handle the exception using a Try/Catch block. Using the super exception class CX_AI_APPLICATION_FAULT you can - in a similar way to the statement WHEN OTHERS in a CASE statement - catch all remaining application errors.

see the following links for Possible ...

http://help.sap.com/saphelp_nw70/helpdata/EN/75/a55c3cff8ca92be10000000a114084/frameset.htm

http://help.sap.com/saphelp_nw04/helpdata/en/25/a45c3cff8ca92be10000000a114084/frameset.htm

Regards,

Prabhudas

Read only

0 Likes
3,155

HI Mickey

Thanks,

I use the code u write and i get this error :

SOAP:14 Unexpected element -el=definitions ns=http://schemas.xmlsoap.org/wsdl/

Do u have idea what is it?

Best Regards

Nina

Read only

0 Likes
3,155

Does look like an error in the XML. However, this is probably generated, so not sure what might cause this problem. Maybe try to regenerate the WSDL?

Read only

0 Likes
3,155

HI MICKEY,

When i create logical port i have to put in the HTTP the WSDL that i get in the WS or the endpoint that i get from SOAMANAGER ?

Another thing ,

in the operations tab i don't see any oprations , it's o.k. ?

BR

NINA

Edited by: Nina C on May 5, 2009 4:52 PM

Read only

0 Likes
3,155

Not sure. We haven't created any logical port using LPCONFIG. We did this in SOAMANAGER. So in transaction we don't have any data entered!!!

Read only

0 Likes
3,155

Hi Mickey,

How i create logical port via soamanager ?

i don't see there any place that i can do it.

BR

Nina

Read only

0 Likes
3,155

Hi Mickey,

How i create logical port via soamanager ?

i don't see there any place that i can do it.

BR

Nina

Read only

0 Likes
3,155

Second tab on first screen: Business administration, link Web Service Administration

Now Enter name of consumer proxy and press button 'GO'.

Mark the desired consumer proxy and press button 'Apply selection'.

In bottom part of screen go to the second tab 'configurations', Here's were you can Create logical ports.

Read only

0 Likes
3,155

HI Mickey,

Thanks for all the support !

When i create LP via soamanager the first 2 methods are not give any data because the

the check on the srt_lp and when i create LP via soamanger there is no entrance this table

just in SRT_CFG_CLI_ASGN ,so when i omit the first 2 methods and use just the third i get dump.

Do you have an idea what i need to do here to get the data from th WS.

Best Regards

Nina

CALL METHOD cl_srt_lp_maintenance=>get_default_port_by_proxy 
  EXPORTING 
    proxyclass = lc_proxy 
  RECEIVING 
    lp_name    = lv_port_name. 


TRY. 
    CREATE OBJECT lref_client_proxy 
      EXPORTING 
        logical_port_name = lv_port_name. 
  CATCH cx_ai_system_fault. 
ENDTRY.

TRY.

CALL METHOD lref_client_proxy->z_tst_performance

EXPORTING

input = in

IMPORTING

output = out.

CATCH cx_ai_system_fault.

CATCH cx_ai_application_fault.

ENDTRY.

Read only

0 Likes
3,155

Nina,

sort can't help you there. We have never used anything like it. I did try to find out exactly how it works at our current project, but unfortunately there is no one that was able to explain it to me. Sorry, so good luck to you in finding out.

Read only

0 Likes
3,155

Nina,

Any solution to this problem? I am experiencing the exact same message: Unexpected element -el=definitions ns=http://schemas.xmlsoap.org/wsdl/

I have previously called this web service successfully from a .NET application, so I believe the wsdl is good.

For me, the proxy class appears as an entry in SOAMANAGER. After selecting the proxy class (Apply Selection), you can try to Create Logical Port on the resulting Configurations tab. The logical port that I have already configured in LPCONFIG does not show here, so these two transactions appear to be disconnected.

If you have made further progress, please post. Thanks.