On Thursday 29 April 2010 5:39:02 am dmichel wrote:
> If I set a operation without an input message like so
> 
> 
>        <wsdl:operation name="GetImageCount">
>            <wsdl:output message="tns:GetImageCountOutput"/>
>         </wsdl:operation>
> 
> 
> I get this error message
> 
> <<< ERROR!
> Invalid WSDL, Operation GetImageCount in PortType
> {http://theSoftwareArchive.com}SoftwareArchivePortType not request-response
> or one-way
> 
> so, I assume, this is just not possible.

From  a strictly "is it legal wsdl", the answer is yes, it's legal.   However, 
there isn't really any definition on how it works in practice (and really 
wouldn't work at all for HTTP) so no-one supports it.


> 
> So, I tried "making up" and empty element and use that as a message
> 
>     <xs:element name="emptyElement">
>         <xs:complexType />
>     </xs:element>

Try changing to:

 <xs:element name="emptyElement">
         <xs:complexType >
              <xs:sequence/>
         </xs:complextType>
     </xs:element>

 
Dan


>     <wsdl:message name="empty">
>         <wsdl:part name="parameters" element="tns:emptyElement"/>
>     </wsdl:message>
> 
> wsdl2java generate the code fine with no warning/error message but then, as
> I run the client code, I get this:
> 
>      [java] Invoking getImageCount...
>      [java] Exception in thread "main"
> javax.xml.ws.soap.SOAPFaultException: wrong number of arguments while
> invoking public java.math.BigInteger
> com.thesoftwarearchive.SoftwareArchivePortTypeImpl.getImageCount(com.theso
> ftwarearchive.EmptyElement) with params null.
>      [java]   at
> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:146)
>      [java]   at $Proxy37.getImageCount(Unknown Source)
>      [java]   at
> com.thesoftwarearchive.SoftwareArchivePortType_SoftwareArchivePort_Client.m
> ain(SoftwareArchivePortType_SoftwareArchivePort_Client.java:71) [java]
> Caused by: org.apache.cxf.binding.soap.SoapFault: wrong number of
> arguments while invoking public java.math.BigInteger
> com.thesoftwarearchive.SoftwareArchivePortTypeImpl.getImageCount(com.thesof
> twarearchive.EmptyElement) with params null.
>      [java]   at
> org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.unmarshalF
> ault(Soap11FaultInInterceptor.java:75)
> 
> 
> 
> Any idea what's wrong ? Is there a better way to deal with an operation
> with no input message ?
> 
> David

-- 
Daniel Kulp
[email protected]
http://dankulp.com/blog

Reply via email to