[prev in list] [next in list] [prev in thread] [next in thread]
List: xmlrpc-user
Subject: Re: How to send the Int value to ServiceClient in Axiom
From: Venkatesh Reddy Ravula <rvr.venkatesh () gmail ! com>
Date: 2013-06-21 20:02:25
Message-ID: CAD6iUUj3bjZn5c2ntPeXFDB2-6X-ADJsgfKsuCG1_gykECN58A () mail ! gmail ! com
[Download RAW message or body]
Hi All,
i am still not able to solve the problem. here i am sending the
code. please let me know what is the problem.
public static String getMessageInfo(String fileId) throws AxisFault {
String success = "true";
RPCServiceClient sender = new RPCServiceClient();
Options opts = new Options();
int msgId = Integer.parseInt(fileId);
Object[] queryArgs = new Object[] {msgId};
logger.debug("STARTING OF getMessageInfo WEBSERVICE CALL ...");
opts.setTo(new EndpointReference(
"http://localhost:8080/LibraryService"));
opts.setAction("
http://standards.xxx.com/schemas/AddIn_1_0/ContentLibrary/GetMessageInfos");
sender.setOptions(opts);
OMElement res = null;
logger.debug("getMessageInfo ALL RESPONSES:");
ArrayList<Integer> args = new ArrayList<Integer>();
args.add(msgId);
try {
logger.debug("Message ID : "+args.get(0) );
res = sender.invokeBlocking(new QName("
http://standards.xxx.com/schemas/AddIn_1_0", "GetMessageInfos"),queryArgs);
logger.debug("getMessageInfo RESPONSE XML: " + res);
System.out.println(res);
} catch (Exception e) {
success = "false";
logger.error("GetStatus SOAP ERROR");
logger.error("GetStatus : " + e.getMessage());
}
logger.debug("END OF getMessageInfo WEBSERVICE CALL ...");
return success;
}
i am getting SOAP ERROR Value cannot be null.
My call should be like this :
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:van="http://standards.xxx.com/schemas/AddIn_1_0" xmlns:arr="
http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<soapenv:Header/>
<soapenv:Body>
<van:GetMessageInfos>
<!--Optional:-->
<van:messageIds>
<!--Zero or more repetitions:-->
<arr:int>51</arr:int>
</van:messageIds>
</van:GetMessageInfos>
</soapenv:Body>
</soapenv:Envelope>
but with about method i am able to build like this
<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<GetMessageInfos xmlns="http://standards.xxx.com/schemas/AddIn_1_0">
<arg0 xmlns="">51</arg0>
</GetMessageInfos>
</soapenv:Body>
</soapenv:Envelope>"
this is giving me error. Could you people help me with this.
Thanks
Venkaesh
On Thu, Jun 20, 2013 at 9:49 PM, Venkatesh Reddy Ravula <
rvr.venkatesh@gmail.com> wrote:
> Hi Deepal,
> Thanks for your quick response and the links your have
> given. The link has really has excellent information. But i have gone
> through all the links but i have not seen any thing which is using the
> element that is passing int value to the serviceClient. Please Deepal
> point me to right link if missed any thing or let me know if you have any
> sample. This is little urgent for me.
>
> Thanks
> Venkatesh
>
>
> On Thu, Jun 20, 2013 at 6:10 PM, Deepal jayasinghe <deepalk@gmail.com>wrote:
>
>> You should be able to find the related stuff here -
>> http://blogs.deepal.org/2009/06/axis2-tutorials-and-articles.html
>>
>> Deepal
>>
>> Could you please let me know which element I have to use to send the int
>> value. I am trying from past several dayes to figure out which element will
>> take the int value. Please let me know the element name.
>>
>> Thanks
>> Venkatesh
>> On Jun 20, 2013 4:22 PM, "Deepal jayasinghe" <deepalk@gmail.com> wrote:
>>
>>> You cannot directly send 'int' value to ServiceClient, you can use one
>>> of the following:
>>> - Create a correct Axiom element
>>> - Use RPCServiceClient
>>>
>>> Deepal
>>> > Hi All,
>>> > I have one problem here. I am unable to find a method to send
>>> > int value to the service client. When i was sending the String value i
>>> > am getting the following error:
>>> >
>>> > The InnerException message was 'There was an error deserializing the
>>> > object of type System.Int32[].
>>> >
>>> > Thanks
>>> > Venkatesh
>>> >
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
>>> For additional commands, e-mail: dev-help@ws.apache.org
>>>
>>>
>>
>
[Attachment #3 (text/html)]
<div dir="ltr"><div><div><div><div><div><div>Hi All,<br></div> i am still \
not able to solve the problem. here i am sending the code. please let me know what is \
the problem.<br><br>public static String getMessageInfo(String fileId) throws \
AxisFault {<br> <br> String success = "true";<br> <br> \
RPCServiceClient sender = new RPCServiceClient();<br> Options opts = new \
Options();<br> int msgId = Integer.parseInt(fileId);<br> Object[] \
queryArgs = new Object[] {msgId};<br> logger.debug("STARTING OF getMessageInfo \
WEBSERVICE CALL ...");<br> opts.setTo(new EndpointReference(<br> \
"<a href="http://localhost:8080/LibraryService">http://localhost:8080/LibraryService</a>"));<br>
opts.setAction("<a \
href="http://standards.xxx.com/schemas/AddIn_1_0/ContentLibrary/GetMessageInfos">http: \
//standards.xxx.com/schemas/AddIn_1_0/ContentLibrary/GetMessageInfos</a>");<br> \
sender.setOptions(opts);<br> OMElement res = null;<br> \
logger.debug("getMessageInfo ALL RESPONSES:");<br> <br> <br> \
ArrayList<Integer> args = new ArrayList<Integer>();<br> \
args.add(msgId);<br> try {<br> logger.debug("Message ID : \
"+args.get(0) );<br> res = sender.invokeBlocking(new QName("<a \
href="http://standards.xxx.com/schemas/AddIn_1_0">http://standards.xxx.com/schemas/AddIn_1_0</a>", \
"GetMessageInfos"),queryArgs);<br> <br> \
logger.debug("getMessageInfo RESPONSE XML: " + res);<br> \
System.out.println(res);<br> } catch (Exception e) {<br> success = \
"false";<br> logger.error("GetStatus SOAP ERROR");<br> \
logger.error("GetStatus : " + e.getMessage());<br> }<br> \
logger.debug("END OF getMessageInfo WEBSERVICE CALL ...");<br> \
return success;<br> }<br></div>i am getting SOAP ERROR Value cannot be null.<br> \
<br></div>My call should be like this :<br><br><soapenv:Envelope \
xmlns:soapenv="<a \
href="http://schemas.xmlsoap.org/soap/envelope/">http://schemas.xmlsoap.org/soap/envelope/</a>" \
xmlns:van="<a href="http://standards.xxx.com/schemas/AddIn_1_0">http://standards.xxx.com/schemas/AddIn_1_0</a>" \
xmlns:arr="<a href="http://schemas.microsoft.com/2003/10/Serialization/Arrays">http://schemas.microsoft.com/2003/10/Serialization/Arrays</a>"><br>
<soapenv:Header/><br> <soapenv:Body><br> \
<van:GetMessageInfos><br> <!--Optional:--><br> \
<van:messageIds><br> <!--Zero or more repetitions:--><br> \
<arr:int>51</arr:int><br> </van:messageIds><br> \
</van:GetMessageInfos><br> \
</soapenv:Body><br></soapenv:Envelope><br><br></div>but with about method \
i am able to build like this<br><br><?xml version='1.0' \
encoding='UTF-8'?><br> <soapenv:Envelope xmlns:soapenv="<a \
href="http://schemas.xmlsoap.org/soap/envelope/">http://schemas.xmlsoap.org/soap/envelope/</a>"><br><soapenv:Body><br><GetMessageInfos \
xmlns="<a href="http://standards.xxx.com/schemas/AddIn_1_0">http://standards.xxx.com/schemas/AddIn_1_0</a>"><br>
<arg0 xmlns="">51</arg0><br></GetMessageInfos><br></soapenv:Body><br></soapenv:Envelope>"<br><br></div>this \
is giving me error. Could you people help me with this.<br><br><br></div> \
Thanks<br>Venkaesh<br><div><div><br><br><div><div><br><br></div></div></div></div></div><div \
class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jun 20, 2013 at 9:49 PM, \
Venkatesh Reddy Ravula <span dir="ltr"><<a href="mailto:rvr.venkatesh@gmail.com" \
target="_blank">rvr.venkatesh@gmail.com</a>></span> wrote:<br> <blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr"><div><div>Hi Deepal,<br></div> \
Thanks for your quick response and the links your have given. The link has really has \
excellent information. But i have gone through all the links but i have not seen any \
thing which is using the element that is passing int value to the serviceClient. \
Please Deepal point me to right link if missed any thing or let me know if you have \
any sample. This is little urgent for me.<br>
<br></div><div>Thanks<span class="HOEnZb"><font \
color="#888888"><br>Venkatesh<br></font></span></div></div><div class="HOEnZb"><div \
class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jun 20, \
2013 at 6:10 PM, Deepal jayasinghe <span dir="ltr"><<a \
href="mailto:deepalk@gmail.com" target="_blank">deepalk@gmail.com</a>></span> \
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<div>You should be able to find the related
stuff here -
<a href="http://blogs.deepal.org/2009/06/axis2-tutorials-and-articles.html" \
target="_blank">http://blogs.deepal.org/2009/06/axis2-tutorials-and-articles.html</a><span><font \
color="#888888"><br> <br>
Deepal<br>
</font></span></div><div><div>
<blockquote type="cite">
<p dir="ltr">Could you please let me know which element I have to
use to send the int value. I am trying from past several dayes
to figure out which element will take the int value. Please let
me know the element name.</p>
<p dir="ltr">Thanks<br>
Venkatesh<br>
</p>
<div class="gmail_quote">On Jun 20, 2013 4:22 PM, "Deepal
jayasinghe" <<a href="mailto:deepalk@gmail.com" \
target="_blank">deepalk@gmail.com</a>> wrote:<br type="attribution">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">
You cannot directly send 'int' value to ServiceClient, you can
use one<br>
of the following:<br>
- Create a correct Axiom element<br>
- Use RPCServiceClient<br>
<br>
Deepal<br>
> Hi All,<br>
> I have one problem here. I am unable to find a
method to send<br>
> int value to the service client. When i was sending the
String value i<br>
> am getting the following error:<br>
><br>
> The InnerException message was 'There was an error
deserializing the<br>
> object of type System.Int32[].<br>
><br>
> Thanks<br>
> Venkatesh<br>
><br>
<br>
<br>
---------------------------------------------------------------------<br>
To unsubscribe, e-mail: <a href="mailto:dev-unsubscribe@ws.apache.org" \
target="_blank">dev-unsubscribe@ws.apache.org</a><br>
For additional commands, e-mail: <a href="mailto:dev-help@ws.apache.org" \
target="_blank">dev-help@ws.apache.org</a><br> <br>
</blockquote>
</div>
</blockquote>
<br>
</div></div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic