Axis Web Service return NULL array to .NET Client
After reading this thread, my problem doesn't solve.
http://www.codecomments.com/XML_SOAP/message700023.html
The cause, in my code, was xml namespace specified in WSDD. Look your WSDL and set right namespace in wsdd.
Axis Version: 1.3
.NET Framework: 1.1
WSE: 2.0 SP3
Java Web Services and class of returning object:
public UtenteSemplice[] Search(String semericerca) throws Exception {
UtenteSemplice[] b = new UtenteSemplice[2];
b[0] = new UtenteSemplice();
b[1] = new UtenteSemplice();
b[0].setNomeutente("aa");
b[0].setPassword("aapsw");
b[1].setNomeutente("bb");
b[1].setPassword("bbpsw");
return b;
}
public class UtenteSemplice {
/** Creates a new instance of UtenteSemplice */
public UtenteSemplice() {
}
private String m_nomeutente;
private String m_password;
public String getNomeutente() {
return m_nomeutente;
}
public void setNomeutente(String nomeutente) {
this.m_nomeutente = nomeutente;
}
public String getPassword() {
return m_password;
}
public void setPassword(String password) {
this.m_password = password;
}
}
Axis WSDD:
<deployment xmlns="http://xml.apache.org/axis/wsdd/"
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
<service name="ContattiService" provider="java:RPC" style="wrapped" use="literal">
<parameter name="className" value="it.atreeblu.atreeflow.services.ContattiService"/>
<parameter name="allowedMethods" value="*"/>
<beanMapping qname="ns:UtenteSemplice" xmlns:ns="http://services.atreeflow.atreeblu.it"
languageSpecificType="java:it.atreeblu.atreeflow.services.UtenteSemplice"/>
</service>
</deployment>
Piece of WSDL where I found correct namespace (autogenerated from axis):
<wsdl:types>
<schema elementFormDefault="qualified" targetNamespace="http://services.atreeflow.atreeblu.it">
http://www.codecomments.com/XML_SOAP/message700023.html
The cause, in my code, was xml namespace specified in WSDD. Look your WSDL and set right namespace in wsdd.
Axis Version: 1.3
.NET Framework: 1.1
WSE: 2.0 SP3
Java Web Services and class of returning object:
public UtenteSemplice[] Search(String semericerca) throws Exception {
UtenteSemplice[] b = new UtenteSemplice[2];
b[0] = new UtenteSemplice();
b[1] = new UtenteSemplice();
b[0].setNomeutente("aa");
b[0].setPassword("aapsw");
b[1].setNomeutente("bb");
b[1].setPassword("bbpsw");
return b;
}
public class UtenteSemplice {
/** Creates a new instance of UtenteSemplice */
public UtenteSemplice() {
}
private String m_nomeutente;
private String m_password;
public String getNomeutente() {
return m_nomeutente;
}
public void setNomeutente(String nomeutente) {
this.m_nomeutente = nomeutente;
}
public String getPassword() {
return m_password;
}
public void setPassword(String password) {
this.m_password = password;
}
}
Axis WSDD:
<deployment xmlns="http://xml.apache.org/axis/wsdd/"
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
<service name="ContattiService" provider="java:RPC" style="wrapped" use="literal">
<parameter name="className" value="it.atreeblu.atreeflow.services.ContattiService"/>
<parameter name="allowedMethods" value="*"/>
<beanMapping qname="ns:UtenteSemplice" xmlns:ns="http://services.atreeflow.atreeblu.it"
languageSpecificType="java:it.atreeblu.atreeflow.services.UtenteSemplice"/>
</service>
</deployment>
Piece of WSDL where I found correct namespace (autogenerated from axis):
<wsdl:types>
<schema elementFormDefault="qualified" targetNamespace="http://services.atreeflow.atreeblu.it">
Commenti