SOAP Integration - ---> Invalid name character in 'FaultException1

I am able to call simple SOAP Methods in Milestone corporate like GetVersion.

When I try to submit date I get FaultException 1.

Example:

POST http://10.11.64.96/ServerAPI/ServerCommandService.asmx HTTP/1.1

Accept-Encoding: gzip,deflate

Content-Type: text/xml;charset=UTF-8

SOAPAction: “http://videoos.net/2/XProtectCSServerCommand/BookmarkCreate

Content-Length: 572

Host: 10.11.64.96

Connection: Keep-Alive

User-Agent: Apache-HttpClient/4.1.1 (java 1.5)

Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAC0ALQAWAAAABoAGgAMAQAAGgAaACYBAAAcABwAQAEAAAAAAABcAQAANQIIIBoNwbP5rDtomm7p60zWvJIEJej0PYQ7PAkJ/sfIpmOceLbFSV0SwygBAQAAAAAAANAgrN3jptUBBCXo9D2EOzwAAAAAAgAaAFAAVABQAEQANAAwADkAMABDAEEATQAwADEAAQAaAFAAVABQAEQANAAwADkAMABDAEEATQAwADEABAAaAFAAVABQAEQANAAwADkAMABDAEEATQAwADEAAwAaAFAAVABQAEQANAAwADkAMABDAEEATQAwADEABwAIAMNofvbjptUBAAAAAFAAVABQAEQANAAwADkAMABDAEEATQAwADEAQQBkAG0AaQBuAGkAcwB0AHIAYQB0AG8AcgBQAFQASgBNAFIAMwAwADAAMQAxADQAMQBOAEIA

<soapenv:Envelope xmlns:soapenv=“http://schemas.xmlsoap.org/soap/envelope/” xmlns:xpr=“http://videoos.net/2/XProtectCSServerCommand”>

soapenv:Header/

soapenv:Body

xpr:BookmarkCreate

 <xpr:deviceId>7436a420-00a9-420e-a6d7-7ec35e0b2ebc</xpr:deviceId>

 <xpr:timeBegin>2019-11-29T17:00:00Z</xpr:timeBegin>

 <xpr:timeTrigged>2019-11-29T17:00:01Z</xpr:timeTrigged>

 <xpr:timeEnd>2019-11-29T17:01:00Z</xpr:timeEnd>

 <xpr:description>Ola</xpr:description>

</xpr:BookmarkCreate>

</soapenv:Body>

</soapenv:Envelope>

Response

<soap:Envelope xmlns:soap=“http://schemas.xmlsoap.org/soap/envelope/” xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance” xmlns:xsd=“http://www.w3.org/2001/XMLSchema”>

soap:Body

soap:Fault

 <faultcode>soap:Server</faultcode>

 <faultstring>Server was unable to process request. ---> Invalid name character in 'FaultException\`1'.</faultstring>

 <detail/>

</soap:Fault>

</soap:Body>

</soap:Envelope>

Can you help?

Thank You

Can you please explore Bookmark Creator sample?

https://doc.developer.milestonesys.com/html/index.html?base=samples/bookmarkcreator.html&tree=tree_3.html

If the sample works please compare.

Hello Rie,

Thank you for the answer.

However, I do not want to use external code. [which I am struggling to compile]

Can you give me a SOAP example that should work? For example, for SOAPUI Builder?

Thanks.

RT

You must do login. TCP video viewer sample can show you this.

https://doc.developer.milestonesys.com/html/index.html?base=samples/tcpviewer_sample.html&tree=tree_search.html?search=tcp+video+viewer

This sample do not work as a SOAPUI. Unfortunately, Milestone have no sample with SOAPUI.

Hello, I was able to sort this out. I leave some SOAP UI example to help others

  1. Login to Milestone

POST http://10.11.65.61/ServerAPI/ServerCommandService.asmx HTTP/1.1

