axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Percival <pmaca...@ntsp.nec.co.jp>
Subject Re: Interoperability Axis with .NET
Date Fri, 20 Dec 2002 00:55:41 GMT
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 
<christian@bucholdt.de> 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

Mime
View raw message