Menu

URL point to signserver

Help
2013-07-22
2013-09-17
  • phuongvu_0203

    phuongvu_0203 - 2013-07-22

    Hello everyone
    As you know that, the url when you deploy signserver like: http://localhost:8080/signserver
    Could I change this url like http://localhost:8080/signserverxyz?
    I have tried changing in SignServer-war, it works about web aspect. I mean you can access sub-pages with new url, but I cant use modules such as pdfsigner, odfsignser...I think I have to change somthing else?
    phuong
    Best Regards

     
  • Markus Kilås

    Markus Kilås - 2013-07-25

    Hi Phuong,

    Some descriptors also contains the /signserver as prefix. You might have to edit:
    ./modules/SignServer-war/web/WEB-INF/jboss-web.xml
    ./modules/SignServer-war/web/WEB-INF/sun-web.xml

    Best regards,
    Markus
    PrimeKey

     
  • phuongvu_0203

    phuongvu_0203 - 2013-07-25

    Hi Markus
    I have changed as you suggested and it works but only webpage access, when I do signing, maybe the URL link to module signing lost and signserver can't find the workers.
    I see signserver.ear file in ./Jboss_home/default/server/deploy
    Open it and I see prefix /signserver in ./META-INF/application.xml
    The signserver.ear is created when build signserver. How could I config to change signserver.ear.
    Thank you and best regards
    Phuong

     
  • Markus Kilås

    Markus Kilås - 2013-08-11

    The context-root for the SignServer-war module is specified in the build-script for it. Maybe you can change the value for the entry key called "module.web.web-uri" in modules/SignServer-war/build.xml. After that you will have to build and deploy.

    Best regards,
    Markus
    PrimeKey

     
  • phuongvu_0203

    phuongvu_0203 - 2013-09-07

    Hi Markus
    Sorry for late reply, I'm still stuck in this problem. I have changed the value "module.web.web-uri" as you suggested, clean - build - deploy signserver again, I can see myserver.war file is created in signserver/lib. In browser, I can access exactly as http://localhost:8080/myserver. Health check module works fine. I have tested with url of timestamp module and it works too. But when I do signing demo, for example PDFSigner, when submit pdf file, the browser says:

    @HTTP Status 404 - No worker specified
    @
    @The requested resource could not be found:
    @No worker specified

    Do I have to change something more? I have found in build.xml file of PDF module, but I don't know where to change
    Best regards
    Phuong

     

    Last edit: phuongvu_0203 2013-09-07
  • phuongvu_0203

    phuongvu_0203 - 2013-09-08

    When I try signing using command line:
    @bin/client.sh signdocument -workerid 7 -data /home/tomica/Desktop/ok.pdf

    it returns:

    Exception in thread "main" java.lang.RuntimeException: java.io.FileNotFoundException: http://localhost:8080/signserver/process
    at org.signserver.client.cli.defaultimpl.HTTPDocumentSigner.sendRequest(HTTPDocumentSigner.java:206)
    at org.signserver.client.cli.defaultimpl.HTTPDocumentSigner.doSign(HTTPDocumentSigner.java:100)
    at org.signserver.client.cli.defaultimpl.AbstractDocumentSigner.sign(AbstractDocumentSigner.java:56)
    at org.signserver.client.cli.defaultimpl.SignDocumentCommand.run(SignDocumentCommand.java:371)
    at org.signserver.client.cli.defaultimpl.SignDocumentCommand.execute(SignDocumentCommand.java:417)
    at org.signserver.cli.CommandLineInterface.execute(CommandLineInterface.java:97)
    at org.signserver.client.cli.ClientCLI.main(ClientCLI.java:45)
    Caused by: java.io.FileNotFoundException: http://localhost:8080/signserver/process
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1434)
    at org.signserver.client.cli.defaultimpl.HTTPDocumentSigner.sendRequest(HTTPDocumentSigner.java:195)
    ... 6 more

     
    • Markus Kilås

      Markus Kilås - 2013-09-10

      If you have changed the path to SignServer you will have to tell the client CLI which path to use, use the "-servlet" argument.

      Best regards,
      Markus

       
  • phuongvu_0203

    phuongvu_0203 - 2013-09-08

    Does problem depends on ClientWS url? (http://localhost:8080/signserver/ClientWSService/ClientWS?wsdl) Because I think that, when signing by browser, process will do over ClientWS. Isn't it?
    I tried change ClientWS url in modules folder but nothing changed...

     
    • Markus Kilås

      Markus Kilås - 2013-09-10

      No, the web browser uses the Servlet normally at /signserver/process. The web services interfaces are not used in that case.

      Best regards,
      Markus

       
      • phuongvu_0203

        phuongvu_0203 - 2013-09-13

        Hi Markus
        I think that if I just change in SignServer-war module, it just applies about web browser interaction, I found that, health check and timestamp url work perfectly too, but Signers didn't. It seems cannot found specific module. Do you have the same issue
        ? How can I fix this?
        Thanks and best regards

         
  • Markus Kilås

    Markus Kilås - 2013-09-13

    I am not sure I am following what you have changed now and what is working and what is not working.

    State what you have changed and what URLs and commands are working and which are not working and the exact error message for those.

    Changing the URLs are not something that we usually do but I can't see that it shouldn't be possible given that the URL is changed everywhere.

    Best regards,
    Markus

     
  • phuongvu_0203

    phuongvu_0203 - 2013-09-13

    Dear Markus
    I have changed the following files:
    @@ SignServer-war-Healthcheck
    1/ Changed value of "module.web.context-root" to "/test/healthcheck" in build.xml
    2/ Changed value of "context-root" to "/test/healthcheck" in web/WEB-INF/jboss-web.xml
    @@ SignServer-war
    1/ Changed value of "module.web.context-root" to "/test/healthcheck" in build.xml
    2/ Changed value of "context-root" to "/test" in web/WEB-INF/jboss-web.xml
    3/ Changed value of "context-root" to "/test" in web/WEB-INF/sun-web.xml

    Run command: "bin/ant clean build deploy" to re-build signserver
    - Do HealthCheck on Web browser --> ALLOK
    - Create a Timestamp signer and run command: "bin/signclient timestamp http://localhost:8080/test/process?workerName=TimeStampSigner" --> works correctly.
    - Create a PDF Signer and test on Web browser -->

    HTTP Status 404 - No worker specified
    The requested resource could not be found:
    No worker specified

    the URL is http://localhost:8080/test/worker/PDFSigner at that time

    and I found no errors or any log lines in /server/default/log/server.log
    Thanks and best regards

     
    • Markus Kilås

      Markus Kilås - 2013-09-16

      Hi Phuong,

      It turns out that currently when accessing workers using /worker/* the path of the URL must start with /signserver/worker. This is hard coded in the WorkerServlet.

      The workers can also be accessed using the GenericProcessServlet (/process) as in your example above for the TimeStampSigner.

      To use something else than /signserver, either the WorkerServlet has to be changed or use /process instead with an workerName field in the query or form upload.

      Best regards,
      Markus

       
  • phuongvu_0203

    phuongvu_0203 - 2013-09-14

    By the way, I'm using jboss 5.1.0 and signserver 3.4.1
    Many thanks for your help
    Phuong

     

    Last edit: phuongvu_0203 2013-09-16
  • phuongvu_0203

    phuongvu_0203 - 2013-09-17

    Hi Markus
    Finally, it works after changing in WorkerServlet
    Thank you so much
    Best regards

     

Log in to post a comment.