Author |
Message
|
sweety176 |
Posted: Tue Sep 13, 2005 6:24 am Post subject: Doesnt recognize Attribute |
|
|
Apprentice
Joined: 24 Aug 2005 Posts: 30
|
Hi
Following is my code
Code: |
CREATE FIELD OutputRoot.XML."SOAP-Env:Envelope";
SET OutputRoot.XML."SOAP-Env:Envelope".(XML.Attribute)"xmlns:dqrs" = InputRoot.XML."SOAP-Env:Envelope".(XML.Attribute)"xmlns:dqrsfn" || 'FN';
SET OutputRoot.XML."SOAP-Env:Envelope".(XML.Attribute)"xmlns:hrs" = InputRoot.XML."SOAP-Env:Envelope".(XML.Attribute)"xmlns:hrs";
SET OutputRoot.XML."SOAP-Env:Envelope".(XML.Attribute)"xmlns:err" = InputRoot.XML."SOAP-Env:Envelope".(XML.Attribute)"xmlns:err";
SET OutputRoot.XML."SOAP-Env:Envelope".(XML.Attribute)"xmlns:SOAP-Env" = InputRoot.XML."SOAP-Env:Envelope".(XML.Attribute)"xmlns:SOAP-Env";
SET OutputRoot.XML."SOAP-Env:Envelope".(XML.Attribute)"xmlns:xsi" = InputRoot.XML."SOAP-Env:Envelope".(XML.Attribute)"xmlns:xsi";
SET OutputRoot.XML."SOAP-Env:Envelope".(XML.Attribute)"xsi:schemaLocation" = InputRoot.XML."SOAP-Env:Envelope".(XML.Attribute)"xsi:schemaLocation";
*************************************************************
CREATE FIELD OutputRoot.XML."SOAP-Env:Envelope"."SOAP-Env:Body"."dqrs:DocumentQryRsMsg"."dqrs:DOCUMENT_QUERY_RESPONSE".IMAGE."ORIGINAL_LOAN".(XML.Attribute)"LoanOriginationSystemLoanIdentifier"; |
When I send my input message through this , i get the output with all namespaces created and the element ORIGINAL_LOAN created but the code doesnt seem to recognize (XML.Attribute) after ORIGINAL_LOAN so doesnt create the attribute.
If I use [/code]
If i use
SET OutputRoot.XML."SOAP-Env:Envelope"."SOAP-Env:Body"."dqrs:DocumentQryRsMsg"."dqrs:DOCUMENT_QUERY_RESPONSE".IMAGE."ORIGINAL_LOAN".(XML.Attribute) = 'LoanOrigination...';
Code: |
It creates the element ORIGINAL_LOAN and sets its value as LoanOrigination....
If I use |
SET OutputRoot.XML."SOAP-Env:Envelope"."SOAP-Env:Body"."dqrs:DocumentQryRsMsg"."dqrs:DOCUMENT_QUERY_RESPONSE".IMAGE."ORIGINAL_LOAN".(XML.Attribute)"LoanOriginationSystemLoanIdentifier = '12345';
it sets the value of ORIGINAL_LOAN as 12345.
Any idea why it isnt recognizing from this particular statement?
Regards
Sweety |
|
Back to top |
|
 |
dilse |
Posted: Tue Sep 13, 2005 8:47 am Post subject: |
|
|
 Master
Joined: 24 Jun 2004 Posts: 270
|
Hi,
If dqrs is your default namespace try the following statement or something similar along this. I am not sure if this works but just a thought.
SET OutputRoot.XML."SOAP-Env:Envelope"."SOAP-Env:Body"."dqrs:DocumentQryRsMsg"."dqrs:DOCUMENT_QUERY_RESPONSE".dqrs:IMAGE."dqrs:ORIGINAL_LOAN".(XML.Attribute)"dqrs:LoanOriginationSystemLoanIdentifier = '12345';
Hope this helps.... _________________ DilSe..
Take life as it comes.. |
|
Back to top |
|
 |
elvis_gn |
Posted: Tue Sep 13, 2005 10:34 pm Post subject: |
|
|
 Padawan
Joined: 08 Oct 2004 Posts: 1905 Location: Dubai
|
Hi sweety176,
First of all, do u have a mxsd which tells u which are the fields and which are the attributes. Open it in XMLSpy and find the namespace for each of ur fields....i doubt if you'll have "dqrs" infront of every field name....atleast i havent seen this in IDocs or any other standardised message sets....
Secondly if ur namespaces are correct then ur first command to create the attribute should work....whenever i have had issues with the namespaces or attributes not created/created as fields, it has always been a mistake in the namespace names...it could be spelling mistakes or case....
Regards. |
|
Back to top |
|
 |
sweety176 |
Posted: Wed Sep 14, 2005 6:13 am Post subject: solved |
|
|
Apprentice
Joined: 24 Aug 2005 Posts: 30
|
Hi
The problem is not with my namespaces as they are correct.There wasnt any spelling mistake or any other thing.But it worked when i removed the .(XML.Content) part.
I simply wrote it as
Code: |
SET OutputRoot.XML."SOAP-Env:Envelope"."SOAP-Env:Body"."dqrs:DocumentQryRsMsg"."dqrs:DOCUMENT_QUERY_RESPONSE".IMAGE[R]."LOAN".(XML.Attribute)ServicerLoanIdentifier = FIELDVALUE(InputRoot.XML."SOAP-Env:Envelope"."SOAP-Env:Body"."dqrsfn:DocumentQryRsMsg"."dqrsfn:DOCUMENT_QUERY_RESPONSE".Result[R]."Svc_Loan_Number"); |
I dont know what the problem was but it works this way.
If I add (XML.Content) then it creates for some and doesnt for some.
Regards
Sweety |
|
Back to top |
|
 |
elvis_gn |
Posted: Wed Sep 14, 2005 8:52 pm Post subject: |
|
|
 Padawan
Joined: 08 Oct 2004 Posts: 1905 Location: Dubai
|
Hi sweety176,
I don't find your XML.Content in the previous posts ?? The only difference I could notice was that you used "Loan" instead of "Original_Loan" and ofcourse SET/CREATE FIELD which i doubt was the problem...
Can i know where did you refer to by XML.Content ?? |
|
Back to top |
|
 |
sweety176 |
Posted: Thu Sep 15, 2005 5:39 am Post subject: |
|
|
Apprentice
Joined: 24 Aug 2005 Posts: 30
|
Yeah I am sorry I noticed that I didnt include XML.COntent in the code i posted here.
I had (XML.COntent after the XML.Attibute like
Code: |
.....(XML.Attribute)LoanOriginationSystemLoanIdentifier.(XML.Content) = FILEDVALUE(InputRoot....); |
but it woked when i removed the (XML.Content)
Regards
Sweety |
|
Back to top |
|
 |
|