Re: Question on SOAPMonitor

2008-09-05 Thread Martin Wunderlich
Thanks a lot! So, it is port 5001 alright (in web.xml), but there is nothing 
using that port, even though the SoapMonitor is running. 
Strange...it must be something else then. 

Cheers, 

Martin


 Original-Nachricht 
> Datum: Fri, 5 Sep 2008 12:52:20 -0300
> Von: "robert lazarski" <[EMAIL PROTECTED]>
> An: axis-user@ws.apache.org
> Betreff: Re: Question on SOAPMonitor

> I just looked at the docs and its port 5001. I'm a linux guy so I
> suppose you'd open up a unix shell in a modern mac and type:
> 
> netstat -anp | grep 5001
> 
> HTH,
> Robert
> 
> On Fri, Sep 5, 2008 at 12:34 PM, Martin Wunderlich
> <[EMAIL PROTECTED]> wrote:
> > Hi Robert,
> >
> > Thanks a lot for the quick reply. Any idea on how can I check on Mac OS
> which ports are active?
> >
> > Cheers,
> >
> > Martin
> >
> >  Original-Nachricht 
> >> Datum: Fri, 5 Sep 2008 10:11:27 -0300
> >> Von: "robert lazarski" <[EMAIL PROTECTED]>
> >> An: axis-user@ws.apache.org
> >> Betreff: Re: Question on SOAPMonitor
> >
> >> This most often happens due to port issues. IIRC its 5401. Make sure
> >> nothing else is using the port. You can also try changing the port in
> >> web.xml.
> >>
> >> HTH,
> >> Robert
> >>
> >> On Fri, Sep 5, 2008 at 8:39 AM, Martin Wunderlich
> >> <[EMAIL PROTECTED]> wrote:
> >> > Hi there,
> >> >
> >> > I am trying to use the Axis2 SOAPMonitor to take a close look at the
> >> SOAP messages to and from my existing web service. I installed the the
> >> SOAPMonitor on Tomcat as per the instructions and it works fine when I
> go to
> >> http://localhost:8080/axis2/SOAPMonitor. However, if I want to use the
> monitor
> >> on my own web service (e.g. on
> >> http://localhost:8080/MyWebService/SOAPMonitor), the applet doesn't
> start. I have added the servlet configuration of my
> >> service's web.xml and also included the classes in the service's root
> >> directory.
> >> >
> >> > The request fails with the following msg:
> >> >
> >> > message Servlet SOAPMonitorService is not available
> >> > description The requested resource (Servlet SOAPMonitorService is not
> >> available) is not available.
> >> >
> >> >
> >> > Am I incorrectly assuming that I could use the Axis2 SoapMonitor to
> >> monitor any SOAP web service that I am running?
> >> >
> >> > Cheers,
> >> >
> >> > Martin
> >> > --
> >> > GMX startet ShortView.de. Hier findest Du Leute mit Deinen
> Interessen!
> >> > Jetzt dabei sein:
> >> http://www.shortview.de/[EMAIL PROTECTED]
> >> >
> >> > --
> >> > GMX startet ShortView.de. Hier findest Du Leute mit Deinen
> Interessen!
> >> > Jetzt dabei sein:
> >> http://www.shortview.de/[EMAIL PROTECTED]
> >> >
> >> > -
> >> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> > For additional commands, e-mail: [EMAIL PROTECTED]
> >> >
> >> >
> >>
> >> -
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >
> > --
> > GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen!
> > Jetzt dabei sein:
> http://www.shortview.de/[EMAIL PROTECTED]
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-- 
GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen!
Jetzt dabei sein: http://www.shortview.de/[EMAIL PROTECTED]

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



Re: Question on SOAPMonitor

2008-09-05 Thread Martin Wunderlich
Hi Robert, 

Thanks a lot for the quick reply. Any idea on how can I check on Mac OS which 
ports are active? 

Cheers, 

Martin

 Original-Nachricht 
> Datum: Fri, 5 Sep 2008 10:11:27 -0300
> Von: "robert lazarski" <[EMAIL PROTECTED]>
> An: axis-user@ws.apache.org
> Betreff: Re: Question on SOAPMonitor

> This most often happens due to port issues. IIRC its 5401. Make sure
> nothing else is using the port. You can also try changing the port in
> web.xml.
> 
> HTH,
> Robert
> 
> On Fri, Sep 5, 2008 at 8:39 AM, Martin Wunderlich
> <[EMAIL PROTECTED]> wrote:
> > Hi there,
> >
> > I am trying to use the Axis2 SOAPMonitor to take a close look at the
> SOAP messages to and from my existing web service. I installed the the
> SOAPMonitor on Tomcat as per the instructions and it works fine when I go to
> http://localhost:8080/axis2/SOAPMonitor. However, if I want to use the monitor
> on my own web service (e.g. on
> http://localhost:8080/MyWebService/SOAPMonitor), the applet doesn't start. I 
> have added the servlet configuration of my
> service's web.xml and also included the classes in the service's root
> directory.
> >
> > The request fails with the following msg:
> >
> > message Servlet SOAPMonitorService is not available
> > description The requested resource (Servlet SOAPMonitorService is not
> available) is not available.
> >
> >
> > Am I incorrectly assuming that I could use the Axis2 SoapMonitor to
> monitor any SOAP web service that I am running?
> >
> > Cheers,
> >
> > Martin
> > --
> > GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen!
> > Jetzt dabei sein:
> http://www.shortview.de/[EMAIL PROTECTED]
> >
> > --
> > GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen!
> > Jetzt dabei sein:
> http://www.shortview.de/[EMAIL PROTECTED]
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-- 
GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen!
Jetzt dabei sein: http://www.shortview.de/[EMAIL PROTECTED]

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



Question on SOAPMonitor

2008-09-05 Thread Martin Wunderlich
Hi there, 

I am trying to use the Axis2 SOAPMonitor to take a close look at the SOAP 
messages to and from my existing web service. I installed the the SOAPMonitor 
on Tomcat as per the instructions and it works fine when I go to 
http://localhost:8080/axis2/SOAPMonitor. However, if I want to use the monitor 
on my own web service (e.g. on http://localhost:8080/MyWebService/SOAPMonitor), 
the applet doesn't start. I have added the servlet configuration of my 
service's web.xml and also included the classes in the service's root 
directory. 

The request fails with the following msg: 

message Servlet SOAPMonitorService is not available
description The requested resource (Servlet SOAPMonitorService is not 
available) is not available.


Am I incorrectly assuming that I could use the Axis2 SoapMonitor to monitor any 
SOAP web service that I am running? 

Cheers, 

Martin
-- 
GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen!
Jetzt dabei sein: http://www.shortview.de/[EMAIL PROTECTED]

-- 
GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen!
Jetzt dabei sein: http://www.shortview.de/[EMAIL PROTECTED]

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



Re[2]: AxisFault: java.lang.reflect.InvocationTargetException when passing complex type to service

2006-05-08 Thread Martin Wunderlich
Hi Annette,

I turned that the problem was totally unrelated to Axis, but rather to
the Hibernate persistence layer that is working in the background of
my app. I had to include the Hibernate jar and its depedent libraries
in the Tomcat shared folder. I think it would be very unlikely that
your problem has the same cause.

Cheers,

Martin

> Hey Martin,

> I just stumbled on the same problem.
> Which jars did you have to include? I thought I had all of them, but then I
> can't be too sure ...

> Thanks,
> Annette





Re: AxisFault: java.lang.reflect.InvocationTargetException when passing complex type to service

2006-05-08 Thread Martin Wunderlich
Just a little update here: After some debugging I finally found the
root cause for this. I took a while to get to it, because I was
catching an Exception instead of Throwable and only the latter gave me
the real cause for my troubles. It turned out that it was some missing
Jars, which hadn't been copied over to the Tomcat directories from
Eclipse.

Cheers,

Martin


> Dear all,

> Having resolved one problem, I am now stuck with a new one.
> I have an Axis 1.3 web service deployed to Tomcat 5.5.4 running on
> Windows XP Pro. The web service offers several methods. One of these
> is returning a simple String and it works fine. Another method,
> which takes as input a complex type, will give me the following
> error when I invoke the call from the client:


> AxisFault
>  faultCode:
> {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
>  faultSubcode: 
>  faultString: java.lang.reflect.InvocationTargetException
>  faultActor: 
>  faultNode: 
>  faultDetail: 
> {http://xml.apache.org/axis/}hostname:Hermes
>  
> java.lang.reflect.InvocationTargetException




AxisFault: java.lang.reflect.InvocationTargetException when passing complex type to service

2006-05-08 Thread Martin Wunderlich
Dear all,

Having resolved one problem, I am now stuck with a new one.
I have an Axis 1.3 web service deployed to Tomcat 5.5.4 running on Windows XP 
Pro. The web service offers several methods. One of these is returning a simple 
String and it works fine. Another method, which takes as input a complex type, 
will give me the following error when I invoke the call from the client:


AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode: 
 faultString: java.lang.reflect.InvocationTargetException
 faultActor: 
 faultNode: 
 faultDetail: 
{http://xml.apache.org/axis/}hostname:Hermes
 
java.lang.reflect.InvocationTargetException
at 
org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:221)
at 
org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:128)
at 
org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
at 
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Unknown 
Source)
at 
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown
 Source)
at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
 Source)
at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
 Source)
