SAP Netweaver Gateway HTTP Adapter を使用して、SAP と IBM MobileFirst を統合しています。SAP バックエンド システムに正常に接続でき、データを xml 形式で取得しています。これは私が得ている応答です:
{
"RETURN": "<?xml version=\"1.0\" encoding=\"utf-8\"?><app:service xml:base=\"http:\/\/sapecc.mss.com:8000\/sap\/opu\/sdata\/iwfnd\/SampleUserProcessing\/\" xmlns:app=\"http:\/\/www.w3.org\/2007\/app\" xmlns:atom=\"http:\/\/www.w3.org\/2005\/Atom\" xmlns:sap=\"http:\/\/www.sap.com\/Protocols\/SAPData\" xmlns:gp=\"http:\/\/www.sap.com\/Protocols\/SAPData\/GenericPlayer\" xmlns:m=\"http:\/\/schemas.microsoft.com\/ado\/2007\/08\/dataservices\/metadata\"><app:workspace sap:semantics=\"things\"><atom:title>Things<\/atom:title><\/app:workspace><app:workspace sap:semantics=\"data\"><atom:title>Data<\/atom:title><app:collection href=\"RoleCollection\" sap:creatable=\"true\" sap:updatable=\"true\" sap:deletable=\"true\"><atom:title>RoleCollection<\/atom:title><sap:member-title>Role<\/sap:member-title><\/app:collection><app:collection href=\"ImageCollection\" sap:creatable=\"true\" sap:updatable=\"true\" sap:deletable=\"true\"><atom:title>ImageCollection<\/atom:title><sap:member-title>Image<\/sap:member-title><\/app:collection><app:collection href=\"EmailCollection\" sap:creatable=\"true\" sap:updatable=\"true\" sap:deletable=\"true\"><atom:title>EmailCollection<\/atom:title><sap:member-title>Email<\/sap:member-title><\/app:collection><app:collection href=\"ActivitygroupCollection\" sap:creatable=\"true\" sap:updatable=\"true\" sap:deletable=\"true\"><atom:title>ActivitygroupCollection<\/atom:title><sap:member-title>Activitygroup<\/sap:member-title><\/app:collection><app:collection href=\"UserCollection\" sap:creatable=\"true\" sap:updatable=\"true\" sap:deletable=\"true\"><atom:title>UserCollection<\/atom:title><sap:icon>icon<\/sap:icon><sap:member-title>User<\/sap:member-title><atom:link href=\"SubscriptionCollection\" rel=\"http:\/\/www.sap.com\/Protocols\/SAPData\/rel#subscribe\"\/><\/app:collection><app:collection href=\"UserXnotificationCollection\" sap:creatable=\"false\" sap:updatable=\"false\" sap:deletable=\"false\"><atom:title>UserxnotificationCollection<\/atom:title><sap:member-title>UserXnotification<\/sap:member-title><\/app:collection><app:collection href=\"SubscriptionCollection\" sap:semantics=\"subscriptions\" sap:creatable=\"true\" sap:updatable=\"false\" sap:deletable=\"true\"><atom:title>Subscriptions<\/atom:title><sap:icon>\/sap\/public\/opu\/resources\/sap\/iwfnd\/subscription\/icon_subscription.png<\/sap:icon><sap:member-title>Subscription<\/sap:member-title><gp:collectionLayout display-order=\"1000\" top-level=\"true\"\/><\/app:collection><\/app:workspace><app:workspace sap:semantics=\"subscriptions&notifications\"><atom:title>Subscriptions & Notifications<\/atom:title><\/app:workspace><\/app:service>",
"isSuccessful": true,
"responseHeaders": {
"content-type": "application\/xml",
"dataserviceversion": "2.0",
"server": "SAP NetWeaver Application Server \/ ABAP 731",
"x-sap-odata-extension-version": "0.9;gp=0.8"
},
"statusCode": 200,
"statusReason": "OK"
}
ここで、xml から特定の値を選択したいと思います。この分野で私を助けてくれる人はいますか?
function retrieveTravelAgencyProperty() {
var request = {
CollectionName: "SampleUserProcessing",
};
return WL.Server.fetchNWBusinessObject(request);
}