Hi
I don't understand why this situation happens.
Introduction:

My WSDL:

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
xmlns:axis2="http://bitcomp-polska.pl"; xmlns:ns1="
http://org.apache.axis2/xsd"; xmlns:wsaw="
http://www.w3.org/2006/05/addressing/wsdl"; xmlns:http="
http://schemas.xmlsoap.org/wsdl/http/"; xmlns:ns0="
http://bitcomp-polska.pl/xsd"; xmlns:xs="http://www.w3.org/2001/XMLSchema";
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"; xmlns:soap="
http://schemas.xmlsoap.org/wsdl/soap/"; xmlns:soap12="
http://schemas.xmlsoap.org/wsdl/soap12/"; targetNamespace="
http://bitcomp-polska.pl";>
  <wsdl:types>
    <xs:schema xmlns:xsd="http://bitcomp-polska.pl/xsd";
attributeFormDefault="qualified" elementFormDefault="qualified"
targetNamespace="http://bitcomp-polska.pl/xsd";>
      <xs:complexType name="Exception">
        <xs:sequence>
          <xs:element minOccurs="0" name="Exception" nillable="true"
type="xs:anyType"/>
        </xs:sequence>
      </xs:complexType>
      <xs:element name="generateKey">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="authentication">
            <xs:complexType>
              <xs:sequence>
              <xs:element maxOccurs="1"
                name="authId" nillable="false"
                type="xs:string" />
              </xs:sequence>
            </xs:complexType>
            </xs:element>
            <xs:element name="userData">
            <xs:complexType>
              <xs:sequence>
              <xs:element maxOccurs="1"
                name="name" nillable="false" type="xs:string" />
              <xs:element maxOccurs="1"
                name="userName" nillable="false"
                type="xs:string" />
              </xs:sequence>
            </xs:complexType>
            </xs:element>

          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="generateKeyResponse">
        <xs:complexType>
          <xs:sequence>

            <xs:element name="license" type="xs:string">
            </xs:element>
            <xs:element name="productKey"
            type="xs:string">
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:schema>
  </wsdl:types>
  <wsdl:message name="generateKeyRequest">
    <wsdl:part name="parameters" element="ns0:generateKey"/>
  </wsdl:message>
  <wsdl:message name="generateKeyResponse">
    <wsdl:part name="parameters" element="ns0:generateKeyResponse"/>
  </wsdl:message>
  <wsdl:portType name="KeyGeneratorServicePortType">
    <wsdl:operation name="generateKey">
      <wsdl:input message="axis2:generateKeyRequest"
wsaw:Action="urn:generateKey"/>
      <wsdl:output message="axis2:generateKeyResponse"
wsaw:Action="urn:generateKeyResponse"/>
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="KeyGeneratorServiceSOAP11Binding"
type="axis2:KeyGeneratorServicePortType">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http";
style="document"/>
    <wsdl:operation name="generateKey">
      <soap:operation soapAction="urn:generateKey" style="document"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>

  <wsdl:service name="KeyGeneratorService">
    <wsdl:port name="KeyGeneratorServiceSOAP11port_http"
binding="axis2:KeyGeneratorServiceSOAP11Binding">
      <soap:address location="
http://localhost:8080/axis2/services/KeyGeneratorService"/>
    </wsdl:port>

  </wsdl:service>
</wsdl:definitions>

Service method:

...
public OMElement generateKey( OMElement request )
  throws AxisFault {
    logger.trace( request.getLocalName() );
  return null;
}
...

After invokation, it outputs: "authentication", but I expect "generateKey".

But what is wird, when I change method declaration to:

...
public OMElement generateKey( OMElement request1, OMElement request2 )
  throws AxisFault {
    logger.trace( request1.getLocalName() );
    logger.trace( request2.getLocalName() );
  return null;
}
...

Output is:

authentication
userData

Why it works like this?

BR

zolv

Reply via email to