Return-Path: Delivered-To: apmail-xml-axis-user-archive@xml.apache.org Received: (qmail 93937 invoked by uid 500); 20 Dec 2002 00:54:07 -0000 Mailing-List: contact axis-user-help@xml.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-user@xml.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list axis-user@xml.apache.org Received: (qmail 93928 invoked from network); 20 Dec 2002 00:54:07 -0000 MIME-Version: 1.0 Date: Fri, 20 Dec 2002 08:55:41 +0800 To: axis-user@xml.apache.org Subject: Re: Interoperability Axis with .NET Content-Type: text/plain; charset=iso-8859-15; format=flowed References: <002a01c2a74c$aef4ff40$23010a0a@widas.de> From: Percival Organization: NEC Message-ID: In-Reply-To: <002a01c2a74c$aef4ff40$23010a0a@widas.de> User-Agent: Opera7.0/Win32 M2 BETA2 build 2577 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N hello chris, Have you tried using the wsdl from your .NET service to generate a stub class in java? This way, invoking a .NET service will be just like calling a local function. Hope this helps. ( ^_^' Regards, Percival Cebu, Philippines On Thu, 19 Dec 2002 11:52:04 +0100, Christian Bucholdt wrote: > 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 = new 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(); > } > -- Percival