Application Development 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: 

webservice logical port

joachimvanpraet
Active Participant
0 Kudos
104

Hello,

I have a webservice that reads information out of a device connected to a PC.

When a function is called, I want to execute the webservice located at the PC who called the function.

Is it possible to change the url parameter of the logical port at runtime or do I have to create a Logical port for all my (300) destinations ?

kr,

Joachim

2 REPLIES 2

Former Member
0 Kudos
50

You can set Endpoint of your Webservice model from your code dynamically using following code:

wdContext.current<Node>Element().modelObject()._setEndPoint("<Your URL>");

You have to write this code before executing the model for webservice.

It will set your endpoint dynamically.

You can also set your username and password for Proxy settings dynamically here.

0 Kudos
50

This is for webdynpro for java...

I need a solution for the ABAP Part.

this is how I create my proxy object:

TRY.

CREATE OBJECT proxy

EXPORTING

logical_port_name = 'LP00'

.

CATCH cx_ai_system_fault .

ENDTRY.

LP00 is going to a predefiened URL, I want to change this at runtime....

Is it possible?

gr,

Joachim