Ok,
so I don't think that's right. Did you mean style="wrapped" ? Also, you
can't tell the browser to format it as wrapped. The browser has no idea
what 'wrapped' or 'document' or 'RPC encoded' means. Its just plain xml
to a browser. Not sure what JBOSS allows, but I'm pretty sure it has no
idea what wrapped/document/rpc endocded is either.
Whatever the wsdl format is that they see, is what you have created. If
they see rpc encoded, then your web service follows that style. (In
other words, I don't think you are using document or wrapped yet). These
are the basic characteristics of the document/literal wrapped pattern:
* The input message has a single part. (One object passed in).
* The part is an element in the schema.
* The element has the same name as the operation. (Wierd Microsoft
preferred convention here. The input object has the same name as the
operation itself. Very strange. Try writing a project in a computer
science course in college and do that, name a parameter the same name as
the operation that takes it and see what mark you get! Fortunately, wsdl
is flexible and this can easily be done).
* The element's complex type has no attributes. (Another Microsoft
convention; to simplify class construction, I'm guessing).
Here are the strengths and weaknesses of this approach:
Strengths
* There is no type encoding info. (Finally, something useful from
this wrapped idea).
* Everything that appears in the soap:body is defined by the
schema, so you can easily validate this message. (Great idea!)
* Once again, you have the method name in the SOAP message. (Good
for routing requests I suppose, but one wonders what web services will
look like 5 years from now if we no longer use OO and we don't have
methods in classes anymore?)
* Document/literal is WS-I compliant, and the wrapped pattern
meets the WS-I restriction that the SOAP message's soap:body has only
one child.
Weaknesses
* The WSDL is more complicated. (Only slightly, really. And
considering we can easily develop .NET clients from the wsdl now, it's
worth it).
I recommend you use style="document". The wrapped part is just the way
you organize message parts in your wsdl to follow a convention
originally defined by Microsoft and later ratified by the WSI for
interoperability. So, to play with Microsoft nicely, we bend a little
and adopt their wrapped style.
One more thing, I don't start with a Java interface and run it through
Java2WSDL. I usually use WSDL2Java, that is, I start with WSDL first
(contract-first approach) and then generate the Java from that.
(Afterall, if your'e a client trying to communicate to a web service,
you get the wsdl given to you and that's usually about all you get. So,
why not get the wsdl down-pat first?)
-jeff
_____
From: M N [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 16, 2007 4:29 PM
To: axix axis
Subject: How to tell JBOSS/AXIS to create WSDL on the fly with
style=WRAPPING/LITERAL?
I have installed java webservice on JBOSS using AXIS 1.4. I
created the WSDL using ANT-java2wsdl tool. Using this tool I can specify
the STYLE="WRAPPING". This works fine.
But when the user creates the WSDL on the fly by pointing to
browser http://100.11.8.330:8080/okayapp/CustAccountService.jws?wsdl he
gets a WSDL in browser which is RPC encoded. How can I tell browser or
JBOSS to provide style=WRAPPING/LITERAL wsdl on the fly?
_____
Don't let your dream ride pass you by. Make it a reality
<http://us.rd.yahoo.com/evt=51200/*http://autos.yahoo.com/index.html;_yl
c=X3oDMTFibjNlcHF0BF9TAzk3MTA3MDc2BHNlYwNtYWlsdGFncwRzbGsDYXV0b3MtZHJlYW
1jYXI-> with Yahoo! Autos.