Durga Roobini

Ranch Hand
+ Follow
since Dec 19, 2013
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
2
Received in last 30 days
0
Total given
2
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Durga Roobini

Ulf Dittmer wrote:What, exactly is the problem - calling the WS every 15 minutes? If so, the java.util.Timer and TimerTask classes can help with that. If the problem is something else, tell us in detail what that is.




Thanks for the reply.but not the issue in my case timer and thread already included in my topic. my problem is .. for eg i call one of the rest endpoint and it gives xml responses like this

<parent>
<root>
<a>apple</a>
<b>100</b>
</root>
</parent>


after 15 min using thread i call same end point again so now i receive xml responses like..

<parent>
<root>
<a>apple</a>
<b>100</b>
</root>

<root>
<a>orange</a>
<b>150</b>
</root>

</parent>

so in runtime my thread run in evry 15 minutes but i need to fetch only new data which it was highlighted above. so i need the orange nodelist from the xml response

how can i achieve this?




9 years ago
I have couple of rest api endpoints,which response is XML,like zapier i need to poll (calling the api endpoints @ every 15min) each 15 min data will change from server endpoints..,i need to fetch new data from that server...
so sort and simple i need to poll every 15min to rest api endpoint from that i need newly updated data.?

please tell me the hint how to achieve this using java.. am very blank give the some clues or ideas that how to achieve this.
9 years ago
thanks for your reply.But whatever you said,i did that actually now my question is how to connect two applications? is webhook help me in any way?
I want to connect to two applications like zapier.triggering the dropbox app and make action in Facebook app. If i create dropbox folder inside dropbox it automatically write some message post to my facebook.my middleware application is JAVA so i got permissions for dropbox and facebook using my code after that how can i implement this one? using my logic when i am login to dropbox and create folder it automatically write post in facebook,can i want to use connectors? how to write connectors? or any other solutions is there? i have no idea about connectors... i want exactly like zapier....please help me

Jaikiran Pai wrote:Looking at the code and the comments in it, it looks like you want to write out the serialized version of the "token" to a String? Is that correct? If yes, it should be easy enough, you don't need all that response.getOutputStream() and other code. Take a look at StringWriter class available in Java.



inside token the methodname and url calling is there XmlRpcSerialzer pre-defined class they use XmlRpcSerializer.serialize(Object value,Writer writer) return method as XmlRpcSerializer.serialize( token, writer );
9 years ago
i get some xml response using response.getoutputstream();

my code is here


my question is my save outputstream content into string ?

help me please
9 years ago

Ulf Dittmer wrote:Please post the entire Java code you used for this, including all import statements, so that it's ready to compile and run.




sorry i cannot able to attach java file,error like "Files with the extension .java are not allowed as attachment in the message."
so i post my java file here but it is not runnable condition beacuse url and apikey is sensitive i cant able to hardcode it,please try to understand my code




what i want the output is i mentioned before

William Brogden wrote:

grammatical



Java and all other programming languages care a lot about "grammar" - if you can't manage to keep your spelling and capitalization straight in your code perhaps you should consider a career in another field.

Programming is - above all - about clarity of expression. If you can't express your problem clearly, you can't solve it.

Bill



as a student i understood what you said,i follow your words from my next post, dont insert smilies while giving worthable advice

Paul Clapham wrote:

Durga Roobini wrote: please help me to get rid of this problem can i able to concat 2 xml file nodelist length? or any other alternate solution to merge xml files with presence of all nodelist



First you have to decide what you want to do. Do you want to concatenate (what you called "concat") the two documents in some way? Or do you want to merge them in some way? The two words mean very different things. And your examples of possible inputs have no obvious relationship, so it's impossible to tell what your desired output is. It certainly doesn't help that you didn't tell us what your desired output is from those inputs.




Sorry paul,for my grammatical mistakes i want desired output like



please help me am helpless

g tsuji wrote:I find it really amazing when the op posted his xml like

he wrote his code like

And then when he presented the document like

he wrote his code like

Is it that hard to pay that little respect to one's own work or is it that somebody, myself for instance, is accused of not being nice ? I think before one asks question, one starts with acquiring the skill of reading and comprehension otherwise I don't see the end of the loop of eternal return.





really i feel depressed please provide answer if you understand means,rather than seeing grammatical some other mistakes

Paul Clapham wrote:Well yes, in fact we DO expect examples which are not misleading. Have a look at our FAQ entry PostRealCode to find out why.



Hai Paul, My xml is dynamic which it is come from some third party server so i want to mash or merge that two files,

so clean example
firstxmlfile

secondxmlfile



so here is two files 1st xml file have 10 nodelist and 2nd xml file have 20 nodelist


by using this code



i try my level best to understand my probelm

please help me to get rid of this problem can i able to concat 2 xml file nodelist length? or any other alternate solution to merge xml files with presence of all nodelist>

g tsuji wrote:Do you understand xml is case-sensitive to begin with ? And then you said your output is <root/> : it seems to be a miracle as well. (What is the complete code to arrive to that result ?) And then if your for loop has index i applied to "Root" (or "root"), it should not be an index apt for element d, e, f. There is only one root in a well-formed document in any way. And then if you start with getElementsByTagName() for "subroot", your code may be closer to what you need but the code is still incredibly confusing. How about you make a more reasonable effort to clean up the logic and the code on your side before posting ? Every single line seems to be dubious at present making help to be a pain rather than a joy. That is my impression with no disguise.




am just mention xml eg here for better understand,are you expect code logic and case senesitive issue in example?

Jeanne Boyarsky wrote:Can you post what got output instead? That way someone can advice without having to recreate the example/




my output is
<root/>


thats it please wxplain me with code
i Have to more xml files i have to merge or combine it in java

for eg how i excepted is




how i can i achieve this using dom


i tried some code but it not display my expected output

i tried code is

1)

2)


i tried above 2 ways but i didnt expected output please help to get rid of this problem
Atleast give me the direct link or partial related link i dont understand what you post reply,am newbie to jsp ,please i have very short time tooo help me
9 years ago