at 
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown 
Source)
at 
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown 
Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown 
Source)
at 
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown 
Source)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:379)
at 
org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:424)
at 
org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
at org.apache.axis.client.Call.invokeEngine(Call.java:2765)
at org.apache.axis.client.Call.invoke(Call.java:2748)
at org.apache.axis.client.Call.invoke(Call.java:2424)
at org.apache.axis.client.Call.invoke(Call.java:2347)
at org.apache.axis.client.Call.invoke(Call.java:1804)
at 
mypackage.webservices.TermShareHandlerSoapBindingStub.register(TermShareHandlerSoapBindingStub.java:271)
at 
mypackage.webservices.TermShareClient.register(TermShareClient.java:76)
at 
mypackage.webservices.TermShareClientGUI.doRegister(TermShareClientGUI.java:619)
at 
mypackage.webservices.TermShareClientGUI.actionPerformed(TermShareClientGUI.java:600)
at 
javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
at 
javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
at 
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
at 
javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
at 
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:234)
at java.awt.Component.processMouseEvent(Component.java:5488)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
at java.awt.Component.processEvent(Component.java:5253)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3955)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3803)
at 
java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
at java.awt.Container.dispatchEventImpl(Container.java:2010)
at java.awt.Window.dispatchEventImpl(Window.java:1774)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at 
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at 
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)



