||
Skip to end of metadata
Go to start of metadata

This feature simplifies the process of  creating, publishing and subscribing to the samples that are shipped with WSO2 App Manager. Follow the steps below to use this feature.

  1. Log in to the App Publisher of WSO2 App Manager using the following URL with admin/admin credentials: http://<AppM_HOST>:9763/publisher
  2. Click  Web Applications, and then click Deploy Samples, or use the shortcut link as shown below. 
    deploy sample Web apps  
    This deploys and publishes the Travel Booking and Plan Your Trip Web app samples, which are shipped with WSO2 AppM by default as shown below.

    published sample Web apps
  3. Log in to the App Store of WSO2 App Manager using the following URL and credentials: http://<AppM_HOST>:9763/store
    • username:  subscriber_"loggeduser" (Replace  "loggeduser" with the username of the user that is already logged in to WSO2 AppM. For example: subscriber_admin)
    • password:  subscriber
  4.  Now you can view the subscribed samples as shown below.
    subscribed Web apps in App Store
  5. Click on the app, and then click the Gateway Endpoint URL, to use the app as shown below. 
    gateway endpoint of the selected Web appNow, you can access the Plan Your Trip app with the claim values defined in the sample deployment configurations as shown below. 
    Plan Your Trip Web app

Adding other Web apps to the sample deployer

By default, the sample deployer feature deploys and publishes the Travel Booking and Plan Your Trip Web app samples, which are shipped with WSO2 AppM. Follow the steps below to add other Web apps to the sample deployer.

  1. Add the WAR file of the sample Web app to the <AppM_HOME>/samples/ directory.
  2. Add a configuration for the other samples you add as shown in the below example in the <AppM Home>/repository/deployment/server/jaggeryapps/publisher/config/ SampleWebappConfiguration.json file, by changing the values accordingly.

     "TravelBooking": {
        "displayname": "Travel Booking",
        "context": "/travel",
        "version": "1.0.0",
        "warfilename": "travel-booking-1.0",
        "claims": {
          "FirstName": {
            "url": "http://wso2.org/claims/givenname",
            "value": "Peter",
            "isNew": false
          },
          "LastName": {
            "url": "http://wso2.org/claims/lastname",
            "value": "James",
            "isNew": false
          },
          "EmailAddress": {
            "url": "http://wso2.org/claims/emailaddress",
            "value": "wso2@wso2.com",
            "isNew": false
          },
          "StreetAddress": {
            "url": "http://wso2.org/claims/streetaddress",
            "value": "Park Drive",
            "isNew": false
          },
          "ZipCode": {
            "url": "http://wso2.org/claims/zipcode",
            "value": "800000",
            "isNew": true
          },
          "Country": {
            "url": "http://wso2.org/claims/country",
            "value": "USA",
            "isNew": false
          },
          "CardNumber": {
            "url": "http://wso2.org/claims/card_number",
            "value": "908796546789",
            "isNew": true
          },
          "CardHolder": {
            "url": "http://wso2.org/claims/card_holder",
            "value": "P. James",
            "isNew": true
          },
          "ExpireDate": {
            "url": "http://wso2.org/claims/expiration_date",
            "value": "09/08/2020",
            "isNew": true
          }
        },
        "pages": [
          ["default",10],
          ["booking-step1.jsp",20],
          ["booking-step2.jsp",15]
        ]
      }
    }

    The properties of the above configuration are described below.

    PropertyDescriptionExample value
    displayname
    Name of the app, which is displayed in the App Store.
    Plan Your Trip
    context
    Sub context of the Web application. Gateway URL of the Web application will contain this context.
    /planYourTrip
    version
    Version of the Web application. Users can have multiple versions of the same Web application. The version appears in the gateway URL.
    1.0.0
    warfilename
    Name of the WAR file of the sample Web app.
    plan-your-trip-1.0
    claims
    Properties of the claims added while creating the app. Define the below properties for each claim.
    • url: URI defined under the dialect, specific to the claim. (E.g. http://wso2.org/claims/givenname) For more information on claims, see Claim Management.

    • value: Value of the claim that is displayed when you access the Web app through WOS2 AppM.

    • isNew: If the claim is assigned to the user profile by default or not. Only the claims with value as false are deployed with the app.

    FirstName
    pages
    Defines the number of user hits that are automatically applied on the Web pages after the sample app is deployed. This count is used to display the usage statistics of the app. The home page of the app is defined by the name default.
    booking-step1.jsp",20
  • No labels