I'm sure this topic has been "around the block" a few times, but I have not
been able to find ANY solutin that fits this particular problem. I have
written a Java Axis web service that has a method which returns an object
with the following characteristics:
public class MMPerson {
public string firstName;
public string surname;
public int age;
public MMAddress address;
}
public class MMAddress {
public string street;
public string city;
public string state;
public string country;
public string postcode;
}
The method is called and via SOAPMonitor (utility to trace the SOAP messages
from server to client) I can see that the Request and Response messages are
fine and dandy:
Request:
--------
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<test_Person
xmlns="http://localhost:8080/axis/services/MarketManagerWebService">
<Username>guest</Username>
</test_Person>
</soap:Body>
</soap:Envelope>
Response:
---------
<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>
<test_PersonResponse
xmlns="http://localhost:8080/axis/services/MarketManagerWebService">
<test_PersonReturn>
<firstName>John</firstName>
<surname>Doe</surname>
<age>26</age>
<address>
<street>51 New Street</street>
<city>London</city>
<state>N/A</state>
<country>UK</country>
<postCode>SW1 5XZ</postCode>
</address>
</test_PersonReturn>
</test_PersonResponse>
</soapenv:Body>
</soapenv:Envelope>
Unfortunately, when the proxy instantiates the relevant class in c#, all of
the parameters (member variables) are un-initialised...
oPerson.firstName = null
oPerson.surname = null
oPerson.age = 0
oPerson.address = null
I will provide the relevant proxy code (Autogenerated by the reference to
the WSDL) OR the WSDL to whoever thinks that they can help me out.
--
Kind regards,
Jamie