The method "register" should take a User object and write it to a database. The 
relevant section of the WSDL is pasted below. I have also includ

Re[2]: Problems deploying with AdminClient

2006-05-07 Thread Martin Wunderlich
And at last I seem to found the reason for the disappearing web
service, albeit not the root cause. This post here
https://bugs.eclipse.org/bugs/show_bug.cgi?id=118673 gave me the idea
of checking the file WEB-INF/server-config.wsdd. And indeed, there was
no description of the deployed service at all! So, I copied over a
backup copy of this file, restartet the server and everything's working fine 
again.
I have
no idea, why the service description disappeared in the first place.
Might be related to the auto-deployment of the web-app using
(My)Eclipse.

CHeers,

Martin

> Testing a bit more I was able to successfully deploy a different web service 
> to a
> different location on the same Tomcat installation. Then I copied all
> the resources to a new project (in Eclipse), which I deployed to a new
> web-app and things seem to work there. So, at least I
> have the problem limited down now to the original service that I
> wanted to deploy. Still, it's puzzling...

> In the process, I happened to notice that the SOAPMonitor tool can
> only be used, if Tomcat is installed on port 8080. Is there a way to
> change the port to 80? It reverts back to 8080, even if I call the
> SOAPMonitor with http://localhost/

> Cheers,

> Martin




Re: Problems deploying with AdminClient

2006-05-06 Thread Martin Wunderlich
Testing a bit more I was able to successfully deploy a different web service to 
a
different location on the same Tomcat installation. Then I copied all
the resources to a new project (in Eclipse), which I deployed to a new
web-app and things seem to work there. So, at least I
have the problem limited down now to the original service that I
wanted to deploy. Still, it's puzzling...

