cancel
Showing results for 
Search instead for 
Did you mean: 

Target message in Mesasage mapping

Former Member
0 Kudos

Hi,

I am trying to do a file to SOAP scenario. I have set up data types for the source file. I have an XML target file(not the structure but with tags and values). I need to bring it to the target in the Message mapping to do my mapping.

In XI 30 it allows XML file browsed from local file..or in repository it allows external definitions whereby I can convert it into a DTD or WSDL and load it..or do I need to create the data type for the XML target manually...and then pull it into the mapping interface???

I am not sure which would be the best approach..I am planning to use a SOAP adapter to send the outgoing XML msg. If I import XML file from the local browser I am getting the values also..Is it possible to just get the structure of the XML document.?

Any help would be highly appreciated...

- Krishnan

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Krishnan-

I agree with William. Just upload the WSDL/XSD/DTD structure in the Repository for your target message. If I understand correctly, you are using the "TEST" tab to get the values when you import the XML file? Is this correct or are you doing something else to get the values in to the Repository? Let us know...

Good luck!

james

Former Member
0 Kudos

Hi,

I created a .xsd VERSION of the XML file and uploaded into the external definitions and then created a message interface using this external defintions. I also used this external definition into message mapping. I am not much concerned abt the values. Yes, I can see the values in the TEST tab when I create the XML instance. Thanks James!!!...

But here is a small problem when I try to do the mapping, since my source is an invoice Idoc and target is this xml..there are some header tags ...like <SoldTo></SoldTo> for example which come into the mapping as header tags and type is specified as SoldTo to...How do I map this? These header tags has item tags like address, postal code which have type specified as xsd:string...but these header tags carry their own name as type in the message mapping....I am just confused on how to map these...

-Krishnan

Former Member
0 Kudos

Dear Krishnan-

The decision to map to the the header tag <SoldTo> really depends on the cardinality of that particular node. If the object is mandatory in your XML strucutre(ie: 1:1), then there is no need to map anything to this tag. If it is optional (ie 0:1 or 0:n), then you will need to map something to it based on some qualifier that is in the source for the children tags (nodes/elements).

Target Example:

<PO>

_<...>

__<Body>

___<SoldTo>

____<Address>

____</Address>

___</SoldTo>

__</Body>

_</...>

</PO>

If the <SoldTo> is optional in your External Definition, then you should map something to your <SoldTo> node in your graphical mapping. The existence of value(s) in the subordinate node (ie <Address> tag) does not automatically generate the parent tag (ie <SoldTo>) if the cardinality of the parent node is optional. You must map something to generate the optional parent node. This can be done in a number of ways. The most logical would be to select some criteria based on the commonality of the parent and child nodes. Or if you don't care, just hardcode any constant string. However, then you always get the node which defeats something being optional.

Here's some pseudocode for ya...

Parent Example: SoldTo CreateIf PARVW=AG (Assuming you are using and INVOIC01 or ORDERS05 idoc as your source)

Child Example: Address Equals "STRAS" IF PARVW=AG.

In the end, you would not need to map the SoldTo in your example unless it's an optional tag.

Try it and let us know!

Bon Chance!

james

Former Member
0 Kudos

The best way is to import the WSDL file into External Definitions in the Interface Objects of your namespace.

Then, you can reference it from your Message Mapping. There is no need to duplicate what you have in the WSDL.

Regards,

Bill