That's the purpose of using Document Literal webservice. You delegate the
type checking logic to your application and not the wsdl. This gives you
flexibility, but your clients should be aware of what your service are
capable to process. There should be documents (contracts) in the client and
server, and they should be the same. This documents should be representable
(serializable) as org.w3c.dom.Element or Document or SOAPBodyElement, so
what you have to give to testMsg is that Element. 
Check the samples/TestMsgService that comes with axis.
 
Matias
Southworks.net

________________________________

From: Kim Tan [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 13, 2004 1:46 PM
To: [EMAIL PROTECTED]
Subject: wsdl xsd:anyType question...


Hi there,
I am using Axis 1.2 beta, I have a simple test service, I am using the
Doc/lit  : 
..
Document testMsg(Document inMsg){
return inMsg;
}
 
I then generate WSDL from the code, in the WSDL, it has 
   <element name="testMsg" type="xsd:anyType"/>
 
I then use WSDJ2Java to generate the client stub, in the stub, it has the
signature :
...
public java.lang.Object testMsg(java.lang.Object part) throws
java.rmi.RemoteException {
......
 
so my question is this : 
without knowing the detail of the web service code, how do I know what
object to pass to the testMsg(..) method ? my understanding is that the WSDL
is supposed to have all info needed to access the web service, so I tried to
pass in a Message object just for the test, and it failed :-) , and it
worked if I passed in Document object.
 
thanks in advance for any pointer .....
 
Kim
 

________________________________

Do you Yahoo!?
New and Improved Yahoo! Mail
<http://us.rd.yahoo.com/mail_us/taglines/10/*http://promotions.yahoo.com/new
_mail/static/efficiency.html>  - Send 10MB messages!

Reply via email to