This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DEVELOPERS FORUM - Unable to add File to Vault using AML

imitchell - Monday, August 8, 2011 2:27 PM:

Hello, I am trying to send a file remotely to the Vault Server using PHP and AML. I have used a Java example from this forum (www.aras.comhttp:/.../648.aspx as a guideline to send a multi-part request to the vault server. I am either missing something in the translation of the code or am missing a key concept. Here is the multi-part request that I am sending to the vault: ---------------------------BRdnIy5hBONlyI Content-Disposition: form-data; name="SOAPACTION"; Content-Type: text/plain ApplyItem ---------------------------BRdnIy5hBONlyI Content-Disposition: form-data; name="AUTHUSER"; Content-Type: text/plain admin ---------------------------BRdnIy5hBONlyI Content-Disposition: form-data; name="AUTHPASSWORD"; Content-Type: text/plain 41c3da4b71b56f14ba023025a8b73862 ---------------------------BRdnIy5hBONlyI Content-Disposition: form-data; name="DATABASE"; Content-Type: text/plain InnovatorSolutions91 ---------------------------BRdnIy5hBONlyI Content-Disposition: form-data; name="XMLDATA"; Content-Type: text/plain upload_junk-4.txt 14829413e11e3022433ae36a6237605b c: mpupload_junk-4.txt ---------------------------BRdnIy5hBONlyI Content-Disposition: form-data; name="14829413e11e3022433ae36a6237605b"; filename="c: mpupload_junk-4.txt"; Content-Type: application/octet-stream This is a junk test file used to test upload capability. Updated: 08/03/2011 12:07 pm ---------------------------BRdnIy5hBONlyI-- In response to this request, I get the following from the Vault Server: Server ProcessApplyItem: Invalid xml data (File upload_junk-4.txt not found) ProcessApplyItem: Invalid xml data (File upload_junk-4.txt not found) I am uncertain as to why the "file is not found" as it is being streamed to the vault server. I have tried a variety of perturbations to this code, some of which appeared to work as I received a Result Item, however, I was not able to find the file under the Vault directories. Any help that you can give would be greatly appreciated! Thanks, Jerry (using Ian's account)

imitchell - Monday, August 8, 2011 4:53 PM:

Here is a retry of that post!!!!

Hello, I am trying to send a file remotely to the Vault Server using PHP
and AML. I have used a Java example from this forum
(www.aras.comhttp:/.../648.aspx a
guideline to send a multi-part request to the vault server. I am either
missing something in the translation of the code or am missing a key
concept. Here is the multi-part request that I am sending to the vault:

<pre>
---------------------------BRdnIy5hBONlyI
Content-Disposition: form-data; name="SOAPACTION";
Content-Type: text/plain

ApplyItem
---------------------------BRdnIy5hBONlyI
Content-Disposition: form-data; name="AUTHUSER";
Content-Type: text/plain

admin
---------------------------BRdnIy5hBONlyI
Content-Disposition: form-data; name="AUTHPASSWORD";
Content-Type: text/plain

99999999999999999999999999999999
---------------------------BRdnIy5hBONlyI
Content-Disposition: form-data; name="DATABASE";
Content-Type: text/plain

InnovatorSolutions91
---------------------------BRdnIy5hBONlyI
Content-Disposition: form-data; name="XMLDATA";
Content-Type: text/plain

<?xml version="1.0"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="SOAP-ENV='schemas.xmlsoap.org/.../'">
<SOAP-ENV:Body>
<applyItem>
<Item type="File" action="add">
<filename>upload_junk-4.txt</filename>
<id>14829413e11e3022433ae36a6237605b</id>
<actual_filename>c: mpupload_junk-4.txt</actual_filename>
<Relationships>
<Item type="Located" action="add">
<related_id>
<Item type="vault" action="get"/>
</related_id>
</Item>
</Relationships>
</Item>
</applyItem>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

---------------------------BRdnIy5hBONlyI
Content-Disposition: form-data; name="14829413e11e3022433ae36a6237605b";
filename="c: mpupload_junk-4.txt";
Content-Type: application/octet-stream

This is a junk test file used to test upload capability.
Updated: 08/03/2011 12:07 pm

---------------------------BRdnIy5hBONlyI--
</pre>

In response to this request, I get the following from the Vault Server:

<pre>
<Fault>
<faultcode>Server</faultcode>
<faultstring>
ProcessApplyItem: Invalid xml data (File upload_junk-4.txt not found)
</faultstring>
<detail>
<af:legacy_detail>
ProcessApplyItem: Invalid xml data (File upload_junk-4.txt not found)
</af:legacy_detail>
<af:legacy_faultactor/>
</detail>
</Fault>
</pre>

I am uncertain as to why the "file is not found" as it is being streamed
to the vault server. I have tried a variety of perturbations to this
code, some of which appeared to work as I received a Result Item,
however, I was not able to find the file under the Vault directories.
Any help that you can give would be greatly appreciated!



imitchell - Monday, August 8, 2011 4:54 PM:

One last try without the pre tags

 

Hello, I am trying to send a file remotely to the Vault Server using PHP
and AML. I have used a Java example from this forum
(www.aras.comhttp:/.../648.aspx a
guideline to send a multi-part request to the vault server. I am either
missing something in the translation of the code or am missing a key
concept. Here is the multi-part request that I am sending to the vault:

---------------------------BRdnIy5hBONlyI
Content-Disposition: form-data; name="SOAPACTION";
Content-Type: text/plain

ApplyItem
---------------------------BRdnIy5hBONlyI
Content-Disposition: form-data; name="AUTHUSER";
Content-Type: text/plain

admin
---------------------------BRdnIy5hBONlyI
Content-Disposition: form-data; name="AUTHPASSWORD";
Content-Type: text/plain

99999999999999999999999999999999
---------------------------BRdnIy5hBONlyI
Content-Disposition: form-data; name="DATABASE";
Content-Type: text/plain

InnovatorSolutions91
---------------------------BRdnIy5hBONlyI
Content-Disposition: form-data; name="XMLDATA";
Content-Type: text/plain

<?xml version="1.0"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="SOAP-ENV='schemas.xmlsoap.org/.../'">
<SOAP-ENV:Body>
<applyItem>
<Item type="File" action="add">
<filename>upload_junk-4.txt</filename>
<id>14829413e11e3022433ae36a6237605b</id>
<actual_filename>c: mpupload_junk-4.txt</actual_filename>
<Relationships>
<Item type="Located" action="add">
<related_id>
<Item type="vault" action="get"/>
</related_id>
</Item>
</Relationships>
</Item>
</applyItem>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

---------------------------BRdnIy5hBONlyI
Content-Disposition: form-data; name="14829413e11e3022433ae36a6237605b";
filename="c: mpupload_junk-4.txt";
Content-Type: application/octet-stream

This is a junk test file used to test upload capability.
Updated: 08/03/2011 12:07 pm

---------------------------BRdnIy5hBONlyI--

 


In response to this request, I get the following from the Vault Server:

<Fault>
<faultcode>Server</faultcode>
<faultstring>
ProcessApplyItem: Invalid xml data (File upload_junk-4.txt not found)
</faultstring>
<detail>
<af:legacy_detail>
ProcessApplyItem: Invalid xml data (File upload_junk-4.txt not found)
</af:legacy_detail>
<af:legacy_faultactor/>
</detail>
</Fault>

 

I am uncertain as to why the "file is not found" as it is being streamed
to the vault server. I have tried a variety of perturbations to this
code, some of which appeared to work as I received a Result Item,
however, I was not able to find the file under the Vault directories.
Any help that you can give would be greatly appreciated!