Topic
7 replies Latest Post - ‏2013-02-05T20:09:19Z by SystemAdmin
MuthukrishnanManoharan
6 Posts
ACCEPTED ANSWER

Pinned topic Updation of an object through maximo web service

‏2010-07-22T05:33:19Z |
This is regarding the maximo web services for Tivoli service request manager. When we try to issue an update request for a "problem", we get a

<faultstring>nested exception is: psdi.util.MXApplicationException: BMXAA1496E - PROBLEM does not exist. Cannot update or delete.</faultstring>

though we specify the appropriate ticket ID. For example our soap message is


<soapenv:Envelope xmlns:soapenv=
"http://schemas.xmlsoap.org/soap/envelope/" xmlns:max=
"http://www.ibm.com/maximo"> <soapenv:Header/> <soapenv:Body> <max:UpdateMXPROBLEM> <max:MXPROBLEMSet> <!--Zero or more repetitions:--> <max:PROBLEM> <max:TICKETID>
'1003'</max:TICKETID> <max:DESCRIPTION>
"new desc"</max:DESCRIPTION> </max:PROBLEM> </max:MXPROBLEMSet> </max:UpdateMXPROBLEM> </soapenv:Body> </soapenv:Envelope>


And we see that we have a ticket ID of 1003 in UI. Can anybody help us with the appropriate soap message for an updation. Also do we have a document regarding the consumption of maximo web services?
Updated on 2013-02-05T20:09:19Z at 2013-02-05T20:09:19Z by SystemAdmin
  • tseeling
    tseeling
    8 Posts
    ACCEPTED ANSWER

    Re: Updation of an object through maximo web service

    ‏2010-07-22T08:55:02Z  in response to MuthukrishnanManoharan
    I suggest you install a tool like soapui or xmlspy to query the webservice.
    such a tool can generate an XML template for you.

    We have a MXISProblem interface and the data XML starts like this:

    <soapenv:Envelope
    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:int="http://www.mro.com/mx/integration">
    <soapenv:Header/>
    <soapenv:Body>
    <int:MXISProblem language="?" version="?">
    <int:Header operation="Notify" event="?">
    <int:SenderID>?</int:SenderID>
    <int:CreationDateTime>?</int:CreationDateTime>
    <int:RecipientID>?</int:RecipientID>
    <int:MessageID>?</int:MessageID>
    </int:Header>
    <int:Content>
    <!--Zero or more repetitions:-->
    <int:MXISPR>
    <int:PROBLEM action="?">
    <int:TICKETID changed="?" operator="?">?</int:TICKETID>
    <int:DESCRIPTION changed="?" operator="?">?</int:DESCRIPTION>
    • MuthukrishnanManoharan
      6 Posts
      ACCEPTED ANSWER

      Re: Updation of an object through maximo web service

      ‏2010-07-22T09:13:08Z  in response to tseeling
      We used SOAP UI to check the XML in and out of the web service.
      
      <soapenv:Envelope xmlns:soapenv=
      "http://schemas.xmlsoap.org/soap/envelope/" xmlns:max=
      "http://www.ibm.com/maximo"> <soapenv:Header/> <soapenv:Body> <max:UpdateMXPROBLEM> <max:MXPROBLEMSet> <!--Zero or more repetitions:--> <max:PROBLEM> <max:TICKETID changed=
      "?">?</max:TICKETID> <max:DESCRIPTION changed=
      "?">?</max:DESCRIPTION> <max:DESCRIPTION_LONGDESCRIPTION changed=
      "?">?</max:DESCRIPTION_LONGDESCRIPTION> </max:PROBLEM> </max:MXPROBLEMSet> </max:UpdateMXPROBLEM> </soapenv:Body> </soapenv:Envelope>
      

      I just wanted to know where to put the new value for description for the problem to be updated. We tried all combination. For example to update the description of the problem with ticket ID = 1003, how the above XML should be modified?

      Thanks for the response
  • tseeling
    tseeling
    8 Posts
    ACCEPTED ANSWER

    Re: Updation of an object through maximo web service

    ‏2010-07-22T09:35:46Z  in response to MuthukrishnanManoharan
    > I just wanted to know where to put the new value for description

    we found out that for some actions it is necessary to explicitly state the action to do, e.g. "AddReplace".

    here is an example from our incident webservice:

    <DESCRIPTION>
    $req_vars{'customer_code'}
    $req_vars{'hostname'}
    </DESCRIPTION>
    <DESCRIPTION_LONGDESCRIPTION>
    Created by $req_vars{'TEC_ADMIN'}
    Source: $req_vars{'source'}
    Message: $req_vars{'msg'}
    </DESCRIPTION_LONGDESCRIPTION>
  • NilayDonmez
    NilayDonmez
    2 Posts
    ACCEPTED ANSWER

    Re: Updation of an object through maximo web service

    ‏2010-09-29T08:38:23Z  in response to MuthukrishnanManoharan
    Hello,
    We are also facing the same problem. We are using Maximo web services and trying to update INCIDENT records. But unfortunatelley we get the error below. Could anyone help us with this? We tried to update many records with different TICKETIDs.. But it's always the same.. Thanks for your help..

    email : nilay.donmez@isbank.com.tr

    <Exception>org.apache.axis2.AxisFault: nested exception is: psdi.util.MXApplicationException: BMXAA1496E - INCIDENT does not exist. Cannot update or delete.; nested exception is:
    javax.ejb.EJBException: nested exception is: psdi.util.MXApplicationException: BMXAA1496E - INCIDENT does not exist. Cannot update or delete.
    at org.apache.axis2.AxisFault.makeFault(AxisFault.java:385)
    at psdi.iface.webservices.SoapFault.makeSoapFault(SoapFault.java:57)
    at psdi.iface.webservices.EnterpriseWebService.processDocument(EnterpriseWebService.java:188)
    at sun.reflect.GeneratedMethodAccessor277.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:618)
    at org.apache.axis2.receivers.RawXMLINOutMessageReceiver.invokeBusinessLogic(RawXMLINOutMessageReceiver.java:83)
    at org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive(AbstractInOutSyncMessageReceiver.java:39)
    at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:220)
    at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:271)
    at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:118)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:989)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:501)
    at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:464)
    at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:90)
    at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:744)
    at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1455)
    at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:113)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:454)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:383)
    at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
    at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
    at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
    at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
    at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
    at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:195)
    at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:743)
    at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:873)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469)
    Caused by: javax.ejb.EJBException: nested exception is: psdi.util.MXApplicationException: BMXAA1496E - INCIDENT does not exist. Cannot update or delete.
    at psdi.iface.gateway.MEAGatewayBean.secureProcessExternalDataSync(MEAGatewayBean.java:98)
    at psdi.iface.gateway.EJSLocalStatelessenterpriseservice_9dde8a69.secureProcessExternalDataSync(Unknown Source)
    at psdi.iface.util.WebUtil.invokeEnterpriseEJB(WebUtil.java:234)
    at psdi.iface.webservices.EnterpriseWebService.processDocument(EnterpriseWebService.java:129)
    ... 28 more
    Caused by: psdi.util.MXApplicationException: BMXAA1496E - INCIDENT does not exist. Cannot update or delete.
    at psdi.iface.mos.MosProcessImpl.updateMaximoObject(MosProcessImpl.java:1397)
    at psdi.iface.mos.MosProcessImpl.setMainMaximoTable(MosProcessImpl.java:619)
    at psdi.iface.mos.MosProcessImpl.fillMaximoTables(MosProcessImpl.java:355)
    at psdi.iface.mos.MosProcessImpl.processExternalData(MosProcessImpl.java:258)
    at psdi.iface.mic.MicSetIn.processExternalData(MicSetIn.java:151)
    at psdi.iface.mic.MicService.processDataIn(MicService.java:1367)
    at psdi.iface.mic.MicService.processExternalData(MicService.java:1262)
    at psdi.iface.mic.MicService.processExternalData(MicService.java:1097)
    at psdi.iface.gateway.MEAGatewayBean.secureProcessExte
    • SystemAdmin
      SystemAdmin
      5842 Posts
      ACCEPTED ANSWER

      Re: Updation of an object through maximo web service

      ‏2013-02-05T20:09:19Z  in response to NilayDonmez
      Updating a Service Request (SR) WORKS fine:

      @NilayDonmez : thanks : Adding the <max:CLASS> made the UPDATE work
      Heres the xml I used:

      <?xml version="1.0" encoding="UTF-8"?>
      <max:UpdateMXSR xmlns:max="http://www.ibm.com/maximo">
      <max:MXSRSet>
      <max:SR>
      <max:TICKETID changed="true">1026</max:TICKETID>
      <max:CLASS>SR</max:CLASS>
      <max:DESCRIPTION changed="true">Detail_pkm_101_B</max:DESCRIPTION>
      <max:DESCRIPTION_LONGDESCRIPTION
      changed="true">Summary_pkm_101_B</max:DESCRIPTION_LONGDESCRIPTION>
      </max:SR>
      </max:MXSRSet>
      </max:UpdateMXSR>

      The URL looks like this: http://<host>:9080/meaweb/os/mxsr
      Used Firefox Plugin: POSTER to post the XML
      For : SCCD 7.5
  • NilayDonmez
    NilayDonmez
    2 Posts
    ACCEPTED ANSWER

    Re: Updation of an object through maximo web service

    ‏2010-09-29T15:24:28Z  in response to MuthukrishnanManoharan
    Hi
    Could you please add the following lines to your code. Insert the line inside the PROBLEM entity.
    <max:CLASS>PROBLEM</max:CLASS>

    Reason: CLASS and TICKETID must be provided together. These two make the record unique together

    Finally your xml will look like this:

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:max="http://www.ibm.com/maximo">
    <soapenv:Header/>
    <soapenv:Body>
    <max:UpdateMXPROBLEM>
    <max:MXPROBLEMSet>
    <!--Zero or more repetitions:-->
    <max:PROBLEM>
    <max:TICKETID>'1003'</max:TICKETID>
    <max:CLASS>PROBLEM</max:CLASS>
    <max:DESCRIPTION>"new desc"</max:DESCRIPTION>
    </max:PROBLEM>
    </max:MXPROBLEMSet>
    </max:UpdateMXPROBLEM>
    </soapenv:Body>
    </soapenv:Envelope>
    I hope this will help you.
    Best regards
    Eray Kaya
    • SystemAdmin
      SystemAdmin
      5842 Posts
      ACCEPTED ANSWER

      Re: Updation of an object through maximo PERL web service - helped need

      ‏2011-07-09T19:28:07Z  in response to NilayDonmez
      hi all,

      I am looking for simple perl program to communicate with Maximo server (V7x) and query the ServiceRequest thru SOAP WSDL. Somehow i am able to connect the Maximo server, but couldn't invoke any MXSR methods.. Please find my code below... not sure what I am doing wrong , any little help is appreciable...

      Fyi- the XML code is working perfectly in SoapUI and Eclipse

      List of available method(s): UpdateMXSR CreateMXSR DeleteMXSR QueryMXSR SyncMXSR
      #!/usr/bin/perl
      use strict;
      use SOAP::Lite;

      my $g_hostname = 'http://tsrmmaxdb71.fazal.local/meaweb/wsdl/MXSR.wsdl';
      my $UserName = 'maxadmin';
      my $Password = 'maxadmin';

      sub SOAP::Transport::HTTP::Client::get_basic_credentials {
      return $UserName => $Password;
      }
      my $service = SOAP::Lite->service($g_hostname);
      my $XML = '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:max="http://www.ibm.com/maximo">
      <soapenv:Header/>
      <soapenv:Body>
      <max:QueryMXSR creationDateTime="" baseLanguage="" transLanguage="" messageID="" maximoVersion="" uniqueResult="0" maxItems="0" rsStart="0">
      <max:MXSRQuery orderby="" operandMode="AND">
      <!--Optional:-->
      <max:WHERE/>
      <!--Optional:-->
      <max:SR>
      <!--0 to 2 repetitions:-->
      <max:TICKETID operator="=">"1001"</max:TICKETID>
      <max:CLASS> SR </max:CLASS>
      </max:SR>
      </max:MXSRQuery>
      </max:QueryMXSR>
      </soapenv:Body>
      </soapenv:Envelope>';

      $service ->outputxml('true');
      my $result = $service->QueryMXSR($XML);
      print $result;