In the process, I happened to notice that the SOAPMonitor tool can
only be used, if Tomcat is installed on port 8080. Is there a way to
change the port to 80? It reverts back to 8080, even if I call the
SOAPMonitor with http://localhost/

Cheers,

Martin

> Dear all,

> I have run into a very odd problem trying to deploy my web service
> using AdminClient. I create my wsdl and wsdd files without any
> problems. I also don't get any errors when I deploy the service using:

> "java -cp %AXISCLASSPATH%
> org.apache.axis.client.AdminClient -l http://localhost/
> deploy.wsdd"

> However, the service then simply isn't there. It doesn't show up in
> the list of services (only AdminService and Version do).
> This is even
> more awkward, since it was working fine this morning. I had the
> service running, went for lunch, and it
> somehow undeployed itself in the meantime. So, I tried to redeploy,
> but without any success so far. Any idea what the problem might be?

> Cheers,

> Martin



-- 
--
Martin Wunderlich, M.A.
Translation/Localisation EN <-> DE

 www.martinwunderlich.com
--
Free / open-source software for translation/localisation:
 www.martinwunderlich.com/foss-links.html
--
Random aphorism: 
 "Todas las cosas tienen su misterio, y la poesía es el misterio que tienen 
todas la cosas."
"All things have their secret. And poetry is the secret that all things have."
 - Federico García Lorca
--



Re[2]: Problems deploying with AdminClient

2006-05-06 Thread Martin Wunderlich
Hi Siamak,

Thanks a lot for the suggestion. I am still using Axis 1.3, so it
wouldn't be related to Axis 2, I guess.

Cheers,

Martin

> Hello Martin.


> As far as I know the AdminClient was used by Axis to deploy a service.
> With Axis2 the deploying has slightly changed.

> Please go through the User's Manual to see how to deploy a service.

> http://ws.apache.org/axis2/1_0/userguide.html

> You will see that you have some options:
> 1) create an aar-archive and put it in the WEB-INF/services directory of
> the axis2 webapp
> 2) create an aar-archive and upload it through the Administration UI
> 3) place the content of the aar-archive "unpacked" into the 
> WEB-INF/services/${YOUR_SERVICE} directory

> The third option is usefull if you have a lot jars placed in the 
> lib-directory of you service because the Axis2 ClassLoader is very slow
> while loading jars inside aars ;-)


> I hope I could help you,

> Siamak Haschemi





Problems deploying with AdminClient

2006-05-06 Thread Martin Wunderlich
Dear all,

I have run into a very odd problem trying to deploy my web service
using AdminClient. I create my wsdl and wsdd files without any
problems. I also don't get any errors when I deploy the service using:

"java -cp %AXISCLASSPATH%
org.apache.axis.client.AdminClient -l http://localhost/
deploy.wsdd"

However, the service then simply isn't there. It doesn't show up in
the list of services (only AdminService and Version do).
This is even
more awkward, since it was working fine this morning. I had the service 
running, went for lunch, and it
somehow undeployed itself in the meantime. So, I tried to redeploy,
but without any success so far. Any idea what the problem might be?

Cheers,

Martin




Re[2]: Server.userException and InvocationTargetException - what does it mean?

2006-04-20 Thread Martin Wunderlich
Thanks a lot to Vartan, Dies and Robert for your comments. I seem to
have missed Dies' message the first time round, so I am glad that
Robert took it up.

