ram kumar

Ranch Hand
+ Follow
since May 22, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by ram kumar

Yes, Thanks man ! Good Work.

>>5. When HTTP Can carry the XML Messages ! Why SOAP is used to carry the XML Messages ? SOAP can be discarded !

>> Can you write me a simple wsdl that has a operation called Print(String value) that passes string as a parameter and returns a String response ...
"Welcome ! Greetings ". that would help me understand the framework.

>> I am using RAD and WebSphere6.1 integarated with Rapid Application Development IDE ...

Right now >>

I am having a WSDL file, and a java code(Webservice) is generated from the WSDL file, I use SOAP UI tool to test the webservice.,,

Unfortunately,

But i dont understand anything, since the wsdl file is too long to read and am new to webservices.

At the end, I need to understand

1.how is this wsdl written, how is the server code generated.
2.How is the client making a call to this framework.
3. The whole framework

I would need this to really put myself up in web services

I need to get a sample tutorial, a very simple tutorial ... that would work in RAD and websphere6.1 to create a web service.

""How are which things related? ""

the relation of XML / SOAP / HTTP / WSDL


Hope,
You will render a good helping hand, thanks Ivan Krizsan
15 years ago
I am very new bie to web services, and I just have simple doubts.

1.Is SOAP Protocol designed to carry messages in the xml format ?

2.Why cant HTTP carry the XML ? SOAP is also a similar protocol to HTTP !

3.What is WSDL doing here ?

4.How are they related ?

Though the answer is, big or small i would like to learn this through people, who are well versed in it?

Please dont provide me links !

I have read enough !

I just need to get cross verified about these concepts.

Would some one just help me in this aspect !
15 years ago

Ankit Garg wrote:

ram kumar wrote:The pop-up thing will work with this servlet solution (I think you want the pop-up to appear as it is the correct behavior)...




Yes ! Isint it right !



Well it is the right behavior. Browsers don't support excel files so they will ask you what you want to do with the response. Usually the browser lets you save the file or open it using a helper application...

No , I need to save the file to the disk .

I should give an option like that and that is the requirement too.
Hey ankit and All !

After Converting from jsp to Servlet code for generating excel,

1.It does not change its color in the background and fore ground.
am not able to get the OPEN/SAVE/CLOSE dialog box.

2.if i say res.setContentType("application/vnd.ms-excel");



its giving me an empty excel file with no contents.

Please help in this regard.

I have give the servlet Code too,







Ankit Garg wrote:Just read this to find out what you are doing wrong.

The pop-up thing will work with this servlet solution (I think you want the pop-up to appear as it is the correct behavior)...




The pop-up thing will work with this servlet solution (I think you want the pop-up to appear as it is the correct behavior)...


Yes ! Isint it right !

Ankit Garg wrote:Ram you are still doing it wrong. You need to do something like this in a Servlet



Yes ! Ankit am trying to integrate that ina servlet as Ulf said.

Of course, do you think that the background

color as i mentioned in the first post will change by making it as a servlet.

also the dialog box.

If so let me have touch on it.

Code corrected.

Hi Ankit, can you just answer some other questions in this scenario

Is that ok.

Still can any one help me in bringing the background color.

and

bringing the dialog box that will popup if i have used

contentType = "vnd.msexcel"

<%//i need this line to popup the dialog box.
//but it does not print any thing in the excel.
//@ page contentType="application/vnd.ms-excel"
%>



Ankit Garg wrote:Ram what are you doing. You have added some HTML to that page, then later on you are creating a excel sheet in your JSP . You should separate the two things. Also when you say that the excel file is empty, what do you mean by that?? Do you mean to say that the excel file saved at C:\excelExample.xls??



Yes ! there are no contents in the excel file , saying size 0 kb.

how do you seperate the html and jsp code in this page !

i need both ! atleast to display title of the page.

Dear All ranchers,

Am using apache POI to write an excel

with one row, one cell, value "HAI"

row -5 cell -6 , value - hai




I have 2 clarifications.

1.when i say this line

<%@ page contentType="application/vnd.ms-excel" %>

It shows me a dialog box that says <OPEN> <SAVE> <CANCEL>

but none of the excel sheet contents are getting printed in the excel sheet , am getting a plain excel sheet

why ?

I need that dialog box and the content as HAI in the ROW -5 and Cell - 6 location.

2.when i comment that line and execute its working fine

as

< commented >
<%//@ page contentType="application/vnd.ms-excel" %>

3.when i say

style1.setFillBackgroundColor(HSSFColor.YELLOW.index);

it fills the cell with normal black.

color "yellow" is not coming in the background.

everything else is fine


I have given the code too :

Please clarify me, as am very new to this forum..

















Also, why dont you use fileoutputstream instead of file and printwriter

Any Advantages ?

16 years ago
Hey All,

I searched how to set that in the properties

I did that too.

But, there lies the problem, am hard coding the path ,

since, prop.store uses fileoutputstream...

Is there any way to avoid this hard coding...

new FileOutputStream("C:/senet/Eclipse-ServerVersion/workspace/WorkOuts/src/ResourceBundle/mainpackage/test.properties");





Complete code :


16 years ago

K. Tsang wrote:Looks ok to me. As long as you get the "expected" output once the Properties is loaded then you should be fine.

Well since you are loading from within jar, but if you are generating on the fly - just to get your head think, what happens if the properties file has read/write access permission problems.



what should be done to change the access rights.

let that be part of the discussion .

Also,

This would be my important question like as get property , do we have a setProperty method that would set a property and value.

if setProperty is not there, how can we achieve it.

Is that just using fileoutputstream...


16 years ago

K. Tsang wrote:

ram kumar wrote:Later i will start using it in all my logics



Hey Ram, honestly if you want to hard-code the path to the properties file bundle with jar, why don't you just generate it on the fly. Exactly what is in this properties file? Enter these things as properties -D when running java can be another option.

If the really want to bundle the ClassLoader.getResource(...) should work as is. Although the path of the properties file inside the jar needs to be fixed. And I don't suggest you put that file in the default package. Suppose your package structure is:



Put the file in say toppackage then you use "ClassLoader.getResource("toppackage/abc.properties");"




Thanks First !

That was a valid input, also.

some how i modified the code to behave this way ..

what do you think about this code.

i set the test.properties in the same package, where DemoGetResourceAsStream.java resides

i mean package ResourceBundle.mainpackage;

It worked perfectly,

I am doubting as will it work for unix machines also, without no change in the code.






AnyMore comments and chages are welcome


16 years ago

ram kumar wrote:

Gamini Sirisena wrote:Try here first...



Is that possible to include that line of code to read as resourceBundle.

Later i will start using it in all my logics



Hey guys please give me a source code,

I am not able to point to the right directory to read a property file as a resourceBundle

am getting filenotfound exception.

say c:\tmp in windows and /tmp in unix machines

i have given the below code too.

am placing the test.properties in the same ResourceBundle package only still ot able to read.

my objective is, -- i will not say the Absolute path of the test.properties,

wherever test.properties is there in the machine, my program should get it from windows machines as well as unix machines

exclusive of the path and location it is present !



Thanks
16 years ago

Gamini Sirisena wrote:Try here first...



Is that possible to include that line of code to read as resourceBundle.

Later i will start using it in all my logics

16 years ago