axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Deepal jayasinghe <deep...@gmail.com>
Subject Re: Windows Vista and Axis2
Date Wed, 19 Sep 2007 06:47:15 GMT
What is the application sever you are using ? if is is tomcat try to put
into common\lib or somewhere that your JSP can access. If you send me
your webapp then I might me able to help you.

Thanks
Deepal
> Hi All,
>  
> I'm trying to make a java or JSP client to invoke webservice. I'm
> using Axis2 and Windows Vista.
>  
> Few days ago I asked about Service Object throwing exception of Can
> not Initiliaze then Mr Deepal replied me that i was using Axis1 coding.
> Then I move on to Axis2 coding. But I'm having the same Issue with
> Axis2 as well.
>  
> I'm copying simple code and trying to access it but seems throwing
> exception where  i'm catching all exceptions with general "Exception"
> class. I know it is not a good practice but if i put AxisFault
> exception, I get Exception " Exception in thread "main"
> java.lang.NoClassDefFoundError: org.apache.axis2.AxisFault"
>  
> In general terms I have realize that *org.apache.axis2* 's every class
> is throwing an exception of *java.lang.NoClassDefFoundError *whereas I
> have pasted *axis2-kernel-1.2* into *jdk1.6.\jre\lib\ext*.
>  
> What do you think the problem is?
>  
>  
>  
> *Below is coding:*
> ** 
> ** 
> import org.apache.axiom.om.OMAbstractFactory;
> import org.apache.axiom.om.OMElement;
> import org.apache.axiom.om.OMFactory;
> import org.apache.axiom.om.OMNamespace;
> import org.apache.axis2.AxisFault;
> import org.apache.axis2.addressing.EndpointReference;
> import org.apache.axis2.client.Options;
> import org.apache.axis2.client.ServiceClient;
>
> public class EchoBlockingClient {
>         private static EndpointReference targetEPR = new
> EndpointReference("http://127.0.0.1:8080/axis2/services/Random");
>         public static void main(String[] args) {
>                 try {
>                         OMFactory fac = OMAbstractFactory.getOMFactory();
>                         OMNamespace ns =
> fac.createOMNamespace("http://soapinterop.org/", "ns1");
>                         OMElement payload =
> fac.createOMElement("echoString", ns);
>                         payload.setText("Hello!");
>                         Options options = new Options();
>                         ServiceClient client = new ServiceClient();
>                         options.setTo(targetEPR);
>                         client.setOptions(options);
>                         //Blocking invocation
>                         OMElement result = client.sendReceive(payload);
>                         System.out.println("Sent Hello, got : " +
> result.toString());
>                 } catch (Exception e) {
>                         
>                 }
>         }
> }
>
>  
>  
>
> ------------------------------------------------------------------------
> Kick back and relax with hot games and cool activities at the
> Messenger Café. Play now!
> <http://www.cafemessenger.com?ocid=TXT_TAGLM_SeptWLtagline>


-- 
Thanks,
Deepal
................................................................
"The highest tower is built one brick at a time"


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message