janne s

Ranch Hand
+ Follow
since Sep 21, 2004
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by janne s

Hi!

I'm trying to consume the webservices.I downloaded the latest axis version. using axis i got the java class, binding stub generated.When i send an id to webservices, it returns the data related to the id.When i try to invoke the service it get ClassCastException. I did google but found no solution. below is the code...

*************************************
TestClient:
public void searchMpi() throws Exception {
try{

MPIServiceLocator temp = new MPIServiceLocator();
MPI mpi = temp.getMPI();
MPIQueryReply x = MPIQueryReply)mpi.queryRecord(in0String,in1Long);

System.out.println(x.getRecord());
System.out.println("Status : " + x.getStatus());
System.out.println("Status String : " + x.getStatusString());
}
catch (Exception e){
e.printStackTrace();
} }

public static void main(String[] args) throws Exception {
QueryMpi qmpi = new QueryMpi();
qmpi.searchMpi();

*****************************************
axis generated soap binding stub class
public com.stchome.mpi.MPIQueryReply queryRecord(java.lang.String in0, long in1) throws java.rmi.RemoteException {

if (super.cachedEndpoint == null) {

throw new org.apache.axis.NoEndPointException();
}
}

org.apache.axis.client.Call _call = createCall();
_call.setOperation(_operations[0]);
_call.setUseSOAPAction(true);
_call.setSOAPActionURI(""); // jaya code
_call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
_call.setOperationName(new javax.xml.namespace.QName("urn:mpi", "queryRecord"));

setRequestHeaders(_call);
setAttachments(_call);

try {

java.lang.Object _resp = _call.invoke(new java.lang.Object[] {in0, new java.lang.Long(in1)});

if (_resp instanceof java.rmi.RemoteException) {
throw (java.rmi.RemoteException)_resp;
} else {
extractAttachments(_call);
try {
return (com.stchome.mpi.MPIQueryReply) _resp;
}
catch (java.lang.Exception _exception)
{
return (com.stchome.mpi.MPIQueryReply) org.apache.axis.utils.JavaUtils.convert(_resp, com.stchome.mpi.MPIQueryReply.class);
}
}
} catch (org.apache.axis.AxisFault axisFaultException) {
throw axisFaultException;
}

***********************************************************
Stack Trace:

AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.lang.ClassCastException
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:java.lang.ClassCastException
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at mpi.MPISoapBindingStub.queryRecord(MPISoapBindingStub.java:288)
at phh.latb.mpi.QueryMpi.searchMpi(QueryMpi.java:90)
at phh.latb.mpi.QueryMpi.main(QueryMpi.java:283)

{http://xml.apache.org/axis/}hostname : NOIC

java.lang.ClassCastException
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at mpi.MPISoapBindingStub.queryRecord(MPISoapBindingStub.java:288)
at phh.latb.mpi.QueryMpi.searchMpi(QueryMpi.java:90)
at phh.latb.mpi.QueryMpi.main(QueryMpi.java:283)

*********************************************
Thanks in advance
janne
14 years ago
Hi! I'm also into similar kind of problem .pls help.

I'm using axis1.3

Below is the stack trace.

java.lang.NullPointerException

AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.lang.NullPointerException
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:java.lang.NullPointerException
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at mpi.MPISoapBindingStub.queryRecord(MPISoapBindingStub.java:268)
at dhh.oph.latb.mpi.MPIClientTest.search(MPIClientTest.java:32)
at dhh.oph.latb.mpi.MPIClientTest.main(MPIClientTest.java:53)

{http://xml.apache.org/axis/}hostname : PHH-YYS

java.lang.NullPointerException
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at mpi.MPISoapBindingStub.queryRecord(MPISoapBindingStub.java:268)
at dhh.oph.latb.mpi.MPIClientTest.search(MPIClientTest.java:32)
at dhh.oph.latb.mpi.MPIClientTest.main(MPIClientTest.java:53)



Thank you.

[ November 09, 2005: Message edited by: janne s ]
[ November 09, 2005: Message edited by: janne s ]
14 years ago
HI!

check the API of JSp Context and Page Context
there is getRequest() method.
Answer is correct in HFS Book.


jaya
Hi!

I want to learn and find job in testing.
pls suggest how shud i start,are there any books,
online matrerial available...


Thanks,
jaya
15 years ago
Hi!

I passed SCWCD1.4 exam and now i want to go head with SCBCD exam.
Pls suggest me the book i shud follow and the any preparation material available on net.


Thank you
jaya
Thanks to all of you

I got 70 questions and i don't remmeber how many from each obj i got.
many of the questions were easy except with patterns and some questions were tricky...i would say if you understand the concepts it would be easy
to get through.

I took test in Brain Bench JSp1.2 and i got 91% .

Good Luck to all of you.

jaya
Hi!


posting bit late...I took exam on friday and scored 72%. prepared seriously for 2 1/2 weeks...read HFS and followed forum. Thanks to HFS authors and all ranchers who instantly gave replies to my posts. Marco's notes was very helpful for revision. I literally have no work experince nor knowledge of servlets and jsp. Now i got good foundation and start working on them more.


Thank you once again to HFs authors.

Jaya
hi!

where does standard actions endup in jsp translated servlet?



thank you
HI!

is this stmt correct:


RequestDispatcher.forward() is also a normal method call, so the control does return to the calling resource.
Hi!

pls help me with this...
I've a doubt in this code..this from a jdiscuss mock exam

In the doGet() of FirstServlet:
PrintWriter out = response.getWriter();
out.println("<html><body>Page 1");
RequestDispatcher rd = request.getRequestDispatcher("NextServlet");
rd.forward(request, response);
out.println("<br>Page 3</body></html>");
In the doGet() of SecondServlet:
PrintWriter out = request.getWriter();
out.println("<br>Page 2");


Ans: throws:IILEGALSTATE EXCEPTION.

when i exceuted it didn't throw any exception.



thank you
Hi!

Even i'll be taking test very soon...
i too have same paln as you mentioned.

it would be helpful if i get some tips from people who already too exam.
is there any survey?

i'm not scoring good in custom tags ....


thank you
[ March 24, 2005: Message edited by: jaya m ]