[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 = &quot;true&quot;;<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(&quot;STARTING OF getMessageInfo \
WEBSERVICE CALL ...&quot;);<br>        opts.setTo(new EndpointReference(<br>          \
&quot;<a href="http://localhost:8080/LibraryService">http://localhost:8080/LibraryService</a>&quot;));<br>
  opts.setAction(&quot;<a \
href="http://standards.xxx.com/schemas/AddIn_1_0/ContentLibrary/GetMessageInfos">http: \
//standards.xxx.com/schemas/AddIn_1_0/ContentLibrary/GetMessageInfos</a>&quot;);<br>  \
sender.setOptions(opts);<br>  OMElement res = null;<br>        \
logger.debug(&quot;getMessageInfo ALL RESPONSES:&quot;);<br>        <br>        <br>  \
ArrayList&lt;Integer&gt; args = new ArrayList&lt;Integer&gt;();<br>        \
args.add(msgId);<br>  try {<br>              logger.debug(&quot;Message ID : \
&quot;+args.get(0) );<br>            res = sender.invokeBlocking(new QName(&quot;<a \
href="http://standards.xxx.com/schemas/AddIn_1_0">http://standards.xxx.com/schemas/AddIn_1_0</a>&quot;, \
&quot;GetMessageInfos&quot;),queryArgs);<br>  <br>            \
logger.debug(&quot;getMessageInfo RESPONSE XML:  &quot; + res);<br>            \
System.out.println(res);<br>        } catch (Exception e) {<br>            success = \
&quot;false&quot;;<br>            logger.error(&quot;GetStatus SOAP ERROR&quot;);<br> \
logger.error(&quot;GetStatus : &quot; + e.getMessage());<br>        }<br>        \
logger.debug(&quot;END OF getMessageInfo WEBSERVICE CALL ...&quot;);<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>&lt;soapenv:Envelope \
xmlns:soapenv=&quot;<a \
href="http://schemas.xmlsoap.org/soap/envelope/">http://schemas.xmlsoap.org/soap/envelope/</a>&quot; \
xmlns:van=&quot;<a href="http://standards.xxx.com/schemas/AddIn_1_0">http://standards.xxx.com/schemas/AddIn_1_0</a>&quot; \
xmlns:arr=&quot;<a href="http://schemas.microsoft.com/2003/10/Serialization/Arrays">http://schemas.microsoft.com/2003/10/Serialization/Arrays</a>&quot;&gt;<br>
  &lt;soapenv:Header/&gt;<br>   &lt;soapenv:Body&gt;<br>      \
&lt;van:GetMessageInfos&gt;<br>         &lt;!--Optional:--&gt;<br>         \
&lt;van:messageIds&gt;<br>            &lt;!--Zero or more repetitions:--&gt;<br>      \
&lt;arr:int&gt;51&lt;/arr:int&gt;<br>  &lt;/van:messageIds&gt;<br>      \
&lt;/van:GetMessageInfos&gt;<br>   \
&lt;/soapenv:Body&gt;<br>&lt;/soapenv:Envelope&gt;<br><br></div>but with about method \
i am able to build like this<br><br>&lt;?xml version=&#39;1.0&#39; \
encoding=&#39;UTF-8&#39;?&gt;<br> &lt;soapenv:Envelope xmlns:soapenv=&quot;<a \
href="http://schemas.xmlsoap.org/soap/envelope/">http://schemas.xmlsoap.org/soap/envelope/</a>&quot;&gt;<br>&lt;soapenv:Body&gt;<br>&lt;GetMessageInfos \
xmlns=&quot;<a href="http://standards.xxx.com/schemas/AddIn_1_0">http://standards.xxx.com/schemas/AddIn_1_0</a>&quot;&gt;<br>
 &lt;arg0 xmlns=&quot;&quot;&gt;51&lt;/arg0&gt;<br>&lt;/GetMessageInfos&gt;<br>&lt;/soapenv:Body&gt;<br>&lt;/soapenv:Envelope&gt;&quot;<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">&lt;<a href="mailto:rvr.venkatesh@gmail.com" \
target="_blank">rvr.venkatesh@gmail.com</a>&gt;</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">&lt;<a \
href="mailto:deepalk@gmail.com" target="_blank">deepalk@gmail.com</a>&gt;</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, &quot;Deepal
        jayasinghe&quot; &lt;<a href="mailto:deepalk@gmail.com" \
target="_blank">deepalk@gmail.com</a>&gt;  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 &#39;int&#39; value to ServiceClient, you can
          use one<br>
          of the following:<br>
            - Create a correct Axiom element<br>
            - Use RPCServiceClient<br>
          <br>
          Deepal<br>
          &gt; Hi All,<br>
          &gt;          I have one problem here. I am unable to find a
          method to send<br>
          &gt; int value to the service client. When i was sending the
          String value i<br>
          &gt; am getting the following error:<br>
          &gt;<br>
          &gt; The InnerException message was &#39;There was an error
          deserializing the<br>
          &gt; object of type System.Int32[].<br>
          &gt;<br>
          &gt; Thanks<br>
          &gt; Venkatesh<br>
          &gt;<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