You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by Andrea Smyth <an...@iona.com> on 2007/01/04 16:40:31 UTC

What is wrong with this WSDL?

code-generating from the wsdl below (which is the original wsrm.wsdl to 
which I added the binding and service elements),  fails with:

[INFO] [cxf-codegen:wsdl2java {execution: generate-sources}]
04-Jan-2007 15:26:19 
org.apache.cxf.tools.wsdl2java.processor.internal.PortTypeProcessor process
WARNING: SKIP_OVERLOADED_OPERATION
04-Jan-2007 15:26:19 
org.apache.cxf.tools.wsdl2java.processor.internal.OperationProcessor 
processMethod
WARNING: Problem outputting method for CreateSequence as no input 
message was found
Error : Invalid WSDL,wsdl:operation: "CreateSequence" is not 
request-response or one-way

If I replace the name of the input for the CreateSequenceOperation in 
the binding with CreateSequenceRequest it compiles fine.
What is wrong with the wsdl:binding and wsdl:service definition, or is 
this a bug?

Andrea.

---

<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
xmlns:xs="http://www.w3.org/2001/XMLSchema" 
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" 
xmlns:rm="http://schemas.xmlsoap.org/ws/2005/02/rm" 
xmlns:tns="http://schemas.xmlsoap.org/ws/2005/02/rm/wsdl" 
targetNamespace="http://schemas.xmlsoap.org/ws/2005/02/rm/wsdl">
  <wsdl:types>
    <xs:schema>
      <xs:import namespace="http://schemas.xmlsoap.org/ws/2005/02/rm" 
schemaLocation="wsrm.xsd"/>
      <xs:import 
namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing" 
schemaLocation="addressing.xsd"/>
    </xs:schema>
  </wsdl:types>
  <wsdl:message name="CreateSequence">
    <wsdl:part name="create" element="rm:CreateSequence"/>
  </wsdl:message>
  <wsdl:message name="CreateSequenceResponse">
    <wsdl:part name="createResponse" element="rm:CreateSequenceResponse"/>
  </wsdl:message>
  <wsdl:message name="TerminateSequence">
    <wsdl:part name="terminate" element="rm:TerminateSequence"/>
  </wsdl:message>
  <wsdl:portType name="SequenceAbsractPortType">
    <wsdl:operation name="CreateSequence">
      <wsdl:input message="tns:CreateSequence" 
wsa:Action="http://schemas.xmlsoap.org/ws/2005/02/rm/CreateSequence"/>
      <wsdl:output message="tns:CreateSequenceResponse" 
wsa:Action="http://schemas.xmlsoap.org/ws/2005/02/rm/CreateSequenceResponse"/>
    </wsdl:operation>
    <wsdl:operation name="TerminateSequence">
      <wsdl:input message="tns:TerminateSequence" 
wsa:Action="http://schemas.xmlsoap.org/ws/2005/02/rm/CreateSequenceResponse"/>
    </wsdl:operation>
  </wsdl:portType>

    <wsdl:binding name="SequenceSoapBinding" 
type="tns:SequenceAbsractPortType">
        <soap:binding style="document" 
transport="http://schemas.xmlsoap.org/soap/http"/>
        <wsdl:operation name="CreateSequence">
            <soap:operation soapAction="" style="document"/>
            <wsdl:input name="CreateSequence">
                <soap:body use="literal"/>
            </wsdl:input>
            <wsdl:output name="CreateSequenceResponse">
                <soap:body use="literal"/>
            </wsdl:output>
        </wsdl:operation>
        <wsdl:operation name="TerminateSequence">
            <soap:operation soapAction="" style="document"/>
            <wsdl:input name="TerminateSequence">
                <soap:body use="literal"/>
            </wsdl:input>
        </wsdl:operation>
    </wsdl:binding>
   
    <wsdl:service name="SequenceService">
        <wsdl:port binding="tns:SequenceSoapBinding" name="SequencePort">
            <soap:address 