The situation as described by Dies is perfectly correct.
As for mapping Hibernate collections to arrays, I think I could
replace the existing set with arrays.
(the only limitation being this:
" Please note that Hibernate does not support bidirectional
one-to-many associations with an indexed collection (list, map or
array) as the "many" end, you have to use a set or bag mapping.").
In
this case however, I'd lose the code generation capabilities from the
Hibernate tool I'm working with, which for some reason assumes Set as
the default for collections.

I presume going down the adapter road might the most feasible. I have
some manager classes for the POJOs, which provide a facade to the
database (add, delete, update etc.). These classes could also serve as the 
adapters to convert the
WSDL2Java generated objects that are used on the client side to POJOs
used on the server side. I hope this makes sense, I don't really have that
much experience (as you may have guessed).

Cheers,

Martin

> I agree with dies - just one small caveat. I use hibernate with axis quite a
> bit:

> You can use xs:dateTime
>  with
> java.util.Calendar-
> its pretty easy to get from there to
> java.util.Date . Some databinding frameworks - JWSDP for example - support
> java.util.Date directly.

> The way I use Hibernate collections is to map them to Arrays. WSDL handles
> array well. java.util.List and java.util.Set works well in that regard
> directly via Collection.toArray() . For java.util.Map, I create a complex
> type that has an array each of the keys and values, and then just compare
> the size to make sure they're equal.

> For Hibernate based POJO's with lots of fields - you need to map one to one
> the POJO to a complex object. I typically do this in an Adapter.

> HTH,
> Robert
> http://www.braziloutsource.com/




Re[2]: Server.userException and InvocationTargetException - what does it mean?

2006-04-19 Thread Martin Wunderlich
Hello Vartan,

Thank you very much for your help and your suggestion.

In the meantime, I seem to have identified the root cause of my
problems and it seems to be on a conceptual level rather than a coding
level. Taking a closer a look at the classes generated by WSDL2Java I
noticed that the utility will also produce its own versions of any
objects (POJOs) that serve as complex type arguments. A number of
important changes are made there: final static constants are removed,
(de)serializers are added, java.util.Date get converted to Calendar
type, Sets are converted to object arrays.

This
is worsened by the fact that I am using Hibernate for the persistence
of these objects and they were auto-generated from the database. I am
a bit lost now how to deal with this situation. It seems that I have
to create and maintain two versions of the same object type, one for
the web service and one for the persistence layer or perhaps work with
some sort of adapter class, thereby tripling all the efforts. Seems like too 
much
maintenance hassle than I would want to deal with.

Are there any
established best practices for how to deal with such a situation?

Cheers,

Martin

> Hello Martin,

> Apologies in advance if the comment below is not addressing the
> right question


> I had to set a serializer and deserializer when passing a complex
> type or when expecting a complex type as a return value from a call.

> I did something like this on my call object:
> QName classQName = new QName("http://my.namespace";, "Foo");
> Class cl = Foo.class; 

> BeanSerializerFactory bsf = 
> new BeanSerializerFactory(cl, classQName);
> BeanDeserializerFactory bdf = 
> new BeanDeserializerFactory(cl, classQName);

> call.registerTypeMapping(cl, classQName, bsf, bdf);

> This was for expecting a Java Bean as a return value.  I saw a
> section about complex types that are not Java beans in the AXIS
> user's guide.  Look at the section "Encoding your Beans - the
> Bean Serializer".  Also see the section below it:
> "When Beans Are Not Enough - Custom Serialization".




Re: Server.userException and InvocationTargetException - what does it mean?

2006-04-17 Thread Martin Wunderlich
t; com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
>  Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
>  Source)
> at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown 
> Source)
> at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown 
> Source)
> at
> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
> at
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown 
> Source)
> at javax.xml.parsers.SAXParser.parse(SAXParser.java:379)
> at
> org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
> at
> org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
> at org.apache.axis.Message.getSOAPEnvelope(Message.java:424)
> at
> org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
> at
> org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
> at org.apache.axis.client.Call.invokeEngine(Call.java:2765)
> at org.apache.axis.client.Call.invoke(Call.java:2748)
> at org.apache.axis.client.Call.invoke(Call.java:2424)
> at org.apache.axis.client.Call.invoke(Call.java:2347)
> at org.apache.axis.client.Call.invoke(Call.java:1804)
> at
>
> com.mypackage.ServiceHandlerSoapBindingStub.register(ServiceHandlerSoapBindingStub.java:270)
> at
>
> com.mypackage.IServiceHandlerServiceTestCase.test1ServiceHandlerRegister(IServiceServiceTestCase.java:45)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at junit.framework.TestCase.runTest(TestCase.java:154)
> at junit.framework.TestCase.runBare(TestCase.java:127)
> at junit.framework.TestResult$1.protect(TestResult.java:106)
> at
> junit.framework.TestResult.runProtected(TestResult.java:124)
> at junit.framework.TestResult.run(TestResult.java:109)
> at junit.framework.TestCase.run(TestCase.java:118)
> at junit.framework.TestSuite.runTest(TestSuite.java:208)
> at junit.framework.TestSuite.run(TestSuite.java:203)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)


