Skip to Content
0
Former Member
Mar 28, 2006 at 12:39 PM

'&' in Value-node of GetObjectKeyBySingleValue request doesn't work

28 Views

I am developing a web service that uses the DI Server for accessing the SBO database. I use a GetObjectBySingleValue request to get all DocEntries from oPurchaseOrders (OPOR) that match to a suppliername:

 sCmd = "<?xml version=""1.0"" encoding=""UTF-16""?>"
 sCmd += "<env:Envelope xmlns:env=""http://schemas.xmlsoap.org/soap/envelope/"">"
 sCmd += "<env:Header><SessionID>" & SessionID & "</SessionID></env:Header>"
 sCmd += "<env:Body><dis:GetObjectKeyBySingleValue xmlns:dis=""http://www.sap.com/SBO/DIS"">"
 sCmd += "<ObjNum>oPurchaseOrders</ObjNum>"
 sCmd += "<PropName>CardName</PropName>"
 sCmd += "<Value>" & SupplierName & "</Value>"
 sCmd += "<Condition>bqc_Equal</Condition>"
 sCmd += "</dis:GetObjectKeyBySingleValue></env:Body></env:Envelope>"

The request works for most suppliernames, but when I try to get the docEntries for the supplier "Clothes & More", I'm getting an error message:

env: Sender  Invalid XML  Expected entity name for reference

I think it doesn't work because of the '&' sign, because this differs from other suppliernames.

Does someone know, how to get this work?