location="http://localhost:9001/SoapContext/SequencePort"/>
        </wsdl:port>
    </wsdl:service>

</wsdl:definitions>

Re: What is wrong with this WSDL?

Posted by Sergey Beryozkin <se...@iona.com>.
Hi

Not sure but most likely it's to do with the way you've defined the binding for CreateSequence.

>    <wsdl:binding name="SequenceSoapBinding" type="tns:SequenceAbsractPortType">
>        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
>        <wsdl:operation name="CreateSequence">
>            <soap:operation soapAction="" style="document"/>
>            <wsdl:input name="CreateSequence">
>                <soap:body use="literal"/>
>            </wsdl:input>
>            <wsdl:output name="CreateSequenceResponse">
>                <soap:body use="literal"/>
>            </wsdl:output>
>        </wsdl:operation>

specifically,

>       <wsdl:input name="CreateSequence">
>       <wsdl:output name="CreateSequenceResponse">

name attribute here should match an optional 'name' attribute on the corresponding input/output definition in the portType operation 
and there're no 'name' attributes are set there. The easiest option is just drop 'name' attribute in when defining input/output for 
CreateSequence and TerminateSequence. 'name' attributes are used only for overloading operations in rpc-encoded styles...

Cheers, Sergey



----- Original Message ----- 
From: "Andrea Smyth" <an...@iona.com>
To: <cx...@incubator.apache.org>
Sent: Thursday, January 04, 2007 3:40 PM
Subject: What is wrong with this WSDL?


> code-generating from the wsdl below (which is the original wsrm.wsdl to which I added the binding and service elements),  fails 
> with:
>
> [INFO] [cxf-codegen:wsdl2java {execution: generate-sources}]
> 04-Jan-2007 15:26:19 org.apache.cxf.tools.wsdl2java.processor.internal.PortTypeProcessor process
> WARNING: SKIP_OVERLOADED_OPERATION
> 04-Jan-2007 15:26:19 org.apache.cxf.tools.wsdl2java.processor.internal.OperationProcessor processMethod
> WARNING: Problem outputting method for CreateSequence as no input message was found
> Error : Invalid WSDL,wsdl:operation: "CreateSequence" is not request-response or one-way
>
> If I replace the name of the input for the CreateSequenceOperation in the binding with CreateSequenceRequest it compiles fine.
> What is wrong with the wsdl:binding and wsdl:service definition, or is this a bug?
>
> Andrea.
>
> ---
>
> <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
> xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" 
> xmlns:rm="http://schemas.xmlsoap.org/ws/2005/02/rm" xmlns:tns="http://schemas.xmlsoap.org/ws/2005/02/rm/wsdl" 
> targetNamespace="http://schemas.xmlsoap.org/ws/2005/02/rm/wsdl">
>  <wsdl:types>
>    <xs:schema>
>      <xs:import namespace="http://schemas.xmlsoap.org/ws/2005/02/rm" schemaLocation="wsrm.xsd"/>
>      <xs:import namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing" schemaLocation="addressing.xsd"/>
>    </xs:schema>
>  </wsdl:types>
>  <wsdl:message name="CreateSequence">
>    <wsdl:part name="create" element="rm:CreateSequence"/>
>  </wsdl:message>
>  <wsdl:message name="CreateSequenceResponse">
>    <wsdl:part name="createResponse" element="rm:CreateSequenceResponse"/>
>  </wsdl:message>
>  <wsdl:message name="TerminateSequence">
>    <wsdl:part name="terminate" element="rm:TerminateSequence"/>
>  </wsdl:message>
>  <wsdl:portType name="SequenceAbsractPortType">
>    <wsdl:operation name="CreateSequence">
>      <wsdl:input message="tns:CreateSequence" wsa:Action="http://schemas.xmlsoap.org/ws/2005/02/rm/CreateSequence"/>
>      <wsdl:output message="tns:CreateSequenceResponse" 
> wsa:Action="http://schemas.xmlsoap.org/ws/2005/02/rm/CreateSequenceResponse"/>
>    </wsdl:operation>
>    <wsdl:operation name="TerminateSequence">
>      <wsdl:input message="tns:TerminateSequence" wsa:Action="http://schemas.xmlsoap.org/ws/2005/02/rm/CreateSequenceResponse"/>
>    </wsdl:operation>
>  </wsdl:portType>
>
>    <wsdl:binding name="SequenceSoapBinding" type="tns:SequenceAbsractPortType">
>        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
>        <wsdl:operation name="CreateSequence">
>            <soap:operation soapAction="" style="document"/>
>            <wsdl:input name="CreateSequence">
>                <soap:body use="literal"/>
>            </wsdl:input>
>            <wsdl:output name="CreateSequenceResponse">
>                <soap:body use="literal"/>
>            </wsdl:output>
>        </wsdl:operation>
>        <wsdl:operation name="TerminateSequence">
>            <soap:operation soapAction="" style="document"/>
>            <wsdl:input name="TerminateSequence">
>                <soap:body use="literal"/>
>            </wsdl:input>
>        </wsdl:operation>
>    </wsdl:binding>
>   <wsdl:service name="SequenceService">
>        <wsdl:port binding="tns:SequenceSoapBinding" name="SequencePort">
>            <soap:address location="http://localhost:9001/SoapContext/SequencePort"/>
>        </wsdl:port>
>    </wsdl:service>
>
> </wsdl:definitions> 


