Coder Social home page Coder Social logo

rest-adapter-service's People

Contributors

anttiluoma avatar haapakanni avatar iluwatar avatar jansu76 avatar jevli avatar jhyoty avatar mkostamo avatar petkivim avatar tmkrepo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rest-adapter-service's Issues

Error: 404 Not Found [IP: 185.78.44.254 443]; sudo apt-add-repository command

Hello everyone,

I just tried to install REST-adapter-service along with Online training: REST Adapter Service.

I got an error while running sudo apt-add-repository "https://artifactory.niis.org/xroad-extensions-release-deb main" command below.

Hit:1 http://jp.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://archive.ubuntulinux.jp/ubuntu bionic InRelease                                                                  
Hit:3 http://jp.archive.ubuntu.com/ubuntu bionic-updates InRelease                                                                         
Hit:4 http://jp.archive.ubuntu.com/ubuntu bionic-backports InRelease                                                                       
Hit:5 http://archive.ubuntulinux.jp/ubuntu-ja-non-free bionic InRelease                                                                    
Hit:6 http://ppa.launchpad.net/ansible/ansible/ubuntu bionic InRelease                                                                     
Get:7 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]                                   
Ign:8 https://artifactory.niis.org/xroad-extensions-release-deb bionic InRelease         
Err:9 https://artifactory.niis.org/xroad-extensions-release-deb bionic Release
  404  Not Found [IP: 185.78.44.254 443]
Reading package lists... Done
E: The repository 'https://artifactory.niis.org/xroad-extensions-release-deb bionic Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

Is not this repository supported anymore?

PS. Host: Ubuntu 18.04 TLS

Regards,
Yamato

JSON responses are not always uniform when response contains an array

When calling some SOAP service which returns array of things, the response contains an array if there are more than one thing and object if there is only one thing.

For example calling ListMembers, the response might contain the following:

No services, services is an empty string:

{
    "memberCode": "somecode",
    "xRoadInstance": "someinstance",
    "created": "2018-02-12T08:28:18.799+02:00",
    "name": "somename",
    "subsystems": {
        "subsystem": {
            "created": "2018-03-23T13:45:50.804+02:00",
            "services": "",
            "subsystemCode": "somesubsystemcode",
            "changed": "2018-03-23T13:45:50.804+02:00",
            "fetched": "2020-05-20T10:37:36.775+03:00"
        }
    },
    "memberClass": "someclass",
    "changed": "2018-02-12T08:28:18.799+02:00",
    "fetched": "2020-05-20T10:37:36.775+03:00"
}

Member has a single service, service is an object:

{
    "memberCode": "somecode",
    "xRoadInstance": "someinstance",
    "created": "2017-08-08T15:48:09.458+03:00",
    "name": "somename",
    "subsystems": {
        "subsystem": [{
            "created": "2017-09-13T09:27:16.103+03:00",
            "services": {
                "service": {
                    "serviceVersion": "v1",
                    "wsdl": {
                        "created": "2017-09-18T15:06:19.588+03:00",
                        "externalId": "someid",
                        "changed": "2018-02-02T13:47:49.381+02:00",
                        "fetched": "2019-11-20T06:30:44.414+02:00"
                    },
                    "serviceCode": "somecode",
                    "created": "2017-09-18T15:06:19.449+03:00",
                    "changed": "2017-09-18T15:06:19.449+03:00",
                    "fetched": "2019-11-20T06:30:43.824+02:00"
                }
            },
            "subsystemCode": "somecode",
            "changed": "2017-09-13T09:27:16.103+03:00",
            "fetched": "2020-05-20T10:37:36.775+03:00"
        }, {
            "created": "2017-12-05T09:57:07.870+02:00",
            "services": "",
            "subsystemCode": "somesubsystem",
            "changed": "2017-12-05T09:57:07.870+02:00",
            "fetched": "2020-05-20T10:37:36.775+03:00"
        }]
    }
}

Member has multiple services, services is an array:

{
    "memberCode": "somecode",
    "xRoadInstance": "someinstance",
    "created": "2016-05-20T15:15:48.213+03:00",
    "name": "somename",
    "subsystems": {
        "subsystem": [{
            "created": "2018-11-27T14:37:59.714+02:00",
            "services": "",
            "subsystemCode": "somecode",
            "changed": "2018-11-27T14:37:59.714+02:00",
            "fetched": "2020-05-20T10:37:36.775+03:00"
        }, {
            "created": "2016-06-16T16:53:54.074+03:00",
            "services": "",
            "subsystemCode": "somecode",
            "changed": "2016-06-16T16:53:54.074+03:00",
            "fetched": "2020-05-20T10:37:36.775+03:00"
        }, {
            "created": "2016-05-20T15:15:48.213+03:00",
            "services": {
                "service": [{
                    "serviceVersion": "v1",
                    "wsdl": {
                        "created": "2017-01-27T12:17:18.502+02:00",
                        "externalId": "someid",
                        "changed": "2018-02-05T13:26:34.900+02:00",
                        "fetched": "2018-02-05T13:26:34.900+02:00"
                    },
                    "serviceCode": "somecode",
                    "created": "2017-01-27T12:17:14.600+02:00",
                    "changed": "2017-01-27T12:17:14.600+02:00",
                    "fetched": "2019-08-21T11:09:31.979+03:00"
                }, {
                    "serviceVersion": "v1",
                    "wsdl": {
                        "created": "2017-01-27T12:17:15.866+02:00",
                        "externalId": "someid",
                        "changed": "2018-02-05T13:26:36.870+02:00",
                        "fetched": "2018-02-05T13:26:36.870+02:00"
                    },
                    "serviceCode": "somecode",
                    "created": "2017-01-27T12:17:14.600+02:00",
                    "changed": "2017-01-27T12:17:14.600+02:00",
                    "fetched": "2019-08-21T11:09:31.979+03:00"
                }]
            },
            "subsystemCode": "somecode",
            "changed": "2016-05-20T15:15:48.213+03:00",
            "fetched": "2020-05-20T10:37:36.775+03:00"
        }]
    },
    "memberClass": "someclass",
    "changed": "2016-05-20T15:15:48.213+03:00",
    "fetched": "2020-05-20T10:37:36.775+03:00"
}

This gets cumbersome in more complex responses when parsing them and have to accommodate all three options every time.

The /my/conf path for Docker

Hi,

Im trying to install rest-api-gateway using docker. However the container does not have a path /my/conf in the build and giving below error.

docker run -p 8080:8080 -v /host/dir/conf:/my/conf -e "JAVA_OPTS=-DpropertiesDirectory=/my/conf" rest-adapter-service

java.io.FileNotFoundException: /my/conf/provider-gateway.properties (No such file or directory)
        at java.io.FileInputStream.open0(Native Method) ~[na:1.8.0_111]
        at java.io.FileInputStream.open(FileInputStream.java:195) ~[na:1.8.0_111]
        at java.io.FileInputStream.<init>(FileInputStream.java:138) ~[na:1.8.0_111]
        at java.io.FileInputStream.<init>(FileInputStream.java:93) ~[na:1.8.0_111]
        at org.niis.xrd4j.common.util.PropertiesUtil.load(PropertiesUtil.java:101) ~[common-0.3.0.jar!/:na]
        at org.niis.xroad.restadapterservice.ProviderGateway.init(ProviderGateway.java:95) [classes!/:1.1.0-SNAPSHOT]
        at javax.servlet.GenericServlet.init(GenericServlet.java:158) [tomcat-embed-core-9.0.37.jar!/:4.0.FR]
        at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1134) [tomcat-embed-core-9.0.37.jar!/:9.0.37]
        at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:986) [tomcat-embed-core-9.0.37.jar!/:9.0.37]
        at org.springframework.boot.web.embedded.tomcat.TomcatEmbeddedContext.load(TomcatEmbeddedContext.java:82) [spring-boot-2.3.3.RELEASE.jar!/:2.3.3.RELEASE]
        at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) ~[na:1.8.0_111]
        at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374) ~[na:1.8.0_111]
        at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:580) ~[na:1.8.0_111]

Docker REST service: failed endpoint connectivity; port already allocated

The docker build works fine and with no error message: docker build -t rest-adapter-service .

However, running the docker installation fails: docker run -p 8080:8080 rest-adapter-service

The error message is:
docker: Error response from daemon: driver failed programming external connectivity on endpoint hardcore_wozniak (9d9775dd46da1d96edf511fd42399442fa7a7b7dce6076f34ae9e4675dc1b313): Error starting userland proxy: Bind for 0.0.0.0:8080 failed: port is already allocated.
ERRO[0000] error waiting for container: context canceled

System information:
OS: MacOSX HIghSierra 16GB RAM
Docker: v 18.06.1-ce-mac73

=> Can anyone else replicate this error? If so, what is the issue?

X-Auth-Token header

Hi,
We are trying to use an authorization server behind a security server and rest-adapter, we are able to do do the initial login using rest calls but it fails when we try to use the X-Auth-Token header. I am hoping there might be an easy way to pass this header (or other headers as needed), otherwise I am happy to start a pull request.

regards,

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.