question

Upvotes
Accepted
3 0 1 1

Java Client for TR Chart

Hi,

I try to call the chart service with java, but get invalid child element error. I have implemented the java client using the C# example and comparing to the xml request I see in the API page (https://www.trkd.thomsonreuters.com/SupportSite/TestApi/Op?svc=Charts_1&op=GetChart_2).

Please find the attached TR-request from the api page (getchart-request-2-troriginal.txt) and the request generated from our java-client (trchartrequest-bwside.txt). The error that appears is as follows:

de.byteworx.reuters.model.charts.ICharts1ICharts1HttpsAndRKDTokenGetChart2ClientErrorReferenceFaultMessage: The element 'StandardTemplate' in namespace 'http://metastock.com/imageserver/financial' has invalid child element 'ShowNonTradedPeriods' in namespace 'http://metastock.com/imageserver/financial'. List of possible elements expected: 'YAxisTitles' in namespace 'http://metastock.com/imageserver/financial'.
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at com.sun.xml.internal.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:135)
	at com.sun.xml.internal.ws.client.sei.StubHandler.readResponse(StubHandler.java:238)
	at com.sun.xml.internal.ws.db.DatabindingImpl.deserializeResponse(DatabindingImpl.java:189)
	at com.sun.xml.internal.ws.db.DatabindingImpl.deserializeResponse(DatabindingImpl.java:276)
	at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:104)
	at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:77)
	at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:147)
	at com.sun.proxy.$Proxy356.getChart2(Unknown Source)
     

Please have a look and give me any hints.

Thanks,

javarkd-apirkd
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hello @vladimir.zdraveski

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?

If so please can you click the 'Accept' text next to the appropriate reply. This will guide all community members who have a similar question.

Thanks,

AHS

Upvotes
Accepted
41 0 0 0

Hi,

Noticed error in the Request.

The element 'StandardTemplate' in namespace 'http://metastock.com/imageserver/financial' has invalid child element 'ShowNonTradedPeriods' in namespace 'http://metastock.com/imageserver/financial'. List of possible elements expected: 'YAxisTitles' in namespace 'http://metastock.com/imageserver/financial'

This request clearly has missing non-optional elements, according to the TRKD schema...

TRKD shcema xsd relevant to this bit., imported from wsdl is here...

http://api.trkd.thomsonreuters.com/schemas/Charts/ChartsFINancial.xsd

Important Notes:

When its mentioned as sequence ,should provide the request as in same order and should not skip any non optional elements according to the schema.This is the root cause for this error.


sequence.png (33.9 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
3 0 1 1

Thank you!

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.