Hello all,
I have a few questions:
1) The wsdl2java script creates the java "stub" classes and an operation
method in each class, but the method is incomplete. No parameters are
generated in the method signature, even if the wsdl indicates that a
parameter is passed to the operation. Is this the intended design, or
is it up to the developer to fill in the correct parameters in the java
code?
2) If I create a custom element type (i.e. not a standard type like
integer, String, boolean) in the wsdl, the wsdl2java script generates an
operation method with a return type of org.w3c.dom.Element. Is this the
design we should be working with, or is it up to the developer to modify
this to return the correct custom type? For example, if I created a
type called Box, does the operation method need to return a Box type?
3) If our operations return a custom type (i.e. not a standard type like
integer, String, boolean), am I correct in saying that the we must
implement our own serializers for each custom type? So if we had 100
custom types, does each type need its own serializer, and the
serializers need to be specified in the wsdl descriptor? Or, am I
looking at this wrong?
4) Muse is not properly checking the element types defined in the wsdl.
For example, the following defines a response element of type integer:
<xsd:schema
elementFormDefault="qualified"
targetNamespace="http://cisco.com/muse/demo/cap/box
<http://cisco.com/muse/demo/cap/box> ">
<xsd:element name="BoxOperation" type="xsd:string" />
<xsd:element name="BoxOperationResponse" type="xsd:integer"
/>
</xsd:schema>
But, in my code, I can define my operation to return an element of type
String:
public class BoxCapability extends AbstractCapability implements
IBoxCapability
{
public String boxOperation(String param1) throws Exception
{
return "hello friend";
}
}
When I run my test client, I can see the string output in the console,
and no error is thrown to indicate that my java operation is returning a
type that does not match what is defined in the wsdl. If this is the
intended behavior, this will definitely open a can of errors at some
point, and it will be very difficult to trace.
Any help is appreciated, thanks!
-Vinh