RE: getClass().getResource() in .aar?

2008-06-16 Thread Stephen Kilburn
It turns out that the problem was not with getResource() but with embedded
spaces in the returned resource string being converted to %20.  The
following code resolved it:

File propfile;
try {
propfile = new File(propUrl.toURI());
}
catch (URISyntaxException e) {
propfile = new File(propUrl.getPath());
}

An interesting and useful additional point emerged, which I will mention
just in case anyone ever runs into this sort of problem.  Because Axis2 is
running the class, the syntax:

propUrl = this.getClass().getResource("/myservice.properties");

looks in /webapps/axis2/WEB-INF/classes, not in the root of the
.aar.  Knowing this can be handy, as it allows a service aar to be updated
without resetting custom properties.  Not knowing it can be frustrating, for
obvious reasons.
_____
Stephen Kilburn, GeoPraxis Inc.


-Original Message-----
From: Stephen Kilburn [mailto:[EMAIL PROTECTED] 
Sent: June 9, 2008 22:15
To: axis-user@ws.apache.org
Subject: getClass().getResource() in .aar?

Hi,

I am attempting to embed a resource file in an Axis2 .aar, but haven't been
able to make this work.

I have been using the syntax:

URL propUrl = this.getClass().getResource("/myResource.properties");

This returns null.  I've tried putting the resource file in various places
in the .aar, but so far no joy.

I'm running this as a Spring application, BTW.  Not sure if that makes a
difference.

Am I missing something, or is there some special syntax I need to use to
make this work?  (I would be happy placing the properties outside the .aar
if that is easier.)

Thanks in advance for any replies.
_____________
Stephen Kilburn, GeoPraxis Inc.



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



getClass().getResource() in .aar?

2008-06-09 Thread Stephen Kilburn
Hi,

I am attempting to embed a resource file in an Axis2 .aar, but haven't been
able to make this work.

I have been using the syntax:

URL propUrl = this.getClass().getResource("/myResource.properties");

This returns null.  I've tried putting the resource file in various places
in the .aar, but so far no joy.

I'm running this as a Spring application, BTW.  Not sure if that makes a
difference.

Am I missing something, or is there some special syntax I need to use to
make this work?  (I would be happy placing the properties outside the .aar
if that is easier.)

Thanks in advance for any replies.
_________
Stephen Kilburn, GeoPraxis Inc.



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



RE: How to dump SOAP message contents?

2008-06-06 Thread Stephen Kilburn
Hi Satish,

 

Not quite what you are asking for, but are you aware of the following?

 

https://tcpmon.dev.java.net/

 

It’s absolutely invaluable for debugging.

 

_
Stephen Kilburn, GeoPraxis Inc.

 

From: satish madanwad [mailto:[EMAIL PROTECTED] 
Sent: June 6, 2008 09:18
To: axis-user@ws.apache.org
Subject: How to dump SOAP message contents?

 


Hi,

  I am using WebServices with Apache Axis in my programs. I have generated 
client stubs and can prepare and  send the WebService request properly.

  I am trying to dump SOAP message (XML format) which is sent to WebServer for 
processing (to examine exact message being sent). I am not able to find any 
APIs for the same.

  Can you please suggest, if there is any API to dump SOAP messages sent from 
Apache Axis to WebServer?

Thanks in advance,
Satish



 

  _  

Download prohibited? No problem. CHAT 
<http://in.rd.yahoo.com/tagline_webmessenger_1/*http:/in.messenger.yahoo.com/webmessengerpromo.php>
  from any browser, without download.



RE: Problem using Spring/ArrayList

2008-06-04 Thread Stephen Kilburn
Further on this problem.  After a bunch of experimenting I was getting weird
ClassCastException errors from my ArrayList (which I declared as 
and set with a bunch of string values.  I altered my client, adding the
following:

 

comments = result.getComments();

// (Check that the variable isn't null - it isn't and has one element.)

System.out.println("comments exists and is of type " + comments.getClass());

Object o;

o = comments.get(i);

System.out.println("comment " + i + " class is " + o.getClass());

 

This returned:

 

comments exists and is of type class java.util.ArrayList

comment 0 class is class org.apache.axiom.om.impl.llom.OMElementImpl  (?!?)

 

I'm concluding that for my ArrayList Axis2/Spring is calling the
setComments(ArrayList al) method but is populating the ArrayList without
converting the transport elements back into String first.

 

I have fallen back on using fixed arrays.  These are more hassle but they
work right now.

_____________
Stephen Kilburn, GeoPraxis Inc.

 

From: Stephen Kilburn [mailto:[EMAIL PROTECTED] 
Sent: June 4, 2008 16:40
To: axis-user@ws.apache.org
Subject: Problem using Spring/ArrayList

 

Hi,

 

I'm trying to use Axis2 1.4 Spring as a transport for objects containing an
ArrayList.  This is not working for me.

 

XP SP2/JDK1.6.0_06/Apache 2.2/Tomcat 5.5/Axis 2 1.4 using war install.

 

Using the WeatherSpringService example, I modify the Weather class to
contain ArrayList comments.  I add getter and setter methods.  I set
a comment.

 

Generated WSDL shows:

 



















 

When I execute the getWeather method the SOAP passed back shows:

 



it's nice now!

le matin

0.1

true

37.2



 

(i.e. the set value is being transported) 

 

During testing, I added a setComments(ArrayList cmt) function to the
bean.  Later on, I included the following line after setting the internal
variable:

 

comments.add("setComments(ArrayList) was called with an array sized " +
cmts.size());

 

This is set and says that the passed array was sized 0, so I conclude that
something in the transport is creating an ArrayList and attempting
to set the bean with it, but doesn't populate the ArrayList first.

 

Am I missing something here?  Has anyone made something like this work
successfully?  It would make my life easier if I could make this work.

_____
Stephen Kilburn
GeoPraxis Inc.

 



lib in .aar ignored?

2008-06-04 Thread Stephen Kilburn
In my testing of Spring, I added to the WeatherSpringService.aar the three
spring jars used by the service (spring-beans.jar, spring-context.jar,
spring-core.jar) in a /lib directory.  However, I get a NoClassDefFound
error using this approach.  It goes away if I drop the files into
axis2/WEB-INF/lib.

Does anyone have any advice?
_
Stephen Kilburn
GeoPraxis Inc.

Error: org.apache.axis2.deployment.DeploymentException: Error loading class
[org.apache.axis2.extensions.spring.receivers.ApplicationContextHolder] for
bean with name 'applicationContext' defined in class path resource
[applicationContext.xml]: problem with class file or dependent class; nested
exception is java.lang.NoClassDefFoundError:
org/springframework/context/ApplicationContextAware at
org.apache.axis2.deployment.repository.util.ArchiveReader.processServiceGrou
p(ArchiveReader.java:151) at
org.apache.axis2.deployment.ServiceDeployer.deploy(ServiceDeployer.java:81)
at
org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(Deploy
mentFileData.java:136) at
org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:
597) at
org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.jav
a:144) at
org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.jav
a:330) at
org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListe
ner.java:227) at
org.apache.axis2.deployment.DeploymentEngine.loadServices(DeploymentEngine.j
ava:131) at
org.apache.axis2.deployment.WarBasedAxisConfigurator.loadServices(WarBasedAx
isConfigurator.java:284) at
org.apache.axis2.context.ConfigurationContextFactory.createConfigurationCont
ext(ConfigurationContextFactory.java:82) at
org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.ja
va:511) at
org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:431) at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:11
39) at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966) at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:
3956) at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4230) at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:7
60) at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740) at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544) at
org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:831) at
org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:720) at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490) at
org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149) at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
t.java:120) at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022) at
org.apache.catalina.core.StandardHost.start(StandardHost.java:736) at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014) at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at
org.apache.catalina.core.StandardService.start(StandardService.java:448) at
org.apache.catalina.core.StandardServer.start(StandardServer.java:700) at
org.apache.catalina.startup.Catalina.start(Catalina.java:552) at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at
java.lang.reflect.Method.invoke(Unknown Source) at
org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295) at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433) Caused by:
org.apache.axis2.deployment.DeploymentException: Error loading class
[org.apache.axis2.extensions.spring.receivers.ApplicationContextHolder] for
bean with name 'applicationContext' defined in class path resource
[applicationContext.xml]: problem with class file or dependent class; nested
exception is java.lang.NoClassDefFoundError:
org/springframework/context/ApplicationContextAware at
org.apache.axis2.deployment.ServiceGroupBuilder.populateServiceGroup(Service
GroupBuilder.java:106) at
org.apache.axis2.deployment.repository.util.ArchiveReader.buildServiceGroup(
ArchiveReader.java:110) at
org.apache.axis2.deployment.repository.util.ArchiveReader.processServiceGrou
p(ArchiveReader.java:144) ... 37 more Caused by:
org.apache.axis2.deployment.DeploymentException: Error loading class
[org.apache.axis2.extensions.spring.receivers.ApplicationContextHolder] for
bean with name 'applicationContext' defined in class path resource
[applicationContext.xml]: problem with class file or dependent class; nested
exception is java.lang.NoClassDefFoundError:
org/springframework/context/ApplicationCo

