cancel
Showing results for 
Search instead for 
Did you mean: 

Creating Datatype!

Former Member
0 Kudos

Hi All,

Can anyone help me in creating the Target Datatype in PI, based on the SOAP UI Code below

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:hris="http://trm.test.com/HRIS">

<soapenv:Header/>

<soapenv:Body>

<hris:Dispatch>

<!Optional:>

<hris:HRXML><![CDATA[<Envelope version="01.00">

<Sender>

<Id>HRXMLUSER</Id>

<Credential>11111</Credential>

</Sender>

<Recipient>

<Id />

</Recipient>

<TransactInfo transactType="data">

<TransactId>15747</TransactId>

<TimeStamp>2011-11-22 04:00 PM</TimeStamp>

</TransactInfo>

<Packet>

<PacketInfo packetType="data">

<PacketId>1</PacketId>

<Action>SET</Action>

<Manifest>JOBCODE_POSITIONDATA</Manifest>

</PacketInfo>

<Payload>&lt;?xml version="1.0"?&gt;

&lt;JOBCODE_POSITIONDATA language="EN" AutoFilerNotification="No"&gt;

&lt;JOBCODE&gt;01123&lt;/JOBCODE&gt;

&lt;JOBCODEDESC&gt;ANALYST-CNTRCT MGT-II-NONC-SLR&lt;/JOBCODEDESC&gt;

&lt;JOBCODESTATUS&gt;A&lt;/JOBCODESTATUS&gt;

&lt;JOBTITLE&gt;&lt;/JOBTITLE&gt;

&lt;PAYGRADEMANAGE&gt;&lt;/PAYGRADEMANAGE&gt;

&lt;PAYGRADEREP&gt;&lt;/PAYGRADEREP&gt;

&lt;/JOBCODE_POSITIONDATA&gt;

</Payload>

</Packet>

</Envelope>]]></hris:HRXML>

</hris:Dispatch>

</soapenv:Body>

</soapenv:Envelope>

If I take the entire message in SOAP UI and send it, I am getting a response back from my third party. Now the question I have is How to create the Target Datatype in XI to get a response from my third party??

Can you please help me with this issue.?

Thanks,

Harsh

Edited by: Moderator on Nov 29, 2011 4:02 PM

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

very easy: as you consume a web service exposed by an external tool, just ask to this team to provide to you the WSDL file, and upload it in an External Definition.

Do not create it manually (unless you want to loose your time, and perhaps with some error).

Regards.

Mickael

P.S : do not use term like "Urgent", especially when you just begin the development...

Former Member
0 Kudos

Mickael,

Thank You Very much, I just needed the development to be completed by today, that is why i was in a hurry.

Below is the WSDL that my third party provided to us

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:hris="http://trm.test.com/HRIS">

<soapenv:Header/>

<soapenv:Body>

<hris:Dispatch>

<!Optional:>

<hris:HRXML>?</hris:HRXML>

</hris:Dispatch>

</soapenv:Body>

</soapenv:Envelope>

When I import this into XI, I have only one Field "HRXML", the question I have is "How to add the Fields above (Envelope, Sender, CDATA, etcc) to this WSDL"??

Thanks,

Harsh

baskar_gopalakrishnan2
Active Contributor
0 Kudos

You dont need to add soap header and envelope. You need to import WSDL as external definition first. THen Integration builder will show all the messages of that wsdl. You dont need to create data and message type. create target service interface and there you pick message as external message and choose request and response message accordingly from the wsdl.

Former Member
0 Kudos

Bhaskar,

Thank you very much for your reply. I did exactly what you said.

1. I created an External Definition.

2. Imported the WSDL that the third party gave to me into that.

3. Used the External Definition in my Message mapping.

4. The External Definition has 2 fields SOAPIN, SOAPOUT.

5. The SOAPOUT has one field HRXML.

Now the question I have is How do I put the below xml into the HRXML field??. Check my first post

