title: Pass parameter from Delphi Client to Java Webservice
body: <p>I have a simply web service in java running in GlassFish 3.1.2:</p>
  
  <pre><code>@WebService
  @SOAPBinding(style = SOAPBinding.Style.RPC)
  public class TesteDeWSComDelphi {
  
  /**
   * WebMethod
   *
   * @param s
   * @return
   */
  @WebMethod(operationName = "operacaoPrincipal")
  public String operacao1(String s) {
      System.out.println("Dados passados: " + s);
      return "Vc enviou para operação1 " + s;
  }
  }
  </code></pre>
  
  <p>So, I useed WSDL Importer from Delphi to generate my client. The genereted code is:</p>
  
  <pre><code>unit TesteDeWSComDelphiService1;
  
  interface
  
  uses InvokeRegistry, SOAPHTTPClient, Types, XSBuiltIns;
  
  type
     TesteDeWSComDelphi = interface(IInvokable)
     ['{07BD6B8D-0E3D-9A88-AF46-D07FD1DB6D5B}']
     function  operacaoPrincipal(s: WideString): WideString; stdcall;
  end;
  
  function GetTesteDeWSComDelphi(UseWSDL: Boolean=System.False; Addr: string=''; HTTPRIO: THTTPRIO = nil): TesteDeWSComDelphi;
  
  
  implementation
  
  function GetTesteDeWSComDelphi(UseWSDL: Boolean; Addr: string; HTTPRIO: THTTPRIO):
  TesteDeWSComDelphi;
  const
    defWSDL = 'http://10.20.137.54:8080/mavenproject1/TesteDeWSComDelphiService?wsdl';
    defURL  = 'http://10.20.137.54:8080/mavenproject1/TesteDeWSComDelphiService';
    defSvc  = 'TesteDeWSComDelphiService';
    defPrt  = 'TesteDeWSComDelphiPort';
  var
    RIO: THTTPRIO;
  begin
    Result := nil;
    if (Addr = '') then
    begin
      if UseWSDL then
        Addr := defWSDL
      else
        Addr := defURL;
    end;
    if HTTPRIO = nil then
      RIO := THTTPRIO.Create(nil)
    else
      RIO := HTTPRIO;
    try
      Result := (RIO as TesteDeWSComDelphi);
      if UseWSDL then
      begin
        RIO.WSDLLocation := Addr;
        RIO.Service := defSvc;
        RIO.Port := defPrt;
      end else
        RIO.URL := Addr;
    finally
      if (Result = nil) and (HTTPRIO = nil) then
        RIO.Free;
    end;
  end;
  
  
  initialization
    InvRegistry.RegisterInvokeOptions(TypeInfo(TesteDeWSComDelphi), ioDocument);
    InvRegistry.RegisterInterface(TypeInfo(TesteDeWSComDelphi), 'http://ws.jus.br/', 'UTF-8');
    InvRegistry.RegisterInvokeOptions(TypeInfo(TesteDeWSComDelphi), ioDefault);
    InvRegistry.RegisterDefaultSOAPAction(TypeInfo(TesteDeWSComDelphi), '');
  end.
  </code></pre>
  
  <p>When I make: </p>
  
  <pre><code>procedure TForm1.TestarClick(Sender: TObject);
  var
   servico:TesteDeWSComDelphi;
   valor:string;
   begin
     servico:=GetTesteDeWSComDelphi(False, '');
     valor:=edt1.Text;
     Dialogs.ShowMessage('Enviando "' + valor+ '"');
     retorno.Text := servico.operacaoPrincipal(valor);
   end;
  </code></pre>
  
  <p>My client found my webserver, <strong>but the parameter is null</strong>.</p>
  
  <p>Someone can help me?</p>