-- 
--
Martin Wunderlich, M.A.
Translation/Localisation EN <-> DE

 www.martinwunderlich.com
--
Free / open-source software for translation/localisation:
 www.martinwunderlich.com/foss-links.html
--
Random aphorism: 
 "Aquela reinspiração, sem a qual traduzir é apenas parafrasear noutra língua."
"That new inspiration - without which to translate merely means to paraphrase 
into another language."
 - Fernando Pessoa
--



Server.userException and InvocationTargetException - what does it mean?

2006-04-17 Thread Martin Wunderlich
Dear all,

I have deployed a couple of web services and I keep getting an exception
when calling one of them. I am calling two services. One takes as
input a String and returns a String. This one works just fine. Another one
takes as input a complex type (a Java bean) and has no return value.
This is the one that fails with the somewhat cryptic
exception give below (both are called using the auto-generated test
case). The web service's method
is called register() and basically meant to write a User object to a
database. Calling "getCause()" returns a null value. The object I pass in
looks fine. I can out.println() its values.

Could anyone give me a hint as to what this means? Thanks a lot in
advance.

Cheers,

Martin

AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode: 
 faultString: java.lang.reflect.InvocationTargetException
 faultActor: 
 faultNode: 
 faultDetail: 
{http://xml.apache.org/axis/}hostname:Hermes

java.lang.reflect.InvocationTargetException
at 
org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:221)
at 
org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:128)
at 
org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
at 
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Unknown 
Source)
at 
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown
 Source)
at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
 Source)
at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
 Source)
at 
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown 
Source)
at 
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown 
Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown 
Source)
at 
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown 
Source)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:379)
at 
org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:424)
at 
org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
at org.apache.axis.client.Call.invokeEngine(Call.java:2765)
at org.apache.axis.client.Call.invoke(Call.java:2748)
at org.apache.axis.client.Call.invoke(Call.java:2424)
at org.apache.axis.client.Call.invoke(Call.java:2347)
at org.apache.axis.client.Call.invoke(Call.java:1804)
at

com.mypackage.ServiceHandlerSoapBindingStub.register(ServiceHandlerSoapBindingStub.java:270)
at

com.mypackage.IServiceHandlerServiceTestCase.test1ServiceHandlerRegister(IServiceServiceTestCase.java:45)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)



Re[2]: Problem using deployed Axis web services

2006-04-14 Thread Martin Wunderlich
Thanks a lot, Dies, for your detailed explanation! I understand the
principles behind the workings of WSDL2Java much better now. This
whole thing has cost me the better part of an entire week. Then again,
it's my own fault for not having checked the actual method
implementation.
I'm off defining my interfaces now...

All the best,

Martin

> Hello Martin,

> WSDL2Java creates a template for the impl file for your convenience. All
> methods with a return value are generated with "return null;" or some 
> primitive value so that they compile. WSDL2Java will not copy the method
> body from your original class.

> Note that actually the idea when you start with a Java class is that you
> start with an interface (no method bodies), use Java2WSDL to generate a
> WSDL, then use WSDL2Java to generate the server-side interface and a 
> template in which you fill the method bodies.

