Thanks again Dan,
Sorry for all the pain:)  Now I learned something about the MS-authored
thing.  I just wanted to confirm where the problem was stemming from, if
it was me or some other files I was depending on.  Thanks for all your
help!
-Vinh
 

-----Original Message-----
From: Daniel Jemiolo [mailto:[EMAIL PROTECTED] 
Sent: Friday, January 05, 2007 5:45 PM
To: [email protected]
Subject: Re: message elements with empty body

I'm too lazy to look up the JIRA items right now (it's Friday night),
but I remember dealing with this for some of the Microsoft-authored
specs. 
Trouble is, I don't think we updated the wsdl2java analysis code to
handle this case. So, you can have a WSDL operation with no output
parts, and write code to reflect it (void method), and it will run okay,
but wsdl2java still balks when trying to generate code for it.

Most of the MS-authored specs do not fully comply with WS-I Basic
Profile's rules for doc-literal operations; namely, they do not use
empty elements to indicate 'void' like the OASIS specs do. This has
been troublesome. There have been a few issues posted to JIRA and we
have resolved many of them, but not all. With regard to WS-I BP, the
WSDL is malformed, but no one seems to care, so the best I can tell you
is: make a JIRA item for the code generation to handle empty output
messages and, in the meantime, manually add the Java method that will
support this operation. If it has the right parameter length and 'void'
return type, it should execute as normal, and the SOAP response will not
contain anything under <soap:Body/>.

Dan



"Vinh Nguyen \(vinguye2\)" <[EMAIL PROTECTED]> wrote on 01/05/2007
08:22:16 PM:

> I am trying to implement a few WS-Enumeration operations but am having

> trouble when I run wsdl2java.
> 
> I have the following operation in my wsdl:
> 
> <wsdl:import
> namespace="http://schemas.xmlsoap.org/ws/2004/09/enumeration";
> location="WS-Enumeration-2004_09.wsdl"/>
> <wsdl:portType...>
>     ...
>     <wsdl:operation name="ReleaseOp">
>         <wsdl:input message="wsen-w:ReleaseMessage"
>
wsa:Action="http://schemas.xmlsoap.org/ws/2004/09/enumeration/Release"/>
>         <wsdl:output message="wsen-w:ReleaseResponseMessage"
> wsa:Action="http://schemas.xmlsoap.org/ws/2004/09/enumeration/ReleaseR
> es
> ponse"/>
>     </wsdl:operation>
> 
> In WS-Enumeration-2004_09.wsdl, the messages are defined as:
>  <wsdl:message name="ReleaseMessage">
>     <wsdl:part name="Body" element="wsen:Release"/>  </wsdl:message>  
> <wsdl:message name="ReleaseResponseMessage"/>
> 
> But, when I run wsdl2java, I get the following error:
> 
> An exception was caught: [ID = 'NotDocLiteral'] The WSDL operation 
> 'ReleaseOp' is not doc-literal be cause it defines a message with more

> than one message part 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 suspect the issue is because the ReleaseResponseMessage element is 
> defined without a body (i.e. the response xml will have no body), but 
> wsdl2java expects a <wsdl:part> in each message element.
> 
> Do all message elements need a <wsdl:part>, even if it is empty?  If 
> so, then WS-Enumeration-2004_09.wsdl is malformed.  If not, wsdl2java 
> needs to be updated to properly handle empty message elements.
> 
> 


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

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

Reply via email to