petkivim / xrd4j Goto Github PK
View Code? Open in Web Editor NEWUnmaintained repository. Development moved to
Home Page: https://github.com/vrk-kpa/xrd4j
License: MIT License
Unmaintained repository. Development moved to
Home Page: https://github.com/vrk-kpa/xrd4j
License: MIT License
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
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.
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)
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>
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
Hi:
xrd4j supports xroad security server high availability? if these is multiple security servers, how do I configure in code,now the xrd4j demo only one security server url in the code.
I also discuss with xroad author,here is https://github.com/vrk-kpa/xroad-public/issues/23
thank you.
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>
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).
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
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.
Valid response (note spaces in response) causes also NPE (see above).
<response> <e>text</e> </response>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.