tuscany-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Kurz <sku...@gmail.com>
Subject Re: Wrong result type in web service operation
Date Mon, 28 Nov 2011 05:45:46 GMT
Hi Sebastian,

Sorry, didn't get a chance to look at your test before taking a few days
vacation.

I think your JAXB tweaks may be the problem.

You didn't seem to include the generated ObjectFactory.class and
package-info.class files.    Since that's where the package level
info/annotations are stored, I'm guessing that's why your Java isn't
getting serialized to XML correctly.  (Basically JAXB maps between a schema
targetNamespace and a Java package).

Also, I can't recall when you can use a constructor to instantiate a JAXB
object (or even if you ever can), but typically ObjectFactory.createXXX
methods are used, instead of constructors.

You mentioned tweaking to add java.io.Serializable support.    Did you know
that the wsimport and xjc tools give you a way to add that into the
generated code by customizing the WSDL/XSD?

It would look something like this excerpt:

<xs:schema version="1.0" targetNamespace="....." xmlns:xs="
http://www.w3.org/2001/XMLSchema" jaxb:version="2.0" xmlns:jaxb="
http://java.sun.com/xml/ns/jaxb"  xmlns="http://www.w3.org/2001/XMLSchema">


  <annotation>
    <appinfo>
      <jaxb:globalBindings>
        <jaxb:serializable uid="1"/>
     </jaxb:globalBindings>
    </appinfo>
  </annotation>

Finally, I didn't see a problem with soapAction, even with this test app of
yours.   I didn't go as far as to use tcpmon or anything to really monitor
the wire data, but I did debug into Axis2ServiceClient.getSOAPAction() to
see that it was indeed set to ""

So I'm not sure what the issue could be there...

Hope that helps,
Scott

Mime
View raw message