webMethods

 View Only
Expand all | Collapse all

DSP invoke of a WmRoot service

  • 1.  DSP invoke of a WmRoot service

    Posted Tue January 20, 2004 07:30 PM

    I am trying to display the time a package was published using a DSP page. This DSP page is being called form a web page on a seperate server, and the users who would access this information would not have a wM server account. Here is what I do…

    -Created a service that calls wmRoot.server.packageInfo and WmRoot.server.packageList.
    -Output of this service is name value pairs (package/time)
    -DSP page invokes this service and displays the output
    -Both the service AND the dsp page were set to anynomous
    -If the dsp page is NOT set to anynomous, then I get the wM server admin popup box (and see correct results in the dsp).

    How can I make this service and dsp completely anynomous so any user can access this? I have tried just about everything…any help would be great…


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 2.  RE: DSP invoke of a WmRoot service

    Posted Tue January 20, 2004 08:16 PM

    I’m not sure how you went about setting your DSP page to anonymous, but normally, this is done not by the developer tool (like the service) but through a .access file in the location of the DSP page. The format of the .access file is:

    pagename.dsp ACL-group

    example:

    index.dsp Everybody

    should allow everybody to access the page. Make sure you reload your package for the .access file to get reloaded after you edit it. Also, you can’t specify paths to the files, instead, you have to have a .access file in the same directory as the file you are trying to assign the rights to.


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 3.  RE: DSP invoke of a WmRoot service

    Posted Tue January 20, 2004 09:41 PM

    Yes…I set the .access file for the dsp.


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 4.  RE: DSP invoke of a WmRoot service

    Posted Tue January 20, 2004 10:21 PM

    One thing related to ACL, .access file only create ACL binding to dsp pages. If you are invoking some service within your dsp page with the %invoke% tag, then you have to create the anonymous access to that service also. Otherwise, it will ask for a login prompt, no matter you have .access file.

    Thanks


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 5.  RE: DSP invoke of a WmRoot service

    Posted Tue January 20, 2004 11:00 PM

    Yes, the service I am calling is also set to Anonymous. But the services within that service being called are accessing server level information (see original post). Access to wM root services can not be changed. So let me outline the problem again…

    Created a DSP page, set the access to anonymous. Within the DSP page, I am invoking service “MyPackage:myService”. That serivce is calling wmRoot.server.packageInfo and WmRoot.server.packageList to get name/value pairs of package/published time.

    If I run the service in the developer, the output is displayed correctly (in the results window). If I set the DSP back to Administrators, I am prompted for a u/p and enter it, the output is displayed correctly in the DSP page. If I put hard coded data at the end of the flow, I can see it in my DSP page.

    There has to be a problem with making server information visable to the public domain that I am not aware of. I can run ‘sizeOfList’ on the package list and display that as output on my dsp page, just not the data itself.


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 6.  RE: DSP invoke of a WmRoot service

    Posted Tue January 20, 2004 11:16 PM

    Another interesting finding…

    I call WmRoot.wm.server.admin:getServerHost to get the server name. When I put that value in my dsp, I see the output (serverHost). However, I still can not view the package information from packageInfo


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 7.  RE: DSP invoke of a WmRoot service

    Posted Wed January 21, 2004 02:37 PM

    Brain,
    Are you still getting the login prompt when you access the dsp page, as you have said that you are accessing the root information and can’t set ACL there.
    I think, as u said, you can not view the package information from packageInfo, must be because root level information cannot be displayed as anonymous.

    Let me know if you find more information regarding the issue.


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 8.  RE: DSP invoke of a WmRoot service

    Posted Wed January 21, 2004 03:45 PM

    If my service is set to anonymous, and the dsp is set to anonymous, then there is no login prompt and the information is not displayed. If I remove the .access file from the dsp, then I will get a login prompt and the information is displayed on the dsp (after login).

    I call the wmRoot service to get the server name, and this information can be displayed on the dsp in either scenario above. I can also do a sizeOfList and count the number of packages and return it to the dsp in both scenarios.

    Its very strange…but would love to add this functionality to see what package versions (uspublished date) were added to each individual server.


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 9.  RE: DSP invoke of a WmRoot service

    Posted Wed January 21, 2004 05:07 PM

    I got the same problem, but I am not accessing the root service, instead I am invoking a custom build service. But, the same problem occurs (getting login prompt).
    I saw one strange thing. If by setting anonymous access in .access file and also setting anonymouys access to the service, I still got the login prompt (It should not). Now, if I cancel 2 or 3 times the login prompt button, partial dsp page displays with no images and even some fields are missing too.

    Did u try to cancel the login prompt and see what happens.


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 10.  RE: DSP invoke of a WmRoot service

    Posted Wed January 21, 2004 05:23 PM

    I found a solution…I called the wmRoot service
    wm.server.access:setDefaultAccess at the beginning of my service and set the access to “Allow”.

    I know this is not the best solution since I am using two wM root services, but whatever works at this point I guess.


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 11.  RE: DSP invoke of a WmRoot service

    Posted Wed January 21, 2004 05:57 PM

    uh…don’t use that service…it set the global access, not the service access. So basically anyone could log on to the server admin screen.

    But you see what I am trying to do…log on to the server AFTER the dsp (within the service) in order to disguise the process.


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 12.  RE: DSP invoke of a WmRoot service

    Posted Wed January 21, 2004 06:11 PM

    I think it would be much better if you created wrapper Flow services that did the invoke of the internal wm.server services. You can then specifically control the ACLs on your services without directly opening up the internal services.

    This would also give you single points of exposure should the internal services change.

    To call a service from outside of IS (wheer outside can mean from a browser URL, a DSP, a Java client, SOAP, etc):

    1. The caller needs the appropriate ACL.
    2. The service must be callable via the listener that you are calling in on. For instance HTTP listeners have a AccessManager, which limits external access to a specific list of services.
    3. In the case of HTTP there is an addition PortManager, which will limit the IP and/or HOST(s) that can be clients.

    HTH,
    Fred


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 13.  RE: DSP invoke of a WmRoot service

    Posted Wed January 21, 2004 08:55 PM

    I think I see what you mean with the wrapper…I will create a service which calls only the packageList service, and another than calls just the packageInfo service. Then have my original service call these ‘wrapped’ services instead. Ill try it out and see what happens…as soon as I fix all the ACL lists from the previous mistake (see service I called above…its called by an administrator dsp page that doesn’t even exist in wM 6…now I see why).


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 14.  RE: DSP invoke of a WmRoot service

    Posted Wed January 21, 2004 09:33 PM

    Unfortunately, the wrapper services did not work either…thanks.


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 15.  RE: DSP invoke of a WmRoot service

    Posted Wed January 21, 2004 10:18 PM

    Sorry if I am getting confused as to how far you have gotten.

    In your DSP make add some onerror sections in the %invoke% sections like so:

        %invoke myFolder:myService% 
    <tr> 
    <td> 
    Service %value serviceName% published as '%value encode(xml) registryKey%'</td> 
    </tr> 
    %onerror% 
    <td>%value encode(xml) errorMessage%</td> 
    %endinvoke% 
    

    There are a few more keys that include the stackTrace that should be returned if there is an error. You can display those in your DSP to help debugging.

    This will verify the DSP is calling the service(s) successfully.

    Since you have the .access set correctly and the DSP seems to be running. Also the services (wrappers and straight on) can be run from Developer.

    Then try invoking the services directly from a Browser.
    [url]http://localhost:5555/invoke/myFolder/myService[/url]

    This will verify the ACLs and such are good for outside access.

    HTH,
    Fred


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 16.  RE: DSP invoke of a WmRoot service

    Posted Wed January 21, 2004 11:54 PM

    I typed the output as you had listed and got the results “Service published as . .” Basically nothing happened. I can not display the information from a browser window (straight invoke) or from the DSP. Any other information, just not package information.

    All the services are set to anonymous, so is the DSP page:
    Wrapper service that calls wm.server.packageInfo = Anonymous
    Wrapper service that calls wm.server.packageList = Anonymous
    Service that is invoked by the DSP page = Anyonmous
    .access file located in the pub directory of the DSP page =
    pkginfo.dsp Anonymous

    • Anonymous

    I can get essentially every piece of information from the server outside of package information. I can display a count of the packages, the server that they reside on, basically everything. However, no matter how many ways I try to do a “pass-through” i am unable to display a simple table of package name/package time unless I break the server and remove log-in information, or I log in as an administrator.

    I recently started trying to use the setResponse service, and actually could display the package name if I put it in the response string. But I wasn’t able to create a template within the response string in order to retreive multiple name/value pairs.

    I encourage you to set up a simple service using the wmroot serivices wm.server.packages.packageInfo and packageList and try to display it in a simple table with an output template. Make sure you completely log out of the server when testing since the information is sometimes cashed.


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 17.  RE: DSP invoke of a WmRoot service

    Posted Thu January 22, 2004 03:46 AM

    [url=“wmusers.com”]wmusers.com

    It shows how to format the username and password when passing the information:
    http://Username:Password@hostname:port/invoke/yourPackage/yourService


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 18.  RE: DSP invoke of a WmRoot service

    Posted Thu January 22, 2004 03:41 PM

    Well…that doesnt work either. I tried it with both the dsp page, and with the service invoke and neither gave me the information from the server that I need.


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 19.  RE: DSP invoke of a WmRoot service

    Posted Thu January 22, 2004 04:00 PM

    I have my DSP as anonymous. The DSP has only the following information:

    <HTML>
    <HEAD>
    <TITLE>XYZ</TITLE>
    <META HTTP-EQUIV=Refresh CONTENT=“0; URL=http://user:password@server:port/invoke/package:service”>
    </HEAD>
    </HTML>

    I tried setting the access of the service to ‘Default’ or ‘Administrator’, to request the u/p from the url and that just prompts me with the login window. Obviously, if I enter the login information the page diaplays correctly.


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 20.  RE: DSP invoke of a WmRoot service

    Posted Thu January 22, 2004 04:37 PM

    Brian,
    Use the url, http://Username:Password@hostname:port/yourPackage/yourDsp. No need to use the meta tag in your dsp page.

    and it will not ask you for username/password and show you the required details. I checked that at my end and it worked.


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 21.  RE: DSP invoke of a WmRoot service

    Posted Thu January 22, 2004 05:25 PM

    That solution would allow everyone to see the username and password, and I believe that it didn’t work for me when I tried it (to get the package information that seems to be hidden…)

    Sooo…what I did as the ultimate fix:
    Create an additional service that just calls getServerHost (get server name and port), pub.client.http (to kick off the service). Within the original service, I run getStringTemplateOnPipe, and format the package information in html. The call setResponse to send the html response back to the http call. I then have the output template for the new service as the output received.

    Since the http service allows me to login, I am able to get ‘into the server’ which was the underlying problem. So now I just invoke the second service and can get the html results.

    Thanks to everyone for there help, and I hope others can use this thread in the future (since most of the fixes would work for everything except of the package list and time stamp)


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 22.  RE: DSP invoke of a WmRoot service

    Posted Fri January 23, 2004 07:18 PM

    Hay guys,

    I am trying to run the wm.server.query:getCurrentUser from within a DSP to get the name of current user logged in. However since this wmroot service is having ACL as Administrators (I can’t change it) and I cannot use the round about way of calling the service with any other user with the privileges also (since the username returned will be not the one I need in that case). Is there any other way to get current user without assigning the Administrator ACL to all users.

    Regards
    Ashok


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 23.  RE: DSP invoke of a WmRoot service

    Posted Fri January 23, 2004 09:22 PM

    Wrap the call to getCurrentUser with your own flow service ensuring your service doesn’t have an ACL.

    By default the ACL is checked only on the top level service of the execution stack. So by wrapping the target service in your own you avoid the ACL check. Execution of DSPs enforces an ACL check on each service listed in your DSP–which again avoids the Administrator ACL requirements.


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 24.  RE: DSP invoke of a WmRoot service

    Posted Mon January 26, 2004 02:31 PM

    Thanks Eduardo. That works.
    In the mean time, in a desperate attempt, I had modified the execute ACL of the wm.server.query:getCurrentUser itself from ‘Administrator’ to ‘Anonymous’.

    Regards
    Ashok


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 25.  RE: DSP invoke of a WmRoot service

    Posted Thu August 12, 2004 01:23 PM

    Hi,
    Is it possible to call a dsp from a jsp of another package. the login should be one…single sign on
    its like login.jsp of package1 should call a dsp from package2 with the same login
    any help will be appreciated
    Thanks


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 26.  RE: DSP invoke of a WmRoot service

    Posted Thu September 02, 2004 10:07 AM

    hi…

    I still have problem with dsp. I have a dsp script below:

    <html>
    <head>
    <title>Untitled Document</title>
    <meta>
    </head>

    <body>

    <table>
    <tr>
    <td><em><strong>BOOK TITLE</strong></em></td>
    <td><em><strong> DATES</strong></em></td>
    <td><em><strong>CONTAC</strong></em></td>
    </tr>

    %invoke adapters:forview%

    %loop forviewOutput/results%
    <tr>
    <td>%value BOOK_TITLE%</td>
    <td>%value DATES%</td>
    <td>%value CONTAC%</td>
    </tr>
    %endloop%
    %endinvoke%
    </table>

    Inser new data

    <table>
    <tr>
    <td> </td>
    </tr>
    <tr>
    <td><div><em><strong>BOOK TITLE</strong></em><strong>
    :</strong></div></td>
    <td><input></td>
    </tr>
    <tr>
    <td><div><strong><em>DATES :</em></strong></div></td>
    <td><input></td>
    </tr>
    <tr>
    <td><div><strong><em>CONTAC :</em></strong></div></td>
    <td><input></td>
    </tr>
    <tr>
    <td> <div>
    <input></input>
    </div></td>
    </tr>
    </table>
    </body>
    </html>

    When I run the adapter in developer it running success.The adapter was insert command to database and the other adapter is for view data from data base.

    The problem is, the insert adapter was not run when I try to invoke it fro dsp either from IS…

    can you tell how… so it can work beautifully

    thanks…

    bondan


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 27.  RE: DSP invoke of a WmRoot service

    Posted Tue February 15, 2005 06:33 PM

    hi,
    i want to send multiple records to database using DSP.i used Batch insert adapter service to insert multiple records.when i invoke this service from DSP it inserting only the first record.plz help me as soon as possible.

    with regards,
    joshua.


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 28.  RE: DSP invoke of a WmRoot service

    Posted Wed March 02, 2005 05:55 AM

    Hi Geniuses,

    I’m stuck up with a small problem.
    I have a HTML page which is in the <package-name>/web directory.
    When open this page in a browser, I’m prompted for the username/password which is webMethods authentication.
    In this HTML page I have some links thru which I’m invoking other JSP pages.
    In one of the link I have to invoke the work flow inbox for a particular user who has logged in to the HTML page. When I click on the link to open the work flow inbox, then a page opens up which again asks me for the username/password before opening the task window of that user.

    I want to capture the username/password that the user gives when he logs in to the HTML page first time and then send the username/password combo to invoke the work flow inbox. I know how to send the username/password parameters thru URL to invoke directly the work-flow inbox.
    What I don’t know is how to capture the username/password and how to save it so that I can use them for referring to other pages.

    Thanks,
    Sachin


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 29.  RE: DSP invoke of a WmRoot service

    Posted Fri June 24, 2005 10:58 AM

    Hi
    1)can you explain me the null and default for map steps?
    2)And the exit from loop, flow, parent with success/failure?


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 30.  RE: DSP invoke of a WmRoot service

    Posted Fri June 24, 2005 11:20 AM

    1)whats the difference between BRANCH /ouputs and BRANCH /outputs/students?
    whats the difference betwwen thses two?
    2)whats the meaning of
    %lastError/pipeline/startTransactionInput/transactionName% ?


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 31.  RE: DSP invoke of a WmRoot service

    Posted Fri June 24, 2005 11:28 AM

    1)whats the meaning of /.+/ if we put this in label of a sequence step?
    2) what is variable substitution?
    why do we need this
    3 )If we put /[^ ]/ in the label step of rollback transaction what does that signify?


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB