Giter VIP home page Giter VIP logo

xrd4j's People

Contributors

mjtorn avatar petkivim avatar vitalistupin avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

samulilehto

xrd4j's Issues

Moving xrd4j repository to vrk-kpa Github repository?

Hi,

as agreed earlier, we would like to move the xrd4j repository to be a part of vrk-kpa Github repository (https://github.com/vrk-kpa/). The new repository would still be public and open for everyone to contribute.

We are now pretty close to start the process for moving the repository due to there is some needs for further development of xrd4j library.
Do you mind if we start the moving operation soon?

Regards,
Hannu

Plain text in response element causes null pointer exception.

If SOAP body response is of format

<ABCServiceResponse>
  <request>
     ...
  <request>
  <response>
    plain text and other cool stuff
  </response>
<ABCServiceResponse>

i. e. response (1) is plain textNode (2), it has no 'localName' (3) (i.e. is null). This (3) results to NPE in AbstractResponseDeserializer.java at deserializeResponseError(..) line 284.

Test failure in rest component

Running 'mvn clean install' errors with test failures:

  com.pkrete.xrd4j.rest.converter.JSONToXMLConverterTest#testArray ComparisonFailure
  com.pkrete.xrd4j.rest.converter.JSONToXMLConverterTest#testDeepData ComparisonFailure
  com.pkrete.xrd4j.rest.converter.JSONToXMLConverterTest#testJSONLD1 ComparisonFailure
  com.pkrete.xrd4j.rest.converter.JSONToXMLConverterTest#testMultipleStrElements ComparisonFailure
  com.pkrete.xrd4j.rest.converter.JSONToXMLConverterTest#testMultipleElements ComparisonFailure
  com.pkrete.xrd4j.rest.converter.JSONToXMLConverterTest#testNestedElements1 ComparisonFailure
  com.pkrete.xrd4j.rest.converter.JSONToXMLConverterTest#testNestedElements2 ComparisonFailure
  com.pkrete.xrd4j.rest.converter.JSONToXMLConverterTest#testNestedElements3 ComparisonFailure
  com.pkrete.xrd4j.rest.converter.XMLToJSONConverterTest#testArray ComparisonFailure
  com.pkrete.xrd4j.rest.converter.XMLToJSONConverterTest#testJSONLD1 ComparisonFailure
  com.pkrete.xrd4j.rest.converter.XMLToJSONConverterTest#testNormalize3 ComparisonFailure

Quick glance at error outputs seems to indicate element order is reversed from expected output:

testArray(com.pkrete.xrd4j.rest.converter.JSONToXMLConverterTest)  Time elapsed: 0.121 sec  <<< FAILURE!
junit.framework.ComparisonFailure: expected:<...id>49</id><name_en>City of Espoo</name_en><name_sv>Esbo stad</name_sv><data_source_url>www.espoo.fi</data_source_url><name_fi>Espoon kaupunki</name_fi></array><array><id>91</id><name_en>City of Helsinki</name_en><name_sv>Helsingfors stad</name_sv><data_source_url>www.hel.fi</data_source_url><name_fi>Helsingin kaupunki</name_fi...> but was:<...data_source_url>www.espoo.fi</data_source_url><name_fi>Espoon kaupunki</name_fi><name_sv>Esbo stad</name_sv><id>49</id><name_en>City of Espoo</name_en></array><array><data_source_url>www.hel.fi</data_source_url><name_fi>Helsingin kaupunki</name_fi><name_sv>Helsingfors stad</name_sv><id>91</id><name_en>City of Helsinki</name_en...>
        at junit.framework.Assert.assertEquals(Assert.java:81)
        at junit.framework.Assert.assertEquals(Assert.java:87)
        at com.pkrete.xrd4j.rest.converter.JSONToXMLConverterTest.testArray(JSONToXMLConverterTest.java:112)

"objectType" attribute value is missing from "securityServer" SOAP header.

Currently securityServer SOAP header is generated without objectType attribute.

<xrd:securityServer>
  <id:xRoadInstance>FI-DEMO</id:xRoadInstance>
  <id:memberClass>GOV</id:memberClass>
  <id:memberCode>1234567-8</id:memberCode>
  <id:serverCode>myserver</id:serverCode>
</xrd:securityServer>

Starting from X-Road version 6.9.0 the objectType attribute is required.

<xrd:securityServer id:objectType="SERVER">
  <id:xRoadInstance>FI-DEMO</id:xRoadInstance>
  <id:memberClass>GOV</id:memberClass>
  <id:memberCode>1234567-8</id:memberCode>
  <id:serverCode>myserver</id:serverCode>
</xrd:securityServer>

SOAPHelper should support parsing XML recursively.

Currently SOAPHelper.nodesToMap and SOAPHelper.nodesToMultiMap can transform XML to Map correctly only if XML does not have additional wrappers, e.g.

OK

<request>
    <param1>value1</param1>
</request>

=>

param1=value1

NOK

<request>
    <wrapper>
        <param1>value1</param1>
    </wrapper>
</request>

=>

wrapper=value1

When additional wrappers are used the result should be:

<request>
    <wrapper>
        <param1>value1</param1>
        <param2>value2</param2>
    </wrapper>
</request>

=>

param1=value1
param2=value2

Support for securityServer SOAP header extension must be added

Security server supports securityServer SOAP header extension that bypasses the client side HA feature (fastest wins) and sends the message to the security server specified in the securityServer element. securityServer must be supported by XRd4J.

    <SOAP-ENV:Header>
        <xrd:client id:objectType="MEMBER">
            <id:xRoadInstance>FI-TEST</id:xRoadInstance>
            <id:memberClass>GOV</id:memberClass>
            <id:memberCode>0245437-2</id:memberCode>
        </xrd:client>
        <xrd:service id:objectType="SERVICE">
            <id:xRoadInstance>FI-TEST</id:xRoadInstance>
            <id:memberClass>GOV</id:memberClass>
            <id:memberCode>0245437-2</id:memberCode>
            <id:serviceCode>getRandom</id:serviceCode>
            <id:serviceVersion>v1</id:serviceVersion>
        </xrd:service>
        <xrd:securityServer>
            <id:xRoadInstance>FI-TEST</id:xRoadInstance>
            <id:memberClass>GOV</id:memberClass>
            <id:memberCode>0245437-2</id:memberCode>
            <id:serverCode>testserver</id:serverCode>
        </xrd:securityServer>

        <xrd:id>ID11234</xrd:id>
        <xrd:protocolVersion>4.0</xrd:protocolVersion>
    </SOAP-ENV:Header>

ee.ria.xroad.common.message

Noticed that in xroad 6 packages there is a common library that seems to include various utility classes for handling soap messages/requests (for example ee.ria.xroad.common.message, ee.ria.xroad.common.request).

  • Are there any similarities between xrd4j and that ee.ria.xroad.common package?
  • Anyidea is that ee.ria.xroad.common source/documentation available somewhere?

Closing xrd4j repository?

Hi,

Could you close down the xrd4j repository (or change it to be an Private Repository)?

We have cloned/moved the existing xrd4j repository (this repository) to under VRK's Github account to here: https://github.com/vrk-kpa/xrd4j

Currently it confuses Finnish X-Road users and developers as there are two existing repositories for pretty much same purpose.

Thanks,
Hannu
Suomi.fi-palveluväylä (X-Road) Product Owner

REST client should support multiple parameters with the same name.

Currently REST client receives URL parameters as key-value pairs <String, String> which makes it impossible to have two URL parameters with the same name. However, it is a common practice to have multiple parameters with the same name <String, List<String>> which is why it should be supported, e.g.

http://api.test.com/10?key=value1&key=value2

The implementation must not break backwards compatibility with the current implementation.

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.