I have a temp record list having two records with structure like
tmp2
–text
–amt
my xml is having nested array structure like
<parent1>
–<parent2>
–text
–amt
–vat
–subtot
so i’m trying to loop at /tmp2 (in-array)
(out-array = /parent1/parent2)
inside a map i’m mapping those text and amount fields but it’s not creating parent2 node at all
Kindly shower ur valuable inputs…
awaiting ur replies…
-SK
Another way to do this would be to delete your references to parent 1 and parent 2 (including within the loop). Then create a temporary record structure for parent1 and parent 2 and set some dummy values for text and amt. Make sure define more than 2 values for parent 2 to ensure that webMethods treats this as record list. This step should exist before your loop. Then specify your loop, in array and out array and then map the values. After you have done this, delete the step where you have assigned temp values for parent 1 and parent 2. Then it will work.
The reason you are getting the error is that, simply by putting parent 2 in the out array will not mean that wM will treat this as a list. So all this work around of first defining the temp values.
and after this i’m concatenating the XML header manually with header as <?xml> , just to include that encoding ISO stuff.
but in the xmldata hasn’t got lineitems which are in boundNode and Invoice structure aswell…! Could you please tell me why those line items are getting stripped off…?
Looks like your recordReference mapped from the boundNode is messing up,please check whether the Record.XMLSchemas:Invoice structure is matching with the boundNode in the pipeline.
Also try unsetting generateReqTags = true and step thru the recordToDocument.
And there is some easier way to include XML header with encoding other than concatenating.(create the @encoding in the Document Namespace properly.You must add in the same level as root element of your document. So you can set @encoding in a map of your service, before convert document boundNode to xmldata. This you do like any other element of your document namespace)
let us know the difference and if possible upload a screen shot of the the recordToDocument Step.
I have screenshots of recordtoDocument and contents of boundNode after the execution of recordToDocument service.
Couldn’t upload those doc as it 's exceeding 70 kb…
RMG - i’m sending it to your email id. Hope you don’t mind…
The behaviour of generateReqTags is if you want to include empty tags in the xmldata say <vatamt></vatamt> etc… which are mandatory in the document structure then you set to True,otherwise set False.Its upto your target requirement.
And i have noticed in your screen shot (uploaddoc1) that Roottag of boundNode/Billing but it should be boundNode/Invoice right?
This might be the reason that it is not showing line details in the xmldata.So the recordName(Record.XMLSchemas:Invoice) you have set is not matching with the boundNode and ultimately xmldata is messing up.
So you mean record structure is Invoice/Billing and this is mapping to boundNode.
still wondering what could be the reason of not showing line details in the output xmldata,since everything looks fine in the mapping recordToDocument step as per your clarification.
If possible mail me ur package i have to look into it.
Just to let you all know that i’m still stuck with this problem… i’ve been trying to debug and find out but invain …
any inputs would be very very helpful.
Thanks in advance
Sreedhar K
Its wierd that removing recordName worked as expected,since setting this recordName helps for wellformat,structuring the xmldata based on the record layout.
I believe there should be some extra stuff coming in the mapping of Invoice struture which is breaking detail structure and that could be missing in the record structure which recordToDocument parses referencing with recordName.
Anyways it worked go a head with further processing.