[ome-devel] ome access with c++

gerhard bi1825 at fh-weihenstephan.de
Thu Oct 6 17:31:36 BST 2005


So thanks very much, this makes things a little bit clearer.
First of all is there any additional information about the Facade classes  ?

As I tried to use your method call I got an error. The only thing I
changed is my Session to

>>OBJ:OME::Session=HASH(0x84a6f50)

The response was the following:

<?xml version="1.0" encoding="UTF-8"?><methodResponse><fault><value><struct><member><name>faultString</name><value><string>Cannot find method Image in class retrieveObject at /usr/lib/perl5/site_perl/5.8.5/SOAP/Lite.pm line 2179
</string></value></member><member><name>faultCode</name><value><int>102</int></value></member></struct></value></fault></methodResponse>

I tried the code both with the development version and the stable
version. I think you use also the ./Standalonserver in OME:REMOTE.

Thanks
gerhard


Harry Hochheiser wrote:
>
> Gerhard:
>
> Ok.  Let me see if I can work you through this in a bit more detail.
>
> First, a note of clarification. Dispatcher.pm is obsolete code that 
> is no longer used by the XMl-RPC api and should probably be removed 
> -  our apologies for any confusion this may have caused.
>
> In terms of what you are trying to do, the first step is indeed 
> createSession. A typical request might look like the following:
>
>
> <methodCall>
>     <methodName>createSession</methodName>
>     <params>
>         <param><value>hsh</value></param>
>         <param><value>**PASSWORD***</value></param>
>         </params>
> </methodCall>
>
> The server response to this will return the session key:
>
>
> <methodResponse>
>     <params>
>         <param>    <value>
>                 <string>5d8e5b4a62b99a8b7ed8902cd2361765</string>
>         </value></param>
>     </params>
> </methodResponse>
>
>
> The full request for an image is given below. The important part is 
> the beginning, which sepcifies the dispatch method, the session key, 
> the retrieveObject submethod, the object type, and the identifying 
> info for the image.
>
>
> <methodCall><methodName>dispatch</methodName>
>   <params>
>     <param><value>5d8e5b4a62b99a8b7ed8902cd2361765</value></param>
>     <param><value>retrieveObject</value></param>
>     <param><value>Image</value></param>
>     <param>
>       <value>
>     <struct>
>       <member>
>         <name>id</name>
>         <value><int>1</int></value>
>           </member>
>         </struct>
>       </value>
>     </param>
>    ......
>
> The remainder of the request specifies the fields that should be 
> returned. For sake of brevity, I won't describe those in detail here, 
> but i'm happy to do so at a later point if it would be helpful.
> The response is also given below.
>
> The import thing to note about this request is the general form:
> 1) methodName is dispatch.
> 2) first param: session key
> 3) second param: sub-method name: one of the procedures supported by 
> the facades
> 4) subsequent params: arguments to the methods in the params.
>
> I hope this helps clear things up.
>
> As for your specific XML-RPC examples, I'm not quite sure why/how 
> they worked or didn't work. The approach that I describe here is the 
> one that is used inthe OME-JAVA code that supports our Shoola 
> clients, and it's probably the only approach that will function 
> reliably. (In other words, if other schemes work, it's purely 
> coincidental).
>
> -harry
>
>
>
>
>
> --------------
> request for image 1
>
>
> <methodCall><methodName>dispatch</methodName>
>   <params>
>     <param><value>5d8e5b4a62b99a8b7ed8902cd2361765</value></param>
>     <param><value>retrieveObject</value></param>
>     <param><value>Image</value></param>
>     <param>
>       <value>
>     <struct>
>       <member>
>         <name>id</name>
>         <value><int>1</int></value>
>           </member>
>         </struct>
>       </value>
>     </param>
>     <param>
>       <value>
>     <struct>
>       <member>
>         <name>default_pixels</name>
>         <value>
>           <array>
>         <data>
>           <value>id</value>
>           <value>ImageServerID</value>
>           <value>Repository</value>
>         </data>
>           </array>
>         </value>
>       </member>
>       <member>
>         <name>.</name>
>         <value>
>           <array>
>         <data>
>           <value>id</value>
>           <value>name</value>
>           <value>default_pixels</value>
>         </data>
>           </array>
>         </value>
>       </member>
>       <member>
>         <name>default_pixels.Repository</name>
>         <value>
>           <array>
>         <data>
>           <value>ImageServerURL</value>
>         </data>
>           </array>
>         </value>
>       </member>
>     </struct>
>       </value>
>     </param>
>   </params>
> </methodCall>
>
>
> image request response:
> ---------------------------------
>
> <methodResponse>
>   <params>
>     <param><value><struct>
>       <member><name>name</name><value><string>cb_3</string></value></
> member>
>       <member><name>id</name><value><i4>1</i4></value></member>
>       <member><name>default_pixels</name><value><struct>
>         <member><name>ImageServerID</name><value><i4>2</i4></value></
> member>
>         <member><name>semantic_type</name><value><struct>
>               <member><name>granularity</name><value><string>I</
> string></value></member>
>               <member><name>name</name><value><string>Pixels</
> string></value></member>
>               <member><name>id</name><value><i4>36</i4></value></ member>
>           </struct></value>
>         </member>
>         <member><name>id</name><value><i4>4</i4></value></member>
>         <member><name>Repository</name><value><struct>
>               <member><name>ImageServerURL</
> name><value><string>http://hsh-tibook.local/cgi-bin/omeis</string></
> value></member>
>               <member><name>semantic_type</name><value><struct>
>                 <member><name>granularity</name><value><string>G</
> string></value></member>
>                 <member><name>name</name><value><string>Repository</
> string></value></member>
>                 <member><name>id</name><value><i4>1</i4></value></
> member>
>             </struct></value>
>               </member>
>               <member><name>id</name><value><i4>14162</i4></value></
> member>
>           </struct></value>
>         </member>
>         </struct></value>
>       </member>
>       </struct></value>
>     </param>
>   </params>
> </methodResponse>
>
>
>
>



More information about the ome-devel mailing list