Make sure that the qnames you use exactly match the qnames defined in the WSDL.
I also suggest that you use wsdl2java to generate a client stub, and
then look at the generated code to see how Axis would do it.

Anne

On 12/28/06, Pradyumna Kanchi <[EMAIL PROTECTED]> wrote:




Hi,



Thanks for the response.



I modified and added the following lines of code





//call.setProperty(org.apache.axis.client.Call.OPERATION_STYLE_PROPERTY,
 org.apache.axis.constants.Style.DOCUMENT_STR);



//call.setProperty(org.apache.axis.client.Call.SOAPACTION_USE_PROPERTY,
org.apache.axis.constants.Use.LITERAL_STR);



call.setOperationStyle(org.apache.axis.constants.Style.DOCUMENT);



call.setOperationUse(org.apache.axis.constants.Use.LITERAL);





call.setReturnQName(new
javax.xml.namespace.QName(qname,"getMessageReturned"));





I am getting the following exception



; nested exception is:

org.xml.sax.SAXException: SimpleDeserializer encountered a child element,
which is NOT expected, in something it was trying to deserialize.





Also the .Net Service is receiving empty data



Thanks & Regards,

Pradyumna




-----Original Message-----
 From: Anne Thomas Manes [mailto:[EMAIL PROTECTED]
 Sent: Thursday, December 28, 2006 12:37 AM
 To: [email protected]
 Subject: Re: Axis 1.4 Empty data in the invoke method



Axis defaults to "rpc" style, so you must set the

OPERATION_STYLE_PROPERTY to "document". You also must pass the

"wrapped" elements rather than the "unwrapped" parameters. So you must

pass in the "getMessage" value object, and get the

"getMessageResponse" value object for the return value.



Anne



On 12/27/06, Pradyumna Kanchi <[EMAIL PROTECTED]> wrote:

>

>

>

>

> Hi,

>

>

>

> I want to invoke a web service. I don't want to generate the client from

> WSDL. Instead I am using axis client Call.

>

> I am able to invoke the web service method written in .Net and getting the

> acknowledgement.

>

> But the .Net web service is receiving empty parameter from the axis client

> even though the data is being passed.

>

> (But it is receiving data if I invoke from the classes generated from
WSDL)

>

>

>

> The web service is of document / literal.

>

>

>

> I am using axis 1.4. Is it possible to invoke .Net service without using
the

> classes generated from WSDL?

>

>

>

> Following is the code that I am using.

>

>

>

> String endPointAddress =

> "http://192.168.1.22/testws/service.asmx";;

>

> String qname = "http://tempuri.org/";;

>

> String soapURI = "http://tempuri.org/getMessage";;

>

> String methodName = "getMessage";

>

>

>

>

>

> org.apache.axis.client.Service service = new

> org.apache.axis.client.Service();

>

> Call call = (Call) service.createCall();

>

> call.setTargetEndpointAddress(new java.net.URL(new

> java.net.URL(endPointAddress));

>

> call.setUseSOAPAction(true);

>

> call.setSOAPActionURI(soapURI);

>

> call.setEncodingStyle(null);

>

>
call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR,

> Boolean.FALSE);

>

>
call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS,

> Boolean.FALSE);

>

>
call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);

>

>

>

> call.setOperationName(new javax.xml.namespace.QName(qname, methodName));

>

>

>

> call.setTimeout(60000);

>

> String returned = (String) call.invoke(new Object[]{" Test Message"});

>

>

>

>

>

>

>

> Thanks & Regards,

>

> Pradyumna

>

>

>

>

>
---------------------------------------------------------------------

> CONFIDENTIALITY NOTICE:

>  The information contained in this transmittal and Documents accompanying

> same are legally privileged and confidential information intended only for

> the use of the individual or entity named herein. If the reader of this

> message is not the intended recipient, you are hereby notified that any

> dissemination, distribution or copy of this transmittal is strictly

> prohibited.

>
---------------------------------------------------------------------

>

>
---------------------------------------------------------------------

> 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]





---------------------------------------------------------------------
CONFIDENTIALITY NOTICE:
 The information contained in this transmittal and Documents accompanying
same are legally privileged and confidential information intended only for
the use of the individual or entity named herein. If the reader of this
message is not the intended recipient, you are hereby notified that any
dissemination, distribution or copy of this transmittal is strictly
prohibited.
---------------------------------------------------------------------


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

Reply via email to