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 Bill Keese <bi...@tech.beacon-it.co.jp> on 2005/01/27 08:17:35 UTC

void return type (wrapped/literal mode)

I am programming a wrapped/literal service, and I have some operations
that don't return any value (except possibly throwing an exception).
Here are the 3 things I tried, and their compatability with .NET and
AXIS client

1) empty message
<wsdl:message name="UpdateDocumentResponse"/>

Axis: works
.NET: thinks the operation is not wrapped style

2) message with empty element
<element name="UpdateDocumentResponse"/>

<wsdl:message name="UpdateDocumentResponse">
<wsdl:part name="parameters" element="tns:UpdateDocumentResponse"/>
</wsdl:message>

.NET: works
AXIS: thinks the operation is not wrapped style

3) Void type
<complexType name="Void"/>
<element name="UpdateDocumentResponse" type="tns:Void"/>
<wsdl:message name="UpdateDocumentResponse">
<wsdl:part name="parameters" element="tns:UpdateDocumentResponse"/>
</wsdl:message>

.NET: works
AXIS: works

Which of these is correct? Obviously I will use #3 but should I file a bug?

-------
Note:
I generated my .NET stub with wsdl.exe:
wsdl.exe /l:vb c:/myWsdl.wsdl

AXIS commands:
I created a service based on my WSDL file, and then created a call based
on the information in the service:

QName serviceName = new QName("http://myNamespace", "MyService");
service = new Service(serviceUrl+"?wsdl", serviceName);
Call call = (Call) service.createCall();
QName qn = new QName("http://myNamespace", "MyService");
call.setOperation(qn, operation);