467,208 Members | 1,374 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,208 developers. It's quick & easy.

Web Service returning NULL

Good morning,
this is the first time i write on this forum because i googled and i've seen related post with no solution.

I will expose briefly the problem.
I'm using c# 3.5 and i'm trying using a web service.
Unfortunatly i get a NULL response and i can't understand why.

RpcRsat.RSATWSPortType rpt = new RpcRsat.RSATWSPortTypeClient();
RpcRsat.retrieve_seqResponse res = rpt.retrieve_seq(req);

res is NULL.

I've seen that this problem is a naming related problem so i think that if i post both the wsdl and server request/answer would be possible to correct the wsdl to have a not null answer.

The wsdl of the service
Expand|Select|Wrap|Line Numbers
  1. <?xml version="1.0"?>
  2. <?xml-stylesheet type="text/xsl" href="RSATWS.xsl"?>
  3. <definitions name="RSATWS"
  4.   targetNamespace="urn:RSATWS"
  5.           xmlns:tns="urn:RSATWS"
  6.           xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  7.           xmlns="http://schemas.xmlsoap.org/wsdl/"
  8.       xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
  9.       xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
  10.  
  11.   <types>
  12.     <xsd:schema targetNamespace="urn:RSATWS" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
  13.  
  14.       <xsd:complexType name="RetrieveSequenceRequest">
  15.         <xsd:annotation>
  16.       <xsd:documentation>
  17.         Parameters for the operation retrieve_seq.
  18.       </xsd:documentation>
  19.         </xsd:annotation>
  20.         <xsd:sequence>
  21.       <xsd:element name="output" type="xsd:string" minOccurs="0">
  22.         <xsd:annotation>
  23.           <xsd:documentation>
  24.             Return type. Accepted values: 'server' (result is stored on a file on the server), 'client' (result is directly transferred to the client), or  'both'. Default is 'both'.
  25.           </xsd:documentation>
  26.         </xsd:annotation>
  27.       </xsd:element>
  28.       <xsd:element name="organism" type="xsd:string" minOccurs="1">
  29.             <xsd:annotation>
  30.               <xsd:documentation>
  31.                 Organism. Words need to be underscore separated (example: Escherichia_coli_K12).
  32.               </xsd:documentation>
  33.             </xsd:annotation>
  34.           </xsd:element>
  35.       <xsd:element name="query" type="xsd:string" minOccurs="0" maxOccurs="unbounded">
  36.             <xsd:annotation>
  37.               <xsd:documentation>
  38.                 A list of query genes.
  39.               </xsd:documentation>
  40.             </xsd:annotation>
  41.           </xsd:element>
  42.       <xsd:element name="all" type="xsd:int" minOccurs="0">
  43.             <xsd:annotation>
  44.               <xsd:documentation>
  45.                 Return sequences for all the genes of the organism if value =
  46.         1. Incompatible with query.
  47.               </xsd:documentation>
  48.             </xsd:annotation>
  49.           </xsd:element>
  50.       <xsd:element name="noorf" type="xsd:int" minOccurs="0">
  51.             <xsd:annotation>
  52.               <xsd:documentation>
  53.                 Prevent overlap with upstream open reading frames (ORF) if
  54.         value = 1.
  55.               </xsd:documentation>
  56.             </xsd:annotation>
  57.           </xsd:element>
  58.       <xsd:element name="from" type="xsd:int" minOccurs="0">
  59.             <xsd:annotation>
  60.               <xsd:documentation>
  61.                 Inferior limit of the region to retrieve. Default is organism dependant (example: Saccharomyces cerevisiae = -800).
  62.               </xsd:documentation>
  63.             </xsd:annotation>
  64.           </xsd:element>
  65.       <xsd:element name="to" type="xsd:int" minOccurs="0">
  66.             <xsd:annotation>
  67.               <xsd:documentation>
  68.                 Superior limit of the region to retrieve. Default is '-1'.
  69.               </xsd:documentation>
  70.             </xsd:annotation>
  71.           </xsd:element>
  72.       <xsd:element name="feattype" type="xsd:string" minOccurs="0">
  73.             <xsd:annotation>
  74.               <xsd:documentation>
  75.                 Type of genome features to load. Supported: CDS, mRNA, tRNA, rRNA.
  76.               </xsd:documentation>
  77.             </xsd:annotation>
  78.           </xsd:element>
  79.       <xsd:element name="type" type="xsd:string" minOccurs="0">
  80.             <xsd:annotation>
  81.               <xsd:documentation>
  82.                 Sequence type. Supported: upstream, downstream, ORF (unspliced open reading frame).
  83.               </xsd:documentation>
  84.             </xsd:annotation>
  85.           </xsd:element>
  86.       <xsd:element name="format" type="xsd:string" minOccurs="0">
  87.             <xsd:annotation>
  88.               <xsd:documentation>
  89.                 Sequence format. Supported: IG (Intelligenetics), WC (wconsensus), raw, FastA
  90.               </xsd:documentation>
  91.             </xsd:annotation>
  92.           </xsd:element>
  93.       <xsd:element name="lw" type="xsd:int" minOccurs="0">
  94.             <xsd:annotation>
  95.               <xsd:documentation>
  96.                 Line width (0 for whole sequence on one line).
  97.               </xsd:documentation>
  98.             </xsd:annotation>
  99.           </xsd:element>
  100.       <xsd:element name="label" type="xsd:string" minOccurs="0">
  101.             <xsd:annotation>
  102.               <xsd:documentation>
  103.                 Field(s) to be used in the sequence label. Multiple fields can be specified, separated by commas. Supported: id, name, organism_name, sequence_type, current_from, current_to, ctg, orf_strand, reg_left, reg_right. Default: name.
  104.               </xsd:documentation>
  105.             </xsd:annotation>
  106.           </xsd:element>
  107.       <xsd:element name="label_sep" type="xsd:string" minOccurs="0">
  108.             <xsd:annotation>
  109.               <xsd:documentation>
  110.                 Separator between the label fields. Default: | (pipe character).
  111.               </xsd:documentation>
  112.             </xsd:annotation>
  113.           </xsd:element>
  114.       <xsd:element name="nocom" type="xsd:int" minOccurs="0">
  115.            <xsd:annotation>
  116.               <xsd:documentation>
  117.                 No comments if value = 1. Only the identifier and the sequence are returned. By default, the comment indicates the ORF and upstream sequence coordinates.
  118.               </xsd:documentation>
  119.             </xsd:annotation>
  120.           </xsd:element>
  121.       <xsd:element name="repeat" type="xsd:int" minOccurs="0">
  122.             <xsd:annotation>
  123.               <xsd:documentation>
  124.                 Use the repeat masked version of the genome if value = 1. Attention: repeated regions are annotated for some genomes only.
  125.               </xsd:documentation>
  126.             </xsd:annotation>
  127.           </xsd:element>
  128.       <xsd:element name="imp_pos" type="xsd:int" minOccurs="0">
  129.             <xsd:annotation>
  130.               <xsd:documentation>
  131.                 Admit imprecise positions if value = 1.
  132.               </xsd:documentation>
  133.             </xsd:annotation>
  134.           </xsd:element>
  135.     </xsd:sequence>
  136.       </xsd:complexType>
  137.  
  138.       <xsd:complexType name="RetrieveSequenceResponse">
  139.     <xsd:sequence>
  140.       <xsd:element name="server" type="xsd:string">
  141.         <xsd:annotation>
  142.           <xsd:documentation>
  143.             Location of the result file on the server. This can be used as input for a further request.
  144.           </xsd:documentation>
  145.         </xsd:annotation>
  146.       </xsd:element>
  147.       <xsd:element name="command" type="xsd:string">
  148.         <xsd:annotation>
  149.           <xsd:documentation>
  150.             The stand alone command executed on the server.
  151.           </xsd:documentation>
  152.         </xsd:annotation>
  153.     </xsd:element>
  154.       <xsd:element name="client" type="xsd:string">
  155.      <xsd:annotation>
  156.       <xsd:documentation>
  157.        The results.
  158.       </xsd:documentation>
  159.      </xsd:annotation>
  160.     </xsd:element>
  161.      </xsd:sequence>
  162.     </xsd:complexType>
  163.  
  164.     </xsd:schema>
  165.   </types>
  166.  
  167.   <message name="RetrieveSequenceInput">
  168.       <part name="request" type="tns:RetrieveSequenceRequest"/>
  169.   </message>
  170.  
  171.   <message name="RetrieveSequenceOutput">
  172.       <part name="response" type="tns:RetrieveSequenceResponse"/>
  173.   </message>
  174.  
  175.   <portType name="RSATWSPortType">
  176.       <operation name="retrieve_seq">
  177.          <input name="RetrieveSequenceRequest" message="tns:RetrieveSequenceInput"/>
  178.          <output name="RetrieveSequenceResponse" message="tns:RetrieveSequenceOutput"/>         
  179.      <documentation>Returns upstream, downstream or coding DNA sequences
  180.            for list of query genes.
  181.          </documentation>
  182.       </operation>
  183.   </portType>
  184.  
  185.   <binding name="RSATWSBinding" type="tns:RSATWSPortType">
  186.       <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
  187.       <operation name="retrieve_seq">
  188.          <soap:operation soapAction="urn:RSATWS#retrieve_seq"/>
  189.          <input name="RetrieveSequenceRequest">
  190.              <soap:body use="literal" namespace="urn:RSATWS" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
  191.          </input>
  192.          <output name="RetrieveSequenceResponse">
  193.              <soap:body use="literal" namespace="urn:RSATWS" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
  194.          </output>
  195.       </operation>
  196.   </binding>
  197.  
  198.   <service name="RSATWebServices">
  199.     <documentation>
  200.       Web services for the Regulatory Sequence Analysis Tools (RSAT).
  201.       Tools developed by Jacques van Helden
  202.       (jvanheld@scmbb.ulb.ac.be), SOAP/WSDL interface developed by
  203.       Olivier Sand (oly@scmbb.ulb.ac.be).
  204.    </documentation>
  205.     <port name="RSATWSPortType" binding="tns:RSATWSBinding">
  206.     <soap:address location="http://rsat.scmbb.ulb.ac.be/rsat/web_services/RSATWS.cgi"/>
  207.         <!--soap:address location="http://localhost/rsat/web_services/RSATWS.cgi"/-->
  208.     </port>
  209.   </service>
  210. </definitions>[/i]
  211.  
  212.  
  213. The request
  214. POST /rsat/web_services/RSATWS.cgi HTTP/1.1..Content-Type: text/xml; charset=utf-8..VsDebuggerCausalityData: uIDPozNkTwqKKWxEvLtLCIpZ12sAAAAAwFGQKj7fw0m0XzI12/8zRVZAMVRscIJMobGqcgydosMACQAA..SOAPAction: "urn:RSATWS#retrieve_seq"..Host: rsat.scmbb.ulb.ac.be..Content-Length: 396..Expect: 100-continue..Connection: Keep-Alive....
  215. <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
  216.   <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  217.     <retrieve_seq xmlns="urn:RSATWS">
  218.       <request xmlns="">
  219.         <organism>Escherichia_coli_K12</organism>
  220.         <query>MetA</query><feattype>CDS</feattype><type>upstream</type><format>FastA</format>
  221.       </request>
  222.     </retrieve_seq>
  223.   </s:Body>
  224. </s:Envelope>
  225. The answer of the server
  226. [i]
  227.  
  228. HTTP/1.1 200 OK..Date: Tue, 05 Aug 2008 08:53:41 GMT..Server: Apache/2.2.8 (Linux/SUSE)..LOG ### /home/rsat/rsa-tools/public_html/logs/log-file_rsat_WS_2008_08Status: 200 OK..SOAPServer: SOAP::Lite/Perl/0.710.07..Content-Length: 1269..Keep-Alive: timeout=30, max=100..Connection: Keep-Alive..Content-Type: text/xml; charset=utf-8....
  229. <?xml version="1.0" encoding="UTF-8"?>
  230. <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  231.   <soap:Body>
  232.     <retrieve_seqResponse xmlns="urn:RSATWS">
  233.       <response>
  234.         <client xsi:type="xsd:string">&gt;metA.MetA; upstream from -400 to -1; size: 400; location: NC_000913.2 4211903 4212302 D.CATCAGGATCGATAAACAGCGCATCCATATGCTGCCCACTTAGCAACATAAATCCAACCG.GCTGATCCCGCTCATTAACCGCGACCCACAACGGCGCTTCCGGCAGGAAGGAACGAACTA.GGTCCTCCAGCTCGGTCCGATACTCTGCTGATAGAAAATCGTGAGTGGCATCGACAGAAC.GACACCAAATCGCAACGAGTTCCTCCCCTTCCTCATGCCGTGAGCGGCGAATACTAATAA.CCATTTTCTCTCCTTTTAGTCATTCTTATATTCTAACGTAGTCTTTTCCTTGAAACTTTC.TCACCTTCAACATGCAGGCTCGACATTGGCAAATTTTCTGGTTATCTTCAGCTATCTGGA.TGTCTAAACGTATAAGCGTATGTAGTGAGGTAATCAGGTT..</client>
  235.         <server xsi:type="xsd:string">/home/rsat/rsa-tools/public_html/tmp/retrieve-seq.vBF9M7mRXoFastA</server>
  236.         <command xsi:type="xsd:string">/home/rsat/rsa-tools/perl-scripts/retrieve-seq -org 'Escherichia_coli_K12' -q 'MetA' -feattype 'CDS' -type 'upstream' -format 'FastA'</command>
  237.       </response>
  238.     </retrieve_seqResponse>
  239.   </soap:Body>
  240. </soap:Envelope>
Thank you in adwance, i hope you can help me because i'm working on this problem from centuries.
Aug 5 '08 #1
  • viewed: 1438
Share:

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

9 posts views Thread by Hardy Wang | last post: by
5 posts views Thread by victor | last post: by
2 posts views Thread by Wee Bubba | last post: by
9 posts views Thread by jsoques | last post: by
4 posts views Thread by =?Utf-8?B?V0c=?= | last post: by
6 posts views Thread by =?Utf-8?B?THVib21pcg==?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.