on 03-03-2014 11:39 AM
<?xml version="1.0" encoding="utf-8" ?>
</innererror>
</error>
Inner error message : " Deserialization of XML failed via transformation ''
_______________________________________XML FILE _________________________________________________
<?xml version="1.0" encoding="UTF-8"?>
<atom:entry
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"
xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<atom:content type="application/xml">
<m:properties>
<d:ParentQuestGuid>42F2E933967A1EE3A6C5C06CE7D414BA</d:ParentQuestGuid>
<d:ExternalID>CORRECATE_V08</d:ExternalID>
<d:Planstartdate>2014-01-31T00:00:00</d:Planstartdate>
<d:FinalDate>2014-02-28T00:00:00</d:FinalDate>
<d:Actualfinishtime>PT00H00M00S</d:Actualfinishtime>
</m:properties>
</atom:content>
<atom:link
rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/zpartners"
type="application/atom+xml;type=feed"
title="Z_V02_AUDIT_SRV.zcorrecact_2_partner">
<m:inline>
<atom:feed>
<atom:entry>
<atom:content type="application/xml">
<m:properties>
<d:REF_GUID m:null="true" />
<d:PARENT_GUID m:null="true" />
<d:EXTERNAL_ID m:null="true" />
<d:Role_Sortnr>1</d:Role_Sortnr>
<d:Role>52</d:Role>
<d:Partner_Role>BUP003</d:Partner_Role>
<d:PARTNER_GUID m:null="true" />
<d:Responsible_Name>102</d:Responsible_Name>
<d:SYUNAME m:null="true" />
<d:ROLE_TEXT m:null="true" />
<d:RESPONSIBLE_TEXT m:null="true" />
<d:LANGU_ISO m:null="true" />
</m:properties>
</atom:content>
</atom:entry>
</atom:feed>
</m:inline>
</atom:link>
</atom:entry>
___________ Tried using the following solutions yet unsuccessful ___________
1) Cleared the cache
/IWBEP/CACHE_CLEANUP
/IWFND/CACHE_CLEANUP
2) Checked all the Date fields for "Nullable", both at header and item entitys.
_________ not clear about my xml format _________________
1) please check the xml format. i read other blogs and feel it is correct.
Regards,
Nitin Koushik
Hi Nitin,
are you using HTTP POST and the URL is the appropriate EntitySet? ( /sap/opu/odata/MyService/MyEntitySet )
Is zpartners a navigation property from your main entity to your sub entity?
Regards,
Marcus
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nitin,
could you check if your /IWBEP/IF_MGW_APPL_SRV_RUNTIME~CREATE_DEEP_ENTITY gets called?
Could it be that you forgot to fill the returning parameter er_deep_entity?
Should be like this:
FIELD-SYMBOLS: <value> TYPE yourentitytype.
CREATE DATA er_deep_entity TYPE yourentitytype.
ASSIGN er_deep_entity->* TO <value>.
<value> = ls_your_just_created_entity.
Best,
Marcus
I like to thank these people for helping me solving the problem,
1) Mr. Marcus Müller
2) Mr. Carlos Roggan
3) Mr. Jens Huesken
4) Mr. Steffen Froehlich
1) Thanks for helping me understand that the xml was correct.
2) During Create entity, it didn't matter even if i dont pass the non-nullable GUID field in the XML. However, i need to pass '0' to all non-nullable fields while using Create Deep Entity.
3) I tried inserting breakpoints in the code, it didnt help, i also tried with sap-ds-debug=true but not successful to solve the problem.
4) Also, Navigation name and deep entity structure name was different for which i got the calls going to Create Entity instead of Deep Entity.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nitin,
structure of your XML request body seem to be correct for me. When I had to use GUIDs for create method (POST), m:null="true" didn't worked for me, I always had to provide following data:
<d:REF_GUID>00000000-0000-0000-0000-000000000000</d:REF_GUID>
Please use dashes for field "ParentQuestGuid", too. For time-date fields I provided following:
<d:FinalDate>2014-03-08T00:00:00.0000000</d:FinalDate>
Could you try this out?
--
Steffen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
is it possible to send the request along with query parameter sap-ds-debug=true to get additional information on what is going wrong with the request? If you don't mind, please share the result.
Best regards,
Jens
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nitin,
there seems to be an issue with the xml in the request body.
As an approach, you could try to send two separate requests, in order to check if the creation of the parent entity works and then use the specified link and check if the creation of the child entity works with the given xml. This could help to clarify which part of the xml is actually rejected
I've copied below the xml of a deep insert that works for me.
It is the request body of a POST request sent to the BusinessPartnerCollection of the service ZGWSAMPLE_SRV that can be found here:
https://sapes1.sapdevcenter.com/sap/opu/odata/sap/ZGWSAMPLE_SRV?sap-ds-debug=true
Hope it helps a bit.
Regards,
Carlos
<?xml version="1.0" encoding="utf-8"?>
<entry xml:base="http:/.../sap/opu/odata/sap/ZGWSAMPLE_SRV/"
xmlns="http://www.w3.org/2005/Atom"
xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"
xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices">
<category term="ZGWSAMPLE_SRV.BusinessPartner"
scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/>
<link href="BusinessPartnerCollection('0100000002')/Contacts"
rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Contacts"
type="application/atom+xml;type=feed"
title="Contacts">
<m:inline>
<feed xml:base="http://.../sap/opu/odata/sap/ZGWSAMPLE_SRV/">
<entry>
<category term="ZGWSAMPLE_SRV.Contact"
scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/>
<content type="application/xml">
<m:properties>
<d:BusinessPartnerID>0100000002</d:BusinessPartnerID>
<d:Title/>
<d:FirstName>Maria Julia</d:FirstName>
<d:MiddleName/>
<d:LastName>Brown</d:LastName>
<d:Nickname>Mary</d:Nickname>
<d:Initials/>
<d:Sex>F</d:Sex>
<d:PhoneNumber>3023352668</d:PhoneNumber>
<d:FaxNumber/>
<d:EmailAddress>maria.brown3@delbont.com</d:EmailAddress>
<d:Language>E</d:Language>
<d:PostalCode>19899</d:PostalCode>
<d:City>Wilmington, Delaware</d:City>
<d:Street>1 2345 King Street</d:Street>
<d:Building>1</d:Building>
<d:Country>US</d:Country>
<d:AddressType>02</d:AddressType>
</m:properties>
</content>
</entry>
</feed>
</m:inline>
</link>
<content type="application/xml">
<m:properties>
<d:AddressType>02</d:AddressType>
<d:Country>US</d:Country>
<d:Street>1 2345 King Street</d:Street>
<d:PostalCode>19899</d:PostalCode>
<d:City>Wilmington, Delaware</d:City>
<d:CurrencyCode>USD</d:CurrencyCode>
<d:LegalForm>Ltd.</d:LegalForm>
<d:CompanyName>DelBont Industries3</d:CompanyName>
<d:BusinessPartnerID>0100000002</d:BusinessPartnerID>
<d:BpRole>01</d:BpRole>
<d:EmailAddress>maria3.brown@delbont.com</d:EmailAddress>
</m:properties>
</content>
</entry>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.