Re: What is wrong with this WSDL?

Posted by Balaji Ravi <ba...@gmail.com>.
Hi andrea,

I think since you have not given a wsdl:input name in the porttype, it is
taking in a default input name as CreateSequenceRequest... Either change the
porttype with a wsdl:input name="CreateSequence" or change the binding to
use the default CreateSequenceRequest input name...

- Balaji

On 1/4/07, Andrea Smyth <an...@iona.com> wrote:
>
> code-generating from the wsdl below (which is the original wsrm.wsdl to
> which I added the binding and service elements),  fails with:
>
> [INFO] [cxf-codegen:wsdl2java {execution: generate-sources}]
> 04-Jan-2007 15:26:19
> org.apache.cxf.tools.wsdl2java.processor.internal.PortTypeProcessorprocess
> WARNING: SKIP_OVERLOADED_OPERATION
> 04-Jan-2007 15:26:19
> org.apache.cxf.tools.wsdl2java.processor.internal.OperationProcessor
> processMethod
> WARNING: Problem outputting method for CreateSequence as no input
> message was found
> Error : Invalid WSDL,wsdl:operation: "CreateSequence" is not
> request-response or one-way
>
> If I replace the name of the input for the CreateSequenceOperation in
> the binding with CreateSequenceRequest it compiles fine.
> What is wrong with the wsdl:binding and wsdl:service definition, or is
> this a bug?
>
> Andrea.
>
> ---
>
> <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:xs="http://www.w3.org/2001/XMLSchema"
> xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"
> xmlns:rm="http://schemas.xmlsoap.org/ws/2005/02/rm"
> xmlns:tns="http://schemas.xmlsoap.org/ws/2005/02/rm/wsdl"
> targetNamespace="http://schemas.xmlsoap.org/ws/2005/02/rm/wsdl">
>   <wsdl:types>
>     <xs:schema>
>       <xs:import namespace="http://schemas.xmlsoap.org/ws/2005/02/rm"
> schemaLocation="wsrm.xsd"/>
>       <xs:import
> namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing"
> schemaLocation="addressing.xsd"/>
>     </xs:schema>
>   </wsdl:types>
>   <wsdl:message name="CreateSequence">
>     <wsdl:part name="create" element="rm:CreateSequence"/>
>   </wsdl:message>
>   <wsdl:message name="CreateSequenceResponse">
>     <wsdl:part name="createResponse" element="rm:CreateSequenceResponse"/>
>   </wsdl:message>
>   <wsdl:message name="TerminateSequence">
>     <wsdl:part name="terminate" element="rm:TerminateSequence"/>
>   </wsdl:message>
>   <wsdl:portType name="SequenceAbsractPortType">
>     <wsdl:operation name="CreateSequence">
>       <wsdl:input message="tns:CreateSequence"
> wsa:Action="http://schemas.xmlsoap.org/ws/2005/02/rm/CreateSequence"/>
>       <wsdl:output message="tns:CreateSequenceResponse"
> wsa:Action="
> http://schemas.xmlsoap.org/ws/2005/02/rm/CreateSequenceResponse"/>
>     </wsdl:operation>
>     <wsdl:operation name="TerminateSequence">
>       <wsdl:input message="tns:TerminateSequence"
> wsa:Action="
> http://schemas.xmlsoap.org/ws/2005/02/rm/CreateSequenceResponse"/>
>     </wsdl:operation>
>   </wsdl:portType>
>
>     <wsdl:binding name="SequenceSoapBinding"
> type="tns:SequenceAbsractPortType">
>         <soap:binding style="document"
> transport="http://schemas.xmlsoap.org/soap/http"/>
>         <wsdl:operation name="CreateSequence">
>             <soap:operation soapAction="" style="document"/>
>             <wsdl:input name="CreateSequence">
>                 <soap:body use="literal"/>
>             </wsdl:input>
>             <wsdl:output name="CreateSequenceResponse">
>                 <soap:body use="literal"/>
>             </wsdl:output>
>         </wsdl:operation>
>         <wsdl:operation name="TerminateSequence">
>             <soap:operation soapAction="" style="document"/>
>             <wsdl:input name="TerminateSequence">
>                 <soap:body use="literal"/>
>             </wsdl:input>
>         </wsdl:operation>
>     </wsdl:binding>
>
>     <wsdl:service name="SequenceService">
>         <wsdl:port binding="tns:SequenceSoapBinding" name="SequencePort">
>             <soap:address
> location="http://localhost:9001/SoapContext/SequencePort"/>
>         </wsdl:port>
>     </wsdl:service>
>
> </wsdl:definitions>
>

