cancel
Showing results for 
Search instead for 
Did you mean: 

JCo destination error while executing the webservice model

0 Kudos

Hi,

I have explained what I have done so far and whats my issue right now.

My requirement is calling a PI interface (exposed as webservice) from webdynpro for java and setting some parameter value to the PI interface based on which our functional flow will continue.

Done so Far :

1. Created a webdynpro for java application using NWDI.

2. received the WSDL file of the PI interface and imported as "Adaptive webservice model" into webdynpro.

3. used the model and set the parameters to PI interface and executed the model.

4. I have created JCO destinations in the source system (where the application runs) to communicate to the PI system. A special user has been created and assigned in the connection for communicating.

5. Also I have created the "Dynamic Webseviceproxies" in visual admin with the same name as the JCO destinations. It had a property "URL" for which I have tested with providing both the PI server URL (Http://<Hostname>:<Port no>) and also the complete webservice URL (Which calls the WSDL file directly)

when I run the application, I get the following error.

1. Exception on creation of service metadata for WS metadata destination 'WD_RFC_METADATA_DEST' and WS interface '{<Interface Name>'. One possible reason is that the metadata destination 'WD_RFC_METADATA_DEST' has not been properly configured; check configuration.

after some exception the next error follows

2. Invalid Response Code 403 while accessing URL: <The URL which I have provided in the webservice proxy in Visual admin tool> Response Message: Forbidden.

after some lines of exception from PI server the next error follows.

3. Error: You are not authorized to view the requested resource

My Question :

1. Do I miss anything in Configuration?

2. Is my way of approach wrong?

3. Any additional authorization needed?

Kindly provide some ideas and inputs.

Regards,

Mahendran B.

Accepted Solutions (1)

Accepted Solutions (1)

junwu
Active Contributor
0 Kudos

jco destination is not involved in ws model execution.

0 Kudos

Hi,

While we are importing the webservice model, it is asking for the Logical destinations and what it should be? the same as like when we are importing the RFC from ABAP system.

Do I need to try importing without the logical destination??

Thanks,

Mahendran B.

Edited by: Mahendran Balasubramani on Mar 9, 2012 12:22 PM

junwu
Active Contributor
0 Kudos

what's the version of your nw?

p330068
Active Contributor
0 Kudos

Dear Mahendran

JCO destination will not used for the Web Service Model. While creating the webservice model, you need to use the logical destination which you have created in the Visual Admin.

Please refer to the and verify currently used webservice logical destination

You can also refer to

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/900bbf94-a7a8-2910-e298-a651b4706...

Hope it will helps

Best Regards

Arun Jaiswal

0 Kudos

Hi Arun,

Thanks for your reply. The links were very helpful. I have drafted my understanding below to make myself clear.

1. Import the WSDL file as model and while importing we need to provide the logical destination (which we created in Visual admin under Webservice proxy).

2. The URL to be given in both the destination configuration is WSDL file location URL in PI system.

3. A dedicated user has been created to communicate between PI and portal server. (I presume no authorization or roles is needed for this user or is there any roles to be assigned in PI server?).

Correct me if I am wrong.

Thanks,

Mahendran B.

p330068
Active Contributor
0 Kudos

Dear Mahendran,

Thanks, you can all the points is currect. You will have URL, userid and password for creating the logical destination.

If you don't want to create logical destination then you can use the doModifyInvocation method and pass the webservice URL as port. Apart from passing port, you need to pass import parameters like (Service Userid and Certification Key/password ) for execution if it is not anonymous access.

You can use properties file for storing host, userid or certification key/password in KM or other way.

Please refer to the below link.

http://wiki.sdn.sap.com/wiki/display/WDJava/FAQ+-+Models+-+Adaptive+Web+Service

http://scn.sap.com/docs/DOC-2542   : Have a look at page number 10

Hope it will helps

Best Regards

Arun Jaiswal

0 Kudos

Hi Arun,

Due to system unavailability I couldnt check the solution what you have provided. today only I have checked again with the documents you have provided. But still the error exisits as I said earlier in this forum. A strange thing is that, I use Webservice Proxy to communicate with PI system. Also a dedicated user has been created and their credentials has been entered in the Webservice proxy. But when ever I execute the Model from Webdynpro for Java, It uses my user ID to communicate. I dont know whats wrong. I have mentioned the error message below.

********************************************************************

Returned destination sap.com/DynamicWSProxies/<Webservice proxy>, type WebService to user <My User ID>. (See note 1161197 for additional information)

*********************************************************************************************

Pls let me know if you have any idea on this error.

Thanks,

Mahendran B.

0 Kudos

Hi Arun,

The issue has been solved and Now I am able to communicate the PI interface. The issue was basically with the authorization for the dedicated user created for webservice proxy communication. after assigning the role SAP_XI_ADMINISTRATOR_J2EE in PI to the user, the communication flow is smooth.

Thanks so far your help. Meet you again in some other issue

Thanks,

Mahendran B.

Answers (1)

Answers (1)

ErvinSzolke
Product and Topic Expert
Product and Topic Expert
0 Kudos

Please note that I moved this discussion to the WebDynpro Forum as I believe this is not an NWDI related issue.

Ervin
NWDI Forum Moderator