Hi all,
We are facing an issue when on user creation through Adaxes web service.
The problem is, we have special characters (ampersand) in some company name : e.g M&L
I'm escaping ampersand character in spml request as following :
<attr name="company" xmlns="urn:oasis:names:tc:DSML:2:0:core">
<value>M&L</value>
</attr>
And get following erros in :
<?xml version="1.0" encoding="utf-8"?>
<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
<Body>
<addResponse status="failure" error="customError" xmlns="urn:oasis:names:tc:SPML:2:0">
<errorMessage>The name reference is invalid. (Server: eu.loi.net)</errorMessage>
</addResponse>
</Body>
- Adaxes server event log :
Command Processor 'Business Rules' has set an incorrect state 'OPERATION_STATE_PROCESSING' to the following command: Create 'SAWYER Tom (eu.loi.net\EU90-Other Objects\Users)'. Full Name: 'X', First Name: 'Tom', Last Name: 'SAWYER', Description: 'User created via Adaxes SPML provider.', User Logon Name (pre-Windows 2000): 'tsawyer', User Logon Name: 'Tom.SAWYER@loccitane.com', Password Last Set: '-1', Company: 'M&L', Department: 'IT/IT INFRA-SYSTEMS-NETWORK', Office: 'FR Factory Manosque Grandes Terres', Manager: 'john.smith2@loccitane.com', Employee ID: 'YYYY', Employee Type: 'Permanent', Mobility Policy: 'False', Category: 'Office User', Name: 'SAWYER Tom', Display Name: 'SAWYER Tom', Password: '******', Extension Attribute 9: 'O.k6qC[T', Country: 'FR', City: 'Manosque'. The state has been changed to 'OPERATION_STATE_FAILED_NO_CONTINUE'.
Softerra.Spml2Library.Utils.Spml2Exception: SPML library reported an error. ---> Softerra.Adaxes.Adsi.DirectoryComException (0x8007202F): The name reference is invalid. (Server: eu.loi.net)
Server stack trace:
at Softerra.Adaxes.CommandPipeline.PipelineProcessor.ProcessCommand(ICommand command, Boolean throwExceptionIfFailed)
at Softerra.Adaxes.Adsi.PipelinedObjectOperation.Execute(Boolean resolveValueRefs)
at Softerra.Adaxes.Adsi.AdmObjectPipelined.ExecuteOperation(PipelinedObjectOperation operation, Boolean resolveValueRefs)
at Softerra.Adaxes.Adsi.AdmObjectPipelined.SetInfo()
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Softerra.Adaxes.Interop.Adsi.IADs.SetInfo()
at Softerra.Adaxes.SpmlWebService.Executors.AddRequestExecutor.CreateObject(AddRequest addRequest, IDictionary`2 attributes, String psoObjectClass, ObjectClassDefinition psoObjectClassDefinition)
at Softerra.Adaxes.SpmlWebService.Executors.AddRequestExecutor.ExecuteImpl(Request request)
at Softerra.Adaxes.SpmlWebService.Executors.BaseExecutor.Execute(Request request)
We use this company string for years with no problem through Adaxes form.
Is there another way to pass this special character in my request ?
Thank you in advance
Regards