How to change dynamically the Webservice URL

Hi,
I added a webservice to my projet from a WSDL.
As my application needs to fire this webservice towards different servers, I set dynamically the URL in my code. Here is the problem. When I point to the initial server (the one I got the WSDL from), everything is fine. But when I want to fire the webservice toward another machine, my code is not taken into consideration and my application still communicates with the initial server !
I have something like:
        URL url = null;
        StuffService stuffService = new StuffService(RIOT_url, new QName("http://web.stuff.com/", "StuffService"));
        Stuff stuffPort = stuffService.getStuffPort();
        try {
            url = new URL("http://localhost:3337StuffService/Stuff?wsdl");
        } catch (MalformedURLException ex) {
            Logger.getLogger(Page1.class.getName()).log(Level.SEVERE, null, ex);
              //USE THE WEBSERVICEIs there something wrong in my code ?
Do I need to change some files in the project ?
Thanks for your help

This has nothing to do with JSF. Rather post webservice related questions at the webservice forum: [http://forum.java.sun.com/forum.jspa?forumID=331]
Back to the actual problem, are you using a webservice proxy? A proxy should be able to pick up the URL and port the request.

Similar Messages

  • Providing external url for the fqdn for webfeed returns error in eventlog that shows internal url is being used - how to change to the external url?

    I've got my Rdweb accessible on both my internal and external network by using split dns locally to resolve the external url (remote.domain.com/rdweb) to resolve and everything works fine. However users don't want to use the rdweb interface (as it is slower
    than just clicking on a rdp shortcut.
    Following the notes at http://social.technet.microsoft.com/wiki/contents/articles/14488.distribution-of-remote-apps-and-desktops-in-windows-server-2012.aspx - I've tried to set up the webfeed on a Win7+ machine but when I enter the external url that
    is protected by an SSL cert the eventlog shows that the internal address is being used and it doesn't match the certificate. - "There is a problem with this connection's security certificate.
    The remote computer cannot be authenticated due to problems with its security certificate.                        
    Security certificate problems might indicate an attempt to fool you or intercept data you send to the remote computer.                       
    Windows cannot continue setting up this connection. Contact your workplace administrator for assistance.                         
    Connection name:
    Connection URL: https://internalservername/rdweb/feed/webfeed.aspx
    How do I set the servers to use the external address rather than the internal one - i'm assuming it's similar to exchange's
    Set-webservicesvirtualdirectory command but I can't find the equivalent command documented anywhere.
    http://absoblogginlutely.net

    Hi,
    Thank you for posting in Windows Server Forum.
    Please check below mention point. 
    •  Create a relevant DNS entry in the mentioned zone to point to the RDS environment’s internal IP address
    •  Create a relevant DNS entry in external DNS to point to the firewall which is publishing RDS’s external IP address
    •  You can use the below mention script to change the FQDN of the RDP files provided by RD Web Access / RemoteApp and Desktop connection feed. 
    Change published FQDN for Server 2012 or 2012 R2 RDS Deployment
    http://gallery.technet.microsoft.com/Change-published-FQDN-for-2a029b80
    In addition please check below mention thread.
    How do I change the URL to the Remote Web Access server in Windows Server 2012?
    http://social.technet.microsoft.com/Forums/windowsserver/en-US/67dfab70-7e10-4e0b-a3c8-63ce776f2355/how-do-i-change-the-url-to-the-remote-web-access-server-in-windows-server-2012?forum=winserverTS
    Apart from this, also check the settings under; IIS in RDWeb Server as per below mention path.
    Expand the default Website >Pages >Application Settings >DefaultTSGateway >
    Enter the external address (FQDN) of the RD Gateway in the Value Field.
    Hope it helps!
    Thanks,
    Dharmesh

  • How to change dynamically the number of lines to show in time chart

    Hello all,
    I need your help for the following scenario:
    In browser is an applet available that contains a tree. Each tree node have the id. The user can select  a tree node and open a crystal report with time chart. This time chart shows values for tree node id(y-axis). The values are measurement values from database. The database table contains:
    id_field = tree node id,
    value_field = measurement value,
    and time_field.
    So, my problem is that the user can select more than one tree node. The maximum selection count is 16.
    My idea is to do something in the following way:
      1) create function ("myFunction")
      2) set function as filter
      3) add my function  (or parameters)to y axis
    For example:
    filter:
    if {@time_field} in {@time_begin_param} to_ {@time_end_param} and {@myFunction}
    "myFunction"-function:
    if ( treenode_id1 != -1 )
    then "if {@id_field} = treenode_id1"
    else if ( treenode_id2 != -1 )
    then "if {@id_field} = treenode_id1 or {@id_field} = treenode_id2"
    When the user selection is changed:
    1) in my struts action u2013 create report programmatically
    2) set parameter treenode_id1 u2013 treenode_id16 equals user selection
    3) open report
    My question is what is the correctly way to solve my problem?
    And here some concrete questions:
    1) When I set 16 parameters for y axis how can I hide unused parameters?
    2) When I'm using filter with function is the function in db request or are all data requested and then filtered?
    3) Can I add data set to my chart programmatically from my struts action?
    4) When it is possible can I add parameters to y axis also programmatically?
    5) Is it possible to change data set of crystal report without recreating the report?
    Any help is appreciated!
    (and sorry for my bad english)
    Greetings,
    Nikolas

    Hello all,
    I need your help for the following scenario:
    In browser is an applet available that contains a tree. Each tree node have the id. The user can select  a tree node and open a crystal report with time chart. This time chart shows values for tree node id(y-axis). The values are measurement values from database. The database table contains:
    id_field = tree node id,
    value_field = measurement value,
    and time_field.
    So, my problem is that the user can select more than one tree node. The maximum selection count is 16.
    My idea is to do something in the following way:
      1) create function ("myFunction")
      2) set function as filter
      3) add my function  (or parameters)to y axis
    For example:
    filter:
    if {@time_field} in {@time_begin_param} to_ {@time_end_param} and {@myFunction}
    "myFunction"-function:
    if ( treenode_id1 != -1 )
    then "if {@id_field} = treenode_id1"
    else if ( treenode_id2 != -1 )
    then "if {@id_field} = treenode_id1 or {@id_field} = treenode_id2"
    When the user selection is changed:
    1) in my struts action u2013 create report programmatically
    2) set parameter treenode_id1 u2013 treenode_id16 equals user selection
    3) open report
    My question is what is the correctly way to solve my problem?
    And here some concrete questions:
    1) When I set 16 parameters for y axis how can I hide unused parameters?
    2) When I'm using filter with function is the function in db request or are all data requested and then filtered?
    3) Can I add data set to my chart programmatically from my struts action?
    4) When it is possible can I add parameters to y axis also programmatically?
    5) Is it possible to change data set of crystal report without recreating the report?
    Any help is appreciated!
    (and sorry for my bad english)
    Greetings,
    Nikolas

  • GOS - Generic Object Services - Change dynamically the title of attachments

    Dear Experts,
    how can I change dynamically the title of the single attachment in the attachment-list of cl_gos_manager?
    I hope you can help me.
    Thanks in advance.

    Thanks for reply.
    I solved the problem by the following way:
    - Function ARCHIV_GET_CONNECTIONS for getting all linked documents
    - Showing list in popup with ALV-Grid
    - SET HANDLER handle_double_click
    - Function ALINK_DOCUMETS_DISPLAY_MIX for viewing selected document on popup
    Marco

  • How can I view the underlying URL to a hypertext link in text from galley or story mode?

    How can I view the underlying URL to a hypertext link in text from galley or story mode?

    click inside the hyperlink and open Window > Hyperlinks (in InCopy). The link is highlighted there. If you can't see it in the editable field, double-click the highlighted entry and it'll open in a dialog box.
    AM

  • I have file with 500 pages created from AutoCad file. In all pages, I have different document numbers.The file is not editable in pdf. How to change all the document numbers using "Comment" feature? Any alternate method?  alternate method? I have Adobe Ac

    I have pdf file with 500 pages created from AutoCad file. In all pages, I have different document numbers.The file is not editable in pdf. How to change all the document numbers using "Comment" feature? Any alternate method?  alternate method? I have Adobe Acrobat X Pro and Windows -7 platform.

    Yes, I just want to cover up all the pages for those particular area of document numbers.
    Nothing sensitive about it. I just want to show the correct document numbers on all pages in print out.
    So, I wanted to cover up by comments, but commenting on each page will be difficult. So, I wanted to comment the same on all pages.

  • I have a friend who is not very savvy with computers. He works on a PC. (There may be versions for pc OS versions) I use a Mac-your website will not show the PC pages to me. How can I find the proper URL to embed in a button?

    I have a friend who is not very savvy with computers. He works on a PC. (There may be versions for pc OS versions) I use a Mac-your website will not show the PC pages to me. How can I find the proper URL to embed in a button?

    Try going to the following
    Tools->Web Developer-> Page Source.
    You can also access this by way of keyboard shortcut Ctrl + U
    The View Page Source option is also available via the right-click menu by just right-clicking inside the page window & it will be the penultimate menu item.

  • HT1399 can anyone tell me how to change all the songs in my I-Tunes Library to the Graphic Equilizer setting of Bass Boost, without clicking on every single song individually to change them ?  thanks.

    Can anyone tell me how to change all the songs in my I Tunes Library to the Graphic Equilizer Setting of Bass Boost, without having to change each song individually?  Thank U.       [email protected]

    Hello guinness guzzler,
    You can set the equalizer from the View menu, which will affect any songs played in iTunes.
    iTunes 11 for Windows: Adjust the sound quality
    http://support.apple.com/kb/PH12334
    Cheers,
    Allen

  • How can we modify the distination url while migrate the personalization

    Hi All,
    I got the requirement to create a link in iSupplier home page. I have created the link using oa framework personalization and set the destination URL with the third party's test instance URL. It is available in test instance and the third party url is also the test instance url . I have to move this personalization to production. In production the same link has to open the third party's prod instance only. But i am little bit confused, how can we modify the detsination url in the personalizaed the document.
    Please suggest me if there is any generic way of modifying the link url while migrating the personalization from one instance to another instance.
    Thanks in Advance..
    Regards,
    Purushoth

    Hi,
    ---Its nt possible via personalization go for co extension
    Im not sure but pls try with below approach.
    ---In co get the webBean of OALinkBean and setDestination URL in code.
    if(Prod)
    setdestinationURL("");
    if(Testing)
    setDestinationURL("");
    Regards
    Meher Irk

  • How can I get the whole URL to my BSP Controller

    Hi,
    I need to build up a html-link with my bsp-url. How can I get the whole url to a specific controller, but without the session-id (sap(id))?
    I need something like the following:
    http://server:port/sap/bc/bsp/sap/<application>/<controller>.do
    Thank You!

    Hi Arne,
    you can create the URL with the method:
    CALL METHOD cl_bsp_runtime=>if_bsp_runtime~construct_bsp_url
       EXPORTING
          in_application_ns = ...
          in_application    = ...
          in_page           = ...
          in_parameters     = ...
        IMPORTING
          out_abs_url    = ....
    Regards,
    Rainer

  • How to change a Logical Port URL-Destination/Endpoint at Runtime

    Hi,
    i am looking for a way to change the endpoint for a webservice-call without redeploying my application. (I am using a standalone-proxy).
    In the SAP-Help from NetWeaver 2004s I found the following hint:
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/c487d701c7214db8ca7a741ba3c9d0/frameset.htm
    Configuring Logical Ports:
    Logical ports (LPs) contain the configuration of the client-side SOAP runtime, such as the access URL or security settings. These are required if Web service calls are executed using proxies.
    The Web service port is part of the WSDL description. This defines a URL where the service is to be called. As a rule, this URL is generated directly into the proxy object. However, this can cause problems whenever the proxy is transported into a system landscape (for example, from the test system into the productive system). In this case, the proxy would still attempt to call the Web service on the test server although the proxy should point to the productive system. The proxy could be re-generated or the coding could be changed manually. Due to the risk of errors with this method, the configuration data in the SAP Web Service Framework is separated from the implementation. After transport or re-deployment of the proxy, the URL and other important parameters can be adapted using a simple editor. 
    The LPs provided correspond to the Web service configurations created for the Web service.
    My Question:
    Where can I change the URL of the corresponding logical port at runtime?
    I don't want to redeploy my application !!!
    I want to change the endpoint-destination at runtime!!!
    In the Visual Administrator I can see the webservice in the "Web Services Container Service Administration". I also can see the different ports from the WebService-Configuration I made.
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/c487d701c7214db8ca7a741ba3c9d0/frameset.htm
    But it is not possible to change the "target adresses"!
    Can anybody help me finding a solution concerning my question?
    Regards
    Steffen

    You can include below method in your code and call it.
    private void UpdateConfig(string key, string value, string fileName)
    var cFile = ConfigurationManager.OpenExeConfiguration(fileName);
    cFile.AppSettings.Settings[key].Value = value;
    cFile.Save();
    Here fileName is the full path + application name (eg: c:\project\WinApp.exe)
    Adnan Amin MCT, SharePoint Architect | If you find this post useful kindly please mark it as an answer :)

  • How can I see the entire url in the address bar in Mountain Lion including the http or https?

    I recently updated Safari and now when the url of the site I am visiting shows up in the adress bar...it is minus the http or https so I am unaware fo whether the site is secure or not. How can I enable Safari to show me the entire url each and everytime I visit a webpage? Like before??

    Users can revert to the old behavior by setting '''browser.urlbar.trimURLs''' to '''false''' in '''about:config'''.<br>
    <br>
    <br>
    To change this preference:<br>
    <br>
    type about:config in the Location/URL bar and press Enter.<br>
    if you see a warning, accept (promise to be careful)<br>
    Filter: browser.urlbar.trimURLs<br>
    in lower panel, double-click that item to toggle value to false<br>

  • Setting the webservice url at run time for a execute button in adobe form

    Hi,
    I am using Data connection from the wsdl file to interact with the backend, the button generated from the data connection is of type execute which has the url of the webservice in the object property "Webservice URL" and name of the FM in the interface name. My problem is at present the form is working fine but when the same form transported to QA and PRD them the url of the webservice gets change. hence the same button wont function.
    The solution is either we do the changes manually in all the system or pass the url at run time. Please proide me the solution if there is a way to set this url in the execute button at runtime.
    Thanks in advance.
    Pooja

    Why don't you pass in the URL via an XML input file and bind a hidden text field in your form to that element in your XML? Then use javascript to modify the docReady event of the submit button to something like this:
    var url = textFieldWithURL.rawValue;
    this.event__click.submit.target = url;

  • Error when setting dynamically the target URL in receiver SOAP Adapter

    Hi,
    I'm setting dynamically (from the mapping) the target URL in the receiver SOAP adapter:
    String url = "http://mosxd30:50000/XISOAPAdapter/MessageServlet?senderParty=&senderService=DUM&receiverParty=&receiverService=&interface=SI_OA_CustomInvoiceData&interfaceNamespace=urn:repsol.com:laboratory:firma";
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/SOAP", "TServerLocation");
    conf.put(key, url);
    The receiver adapter fails with:
    "invalid content type for SOAP: TEXT/HTML; HTTP 401 Unauthorized"
    Reading weblogs, etc, the most probable cause for this is a wrong target URL, but then what I did was to set it as a fixed URL in the C.Channel, and it worked, so the URL is fine.
    In the communication channel, I'm using "Configure user authentication", with a user and password, and what I think it's happening is that if I use another different URL dynamically, the channel is ignoring the user authentication settings.
    Any ideas?
    Thanks

    I forgot to say that I've checked the SAP note "FAQ Soap adapter", and it says:
    Q: I get an authorization error "401 Unauthorized" from the adapter's servlet. What went wrong?
               A: The adapter's servlet is protected by default. You must use one of the user names assigned in security role xi_adapter_soap_message for component XISOAPAdapter. Please consult the documentation for Visual Administrator to view and change the security setting.
               The user authentication of the SOAP adapter is not part of the SOAP adapter but of the web container of the J2EE engine. The default authentication setting is defined in the web.xml descriptor file of the SOAP dapter web application. This setting may be modified from Visual Administrator with some restriction. Please refer to the security documentation for the J2EE engine.
               Please note that 710 onwards there is no Visual Administrator instead the Netweaver Administrator is to be used to assign the roles to the user to access the SOAP adater servlet.The user must be assigned one of the following roles SAP_XI_IS_SERV_USER, SAP_XI_APPL_SERV_USER, SAP_XI_DEVELOPER_J2EE, SAP_XI_ADMINISTRATOR_J2EE.
    The target URL is a sender soap adapter (the result of one interface is sent to another one via soap adapter), and it's this one which is complaining because of the authentication I think. But I don't know why it's ignoring the user authentication flag I'm using.

  • I am in Thailand and the US version I downloaded has Thai script interface - how to change ? The preference for general agent locale is already set to US Enlish

    I downloaded the US version in Thai and the interface is in Thai script - I checked the general agent locale and it is set to English US. How do I get an interface I can read ?
    == This happened ==
    Every time Firefox opened
    == I downloaded the US version in Thailand

    See:
    *https://support.mozilla.org/kb/change-firefox-behavior-when-open-file
    *http://kb.mozillazine.org/File_types_and_download_actions
    Current Firefox versions remember the download directory based upon the URL, so if the URL changes then the default folder may be chosen if there hasn't been selected a download folder before for that server.
    You can disable this feature to remember the download directory via the Boolean pref <b>browser.download.lastDir.savePerSite</b> on the <b>about:config</b> page.
    The browser.download.lastDir.savePerSite pref doesn't exist by default (it is a hidden pref), so you need to create it.
    Create a new <b>Boolean</b> pref with the name <b>browser.download.lastDir.savePerSite</b> and set the value to false.
    * http://kb.mozillazine.org/about:config
    You can delete the content-prefs.sqlite file in the Profile Folder to only remove settings stored in this file and keep the exceptions that are stored in permissions.sqlite that would be lost if you clear the "Site Preferences" via Clear Recent History.

Maybe you are looking for

  • While Activating the Object(0GL_Account) is locked with Conversion

    Hi All,    Please provide the solution that when am trying toActivate or to edit the object 0GL_account. It is not getting activated and throwing an error.Am facing the folowing error: An error occurred in the program:ORA-20000: Insufficient privileg

  • How to transfer photos from a camera chip to the Mac Pro Desk Top.

    How to transfer photos from a camera chip to my Mac Pro Desk Top?

  • Using multiple values of APPDIR

    Hello Team, I have a new requirement whose explanation is below: Prepare a UBBCONFIG/TUXCONFIG file in such a way that for each server Tuxedo first pick up the EXE from location */appdev1/bin* . If EXE is not found at first location then it should lo

  • Authorization to save plan data

    Hi Expert, I have one requirement where in I need to give authorization to user to save plan data. currently we have designed & built role based authorisation. e.g. specific country user with specific role will access particular report & save plan da

  • ATTEMPTED_EXECUTE_OF_NOEXECUTE_MEMORY

    There is a severe problem in installing the kaspersky antivirus-2012 in my pc which has windos 8 operating system. I try to reinstall many times and i get same message called "attempted execute of noexecute memory". What should i do to get rid from t