<![CDATA[<Envelope version="01.00">

<Sender>

<Id>HRXMLUSER</Id>

<Credential>11111</Credential>

</Sender>

<Recipient>

<Id />

</Recipient>

<TransactInfo transactType="data">

<TransactId>15747</TransactId>

<TimeStamp>2011-11-22 04:00 PM</TimeStamp>

</TransactInfo>

<Packet>

<PacketInfo packetType="data">

<PacketId>1</PacketId>

<Action>SET</Action>

<Manifest>JOBCODE_POSITIONDATA</Manifest>

</PacketInfo>

<Payload><?xml version="1.0"?>

<JOBCODE_POSITIONDATA language="EN" AutoFilerNotification="No">

<JOBCODE>01123</JOBCODE>

<JOBCODEDESC>ANALYST-CNTRCT MGT-II-NONC-SLR</JOBCODEDESC>

<JOBCODESTATUS>A</JOBCODESTATUS>

<JOBTITLE></JOBTITLE>

<PAYGRADEMANAGE></PAYGRADEMANAGE>

<PAYGRADEREP></PAYGRADEREP>

</JOBCODE_POSITIONDATA>

</Payload>

</Packet>

</Envelope>]]>

The Third party provided me the WSDL as below.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:hris="http://trm.test.com/HRIS">

<soapenv:Header/>

<soapenv:Body>

<hris:Dispatch>

<!Optional:>

<hris:HRXML>?</hris:HRXML>

</hris:Dispatch>

</soapenv:Body>

</soapenv:Envelope>

Means the Above Payload should go in Place of "?" in the above WSDL

Can you help me with this.

Thanks,

Harsh

Former Member
0 Kudos

Hi Harsch,

Read this blog [|].

Mickael

baskar_gopalakrishnan2
Active Contributor
0 Kudos

If you want the entire xml payload to be mapped to a target field, then use this blog

Former Member
0 Kudos

Hi,

You can send the xml data to single filed as Bhasker suggested, but i am not 100% sure that this is solution for your issue,I recently faced similar kind of problem with one of my interfaces from ECC to external site using SOAP (Sync Interface).

I don't want to confuse you now, please let us know if you still have error after pushing the xml to the field then I can suggest what I did.

Thanks...

Karna....

Edited by: Chirumamilla Sukarna on Nov 29, 2011 9:06 PM

Former Member
0 Kudos

Sukarna,

Thank you very much for your reply. Even I am not sure what if we need to put the entire xml into the HRXML field. That is just my guess. Can you explain me the issue you faced in the past and how you fixed it, I will try to match that up with my requirement.

Mine is a Proxy to SOAP syncronous scenario. The problem is that I am not able to connect with the thirdparty through the webservice, because my target datatype doesnt match with the tags in the thirdparty side. I have a confusion in creating my target datatype. The third party did not provide a WSDL with all the fields. Thats my problem.

Can you help me with this issue.

Thanks,

Harsh

Edited by: HarshK on Nov 29, 2011 9:17 PM

Former Member
0 Kudos

Hi Harsh,

My case is little more complicated than yours as you are not sending authentication details in Header. I am sorry I didn't notice that previously.

In my case, ECC will send a customer details to Equifax Webservice to get the credit History as a sync call.

we need to authenticate the webservice using username and pwd in the message header, but by using SOAP adapter we can't do that, so we couldnu2019t reach the service and get the response back.

So what we did is to create custom data type as the structure which we used in the soap UI and configured the soap adapter not to use soapenvelope. And added soap header to the message using XSLT mapping.

In your case

There are two solutions, one is to import the WSDL and create a datatype with Hris:HRXML as header tag with all the remaining fields and passing it as a single string into the Hris:Dispatch. I think you are trying it nowu2026

Or

You should create data type with all the fields, use Hris:Dispatch as your header segment and maintain the hierarchy correctly.

Your data type should look likeu2026.

Hris:Dispatch

Hris:HRXML

Envelope

Sender

ID

Credential

Recipient

Etcu2026

Soap adapter will wrap this up as body and attaches header and Envelope automaticallyu2026

thanks...

Karna

Former Member
0 Kudos

Karna,

Thank you very much for explaining your issue. Its almost the same issue that we are having with but with a catch,

If you see my structure in my first post. There is a tag called "CDATA", Do you know how to create my datatype with that CDATA tag and all the fields within the CDATA tag. The CDATA tag ends with "]]" instead of "/CDATA".

Thanks,

Harsh

