The Infor Communities is globally accessed system by Infor and its customers, please do not post or upload any content that could be deemed as sensitive, confidential or subject to any data regulation requirements. If you are unsure whether or not the content contains sensitive, confidential or has any data regulation requirements, please seek the advice of your internal security, legal, and compliance experts.

Input Parameter for Web Service

Hi,

 

I have a document flow from Application(EAM) to Web Service(Custom Web Service).

The web service has two input parameter 1.WorkOrder. 2.ORG.

I have added WSDL to ION web service and created a document for web service and selected "Invoke web service based on incoming document".

 

Document to receive is 'Sync.ManitenanceOrder'. Now here I am not able to map input parameter for web service from MaintenanceOrder BOD.

 

Can anyone help me on how to pass input parameter to web service from BOD.

 

Thank you in advance.

 

 

Best Regards,

Nagman

Parents Reply Children
  • Hi Ravi,

    Yes, that was my question, how do we retrieve input from BOD to web service.
  • HI Nagman,

    If you are using web service connector then the input SyncManitenanceOrder BOD is to be converted into the input xml which custom webservice accepts. XSLT as shown below can be used to convert the given BOD to request xml format.

    In the above case, we need to explicitly define a FFT and use XSLT. If we dont want to define File Format Template, then use the following option which will on the fly will convert BOD to desired request XML. 

     

    Hope this helps.

     

  • Hi Ravi/Tilen,

    When i add web service and select "Use incoming document to trigger the sending of another document", i wont see any response when i click Test.

    I have hard coded the values in XSLT.

    <xsl:stylesheet xmlns:xsl="www.w3.org/.../Transform" version="2.0">
    <xsl:template match="/">
    <Envelope xmlns="schemas.xmlsoap.org/.../"
    xmlns:p2="otherNS"
    xmlns:xsi="www.w3.org/.../XMLSchema-instance"
    p2:any_Attr="anySimpleType">
    <Header xmlns="" p2:any_Attr="anySimpleType">
    </Header>
    <Body xmlns="">
    <WOData xmlns="http://tempuri.org/">
    <WORKORDER xmlns="">10000</WORKORDER>
    <ORG xmlns="">ESS</ORG>
    </WOData>
    </Body>
    </Envelope>
    </xsl:template>
    </xsl:stylesheet>

    and the output is, as shown in <WODataResult> it doesn't show anything.

    <?xml version="1.0" encoding="UTF-8"?><Messages><SyncGetWO releaseID="9.2">
    <ApplicationArea>
    <Sender>
    <LogicalID>infor.ws.wstest</LogicalID>
    <ComponentID>External</ComponentID>
    <ConfirmationCode>OnError</ConfirmationCode>
    </Sender>
    <CreationDateTime>2020-01-14T11:18:25.491Z</CreationDateTime>
    <BODID>infor.ws.wstest:1579000705491:179</BODID>
    </ApplicationArea>
    <DataArea>
    <Sync>
    <TenantID>Infor</TenantID>
    <AccountingEntityID/>
    <LocationID/>
    <ActionCriteria>
    <ActionExpression actionCode="Replace"/>
    </ActionCriteria>
    </Sync>
    <GetWO>
    <WODataResponse xmlns="http://tempuri.org/">
    <WODataResult/>
    </WODataResponse>
    </GetWO>
    </DataArea>
    </SyncGetWO>
    </Messages>


    But when i select "retrieve data from web service", i could see the result as shown in <WODataResult>.

    <?xml version="1.0" encoding="UTF-8"?><Messages><SyncGetWO releaseID="9.2">
    <ApplicationArea>
    <Sender>
    <LogicalID>infor.ws.wstest</LogicalID>
    <ComponentID>External</ComponentID>
    <ConfirmationCode>OnError</ConfirmationCode>
    </Sender>
    <CreationDateTime>2020-01-14T11:20:38.652Z</CreationDateTime>
    <BODID>infor.ws.wstest:1579000838652:180</BODID>
    </ApplicationArea>
    <DataArea>
    <Sync>
    <TenantID>Infor</TenantID>
    <AccountingEntityID/>
    <LocationID/>
    <ActionCriteria>
    <ActionExpression actionCode="Replace"/>
    </ActionCriteria>
    </Sync>
    <GetWO>
    <WODataResponse xmlns="http://tempuri.org/">
    <WODataResult>10000ESS</WODataResult>
    </WODataResponse>
    </GetWO>
    </DataArea>
    </SyncGetWO>
    </Messages>


    Could you guys help on this.
  • HI Nagman,
    Do you have sample request XMLs and response XMLs from the custom web service? We need to generate the request XML exactly like the same...

    Is this your sample request ?
    <Envelope xmlns="schemas.xmlsoap.org/.../"
    xmlns:p2="otherNS"
    xmlns:xsi="www.w3.org/.../XMLSchema-instance"
    p2:any_Attr="anySimpleType">
    <Header xmlns="" p2:any_Attr="anySimpleType">
    </Header>
    <Body xmlns="">
    <WOData xmlns="http://tempuri.org/">
    <WORKORDER xmlns="">10000</WORKORDER>
    <ORG xmlns="">ESS</ORG>
    </WOData>
    </Body>
    </Envelope>
  • Hi Ravi,

    Yes, this is my request XML.

    And the response from web service is one string.

    I.e: <string xmlns="tempuri.org/.../string>
  • HI Nagman,
    Trigger or send depends on how the document flow has is needed. If you need to get response and send this response as an input to some other thing, use Trigger.
    Can you take this xml and explicitly hit the webservice and see if you are getting proper response.
  • Hi Ravi,

    Yes, i am getting output when I explicitly hit web service.
    My document flow is, App to Web service to FIle(Share Drive).
    On update of the work order, I am calling web service by passing work order number and organization and then I am storing the output from web service to a folder.
  • HI Nagman,
    Then I think you have to use Trigger method of the webservice. Write the XSLT so that it will convert the BOD into web service xml and then write the output to file. What you can do is just have the input xml as is in XSLT and only use the variable from BOD here it has to be dynamic. Then it should work as expected.
  • Hi Ravi,

    Yes, I am using trigger method for web service which is "Use incoming document to trigger the sending of another document".
    I am taking input from Sync.MaintenanceOrder BOD and passing to web service while doing so web service is not returning any output.
  • Hi Ravi,

    Yes, I am using trigger method for web service which is "Use incoming document to trigger the sending of another document".
    I am taking input from Sync.MaintenanceOrder BOD and passing to web service while doing so web service is not returning any output.

    As explained above