on 2020 Sep 21 9:46 PM
Hi Experts,
I am working on a new project where we need to send specific data to a REST service.
The request I am trying to send is next one:
<?xml version="1.0" encoding="UTF-8"?>
<ns1:xxxRequest xmlns:ns1="http://xxx.com">
<xxxRequest ac="x" aID="x">
<ns2:deleteRecord xmlns:ns2="http://bos.xxx.com">
<ns2:deleteEmployee eID="exampleID"/>
<ns2:MessageList/>
</ns2:deleteRecord>
</xxxRequest>
</ns1:xxxRequest>
But the expected looks like this one:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://xxx.com" xmlns:bos="http://bos.xxx.com" xmlns:ser1="http://xxx.com">
<soapenv:Header/>
<soapenv:Body>
<ser:xxxRequest ac="YY">
<ser:deleteRecord> <ser:yyy eID="exampleID"/>
</ser:deleteRecord>
</ser:xxxRequest>
</soapenv:Body>
</soapenv:Envelope>
So I have a few questions about this:
I know that maybe using xslt mappings will help me but I am trying to use what PI REST adapter provides me so that's why I'm asking. If there's any chance I can do this using UDFs or also default options in the middleware please let me know.
Thanks in advanced!
Request clarification before answering.
I was able to import the structure used in SOAP UI into my message mapping and now I could replicate exactly what they are expecting us.
Thanks for the help!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
From the expected output you showed to us and from your second point ("I imported a WSDL") I would say you don't want to send data to a REST service, but to a SOAP webservice.
Basic steps to do so would be:
The combination of using the message information from the WSDL in the message mapping and the use of the SOAP adapter should ensure that the messages are send out well-formatted to the partner's service.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you Raffael for your quick answer.
I was able to do both steps (1 and 2) but for the soap receiver channel the endpoint must be a wsdl and in this case URL is not good because it's a web page.
I was algo able to do a succesful test case at SOAP UI using REST and also SOAP (uploading the wsdl as a file in a new project, not with the URL).
I am assuming that there is only an issue with the format I am sending the data so I need to have this mapped structure
<?xml version="1.0" encoding="UTF-8"?>
<ns1:zzz xmlns:ns1="http://service.upload.myidtravel.lhsystems.com">
<zzz ac="YY">
<ns2:aaa xmlns:ns2="http://www.com">
<ns2:bbb eID="132456"/>
<ns2:ccc/>
</ns2:aaa>
</zzz>
</ns1:zzz>look like this one:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://xxx.com" xmlns:bos="http://www.com" xmlns:ser1="http://zzz.com">
<soapenv:Header/>
<soapenv:Body>
<ser:zzz ac="YY">
<ser:aaa> <ser:bbb eID="132456"/>
</ser:aaa>
</ser:zzz>
</soapenv:Body>
</soapenv:Envelope>I need to have a soap:Envelope and also tags start with ser and not with ns2.
Is this only be able to be done under an xslt mapping?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 17 | |
| 8 | |
| 7 | |
| 6 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.