Hello everyone - I'm new to webservices in Java, so my issue may be some
trivial, but I've had a hard time trying to figure this out. I've been
playing with CXF for a while, and I've created a simple web service to test
integration with spring.
It all seems to be working fine, but what I need to do is make this
compatible with older versions of client applications which are using
org.apache.soap to talk to the service. Currently, these applications can
properly call methods of my webservice, but fail to parse the returned
response, possibly due to the missing xsi:type attribute. My testing service
is currently very simple and contains a single method "login" accepting 2
string parameters username and password:
@WebService
public interface HelloService
{
boolean login(
@WebParam(name = "username")
String username,
@WebParam(name = "password")
String password);
}
The JAX-WS endpoint is defined in my spring XML.
The SOAP response looks like this:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns1:loginResponse xmlns:ns1="urn:soap-interface">
<return>true</return>
</ns1:loginResponse>
</soap:Body>
</soap:Envelope>
It looks like the clients expect the following:
<return xsi:type="xsd:boolean">false</return>
Is there a way for me to make CXF add the xsi:type attribute to the return
value somehow? Am I doing something wrong here, or do I need to use some
annotation to make it use the xsi:type?
Again, I apologize if this is something stupid, I'm still learning. Thanks
for any clues in advance!
Rado
--
View this message in context:
http://www.nabble.com/xsi%3Atype-missing-in-returned-value-tp22410060p22410060.html
Sent from the cxf-user mailing list archive at Nabble.com.