Hello,
I am working on an application with a GSOAP (2.7.16) server and a Java
JAX-WS 2.1.6 Web services client.
I have an interoperability issue with SOAP operations that doesn't return
anything (void addProvider(...) in my java code )
Basically, in my WSDL file, I have an input message but no output message
for my operation.
For example :

<operation name="addProvider">
            <soap:operation/>
            <input name="input2">
                <soap:body use="literal"/>
            </input>
        </operation>

When the code is generated, no code is generated for the response, which is
sensible. But it means that the socket is closed without sending back any
valid HTTP response code (no HTTP code 200)
This cause an exception in my Java code. (In the JAX-WS library).

Here is the generated C code
SOAP_FMAC5 int SOAP_FMAC6 soap_serve___descriptor__addProvider(struct soap
*soap)
{ struct __descriptor__addProvider soap_tmp___descriptor__addProvider;
soap_default___descriptor__addProvider(soap,
&soap_tmp___descriptor__addProvider);
soap->encodingStyle = NULL;
if (!soap_get___descriptor__addProvider(soap,
&soap_tmp___descriptor__addProvider, "-descriptor:addProvider", NULL))
return soap->error;
if (soap_body_end_in(soap)
 || soap_envelope_end_in(soap)
 || soap_end_recv(soap))
return soap->error;
soap->error = __descriptor__addProvider(soap,
soap_tmp___descriptor__addProvider.descriptor__providerDescription);
if (soap->error)
return soap->error;
// ---------------------------START OF MY MODIFIED CODE
----------------------------
        if (soap->mode & SOAP_IO_LENGTH)
{ if (soap_envelope_begin_out(soap)
 || soap_envelope_end_out(soap))
 return soap->error;
};
if ( soap_response(soap, SOAP_OK)
 || soap_end_send(soap))
return soap->error;
// ---------------------------END OF MY MODIFIED CODE
----------------------------
return soap_closesock(soap);
}

With the modified code (see in code snippet), Everything is fine.
I didn't find anything in the SOAP standard specific about that, but with
SOAP running on top of HTTP (case of SOAP/HTTP binding),
I suppose that is the correct way of doing. So it seems that there is a bug
in GSOAP.

Do you have any comment on this ?

Benoit

Reply via email to