I don't think it is related to xmlbeans. I think it is a fundamental problem with the soap encoding - both axis and dotNET expect the type attribute to be called xsi:type (with the appropriate namespaces defined in the envelope). Without this, deserialisation does not work. As an example, I apply the following filters to the axis generated soap message:

# change type to xsi:type
$buffer =~ s# type="# xsi:type="#g;
# rewrite envelope header
$buffer =~ s#<soapenv:Envelope.*?>#<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";>#;
# rename soapenv to soap
$buffer =~ s#soapenv:#soap:#g;
# delete header
$buffer =~ s#<soap:Header.*soap:Header>##g;

With these filters applied, both Axis and dotNET clients successfully read (and deserialise) the messages.

-justin

Ajith Ranabahu wrote:
Hi all,
I'm surprised to hear that XMLbeans fails to do the right thing! May
be we need to redirect the issue to some of the XMLBeans gurus ?

Ajith

On 3/2/06, Justin Schoeman <[EMAIL PROTECTED]> wrote:

Personally, I would love it if this was fixed! But I don't think turning
off WSA is enough.  I set the
org.apache.axis2.Constants.Configuration.DISABLE_ADDRESSING_FOR_OUT_MESSAGES
message property for outgoing messages, and it did not help.  It seems
certain clients (dotNET and AXIS2) need the xsi namespace...

Please not bug AXIS2-479 which shows that axis2 clients are also
affected by the bug, but to a different extent (they will successfully
parse the xml, but cast the resulting object to the wrong type).

If I can help in any way, please let me know.

Thanks

-justin

Davanum Srinivas (JIRA) wrote:

   [ 
http://issues.apache.org/jira/browse/AXIS2-455?page=comments#action_12368337 ]

Davanum Srinivas commented on AXIS2-455:
----------------------------------------

I think we need to fix this issue for the next release.



Axis2 dotNET interoperability problem with abstract types.
----------------------------------------------------------

       Key: AXIS2-455
       URL: http://issues.apache.org/jira/browse/AXIS2-455
   Project: Apache Axis 2.0 (Axis2)
      Type: Bug
  Versions: 0.94
Environment: Suse Linux 9.3 Server, Tomcat 5.0, Axis2 0.94
Windows XP with Vistual studio .NET 2003 client
  Reporter: Justin Schoeman
  Priority: Blocker


I have been getting the following error message connecting C# clients to an 
Axis2 service:
There is an error in XML document (1, 877). ---> System.InvalidOperationException: 
The specified type is abstract: name='DeviceID', 
namespace='http://www.nrs.eskom.co.za/xmlvend/base/2.0/schema', at <clientID 
xmlns='http://www.nrs.eskom.co.za/xmlvend/base/2.0/schema'>
Following a discussion on the Axis2 user list (titled "Consuming Axis2 webservice 
with c# client?", starting on 17/02/06), it was discovered that this was due to an 
incorrect namespace in the Axis2 message.
The following is the description of the problem that Simon Fell responded with:
"xml schema type attribute is serialized with wrong namespace (should be 
http://www.w3.org/2001/XMLSchema-instance, is currently not namespace qualified)"
As a test, I recorded the XML response, and editted it so that:
<clientID xmlns="http://www.nrs.eskom.co.za/xmlvend/base/2.0/schema"; type="GenericDeviceID" 
id="12345" />
became:
<clientID xmlns="http://www.nrs.eskom.co.za/xmlvend/base/2.0/schema"; 
xsi:type="GenericDeviceID" id="12345" />
(I did this for every occurence of the 'type' attribute.)
The C# client successfully received the response (but the Axis2 client did not).
For testing, the wsdl and xsd files are available from:
http://nrs.eskom.co.za/xmlvend/docs/Specification/November2005/XMLVend20.asp
If someone could give me a vague idea where to look in the source, I would like 
to get a quick-fix going to get our system running.
Thanks,
Justin




--
Ajith Ranabahu

Reply via email to