Apache SOAP
Working with the book Programming Web Services with SOAP and working on chapter 3.
Creating Web Services in Java with Apache SOAP
Wondering where do I add the Hello.java to the web server’s classpath if I am running Tomcat Server.
package samples;
public class Hello {
public String sayHello(String name) {
return "Hello " + name;
I’ve used the deployment descriptor to deploy the application on the server
<dd:service xmlns:dd="http://xml.apache.org/xml-soap/deployment" id="urn:Example1">
<dd:provider type="java"
scope="Application"
methods="sayHello">
<dd:java class="samples.Hello"
static="false" />
</dd:provider>
<dd:faultListener>
org.apache.soap.server.DOMFaultListener
</dd:faultListener>
<dd:mappings />
</dd:service>
Trying to run the client with the perl example client.
#!/usr/bin/perl -w
# hw_jclient.pl - java Hello client
use SOAP::Lite;
my $name = shift;
print "\n\nCalling the SOAP Server to say hello\n\n";
print "The SOAP Server says: ";
print SOAP::Lite
-> uri('urn:Example1')
-> proxy('http://localhost:8080/soap/servlet/rpcrouter James')
-> sayHello($name)
-> result . "\n\n"
but getting the result of
Calling the SOAP Server to say hello
The SOAP Server says: 404 /soap/servlet/rpcrouter%20James at C:\Documents and Se
ttings\Administrator\Desktop\test.pl line 7
What am I doing wrong or not doing?
Thanks,
John Cox
are you using axis or apache soap?
Similar Messages
-
Invocation of SOAP Sender Adapter using Apache SOAP
Hi,
I'm trying to invoke the XI SOAP Sender Adapter using the Apache SOAP API. It seems that my message header is missing a few parameters (see exception below). Does anybody know which to set?
Regards,
Heiko
==========
Exception:
<?xml version='1.0'?>
<!-- see the documentation -->
<SOAP:Envelope xmlns:SOAP='http://schemas.xmlsoap.org/soap/envelope/'>
<SOAP:Body>
<SOAP:Fault>
<faultcode>SOAP:Server</faultcode>
<faultstring>Server Error</faultstring>
<detail>
<s:SystemError xmlns:s='http://sap.com/xi/WebService/xi2.0'>
<context>XIAdapter</context>
<code>Exception</code>
<text><![CDATA[
com.sap.aii.af.mp.module.ModuleException
at com.sap.aii.af.mp.soap.ejb.XISOAPAdapterBean.process(XISOAPAdapterBean.java:502)
at com.sap.aii.af.mp.module.ModuleLocalLocalObjectImpl3.process(ModuleLocalLocalObjectImpl3.java:103)
at com.sap.aii.af.mp.ejb.ModuleProcessorBean.process(ModuleProcessorBean.java:227)
at com.sap.aii.af.mp.processor.ModuleProcessorLocalLocalObjectImpl0.process(ModuleProcessorLocalLocalObjectImpl0.java:103)
at com.sap.aii.af.mp.soap.web.MessageServlet.callModuleProcessor(MessageServlet.java:162)
at com.sap.aii.af.mp.soap.web.MessageServlet.doPost(MessageServlet.java:507)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:392)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:345)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:323)
at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:865)
at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:240)
at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:37)
at com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:71)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged1(Native Method)
at java.security.AccessController.doPrivileged(AccessController.java:321)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:95)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:159)
Caused by: java.lang.Exception: Bubble configuration error: parameter 'XI.InterfaceNamespace' is missing
at com.sap.aii.af.mp.soap.ejb.XISOAPAdapterBean.getParaRequired(XISOAPAdapterBean.java:895)
at com.sap.aii.af.mp.soap.ejb.XISOAPAdapterBean.createDefaultMessageHeader(XISOAPAdapterBean.java:942)
at com.sap.aii.af.mp.soap.ejb.XISOAPAdapterBean.setup(XISOAPAdapterBean.java:214)
at com.sap.aii.af.mp.soap.ejb.XISOAPAdapterBean.process(XISOAPAdapterBean.java:496)
... 22 more
]]></text>
</s:SystemError>
</detail>
</SOAP:Fault>
</SOAP:Body>
</SOAP:Envelope>Hi Heiko,
You are missing the Namespace Parameter in the sender soap adapter configuration in XI3.0
Thanks
Prasad -
Linkage Error when using Apache SOAP 2.2 with Weblogic 6.1
Has anyone seen this error before? Apparently I've got some incompatible versions of xerces being loaded. I tried putting different versions of xerces.jar in the front of my classpath, and creating an XML Registry to point to org.apache.xerces.jaxp..., but I always get the same error message.
D:\soap>java -classpath "/soap-2_2/lib/soap.jar;activation.jar;mail.jar;xerces.jar;." org.apache.soap.server.Servic
eManagerClient http://localhost:8001/App/servlet/rpcrouter list
Ouch, the call failed:
Fault Code = SOAP-ENV:Server.Exception:
Fault String = loader constraints violated when linking org/xml/sax/InputSource classHas anyone seen this error before? Apparently I've got some incompatible versions of xerces being loaded. I tried putting different versions of xerces.jar in the front of my classpath, and creating an XML Registry to point to org.apache.xerces.jaxp..., but I always get the same error message.
D:\soap>java -classpath "/soap-2_2/lib/soap.jar;activation.jar;mail.jar;xerces.jar;." org.apache.soap.server.Servic
eManagerClient http://localhost:8001/App/servlet/rpcrouter list
Ouch, the call failed:
Fault Code = SOAP-ENV:Server.Exception:
Fault String = loader constraints violated when linking org/xml/sax/InputSource class -
Package org.apache.soap does not exist
Hi,
I'm trying to deploy a webservice made out of stateless session bean.
When i run the service by invoking its method through browser then I get an exception as
Servlet error: Cannot generate Class:
package org.apache.soap does not exist
import org.apache.soap.Header;
-- It seems that the oc4j is not loading soap.jar under soap/lib
But when I add soap.jar to WEB-INF/lib then I get an exception as
java.lang.LinkageError: Class org/apache/soap/rpc/SOAPContext violates loader constraints
Which means soap.jar is loaded previosuly
The required classes are present in soap.jar
Can you please help me on this
Regards
~AnilYippee... problem solved... classpath setting problem
-
How to install Apache Soap in OC4J?
I used Soap in Tomcat an couple of weeks ago. I try to use Soap in OC4j. I can not find any instruction in soap web site. Could you please tell me if you know how to do it?
Thank you.
MarianHi,
to deploy the Apache SOAP (Axis I guess) you can do the following (this deployment is to the global application of OC4J):
Add to application.xml:
<web-module id="axis" path="C:\\TEMP\\xml-axis-alpha3\\webapps\\axis" />
Add to http-web-site.xml or default-web-site.xml (depending if you are running 1.0.2.2 or the pre-release of OC4J v2.0):
<web-app application="default" name="axis" root="/axis" />
You can now access the app using the following URL: http://localhost:8888/axis
Thanks,
Andy -
Authentication and EJB Providers in Apache SOAP 2.0
Has anyone tried to modify the latest Apache SOAP code to pass the rpcrouter
servlet Basic Authentication information (from HTTPSession) on to the JNDI
initial context in the Stateless Session EJB Provider code (i.e. impersonate
the authenticated http user for EJB calls)? I am thinking about allowing
SOAP users to inherit the EJB deployment descriptor access control setup.
Dan MeanyWith the link attached.
Hi Denes, This is a configuration for configuring mod_auth_sspi on Apache 2.2 (and proxy to the EPG) I haven't tried 2.0 but I'm pretty sure it should work in the same way.
Re: NTLM Authentication
Rob.. -
Hi.
What do you do when you're making a call to a webservice with
org.apache.soap.rpc.Calland it just plain hangs on the Call.Invoke() method?
-pfvHi.
What do you do when you're making a call to a webservice with
org.apache.soap.rpc.Calland it just plain hangs on the Call.Invoke() method?
-pfv -
"invalid request" when calling Apache Soap 2.2 webservice using 8.1.1
I have tried setting soap-style to RPC as advised in the documentation but keep
getting this same error. Server is Apache Soap 2.2. Another test client using
Apache Soap 2.3.1 got the same error. I am trying to call a webservice in a WLI
process flow. I have generated the web service control from the wsdl. Error follows:
<01-Oct-2003 11:04:04 o'clock EST> <Warning> <WLW> <000000> <Id=bank_so_11; Meth
od=processes.bank_so_1.GetNextAccountNumber(); Failure=com.bea.control.ServiceCo
ntrolException: SOAP-ENV:Clientinvalid request>
<01-Oct-2003 11:04:04 o'clock EST> <Warning> <WLW> <000000> <Id=top-level; Metho
d=processes.TestWSBank_wf.$__clientRequest(); Failure=com.bea.wli.bpm.runtime.Un
handledProcessException: Unhandled process exception [ServiceException]>
<01-Oct-2003 11:04:04 o'clock EST> <Error> <WLW> <000000> <Failure=com.bea.wli.b
pm.runtime.UnhandledProcessException: Unhandled process exception [ServiceExcept
ion]>Hi Jerry,
There is not much to go on here to help solve your problem. Can you
successfully invoke the external service from Workshop's Test View? If
this works OK you might ask your question to the integration newsgroup
and see if they have some insight:
http://newsgroups.bea.com/cgi-bin/dnewsweb?cmd=xover&group=weblogic.developer.interest.integration
Hope this helps,
Bruce
Jerry Shea wrote:
>
I have tried setting soap-style to RPC as advised in the documentation but keep
getting this same error. Server is Apache Soap 2.2. Another test client using
Apache Soap 2.3.1 got the same error. I am trying to call a webservice in a WLI
process flow. I have generated the web service control from the wsdl. Error follows:
<01-Oct-2003 11:04:04 o'clock EST> <Warning> <WLW> <000000> <Id=bank_so_11; Meth
od=processes.bank_so_1.GetNextAccountNumber(); Failure=com.bea.control.ServiceCo
ntrolException: SOAP-ENV:Clientinvalid request>
<01-Oct-2003 11:04:04 o'clock EST> <Warning> <WLW> <000000> <Id=top-level; Metho
d=processes.TestWSBank_wf.$__clientRequest(); Failure=com.bea.wli.bpm.runtime.Un
handledProcessException: Unhandled process exception [ServiceException]>
<01-Oct-2003 11:04:04 o'clock EST> <Error> <WLW> <000000> <Failure=com.bea.wli.b
pm.runtime.UnhandledProcessException: Unhandled process exception [ServiceExcept
ion]> -
Hi I wanted to know which websites have Apache SOAP webservices which we can write a client for in java and implement
First, it shouldn't matter whether they're running apache or not - that's the point of web services. Second, IBM and Microsoft have UDDI sites that list various web services. One public one I know of is google's. Is this for school?
-
Apache SOAP 2.2 and WL 6.1
When trying to use Apache SOAP 2.2 with WL Server 6.1, I get the following error
when attempting a call.invoke():
"Unable to resolve namespace 'SOAPSDK3'"
I can successfully make the SOAP call using a stand-alone application (not inside
weblogic). I found the following FAQ which described the same problem for WL
Server 6.1 (beta):
http://xml.apache.org/soap/faq/faq-for-WL6.1beta.html
I have not been able to get a working solution though. The XML Registry was already
setup as described, using the org.apache.xerces.*. I also put xerces.jar in front
of weblogic.jar in the WL Classpath (not sure if this would have any effect).
Originally, I had put XERCES 1.3.1 there and had no problem starting WL, but
got the same error as before - Unable to resolve namespace 'SOAPSDK3'. When I
placed another version of XERCES, namely 1.4.3 - I could not even start WL properly,
it crapped out with a memory exception and quit the JVM. I read on WL docs that
XERCES 1.3.1 is required and you cannot put another version in front of the weblogic.jar,
otherwise you have problems (they were right on that one). Here are the WL docs:
http://e-docs.bea.com/wls/docs61/faq/xml.html
So, I'd be interested to see if you anyone has suggestion as to what I might try.
It appears that I MUST use XERCES 1.3.1, but when I put the in front of weblogic.jar
I don't solve the problem. If you know of anything I might try, please let me
know. Thanks.
Configuration:
WL 6.1 on Windows 2000 - application inside EAR file.
SOAP Client - Apache SOAP 2.2
SOAP Server - MS SOAP Toolkit (ISAPI - VB dll)
Christopher Hurley
Tallán, Inc.
[email protected]
cell 201.739.2194Don't know whether below is related to your problem:
https://discussions.apple.com/thread/4831752?tstart=0 -
Synchronous BPEL process calling apache soap 2.3.1 service(s) on jboss
I have a problem that is quite frustratiing. I have a very simple synchronous BPEL process and I am trying to invoke some legacy services we have deployed using Apache soap 2.3.1 running on jboss. The process executes, the service executes, but the return value is not received by the BPEL process.
I used obtunnel to capture the data flow and everything seems fine from that perspective. The problem is, if you watch the monitor, the status says active, but the BPEL process returns immediately. It does not wait for the response, so the return value winds up being null. I have tried this numerous times with several services and the result is always the same. This is a serious problem for us. Any suggestions/insight would be very much appreciated.
Ina case there are any doubts as to whether or not it is actually a synchronous process, from the BPEL code:
<!--
Oracle JDeveloper BPEL Designer
Created: Wed Apr 18 13:19:50 EDT 2007
Author: bmurray
Purpose: Synchronous BPEL Process
-->
Below is an example from obtunnel:
==============
Listen Port: 5678
Target Host: pian.wlgore.com
Target Port: 8080
==== Request ====
POST /soap/servlet/rpcrouter HTTP/1.1
Host: pian.wlgore.com:5678
Connection: TE
TE: trailers, deflate, gzip, compress
User-Agent: Oracle HTTPClient Version 10h
SOAPAction: "http://vitalstream.com/webservices/Authenticate"
Accept-Encoding: gzip, x-gzip, compress, x-compress
Content-type: text/xml; charset=UTF-8
Content-length: 829
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<env:Body>
<ns0:Authenticate xmlns:ns0="http://vitalstream.com/webservices">
<strAccount xmlns:def="http://www.w3.org/2001/XMLSchema" xsi:type="def:string">testvar3</strAccount>
<strToken xmlns:def="http://www.w3.org/2001/XMLSchema" xsi:type="def:string">testvar1</strToken>
<strReferrer xmlns:def="http://www.w3.org/2001/XMLSchema" xsi:type="def:string">testvar4</strReferrer>
<strSourceURL xmlns:def="http://www.w3.org/2001/XMLSchema" xsi:type="def:string">testvar</strSourceURL>
<strClientIP xmlns:def="http://www.w3.org/2001/XMLSchema" xsi:type="def:string">testvar2</strClientIP>
</ns0:Authenticate>
</env:Body>
</env:Envelope>==== Response ====
HTTP/1.1 200 OK
X-Powered-By: Servlet 2.4; Tomcat-5.0.28/JBoss-4.0.1sp1 (build: CVSTag=JBoss_4_0_1_SP1 date=200502160314)
Set-Cookie: JSESSIONID=C656EEE6B641F23F02D6E5BE79CD2A4D.ajp13w; Path=/soap
Content-Type: text/xml;charset=utf-8
Content-Length: 480
Date: Wed, 18 Apr 2007 18:34:19 GMT
Server: Apache-Coyote/1.1
<?xml version='1.0' encoding='UTF-8'?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<ns1:AuthenticateResponse xmlns:ns1="http://vitalstream.com/webservices" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<return xsi:type="xsd:int">1</return>
</ns1:AuthenticateResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
==============
As you can see, the value is indeed returned from the service, but BPEL indicates a null value for the return:
<messages><Invoke_1_Authenticate_InputVariable><part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="strSourceURL"><strSourceURL xmlns="" xmlns:def="http://www.w3.org/2001/XMLSchema" xsi:type="def:string" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">testvar</strSourceURL>
</part><part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="strToken"><strToken xmlns="" xmlns:def="http://www.w3.org/2001/XMLSchema" xsi:type="def:string" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">testvar1</strToken>
</part><part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="strAccount"><strAccount xmlns="" xmlns:def="http://www.w3.org/2001/XMLSchema" xsi:type="def:string" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">testvar3</strAccount>
</part><part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="strClientIP"><strClientIP xmlns="" xmlns:def="http://www.w3.org/2001/XMLSchema" xsi:type="def:string" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">testvar2</strClientIP>
</part><part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="strReferrer"><strReferrer xmlns="" xmlns:def="http://www.w3.org/2001/XMLSchema" xsi:type="def:string" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">testvar4</strReferrer>
</part></Invoke_1_Authenticate_InputVariable><Invoke_1_Authenticate_OutputVariable><part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Result">null</part></Invoke_1_Authenticate_OutputVariable></messages>Did you specify the correct message type for your return variable?
<Invoke_1_Authenticate_OutputVariable>
<part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Result">
null
</part>
</Invoke_1_Authenticate_OutputVariable>
As is returns:
<ns1:AuthenticateResponse
xmlns:ns1="http://vitalstream.com/webservices" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<return xsi:type="xsd:int">1</return>
</ns1:AuthenticateResponse>
Regards,
Marc -
Exception while handling service request: org/apache/soap/Envelope
Hi all,
i´ve tried to run a message style webservice .
Now i always get following Error: Exception while handling service request: org/apache/soap/Envelope
Can anyone tell me what i should do?
I use Bea 6.1 and Apache Soap 2.2
I have deployed the Webservice and when i try to run the samples in apache all
works fine.
Thank you very much!!found the problem.
I use apache soap with tomcat 5.5.9
wrong: place the class file in a jar in the common/lib folder of tomcat
wright: place the class file in the directory webapps/soap/web-inf/classes
an other problem is when the method not exist -
Hi,
Has anyone tried to develop/deploy a web service under WSDP and invoke it from a client app written under Apache SOAP-RPC? Can this be done w/ or w/o 'axis'
from Apache-SOAP?
Thanks,
Marciayes, this can be done ...and even vice versa.
This is just a soap call and it dees not matter from where it is called.
Generate the webservice and deploy it. Use the WSDL generated to create the client with Apache Soap. Point to the end point URL for the webservice made with JAX-RPC.
I tried by creating a webservice with Apache Soap-RPC and accessing through the client made with Jax-RPC.
regards -
Trying to invoke Apache SOAP 2.3.1 RPC services
I have several legacy apache SOAP 2.3.1 RPC services I am trying to invoke using a synchronous BPEL process. The services are invoked (confirmed by tailing the log on the machine hosting the service) , however, the return value is null in all cases.
I used the snoop utility and I verified a response is indeed being returned, so I am perplexed as to why BPEL is not able to interpret the response.
Any help/ideas would be appreciated as I would prefer not to have to rewrite these services.
Thanks,
RMDid you specify the correct message type for your return variable?
<Invoke_1_Authenticate_OutputVariable>
<part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Result">
null
</part>
</Invoke_1_Authenticate_OutputVariable>
As is returns:
<ns1:AuthenticateResponse
xmlns:ns1="http://vitalstream.com/webservices" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<return xsi:type="xsd:int">1</return>
</ns1:AuthenticateResponse>
Regards,
Marc -
Apache SOAP with websphere 6.1
I want to use Apache SOAP in websphere 6.1 since we will be reusing the framework developed already using Apache SOAP.This has been implemented only with weblogic previously.
Now we are trying to use this in combination with websphere 6.1,Is this supported?How to proceed?Hi Thierry,
When we wrote the web services layer for BEA we purposefully left out
stateful session beans and entity beans because they did not match the
"services" model and there is no standard way to keep the state between
calls to the service. I believe the Apache implementation uses the HTTP
session for this behaviour. I don't know what the problem is with the
Apache SOAP implementation but I can try and help you either 1) use a
stateless session bean to call your sfsb, or 2) convince me that stateful
beans implemented outside the web services standard is something BEA should
support.
Sam
"Thierry Janaudy" <[email protected]> wrote in message
news:[email protected]..
Hello,
I wanted to use BEA's implementation of SOAP, but the problem is that you
cannot call SFSB.
Therefore I tried to install and run Apache SOAP (Which provides a service
for SLSB, SFSB, EB).
However, you I try to remotely list the services through:
java -cp %CP% org.apache.soap.server.ServiceManagerClient
http://localhost:7001/soap/servlet/rpcrouter list
I always get
Exception in thread "main" java.lang.NoSuchMethodError
at org.apache.soap.util.xml.QName.<init>(QName.java:80)
at org.apache.soap.util.xml.QName.matches(QName.java:146)
at org.apache.soap.Envelope.unmarshall(Envelope.java:237)
at org.apache.soap.rpc.Call.invoke(Call.java:230)
at
org.apache.soap.server.ServiceManagerClient.invokeMethod(ServiceManagerClien
t.java:129)
at
org.apache.soap.server.ServiceManagerClient.list(ServiceManagerClient.java:1
51)
at
org.apache.soap.server.ServiceManagerClient.main(ServiceManagerClient.java:2
37)
Do you have any idea why?
Thx -
Apache SOAP 2.2 - Weblogic 6.1SP2
Hi,
Has anyone managed to get Apache SOAP working with Weblogic 6x?
I can get everything up and running, but for some reason the classloader
for the web application (ie; the actual Apache SOAP app) doesn't load the
classes in my jar file containing the EJB files, serializers, etc.
Therefore whenever I make a SOAP request I get a server side error reported
via SOAP that some class or another (one of my own ones) cannot be found.
I can cure this by sticking my jar file in the server's classpath - however
this isn't great as it means the JVM's classloader is picking everything up
and I lose the ability to redeploy.
Any ideas? In the absence of any other information it would seem that
Weblogic's classloaders are buggy...
Cheers,
TrevHi Trev,
Let's recap here:
1. You are deploying the .war file for Apache SOAP, into WLS 6.1 SP2, right? If
yes, you copied the .war file into the $WL_HOME/config/examples/applications directory,
or something similar, right?
2. It (some class or classes in soap.war) couldn't find the classes for your EJB
so, you "unwarred" it, created a WEB-INF/lib directory, and copied the .jar for
your EJB into that directory. Then you re-jarred the soap.war, right? If so, did
you put a <ejb-ref> element in the web.xml (for soap.war), so it (the SOAP webapp)
would know about the ejb?
The <ejb-ref> should look something like this:
<ejb-ref>
<description></description>
<ejb-ref-name>examples.webservices.security.PhoneBookService</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>examples.webservices.security.PhoneBookServiceHome</home>
<remote>examples.webservices.security.PhoneBookService</remote>
</ejb-ref>
You'd also need to create a WEB-INF/weblogic.xml file and put something like this
in it:
<reference-descriptor>
<ejb-reference-description>
<ejb-ref-name>examples.webservices.security.PhoneBookService</ejb-ref-name>
<jndi-name>examples.webservices.security.PhoneBookService</jndi-name>
</ejb-reference-description>
</reference-descriptor>
But, I would do any of this because your EJB doesn't have "diddly squat" to do
with Apache SOAP ;-) The Apache SOAP web app is a "standalone" thing, right? You
want to use your EJB "with it", not be part "of it" right? Exactly! So, let's
abandon that route...
3. Next, you tried to turn the Apache SOAP Web Application (.war) into the Apache
SOAP Enterprise Application (.ear). I'm assuming that you created a META-INF/application.xml
that looked something like this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE application PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application
1.2//EN' 'http://java.sun.com/j2ee/dtds/application_1_2.dtd'>
<application>
<display-name>Apache SOAP 2.2</display-name>
<module>
<web>
<web-uri>soap.war</web-uri>
<context-root>/soap</context-root>
</web>
</module>
<module>
<ejb>{name of the .jar for your ejb}</ejb>
</module>
</application>
But, you didn't create the <ejb-ref> stuff in #2 above. Again, I don't think it
makes a lot of sense to put "your EJB" in the "Apache SOAP" Enterprise application
What's going on here (the Apache SOAP code not being able to find your EJB classes)
is "expected behavior" as far as the BEA docs go. Everyone I know (including me!)
that deploys the Apache SOAP web app in WebLogic, creates a .jar that contains
a copy of all the remote (and home) interface classes that the rpcrouter servlet
will call, and puts this in the -classpath used to start WebLogic. That way, it
(the Apache SOAP web app) will be able to find them. I don't put the jar for the
EJB in the -classpath, though. To be honest, I don't use Apache SOAP because it
doesn't support WSDL yet ;-)
Regards,
Mike Wooten
"ts" <[email protected]> wrote:
Hi Mike,
Cheers for the response. I've read the documentation you've linked to
and I
understand how WLS performs class loading.
However, the documentation implies that I could either;
A) Package the SOAP war file together with my EJB jar file in an EAR
file
and deploy, and the SOAP web app would subsequently be able to reference
classes/beans. (Ref: "Although you could deploy the .war and .jar files
separately, deploying them together in an .ear file produces a classloader
arrangement that allows the servlets and JSPs to find the EJB classes.")
B) Simply place my EJB jar file in the WEB-INF\lib subdirectory of the
deployed SOAP web app. (Ref: J2EE specification).
In fact, neither of these work, and I am forced to include the EJB jar
in
the server's classpath.
Surely theres some kind of problem here?
Cheers,
Trev
"Michael Wooten" <[email protected]> wrote in message
news:[email protected]...
Hi Trev,
Technically, this is not so much an issue with the classloader(s) inWLS,
as it
is with J2EE packaging. WLS uses a pretty sophisticated, hierarchicalclass loading
architecture. The main reason for using this approach, was to supportundeploying/redeploying
J2EE components (i.e. Servlets, EJBs) without shutting down the JVM.
What you are encountering is a phenomena where Apache SOAP is deployedas
a Web
Application, with it's own ServletContext and classloader.
See the following links for specifics on class loading and J2EE packagingin WLS:
http://e-docs.bea.com/wls/docs60/programming/packaging.html#1048725
After reading this, you will see why the classloader associated withthe
Apache
SOAP web app, cannot see the classes (i.e. serializer, EJBs, etc.)you are
using
to implement your web service.
Regards,
Mike Wooten
"ts" <[email protected]> wrote:
Hi,
Has anyone managed to get Apache SOAP working with Weblogic 6x?
I can get everything up and running, but for some reason the classloader
for the web application (ie; the actual Apache SOAP app) doesn't load
the
classes in my jar file containing the EJB files, serializers, etc.
Therefore whenever I make a SOAP request I get a server side error
reported
via SOAP that some class or another (one of my own ones) cannot befound.
I can cure this by sticking my jar file in the server's classpath-
however
this isn't great as it means the JVM's classloader is picking everything
up
and I lose the ability to redeploy.
Any ideas? In the absence of any other information it would seem that
Weblogic's classloaders are buggy...
Cheers,
Trev
Maybe you are looking for
-
Apple TV Streaming iPhoto Slideshow/Streaming Music Playlist
For some reason my Apple TV lists Photo-Settings-Music>Off and I can't change it. I have a Music Playlist selected in iPhoto Slideshow settings on my iMac that I stream from but I'm getting no music when streaming photos to Apple TV. I thought the Ap
-
How to refer to an object from within a handler
So I have a mouse listener that is attached to multiple objects as so: for (int i = 0; i < Grids.size(); i++) { Grids.get(i).addMouseListener(new GameMouseListener()); }Now the problem I have is I need to know which of the Objects activated the han
-
A report that uses tablix returns error when trying to deploy to Report Server 2005
We have some reports that have been built using tablixes, and tested in a 2008 Report Server. When trying to deploy to Report Server 2005 (don't ask why) we get an error saying The report definition is not valid. Details: The element 'ReportItems' in
-
I am trying to place a 3D PDF into Indesign but it just comes up as "Enable 3D view" What does that mean and what do I need to do differently?
-
Convert Rows into single column
Hi, My employee details table has data like below, employee_id position department 100 technician 50 100 IT 80 101 Accountant 60 101 Accounting Manager 70 Now i want to covert the rows into column. So my output should be like this. output: employee_i