Former Member
0 Kudos

There is no need to create CDATA , CDATA is to handle Special characters, all of the webservices should handle them as default and PI will handle them too.

try to send message to the webservice from Soap UI removing those and see if it works.

thanks...

Karna....

Former Member
0 Kudos

Hi Sukarna,

I tried removing the CDATA, its not working,

If I paste the code below in SOAP UI, I am getting a response back,

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:hris="http://trm.brassring.com/HRIS">

<soapenv:Header/>

<soapenv:Body>

<hris:Dispatch>

<!Optional:>

<hris:HRXML>

&lt;Envelope version="01.00"&gt;

&lt;Sender&gt;

&lt;Id&gt;HRXMLUSER&lt;/Id&gt;

&lt;Credential&gt;25426&lt;/Credential&gt;

&lt;/Sender&gt;

&lt;Recipient&gt;

&lt;Id /&gt;

&lt;/Recipient&gt;

&lt;TransactInfo transactType="data"&gt;

&lt;TransactId&gt;15747&lt;/TransactId&gt;

&lt;TimeStamp&gt;2011-11-22 04:00 PM&lt;/TimeStamp&gt;

&lt;/TransactInfo&gt;

&lt;Packet&gt;

&lt;PacketInfo packetType="data"&gt;

&lt;PacketId&gt;1&lt;/PacketId&gt;

&lt;Action&gt;SET&lt;/Action&gt;

&lt;Manifest&gt;WEENERGIES_JOBCODE_POSITIONDATA&lt;/Manifest&gt;

&lt;/PacketInfo&gt;

&lt;Payload&gt;&amp;lt;?xml version="1.0"?&amp;gt;

&amp;lt;WEENERGIES_JOBCODE_POSITIONDATA language="EN" AutoFilerNotification="No"&amp;gt;

&amp;lt;JOBCODE&amp;gt;01122&amp;lt;/JOBCODE&amp;gt;

&amp;lt;JOBCODEDESC&amp;gt;ANALYST-CNTRCT MGT-II-NONC-SLR&amp;lt;/JOBCODEDESC&amp;gt;

&amp;lt;JOBCODESTATUS&amp;gt;A&amp;lt;/JOBCODESTATUS&amp;gt;

&amp;lt;JOBTITLE&amp;gt;&amp;lt;/JOBTITLE&amp;gt;

&amp;lt;PAYGRADEMANAGE&amp;gt;&amp;lt;/PAYGRADEMANAGE&amp;gt;

&amp;lt;PAYGRADEREP&amp;gt;&amp;lt;/PAYGRADEREP&amp;gt;

&amp;lt;/WEENERGIES_JOBCODE_POSITIONDATA&amp;gt;

&lt;/Payload&gt;

&lt;/Packet&gt;

&lt;/Envelope&gt;

</hris:HRXML>

</hris:Dispatch>

</soapenv:Body>

</soapenv:Envelope>

Now Can you help me in crreating my source and Target Datatypes/objects in XI/PI???

Can you check in your SOAP UI and see if you can get a response.

Thanks,

Harsh

Edited by: HarshK on Nov 30, 2011 4:43 PM

Former Member
0 Kudos

Hi Harsh,

You are saying it didn't work with out CDATA and again you said it worked with the paylaod which doesn't have CDATA!!!!!!

create the Target structure as per the XML file, I explained it in my previous post. Not sure how you will get your source as you didn't mention your whole scenario in your posts....

Share results of the development you did yesterday, when you said it didn't work, what error you are getting? where did you get that error? etc...

thanks...

Karna...

Former Member
0 Kudos

Karna,

Thank you very much for your reply. Sorry below is the code I pasted in SOAP UI which gives me a response

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:hris="http://trm.brassring.com/HRIS">

<soapenv:Header/>

<soapenv:Body>

<hris:Dispatch>

<!Optional:>