Re: What is wrong with this WSDL?

Posted by Daniel Kulp <da...@iona.com>.
Andrea,

The "name" attibutes on the input/output elements don't match from the 
portType to the binding.  Example:

PortType:   (no name attribute, thus no name)
<wsdl:input message="tns:CreateSequence" .... />

Binding:
             <wsdl:input name="CreateSequence">
                 <soap:body use="literal"/>
             </wsdl:input>
(name attribute defined)

WSDL4J detects the operations as being "different" and thus creates a new 
operation for it.  That's where the SKIP_OVERLOADED_OPERATION warning came 
from.

Enjoy!
Dan


On Thursday 04 January 2007 10:40, Andrea Smyth wrote:
> code-generating from the wsdl below (which is the original wsrm.wsdl to
> which I added the binding and service elements),  fails with:
>
> [INFO] [cxf-codegen:wsdl2java {execution: generate-sources}]
> 04-Jan-2007 15:26:19
> org.apache.cxf.tools.wsdl2java.processor.internal.PortTypeProcessor process
> WARNING: SKIP_OVERLOADED_OPERATION
> 04-Jan-2007 15:26:19
> org.apache.cxf.tools.wsdl2java.processor.internal.OperationProcessor
> processMethod
> WARNING: Problem outputting method for CreateSequence as no input
> message was found
> Error : Invalid WSDL,wsdl:operation: "CreateSequence" is not
> request-response or one-way
>
> If I replace the name of the input for the CreateSequenceOperation in
> the binding with CreateSequenceRequest it compiles fine.
> What is wrong with the wsdl:binding and wsdl:service definition, or is
> this a bug?
>
> Andrea.
>
> ---
>
> <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:xs="http://www.w3.org/2001/XMLSchema"
> xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"
> xmlns:rm="http://schemas.xmlsoap.org/ws/2005/02/rm"
> xmlns:tns="http://schemas.xmlsoap.org/ws/2005/02/rm/wsdl"
> targetNamespace="http://schemas.xmlsoap.org/ws/2005/02/rm/wsdl">
>   <wsdl:types>
>     <xs:schema>
>       <xs:import namespace="http://schemas.xmlsoap.org/ws/2005/02/rm"
> schemaLocation="wsrm.xsd"/>
>       <xs:import
> namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing"
> schemaLocation="addressing.xsd"/>
>     </xs:schema>
>   </wsdl:types>
>   <wsdl:message name="CreateSequence">
>     <wsdl:part name="create" element="rm:CreateSequence"/>
>   </wsdl:message>
>   <wsdl:message name="CreateSequenceResponse">
>     <wsdl:part name="createResponse" element="rm:CreateSequenceResponse"/>
>   </wsdl:message>
>   <wsdl:message name="TerminateSequence">
>     <wsdl:part name="terminate" element="rm:TerminateSequence"/>
>   </wsdl:message>
>   <wsdl:portType name="SequenceAbsractPortType">
>     <wsdl:operation name="CreateSequence">
>       <wsdl:input message="tns:CreateSequence"
> wsa:Action="http://schemas.xmlsoap.org/ws/2005/02/rm/CreateSequence"/>
>       <wsdl:output message="tns:CreateSequenceResponse"
> wsa:Action="http://schemas.xmlsoap.org/ws/2005/02/rm/CreateSequenceResponse
>"/> </wsdl:operation>
>     <wsdl:operation name="TerminateSequence">
>       <wsdl:input message="tns:TerminateSequence"
> wsa:Action="http://schemas.xmlsoap.org/ws/2005/02/rm/CreateSequenceResponse
>"/> </wsdl:operation>
>   </wsdl:portType>
>
>     <wsdl:binding name="SequenceSoapBinding"
> type="tns:SequenceAbsractPortType">
>         <soap:binding style="document"
> transport="http://schemas.xmlsoap.org/soap/http"/>
>         <wsdl:operation name="CreateSequence">
>             <soap:operation soapAction="" style="document"/>
>             <wsdl:input name="CreateSequence">
>                 <soap:body use="literal"/>
>             </wsdl:input>
>             <wsdl:output name="CreateSequenceResponse">
>                 <soap:body use="literal"/>
>             </wsdl:output>
>         </wsdl:operation>
>         <wsdl:operation name="TerminateSequence">
>             <soap:operation soapAction="" style="document"/>
>             <wsdl:input name="TerminateSequence">
>                 <soap:body use="literal"/>
>             </wsdl:input>
>         </wsdl:operation>
>     </wsdl:binding>
>
>     <wsdl:service name="SequenceService">
>         <wsdl:port binding="tns:SequenceSoapBinding" name="SequencePort">
>             <soap:address
> location="http://localhost:9001/SoapContext/SequencePort"/>
>         </wsdl:port>
>     </wsdl:service>
>
> </wsdl:definitions>

