"Invalid Element" AXIS error while calling web service - java

We are calling a web service where RequestDetails is an input object and getting the following error. I've read at multiple forums that the "invalid element"-related error occurs if there is a mismatch between the field at the client and webservice sides. Can anyone shed more light on this?
55-a002-d59e5869552f|884ce533-9236-42e0-bb2c-93beeefddc38|en_GB - xyzabc|m023}
12:15:21,784 [ebContainer : 1] ERROR : oteservice.impl.m023.SendwantRequestExt: Requesting want failed. AxisFault thrown. {JQU|||||c86d4f9c-a493-4e5a-a2ce-d52bee2128b5|884ce533-9236-42e0-bb2c-93beeefddc38|en_GB - xyzabc|m023}
org.apache.axis2.AxisFault: org.xml.sax.SAXException: Invalid element in com.ABC.wm.eu.webserviceapp.ejb.ws.RequestDetails - standardField
at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:512)
at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:370)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:416)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
at com.ABC.applica.v1.privateservices.orderentrytreasurymanagement.extension.wantservice.impl.m023.ws.LocalServiceStub.requestwant(LocalServiceStub.java:773)
at com.ABC.applica.v1.privateservices.orderentrytreasurymanagement.extension.wantservice.impl.m023.SendwantRequestExt.sendwantRequest(SendwantRequestExt.java:183)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:592)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)

Found out what the cause was. The field standardField was missing from the input class RequestDetails.

Related

When javax.xml.ws.soap.SOAPFaultException happen?

My code to call to a port name getDUNSProfile() looks like this:
public class LookupRequestProcessor
{
protected GetCleanseMatchResponse sendRequest(Request request) throws Exception_Exception, GetDUNSProfileFault, PayloadException
{
return DNBPortUtil.getDunsService().getDUNSProfile();
}
}
And I receive an exception as below (Updated with full stacktrace)
java.lang.Error: javax.xml.ws.soap.SOAPFaultException: Error in operation:
at imx.svb.module.getdunsprofile.LookupRequestProcessor.doWork(LookupRequestProcessor.java:478)
at imx.svb.TemplateDatablockProcessor.run(TemplateDatablockProcessor.java:63)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: javax.xml.ws.soap.SOAPFaultException: Error in operation:
at com.sun.xml.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:197)
at com.sun.xml.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:130)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:125)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:95)
at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:136)
at com.sun.proxy.$Proxy97.getDUNSProfile(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at weblogic.wsee.jaxws.spi.ClientInstanceInvocationHandler.invoke(ClientInstanceInvocationHandler.java:84)
at com.sun.proxy.$Proxy98.getDUNSProfile(Unknown Source)
at imx.svb.module.getdunsprofile.LookupRequestProcessor.sendRequest(LookupRequestProcessor.java:258)
at imx.svb.module.getdunsprofile.LookupRequestProcessor.doWork(LookupRequestProcessor.java:472)
Does this mean I called successfully to the port? Or still not reaching it? Is the message Error in operation from exception returned by the The WS server?
Chances are you have reached the Port. Referencing the documentation of the Fault and this thread on code ranch seems to suggest that a fault is being thrown from the provider of the service. In your code can you add a block to catch the Exception and get the SOAPFault being thrown when invoked. If the fault is well handled , it should ideally give you a reason / code as to why the exception is happening.

WebSphere onMessage error : Exception data: java.lang.reflect.InvocationTargetException

Here's my problem :
We have a banking Websphere application (version 7.0.0.27 ) on an AIX multi-instance server. On this application, we have received 51 MQ messages in 1 min to process but for 5 of them, we have the following errors :
[9/23/15 9:18:36:301 CEST] 00000065 LocalExceptio E CNTR0020E: EJB threw an unexpected (non-declared) exception during invocation of method "onMessage" on bean "BeanId(TrefleIntermediationEAR#TrefleEJB-3.4.3.4.jar#OPFRestitutionReception, null)". Exception data: java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor521.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at com.ibm.ejs.jms.listener.ServerSessionDispatcher.dispatch(ServerSessionDispatcher.java:47)
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:98)
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:136)
at com.ibm.ejs.jms.listener.ServerSession.run(ServerSession.java:574)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1646)
Caused by: java.lang.RuntimeException: JMSCC0109: A message driven bean threw a runtime exception 'java.lang.ExceptionInInitializerError'.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:56)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:39)
at java.lang.reflect.Constructor.newInstance(Constructor.java:527)
at com.ibm.msg.client.commonservices.j2se.NLSServices.createException(NLSServices.java:313)
at com.ibm.msg.client.commonservices.nls.NLSServices.createException(NLSServices.java:388)
at com.ibm.msg.client.jms.internal.JmsErrorUtils.createException(JmsErrorUtils.java:104)
at com.ibm.msg.client.jms.internal.JmsSessionImpl.run(JmsSessionImpl.java:3018)
at com.ibm.msg.client.jms.internal.JmsXAQueueSessionImpl$1.run(JmsXAQueueSessionImpl.java:395)
at com.ibm.mq.jms.MQSession.run(MQSession.java:862)
at com.ibm.ejs.jms.JMSSessionHandle.run(JMSSessionHandle.java:1055)
at com.ibm.ejs.jms.listener.ServerSession.connectionConsumerOnMessage(ServerSession.java:1082)
at com.ibm.ejs.jms.listener.ServerSession.onMessage(ServerSession.java:752)
at com.ibm.ejs.jms.listener.ServerSession.dispatch(ServerSession.java:718)
... 8 more
Caused by: java.lang.ExceptionInInitializerError
at java.lang.J9VMInternals.initialize(J9VMInternals.java:222)
at fr.bdf.trefle.trf.launcher.AbstractLauncher.retrieveOverridingStandaloneConnectionData(AbstractLauncher.java:117)
at fr.bdf.trefle.trf.launcher.AbstractLauncher.createFactory(AbstractLauncher.java:83)
at fr.bdf.trefle.trf.launcher.AbstractLauncher.<clinit>(AbstractLauncher.java:71)
at java.lang.J9VMInternals.initializeImpl(Native Method)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:200)
at fr.bdf.trefle.trf.dao.FlowMonitorServiceImpl.insertFlowMonitor(FlowMonitorServiceImpl.java:465)
at fr.bdf.trefle.trf.dao.FlowMonitorServiceImpl.createFlowMonitor(FlowMonitorServiceImpl.java:176)
at fr.bdf.trefle.trf.mdb.OPFRestitutionReception.onMessage(OPFRestitutionReception.java:213)
at com.ibm.ejs.jms.listener.MDBWrapper$PriviledgedOnMessage.run(MDBWrapper.java:302)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:63)
at com.ibm.ejs.jms.listener.MDBWrapper.callOnMessage(MDBWrapper.java:271)
at com.ibm.ejs.jms.listener.MDBWrapper.onMessage(MDBWrapper.java:240)
at com.ibm.mq.jms.MQSession$FacadeMessageListener.onMessage(MQSession.java:147)
at com.ibm.msg.client.jms.internal.JmsSessionImpl.run(JmsSessionImpl.java:2846)
... 14 more
Caused by: java.util.MissingResourceException: Can't find resource for bundle configTechStandalone, key en_US
at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:379)
at java.util.ResourceBundle.getBundle(ResourceBundle.java:108)
at fr.bdf.trefle.common.util.StandaloneTechConfigurable.<clinit>(StandaloneTechConfigurable.java:31)
at java.lang.J9VMInternals.initializeImpl(Native Method)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:200)
... 28 more
From my analysis, here's what I can conclude :
In the stack trace, the root error, mainly java.util.MissingResourceException, doesn't seem like the real cause because the resource the process is trying to get exists and for the other process, this works fine.
I tried to see if the method used to get the resource, getBundle(), has some performance issue but I didn't find anything.
I also tried to see if this was an already existing IBM bug but if it is the case, I can't find it.