<hris:HRXML><![CDATA[<Envelope version="01.00">

<Sender>

<Id>HRXMLUSER</Id>

<Credential>25426</Credential>

</Sender>

<Recipient>

<Id />

</Recipient>

<TransactInfo transactType="data">

<TransactId>15747</TransactId>

<TimeStamp>2011-11-22 04:00 PM</TimeStamp>

</TransactInfo>

<Packet>

<PacketInfo packetType="data">

<PacketId>1</PacketId>

<Action>SET</Action>

<Manifest>WEENERGIES_JOBCODE_POSITIONDATA</Manifest>

</PacketInfo>

<Payload>&lt;?xml version="1.0"?&gt;

&lt;WEENERGIES_JOBCODE_POSITIONDATA language="EN" AutoFilerNotification="No"&gt;

&lt;JOBCODE&gt;01122&lt;/JOBCODE&gt;

&lt;JOBCODEDESC&gt;ANALYST-CNTRCT MGT-II-NONC-SLR&lt;/JOBCODEDESC&gt;

&lt;JOBCODESTATUS&gt;A&lt;/JOBCODESTATUS&gt;

&lt;JOBTITLE&gt;&lt;/JOBTITLE&gt;

&lt;PAYGRADEMANAGE&gt;&lt;/PAYGRADEMANAGE&gt;

&lt;PAYGRADEREP&gt;&lt;/PAYGRADEREP&gt;

&lt;/WEENERGIES_JOBCODE_POSITIONDATA&gt;

</Payload>

</Packet>

</Envelope>]]></hris:HRXML>

</hris:Dispatch>

</soapenv:Body>

</soapenv:Envelope>

And I will create my datatype as you said exactly. Now Can you see the "Payload" tag below. It has &lt, &gt for each field.

Can you help me how to create the Payload section in my Datatype in PI?

Sorry for the confusion.

Below is the response that I get in SOAP UI

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Body>

<DispatchResponse xmlns="http://trm.brassring.com/HRIS">

<DispatchResult><![CDATA[<?xml version="1.0" encoding="utf-8"?><Envelope version="01.00"><Sender><Id>HRXMLUSER</Id><Credential>25426</Credential></Sender><Recipient><Id></Id></Recipient><TransactInfo transactType="response"><TransactId>15747</TransactId><TimeStamp>2011-11-22 04:00 PM</TimeStamp><Status><Code>200</Code><ShortDescription>Success</ShortDescription><LongDescription>POSITIONDATA Data transfer was a success</LongDescription></Status></TransactInfo><Packet><PacketInfo packetType="response"><PacketId>1</PacketId><Action>SET</Action><Manifest>WEENERGIES_JOBCODE_POSITIONDATA</Manifest><Status><Code>200</Code><ShortDescription>Success</ShortDescription><LongDescription>POSITION Data transfer was a success</LongDescription></Status></PacketInfo><Payload /></Packet></Envelope>]]></DispatchResult>

</DispatchResponse>

</soap:Body>

</soap:Envelope>

Thanks,

Harsh

Edited by: HarshK on Nov 30, 2011 5:22 PM

Former Member
0 Kudos

Ok, your issue is becoming complicated... lets take it in two steps...

foe now ingore about CDATA, lets see if your Webservice throws an error when you send the data....

lets focus on creating the xml first...

where are you getting your source data from?

are you getting two different xmls as input? one as below and the other with all the other data?

<?xml version="1.0"?>

<WEENERGIES_JOBCODE_POSITIONDATA language="EN" AutoFilerNotification="No">

<JOBCODE>01122</JOBCODE>

<JOBCODEDESC>ANALYST-CNTRCT MGT-II-NONC-SLR</JOBCODEDESC>

<JOBCODESTATUS>A</JOBCODESTATUS>

<JOBTITLE></JOBTITLE>

<PAYGRADEMANAGE></PAYGRADEMANAGE>

<PAYGRADEREP></PAYGRADEREP>

</WEENERGIES_JOBCODE_POSITIONDATA>

Former Member
0 Kudos

Karna,

Thank youu very much for your reply. I just tried creating my datatype as you said in our post earlier. But I am not able to create a field hris:Dispatch because it is not allowing me to use " :" in my field. Can you tell me how you created your datatype so that I will create here.

Thanks,

Harsh

Edited by: HarshK on Nov 30, 2011 5:51 PM

Former Member
0 Kudos

Harsh,

there is no need to give hris: as this will be added by PI based on the XMLNS. it will not add hris, but that will work.

Thanks..

Karna....