when we use setHeader() method?

hi,when we use setHeader() method?
[48 byte] By [anandh2a] at [2007-10-3 1:04:22]
# 1
When you want to set a different header.
PhHeina at 2007-7-14 18:00:41 > top of Java-index,Java Essentials,Java Programming...
# 2
what type of values return in the setheader() method?
anandh2a at 2007-7-14 18:00:41 > top of Java-index,Java Essentials,Java Programming...
# 3
What about reading the API. It is written for answering such questions.
PhHeina at 2007-7-14 18:00:41 > top of Java-index,Java Essentials,Java Programming...
# 4
What are the JSP atrributes?
anandh2a at 2007-7-14 18:00:41 > top of Java-index,Java Essentials,Java Programming...
# 5
Please refrain from asking "what are" questions, as they usually can be easily answered with a little research of your own. http://www.google.com/search?q=jsp+attributes
CeciNEstPasUnProgrammeura at 2007-7-14 18:00:41 > top of Java-index,Java Essentials,Java Programming...
# 6
I have an interview in the afternoon. Plz anser my qs:* What is a singleton?* Why is it called a singleton if it does not weigh a ton?* Why isn't there a multiton?* Will I fail the interview?:rolleyes:
aniseeda at 2007-7-14 18:00:41 > top of Java-index,Java Essentials,Java Programming...
# 7

Hello,

I need to place some parameters in a header and send the others as

a body. However when i try to place some in a header i get error.

This is the code of the CLIENT:

Header header=new Header();

Vector params = new Vector ();

params.addElement (new Parameter("UserName", String.class,

"xxx", Constants.NS_URI_SOAP_ENC));

(...) <-- other params (similar as the one above)

header.setHeaderEntries(params);

// build the call.

Call call = new Call();

call.setSOAPTransport(st);

call.setSOAPMappingRegistry (smr);

//"urn:xmethods-Temperature" (below--> for the temperature thing

call.setTargetObjectURI("https://www.creditinform.no/creditinform

.standardwebservice.ws2005207/InfoXML");

call.setMethodName("HitListPerson");

call.setEncodingStyleURI("http://schemas.xmlsoap.org/soap/encodin

g/");

call.setHeader(header);

And i get the following error:

java.lang.ClassCastException: org.apache.soap.rpc.Parameter

at org.apache.soap.Header.marshall(Header.java:134)

at org.apache.soap.Envelope.marshall(Envelope.java:197)

at org.apache.soap.Envelope.marshall(Envelope.java:162)

at

org.apache.soap.transport.http.SOAPHTTPConnection.send(SOAPHTTPConnect

ion.java:354)

at org.apache.soap.rpc.Call.invoke(Call.java:261)

Any sugestion could be helpfull.

Thank you for your time,

C.E.

Capitao.Estrelaa at 2007-7-14 18:00:41 > top of Java-index,Java Essentials,Java Programming...