Hello:
Trying again to see if anybody could provide some pointers.
Thanks,
Ravi
Hello:
I have an object array as one of the field for the java bean called
SimpleBeanArray which is attached. As a test I assigned the Object[]
variable to String[].
My service is defined as below:
<service name="tata" provider="java:RPC" style="wrapped"
use="literal">
<namespace>http://testanytypearray.webservice.com</namespace>
<parameter name="allowedMethods" value="*"/>
<parameter name="scope" value="request"/>
<parameter name="className" value="test.AnyTypeArray"/>
<arrayMapping
xmlns:ns="http://testanytypearray.webservice.com"
qname="ns:ArrayOf_xsd_anyType"
type="java:java.lang.Object[]"
innerType="cmp-ns:anyType"
xmlns:cmp-ns="http://www.w3.org/2001/XMLSchema"
encodingStyle=""
/>
<typeMapping
xmlns:ns="http://testanytypearray.webservice.com"
qname="ns:SimpleJavaBeanArray"
type="java:test.SimpleBeanArray"
serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
encodingStyle=""
/>
</service>
The service class is attached with the name AnyTypeArray.java
The wsdl is also attached as TestAntTypeArray.wsdl
but when I try to call the service method getgetSimpleBeanArray() from
.Net visual studio 2003 the soap message response looks like below:
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<getSimpleBeanArrayResponse
xmlns="http://testanytypearray.webservice.com">
<getSimpleBeanArrayReturn>
<name xsi:nil="true"/>
<value>
<value xsi:type="xsd:string">one</value>
<value xsi:type="xsd:string">two</value>
</value>
</getSimpleBeanArrayReturn>
</getSimpleBeanArrayResponse>
</soapenv:Body>
</soapenv:Envelope>
But the value for the array is null on the client object representation
of SimpleBeanArray.value field. Let me know if I'm doing anything
wrong.
Thanks for your time,
Ravi
package test;
public class AnyTypeArray {
private SimpleBeanArray sbean = null;
public AnyTypeArray() {
sbean = new SimpleBeanArray();
}
public void setSimpleBeanArray(SimpleBeanArray bean){
System.out.println(" inside setSimpleBeanArray() ");
sbean = bean;
if(sbean != null){
System.out.println(" sbean value is " + sbean.getValue());
}
}
public SimpleBeanArray getSimpleBeanArray(){
System.out.println(" inside getSimpleBean() ");
String[] value = new String[]{"one", "two"};
sbean.setValue(value);
System.out.println(" setting the value to be an array of String with values one and two");
if(sbean != null){
System.out.println(" sbean value in getSimpleBeanArray() is " + sbean.getValue());
}
return sbean;
}
}
package test;
public class SimpleBeanArray {
private String name = null;
private Object[] value = null;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Object[] getValue() {
return value;
}
public void setValue(Object[] value) {
this.value = value;
}
public SimpleBeanArray(){
name = null;
value = null;
}
public SimpleBeanArray(String name, Object[] value) {
this.name = name;
this.value = value;
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
|