Problem using Spring/ArrayList

2008-06-04 Thread Stephen Kilburn
Hi,

 

I'm trying to use Axis2 1.4 Spring as a transport for objects containing an
ArrayList.  This is not working for me.

 

XP SP2/JDK1.6.0_06/Apache 2.2/Tomcat 5.5/Axis 2 1.4 using war install.

 

Using the WeatherSpringService example, I modify the Weather class to
contain ArrayList comments.  I add getter and setter methods.  I set
a comment.

 

Generated WSDL shows:

 



















 

When I execute the getWeather method the SOAP passed back shows:

 



it's nice now!

le matin

0.1

true

37.2



 

(i.e. the set value is being transported) 

 

During testing, I added a setComments(ArrayList cmt) function to the
bean.  Later on, I included the following line after setting the internal
variable:

 

comments.add("setComments(ArrayList) was called with an array sized " +
cmts.size());

 

This is set and says that the passed array was sized 0, so I conclude that
something in the transport is creating an ArrayList and attempting
to set the bean with it, but doesn't populate the ArrayList first.

 

Am I missing something here?  Has anyone made something like this work
successfully?  It would make my life easier if I could make this work.

_________
Stephen Kilburn
GeoPraxis Inc.

 



RE: Clearing caching of WSDL

2008-06-01 Thread Stephen Kilburn
XP SP2, JDK1.6.0_06, Apache 2.2, Tomcat 5.5.

 

