Hello, I am new in Maximo, I am trying to develop a small Java application that acces an asset and change some properties
But every time I try to perform an update, i get an error message.
Can somebody see what's wrong in my code?
QueryMXASSETType query = new QueryMXASSETType();
try {
MXASSETSOAP12BindingStub stub = new MXASSETSOAP12BindingStub ( new URL("
http://localhost:9080/meaweb/services/MXASSET"),null);
MXASSETQueryType aquery = new MXASSETQueryType();
aquery.setWHERE("assetnum like 'CUVE1'");
query.setMXASSETQuery(aquery);
QueryMXASSETResponseType rep = stub.queryMXASSET(query);
if(rep != null )
{
System.out.println("ok");
MXASSET_ASSETType[] set = rep.getMXASSETSet();
for(int i =0; i < set.length ; i++ )
{
System.out.println("-->"+set
.getASSETNUM());
MXStringType loc = new MXStringType();
loc.set_value("BIZZTEST");
set.setLOCATION(loc);
System.out.println("==>"+set.getLOCATION());
}
UpdateMXASSETType update = new UpdateMXASSETType();
update.setMXASSETSet(set);
stub.updateMXASSET(update);
}
ERROR MESSAGE :
AxisFault
faultCode: {http://www.w3.org/2003/05/soap-envelope}Receiver
faultSubcode:
faultString: org/apache/axis2/AxisFault.makeFault(Ljava/lang/Exception;)Lorg/apache/axis2/AxisFault;
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:org/apache/axis2/AxisFault.makeFault(Ljava/lang/Exception;)Lorg/apache/axis2/AxisFault;
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 org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
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 com.ibm.www.maximo.wsdl.MXASSET.MXASSETSOAP12BindingStub.updateMXASSET(MXASSETSOAP12BindingStub.java:574)
at AssetWebService.updateAsset(AssetWebService.java:55)
at AssetWebService.main(AssetWebService.java:25)
{http://xml.apache.org/axis/}hostname:mx7vm
org/apache/axis2/AxisFault.makeFault(Ljava/lang/Exception;)Lorg/apache/axis2/AxisFault;
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 org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
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 com.ibm.www.maximo.wsdl.MXASSET.MXASSETSOAP12BindingStub.updateMXASSET(MXASSETSOAP12BindingStub.java:574)
at AssetWebService.updateAsset(AssetWebService.java:55)
at AssetWebService.main(AssetWebService.java:25)