Anoobkumar Padmanabhan

Ranch Hand
+ Follow
since Aug 08, 2007
Merit badge: grant badges
For More
India
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Anoobkumar Padmanabhan

JAX-WS service failing with below error while testing from SOAP UI. The service is configured with Annotations, and I could see the Service Class name getting displayed in the logs. The RuntimeException occurring when JAXWSMessageReceiver tries to get the EndpointDescription parameter(org.apache.axis2.jaxws.description.EndpointDescription) from service and is responding with null. Any help?

6 years ago
I am facing "Invalid Reference :XXX"(Where XXX is the content id of the attachment) error while trying to invoke a service which accepts SOAP with attachment request(Axis2 1.6.2/1.6.4, Java 1.8).

When I try debugging, I could see attachment is present in MessageContext.attachmnets and got is printed correct from there. But in the execution flow, The following error trace is getting generated. Looks like there is some issue in my RPCMessageReceiver->RPCUtil->BeanUtil->MultirefHelper flow, as the error is when the reference(href) id is comparing with body.getChildElements(). I think the attachment is transferring as separate, not as a child to SOAP Body. Could you please have a look?

08 Aug 2018 15:26:17 ERROR : Exception occurred while trying to invoke service method orchestrateAcordRequest
org.apache.axis2.AxisFault: Invalid reference :b4f63251-c62e-405f-b2fa-939abd706f43
       at org.apache.axis2.databinding.utils.MultirefHelper.processRef(MultirefHelper.java:116)
       at org.apache.axis2.databinding.utils.BeanUtil.processObject(BeanUtil.java:791)
       at org.apache.axis2.databinding.utils.BeanUtil.ProcessElement(BeanUtil.java:737)
       at org.apache.axis2.databinding.utils.BeanUtil.deserialize(BeanUtil.java:646)
       at org.apache.axis2.rpc.receivers.RPCUtil.processRequest(RPCUtil.java:153)
       at org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:206)
       at org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:117)
       at org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40)
       at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:114)
       at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:181)
       at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172)
       at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:146)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
       at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
       at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
       at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301)
       at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:184)
       at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3732)
       at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3696)
       at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
       at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
       at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2273)
       at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)
       at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1490)
       at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
       at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
6 years ago
Hi Ranya,

These methods(before and after) will also do the same checking. right?

If dt1 and dt2 are two date objects,
dt1.before(dt2)
will give true if, dt1 is prior to dt2(ie, dt1<dt2).
after() will do the exact opposite thing.

The compareTo() is working just like the objects comarison in collections(will return -1,0 or 1) according to the condition.
16 years ago
Hi,

Read this article, Making a class immutable
16 years ago
Hi Ganesh

how can we know which is narrower than other


Go through the Java API for exceptions.
The oder means the hierarchical order in the parent-class hierarchi like,

java.lang.Throwable -> java.lang.Exception -> java.sql.SQLException
Hi garima jain,

The instance variable value is determined gy the refernce which is used to invoke it. It is not depending on the object used.

In case of method calling, the case is just reversed. Then, the decision, which method is to be called(From Parent or Child) is taken depending on the object used- not on the reference.
Hi Gansesh

if you are assigning one array variable to other variable instead of assigning values in array through index then it will not effect the original array



When you assign one array variable to another(or an object to another object), the refernce will be changed. ie, the actual parameters-in the calling method and the formal parameter-in the called method, will point to different objects. That is why change in one won't affect the other.
Hi Preetha

But i think 4th also correct. any comments?



The 4th answer was, Dividing floating-point numbers with zero is a runtime exception.

But, when we try to divide a floating-point number by zero, it won't give any error or exception. It will result in the value infinity. So,that option will be false.
Hi Narendra shah,

Object type (not the reference variable's type), determines which overridden
method is used at runtime.


it is actually the definition for overriding. right? The method, which will be called is determined by the type of object at runtime, not by the refence used.
Hi

But P is just a refence of type animal right?
It is not the actula array or object.

V)what is the difference of these

String s ="abcd";
and
String s = new String ("abcd");



In the first case, a string object is created into pool, if no one with the same value is not existing. otherwise, it will simply return the refence to the String, "abcd" from the pool.

In second case, it will create a string object, with the value specified. and the reference to the newly created object will be returned.
As Ganesh explains, the program will create an array of type dog, and this array will be refenced using animal refernce. Anyway, the objects that can be stored in the array should be of type dog.

So that will throw an exception, if you try to add an animal object to the array
Ya its just a question on pass by value. Just understand that when a method is called by passing an argument, the thing passed is only the value. It is not the final variable we are passing. But just the value inside it.
Hi



I dont think the object referred by s will be available for GC at LINE3 because it has the refernce, s, now also. An object will be available for GC, when it don't have any live references.
In my opinion, it will be available for GC at LINE 4, ie, by the end of that method
16 years ago
Hi



In line1, we are doing is that, just giving a new refenrce, z, to the object referred by y. so both y and z are pointing to the same object. In line2, we are assigning the refernce, z to null. ie, only changing the refernce, z. Still, y is pointing to the object. So, this won't be available for garbage collection. So the answer will be right.