Hi,
 
Few days ago I've developed an .NET Webservice with same Methods.
 
Now I want to use this Methods from a java client. If I call one of the methods without a parameter it works fine.
 
But, if I want to use a method with a parameter, I get a NullPointerException from the services method back.
 
Know somebody this problem. What can I do.
 
Thanks for help
christian
 
 
P.S. Here is the Code:
 
The .Net method signature: public string GetSome(string id)
 
The java code:
 
try {
 
         URL url = "" URL("http://localhost/GetXmlService/GetXmlService.asmx");
         Service  service = new Service();
         Call call = (Call) service.createCall();
         call.setTargetEndpointAddress( url );
         call.setOperationName(new QName("http://tempuri.org/", "get"));
         call.setUseSOAPAction(true);
         call.setProperty(Call.SOAPACTION_URI_PROPERTY,"http://tempuri.org/GetElementContentById");
 
         String paraName = "id";
         boolean b = call.isParameterAndReturnSpecRequired(new QName("http://tempuri.org/", "GetElementContentById"));
         System.out.println("Boolean: "+b);
         call.addParameter(paraName,org.apache.axis.Constants.XSD_STRING, paraName.getClass(), ParameterMode.IN);
         call.setReturnType(org.apache.axis.Constants.XSD_STRING);
         String para = "t111";
 
         Object ret = call.invoke(new Object[]{para});
 
         System.out.println("Der XML-String: "+ret.toString());
    }
    catch(Exception e) {
      e.printStackTrace();
    }

Reply via email to