-- 
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727    C: 508-380-7194
daniel.kulp@iona.com

Re: What is wrong with this WSDL?

Posted by Dan Diephouse <da...@envoisolutions.com>.
Looks like a bug to me. I don't see any reason why your wsdl isn't valid.

- Dan

On 1/4/07, Andrea Smyth <an...@iona.com> wrote:
>
> code-generating from the wsdl below (which is the original wsrm.wsdl to
> which I added the binding and service elements),  fails with:
>
> [INFO] [cxf-codegen:wsdl2java {execution: generate-sources}]
> 04-Jan-2007 15:26:19
> org.apache.cxf.tools.wsdl2java.processor.internal.PortTypeProcessorprocess
> WARNING: SKIP_OVERLOADED_OPERATION
> 04-Jan-2007 15:26:19
> org.apache.cxf.tools.wsdl2java.processor.internal.OperationProcessor
> processMethod
> WARNING: Problem outputting method for CreateSequence as no input
> message was found
> Error : Invalid WSDL,wsdl:operation: "CreateSequence" is not
> request-response or one-way
>
> If I replace the name of the input for the CreateSequenceOperation in
> the binding with CreateSequenceRequest it compiles fine.
> What is wrong with the wsdl:binding and wsdl:service definition, or is
> this a bug?
>
> Andrea.
>
> ---
>
> <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:xs="http://www.w3.org/2001/XMLSchema"
> xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"
> xmlns:rm="http://schemas.xmlsoap.org/ws/2005/02/rm"
> xmlns:tns="http://schemas.xmlsoap.org/ws/2005/02/rm/wsdl"
> targetNamespace="http://schemas.xmlsoap.org/ws/2005/02/rm/wsdl">
>   <wsdl:types>
>     <xs:schema>
>       <xs:import namespace="http://schemas.xmlsoap.org/ws/2005/02/rm"
> schemaLocation="wsrm.xsd"/>
>       <xs:import
> namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing"
> schemaLocation="addressing.xsd"/>
>     </xs:schema>
>   </wsdl:types>
>   <wsdl:message name="CreateSequence">
>     <wsdl:part name="create" element="rm:CreateSequence"/>
>   </wsdl:message>
>   <wsdl:message name="CreateSequenceResponse">
>     <wsdl:part name="createResponse" element="rm:CreateSequenceResponse"/>
>   </wsdl:message>
>   <wsdl:message name="TerminateSequence">
>     <wsdl:part name="terminate" element="rm:TerminateSequence"/>
>   </wsdl:message>
>   <wsdl:portType name="SequenceAbsractPortType">
>     <wsdl:operation name="CreateSequence">
>       <wsdl:input message="tns:CreateSequence"
> wsa:Action="http://schemas.xmlsoap.org/ws/2005/02/rm/CreateSequence"/>
>       <wsdl:output message="tns:CreateSequenceResponse"
> wsa:Action="
> http://schemas.xmlsoap.org/ws/2005/02/rm/CreateSequenceResponse"/>
>     </wsdl:operation>
>     <wsdl:operation name="TerminateSequence">
>       <wsdl:input message="tns:TerminateSequence"
> wsa:Action="
> http://schemas.xmlsoap.org/ws/2005/02/rm/CreateSequenceResponse"/>
>     </wsdl:operation>
>   </wsdl:portType>
>
>     <wsdl:binding name="SequenceSoapBinding"
> type="tns:SequenceAbsractPortType">
>         <soap:binding style="document"
> transport="http://schemas.xmlsoap.org/soap/http"/>
>         <wsdl:operation name="CreateSequence">
>             <soap:operation soapAction="" style="document"/>
>             <wsdl:input name="CreateSequence">
>                 <soap:body use="literal"/>
>             </wsdl:input>
>             <wsdl:output name="CreateSequenceResponse">
>                 <soap:body use="literal"/>
>             </wsdl:output>
>         </wsdl:operation>
>         <wsdl:operation name="TerminateSequence">
>             <soap:operation soapAction="" style="document"/>
>             <wsdl:input name="TerminateSequence">
>                 <soap:body use="literal"/>
>             </wsdl:input>
>         </wsdl:operation>
>     </wsdl:binding>
>
>     <wsdl:service name="SequenceService">
>         <wsdl:port binding="tns:SequenceSoapBinding" name="SequencePort">
>             <soap:address
> location="http://localhost:9001/SoapContext/SequencePort"/>
>         </wsdl:port>
>     </wsdl:service>
>
> </wsdl:definitions>
>



-- 
Dan Diephouse
Envoi Solutions
http://envoisolutions.com | http://netzooid.com/blog