I had the same problem: I use castor to serialize my parameters and it
added the xsi:type attribute, so the request was rejected at server side,
complaining that it is not valid.
I first tried to do this in my stub class:
call.setOption(Call.SEND_TYPE_ATTR, Boolean.FALSE);
But it did not work because the Castor serializer does not care... So I
looked for the option in the Castor classes and found that there is a
suppressXSIType field in the Marshaller class. So it finally worked fine by
doing the following in the CastorSerializer class:
marshaller.setSuppressXSIType(true);
Sorry for this late response, I hope this can help...
Johan.
----------------------------------------------------------------------------------------
This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery. NOTE: Regardless of content, this e-mail shall not operate to
bind CSC to any order or other contract unless pursuant to explicit written
agreement or government initiative expressly permitting the use of e-mail
for such purpose.
----------------------------------------------------------------------------------------
"Clement Lyons"
<Clement.Lyons To:
<[email protected]>
@comindico.com.a cc:
u> Subject: Using Castor
Serialization results in xsi:type coding being specified in the
SOAP message
04/05/2005 09:27
Please respond
to axis-user
Hi
I'm setting up a web using Axis 1.2 RC3 using castor for
(De)serialization as described in
http://www-106.ibm.com/developerworks/webservices/library/ws-castor/
as I want to use the castor XML validation.
When I run the example supplied I get the following I get the following
response
<?xml version="1.0" encoding="utf-8"?>
<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>
<getStockQuoteResponse xmlns="http://comindico.com.au/sqtest">
<quote xsi:type="quote">
<symbol>IBM</symbol>
<volume>979012312</volume>
<lastTrade>
<price>678.0</price>
<date>1115179465600</date>
</lastTrade>
<change>
<dollar>678.0</dollar>
<percent>300.0</percent>
<positive>true</positive>
</change>
</quote>
</getStockQuoteResponse>
</soapenv:Body>
</soapenv:Envelope>
I am relatively new to Web Service and Axis but my understanding is that
this is a wrapped service
and that the xsi:type coded in the <quote> element should not be there
as the WSDL specifies literal.
When I use the Axis Bean (De)serialization this is not present.
Can anyone tell me
1. If this is correct/incorrect behaviour
2. If this will cause any interop issues
3. If there is a fix or work around for this
I've had a browse in the lists but can't find anything on this.
/Clement