axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From remko de knikker <remko.deknik...@yale.edu>
Subject newbie: Why does request returns null ???
Date Tue, 15 Apr 2003 16:52:39 GMT
The response message in the client is null, while before returning in 
service it is still filled????
    System.out.println("length=" + par1.length); // 'length=1'
    System.out.println("length=" + rs1.length); // null

Here's what i do:
I create an XML message:
           
            DocumentBuilder builder = 
DocumentBuilderFactory.newInstance().newDocumentBuilder();
            Document doc = builder.newDocument(); 
            Element elem1 = doc.createElement("requestmsg1");
             for (int i=0; i<spotid.size();i++){           
                Element elem2 = doc.createElement("spotid");
                Text t2 = 
doc.createTextNode(spotid.firstElement().toString());
                elem2.appendChild(t2);
                elem1.appendChild(elem2);
             }

make a request:
            Element[] rs1 = (Element[]) call.invoke(new Object[] {elem1})

to my service:
public Element[] method1(Element[] par1){
    System.out.println("length=" + par1.length); // 'length=1'
    return par1;
}

and on catching the reponse in the client again:
    System.out.println("length=" + rs1.length); // null

Somewhere in Axis the Element[] must loose its reference,
I don't know what happens here?? How can I avoid this problem???

--------------------------------------------------------------------------------------------------------------------
Deployment descriptor:
<service name="Test3" style="message">
--------------------------------------------------------------------------------------------------------------------
Service/Call:
            Service  service = new Service();
            Call call = (Call) service.createCall();
            String endpoint = "http://localhost:8080/axis/services/Test3";
            call.setTargetEndpointAddress(new java.net.URL(endpoint));
            call.setOperationName(new 
QName("http://localhost:8080/axis/services/Test3","method1"));



Mime
View raw message