473,396 Members | 1,967 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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
0 1693

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

Similar topics

9
by: Hardy Wang | last post by:
Hi all: I read an article from http://www.c-sharpcorner.com/Code/2003/Sept/InstallingWinServiceProgrammatically.asp about how to install a windows service programmatically. Based ont the code...
5
by: victor | last post by:
Help .... This is my situation: I've made two apps, a Managed C# and an Unmanaged MFC. The C# app communicates with the MFC-app via (Win32-API) PostMessage, done with the P/Invoke method. One...
0
by: Farooque Khan | last post by:
Hi, I have a web service which returns values by reference and also returns array lists in some cases. I am calling this from a VC 7 application. The problem is that if ANY of the values...
2
by: Wee Bubba | last post by:
i have created a web service with one method which returns a code. i am currently trying to access the return value of this method through a page which has not got the proxy.dll referenced. i.e. as...
9
by: jsoques | last post by:
Hello, I created a Web Service using .Net 2.0 that has a function that returns a DataTable. I can test the function from the web page when I access the .asmx from a browser on localhost and it...
7
by: GD | last post by:
Hi, I am trying to call a webservice from a windows service application. It works only if I launch the windows service app from VS.Net 2005 (Worked around from Main()) or from a winform test...
4
by: =?Utf-8?B?V0c=?= | last post by:
Hi I have a web service that returns a custom class (i.e. not a builtin like a string or int etc). This class has properties that are also custom classes. What is happening is if any of these...
6
by: =?Utf-8?B?THVib21pcg==?= | last post by:
Hi, I would like to ask how can I with C# find out the service name on non-English Windows OS. Thanks, Lubomir
4
by: rbjorkquist | last post by:
This is my first attempt at writing/using web services, so any and all comments will be greatly appreciated. With that said, I am also by no means saying this is the correct either. I have...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.