on 05-24-2007 5:14 PM
Hi All,
I have some trouble with the Webservice model.
First of all, it works perfectly, and I can use it.
Then I would like to change dynamically the server and the port before the execution.
So I did this:
...modelObject().setInvokerProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, "http://server:port");
But it seems that nothing has changed, this property doesn't seem to be used during the execution.
I looked into the generated class ..._Model() when you create the model according to the webservice. Into this java class, the complete url of the webservice is stored like:
private static final String DESIGN_TIME_WSDL_URL = "http://<server>:<port>/........?wsdl&style=default&mode=standard";
Hopefully it is possible to change it dynamically !?
Thanks a lot for your help and support.
Best regards,
Emmanuel.
Hi Emmanuel,
This can be done by specifying Destination for Web services.
Open you visual adminsitrator located at: C:\usr\sap\<system ID>\JC00\j2ee\admin\go.bat
open this go.bat file. It will open visual adminstrator.
Here, use Destinations under server->services.
In Destinations, you have option for web services. Create a destination for your web servcie here.
Now, you can specify htis destination in your webdynpro code efore calling web service.
write following code:
wdcontext.current<web service model node>element().modelObject()._setEndpoint(<destination name>);
after this execute your model.
It will work.
Let me know if you have any issues in it.
Regards,
Bhavik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bhavik,
ok I have seen this configuration in some documents.
Do you mean it is impossible to do it in runtime without creating a destination into the j2ee visual admin ? if yes it's pity thing ..
This WebService will be deployed into some customer system, each time a configuration will have to be done ??!! I can beleive this ... I would prefer to do it in runtime only ...
Something else, with my version 7.1 no _setEndPoint(..) method exist.
Thanks for your support and Best regards,
Emmanuel.
To get the final point.
Display properties of the webservice model in your IDE.
Give a name to defaultExecutionDestination and to defaultMetadataDestination, could be the same.
that's all for your WD.
Go into the portal to ... nwa/webservice
Then add a WS destination with the same name as above and the url choose http://<server>:<port>/inspection.wsil or the full WSDL if doesn't work.
helpfull link : https://www.sdn.sap.com/irj/sdn/wiki?path=/display/wdjava/faq-Models-AdaptiveWebService&
Emmanuel.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hallo,
see <a href="https://wiki.sdn.sap.com/wiki/x/IhU">SDN Wiki Page - WD Java - Models - Adaptive WS Models</a>.
Regards, Bertram
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
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.