title: A java-based soap request returns always soap response with 0 as the value i need
body: <p>I am trying to send a soap request to an open webservice (webserviceX.NET currency converter). Here is my code:</p>
  
  <pre><code>String SOAP_REQUEST = "&lt;SOAP:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:SOAP=\"http://schemas.xmlsoap.org/soap/envelope/\"&gt;&lt;SOAP:Body&gt;&lt;ConversionRate xmlns=\"http://www.webserviceX.NET/\"/&gt;" +
          "&lt;FromCurrency&gt;EUR&lt;/FromCurrency&gt;&lt;ToCurrency&gt;ILS&lt;/ToCurrency&gt;&lt;/SOAP:Body&gt;&lt;/SOAP:Envelope&gt;";
  
  
  
  //  SOAPEnvelope env = new SOAPEnvelope();
  //Create a Stream Source of the Request String
    byte[] reqBytes = SOAP_REQUEST.getBytes();
    ByteArrayInputStream bis = new ByteArrayInputStream(reqBytes);
    StreamSource ss = new StreamSource(bis);
  
    //Create a SOAP Message Object
    MessageFactoryImpl messageFactory = new MessageFactoryImpl();
    SOAPMessage msg = messageFactory.createMessage();
    SOAPPart soapPart = msg.getSOAPPart();
  
    //Set the soapPart Content with the stream source
    soapPart.setContent(ss);
  
    //Create a WebService Call
    Service service = new Service();
    Call call = (Call)service.createCall();
    call.setTargetEndpointAddress(new java.net.URL(endpoint));
    call.setProperty( Call.SOAPACTION_USE_PROPERTY, new Boolean( true ) );
    call.setProperty( Call.SOAPACTION_URI_PROPERTY, "http://www.webserviceX.NET/ConversionRate");
    call.setEncodingStyle("utf-8");
  
    //Invoke the WebService.
    SOAPEnvelope resp = call.invoke(((org.apache.axis.SOAPPart)soapPart).getAsSOAPEnvelope());
   ...
  //then i parse the resulting SOAPEnvelope get the value.
  </code></pre>
  
  <p>here in this url, you can see the nature of the soap request and response when interacting with this webservice..
  <a href="http://www.webservicex.net/CurrencyConvertor.asmx?op=ConversionRate" rel="nofollow">http://www.webservicex.net/CurrencyConvertor.asmx?op=ConversionRate</a></p>
  
  <p>my java code above, get the right and exact soap response specified in the URL I provided and expected.. but always with the value I need as 0.
  This is the soap response I get:</p>
  
  <pre><code>&lt;soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
  &lt;soap:Body&gt;&lt;ConversionRateResponse 
  xmlns="http://www.webserviceX.NET/"&gt;
  &lt;ConversionRateResult&gt;0&lt;/ConversionRateResult&gt;&lt;/ConversionRateResponse&gt;
  &lt;/soap:Body&gt;&lt;/soap:Envelope&gt;
  </code></pre>
  
  <p>You can see the CoversionRateResult as 0, although it should return 4.69. I tried another webservice they provide and I get aways such result.</p>
  
  <p>Can someone please help me by looking what could be missing in my java code? I tried different variations and keep playing around since a day :( .. and nothing.
  I would really appreciate anyone help me in this. 
  Thank you,</p>