Maximo Open Forum

Expand all | Collapse all

Automation Script to pass Request to External System using WSDL url

  • 1.  Automation Script to pass Request to External System using WSDL url

    Posted 05-24-2021 03:24
    Hi All,
    I have a requirement to create Incident in SAP when an Incident is created in Maximo. 
    We got an WSDL url for Incident of the External System. Is there a way to write automation script to pass XML request to the External System using this  WSDL url as we do in SAOPUI?
    #Customizations

    ------------------------------
    Harshavardhan Kamepalli
    Eidiko System Integrators
    ------------------------------


  • 2.  RE: Automation Script to pass Request to External System using WSDL url

    Posted 05-25-2021 05:21
    Hi All,
    I have completed the following steps:
    1) Created a HTTP End Point.
    2) Created a Publish Channel with the Incident Object Structure which has Inbound and Outbound Processing.
    3) Created a External System and selected the above created 'End Point' and 'Public Channel'.

    Now, I want to know how to write an Integration Script to on this Publish Channel and dynamically pass data of the attributes like 'ReportedBy' and 'Description' of Maximo Incident Record into the following XML Request and execute the script when a new Incident is created in Maximo.
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:sap-com:document:sap:soap:functions:mc-style">
       <soapenv:Header/>
       <soapenv:Body>
          <urn:ProcessIncident>
             <IctAdditionalInfos/>
             <IctAttachments/>
             <IctHead>
                <IncidentGuid></IncidentGuid>
                <RequesterGuid></RequesterGuid>
                <ProviderGuid></ProviderGuid>
                <AgentId></AgentId>
                <ReporterId>'REPORTEDBY'</ReporterId>
                <ShortDescription>'DESCRIPTION'</ShortDescription>
                <Priority>1</Priority>
                <Language>EN</Language>
                <RequestedBegin>20210525073107</RequestedBegin>
                <RequestedEnd>20210525073107</RequestedEnd>
             </IctHead>
             <IctId>3</IctId>
             <IctPersons>
                <item>
                   <PersonId></PersonId>
                   <PersonIdExt></PersonIdExt>
                   <Sex></Sex>
                   <FirstName></FirstName>
                   <LastName></LastName>
                   <Telephone>
                      <PhoneNo></PhoneNo>
                      <PhoneNoExtension></PhoneNoExtension>
                   </Telephone>
                   <MobilePhone></MobilePhone>
                   <Fax>
                      <FaxNo></FaxNo>
                      <FaxNoExtension></FaxNoExtension>
                   </Fax>
                   <Email></Email>
                </item>
             </IctPersons>
             <IctSapNotes/>
             <IctSolutions/>
             <IctStatements>
                <item>
                   <TextType>SU99</TextType>
                   <Texts>
                      <item>This is from SOAPUI</item>
                   </Texts>
                   <Timestamp></Timestamp>
                   <PersonId></PersonId>
                   <Language>EN</Language>
                </item>
             </IctStatements>
             <IctTimestamp></IctTimestamp>
             <IctUrls>
             </IctUrls>
          </urn:ProcessIncident>
       </soapenv:Body>
    </soapenv:Envelope>​
    The above request creates a new Incident Request in the SAP SolMan Environment and tested it using SOAPUI.

    ------------------------------
    Harshavardhan Kamepalli
    Eidiko System Integrators
    ------------------------------



  • 3.  RE: Automation Script to pass Request to External System using WSDL url

    Posted 05-25-2021 09:21
    Go to to your Maximo system and look at Automation Scripts.
    The Create menu will subdivide into many choices
    Use Create Script for Integration.
    If you are not a novice like me perhaps you will know what to write
    I had a need to use SOAP in a project so I was given some good advice by the Gurus of Maximo
    Open a External Website with Params from Maximo | Maximo Integration (ibm.com)

    I had trouble understanding nomenclature etc on what to do.
    I also changed my design because using eclipse to debug code was far easier than trying to understand scripting
    so I ended up using a  user exit class on my publish channel for my design so in my mind you would  probably use a User Exit.


    If you need to manipulate the SOAP message output for your integration  I created a handler  as I had to change the soap structure. My soap receiver has more requirements than usual. For e.g your soap message has an empty header tag but my system receiving maximo messages wouldn't do so.
     <soapenv:Header/>​


    while researching I found a whole lot of material in google and IBM as well and a lot of helpful people.













    ------------------------------
    Appu nair
    APPECM
    ------------------------------



  • 4.  RE: Automation Script to pass Request to External System using WSDL url

    Posted 05-25-2021 10:05
    Hi Appu Nair,
    Thanks for taking your time and replying for the post.
    I'm too new for Integration Scripting and actually this is my first time writing a Integration Script. So, it has become a challenge for me to understand this process.
    I know that we get different XML structure to that of External System and we have to map some fields from the Maximo Outbound XML to External System Request.
    Maximo XML Request Structure that a Publish Channel process:
    <?xml version="1.0" encoding="UTF-8"?>
    <max:PublishMXD-INCIDENT xmlns:max="http://www.ibm.com/maximo" creationDateTime="2008-09-29T02:49:45" baseLanguage="string" transLanguage="string" messageID="string" maximoVersion="string" event="0">
      <max:MXD-INCIDENTSet>
        <max:INCIDENT action="Delete" relationship="string" deleteForInsert="string" transLanguage="string">
          <max:MAXINTERRORMSG>string</max:MAXINTERRORMSG>
          <max:AFFECTEDPERSON changed="true">string</max:AFFECTEDPERSON>
          <max:CLASS maxvalue="string" changed="true">string</max:CLASS>
          <max:CREATEDBY changed="true">string</max:CREATEDBY>
          <max:DESCRIPTION changed="false">string</max:DESCRIPTION>
          <max:REPORTDATE changed="false">2009-05-16T13:42:28</max:REPORTDATE>
          <max:REPORTEDBY changed="false">string</max:REPORTEDBY>
          <max:SOURCE changed="true">string</max:SOURCE>
          <max:TICKETID changed="false">string</max:TICKETID>
        </max:INCIDENT>
      </max:MXD-INCIDENTSet>
    </max:PublishMXD-INCIDENT>​

    This is what my External System Request looks like:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:sap-com:document:sap:soap:functions:mc-style">
       <soapenv:Header/>
       <soapenv:Body>
          <urn:ProcessIncident>
             <IctAdditionalInfos/>
             <IctAttachments/>
             <IctHead>
                <IncidentGuid>00155D433C321EDBAFA5E005B59C12DA</IncidentGuid>
                <RequesterGuid>9219F59AC585431AB7D6DDA03EA520AA</RequesterGuid>
                <ProviderGuid>00155D433C321EDBAF8A2AD9D8A220DA</ProviderGuid>
                <AgentId></AgentId>
                <ReporterId>SPILLI</ReporterId>
                <ShortDescription>Sample Incident Record from SOAP</ShortDescription>
                <Priority>1</Priority>
                <Language>EN</Language>
                <RequestedBegin>20210525073107</RequestedBegin>
                <RequestedEnd>20210525073107</RequestedEnd>
             </IctHead>
             <IctId>3</IctId>
             <IctPersons>
                <item>
                   <PersonId>SPILLI</PersonId>
                   <PersonIdExt>SPILLI</PersonIdExt>
                   <Sex></Sex>
                   <FirstName>Srinivas</FirstName>
                   <LastName>Pilli</LastName>
                   <Telephone>
                      <PhoneNo></PhoneNo>
                      <PhoneNoExtension></PhoneNoExtension>
                   </Telephone>
                   <MobilePhone></MobilePhone>
                   <Fax>
                      <FaxNo></FaxNo>
                      <FaxNoExtension></FaxNoExtension>
                   </Fax>
                   <Email></Email>
                </item>
             </IctPersons>
             <IctSapNotes/>
             <IctSolutions/>
             <IctStatements>
                <item>
                   <TextType>SU99</TextType>
                   <Texts>
                      <item>This is from SOAPUI</item>
                   </Texts>
                   <Timestamp>20210525073107</Timestamp>
                   <PersonId>SPILLI</PersonId>
                   <Language>EN</Language>
                </item>
             </IctStatements>
             <IctTimestamp>20210525073107</IctTimestamp>
             <IctUrls>
             </IctUrls>
          </urn:ProcessIncident>
       </soapenv:Body>
    </soapenv:Envelope>​
    So,  here I have to take data from the above Maximo XML when a Incident ticket is raised and Insert it some of the fields in the below Request and pass it to the External System Web Service. 
    I have completed the pre-requisites of creating the 'End Point', 'Publish Channel' and 'External System'. I am struck at writing the script to make the Integration happen.
    The Challenge here is we do not have a middleware to transform the data from Source to External System. So, thought of using XSL Map feature.

    I was scouting google for this to happen and found a script(below) to , Can we write this in an 'Action Launch Point' and place it in the workflow node to export data to the External System?
    from psdi.server import MXServer
    from psdi.mbo import Mbo
    server = MXServer.getMXServer()
    userInfo = mbo.getUserInfo()
    whereClause = "status='NEW'"
    server.lookup("MIC").exportData("SOLMAN", "SOLMAN", whereClause, userInfo, 1000)​


    ------------------------------
    Harshavardhan Kamepalli
    Eidiko System Integrators
    ------------------------------



  • 5.  RE: Automation Script to pass Request to External System using WSDL url

    Posted 05-25-2021 10:32
    I think the code you show I use in my java code to send output to the real external system client, what I mean is a consumer of the Maximo output. . What scripting in Maximo is a misnomer, it is server-side scripting,  it is still compiled to Maximo java classes but what you get out of it is if it is java classes then the maximo.ear file needs to be rebuilt. I am pretty sure if you see an echo or console output in that script of yours most likely it will work.

    I use this mantra...

    Need to change XML- Use XSL map or user exit class
    Need to send out to a "real" external system through the external system of maximo-use endpoint and handler manipulation :)
    Eclipse is your saviour...

    other than that I still am a learner.

    @Bruno Portaluri @Steven Shull  @Alex Walter     and Viet Tran look ​ at this space so they will be able to give you qualified advice I was just trying to help in case you didn't know where to find that Automation Script...​​​​

    ------------------------------
    Appu nair
    APPECM
    ------------------------------



  • 6.  RE: Automation Script to pass Request to External System using WSDL url

    Posted 05-25-2021 10:46
    Thanks for the Suggestion Appu Nair,
    Yeah, I need to send the request to a real External System and I think using Eclipse to send the request to the External System would be deal breaker in this scenario.

    ------------------------------
    Harshavardhan Kamepalli
    Eidiko System Integrators
    ------------------------------



  • 7.  RE: Automation Script to pass Request to External System using WSDL url

    Posted 05-25-2021 12:04
    I use Eclipse only in the sense to debug Maximo calls. I don't use Eclipse in our product deployment or any of its libraries.
    A full 3 months into Maximo development I understood that automation scripting is really for advanced Maximo people as debugging and libraries one can use are very difficult to understand. There is a walk-through in the web for automation script debugging I found but I found it very challenging to understand. So in the interest of time, I started using the Maximo product and Eclipse's debugging ability to get to the point where I am. The inspector in Eclipse is very helpful to understand MBO Datastructures. I just wanted to say that as a clarification.

    ------------------------------
    Appu nair
    APPECM
    ------------------------------



  • 8.  RE: Automation Script to pass Request to External System using WSDL url

    Maximo Certified
    Posted 05-26-2021 13:28
    Unless I'm misunderstanding, the XSL Map feature should allow you to achieve the transformation you're looking for without the need of Automation Scripts. Check out this article:
    https://a3jgroup.com/xslt-data-transformation-in-maximo/

    You can transform the message into the full SAP message (including SOAP envelope) and then use the HTTP handler to deliver the message to the end point. You would likely need to specify the soapAction in the HTTP header as a parameter.

    Hope this helps,


    ------------------------------
    Alex Walter
    A3J Group, LLC
    ------------------------------



  • 9.  RE: Automation Script to pass Request to External System using WSDL url

    Posted 05-27-2021 00:17
    Thanks Alex, I already followed your process of XSLT transformation and successfully transformed the Maximo XML format to SAP format.
    Maximo Message(Simplified Object Structure of Incident):
    <?xml version="1.0" encoding="UTF-8"?>
    <max:PublishMXD-INCIDENT xmlns:max="http://www.ibm.com/maximo" creationDateTime="2008-09-29T02:49:45" baseLanguage="string" transLanguage="string" messageID="string" maximoVersion="string" event="0">
      <max:MXD-INCIDENTSet>
        <max:INCIDENT action="Delete" relationship="string" deleteForInsert="string" transLanguage="string">
          <max:MAXINTERRORMSG>string</max:MAXINTERRORMSG>
          <max:AFFECTEDPERSON changed="true">string</max:AFFECTEDPERSON>
          <max:CLASS maxvalue="string" changed="true">string</max:CLASS>
          <max:CREATEDBY changed="true">string</max:CREATEDBY>
          <max:DESCRIPTION changed="false">string</max:DESCRIPTION>
          <max:REPORTDATE changed="false">2009-05-16T13:42:28</max:REPORTDATE>
          <max:REPORTEDBY changed="false">string</max:REPORTEDBY>
          <max:SOURCE changed="true">string</max:SOURCE>
          <max:TICKETID changed="false">string</max:TICKETID>
        </max:INCIDENT>
      </max:MXD-INCIDENTSet>
    </max:PublishMXD-INCIDENT>​
    ​My XSLT code:
    <?xml version='1.0'?>
    <xsl:stylesheet version='1.0' xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:mro="http://www.ibm.com/maximo">
    	<xsl:output method="xml" omit-xml-declaration="no" indent="yes" encoding="UTF-8"/>
    	
    		<xsl:template match="/">
    			<xsl:apply-templates select="mro:PublishMXD-INCIDENT"/>
    		</xsl:template>
    		
    		<xsl:template match="mro:PublishMXD-INCIDENT">
    			<xsl:apply-templates select="mro:MXD-INCIDENTSet"/>
    		</xsl:template>
    		
    		<xsl:template match="mro:MXD-INCIDENTSet">
    			<xsl:apply-templates select="mro:INCIDENT"/>
    		</xsl:template>
    		
    		<xsl:template match="mro:INCIDENT">
    		<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:sap-com:document:sap:soap:functions:mc-style">
    		<soapenv:Header/>
    		<soapenv:Body>
    			<urn:ProcessIncident>
    				<IctAdditionalInfos/>
    				<IctAttachments/>
    				<IctHead>
    					<IncidentGuid>00155D433C321EDBAFA5E005B59C16DA</IncidentGuid>
    					<RequesterGuid>9219F59AC585431AB7D6DDA03EA520AA</RequesterGuid>
    					<ProviderGuid>00155D433C321EDBAF8A2AD9D8A220DA</ProviderGuid>
    					<AgentId></AgentId>
    					<xsl:apply-templates select="mro:REPORTEDBY"/>
    					<xsl:apply-templates select="mro:DESCRIPTION"/>
    					<Priority>1</Priority>
    					<Language>EN</Language>
    					<RequestedBegin>20210525073107</RequestedBegin>
    					<RequestedEnd>20210525073107</RequestedEnd>
    				</IctHead>
    				<IctId>3</IctId>
    				<IctPersons>
    					<item>
    						<xsl:apply-templates select="mro:AFFECTEDPERSON"/>
    						<PersonIdExt></PersonIdExt>
    						<Sex></Sex>
    						<FirstName></FirstName>
    						<LastName></LastName>
    						<Telephone>
    							<PhoneNo></PhoneNo>
    							<PhoneNoExtension></PhoneNoExtension>
    						</Telephone>
    						<MobilePhone></MobilePhone>
    						<Fax>
    							<FaxNo></FaxNo>
    							<FaxNoExtension></FaxNoExtension>
    						</Fax>
    						<Email></Email>
    					</item>
    				</IctPersons>
    				<IctSapNotes/>
    				<IctSolutions/>
    				<IctStatements>
    					<item>
    						<TextType/>
    						<Texts/>
    						<Timestamp>20210525073107</Timestamp>
    						<xsl:apply-templates select="mro:AFFECTEDPERSON"/>
    						<Language>EN</Language>
    					</item>
    				</IctStatements>
    				<IctTimestamp>20210525073107</IctTimestamp>
    				<IctUrls/>
    			</urn:ProcessIncident>
    		</soapenv:Body>
    		</soapenv:Envelope>
    		</xsl:template>
    		
    		<xsl:template match="mro:REPORTEDBY">
    			<ReporterId><xsl:value-of select="."/></ReporterId>
    		</xsl:template>
    		
    		<xsl:template match="mro:AFFECTEDPERSON">
    			<PersonId><xsl:value-of select="."/></PersonId>
    		</xsl:template>
    		
    		<xsl:template match="mro:DESCRIPTION">
    			<ShortDescription><xsl:value-of select="."/></ShortDescription>
    		</xsl:template>
    </xsl:stylesheet>​
    When I test the output of this transformation with SOAPUI, I can create a ticket on the SAP Environment but when I try it do through maximo Publish Channel, it is not working and I am not sure of the mistake I am doing here.

    The following are the details of End Point and Publish Channels I created in maximo.

    End Point: 
    Publish Channel:

    I Copied the XSL file into all the servers of the Cluster.

    I also wrote script on Incident Object Launch Point after Save to export data
    from psdi.server import MXServer
    from psdi.mbo import Mbo
    server = MXServer.getMXServer()
    userInfo = mbo.getUserInfo()
    whereClause = "status='NEW'"
    server.lookup("MIC").exportData("SOLMAN", "SOLMAN", whereClause, userInfo, 1000)
    print "Successful XML"


    And also when I test the End Point by the request that I am testing through SOAPUI, it returns the below error.
    I don't understand why it is not working, Is there anything else I need to do? Any mistake I am doing in the End point or publish channel details?
    Should I make any Configurations in the WAS console Service Integration section, I was reading Alex's 'Top 6 Things to check if your Integration is not Working' and i noticed 'Message Tracking and Repocessing' section.

    Update: Was Checking logs when I triggered the data Export script by creating Incident, I saw this error message everytime:

    [5/27/21 6:00:12:086 WAT] 004f215d SystemOut     O 27 May 2021 06:00:12:086 [INFO] [MAXIMO] [] ScriptMboEventListener Event maximo.incident.add has been fired for script SOLMAN launch point SOLMAN
    [5/27/21 6:00:13:024 WAT] 004f215d SystemOut     O 27 May 2021 06:00:13:024 [INFO] [MAXIMO] [] Name E:\IBM\SMP\maximo\mif\SAPINC.xsl
    [5/27/21 6:00:13:070 WAT] 004f215d SystemOut     O 27 May 2021 06:00:13:070 [ERROR] [MAXIMO] [] Invalid Expression
    java.lang.RuntimeException: Invalid Expression
    	at psdi.iface.stax.MXStAXParser.evaluateXPath(MXStAXParser.java:295)
    	at psdi.iface.stax.MXStAXParser.evaluateXPath(MXStAXParser.java:436)
    	at psdi.iface.jms.MEAQueueProcessor.writeDataToQueue(MEAQueueProcessor.java:192)
    	at psdi.iface.mic.PublishChannel.processStructure(PublishChannel.java:491)
    	at psdi.iface.mic.PublishChannel.publishTo(PublishChannel.java:406)
    	at psdi.iface.mic.EntMicService.exportData(EntMicService.java:952)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:90)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
    	at java.lang.reflect.Method.invoke(Method.java:508)
    	at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:186)
    	at org.python.core.PyObject.__call__(PyObject.java:419)
    	at org.python.core.PyMethod.instancemethod___call__(PyMethod.java:237)
    	at org.python.core.PyMethod.__call__(PyMethod.java:228)
    	at org.python.core.PyMethod.__call__(PyMethod.java:218)
    	at org.python.pycode._pyx175.f$0(<script>:7)
    	at org.python.pycode._pyx175.call_function(<script>)
    	at org.python.core.PyTableCode.call(PyTableCode.java:167)
    	at org.python.core.PyCode.call(PyCode.java:18)
    	at org.python.core.Py.runCode(Py.java:1386)
    	at org.python.core.__builtin__.eval(__builtin__.java:497)
    	at org.python.core.__builtin__.eval(__builtin__.java:501)
    	at org.python.util.PythonInterpreter.eval(PythonInterpreter.java:259)
    	at org.python.jsr223.PyScriptEngine.eval(PyScriptEngine.java:40)
    	at org.python.jsr223.PyScriptEngine.access$300(PyScriptEngine.java:20)
    	at org.python.jsr223.PyScriptEngine$PyCompiledScript.eval(PyScriptEngine.java:231)
    	at com.ibm.tivoli.maximo.script.JSR223ScriptDriver.evalScript(JSR223ScriptDriver.java:274)
    	at com.ibm.tivoli.maximo.script.AbstractScriptDriver.runScript(AbstractScriptDriver.java:155)
    	at com.ibm.tivoli.maximo.script.ScriptMboEventListener.postSaveInternalEventAction(ScriptMboEventListener.java:392)
    	at psdi.server.event.EventTopic$Subscription.postSaveInternalEventAction(EventTopic.java:751)
    	at psdi.server.event.EventTopic.postSaveInternalEventAction(EventTopic.java:441)
    	at psdi.server.event.EventTopicTree.postSaveInternalEventAction(EventTopicTree.java:917)
    	at psdi.mbo.Mbo.fireEvent(Mbo.java:6335)
    	at psdi.mbo.StatefulMbo.fireEvent(StatefulMbo.java:799)
    	at psdi.mbo.MboSet.fireEventsAfterDB(MboSet.java:7993)
    	at psdi.txn.MXTransactionImpl.fireEventsAfterDB(MXTransactionImpl.java:456)
    	at psdi.txn.MXTransactionImpl.saveTransaction(MXTransactionImpl.java:229)
    	at psdi.txn.MXTransactionImpl.save(MXTransactionImpl.java:156)
    	at psdi.mbo.MboSet.save(MboSet.java:7533)
    	at psdi.mbo.MboSet.save(MboSet.java:7457)
    	at psdi.webclient.system.beans.AppBean.save(AppBean.java:642)
    	at psdi.webclient.system.beans.AppBean.SAVE(AppBean.java:1338)
    	at psdi.plusp.webclient.beans.common.PlusPTicketAppBean.SAVE(PlusPTicketAppBean.java:42)
    	at com.ibm.tsd.pminc.webclient.beans.PmIncidentAppBean.SAVE(PmIncidentAppBean.java:734)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:90)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
    	at java.lang.reflect.Method.invoke(Method.java:508)
    	at psdi.webclient.system.session.WebClientSession.defaultHandler(WebClientSession.java:1507)
    	at psdi.webclient.system.session.WebClientSession.handleEvent(WebClientSession.java:1400)
    	at psdi.webclient.system.session.WebClientSession.processRequestEvent(WebClientSession.java:6143)
    	at psdi.webclient.system.session.WebClientSession.handleClientSideQueueRequest(WebClientSession.java:6099)
    	at psdi.webclient.system.session.WebClientSession.handleRequest(WebClientSession.java:889)
    	at psdi.webclient.system.session.AsyncRequestManager.handleRequest(AsyncRequestManager.java:555)
    	at psdi.webclient.system.session.AsyncRequestManager.manageRequest(AsyncRequestManager.java:253)
    	at psdi.webclient.system.controller.RequestManager.manageRequest(RequestManager.java:232)
    	at psdi.webclient.servlet.WebClientServlet.handleRequest(WebClientServlet.java:141)
    	at psdi.webclient.servlet.WebClientServlet.doPost(WebClientServlet.java:52)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
    	at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1235)
    	at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:779)
    	at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
    	at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
    	at com.ibm.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:143)
    	at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:96)
    	at psdi.webclient.system.filter.HttpCrossSiteScriptingSecurity.doFilter(HttpCrossSiteScriptingSecurity.java:66)
    	at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:197)
    	at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:90)
    	at psdi.webclient.system.filter.MXCorrelationFilter.doFilter(MXCorrelationFilter.java:137)
    	at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:197)
    	at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:90)
    	at psdi.webclient.system.filter.PerformanceMonitor.doFilter(PerformanceMonitor.java:126)
    	at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:197)
    	at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:90)
    	at psdi.webclient.system.filter.HttpXFrameOptionsFilter.doFilter(HttpXFrameOptionsFilter.java:38)
    	at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:197)
    	at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:90)
    	at psdi.webclient.system.filter.MTContextFilter.doFilter(MTContextFilter.java:53)
    	at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:197)
    	at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:90)
    	at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:969)
    	at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1109)
    	at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:4198)
    	at com.ibm.ws.webcontainer.webapp.WebAppImpl.handleRequest(WebAppImpl.java:2208)
    	at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:304)
    	at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1030)
    	at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1817)
    	at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:382)
    	at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465)
    	at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:532)
    	at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:318)
    	at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:88)
    	at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175)
    	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:138)
    	at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
    	at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
    	at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
    	at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1909)



    ------------------------------
    Harshavardhan Kamepalli
    Eidiko System Integrators
    ------------------------------



  • 10.  RE: Automation Script to pass Request to External System using WSDL url

    Maximo Certified
    Posted 05-27-2021 08:31
    Check the headers in your End Point setup in Maximo. You likely need a soapAction header. You should be able to see the headers that SOAPUI is injecting into the request, and should be able to copy the soapAction header.

    As for the parse error, I think there's a bug in the XSLT file. I believe those REPORTEDBY, DESCRIPTION, and AFFECTEDPERSON translations still need to be wrapped in tags. Instead of:

    <AgentId></AgentId>
    <xsl:apply-templates select="mro:REPORTEDBY"/>
    <xsl:apply-templates select="mro:DESCRIPTION"/>
    <Priority>1</Priority>​
    ... it should be something like:
    <AgentId></AgentId>
    <ReportedBy><xsl:apply-templates select="mro:REPORTEDBY"/></ReportedBy>
    <Description><xsl:apply-templates select="mro:DESCRIPTION"/></Description>
    <Priority>1</Priority>​


    Hope this helps,



    ------------------------------
    Alex Walter
    A3J Group, LLC
    ------------------------------



  • 11.  RE: Automation Script to pass Request to External System using WSDL url

    Posted 05-27-2021 08:43
    Hi Alex,
    I have transformed the Maximo XML to SAP format by using online XSLT transformation tool and got the correct SAP format which by testing with SOAPUI created a incident ticket in SAP SOLMAN.
    Transformed XML using XSLT:
    <?xml version="1.0" encoding="UTF-8"?>
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
                      xmlns:urn="urn:sap-com:document:sap:soap:functions:mc-style"
                      xmlns:mro="http://www.ibm.com/maximo">
       <soapenv:Header/>
       <soapenv:Body>
          <urn:ProcessIncident>
             <IctAdditionalInfos/>
             <IctAttachments/>
             <IctHead>
                <IncidentGuid>00155D433C321EDBAFA5E005B59C16DA</IncidentGuid>
                <RequesterGuid>9219F59AC585431AB7D6DDA03EA520AA</RequesterGuid>
                <ProviderGuid>00155D433C321EDBAF8A2AD9D8A220DA</ProviderGuid>
                <AgentId/>
                <ReporterId>SPILLI</ReporterId>
                <ShortDescription>Sample Incident Record from Integration</ShortDescription>
                <Priority>1</Priority>
                <Language>EN</Language>
                <RequestedBegin>20210525073107</RequestedBegin>
                <RequestedEnd>20210525073107</RequestedEnd>
             </IctHead>
             <IctId>3</IctId>
             <IctPersons>
                <item>
                   <PersonId>SPILLI</PersonId>
                   <PersonIdExt/>
                   <Sex/>
                   <FirstName/>
                   <LastName/>
                   <Telephone>
                      <PhoneNo/>
                      <PhoneNoExtension/>
                   </Telephone>
                   <MobilePhone/>
                   <Fax>
                      <FaxNo/>
                      <FaxNoExtension/>
                   </Fax>
                   <Email/>
                </item>
             </IctPersons>
             <IctSapNotes/>
             <IctSolutions/>
             <IctStatements>
                <item>
                   <TextType/>
                   <Texts/>
                   <Timestamp>20210525073107</Timestamp>
                   <PersonId>SPILLI</PersonId>
                   <Language>EN</Language>
                </item>
             </IctStatements>
             <IctTimestamp>20210525073107</IctTimestamp>
             <IctUrls/>
          </urn:ProcessIncident>
       </soapenv:Body>
    </soapenv:Envelope>​

    And there is no data in the Soap Header too.
    Shall I add "soapAction='Add'" in the header instead of "Content-Type: text/xml"



    ------------------------------
    Harshavardhan Kamepalli
    Eidiko System Integrators
    ------------------------------



  • 12.  RE: Automation Script to pass Request to External System using WSDL url

    Posted 05-27-2021 09:18
    Some suggestions as I went through this 6 months or earlier spoken from memory.
    1. Take a working soap message that works seamlessly in SOAPUI without any bearing on Maximo. Use the exact identical message in the two handlers you see JAXWSHandler and WebService Handler and HTTP in that TEST utility. Create one of each while you test this. Pay special attention to what the SOAPUI debugger tells you vis-à-vis headers etc. If you land on one of those working handler types now you know it is just a matter of time.
    2. Now concentrate on your XSL or java class because all it is doing is take the translated message and using the Handler as you tested in that test button utility. That is incidentally how I was able to progress and understand what was wrong with my approach.
    3. Some integration in SAP uses the HTTP Endpoint but in my design, I adopted the JAXWSHANDLER because it was more suited for my SOAP envelope.

    My $0.02

    ------------------------------
    Appu nair
    APPECM
    ------------------------------



  • 13.  RE: Automation Script to pass Request to External System using WSDL url

    Posted 05-27-2021 09:28
    Thanks for the Suggestion Appu Nair,
    I'll work on this scenario of using different handlers and check which makes it happen for me. I think this should give me an idea of what works.

    ------------------------------
    Harshavardhan Kamepalli
    Eidiko System Integrators
    ------------------------------



  • 14.  RE: Automation Script to pass Request to External System using WSDL url

    Posted 05-28-2021 01:44
    Hi Appu Nair,
    As you suggested, was working with WEBSERVICE and WEBSERVICE-JAXWS handlers to create the End Point and test it with request and I was receiving same error with both Handlers:
    Does this mean, the problem is with External System?

    These are details of the End Point.


    ------------------------------
    Harshavardhan Kamepalli
    Eidiko System Integrators
    ------------------------------



  • 15.  RE: Automation Script to pass Request to External System using WSDL url

    Posted 05-28-2021 09:24
    I think you are probably not sending the correct WSDL function.Cannot deliver means the WS Client(the test tool)  couldn't understand the
    WSDL corrrectly. For e.g when you fire a SOAPUI request since I will show you my application  which is JAXWSHANDLER based
    So when you use SOAPUI switch to the RAW on that interface so it will show you the SERVICENAME & SOAPACTION
    if not try to see what your WSDL soap action is 
    Also, increase the integration logger to DEBUG so you will be able to see what the call is.
    The key is to find from SOAPUI or custom code(like java or C# SOAP client) what is the actual SOAP Action
    and service the WS client code is invoking. Inside the handler class, you will see that what you pass to the call is
    going to somehow invoke a call like this

    resp = wsClient.invoke(data, configuredServiceName, configuredEndpointURL, configuredSoapAction,
    this.getSoapVersion(), configuredUserName, configuredPassword, this.getMsgExPtrn(),
    (Map) httpHeaders, this.getHttpReadTimeout(), (Map) soapRequestHeaders,
    (Map) soapResponseHeaders); as you can see if you specify a parameter incorrectly or null it
    then maximo will not do anything on your behalf.It will just process it the way 

    So the key is to get the fine glue of how your SAP SOAP call works as Maximo is pretending to be
    a client to that. The Errors in Maximo is hard for me to understand so I wouldn't comment on whether Maximo is
    at fault.

    I had these frustrating moments myself where IBM Maximo support doesn't give you much in the way of real-world examples
    as well as the other side also won't give you much help. That is why I started digging into the "Maximo code".If that SAP WSDL is something very much SAP helps troubleshoot then I think all you need is some more trial and error with SOAPUI headers, service name, etc...

    If I were you I would create a simple.NET soap client and make the call work with  SAP. I would then observe the SOAP payload  (using fiddler when the C# code runs) completely with headers, service names, etc, and then try to attempt Maximo with that info.


    One of the things I learned is with SOAPUI you can fake a receiving endpoint so when a successful message is received by SOAPUI  you can see logs.  majority of the time when the Maximo test interface fails soapui doesn't even have anything which is how I methodically tackled my problem. (In my case Maximo was showing an error and soapui doesn't receive anything so I was able to find the problem had to be sorted in Maximo itself:)
















    ------------------------------
    Appu nair
    APPECM
    ------------------------------



  • 16.  RE: Automation Script to pass Request to External System using WSDL url

    Posted 06-03-2021 08:30
    Hi Appu Nair,
    I have gone through all the parameters of the end point and found the correct parameters. Thanks to you for alerting me watch the errors in the parameters first.
    Second thing I found is, External system Request is not accepting default Soap Envelope.
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">​
    After removing this default envelope, the test for End Point is successful.

    UPDATE: The above SOAP Envelope Issue was in 'WEBSERVICE' handler and when I try 'HTTP' handler with the right parameters and including the SOAP Envelope in the request, I can create a Incident Ticket in SAP Solution Manager which did not happen in the case of 'WEBSERVICE' handler even though it showed a success message. So, I am assuming that 'HTTP' handler works in this scenario.
    In external System's 'Add/Modify Queues', I can see the XML message that is sent to External System with the transformed message but this does not create a record in the External System.

    There my Publish Channel name is 'SOLMAN' which is correct in this case but the External System is returned as 'MX' but my external system name is 'SOLMAN'. Is this where the Issue is raised that not creating incident in the SAP or Maximo returns External system as 'MX' for all records in default?

    ------------------------------
    Harshavardhan Kamepalli
    Eidiko System Integrators
    ------------------------------



  • 17.  RE: Automation Script to pass Request to External System using WSDL url

    Posted 06-03-2021 13:13
    Think of the External system as the aggregator or the broker listening for events to come in or go out:)
    The external system is deliberately separated from the other inner workings so when the External System cron task fires up it knows that according to my setup I have 1->N Publishchannels that is configured, I will do whatever my setup says(it will look up the Endpoint ). Previously if the PublishChannel you configured has a Listener and you enabled Update, Create or whatver then It has the task of delivering it to the External system. At least that is my understanding. You can have a Synchronous method but for efficiencies, I don't know if that is ever done as if you read the documents you will see that you have to do separate ear file treatment to enable that. This way if you look in the "Message Reprocessing queue" you can see the message sitting there, the fact the message is there points to the fact that the public channel process is working.When learning I used to deliberately stop my JMS cron so I know what the Handler was making a.k.a SOAP...For all practical purposes, the menu ordering in the Integration Menu is really good. You decide if you need an Object Structure or can use an existing one. Now come to Publish Channel and pick that OS, Then create an External system that relies on Handlers and Endpoints.so there's a method to the madness :)


    ------------------------------
    Appu nair
    APPECM
    ------------------------------



  • 18.  RE: Automation Script to pass Request to External System using WSDL url

    Posted 06-07-2021 00:35
    Thankyou All, for the help on this thread.
    The issue was with Sequential Outbound Queue and the messages that were in the queue. The message for the external system was lying in the queue as the messages before it are unable to send to respective system. When I deleted the messages and the disabled all the Publish Channels that were creating these messages, my Incident is sent to the External System and a record is Successfully created in the External System now.

    ------------------------------
    Harshavardhan Kamepalli
    Eidiko System Integrators
    ------------------------------



  • 19.  RE: Automation Script to pass Request to External System using WSDL url

    Posted 06-07-2021 09:01
    @Harshavardhan Kamepalli I would make sure by disabling those publish channel someone else's process is not broke :)​

    ------------------------------
    Appu nair
    APPECM
    ------------------------------



  • 20.  RE: Automation Script to pass Request to External System using WSDL url