axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Fell <s...@zaks.demon.co.uk>
Subject [axis2] XMLBeans
Date Thu, 06 Apr 2006 22:35:59 GMT
using the apr 6 snapshot, i generated a client stub using xmlbeans, by
running
wsdl2java -s -d xmlbeans -uri enterprise.wsdl

I have some client code that uses the stub

SoapStub s = new
SoapStub("http://www.salesforce.com/services/Soap/c/7.0");
		
Login l = Login.Factory.newInstance();
l.setUsername("user@org");
l.setPassword("pwd");
LoginDocument ld = LoginDocument.Factory.newInstance();
ld.setLogin(l);
LoginResult lr = s.login(ld).getLoginResponse().getResult();


This works fine, however i notice that if i call ld.setLogin(l)
earlier, it doesn't work, perhaps this is just that i don't understand
XMLBeans, does setLogin take a clone ? for example if i re-arange the
code to 

LoginDocument ld = LoginDocument.Factory.newInstance();
Login l = Login.Factory.newInstance();
ld.setLogin(l);
l.setUsername("user@org");
l.setPassword("pwd");
LoginResult lr = s.login(ld).getLoginResponse().getResult();

it fails, because the generated message doesn't include anything from
the Login class.

<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header />
<soapenv:Body>
<login xmlns="urn:enterprise.soap.sforce.com" />
</soapenv:Body>
</soapenv:Envelope>

Is this just the way xmlbeans works (which would be weird), or is it a
bug ?

Thanks
Simon

Mime
View raw message