<soapenv:Envelope xmlns:soapenv=“http://schemas.xmlsoap.org/soap/envelope/” xmlns:xpr=“http://videoos.net/2/XProtectCSServerCommand”>

soapenv:Header/

soapenv:Body

xpr:Login

 <xpr:instanceId>d10a7c21-5afa-4e4b-8270-e278035de3e9</xpr:instanceId>
 <xpr:currentToken></xpr:currentToken>

</xpr:Login>

</soapenv:Body>

</soapenv:Envelope>

Configure NTLM authentication with username/password/Milestone_servername.

  1. The response should be like this

<soap:Envelope xmlns:soap=“http://schemas.xmlsoap.org/soap/envelope/” xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance” xmlns:xsd=“http://www.w3.org/2001/XMLSchema”>

soap:Body

 <LoginResult>

  <Token>TOKEN#369422dd-9ddc-1234-aaf6-30846e771eba#srv01milpdoeira//ServerConnector#</Token>

  <RegistrationTime>2019-12-18T16:49:06.33Z</RegistrationTime>

  <TimeToLive>

    <MicroSeconds>14400000000</MicroSeconds>

  </TimeToLive>

  <TimeToLiveLimited>false</TimeToLiveLimited>

 </LoginResult>

</soap:Body>

</soap:Envelope>

  1. Use the following command to create a bookmark

POST http://10.11.65.61/ServerAPI/ServerCommandService.asmx HTTP/1.1

<soapenv:Envelope xmlns:soapenv=“http://schemas.xmlsoap.org/soap/envelope/” xmlns:xpr=“http://videoos.net/2/XProtectCSServerCommand”>

soapenv:Header/

soapenv:Body

xpr:BookmarkCreate

 **<!--Not Optional! It is the Token from the previous response-->**

 <xpr:token>TOKEN#369422dd-9ddc-1234-aaf6-30846e771eba#srv01milpdoeira//ServerConnector#</xpr:token>

 **<!--Guid of the camera. It can be obtained in Milestone Management Client (search in google)-->**

 <xpr:deviceId>338F3BAE-59AB-4FF5-BABA-D0AE39317CCE</xpr:deviceId>

 <xpr:timeBegin>2019-12-18T13:05:00Z</xpr:timeBegin>

 <xpr:timeTrigged>2019-12-18T13:05:00Z</xpr:timeTrigged>

 <xpr:timeEnd>2019-12-18T13:05:00Z</xpr:timeEnd>

 <!--Optional:-->

 <xpr:reference>Reference 4</xpr:reference>

 <!--Optional:-->

 <xpr:header>header 4</xpr:header>

 <!--Optional:-->

 <xpr:description>Description 4</xpr:description>

</xpr:BookmarkCreate>

</soapenv:Body>

</soapenv:Envelope>

  1. Sample response

<soap:Envelope xmlns:soap=“http://schemas.xmlsoap.org/soap/envelope/” xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance” xmlns:xsd=“http://www.w3.org/2001/XMLSchema”>

soap:Body

 <BookmarkCreateResult>

  <Id>65b1886d-8ca8-4772-a9d6-3643208fe5cd</Id>

  <DeviceId>338f3bae-59ab-4ff5-baba-d0ae39317cce</DeviceId>

  <Reference>Reference 4</Reference>

  <Header>header 4</Header>

  <Description>Description 4</Description>

  <User>SRV01MILPDOEIRA\\USER</User>

  <TimeBegin>2019-12-18T13:05:00Z</TimeBegin>

  <TimeTrigged>2019-12-18T13:05:00Z</TimeTrigged>

  <TimeEnd>2019-12-18T13:05:00Z</TimeEnd>

 </BookmarkCreateResult>

</soap:Body>

</soap:Envelope>

  1. Access milestone client to search the bookmark. Make sure the user you are using has access to bookmarks (if not, the bookmarks are in milestone but you cannot see them)