Maximo Wire - The IBM Maximo Help & Discussion Forum
May 23, 2012, 12:30:00 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Welcome to Maximo Wire, the IBM Maximo help forum. Feel free to register and ask any Maximo related questions you like.
 
  Home Help Search Login Register  
*
Pages: [1]   Go Down
  Print  
Author Topic: update Maximo object using werbservices  (Read 1459 times)
0 Members and 1 Guest are viewing this topic.
fret
Newbie
*

Karma: 0
Posts: 2


View Profile
« on: May 18, 2011, 08:29:04 am »

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)
Logged
Kelly7Jones
Newbie
*

Karma: 0
Posts: 1



View Profile Email
« Reply #1 on: June 16, 2011, 08:55:19 am »

Just check your

 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());
            }     
The problem lies in the above code.I think.
Logged

Pages: [1]   Go Up
  Print  
 
Jump to:  

Recent

TinyPortal v1.0 beta 4 © Bloc
Powered by MySQL Powered by PHP Powered by SMF 1.1.15 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!