cancel
Showing results for 
Search instead for 
Did you mean: 

How to change the web service target address dynmically in the webdynpro

Former Member
0 Kudos

Hi All,

I am using the tibco web service. For this theya re giving the wsdl file and they are not providing the web service url. They are providing only the wsdl files.

I imported the wsdl thru web service model, and i am able to get the required information from the service.

When i tried the same with the adaptive it did not work. When checked for the adative web service model, we should have a url of the web service. Which we dont have so we started using the web service model.

Everything is working. The problem is how to put the code in to QA and production.

As for Qa and procudtion, wsdl file changes because the destination ip address will be different in three environments.

If so we have to intervene in each stage of implemenation and do the necessary model inport, mappings,etc. Which client is not intrested.

We can change the detaination url in the targer address of the web service.

Can anybody tell me how to do this from the code dynamicaaly.Please provide me any inputs as this is stopping the whole project.

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

As for Qa and procudtion, wsdl file changes because the destination ip address will be different in three environments.

If so we have to intervene in each stage of implemenation and do the necessary model inport, mappings,etc. Which client is not intrested.

To resolve the above issue create destinations for both in the Visual Admin and use this while importing your model.

Regards

Ayyapparaj

Former Member
0 Kudos

Hi Ayyapparaj,

The Visual Admin Destinations can be used without Adpative Web Services? If yes i agree that is the better solution.

Best regards

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Are you using Adaptive Web Service Model? You can see it: https://www.sdn.sap.com/irj/sdn/wiki?path=/display/wdjava/faq-Models-AdaptiveWebService&

Go to "How can Web Service Invocation Settings be modified programmatically?"

See setEndpointURL method from com.sap.engine.services.webservices.espbase.client.api.HTTPControlInterface

Best regards

Former Member
0 Kudos

Hi Isaias Cristian,

Thanks for the reply.

But I am using the web service model. I looked in to class you have provided. It has set Endpoint url method.

Can you let me know how it applies in my project. In my project,

1. I imported the wsdl file as physical file and created the model.

2. Mapped the request node to my component controller

3. Created the request object.

4. Binded the request object to the model class.

5. Set the required things to the request object

6. execute the model.

7. Get the repsose object.

Please let me know which step the http interface fits in above steps mentioned.

How to link the httpcontrolinterface in thsi context.

Thanks

Supriya

Former Member
0 Kudos

Hi Venkata,

I think that you need to change the endpoint before the point 6.

Example: Read configuration about the endpoint, before execute the model.

I haven't in this moment, a version 7 to make a test, because my environment is with CE, so i can to it only with Adaptive Web Service Model.

Try to verify if on you Request object have a method to wdSetInvocationModifier or similar.

Best regards

Former Member
0 Kudos

Hi,

There is a method called setEndpointurl and getEndpointUrl method.

I tried using the getEndpintUrl to print the target address. But i am getting null value.

I am doing this on the request object.

Please help me as this is topping my project totally.

Thanks

Supriya.

Former Member
0 Kudos

Hi,

Have you try use the setEndpointUrl, maybe its will be used if is setted.

Best regards

Former Member
0 Kudos

Hi,

I tried i did not work. Can you please let me know whether there is any other work arpund for this.

Thanks

Supriya

Former Member
0 Kudos

Hi,

Unfortunately i don't know if is possible another way, maybe its is possible only with Adaptive Web Service Model.

Can't you use the Adaptive? The Ayyapparaj make a good suggestion that can be used, but i think that is possible only with Adaptive.

If i did another way i show to you. If i can, i will make a test today.

Best regards