cancel
Showing results for 
Search instead for 
Did you mean: 

creating data model using wsdl

Former Member
0 Kudos

How to create data model  and map by seeing wsdl file in integration gateway eclispe plugin

Tags edited by: Jitendra Kansal

Accepted Solutions (1)

Accepted Solutions (1)

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

Try it with a new OData service implementation project:

1. Create an entity type with "MaterialNo" as primary key

2. Bind it with Data source "SOAP service" and QUERY operation

3. Response mapping

4. Request mapping> custom code

importPackage(com.sap.gateway.ip.core.customdev.logging);

importPackage(com.sap.gateway.ip.core.customdev.util);

importPackage(org.apache.olingo.odata2.api.uri);

importPackage(java.util);

importPackage(com.sap.gateway.core.ip.component.commons);

importPackage(com.sap.gateway.ip.core.customdev.api);

   var response=new LinkedHashMap();

   message.setHeader("Authorization", "enter base64format of username and password");

   map = new LinkedHashMap();

   map.put("SalesOrg", "IND1");

partneHashMap = new LinkedHashMap();

   partneHashMap.put("ItMate", map);

   message.setBody(partneHashMap);

Note: You can convert username and password credentials info into Base64 using REST Client>header.

Regards,

JK

Former Member
0 Kudos

Thank you Jitendra,

We got the Output by changing our wsdl policy from ws_policy to standard.

Used processRequestXML(message) for request, from custom js.

All your's support helped me lot, Thank you once again

Answers (5)

Answers (5)

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

Great. Please close this thread since your query has been resolved.

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Praveen,

Your scenario is quite similar to what Anil has explained in his documentation guide () . Did you try selecting QUERY operation and done with REQUEST MAPPING in the generated script file? You can try with hard-coding the encoded value of user/pwd and add the salesOrg value.

Regards,

JK

Former Member
0 Kudos

Thanks Midhun and Jitendra

I tried all the mappings. Here in soap UI the request is expecting <ItMate> as input with out this input we don't get any result. Using custom javascript also tried but failed to get results. How can we draw an entity type and mappings by seeing soap result.

Regards

Praveen

midhun_vp
Active Contributor
0 Kudos

Hi Praveen,

You can either pass the ltMate from the custom script as a hard coded value or you can keep pass it while making request like http://smpserver:8080/gateway/odata/sap/ArticleService;v=1/ArticleSet('AR-00001') by defining a Read operation. ex.

Regards, Midhun

SAP Customer Experience Group - CEG

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos


I tried all the mappings. Here in soap UI the request is expecting <ItMate> as input with out this input we don't get any result. Using custom javascript also tried but failed to get results. How can we draw an entity type and mappings by seeing soap result.

Can you share the custom JS code?

If your SOAP service allows, you may provision a QUERY operation with the same response mapping. You should be able to return multiple records that way.

Former Member
0 Kudos

hi jItendra,

This is my javascript

     importPackage(java.util);

   importPackage(org.apache.olingo.odata2.api.uri);

   importPackage(org.apache.olingo.odata2.api.edm);

   importPackage(com.sap.gateway.ip.core.customdev.logging);

   importPackage(com.sap.gateway.ip.core.customdev.util);

   importPackage(org.apache.olingo.odata2.api.uri);

  

   var response=new LinkedHashMap();

   message.setHeader("Authorization", "Basic user:pass");

   map = new LinkedHashMap();

   map.put("SalesOrg", "IND1");

  

   partneHashMap = new LinkedHashMap();

   partneHashMap.put("ItMate", map);

   message.setBody(partneHashMap);

I am getting Error

<error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">

<code/>

<message xml:lang="en">Could not send Message.</message>

</error>

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

you should check also look at COMMENTS section.

Former Member
0 Kudos

Hi Jitendra

I attached the soap ui image, How to map this in integrated gateway

midhun_vp
Active Contributor
0 Kudos

Hi Praveen,

In your Odata model I can see that you have defined SalesOrg as the primary key but in the SOAP response from SOAPUI I can see that SalesOrg is not a primary key since the value of SalesOrg(IND1) been repeated in each item. I doubt that's resulting in only one record in the response of Odata request. You should define right primary and try again.

Regards, Midhun

SAP Customer Experience Group - CEG

Former Member
0 Kudos

AND THE WSDL FILE IS ATTACHED IN TXT FORMAT

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

For the request mapping:

Remove the existing mapping ( cross icon in below image) and do a new mapping as i have done.

Can you share the response mapping screenshot as well?

Which SMP 3.0 version you are working on ? like SMP 3.0 SP04 ? Make sure you do all Odata modeling in Eclipse kepler.

Regards,

JK

Former Member
0 Kudos

respose mapping screen

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

Please share the complete info otherwise it would be very difficult to understand your issues.

Response mapping should be like below:



Which SMP 3.0 version you are working on ? like SMP 3.0 SP04 ? Make sure you do all Odata modeling in Eclipse kepler.

After deployment, what is the response of service document? Are you able to get the record for given Sales Org?

Did you test WSDL file in SOAP UI tool or Storm? Did you get more than one record? Can you share screenshot of the same?

Regards,

JK

Former Member
0 Kudos

When we use SOAP UI  to retrieve data we have to supply user name and password, my question is where to configure in integration gateway

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Praveen,

You are referring to Odata model right? You can check this

Regards,

JK

Former Member
0 Kudos

Thanks Jitendra,

I have an wsdl file from which I  greate odata model, I am unable to get results. Getting only one record, where as the result should be more than one record. Give me some example to create odata model by seeing wsdl.

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

When you test the WSDL in SOAP UI tool or in STORM (Storm - Home), how many records do you get against an operation? Can you share the steps done for Odata model creation?

Few screenshots would be helpful to understand your requirement.

Regards,

JK