Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create Document Error

Status
Not open for further replies.

samyak260590

Programmer
Feb 17, 2016
6
IN
I am trying to invoke CreateDocument Operation from SOAP UI to publish a document on LiveLink.

SOAP Request:
<soapenv:Envelope xmlns:soapenv=" xmlns:urn="urn:api.ecm.opentext.com" xmlns:urn1="urn:DocMan.service.livelink.opentext.com" xmlns:urn2="urn:Core.service.livelink.opentext.com">
<soapenv:Header>
<urn:OTAuthentication>
<!--Optional:-->
<urn:AuthenticationToken>hK3bSHhRx1IM%2Brc4mLM6sF6qbCWMBkh4yidLX0fYQkE%3D</urn:AuthenticationToken>
</urn:OTAuthentication>
</soapenv:Header>
<soapenv:Body>
<urn1:CreateDocument>
<urn1:parentID>8073372</urn1:parentID>
<urn1:advancedVersionControl>false</urn1:advancedVersionControl>
<urn1:attach>
<urn2:CreatedDate>2014-12-02</urn2:CreatedDate>
<urn2:FileName>ModifyPerson</urn2:FileName>
<urn2:FileSize>12</urn2:FileSize>
<urn2:ModifiedDate>2014-12-02</urn2:ModifiedDate>
<urn2:Contents>base 64 formatted file</urn2:Contents>
</urn1:attach>
</urn1:CreateDocument>
</soapenv:Body>
</soapenv:Envelope>

SOAP Response:
<s:Envelope xmlns:s=" <s:Body>
<s:Fault>
<faultcode xmlns:a="urn:DocMan.service.livelink.opentext.com">a:DocMan.Error</faultcode>
<faultstring xml:lang="en-US">Create failed - Name not specified.</faultstring>
</s:Fault>
</s:Body>
</s:Envelope>

Please provide some suggestions on this.
Thanks in anticipation.
 
Try to work with a livelink GUI to catch small errosr like this.
See my blog here that will give you some info

In this case the error message states that it needs a unique name in the container that is all.

You cannot get far with livelink programming if you do not understand the user interface and its business rules.
SOAP or REST or LAPI is just creating objects with a programming language en masse.That is all.The livelink GUI
is your best debugger

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008,Livelink ECM Champion 2010
 
I did referrred to LiveLink GUI. The parent ID that is passed in SOAP request is of the folder in which I need to place the file.
I checked the folder and it is empty as of now.
Please identify if I am missing anything here. Thanks!!
 
Are you expecting the file name to be defaulted to the file name in the API? like "New Document"? it is a GUI tweak.You just need a name in your call.
I am asurprised SOAPUI is not showing you that a proper message will be like this

Code:
<s:Envelope xmlns:s="[URL unfurl="true"]http://schemas.xmlsoap.org/soap/envelope/">[/URL]
<s:Header><h:OTAuthentication xmlns:h="urn:api.ecm.opentext.com" xmlns="urn:api.ecm.opentext.com" xmlns:xsi="[URL unfurl="true"]http://www.w3.org/2001/XMLSchema-instance"[/URL] xmlns:xsd="[URL unfurl="true"]http://www.w3.org/2001/XMLSchema"><AuthenticationToken>0y4%2BBVZdQFj%2BWVTZr%2BV74AFebrz2oa1hxUxtYNYZG3E%3D</AuthenticationToken></h:OTAuthentication>[/URL]
</s:Header>
<s:Body xmlns:xsi="[URL unfurl="true"]http://www.w3.org/2001/XMLSchema-instance"[/URL] xmlns:xsd="[URL unfurl="true"]http://www.w3.org/2001/XMLSchema">[/URL]
<CreateDocument xmlns="urn:DocMan.service.livelink.opentext.com">
<parentID>2000</parentID>
[highlight #FCE94F][highlight #EF2929]<name>New Document.txt</name>[/highlight][/highlight]
<comment>Uploaded through the EWS DocumentManagement web service.</comment>
<advancedVersionControl>true</advancedVersionControl>
<attach><CreatedDate xmlns="urn:Core.service.livelink.opentext.com">0001-01-01T00:00:00</CreatedDate>
<FileSize xmlns="urn:Core.service.livelink.opentext.com">0</FileSize>
<ModifiedDate xmlns="urn:Core.service.livelink.opentext.com">0001-01-01T00:00:00</ModifiedDate>
<Contents xsi:nil="true" xmlns="urn:Core.service.livelink.opentext.com"/>
</attach>
</CreateDocument>
</s:Body>
</s:Envelope>

if possible get the tutorial from the KB and run through its examples.I am not sure why SOAPUI does not show you the name parameter
what version of LLserver and WSAPI are you using?



Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008,Livelink ECM Champion 2010
 
Thank You!!!
Adding the name tag resolved my issue :)

Can you please also look at my other question posted today in this Forum. Thanks again!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top