on 04-20-2017 7:54 AM
Hi folks,
when finishing an ios sdk project in sap assistant system always says : cannot load metadata. Then i tried using an XmL from a productive service where we have the metadata. the Sap assistant than says: No leading / in namespaces allowed.
As all our Services start with a / - Namespaces are like /TYED/ - this is a problem? is this a bug? any workarounds?
kind regards oliver
ok finally we found the error.
it is not allowed to have a dot in the namespace - in segw and with UI5 Apps this is allowed but not with ios apps.
a namespace with no dot and no slash works
regards
oliver
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Andreas,
ok in our ui5 apps, we change the namespace in the MPC-Class and replace / with Dots (not always but in some cases). it is just kind of weird that when generating gatewayservices out of SEGW (and using Package Names with /NAMESPACE/ and Classes with /NAMESPACE/) it is possible to generate.
So as i interpret this would work , when replacing the / in the namespace in the MPC_EXT class (overriding namespace name), is this correct?
i mean in MPC_EXT coding like that (setting new namesapace form orignial one /TYED/CA_TMA_0001_SRC:
model->set_schema_namespace( 'TYED.CA_TMA_0001_SRV' ).
regards oliver
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Oliver,
The OData spec doesn't allow slashes in namespaces; recent Gateway versions should also prohibit that. You can either adjust the namespaces of your services, or also manually change the metadata, replace slashes with dots, e.g., and then generate the proxy classes from there using the console client.
I hear you saying that UI5 web apps work, but that doesn't necessarily mean that the OData service is correct - as web apps consume the service more 'ad-hoc' they may not even evaluate/need the namespace information.
Hope that works for you
Thanks
Andreas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hello csaba,
metdadata is correct ,as we use this exactly metadata in normal fiori apps, thats why i asked that maybe namespaces starting with as / don't work, or there is a bug??
regards
oliver
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Csaba,
below you will find the metadata which does not work when importing. error mesage says no leading / in namespace - but our namespace here as you can see ist /tyed/
regards oliver
<?xml version="1.0" encoding="utf-8"?><edmx:Edmx Version="1.0" xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:sap="http://www.sap.com/Protocols/SAPData"><edmx:DataServices m:DataServiceVersion="2.0"><Schema Namespace="CA_UHD_MOB_SRV" xml:lang="de" sap:schema-version="1" xmlns="http://schemas.microsoft.com/ado/2008/09/edm"><EntityType Name="VariantProperty" sap:content-version="1"><Key><PropertyRef Name="VariantOrder"/></Key><Property Name="VariantOrder" Type="Edm.String" Nullable="false" MaxLength="5" sap:label="R/2_TABELLE" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="Icon" Type="Edm.String" Nullable="false" MaxLength="40" sap:label="Symbolname" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="Title" Type="Edm.String" Nullable="false" MaxLength="40" sap:label="Text in der Länge 40" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="VariantCount" Type="Edm.String" Nullable="false" MaxLength="10" sap:label="Characterfeld der Länge 10" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="CountUnit" Type="Edm.String" Nullable="false" MaxLength="20" sap:label="Bezeichnung" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="Info" Type="Edm.String" Nullable="false" MaxLength="40" sap:label="Text in der Länge 40" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="InfoStatus" Type="Edm.String" Nullable="false" MaxLength="10" sap:label="Text" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="TargetParams" Type="Edm.String" Nullable="false" MaxLength="40" sap:label="Text in der Länge 40" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/></EntityType><EntityType Name="UHD_Ticket" sap:content-version="1"><Key><PropertyRef Name="Ticket"/></Key><Property Name="Ticket" Type="Edm.String" Nullable="false" MaxLength="10" sap:label="TicketNummer" sap:creatable="false" sap:updatable="false" sap:sortable="false"/><Property Name="Objnr" Type="Edm.String" MaxLength="22" sap:label="Objektnummer" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="Cuname" Type="Edm.String" MaxLength="12" sap:label="Benutzername" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="Cdate" Type="Edm.DateTime" Precision="7" sap:label="Datum" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="Ctime" Type="Edm.Time" Precision="0" sap:label="Feld vom Typ TIMS" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="Ouname" Type="Edm.String" MaxLength="12" sap:label="Benutzername" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="Odate" Type="Edm.DateTime" Precision="7" sap:label="Datum" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="Otime" Type="Edm.Time" Precision="0" sap:label="Feld vom Typ TIMS" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="Xuname" Type="Edm.String" MaxLength="12" sap:label="Benutzername" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="Xdate" Type="Edm.DateTime" Precision="7" sap:label="Datum" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="Xtime" Type="Edm.Time" Precision="0" sap:label="Feld vom Typ TIMS" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="Prio" Type="Edm.String" MaxLength="1" sap:label="Priorität" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="Descript" Type="Edm.String" MaxLength="60" sap:label="Beschreibung" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="EstAufwand" Type="Edm.Decimal" Precision="5" Scale="1" sap:label="gesch Aufw. STD" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="TatAufwand" Type="Edm.Decimal" Precision="5" Scale="1" sap:label="Aufwand in Std" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="ExtSolver" Type="Edm.String" MaxLength="40" sap:label="Text in der Länge 40" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="Attach" Type="Edm.String" MaxLength="70" sap:label="char70" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="Tdid" Type="Edm.String" MaxLength="4" sap:label="Text-ID" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="Tdspras" Type="Edm.String" MaxLength="1" sap:label="Sprache" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="Tdobject" Type="Edm.String" MaxLength="10" sap:label="Textobjekt" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="Tdname" Type="Edm.String" MaxLength="70" sap:label="Textname" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="IntTdid" Type="Edm.String" MaxLength="4" sap:label="Text-ID" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="IntTdspras" Type="Edm.String" MaxLength="1" sap:label="Sprache" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="IntTdobject" Type="Edm.String" MaxLength="10" sap:label="Textobjekt" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="IntTdname" Type="Edm.String" MaxLength="70" sap:label="Textname" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="Category" Type="Edm.String" MaxLength="20" sap:label="Kategorie" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="Subcategory" Type="Edm.String" MaxLength="20" sap:label="SubKategorie" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="SapTcode" Type="Edm.String" MaxLength="20" sap:label="Transaktionscode" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="SapProgram" Type="Edm.String" MaxLength="40" sap:label="Reportname" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="SapBelnr" Type="Edm.String" MaxLength="10" sap:label="Vertriebsbeleg" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="SysCatname" Type="Edm.String" MaxLength="20" sap:label="Maschinen-Name" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="SysAppl" Type="Edm.String" MaxLength="30" sap:label="Anwendung" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="FolgeAkt" Type="Edm.String" MaxLength="50" sap:label="Erklärung" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="Aktnr" Type="Edm.String" MaxLength="10" sap:label="Antrag Nummer" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="ClDate" Type="Edm.DateTime" Precision="7" sap:label="Datum" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="ClUname" Type="Edm.String" MaxLength="12" sap:label="Benutzername" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="FehlerCat" Type="Edm.String" MaxLength="20" sap:label="FehlerKategorie" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="AddField01" Type="Edm.String" MaxLength="20" sap:label="Bezeichnung" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="AddField02" Type="Edm.String" MaxLength="20" sap:label="Bezeichnung" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="AddField03" Type="Edm.String" MaxLength="20" sap:label="Bezeichnung" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="AddField04" Type="Edm.String" MaxLength="20" sap:label="Bezeichnung" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="Solution" Type="Edm.String" MaxLength="10" sap:label="HinweisNummer" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="FehlerkatId" Type="Edm.String" MaxLength="1" sap:label="Einstelliges Kennzeichen" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="Ctelnr" Type="Edm.String" MaxLength="40" sap:label="Char" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="Endkunde" Type="Edm.String" MaxLength="250" sap:label="EndKunde" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="XuserReadDate" Type="Edm.DateTime" Precision="7" sap:label="datum gelesen experte" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="XuserReadTime" Type="Edm.Time" Precision="0" sap:label="uhrzeit gelesen experte" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="Cloned" Type="Edm.String" MaxLength="1" sap:label="cloned ticket?" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="RefTicket" Type="Edm.String" MaxLength="10" sap:label="TicketNummer" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="EndkundeTel" Type="Edm.String" MaxLength="40" sap:label="Char" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="LastReopenDate" Type="Edm.DateTime" Precision="7" sap:label="Datum" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="StatTicket" Type="Edm.String" MaxLength="1" sap:label="Einstelliges Kennzeichen" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="CunameEmail" Type="Edm.String" sap:label="CUNAME_EMAIL" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="SecureData" Type="Edm.String" sap:label="SECURE_DATA" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="WebTicket" Type="Edm.String" MaxLength="1" sap:label="Einstelliges Kennzeichen" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="DlReq" Type="Edm.String" MaxLength="1" sap:label="Einstelliges Kennzeichen" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="BerCb" Type="Edm.String" MaxLength="1" sap:label="Einstelliges Kennzeichen" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="Area" Type="Edm.String" MaxLength="20" sap:label="Bezeichnung" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="CunameLong" Type="Edm.String" MaxLength="200" sap:label="Text" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="CunameMail" Type="Edm.String" MaxLength="200" sap:label="Text" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="OunameLong" Type="Edm.String" MaxLength="200" sap:label="Text" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="OunameMail" Type="Edm.String" MaxLength="200" sap:label="Text" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="XunameLong" Type="Edm.String" MaxLength="200" sap:label="Text" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="XunameMail" Type="Edm.String" MaxLength="200" sap:label="Text" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="EscalLevel" Type="Edm.String" sap:label="ESCAL_LEVEL" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="StatusText" Type="Edm.String" sap:label="STATUS_TEXT" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="Status" Type="Edm.String" MaxLength="4" sap:label="Status" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="FehlerKat" Type="Edm.String" MaxLength="20" sap:label="FehlerKategorie" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="IntText" Type="Edm.String" sap:label="INT_TEXT" sap:creatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="IntTextOld" Type="Edm.String" sap:label="INT_TEXT_OLD" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="ExtText" Type="Edm.String" sap:label="EXT_TEXT" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="ExtTextOld" Type="Edm.String" sap:label="EXT_TEXT_OLD" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="Editable" Type="Edm.Boolean" sap:label="Einstelliges Kennzeichen" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="Guid" Type="Edm.String" Nullable="false" sap:label="Guid" sap:creatable="false" sap:updatable="false" sap:sortable="false"/><NavigationProperty Name="Filecoll" Relationship="CA_UHD_MOB_SRV.Filecoll" FromRole="FromRole_Filecoll" ToRole="ToRole_Filecoll"/></EntityType><EntityType Name="Files" sap:content-version="1"><Key><PropertyRef Name="Ticket"/><PropertyRef Name="Fileid"/></Key><Property Name="Ticket" Type="Edm.String" Nullable="false" MaxLength="10" sap:label="Characterfeld der Länge 10" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="Filename" Type="Edm.String" Nullable="false" sap:label="FILENAME" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="Fileid" Type="Edm.Byte" Nullable="false" sap:label="FILEID" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="Url" Type="Edm.String" Nullable="false" sap:label="URL" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/><Property Name="Mime" Type="Edm.String" Nullable="false" sap:label="MIME" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/></EntityType><Association Name="Filecoll" sap:content-version="1"><End Type="CA_UHD_MOB_SRV.UHD_Ticket" Multiplicity="1" Role="FromRole_Filecoll"/><End Type="CA_UHD_MOB_SRV.Files" Multiplicity="*" Role="ToRole_Filecoll"/><ReferentialConstraint><Principal Role="FromRole_Filecoll"><PropertyRef Name="Ticket"/></Principal><Dependent Role="ToRole_Filecoll"><PropertyRef Name="Ticket"/></Dependent></ReferentialConstraint></Association><EntityContainer Name="CA_UHD_MOB_SRV_Entities" m:IsDefaultEntityContainer="true" sap:supported-formats="atom json xlsx"><EntitySet Name="UHD_TicketSet" EntityType="CA_UHD_MOB_SRV.UHD_Ticket" sap:creatable="false" sap:updatable="false" sap:deletable="false" sap:pageable="false" sap:content-version="1"/><EntitySet Name="FilesSet" EntityType="CA_UHD_MOB_SRV.Files" sap:creatable="false" sap:updatable="false" sap:deletable="false" sap:pageable="false" sap:content-version="1"/><EntitySet Name="VariantPropertySet" EntityType="CA_UHD_MOB_SRV.VariantProperty" sap:creatable="false" sap:updatable="false" sap:deletable="false" sap:pageable="false" sap:content-version="1"/><AssociationSet Name="FilecollSet" Association="CA_UHD_MOB_SRV.Filecoll" sap:creatable="false" sap:updatable="false" sap:deletable="false" sap:content-version="1"><End EntitySet="UHD_TicketSet" Role="FromRole_Filecoll"/><End EntitySet="FilesSet" Role="ToRole_Filecoll"/></AssociationSet></EntityContainer><atom:link rel="self" href="http://cat01040.tyrolit.com:8080/sap/opu/odata/TYED/CA_UHD_MOB_SRV/$metadata" xmlns:atom="http://www.w3.org/2005/Atom"/><atom:link rel="latest-version" href="http://cat01040.tyrolit.com:8080/sap/opu/odata/TYED/CA_UHD_MOB_SRV/$metadata" xmlns:atom="http://www.w3.org/2005/Atom"/></Schema></edmx:DataServices></edmx:Edmx>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Oliver,
Slashes are indeed not valid in OData namespaces; I believe there used to be an issue in older SAP Gateway systems that has been fixed by now (not sure on the exact timing and Gateway versions).
Can you fix your backend to not have slashes in namespaces? Alternatively, you could manually replace the slashes with dots in the metadata before you generate proxy classes, that should work for you as well.
Thanks
Andreas
Hi Oliver,
I assume that you metadata is invalid and thats the reason why you are facing this error message. Could you please share your metadata with us for further investigation?
Regards,
Csaba
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.