_
Stephen Kilburn, GeoPraxis Inc.

 

From: Martin Gainty [mailto:[EMAIL PROTECTED] 
Sent: June 1, 2008 22:21
To: [EMAIL PROTECTED]; axis-user@ws.apache.org
Subject: RE: Clearing caching of WSDL

 

Stephen-

not cached in WL
which platform are you using?

Martin
__ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official
business of Sender. This transmission is of a confidential nature and Sender
does not endorse distribution to any party other than intended recipient.
Sender does not necessarily endorse content contained within this
transmission. 


> From: [EMAIL PROTECTED]
> To: axis-user@ws.apache.org
> Subject: Clearing caching of WSDL
> Date: Sun, 1 Jun 2008 21:09:12 -0400
> 
> Hi folks,
> 
> I have been working on a POJO-based application to be run under Axis2.  (I
> am currently using release 1.4.)
> 
> I have encountered the following problem:  I compile the service using Ant
> to an .aar and deploy it (using code modified from the sample
> WeatherSpringService).  I am using a vanilla service.xml file and letting
> Axis2 do its magic and generate the WSDL.  This all works fine.  But then
I
> changed the name of one of the methods and added some others.  When I
> redeploy the service Axis2 listServices still lists the old method name
and
> none of the new methods are shown.  When I look at the WSDL it is correct
> for the old service.
> 
> I have confirmed that the new .aar has been deployed correctly, shut down
> and restarted Tomcat, (tried other variations like shutting down Tomcat,
> deleting the .aar, starting up Tomcat, then redeploying the .aar), shut
down
> and restarted Apache, and cleared the browser caches.  None of this has
> helped.  Shutting down Tomcat, deleting the Axis2 service, and
reinstalling
> the .war fixes this. I have concluded from the system behaviour that Axis2
> is caching its generated WSDL for the service somewhere and isn't deciding
> to do a cache refresh.  I have searched everywhere I imagine this
> information might be stored, but have been unsuccessful in finding it.
> 
> My questions are:  if I am not barking up the wrong tree, where is the
WSDL
> cached and how do I go about clearing this cache?
> _
> Stephen Kilburn
> GeoPraxis Inc.
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

  _  

Make every e-mail and IM count. Join the i
<http://im.live.com/Messenger/IM/Join/Default.aspx?source=EML_WL_%20MakeCoun
t> 'm Initiative from Microsoft.



Clearing caching of WSDL

2008-06-01 Thread Stephen Kilburn
Hi folks,

I have been working on a POJO-based application to be run under Axis2.  (I
am currently using release 1.4.)

I have encountered the following problem:  I compile the service using Ant
to an .aar and deploy it (using code modified from the sample
WeatherSpringService).  I am using a vanilla service.xml file and letting
Axis2 do its magic and generate the WSDL.  This all works fine.  But then I
changed the name of one of the methods and added some others.  When I
redeploy the service Axis2 listServices still lists the old method name and
none of the new methods are shown.  When I look at the WSDL it is correct
for the old service.

I have confirmed that the new .aar has been deployed correctly, shut down
and restarted Tomcat, (tried other variations like shutting down Tomcat,
deleting the .aar, starting up Tomcat, then redeploying the .aar), shut down
and restarted Apache, and cleared the browser caches.  None of this has
helped.  Shutting down Tomcat, deleting the Axis2 service, and reinstalling
the .war fixes this.  I have concluded from the system behaviour that Axis2
is caching its generated WSDL for the service somewhere and isn’t deciding
to do a cache refresh.  I have searched everywhere I imagine this
information might be stored, but have been unsuccessful in finding it.

My questions are:  if I am not barking up the wrong tree, where is the WSDL
cached and how do I go about clearing this cache?
_
Stephen Kilburn
GeoPraxis Inc.



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