You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "D.Kreft" <da...@kreft.net> on 2006/09/22 18:51:40 UTC

Axis2 creating empty wsdl:message element

I've got what looks like an aberration in my Axis2-generated WSDL
(from yesterday's nightly, though. I'm not exactly a WSDL guru or
anything, but the following line is causing my Perl client (a
hand-made SOAP::Lite client that works just peachy with the same
service running under Axis1.4) to barf:

    <wsdl:message name="getAllRequestsMessage"/>

   <wsdl:message name="getAllRequestsResponse">
        <wsdl:part name="part1" element="ns1:getAllRequestsResponse"/>
    </wsdl:message>

Note how there's no <wsdl:part> for getAllRequestsMessage, unlike a
similar method in the same document:

    <!-- Generated by Axis2 1.0 -->
    <wsdl:message name="getRequestsByPriorityMessage">
        <wsdl:part name="part1" element="ns1:getRequestsByPriority"/>
    </wsdl:message>

    <wsdl:message name="getRequestsByPriorityResponse">
        <wsdl:part name="part1" element="ns1:getRequestsByPriorityResponse"/>
    </wsdl:message>

I'm guessing that it's empty because this method takes no arguments
(see method definition below), and this
*might* be a deficiency with SOAP::Lite, however, the method
(getAllRequests()) is "WSDLed" by Axis1.4 like so:

    <!-- Generated by Axis 1.4 -->
    <wsdl:message name="getAllRequestsRequest">
        <wsdl:part element="impl:getAllRequests" name="parameters"/>
    </wsdl:message>

    <wsdl:message name="getAllRequestsResponse">
        <wsdl:part element="impl:getAllRequestsResponse" name="parameters"/>
    </wsdl:message>

Here are the relevant lines from my services.xml:

    <operation name="getAllRequests">
        <messageReceiver
class="org.apache.axis2.rpc.receivers.RPCMessageReceiver" />
    </operation>
    <operation name="getRequestsByPriority">
        <messageReceiver
class="org.apache.axis2.rpc.receivers.RPCMessageReceiver" />
    </operation>

And the method definitions in my service implementation class. This
same class is used by
both Axis and Axis2

    @SuppressWarnings("unchecked")
    public <T extends Request> Request[] getAllRequests()
        throws Exception
    {
        List<T> allRequests = (List<T>)_requestMethods.getAllRequests();

        Request[] array = new Request[allRequests.size()];
        allRequests.toArray(array);

        return array;
    }

    @SuppressWarnings("unchecked")
    public <T extends Request> Request[] getRequestsByPriority(int priority)
        throws Exception
    {
        List<T> allRequests =
            (List<T>)_requestMethods.getRequestsByPriority(priority);

        Request[] array = new Request[allRequests.size()];
        allRequests.toArray(array);

        return array;
    }

If you'd like to see the entire wsdl, let me know and I'll send it as
an attachment--I'm not sure
how much info would be needed to debug this and I didn't want to
overwhelm with a bunch
of noise.

-dan

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Axis2 creating empty wsdl:message element

Posted by "D.Kreft" <da...@kreft.net>.
Ne'er mind on this one. I believe this is a bug in the SOAP::Lite
module (document/literal support is experimental at this point)--I've
got a patch for that module that seems like it'll fix the problem.

-dan

On 9/22/06, D. Kreft <da...@kreft.net> wrote:
> I've got what looks like an aberration in my Axis2-generated WSDL
> (from yesterday's nightly, though. I'm not exactly a WSDL guru or
> anything, but the following line is causing my Perl client (a
> hand-made SOAP::Lite client that works just peachy with the same
> service running under Axis1.4) to barf:
>
>     <wsdl:message name="getAllRequestsMessage"/>
>
>    <wsdl:message name="getAllRequestsResponse">
>         <wsdl:part name="part1" element="ns1:getAllRequestsResponse"/>
>     </wsdl:message>
>
> Note how there's no <wsdl:part> for getAllRequestsMessage, unlike a
> similar method in the same document:
>
>     <!-- Generated by Axis2 1.0 -->
>     <wsdl:message name="getRequestsByPriorityMessage">
>         <wsdl:part name="part1" element="ns1:getRequestsByPriority"/>
>     </wsdl:message>
>
>     <wsdl:message name="getRequestsByPriorityResponse">
>         <wsdl:part name="part1" element="ns1:getRequestsByPriorityResponse"/>
>     </wsdl:message>
>
> I'm guessing that it's empty because this method takes no arguments
> (see method definition below), and this
> *might* be a deficiency with SOAP::Lite, however, the method
> (getAllRequests()) is "WSDLed" by Axis1.4 like so:
>
>     <!-- Generated by Axis 1.4 -->
>     <wsdl:message name="getAllRequestsRequest">
>         <wsdl:part element="impl:getAllRequests" name="parameters"/>
>     </wsdl:message>
>
>     <wsdl:message name="getAllRequestsResponse">
>         <wsdl:part element="impl:getAllRequestsResponse" name="parameters"/>
>     </wsdl:message>
>
> Here are the relevant lines from my services.xml:
>
>     <operation name="getAllRequests">
>         <messageReceiver
> class="org.apache.axis2.rpc.receivers.RPCMessageReceiver" />
>     </operation>
>     <operation name="getRequestsByPriority">
>         <messageReceiver
> class="org.apache.axis2.rpc.receivers.RPCMessageReceiver" />
>     </operation>
>
> And the method definitions in my service implementation class. This
> same class is used by
> both Axis and Axis2
>
>     @SuppressWarnings("unchecked")
>     public <T extends Request> Request[] getAllRequests()
>         throws Exception
>     {
>         List<T> allRequests = (List<T>)_requestMethods.getAllRequests();
>
>         Request[] array = new Request[allRequests.size()];
>         allRequests.toArray(array);
>
>         return array;
>     }
>
>     @SuppressWarnings("unchecked")
>     public <T extends Request> Request[] getRequestsByPriority(int priority)
>         throws Exception
>     {
>         List<T> allRequests =
>             (List<T>)_requestMethods.getRequestsByPriority(priority);
>
>         Request[] array = new Request[allRequests.size()];
>         allRequests.toArray(array);
>
>         return array;
>     }
>
> If you'd like to see the entire wsdl, let me know and I'll send it as
> an attachment--I'm not sure
> how much info would be needed to debug this and I didn't want to
> overwhelm with a bunch
> of noise.
>
> -dan
>

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org