The problem has to do with WSDL formatting - you need to have all of your 
<message/> elements in your actual WSDL (not imported). The problem is 
that the 'name' attribute on <message/> elements is not qualified, so it 
takes whatever namespace is in the current WSDL; well, when you 'resolve' 
a WSDL by importing the WSDLs mentioned in its <import/> elements, the 
<message/> elements get moved from one namespace (in this case, WS-MEX) to 
another (your custom namespace), and WSDL4J can't resolve them.

All you need to do is copy the <message/> elements in. It's still fine to 
keep the actual schema definitions in separate XSD files. Once you move 
the <message/> elements, change the 'message' attributes on your 
<operation/> elements (below) to use the target namespace of your WSDL, 
not wsmex-w.

Dan



"Mrityunjay Hubli \(mjay\)" <[EMAIL PROTECTED]> wrote on 03/30/2007 06:52:18 
AM:

> Hi All,
> 
> I have the following operation in my wsdl
> 
> <wsdl:import namespace="http://schemas.xmlsoap.org/ws/2004/09/mex";
> location="WS-MetadataExchange-2004_09.wsdl"/>
> ...
> <wsdl:operation name="GetMetadata">
>             <wsdl:input name="GetMetadataMsg"
> message="wsmex-w:GetMetadataMsg"
> wsa:Action="http://schemas.xmlsoap.org/ws/2004/09/mex/GetMetadata"/>
>             <wsdl:output name="GetMetadataResponseMsg"
> message="wsmex-w:GetMetadataResponseMsg"
> wsa:Action="http://schemas.xmlsoap.org/ws/2004/09/mex/GetMetadataRespons
> e"/>
> </wsdl:operation>
> 
> ...
> 
> In WS-MetadataExchange-2004_09.wsdl the messages are defined as :
> <wsdl:message name="GetMetadataMsg">
>     <wsdl:part name="body" element="tns:GetMetadata"/>
>   </wsdl:message>
>   <wsdl:message name="GetMetadataResponseMsg">
>     <wsdl:part name="body" element="tns:Metadata"/>
>   </wsdl:message>
> 
> When I run wsdl2java, I get the following error:
> java.lang.RuntimeException: [ID = 'NotDocLiteral'] The WSDL operation
> 'GetMetada
> ta' is not doc-literal because it defines a message with more than one
> message p
> art for its SOAP Body. The SOAP Body of a doc-literal message should
> contain one
>  root request element (with the operation name) with zero or more child
> elements
>  (the parameters).
> 
> I have Muse version 2.2.0 
> 
> Any ideas about what could be the problem ?
> 
> Thanks,
> M'Jay
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to