URL Genetaror Service

Hi people,
I want my custom Java iView to call another iView by using the request.redirect() method in doOnNodeReady(). For this, I seached SDN to understand how to build the URL for the target iView at runtime. I am trying the following code:
IUrlGeneratorService urlGeneratorService = null;
try{
     <b><u>urlGeneratorService = (IUrlGeneratorService)ResourceFactory.getInstance().getServiceFactory().getService(IServiceTypesConst.URLGENERATOR_SERVICE);</u></b>
} catch (Exception re){
     System.out.print(re.toString());
IPortalUrlGenerator portalUrlGenerator = null;
ISpecializedUrlGenerator specializedUrlGenerator = urlGeneratorService.getSpecializedUrlGenerator(IPortalUrlGenerator.KEY);
if(specializedUrlGenerator != null && specializedUrlGenerator instanceof IPortalUrlGenerator){
     portalUrlGenerator = (IPortalUrlGenerator)specializedUrlGenerator;
     myNewParameter = portalUrlGenerator.generatePortalComponentUrl(request, myParameter);
However, I am always receiving a NullPointerException from the line in bold. What I am doing wrong?
Thanks in advance
Fernando Urzedo

Hi Pooja, hi Fernando,
@Pooja: The code you have posted also uses a deprecated method to access the service. I have to admit that the links I referred to within the same thread do this, too (anyhow, you just recreated (deprecated) content already existing on SDN).
See https://media.sdn.sap.com/javadocs/NW04/SPS15/ep/com/sapportals/portal/prt/component/IPortalComponentRequest.html#getService(java.lang.String) - The non-deprecated way is PortalRuntime.getRuntimeResources().getService()
@Fernando: If you want to use the portal URLGenerator, you have to access it the way described above.
But in your use case, you can use the KM URLGenerator for generating the KM-nav-component URL:
IURLGeneratorService urlGenService = (IURLGeneratorService) ServiceFactory.getInstance().getService(IServiceTypesConst.URLGENERATOR_SERVICE);
redirectStartURI = urlGenService.getRelativeUri(PathKey.NAVIGATION_PAGE).toExternalForm();
Hope it helps
Detlev<b></b>

Similar Messages

  • Mass upload Create External doc URLs using Services for object-Inspmethod

    Hi All,
    Services for object is not active during SHDB recording or ECATT recording in order to mass update Create External doc URLs using Services for object.
    Any body know how to Upload this for any master data 9Insp plan/Material master etc..)

    Developing the program

  • Mass upload Create External doc URLs using Services for object-Materialmast

    Hi All,
    Services for object is not active during SHDB recording or ECATT recording in order to mass update Create External doc URLs using Services for object.
    Any body know how to Upload this for any master data ex.Material master.

    ok

  • URL Generator Services

    Hello,
    when I try to change the protocoll in "Host" in the "URL Generator Services" (under "Global Services") from http to https, the TREX monitor shows an SSL error by crawling new documents (but then the links in email notifications are working correctly with the right URLs with https). Because the TREX is behind some firewalls I do not want to configure any additional SSL connection, only the portal plattform runs on SSL.
    Is it possible to edit the links in email notification without changing the host parameter and without configuring SSL for TREX? Or are there other possibilities to solve this problem?
    Regards,
    Frank

    Hi Frank,
    there is a solution for your problem:
    Just upgrade to SP2 Patch 5 or newer (SP) version. There you are able to create different URLs
    for the Backend systems (for example TREX) and for the normaly Portal users using the new parameter Alternative Host under "URL Generator Service".
    Under "Host" you will configure "https://..." so that you get the notifications mails with https links, and under "Alternative Host" you configure "http://.." so that TREX will avoid authentication for SSL.
    Hope this information was usefull to you,
    Robert

  • URL shortening services

    Our enterprise firewall blocks outbound access to URL shortening services like bit.ly. Please avoid using these in posted material, especially "official", SAP/SCN-sponsored/provided material.

    Hi
    Does your enterprise only block only bit.ly shorten URL or any kind of shorten URLs? We used spr.ly shorten URL services in all of our SCN social media channels. Hopefully, you can access through these links.
    Thanks
    Palm
    SCN Social Media Team

  • Adding URL to Services for Object for Invoice

    Hi Friends,
    I need to add a URL to 'Services for Object' drop down on the menu bar (so that it will appear in 'Attachment List' after clicking on which it will navigate to the link).
    I am not sure but will SWU_OBJECT_PUBLISH be useful? How to use this for URL insert?
    Can anyone please tell me how it can be achieved?
    Thanks in advance for your help,
    Sagar

    hi
    check out the function modules BDS_BUSINESSDOCUMENT* in transaction OAOR.
    hope this helps
    regards
    Aakash Banga

  • URL Generator Service

    Hello,
    I have a question concerning the URL Generator Service.
    Due to problems with TREX I changed the host in the URL Generator Service from <i>http://<%hostname%></i> to <i>http://enterpriseportal.mycompany.com</i>. This fixed the problem with TREX, but I am wondering, if <%hostname%> is a parameter with is resolved at this point and should be defined somewhere else or if this is the right place for defining the host.
    Kind regards,
    dominik

    Hi Dominik,
    the name you give at the parameter <i>Host</i> should be the one of the load balancer. Your example is fine, though. This URL is taken for the access links of all KM documents and more.
    For TREX to access KM you can specify another hostname by setting the parameter <i>Alternative Host</i> if you have problems with the load balancer URL.
    See also <a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/7d/236cfa17034a37a439dc392ec59eb0/frameset.htm">http://help.sap.com/saphelp_nw2004s/helpdata/en/7d/236cfa17034a37a439dc392ec59eb0/frameset.htm</a>
    So if you have no more problems with TREX now anymore, you can leave the setting like you did. It is perfectly the right place
    Regards,
    Sascha

  • Help with alternative URL for service endpoint

    I'm trying to define a WSDL service that is behind a firewall/load balancer.   By default, the wsdl service-endpoint is defined using the same URL prefix as the wsdl page itself.  (e.g https://virtual_servicename...)  However, we need to have the service endpoint use a different prefix as it does get converted by the load-balancer.  (i.e. a firewall rule passes the traffic between the real host names, no virtual address is used)
    Question 1) -- should I be using the transport settings tab in SOAMANAGER config to create an Alternative Access URL for Transport Binding?   (I'm not sure transport binding and service endpoint are the same thing.)
    If yes to Q. 1, then question 2) -- when I attempt to create an entry in this area using the correct URL, it ends with the following error:  "SRT Framework exception: ICF: Error when creating alias node. Unknown"  
    Any pointers what alias node is needed and where to defined it?
    Thanks in advance.

    Hi Joseph,
    CHECK THE BELOW
    GOTO TCODE: SICF
    EXECUTE->SELECT DEFAULT HOST->SAP->BC->SRT->RFC->SAP----HERE YOUR WEBSERVICE PATH , SO THAT YOU HAVE TO GET EVERY TREE PATH SHOULD ENABLE AND ACTIVE IN MENTION ABOVE. OTHERWISE U CANT ACTIVE THE BINDING AND CANT CREATE THE LINK.
    GET THE ACCESS FROM THE BASIS FOR YOUR USERNAME AND YOU ABLE TO DO THE CONFIGURATION .
    PLEASE REVERT IF ANY DOUBT

  • Documentation URL in Services Registry.

    Hi,
    We are trying to use the Services Registry of SAP (in PI 7.1) for registering Services, however find a major challenge in terms of updating the documentation URL.
    For Non SAP services we can update the same in the provider system and thus while registering the service the URL appears. However could not find a way to do the same for SAP services (custom as well as Enterprise Services). there was some help provided in note 1319742 which is not visible in SOAMANAGER for the ECC system that we have (6.0 EhP4), also the transaction 'WSDOCU_SERVER' did not help (service published without the documentation URL even after maintaing a URL).
    Any help on this will be appreciated.
    Regards,
    Avishek.

    check for this sap note 1120842 - Publish WS Documentation Link during Service Publication.
    - julius

  • Problems using XML URL data service on Jdev

    Not sure if this is the right forum for this but couldn't find specific forum on XML.
    I"m using Jdev Studio Edition Version 11.1.1.4.0 (Win 2008 Server). I'm followng the tutorial (http://www.oracle.com/technetwork/developer-tools/jdev/ccset10-all-091120.html) which treaches how to create a URL service to read RSS feeds.
    My real question is about any guidance in creating proper XML schemas. I've read the documentation from wr.org but I"m still not sure about any key rules to follow for creating XML schemas and if XML schemas are a muust for using XML DB to read content from the internet.
    Following the instructions I created the following XML schema:
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns="http://www.example.org"
    targetNamespace="http://www.example.org"
    elementFormDefault="qualified">
    <xsd:element name="rss">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="channel" type="channel"></xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:complexType name="channel">
    <xsd:sequence>
    <xsd:element name="lastBuildDate" type="xsd:string"></xsd:element>
    <xsd:element name="title" type="xsd:string"></xsd:element>
    <xsd:element name="link" type="xsd:string"></xsd:element>
    <xsd:element name="description" type="xsd:string"></xsd:element>
    <xsd:element name="managingEditor" type="xsd:string"></xsd:element>
    <xsd:element name="language" type="xsd:string"></xsd:element>
    <xsd:element name="item" type="item" minOccurs="0" maxOccurs="100"></xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="item">
    <xsd:sequence>
    <xsd:element name="title" type="xsd:string"></xsd:element>
    <xsd:element name="link" type="xsd:string"></xsd:element>
    <xsd:element name="description" type="xsd:string"></xsd:element>
    <xsd:element name="pubDate" type="xsd:string"></xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:schema>
    When trying to run the page I get the following trace:
    Target URL -- http://127.0.0.1:7101/Application1-Project1-context-root/faces/newsPage.jspx
    Tag: Definition
    <XMLHandler> <parseDataStream> Failed to create the DOM tree for the source. Resaon: Expected '>'.
    <XMLHandler> <parseDataStream> Failed to create the DOM tree for the source. Resaon: Expected '>'.
    <XMLHandler> <parseDataStream> Failed to create the DOM tree for the source. Resaon: Expected '>'.
    <XMLHandler> <parseDataStream> Failed to create the DOM tree for the source. Resaon: Expected '>'.
    <XMLHandler> <parseDataStream> Failed to create the DOM tree for the source. Resaon: Expected '>'.
    <XMLHandler> <parseDataStream> Failed to create the DOM tree for the source. Resaon: Expected '>'.
    <XMLHandler> <parseDataStream> Failed to create the DOM tree for the source. Resaon: Expected '>'.
    <XMLHandler> <parseDataStream> Failed to create the DOM tree for the source. Resaon: Expected '>'.
    Any idea what I am doing wrong? Thanks, J

    Hi Jay,
    Most of XML parsers mainly support UTF-8 encoding by default. So if the source is Windows 1252 encoded, the parser might fail.
    There are two potential solutions (including but not limited to):
    1) Use encoding tools/functions to translate the source with UTF-8 encoded.
    2) Change ADF configurations to see if ADF can deal with Windows 1252 encoded source. Also people in ADF forum may have suggestions from their point of view.
    Best regards,
    Rucong Zhao
    Oracle Berkeley DB XML

  • When i go to gmail it says "Not Found. The requested URL/accounts/service login was not found on this server" but it used to work and I need help getting it to work again.

    I used to go to gmail all the time. Now it says "Not Found" whenever I go to gmail. Is there a reason for this and is there a way I can access gmail again?
    == URL of affected sites ==
    http://gmail.com

    You've been really helpful and I did what you said, but I'm still having a problem. I click on "tools", then click on "Add-ons", and when the box opens I click on "extensions". This is the problem" In the "Add-on" box under "extensions", it says "'''Microsoft.NET Framework Assistant''' 1.0. Adds ClickOnce support and the ability to report installed .NET versions to the web server. '''Not compatible with Firefox 3.6.3.'''" And underneath there are 3 boxes to click on: "options", "enable", and "uninstall". But it won't let me click on any of them. Also, the first thing before the text I just copied, is a red explanation point. This is the only thing that comes up under "Extensions". Any ideas? I'd appreciate any input. Thanks

  • I want to export acquired data via XML to a remote URL/web service. Is there some online reference for EXACTLY what XML features are available in 6.1?

    Is there any online reference to the XML methods available in 6.1?
    I would like to set up a LabView system that acquires data from local hardware, and then sends acquired data as XML "packets" to a remote web service. I can't seem to find any online reference to this when I search the site. I don't want the "gee golly 6.1 is cool" marketing stuff. Just a simple technical reference to abilities.

    If you're looking for more technical information about all the new features of 6.1, try the LabVIEW 6.1 Upgrade Notes. Here's what they say about the XML functions:
    "Use the Flatten to XML function located on the Functions»Advanced»Data Manipulation palette to convert any LabVIEW data type to the XML format according to the LabVIEW XML schema. Use the Unflatten from XML function located on the same palette to convert a data type in the XML format into LabVIEW data.
    For these conversions, LabVIEW uses a predefined XML schema that is described in labview\help\LVXMLSchema.xsd."
    Kelly Holmes
    LabVIEW Documentation
    Kelly H
    LabVIEW Documentation
    National Instruments

  • Unable to register URL services

    I am not able to register URL Sample Services
    JPDK 3.0.9 Portal 3.0.9.8.1
    jserv.log
    [23/10/2001 15:39:19:154 CEST] urlsample/Entering init
    [23/10/2001 15:39:19:154 CEST] urlsample/Debug Level is : 5
    [23/10/2001 15:39:19:154 CEST] urlsample/Added debuglevel to
    session storage.
    [23/10/2001 15:39:19:184 CEST] urlsample/register : Entering
    register() method ...
    [23/10/2001 15:39:19:184 CEST] urlsample/register : No
    subscriberDetails tag found. Continuing ...
    [23/10/2001 15:39:19:194 CEST] urlsample/Action = 1
    [23/10/2001 15:39:19:194 CEST]
    urlsample/java.lang.IllegalStateException: User not passed in
    request.
         at
    oracle.portal.provider.v1.http.ServletProviderRequest.getProvider
    User(ServletProviderRequest.java:237)
         at oracle.portal.provider.v1.http.HttpProvider.service
    (HttpProvider.java, Compiled Code)
         at javax.servlet.http.HttpServlet.service
    (HttpServlet.java:588)
         at org.apache.jserv.JServConnection.processRequest
    (JServConnection.java:435)
         at org.apache.jserv.JServConnection.run
    (JServConnection.java:290)
         at java.lang.Thread.run(Thread.java:479)
    [23/10/2001 15:39:19:435 CEST] urlsample/Traverse WebDB request
    tree:

    Quick question
    Check correctness of provider.xml, by typing
    http://myserver.mydomain.com:port/servlets/<provider_name> in web
    browser. (After modifying jserv.properties and zone.properties )
    This should display Test Page with provider_name.
    The same download is working fine for me.

  • Can't view dashboard with relative url in BI 4 Launchpad

    I created a dashboard using BIWS connections and I am able to preview the dashboard when i have the full path of Web Service URL but when I use the relative url and publish to launchpad I get the "Cannot access external data......, Unable to load URL:/dswsbobje/Services/Session..." error message. Any ideas on how to solve this?
    Thanks

    Are you trying to preview the dashboard from dashboard designer tool ?  If yes, then you must have a full web service url, otherwise, it will not be able to resolve the server and port.
    But, if you use relative URL and export the same to BO repository, you will be able to view the same by logging into BI Launchpad. There it can resolve the server name and port from existing session.

  • Cisco ASA 5505 и URL filter

    Здравствуйте знатоки Cisco!
    Обчитавшись про блокировку URL (
    https://supportforums.cisco.com/docs/DOC-21128#__URL_______URL__  )
    решил настроить это добро, благо подвернулась ASA 5505 с Sec+
    Раньше работал с tik'ами поэтому  в  Cisco новичек обчитанный, так что сильно не пинайте
    Что хочу от железки:
    0/0 - internet
    0/1 - lan1 (этим доступно все)
    0/2 - lan2 (этим только yandex.ru, mail.ru)
    задача казалось бы тривиальная но в целях эксперимента я себе ее временно еще упростил до такого состояния:
    0/0 - outside
    0/1 -  inside (этим только yandex.ru, mail.ru)
    и получил вот такой конфиг:
    Hello experts on Cisco!
    I am Read about URL blocking (
    https://supportforums.cisco.com/docs/DOC-21128# __ URL _______ URL __)
    I decided to adjust this good, the benefit ASA 5505 with Sec +
    Earlier the beginner obchitanny so strongly don't kick worked with Tik's therefore in Cisco
    That I want from a piece of iron:
    0/0 - internet
    0/1 - lan1 (it all is available)
    0/2 - lan2 (to these only yandex.ru, mail.ru)
    the task would seem trivial but for experiment I to myself temporarily still simplified it to such condition:
    0/0 - outside
    0/1 - inside (to these only yandex.ru, mail.ru)
    also I received here such config:
    ASA Version 9.1(3)
    hostname ciscoasa
    enable password ххххххххххххххх encrypted
    names
    interface Ethernet0/0
    switchport access vlan 2
    interface Ethernet0/1
    interface Ethernet0/2
    interface Ethernet0/3
    interface Ethernet0/4
    interface Ethernet0/5
    interface Ethernet0/6
    interface Ethernet0/7
    interface Vlan1
    nameif inside
    security-level 100
    ip address 192.168.2.1 255.255.255.0
    interface Vlan2
    nameif outside
    security-level 0
    ip address dhcp setroute
    regex allowex1 "mail\.ru"
    regex allowex2 "yandex\.ru"
    ftp mode passive
    object network obj_any
    subnet 0.0.0.0 0.0.0.0
    access-list user-acl extended deny tcp host 192.168.2.5 any eq www
    access-list user-acl extended permit tcp any any eq www
    pager lines 24
    mtu inside 1500
    mtu outside 1500
    no failover
    icmp unreachable rate-limit 1 burst-size 1
    no asdm history enable
    arp timeout 14400
    no arp permit-nonconnected
    object network obj_any
    nat (inside,outside) dynamic interface
    timeout xlate 3:00:00
    timeout pat-xlate 0:00:30
    timeout conn 1:00:00 half-closed 0:10:00 udp 0:02:00 icmp 0:00:02
    timeout sunrpc 0:10:00 h323 0:05:00 h225 1:00:00 mgcp 0:05:00 mgcp-pat 0:05:00
    timeout sip 0:30:00 sip_media 0:02:00 sip-invite 0:03:00 sip-disconnect 0:02:00
    timeout sip-provisional-media 0:02:00 uauth 0:05:00 absolute
    timeout tcp-proxy-reassembly 0:01:00
    timeout floating-conn 0:00:00
    dynamic-access-policy-record DfltAccessPolicy
    user-identity default-domain LOCAL
    http server enable
    http 192.168.2.0 255.255.255.0 inside
    no snmp-server location
    no snmp-server contact
    snmp-server enable traps snmp authentication linkup linkdown coldstart warmstart
    crypto ipsec security-association pmtu-aging infinite
    crypto ca trustpool policy
    telnet timeout 5
    ssh 192.168.2.0 255.255.255.0 inside
    ssh timeout 5
    ssh key-exchange group dh-group1-sha1
    console timeout 0
    dhcpd auto_config outside
    dhcpd address 192.168.2.5-192.168.2.254 inside
    dhcpd enable inside
    threat-detection basic-threat
    threat-detection statistics access-list
    no threat-detection statistics tcp-intercept
    username sudo password ххххххххххххххх encrypted privilege 15
    class-map allow-user-class
    match access-list user-acl
    class-map type inspect http match-all allow-url-class
    match not request header host regex allowex2
    match not request header host regex allowex1
    policy-map type inspect dns preset_dns_map
    parameters
      message-length maximum client auto
      message-length maximum 512
    policy-map type inspect http allow-url-policy
    parameters
    class allow-url-class
      reset
    policy-map allow-user-url-policy
    class allow-user-class
      inspect http allow-url-policy
    service-policy allow-user-url-policy interface inside
    prompt hostname context
    no call-home reporting anonymous
    Cryptochecksum:30b6a9707e7bbe0c8bb43ce4c9ecd1af
    : end
    192.168.2.5 - это мой хост с которого я тестирую блокировки
    в общем не блокирует и вот что интересно ..... с адреса
    192.168.2.5  которому предназначается блокировка я открываю яндекс .... открывается, открываю гугл, не открывается, в яндексе пишу поисковый запрос гугл, открывает ссылки среди которых есть гугл, жму ссылку - открывается подлый гугл. я в шоке
            Даже не знаю как тут быть, может есть знающий человек который подскажет как решить данный вопрос.
    192.168.2.5 - it is my host from which I test blocking
    generally doesn't block and here that is interesting..... from the address
    192.168.2.5 to which blocking I intends I open Yandex.... opens, I open Google, doesn't open, in Yandex I write search inquiry Google, opens links among which there is Google, press the link - mean Google opens. I shocked
             At all I don't know as here to be, the knowing person who will prompt as can eat to solve the matter.

    Hello Vasily,
    Here is your problem:
    class-map type inspect http match-all allow-url-class
    match not request header host regex allowex2
    match not request header host regex allowex1
    policy-map type inspect http allow-url-policy
    parameters
    class allow-url-class
      reset
    policy-map allow-user-url-policy
    class allow-user-class
      inspect http allow-url-policy
    You are saying Anything that does NOT match what you have on the class-map it will get denied.
    So what's on the class-map gets allowed but the rest gets blocked.
    That's it
    You can eat and rest now hehe
    Rate all of the helpful posts!!!
    Regards,
    Jcarvaja
    Follow me on http://laguiadelnetworking.com

Maybe you are looking for

  • Createtablespace.sql is creating tablespaces in wrong sid

    Hi, We are in the process of performing system copy of EHP4 for TDMS shell creation using standard system copy process as suggested by sap. During export while SAPInst asked for Import Migration Directory we provided the export dump of target system

  • 3.1 now can't turn off passcode

    Before updating, I had the passcode set for 1 hour (I knew I needed some protection in case the phone was lost/stolen but I didn't want to unlock the phone all day long). Since the update, my options for passcode time is limited to 5 minutes and less

  • Import from catalogue failure

    when i try to import from catalogue, the files i want to import are grayed out. How comes and how to fix this?

  • IChat Tiger 3.1.4 (v432) resets my DSL modem/router

    iChat has always worked untill one month ago on old speedtouch home. Frequent disconnects in the middle of a video conference. Now I have ne new modem/router form my provider, Speedtouch 546, and have internet connection. iChat can start up and conne

  • I don't want all my devices to have the option to send

    I have  2 iphones and 2 ipads all on the same iCloud acount. I do not want the option for any of the devices on my account to send & receive messages from any # or ID that is associated with my iCloud account. How do I change this?