Search code examples
soapwsdlaxis

AXIS SOAP wsdlPortType


What do these parameters do and what are they used for?

<service name="...">
    <parameter name="wsdlPortType" value="..."/>
</service>

Also, if anyone can explain the parameters wsdlServicePort, wsdlTargetNamespace, and wsdlServiceElement, that would be appreciated.


Solution

  • Axis 1.4 User's Guide:

    When you deploy a service in Axis, users may then access your service's URL with a standard web browser and by appending "?WSDL" to the end of the URL, they will obtain an automatically-generated WSDL document which describes your service.

    Experimental results suggest that Axis is able to use a combination of the .wsdd deployment descriptor file and compiled Java .class files to generate the corresponding .wsdl for a given service. It's interesting to note that, for example, if you have a public method with a Generics return type such as Map, your generated .wsdl file will not contain the return type - it will contain "xsd:anyType" instead. I believe this is due to type erasure on the compiled .class file.

    Anyway, the service options in the Axis .wsdd file (the parameters I referenced in my question such as wsdlPortType, wsdlServicePort, and wsdlTargetNamespace) are related to the .wsdl specifications. This can be inferred from the names themselves since they all contain 'wsdl' in them, but I wanted an explanation of what these parameters mean and I was unable to find relevant Axis documentation. Here are my findings:

    wsdlPortType (portType): basically like a Java interface. Contains one "operation" element for each method name. Each "operation" contains "input" and "output" elements that are basically your input parameters and return parameter of the Java method.

    wsdlServicePort (wsdl:binding) Associated with the portType. I think of it as a description of how to transmit the parameters for the portType. The spec has this to say:

    A binding description component provides a framework for indicating binding details for a portType description component. Binding details SHOULD be used to indicate how messages MUST be formatted when they are sent to or from the service. They SHOULD also be used to indicate the transport protocol to be used to send the messages. A given binding description component MUST NOT indicate more than one protocol.

    wsdl:service: Has a reference in it to the wsdl port binding (the implementation of the portType).

    target namespace: Pretty much what I thought it was (same as a namespace anywhere else). It applies to all of the wsdl:definitions components, so anything in the wsdl file basically (wsdl:portType, wsdl:service, etc). There are a couple other rules that you can find in the spec though.