Scott:

Thank you very much for your answers.
When my service dinamically tries to send the request (invoking) to other
Web Services, it fails because it doesn´t find none of the following
classes:

- Constants
- Parameter
- Fault
- Call
- Response

All of these classes belongs to org.apache.soap.rpc.*
When I compile this in my IDE Java it works well, but when it is running
in the Apache SOAP Server context (Server Side) it fails.
I read the article that you told me about the classloaders, but what
classes should I put in one of those directories ?

Thanks.

Max


On Fri, 30 Jan 2004 11:25:59 -0500, "Scott Nichol"
<[EMAIL PROTECTED]> said:
> > 3) Could you please tell me how I can put the classes in the class loader
> > of the server ?
> 
> Since you are making the Call from code that is running in the context of
> an Apache SOAP service, the classes *should* be available, and the
> instantiation of Call should work.
> 
> The exact set of classes available through class loaders depends on the
> J2EE container you are using.  With Tomcat, for example, the class
> loaders are documented (for version 4.1) at
> http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html.
> 
> For Apache SOAP services deployed in Tomcat, the classes are under the
> WEB-INF/classes directory for the soap webapp.  If that webapp was
> deployed the "simplest" way, the full path to the classes is
> $CATALINA_HOME/webapps/soap/WEB-INF/classes.
> 
> > I will explain you this interaction:
> > 
> > 1) A client sends some info (over Apache SOAP) to my Service.  (OK)
> > 2) My Service receives this call and saves the data internally.      (OK)
> > 3) My Service builds a new DOM Element and sends it to other services. 
> > (ERROR !)
> > 
> > I can't see the ERROR of this third step because the Client (step 1) uses
> > a servlet to invoke my 
> > Service and it internally invokes the other services. I know that my code
> > is not working well because I comment that line of the 
> > new Call ("Call call = new Call();") and it works (without calling the
> > services, of course).
> > How can I see that error ? 
> 
> If your service code does nothing to trap an exception, an exception
> thrown in the instantiation of Call will trace back on the stack into
> Apache SOAP code (within RPCRouterServlet, I believe) that will catch it
> and package it into a SOAP Fault that is returned to the client.  A
> common client coding practice is to check for a Fault and display its
> contents, which would have the info.
> 
> Further, the J2EE container will sometimes log Java exceptions, depending
> on the container and possibly the configuration of the container.
> 
> Scott Nichol
> 
> Do not send e-mail directly to this e-mail address,
> because it is filtered to accept only mail from
> specific mail lists.
> > 
> > Thanks
> > 
> > Maxi
> > 
> > 
> > 
> > 
> > On Fri, 30 Jan 2004 10:04:59 -0500, "Scott Nichol"
> > <[EMAIL PROTECTED]> said:
> > > Max: I am sending this directly to you as well as the list because my
> > > e-mails to the list are not showing up.
> > > 
> > > I have a number of comments.
> > > 
> > > 1. You do not need to register anything to [de-]serialize a Vector.  In
> > > fact, the BeanSerializer may do things you do not want it to do.
> > > 
> > > 2. Constants.NS_URI_LITERAL_XML is *not* the same as WSDL
> > > document/literal.  It is a custom encoding supported by Apache SOAP.  It
> > > will not allow you to use BeanSerializer, etc.  It only works with
> > > parameters that are DOM Element.
> > > 
> > > 3. What error do you get when you try to instantiate a Call?  You should
> > > be able to do this if you have the classes available in a class loader
> > > available to the server.
> > > 
> > > Scott Nichol
> > > 
> > > Do not send e-mail directly to this e-mail address,
> > > because it is filtered to accept only mail from
> > > specific mail lists.
> > > ----- Original Message ----- 
> > > From: "Maximiliano Barone" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Friday, January 30, 2004 9:51 AM
> > > Subject: Server-Side as a Client of other Web Service
> > > 
> > > 
> > > > Hi ! I am developing a Service that receives a call from a Client over
> > > > Apache SOAP like this:
> > > > 
> > > > CLIENT:
> > > > 
> > > > // Mapping registry
> > > >    SOAPMappingRegistry smr = new
> > > >    SOAPMappingRegistry();
> > > >    BeanSerializer beanSer = new BeanSerializer ();    
> > > >       
> > > >    smr.mapTypes(Constants.NS_URI_SOAP_ENC, new QName("urn:UpdateUsrWS",
> > > >    "UpdateUsr"), Vector.class, beanSer, beanSer);
> > > >             
> > > > // Build the call.
> > > >    Call call = new Call();
> > > >    call.setTargetObjectURI("urn:UpdateUsrWS");
> > > >    call.setMethodName("main");
> > > >    call.setEncodingStyleURI(Constants.NS_URI_LITERAL_XML);
> > > > 
> > > > 
> > > > The Server Side (MyService: UpdateUsrWS) receives some information from
> > > > the Client and invokes other Services over Apache SOAP too, so my Service
> > > > (Server-Side) acts as a client too.
> > > > The problem is that I am trying to create a new Call from my class and it
> > > > doesn't work.
> > > > 
> > > > 
> > > > SERVER (As a Client of other Web Services)
> > > > 
> > > > Call call = new Call();
> > > > 
> > > > Do you know if the SOAP Server supports this ?
> > > > Any suggestion ?
> > > > 
> > > > Thank you.
> > > > 
> > > > Max
> > > > 
> > > > 
> > > > 
> > > > -- 
> > > > http://www.fastmail.fm - Sent 0.000002 seconds ago
> > > >
> > 
> > -- 
> > http://www.fastmail.fm - Choose from over 50 domains or use your own
> >

-- 
http://www.fastmail.fm - Or how I learned to stop worrying and
                          love email again

Reply via email to