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 Oliver Wulff <ol...@zurich.ch> on 2003/10/20 18:02:16 UTC

empty operations, document/literal




Hi

I've got another problem with Axis and document/literal. I use Axis to
write the client application. The service provides an easy operation like
"void ping()". Here is the snippet of the WSDL:

<message name="zch.Object_1_0.ping"/>
<message name="zch.Object_1_0.pingResponse"/>

<portType name="zch.Object_1_0">
    <operation name="ping">
        <input message="tns:zch.Object_1_0.ping" name="ping"/>
        <output message="tns:zch.Object_1_0.pingResponse"
name="pingResponse"/>
    </operation>
</portType>


<binding name="berechtigung.Berechtigung_1_0_SOAPBinding"
    type="tns:berechtigung.Berechtigung_1_0">
    <soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="ping">
        <soap:operation soapAction="" style="document"/>
        <input name="ping">
            <soap:body use="literal"/>
        </input>
        <output name="pingResponse">
            <soap:body use="literal"/>
        </output>
    </operation>
</binding>

The soap request should look like this:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance">
 <soapenv:Body>
 </soapenv:Body>
</soapenv:Envelope>

but it contains an additional ping element:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance">
 <soapenv:Body>
  <ping xmlns="http://schemas.iona.com/idltypes/C/TEMP/idl/Berechtigung.idl
"/>
 </soapenv:Body>
</soapenv:Envelope>

This is not allowed for document/literal. If I remove the ping element and
send the request using a simple HTTP client, it does work.

Oliver







******************* BITTE BEACHTEN *******************
Diese Nachricht (wie auch allfällige Anhänge dazu) beinhaltet
möglicherweise vertrauliche oder gesetzlich geschützte Daten oder
Informationen. Zum Empfang derselben ist (sind) ausschliesslich die
genannte(n) Person(en) bestimmt. Falls Sie diese Nachricht
irrtümlicherweise erreicht hat, sind Sie höflich gebeten, diese unter
Ausschluss jeder Reproduktion zu zerstören und die absendende Person
umgehend zu benachrichtigen. Vielen Dank für Ihre Hilfe.