You could move the type into the element:
<element name="MyParameter">
<complexType>
<sequence/>
</complexType>
</element>

That's about all you can do.   Either that or switch to rpc/literal and use an 
empty message:
<wsdl:message name="myRequestParameter"/>

When the request comes in on the wire, we need someway to know what operation 
to call.   In doc/lit, the only stuff on the wire is what you put in the 
element.   There isn't an operation name in method if you don't put one 
there.

Dan


On Thursday 18 September 2008 3:32:16 am Maxime Orain wrote:
> Thanks for your response.
>
> Is there any way to not define input types? (in order to have a void
> like in Java)
>
> I succeed to create the void but with types. So I need to create input
> element as empty like this?
>
> Types:
> -----
>       <element name="MyParameter" type="tns:voidType"/>
>       <element name="MyResponse" type="tns:TheResponse"/>
>       <complexType name="TheResponse">
>               <sequence>
>                       <element minOccurs="0" name="return"
> type="xsd:string"/>
>               </sequence>
>       </complexType>
>       <complexType name="voidType">
>               <sequence/>
>       </complexType>
>
> Message:
> --------
>       <wsdl:message name="myRequestParameter">
>               <wsdl:part name="myParameter"
> element="tns:MyParameter"/>
>       </wsdl:message>
>       <wsdl:message name="myRequestResponse">
>               <wsdl:part name="myResponse" element="tns:myResponse"/>
>       </wsdl:message>
>
> PortType:
> ---------
>
>       <wsdl:operation name="myRequest">
>               <wsdl:input name="myRequestParameter"
>                               message="tns:myRequestParameter"/>
>               <wsdl:output name="myRequestResponse"
>                                message="tns:myRequestResponse"/>
>       </wsdl:operation>
>
> Binding:
> --------
>       <wsdl:operation name="myRequest">
>               <soap:operation soapAction=""/>
>
>               <wsdl:input name="myRequestParameter">
>                       <soap:body use="literal"/>
>               </wsdl:input>
>
>               <wsdl:output name="myRequestResponse">
>                       <soap:body use="literal"/>
>               </wsdl:output>
>
>       </wsdl:operation>
>
>
>
> -----Original Message-----
> From: Daniel Kulp [mailto:[EMAIL PROTECTED]
> Sent: 17 September 2008 21:44
> To: [email protected]
> Cc: Maxime Orain
> Subject: Re: Cannot create operation : not request-response or one-way
>
>
> This is still a "request + response" interaction, just the request
> wouldn't
> contain any data.   You would need to add an "input" message to the
> operation
> that points to either a message with no parts, or one part pointing to
> an
> empty sequence.
>
> Dan
>
>
>
> On Wednesday 17 September 2008 11:14:02 am Maxime Orain wrote:
> Hello to all,
>
> I want to create a Java method like this from a WSDL definition: (The
> relevant WSDL information is below)
>
>       MyResponse myRequest()
>
> The problem is when I try to generate the Java code I obtain this
> message:
>
>      [java] WSDLToJava Error:
>      [java]  Summary:  Failures: 1, Warnings: 0
>      [java]  <<< ERROR!
>      [java] Invalid WSDL, Operation myRequest in PortType
> {http://service}MyService not request-response or one-way
>
> I don't understand because the inverse works ex:
>
>       void myRequest(MyParameter parameter)
>
>
> If someone can help me it would be very appreciated!
>
> WSDL definition used to create:  MyResponse myRequest()
>
> Types:
> -----
>
>       <element name="MyResponse" type="tns:TheResponse"/>
>       <complexType name="TheResponse">
>               <sequence>
>                       <element minOccurs="0" name="return"
> type="xsd:string"/>
>               </sequence>
>       </complexType>
>
>
> Message:
> --------
>       <wsdl:message name="myRequestResponse">
>               <wsdl:part name="myResponse" element="tns:myResponse"/>
>       </wsdl:message>
>
> PortType:
> ---------
>
>       <wsdl:operation name="myRequest">
>               <wsdl:output name="myRequestResponse"
> message="tns:myRequestResponse"/>
>       </wsdl:operation>
>
> Binding:
> --------
>       <wsdl:operation name="myRequest">
>               <soap:operation soapAction=""/>
>
>               <wsdl:output name="myRequestResponse">
>                       <soap:body use="literal"/>
>               </wsdl:output>
>       </wsdl:operation>
>
>
>
> This email was sent to you by Thomson Reuters, the global news and
> information company. Any views expressed in this message are those of
> the
> individual sender, except where the sender specifically states them to
> be
> the views of Thomson Reuters.



-- 
Daniel Kulp
[EMAIL PROTECTED]
http://www.dankulp.com/blog

Reply via email to