> Although Java2WSDL allows you to specify a concrete class (not 
> interface) as input interface, it treats it as an interface (i.e. does
> not look at the methods' bodies, decompile them and copy the source into
> the generated impl file's method bodies).

> The WSDL defines the interface of your web service. Therefore, it is not
> strange to lose your method implementations in the Java->WSDL->Java 
> conversions.

> Regards,
> Dies




WSDL2Java deleting method implementations?

2006-04-12 Thread Martin Wunderlich
Dear all,

I have done a bit more experimenting (see my recent post) and the
behaviour of WSDL2Java, whereby method implementations are removed and
replaced by "return null", seems to be consitent. Is this the way it
should be? Am I missing something? Apparently, only the interface
definitions of the original Java class from which I create the web
service, are kept in the <...>SoapBindingImpl file. So, this means I
have recreated the method code after using WSDL2Java?

Cheers,

Martin



Re[5]: Problem using deployed Axis web services

2006-04-12 Thread Martin Wunderlich
Dear all,

Further to my recent problems with creating a simple web service and
getting only null values as return values (see below), I seem to have
located the problem.

WSDL2Java, which creates the required server-side files, doesn't seem
to implement the original method properly. In particular, the file
SoapBindingImpl.java, where the actual method implementation
is located, doesn't seem to be correct. For instance, I have the
following simple class:

package mypackage;

public class SayHello {
public java.lang.String hello(java.lang.String input) {
return ("Hello, " + input");
}
}

The class SayHelloSoapBindingImpl, which is created by WSDL2Java looks
like this:

package mypackage;

public class SayHelloSoapBindingImpl implements mypackage.SayHello{
public java.lang.String hello(java.lang.String input) throws 
java.rmi.RemoteException {
return null;
}

}

Note the hard-coded null value that is returned instead of the
original implementation of the method. If I change this incorrect
implementation, everything works fine.

Am I missing something here? It seems like a lot of unnecessary extra
work, if I have to recreate all the methods when I start building real web
services. I'd rather avoid that.

Cheers,

Martin


> Thanks for the hint. I've managed to generate the test client now.
> Everything works fine, except for validating the result I get. The
> returned String is still null (which confirms the results of my other
> method calls).

> I went again through the process of setting up the web service and
> generating the code. The only odd thing I noticed is with the
> interface for the Java class from which I want to build the service.
> The class would be something like myPackage.SayHello; The interface
> generated by WSDL2Java has the exact same name, which makes it kinda
> hard for the class and the interface to coexist. I don't know, if this
> could be relevant.

> Cheers,

> Martin

>> http://ws.apache.org/axis/java/reference.html

>> -t builds testClient

>>good luck,



>> -----Original Message-
>> From: [EMAIL PROTECTED]
>> [mailto:[EMAIL PROTECTED]
>> On Behalf Of Martin Wunderlich
>> Sent: Wednesday, April 05, 2006 3:57 PM
>> To: Jinyuan Zhou
>> Subject: Re[2]: Problem using deployed Axis web services

>> Thanks a lot for the quick replies, Jinyuan.

>> I checked WSDL2Java for the JUnit option you mentioned, but couldn't
>> find it.
>> As for the URL I call the web service with, it's a bit different from
>> the one you provided. I tried the following:
>> http://localhost/WSTest/services/SayHello2?method=hello&in0=Bla
>> and
>> http://localhost/WSTest/services/SayHello2?method=hello&in=Bla

>> Neither of this works.

>> I have also pasted the client code below. This only returns a null
>> value.

>> Cheers,

>> Martin



-- 
--
Martin Wunderlich, M.A.
Translation/Localisation EN <-> DE

 www.martinwunderlich.com
--
Free / open-source software for translation/localisation:
 www.martinwunderlich.com/foss-links.html
--
Random aphorism: 
 "La follia è una condizione umana. In noi la follia esiste ed è presente come 
lo è la ragione. Il problema è che la società, per dirsi civile, dovrebbe 
accettare tanto la ragione quanto la follia."
"Madness is a human condition. Madness is inside us as much as reason. The 
point is that a so called civil society should accept madness as much as 
reason."
 - Franco Basaglia
--



Re[4]: Problem using deployed Axis web services

2006-04-07 Thread Martin Wunderlich
Hi Gregg,

Thanks for the hint. I've managed to generate the test client now.
Everything works fine, except for validating the result I get. The
returned String is still null (which confirms the results of my other
method calls).

I went again through the process of setting up the web service and
generating the code. The only odd thing I noticed is with the
interface for the Java class from which I want to build the service.
The class would be something like myPackage.SayHello; The interface
generated by WSDL2Java has the exact same name, which makes it kinda
hard for the class and the interface to coexist. I don't know, if this
could be relevant.

Cheers,

Martin

> http://ws.apache.org/axis/java/reference.html

> -t builds testClient

>good luck,



> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]
> On Behalf Of Martin Wunderlich
> Sent: Wednesday, April 05, 2006 3:57 PM
> To: Jinyuan Zhou
> Subject: Re[2]: Problem using deployed Axis web services

> Thanks a lot for the quick replies, Jinyuan.

> I checked WSDL2Java for the JUnit option you mentioned, but couldn't
> find it.
> As for the URL I call the web service with, it's a bit different from
> the one you provided. I tried the following:
> http://localhost/WSTest/services/SayHello2?method=hello&in0=Bla
> and
> http://localhost/WSTest/services/SayHello2?method=hello&in=Bla

> Neither of this works.

> I have also pasted the client code below. This only returns a null
> value.

> Cheers,

> Martin




Re[2]: Problem using deployed Axis web services

2006-04-05 Thread Martin Wunderlich
Thanks a lot for the quick replies, Jinyuan.

I checked WSDL2Java for the JUnit option you mentioned, but couldn't
find it.
As for the URL I call the web service with, it's a bit different from
the one you provided. I tried the following:
http://localhost/WSTest/services/SayHello2?method=hello&in0=Bla
and
http://localhost/WSTest/services/SayHello2?method=hello&in=Bla

Neither of this works.

I have also pasted the client code below. This only returns a null
value.

Cheers,

Martin

> The generated code won't get Endpoint address right. Yours is 
> http://localhost/WSTest/services/SayHello2. 
> See if the following code or something simailar  can help:

> call.setTargetEndpointAddress( new
> java.net.URL("http://localhost/WSTest/services/SayHello2";) 

import javax.xml.rpc.ParameterMode;

import org.apache.axis.Constants;
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;

public class TestClient 
{
public static void main(String [] args) 
{
try 
{
String endpoint = 
"http://localhost/WSTest/services/SayHello2";;
Service  service = new Service();
Call call = (Call) service.createCall();

call.setTargetEndpointAddress( new 
java.net.URL(endpoint) );
call.setOperationName("hello");
call.addParameter( "in", Constants.XSD_STRING, 
ParameterMode.IN );
call.setReturnType( Constants.XSD_STRING );
String ret = (String) call.invoke( new Object[] { "bla" 
} );

System.out.println("return: " + ret);
} catch (Exception e) 
{
System.err.println(e.toString());
}   
}
}



Problem using deployed Axis web services

2006-04-05 Thread Martin Wunderlich
Dear all,

my first posting here, so please bear with me, in case I should break
any unwritten rules.

I am currently trying to get my first web services up and running on
Tomcat 5. I created a simple Java class to return a String:


public class SayHello2 
{
public String hello(String in)
{
return ("Hello, " + in);
}
}



From this class I created the WSDL with Java2Wsdl. I created the deployment 
descriptor using Wsdl2Java and deployed the whole thing using the Axis 
AdminClient. Finally, I compiled the resulting classes from step 2 and copied 
them to the directory that corresponds to the package name. 

The web service is listed together with the method in the list provided by 
Axis. However, I can not access the method, neither entering the direct URL 
(http://localhost/WSTest/services/SayHello2?in=bla), nor using the stub classes 
generated by Axis, nor using a org.apache.axis.client.Call. I am quite lost. 
Does anyone have any ideas what I could check? I've pasted the WSDL below, just 
in case there's any hint in there. (I can access this wsdl alright with 
http://localhost/WSTest/services/SayHello2?wsdl). 

Cheers, 

N. 



http://xml.apache.org/xml-soap"; xmlns:impl="urn:testPackage" 
xmlns:intf="urn:testPackage" 
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"; 
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; 
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema";>

 
   
 
  
 
   
 
   
 
  
 
   
 
   
 
  
 
 
 
 
 
  
 
   
 
   
 
  http://schemas.xmlsoap.org/soap/http"/>
 
  
 
 
 
 
 
http://schemas.xmlsoap.org/soap/encoding/"; 
namespace="urn:testPackage" use="encoded"/>
 
 
 
 
 
http://schemas.xmlsoap.org/soap/encoding/"; 
namespace="urn:testPackage" use="encoded"/>
 
 
 
  
 
   
 
   
 
      
 
 http://localhost/WSTest/services/SayHello2"/>
 
  
 
   
 




-- 
--
Martin Wunderlich, M.A.
Translation/Localisation EN <-> DE

 www.martinwunderlich.com
--
Free / open-source software for translation/localisation:
 www.martinwunderlich.com/foss-links.html
--
Random aphorism: 
 "Es ist ein Wunder, dass Neugier die Schulbildung überlebt."
"It is a miracle that curiosity survives formal education."
 - Albert Einstein
--