Maximo

 View Only
  • 1.  Custom webservice response

    Posted Thu April 18, 2024 06:06 AM
    Edited by Johnny Thu April 18, 2024 06:13 AM

    Hi,

    I'm trying to add fields on webservice response with scripts and couldnt make it work.

    I've the following response after a post

    <?xml version="1.0" encoding="utf-8"?>
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
        <soapenv:Body>
            <SyncAMSA_SRTRAMOResponse xmlns="http://www.ibm.com/maximo" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" creationDateTime="2024-04-16T19:38:06+02:00" transLanguage="CA" baseLanguage="EN" messageID="4650717132890866778274"></SyncAMSA_SRTRAMOResponse>
        </soapenv:Body>
    </soapenv:Envelope>
    Anybody has an example or a guide of how to add new fields in a WS response using script?



    ------------------------------
    Johnny
    ------------------------------



  • 2.  RE: Custom webservice response

    Posted Fri April 19, 2024 01:54 AM

    On which maximo version you are?

    What is in post message? Usually we get in response also fields we posted, maybe there is some attribute added in post, which "cleans" response.



    ------------------------------
    Juris Flugins
    ------------------------------



  • 3.  RE: Custom webservice response

    Posted Fri April 19, 2024 06:32 AM
    Edited by Johnny Fri April 19, 2024 06:32 AM

    Hi Juris,

    This is one example of the post message, to add a new worklog in a existing workorder. 

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:max="http://www.ibm.com/maximo">
       <soapenv:Header/>
       <soapenv:Body>
          <max:SyncAMSA_SRTRAMO baseLanguage="EN" transLanguage="CA">
             <max:AMSA_SRTRAMOSet>
                <!--Zero or more repetitions:-->
                <max:AMSA_SRTRAMO action="Add" transLanguage="CA">
                   <max:SITEID>PL</max:SITEID>
                   <max:WONUM>1085</max:WONUM>
                   <max:STARTDATETIME>2024-03-04T13:29:15+01:00</max:STARTDATETIME>
                   <max:ENDDATETIME>2024-03-04T15:29:15+01:00</max:ENDDATETIME>
                   <max:ESTDURATION>2</max:ESTDURATION>
                   <max:DESCRIPTION>Corte Add</max:DESCRIPTION>
    		  </max:AMSA_SRTRAMO>
             </max:AMSA_SRTRAMOSet>
          </max:SyncAMSA_SRTRAMO>
       </soapenv:Body>
    </soapenv:Envelope>



    ------------------------------
    Johnny
    ------------------------------



  • 4.  RE: Custom webservice response

    Posted Fri April 19, 2024 10:45 AM

    Hi Johnny,

    What does you log file say? Is this a custom object? Is there any MBO object or field validation occurring on customer object? Can you do a REST POST with same data and get positive results? What other troubleshooting have you done to identify the error/ issue?



    ------------------------------
    Bradley K. Downing , MBA
    Senior Solution Architect
    IBM
    Bakersfield CA
    ------------------------------



  • 5.  RE: Custom webservice response

    Posted Fri April 19, 2024 05:10 PM

    Hi Johnny,
    Can you please share the Request and let me know what do you expect in response. 

    Also share WSDL.

    My mind says we may not even need a custom script we can achieve this by configurations.

    But I will wait for your information first.

    -Sanjay



    ------------------------------
    SANJAY PATIL
    ------------------------------