cancel
Showing results for 
Search instead for 
Did you mean: 

Nested XSD issue in message mapping field attribute defined in Complex XSD

Former Member
0 Kudos

Hi Gurus, We have a scenario File-PI-Proxy, where we have to imported the nested XSDs ( comprises of Main XSDs, complex and simple types). The issue the Main XSD that we use in message mapping does not show some field attributes. This field attributes are defined in the deep nested XSD complex types. Mapping to the complex type XSD is not feasible in PI, however, when the external system sends the XML message that shows the hidden field attribute populated. The challenge is how do we map in message mapping when this attribute field is not available on the Main XSD. When the XML sent to PI has this field attribute populated in, however, in the Main XSD this field is not shown under the Node level due to which mapping is not possible in message mapping. Please can somebody help on this or if anyone has encountered the similar issue please can you provide what was the solution. Thanks. Misha

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Misha,

are you talking about several XSD files, where the Main XSD file references the other XSD files?

Did you check the "external references" tab in the external definition? It lists all referenced documents. In the referenced external definition, you have to supply the "Source" in order to make the reference work.

Please check section "Sources and References to External Documents" for external definitions at SAP help.

Please have a look at as well it might solve your problem... in case you talk of references

regards, Martin

baskar_gopalakrishnan2
Active Contributor
0 Kudos

Nice to know about this feature. Thanks for sharing.

Former Member
0 Kudos

Thanks Bhaskar and Martin for your replies.

Martin,

We initially imported the the group of XSD's is one shot, and in PI 7.3 it automatically assigns the refereence XSD. Also the main XSDs has the tags import and include tags which is linking multiple schema.

However, for one one Main XSD the we have couple of attribute fields that do not show up in message mapping. As they are nested XSDs and those hidden fields are visible in different XSD. And when the XML file sent from external system shows up those hidden fields populated with values. My question is in message mapping for that Main XSD external definaition we are not able to pull that hidden field to map.

Also I tried to create separate Message Type with that Main XSD structure including the hidden fields and when we test in message mapping we get "Cannot create target /ns): MT_ " error.

How can we handle this?

Many thanks in advance for your valuable inputs.

Former Member
0 Kudos

Hi again,

so the external references are properly linked? You can navigate to a reference by double clicking on the "Name" in tab "external references"?

Could you please upload the XSD files here? If not please provide screenshots showing your problems. It might be easier to reconstruct the situation on my site.

Thanks & regards, Martin

Former Member
0 Kudos

Hi Martin,

Thanks for getting back to me on this. Yes we are able to drill down to reference XSD's from External Reference under the External Definition.

Regarding sending the XSD's, please could you provide your email id that I could send you.

Thanks,

Misha

Former Member
0 Kudos

You can upload here in SCN. You have to open your thread outside 'Communications', then in the reply use advanced editor and attach files.

Former Member
0 Kudos

Thanks Martin, I know this process to upload files here on SCN, due to sensitivity of the XSD's I am not uploading them publicly. Therefore I would like to email them to you directly instead. Thanks & Regards, Misha

Former Member
0 Kudos

Hi Martin,

As requested I am not able to upload the XSD's due to SCN file upload restrictions and also .ZIP files not allowed.

Please let me know how you want me to send them to you.

Thanks & Regards,

Misha

Former Member
0 Kudos

Try to rename the files to some supported format, e.g. .txt. I will rename after download

Former Member
0 Kudos

Hi Martin, I still have issues in attaching the files as .txt and after renaming them.

Please could you check the XSD's provided in the link below:

http://www.fms.treas.gov/eda/xml/ASAPRv20/asap_AcctSvcsRpt/asap_AgPaymentRpt/index.html

Download the Current ASAP Release that has all the 7 group of XSDs.

Thanks & Regards,

Misha

Former Member
0 Kudos

Hi again, which parts are hidden for you?

Former Member
0 Kudos

Hi Martin,

Thanks for getting back. Please check the AgencyPaymentReport structure in AccountServicesReport.xsd. Under AgencyPaymentReport-->AgencyPaymentReport->PaymentTransaction--it should have pulled up ScheduleNumber, TotalAmount and TotalCount which is not directly shown in message.

ScheduleNumber ultimately "lives" in Common_ComplexTypes.xsd. Here is the inheritance flow from AccountServicesReport.xsd through Common_AccountServices.xsd, down to Common_ComplexTypes.xsd.

Please let me know if you followed the my issue and also thanks for your valuable inputs.

Thanks & Regards,

Misha

Former Member
0 Kudos

Has anyone come across an such issue with Nested XSD's and can provide some valuable inputs to overcome the issue.

Thanks Misha.

Former Member
0 Kudos

Hi Misha, I observe the same issue. The attributes you mentioned are not displayed, although some other attributes which are defined for the same type (TransactionContainer_PaymentTransaction_ComplexType) are being displayed, e.g. DocumentType.

I opened the XSD in XMLSpy and there it looks as expected, all attributes you're missing are shown.

If you need access to these fields you can run an XSL mapping before the message mapping where you transfer the attribute values to unused fields which you have access to in message mapping.

You could also open a customer message in support portal to check if this is actually a bug or intended, but this will take some time to solve, so the XSL mapping would be fastest way to get access to these values.

Regards, Martin

Former Member
0 Kudos

Thanks Martin. We infact opened a customer message with SAP last week, unfortunately they could not come up with Standard solution. They have provided some links from sdn to merge the multiple XSD's into single one and try.

However, I liked the use of XSLmapping that you have suggested please could you provide me some examples and steps if possible.

Thanks for your help.

Regards,

Misha

Former Member
0 Kudos

Just to mention we are in PI 7.3 and I also tried to look for solutions on SDN, however, did not find the answer for PI 7.3 specifically.

Thanks Misha.

nabendu_sen
Active Contributor
0 Kudos

Hi Misha,

If you open that Main XSD with Altova or with any other XML tool, can you see those hidden fields which are not coming in Mapping Editor of SAP PI?

Former Member
0 Kudos

Hi Nabendu,

When we open the Main XSD in Altova Spy we do not find those fields on there. However, when the XML file is sent from external system that has the hidden field populated. Now my question is how can we handle this in message mapping, especially the hidden attribute field is not seen on the Main XSD.

Thanks,

Misha

baskar_gopalakrishnan2
Active Contributor
0 Kudos

I'm not positive that PI supports nested XSD.  Your Main XSD should have either import or include tags to add multiple schema document of different target namespace or same target namespace respectively.

refer

http://www.w3schools.com/schema/el_include.asp

http://www.w3schools.com/schema/el_import.asp

Please make sure that it has required import or include tags for referring those child xsds.  IMO, nested xsds might work in the other tools not in PI.

Why don't include the content in the same xsd and import it in PI?

Hope that helps.