|
View:
New views
2 Messages
—
Rating Filter:
Alert me
|
|
|
complex return types?Hello Fellow Muse Users,
I've noticed that Muse's WSDL-to-Java tools don't seem to handle complex return types in a particularly elegant way. For example, if I define the following type...: <wsdl:types> <xsd:schema elementFormDefault="qualified" targetNamespace="http://ws.disco.xerox.com/MyService"> <xsd:element name="MyMethodResponse"> <xsd:complexType> <xsd:sequence> <xsd:element name="foo" type="xsd:string" maxOccurs="1" minOccurs="1"/> <xsd:element name="bar" type="xsd:int" maxOccurs="1" minOccurs="1"/> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:schema> </wsdl:types> And then define a message as such: <wsdl:message name="MyMethodOutputMessage"> <wsdl:part name="result" element="tns:MyMethodResponse"/> </wsdl:message> Muse then generates a method that looks something like this: public org.w3c.dom.Element myMethod() throws Exception; I would have expected (hoped?) it to create a Java (bean-like, maybe) object that mapped to my type definition. Something like: public class MyMethodResponse { String foo; int bar; } Is it the case that Muse will always convert complex return types to this generic Element interface? Thanks, Bob |
|
|
RE: complex return types?Hi,
Yes, Muse is not dependent on the data binding tool used to convert XSD types to Java types. Hence, a complex type input/output is identified as an Element in your Java method signatures. You can use data binding tools like XmlBeans or JAXB. If you change the capability method signatures, you need to supply/configure serializers for each of these types. See the following link for more info: http://ws.apache.org/muse/docs/2.2.0/manual/architecture/deployment-desc riptor.html#serializer The "apache-httpd" sample has an example of this. Hope this helps... -Vinh -----Original Message----- From: St Jacques, Robert [mailto:Robert.StJacques@...] Sent: Monday, April 14, 2008 2:59 PM To: muse-user@... Subject: complex return types? Hello Fellow Muse Users, I've noticed that Muse's WSDL-to-Java tools don't seem to handle complex return types in a particularly elegant way. For example, if I define the following type...: <wsdl:types> <xsd:schema elementFormDefault="qualified" targetNamespace="http://ws.disco.xerox.com/MyService"> <xsd:element name="MyMethodResponse"> <xsd:complexType> <xsd:sequence> <xsd:element name="foo" type="xsd:string" maxOccurs="1" minOccurs="1"/> <xsd:element name="bar" type="xsd:int" maxOccurs="1" minOccurs="1"/> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:schema> </wsdl:types> And then define a message as such: <wsdl:message name="MyMethodOutputMessage"> <wsdl:part name="result" element="tns:MyMethodResponse"/> </wsdl:message> Muse then generates a method that looks something like this: public org.w3c.dom.Element myMethod() throws Exception; I would have expected (hoped?) it to create a Java (bean-like, maybe) object that mapped to my type definition. Something like: public class MyMethodResponse { String foo; int bar; } Is it the case that Muse will always convert complex return types to this generic Element interface? Thanks, Bob --------------------------------------------------------------------- To unsubscribe, e-mail: muse-user-unsubscribe@... For additional commands, e-mail: muse-user-help@... |
| Free embeddable forum powered by Nabble | Forum Help |