HI!

I'd like to call a .NET service dynamically, with Call.invoke(). But the arguments are 
always NULL at the .NET side. If I generate a Java proxy, then it works. I figured, 
.NET has (again) a namespace problem, because this is the difference between the two 
calls. But why does Axis use this ns1 namespace at all? Is there a workaround for this?

This is what Axis 1.0 sends, when using Call.invoke():
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
 <soapenv:Body>
  <ns1:adresseActive soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; 
xmlns:ns1="http://tempuri.org/";>
   <arg0>Test</arg0>
  </ns1:adresseActive>
 </soapenv:Body>
</soapenv:Envelope>


And this is being sent, when using the Proxy:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
 <soapenv:Body>
  <adresseActive xmlns="http://tempuri.org/";>
   <arg0>Test</arg0>
  </adresseActive>
 </soapenv:Body>
</soapenv:Envelope>


This is my code for the dynamic call:
    Service service;
    Call call;
    Object result;

    service = new Service();
    call = (Call)service.createCall();
    call.setScopedProperty(Call.SEND_TYPE_ATTR, Boolean.FALSE);
    call.setTargetEndpointAddress(new 
URL("http://localhost:81/dwsshop/Service1.asmx";));
    call.setOperationName ("adresseActive");
    call.setSOAPActionURI("http://tempuri.org/adresseActive";);
    call.setUseSOAPAction(true);
    String[] myArgs = new String[1];
    myArgs[0] = "Test";

    result = call.invoke("http://tempuri.org/";, "adresseActive", myArgs);


Anyone any idea?

Thanks!

Regards,
Thomas

Reply via email to