Apache Muse - WSDL Conventions Used by Tools
There are some conventions that we are expecting from the input WSDL as is evident from the algorithm described in the Wsdl2Java documentation. We'll cover each major portion of a WSDL document and discuss the conventions we expect when trying to extract capabilities.
- Types:
- Namespaces: Since we extract capabilities by namespace, we expect that the input messages and resource properties (referenced in the WSRP document schema) all belong to the same namespace URI.
- Imports: Schema imports are perfectly valid, but they will be inlined during the generation process (see the FAQ for further explanation).
- Methods that return nothing (void in Java): This case is interesting because it
deals with optimizations defined in the schema standard. It is
impossible to differentiate between a method that returns xsd:anyType (equivalent to
Java's org.w3c.dom.Element) and a method that returns nothing (void). The
convention used to handle this ambiguity is as follows:
- If the method has a message whose type attribute is xsd:anyType (xsd being bound to the XML Schema namespace), then this means it returns void. This method must only have a type attribute, there must not be any other attribute (for example, a type attribute).
- If the method has a message whose element references an XSD element whose type is xsd:anyType or the element has no type, then it returns org.w3c.dom.Element
- Messages:
- Methods that return nothing (void in Java) must follow the convention explained above.
- PortType:
- Single port type: We expect one portType with all of the operations defined in it.
- Binding:
- Single binding: We expect one binding referencing the above portType.
- Service:
- Useful address (optional): During code generation, the Axis2-specific artifact generator will
try to determine the context path for the muse.xml and services.xml descriptors. This information
can be included in the address element. If it is not included, a reasonable default will be used. For
example:
location="http://localhost:8080/simple/services/SimpleResource"
- Useful address (optional): During code generation, the Axis2-specific artifact generator will
try to determine the context path for the muse.xml and services.xml descriptors. This information
can be included in the address element. If it is not included, a reasonable default will be used. For
example: