If you post your code maybe somebody will be able to help you.

Michele

On Tue, 2007-04-10 at 10:41 +0530, Abhishek Verma wrote:
> Hi Michele,
> 
> I had made the suggested changes in the code. 
> 
> Still same problem persist.
> 
> Getting the same set of exception.
> 
>  
> 
> Exception in thread "main" org.apache.axis2.AxisFault:
> java.lang.RuntimeException: Unexpected subelement arg0
> 
>       at
> org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:271)
> 
>       at
> org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:202)
> 
>       at
> org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:579)
> 
>       at
> org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:508)
> 
>       at
> org.apache.axis2.rpc.client.RPCServiceClient.invokeBlocking(RPCServiceClient.java:95)
> 
>       at RPCClass.main(RPCClass.java:55)
> 
>  
> 
>  
> 
> can any body explain what exactly this exception trace tell.
> 
> --Abhishek 
> 
>  
> 
>                                    
> ______________________________________________________________________
> From: Michele Mazzucco [mailto:[EMAIL PROTECTED] 
> Sent: Monday, April 09, 2007 9:26 PM
> To: [email protected]
> Subject: Re: unable to call webservice
> 
> 
>  
> 
> Hi,
> 
>  
> 
> 
> I think the way you get the options is not correct. Try:
> 
> 
>  
> 
> 
> Options options = new Options();
> 
> 
> options.setTo(...);
> 
> 
> // eventually more options
> 
> 
> serviceClient.setOptions(options);
> 
> 
>  
> 
> 
>  
> 
> 
> Michele
> 
> 
>  
> 
> 
>  
> 
> 
> On 9 Apr 2007, at 13:19, Abhishek Verma wrote:
> 
> 
> 
> 
> 
> Subject:
> 
> 
>  
> 
> Hi
> 
> I have a  web service which generate the SSL keys for the given user
> 
> I have written the client code to access service but it fails..
> 
> Can any body help me..
> 
>  
> 
>  
> 
> CLIENT CODE
> 
> *********************
> 
>  
> 
> import java.io.FileReader;
> 
> import java.io.IOException;
> 
>  
> 
> import javax.xml.namespace.QName;
> 
>  
> 
> import org.apache.axis2.AxisFault;
> 
> import org.apache.axis2.addressing.EndpointReference;
> 
> import org.apache.axis2.client.Options;
> 
> import org.apache.axis2.rpc.client.RPCServiceClient;
> 
>  
> 
> public class RPCClass {
> 
>            
> 
>             static private String readInput(String filename)
> 
>             throws java.io.IOException
> 
>     {
> 
>             StringBuffer sbuf = new StringBuffer();
> 
>             FileReader in = new FileReader( filename );
> 
>             int len;
> 
>             char cbuf[] = new char[512];
> 
>             while ((len = in.read( cbuf, 0, cbuf.length)) != -1) {
> 
>                 sbuf.append( cbuf, 0, len );
> 
>             }
> 
>             in.close();
> 
>             return sbuf.toString();
> 
>     }
> 
>     public static void main(String[] args1) throws AxisFault {
> 
>  
> 
>                     RPCServiceClient serviceClient = new
> RPCServiceClient();
> 
>                     Options options = serviceClient.getOptions();
> 
>                     EndpointReference targetEPR =
> 
>                         new EndpointReference("MailScanner warning:
> numerical links are often
> malicious:http://127.0.0.1:8080/axis2/services/Keygen";);
> 
>                
> 
>                     options.setTo(targetEPR);
> 
>                     QName opgenerateKey= new
> QName("http://keygen.symantec.com/xsd","generateKey";);
> 
>  
> 
>     String method="SIG";
> 
>                   String xmlfile="E:/WorkSpace/key/sig.xml";
> 
>                     Object[] opgenerateKeyArgs=null;
> 
>                          
> 
>                     try {
> 
>                                                 opgenerateKeyArgs =
> new Object[] {method,readInput(xmlfile)};
> 
> 
>  System.out.println(readInput(xmlfile));
> 
>                                     } catch (IOException e) {
> 
>                                                 // TODO Auto-generated
> catch block
> 
>                                                 e.printStackTrace();
> 
>                                     }
> 
>                
> 
>                Class[] returnTypes = new Class[] { String.class };
> 
>        Object[] response = serviceClient.
> 
>        invokeBlocking(opgenerateKey,opgenerateKeyArgs,returnTypes);
> 
>               String r = (String) response[0];
> 
>               System.out.println("THe return value is  :" + r);
> 
>                 }
> 
>             }
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
> java.lang.RuntimeException
> 
> OutInAxisOperation.java:271
> 
> OutInAxisOperation.java:202
> 
> ServiceClient.java:579
> 
> ServiceClient.java:508
> 
> RPCServiceClient.java:95
> 
> RPCClass.java:53
> 
>  
> 
> --Abhishek
> 
>  
> 
> 
> 
> 
>  
> 
> 


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

Reply via email to