Oracle BPEL fault selectionFailure

I have an Oracle SOA Composite that is generating a BPEL fault in Weblogic 11g. In EnterpriseManager I see the fault and the message:
<bpelFault>
<faultType>0</faultType>
<selectionFailure xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"></selectionFailure>
</bpelFault>
When I drill into the instance I see the following message listed on an assignement:
Error in evaluate expression at line "493". The result is empty for the XPath expression :
"/ns27:UsersCollection/ns27:Users/ns27:id"
I see the following error in the WLS-SOA1-diagnostic.log:
com.oracle.bpel.client.BPELFault: faultName: {{http://schemas.xmlsoap.org/ws/2003/03/business-process/}selectionFailure}
messageType: {{http://schemas.oracle.com/bpel/extension}RuntimeFaultMessage}
at com.collaxa.cube.engine.ext.bpel.common.BPELWMPHelper.evalFromValue(BPELWMPHelper.java:344)
at com.collaxa.cube.engine.ext.bpel.v1.wmp.BPEL1AssignWMP.__executeStatements(BPEL1AssignWMP.java:138)
at com.collaxa.cube.engine.ext.bpel.common.wmp.BaseBPELActivityWMP.perform(BaseBPELActivityWMP.java:166)
at com.collaxa.cube.engine.CubeEngine.performActivity(CubeEngine.java:2687)
at com.collaxa.cube.engine.CubeEngine._handleWorkItem(CubeEngine.java:1190)
at com.collaxa.cube.engine.CubeEngine.handleWorkItem(CubeEngine.java:1093)
at com.collaxa.cube.engine.dispatch.message.instance.PerformMessageHandler.handleLocal(PerformMessageHandler.java:78)
at com.collaxa.cube.engine.dispatch.DispatchHelper.handleLocalMessage(DispatchHelper.java:218)
at com.collaxa.cube.engine.dispatch.DispatchHelper.sendMemory(DispatchHelper.java:297)
at com.collaxa.cube.engine.CubeEngine.endRequest(CubeEngine.java:4609)
at com.collaxa.cube.engine.CubeEngine.endRequest(CubeEngine.java:4541)
at com.collaxa.cube.engine.CubeEngine._createAndInvoke(CubeEngine.java:713)
at com.collaxa.cube.engine.CubeEngine.createAndInvoke(CubeEngine.java:560)
at com.collaxa.cube.engine.ejb.impl.CubeEngineBean.createAndInvoke(CubeEngineBean.java:103)
at com.collaxa.cube.engine.ejb.impl.CubeEngineBean.syncCreateAndInvoke(CubeEngineBean.java:145)
at com.collaxa.cube.engine.ejb.impl.bpel.BPELEngineBean.syncCreateAndInvoke(BPELEngineBean.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
Has anyone run into this issue before? It seems strange as we only occasionally see this fault and error.
I made a change to the assignment in question here to "ignoreMissingFromData" and deployed it a few weeks ago and it seems to have worked fine ever since.
Thanks,
Tom

com.google.gdata.util.PreconditionFailedException on ListEntry.update() in Google Docs Java API

I have an application which manipulates the rows of a google spreadsheet. Occasionally, when I call ListEntry.update(), I receive the following stack trace:
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)
Caused by: com.google.gdata.util.PreconditionFailedException: Precondition Failed
Mismatch: etags = ["E10QemAgYit7ImA-CEFaShYM"], version = [2ag9hk74om621l]
at com.google.gdata.client.http.HttpGDataRequest.handleErrorResponse(HttpGDataRequest.java:614)
at com.google.gdata.client.http.GoogleGDataRequest.handleErrorResponse(GoogleGDataRequest.java:564)
at com.google.gdata.client.http.HttpGDataRequest.checkResponse(HttpGDataRequest.java:560)
at com.google.gdata.client.http.HttpGDataRequest.execute(HttpGDataRequest.java:538)
at com.google.gdata.client.http.GoogleGDataRequest.execute(GoogleGDataRequest.java:536)
at com.google.gdata.client.Service.update(Service.java:1563)
at com.google.gdata.client.Service.update(Service.java:1530)
at com.google.gdata.client.GoogleService.update(GoogleService.java:597)
at com.google.gdata.data.BaseEntry.update(BaseEntry.java:639)
at feedProcessor.ProcessClientFeed.UpdateRow(ProcessClientFeed.java:466)
at feedProcessor.ProcessClientFeed.updateGoogleSpreadsheet(ProcessClientFeed.java:404)
at feedProcessor.ProcessClientFeed.processFeed(ProcessClientFeed.java:318)
at feedProcessor.ProcessClientFeed.main(ProcessClientFeed.java:61)
... 5 more
Here is the relevant documentation:
https://developers.google.com/gdata/javadoc/com/google/gdata/data/spreadsheet/ListEntry
https://developers.google.com/gdata/javadoc/com/google/gdata/data/BaseEntry#update()
According to these docs, the update() function is not even capable of throwing a PreconditionFailedException, so the docs are essentially useless here. Testing the issue has shown that this exception is thrown when you try to call the update() function on the same row more than once in a session. Exactly what defines a 'session' is still unclear, but if you loop through all your rows more than once, and call update() on each row in each iteration, you will get this error. The only resolution I am aware of is to write your software such that each row (ListEntry) has update() called only once.
The problem is caused by Google Spreadsheet API Resource Versioning mecanism.
To be able to edit the entry no matter what - just use:
entry.setEtag("*")
before update.
And yes, this is not multi-user friendly. Refetch the feed if you need multi-user support.

The response could not be parsed

I am using redstone-xmlrpc-1.1.1 api with my code and getting this error:
redstone.xmlrpc.XmlRpcException: The response could not be parsed.
at redstone.xmlrpc.XmlRpcClient.handleResponse(Unknown Source)
at redstone.xmlrpc.XmlRpcClient.endCall(Unknown Source)
at redstone.xmlrpc.XmlRpcClient.invoke(Unknown Source)
at redstone.xmlrpc.XmlRpcProxy.invoke(Unknown Source)
at net.bican.wordpress.$Proxy1.newMediaObject(Unknown Source)
at net.bican.wordpress.Wordpress.newMediaObject(Wordpress.java:582)
at WordpressPost.DataWordpressPost.DataPost(DataWordpressPost.java:53)
at arrestcentral.ArrestData.readPdf(ArrestData.java:420)
at arrestcentral.ArrestData.main(ArrestData.java:447)
Caused by: java.io.FileNotFoundException: http://www.arrestcentral.com/XMLrpc.php?
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1478)
... 9 more
can anyone help me why I am unable to post on wordpress..
Well, the exception tells you what's happened - you've tried to fetch a URL of
http://www.arrestcentral.com/XMLrpc.php?
... and it was giving you an HTTP 404 (not found) error. You probably need to change the URL, but you should have more idea of what that URL should be than we do.
java.io.FileNotFoundException: http://www.arrestcentral.com/XMLrpc.php? should have given you a clue:
Nothing was found at the URL you specified. This means that the server returned a HTTP response with the error code 404.
You either mistyped the URL or it no longer exists (at this location).

Categories

Resources