Unable to create JPEG from Marin Applet using web services

User 2c6aa21beb

09-06-2010 10:06:22

Hi, I'm trying to use the WebService method batchConvert to convert the chemical structure in the Marin applet to a jpeg. I have tried to use the mrv and the mol format.


We are storing the mrv structure in the database because the structure and contents needs to be retrieved as they are added to the applet.


 


Can you please explain which webservice method and what input I should use to convert this mrv structure to an jpeg image.


 


I have tried several attempts as can be seen in the attached word document,


Is there a working example that I could reference?


Kind Regards


Karl

User c1ce6b3d19

09-06-2010 12:53:00

Karl,


We are trying to reproduce your error. 


The image output (e.g. jpeg output) is returned in base64 output. 


 


Jon

User c1ce6b3d19

09-06-2010 13:13:40

Karl,


You may want to ensure that the molecule structure does not interfere with the SOAP message structure.


<batchConvert
xmlns="http://webservice.jchem.chemaxon"><batchTarget>

<cml>

<MDocument>

 
<MChemicalStruct>

    <molecule molID="m1">

For example, this is a batchStandardize example received directly from the server.  Note the "<" are converted to "&lt;" before sending over html.  The newlines are converted to "&#xd;", although It might not be entirely necessary. 


<ns1:batchStandardize>
      <ns1:targetStructure>
        &lt;?xml version="1.0" ?>
        &#xd;
        &lt;cml>
        &#xd;
        &lt;MDocument>
        &#xd;
          &lt;MChemicalStruct>
        &#xd;
            &lt;molecule title="C6H11NO5" molID="m1">


Also note that SDF will also have problems generally with the "<" in the extended information section.


>  <UNIQUE_SMILES>
NC[C@@H]1CCCN1


 


To help debug, it would be useful to setup the Soap Monitor on the web server to get the exact messages that are being sent. Follow the link below for setup instructions and send us an example message. 


https://www.chemaxon.com/webservices/FAQ.html#soapmonitor

User 2c6aa21beb

09-06-2010 14:11:53

Please find attached a word document which has the output from the SOAPMonitor,


 


If further information is required, please feel free to ask,


 


Karl

User 2c6aa21beb

09-06-2010 17:25:43

Just a quick update,


I got the web service call to create an image from a smiles structure as can be seen in the attached screen shot. Just to see if there was a problem with the soap messaging, and it works perfectly.


So the soap messaging communication is ok, but it still wont work for the mrv structure. When I decode the xml response for the mrv stucture I'm getting a blank image.


 


I hope this helps and speeds up you finding a resolution to this issue,


 


Kind Regards


Karl


 

User c1ce6b3d19

10-06-2010 11:51:33

Karl,


Thanks for the information you have provided.


We have reproduced the problem and investigating solutions and workarounds.


 


Jon

User c1ce6b3d19

15-06-2010 15:13:25

Karl,


We have implemented a solution which will be included in an upcoming release.  This should be JChem 5.3.5.


 


As a work around, you can convert the mrv file into sdf file and then convert into jpeg. Please remember to escape the appropriate characters (e.g. < and >) when sending over http.  Also, all binary output like images will be base64 encoded.


 


Jon

User 2c6aa21beb

15-06-2010 16:01:32

Hi, when do you foresee Chem 5.3.5 being release?


 


Thanks


Karl

User c1ce6b3d19

16-06-2010 21:04:41

Karl,


5.3.5 will probably be released in July.


 


Jon

User c1ce6b3d19

30-06-2010 10:00:47

Karl,


The version will be in the July Release (probably called 5.3.6).


Jon

User c1ce6b3d19

20-07-2010 06:51:29


Hi Karl,
JChem 5.3.6 has been released with a fix for the problem of converting multiple molecule mrv input into jpeg.

Jon