You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by "M. en C. Jesús Sosa Iglesias" <js...@imp.mx> on 2001/05/14 18:03:28 UTC
Apache-SOAP EJBtest Example
Hi
I wonder how your deploymentdescriptor.xml file looks like
I have throubles trying to run the ejbtest.java client.
I´m running Jonas 2.2.7 [EJB Container] with Apache-SOAP 2.1 and Tomcat
3.2.1
This is my deploymentdescriptor.xml file
<?xml version="1.0"?>
<isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment"
id="urn:ejbhello">
<isd:provider type="org.apache.soap.providers.StatelessEJBProvider"
scope="Application"
methods="create">
<isd:java class="samples/HelloService"/>
<isd:option key="HelloService" value="samples.HelloServiceHome" />
<isd:option key="ContextProviderURL" value="rmi://localhost:1099" />
<isd:option key="FullContextFactoryName"
value="com.sun.jndi.rmi.registry.RegistryContextFactory"/>
</isd:provider>
<isd:faultListener>org.apache.soap.server.DOMFaultListener</isd:faultLis
</isd:service>
And this is my client Fault:
java samples.ejb.ejbtest http://localhost:8080/soap21/servlet/rpcrouter
Ouch, the call failed:
Fault Code = SOAP-ENV:Server
Fault String = Error in Deployment Descriptor Property Settings
Re: Apache-SOAP EJBtest Example
Posted by Arno Hartmann <a....@teraport.de>.
Now I have a solution to our problem:
"Fault String = Error in connecting to EJB"
First you have to define the home interface in your DD:
<isd:java class="HelloServiceHome" />
I don't use the sample, so that my solution looks like:
<isd:java class="JobSessionHome" />
In addition I have to define a Parameter to put it in the call-object:
Without the params I had get other exceptions.
String encodingStyleURI = Constants.NS_URI_SOAP_ENC;
URL url = new URL(args[0]);
// Build the call.
Call call = new Call();
// the service was deployed with this address: see DD
call.setTargetObjectURI("urn:result-files-fetcher");
// the service offer the following methods: see DD
call.setMethodName("listAllFinishedJobs");
call.setEncodingStyleURI(encodingStyleURI);
Vector params = new Vector();
params.addElement(new Parameter("login", String.class,
"arno2", encodingStyleURI));
call.setParams(params);
// Invoke the call.
Response resp;
try
{
resp = call.invoke(url, "");
}
catch (SOAPException e)
{
System.err.println("Caught SOAPException (" +
e.getFaultCode() + "): " +
e.getMessage());
return;
}
// Check the response.
if (!resp.generatedFault())
{
Parameter ret = resp.getReturnValue();
Object value = ret.getValue();
System.out.println(value != null ? "\n" + value : "I don't
know.");
}
else
{
Fault fault = resp.getFault();
System.err.println("Generated fault: ");
System.out.println (" Fault Code = " + fault.getFaultCode());
System.out.println (" Fault String = " + fault.getFaultString());
}
My DeploymentDescriptor :
<?xml version="1.0"?>
<isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment"
id="urn:result-files-fetcher">
<isd:provider type="org.apache.soap.providers.StatelessEJBProvider"
scope="Application"
methods="listAllFinishedJobs">
<isd:java class="JobSessionHome"/>
<isd:option key="FullHomeInterfaceName"
value="de.teraport.enap.ejb.jobsession.JobSessionHome" />
<isd:option key="ContextProviderURL" value="rmi://localhost:1099" />
<isd:option key="FullContextFactoryName"
value="com.sun.jndi.rmi.registry.RegistryContextFactory" />
</isd:provider>
<isd:faultListener>org.apache.soap.server.DOMFaultListener</isd:faultListener>
</isd:service>
With this I call the method listAllFinishedJobs from my JobSessionBean.
In the first step I response a single String-object. In future I return
a vector or something else with a collection of jobIDs.
For further information you can look at the source of soap (available in
www.apache.org ...)
Good luck
Arno
"M. en C. Jesús Sosa Iglesias" wrote:
>
> Hi
>
> I want to test the ejbtest.java example but unsuccesfully yet.
>
> After some modifications to the deploymentdescriptor.xml file
> finally I got:
>
> <?xml version="1.0"?>
> <isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment"
> id="urn:ejbhello">
> <isd:provider type="org.apache.soap.providers.StatelessEJBProvider"
> scope="Application"
> methods="create">
> <isd:java class="samples/HelloService"/>
> <isd:option key="FullHomeInterfaceName" value="samples.HelloServiceHome"
> />
> <isd:option key="ContextProviderURL" value="rmi://localhost:1099" />
> <isd:option key="FullContextFactoryName"
> value="com.sun.jndi.rmi.registry.RegistryContextFactory"/>
> </isd:provider>
>
> <isd:faultListener>org.apache.soap.server.DOMFaultListener</isd:faultLis
> </isd:service>
>
> -----------------------------------------------------------------------
> but now the SOAP client reports Error Connecting to EJB:
>
> java samples.ejb.ejbtest http://localhost:8286/soap21/se
> rvlet/rpcrouter
> Ouch, the call failed:
> Fault Code = SOAP-ENV:Server
> Fault String = Error in connecting to EJB
>
> --------------------------------------
> and Tomcat Displays
>
> =============================================
> In TemplateProvider.locate()
> URI: urn:ejbhello
> DD.ServiceClass: org.apache.soap.providers.StatelessEJBProvider
> DD.ProviderClass: samples/HelloService
> Call.MethodName: sayHello
> Exception caught: javax.naming.NameNotFoundException: samples
>
> ------------------------------------------------------------------------
> My EJB Container is running on the local machine using rmi Registry:
>
> java -Dinstall.root=e:\jonas -Djava.security.policy
> e:\jonas\java.policy org.objectweb.jonas.server.Server
> JOnAS Server, version 2.2.7, running on rmi.
> Mapping ConnectionManager jdbc:oracle:thin:@javax:1521:javax on jdbc_1
> EJBHome:samples.JOnASsamplesHome for samples available
> EJBServer is ready
> -----------------------------------------
>
> and TunnelGUI utility shows:
>
> HTTP/1.0 500 Error Interno del Servidor
> Content-Type: text/xml; charset=utf-8
> Content-Length: 1767
> Set-Cookie2: JSESSIONID=gi9h024dr1;Version=1;Discard;Path="/soap21"
> Set-Cookie: JSESSIONID=gi9h024dr1;Path=/soap21
> Servlet-Engine: Tomcat Web Server/3.2.1 (JSP 1.1; Servlet 2.2; Java
> 1.3.0_02; Windows 2000 5.0 x86; java.vendor=Sun Microsystems Inc.)
> <?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/1999/XMLSchema-instance"
> xmlns:xsd="http://www.w3.org/1999/XMLSchema">
> <SOAP-ENV:Body>
> <SOAP-ENV:Fault>
> <faultcode>SOAP-ENV:Server</faultcode>
> <faultstring>Error in connecting to EJB</faultstring>
> <faultactor>/soap21/servlet/rpcrouter</faultactor>
> <detail>
> ....<stackTrace>javax.naming.NameNotFoundException: samples
> at
> com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:93)
> at
> com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:101)
> at javax.naming.InitialContext.lookup(InitialContext.java:350)
> at
> org.apache.soap.providers.StatelessEJBProvider.locate(StatelessEJBProvider.java:263)
>
> at
> org.apache.soap.server.http.RPCRouterServlet.doPost(RPCRouterServlet.java:265)
>
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
>
> at org.apache.tomcat.core.Handler.service(Handler.java:286)
> at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
> at
> org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
>
> at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
> at
> org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:210)
>
> at
> org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
> at
> org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
> at java.lang.Thread.run(Thread.java:484)
> </stackTrace>
> </detail>
> </SOAP-ENV:Fault>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
>
> Somebody had run this example ?...
> Someone can Help?
>
> thanks
>
> "M. en C. Jesús Sosa Iglesias" wrote:
>
> > Hi
> >
> > I wonder how your deploymentdescriptor.xml file looks like
> > I have throubles trying to run the ejbtest.java client.
> >
> > I´m running Jonas 2.2.7 [EJB Container] with Apache-SOAP 2.1 and Tomcat
> > 3.2.1
> > This is my deploymentdescriptor.xml file
> >
> > <?xml version="1.0"?>
> > <isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment"
> > id="urn:ejbhello">
> > <isd:provider type="org.apache.soap.providers.StatelessEJBProvider"
> > scope="Application"
> > methods="create">
> > <isd:java class="samples/HelloService"/>
> > <isd:option key="HelloService" value="samples.HelloServiceHome" />
> > <isd:option key="ContextProviderURL" value="rmi://localhost:1099" />
> >
> > <isd:option key="FullContextFactoryName"
> > value="com.sun.jndi.rmi.registry.RegistryContextFactory"/>
> > </isd:provider>
> >
> > <isd:faultListener>org.apache.soap.server.DOMFaultListener</isd:faultLis
> >
> > </isd:service>
> >
> > And this is my client Fault:
> >
> > java samples.ejb.ejbtest http://localhost:8080/soap21/servlet/rpcrouter
> >
> > Ouch, the call failed:
> > Fault Code = SOAP-ENV:Server
> > Fault String = Error in Deployment Descriptor Property Settings
where to get the schemas for wsdl/xmlsoap etc.
Posted by Oliver Rettig <Ol...@telda.net>.
Hi all,
since last weekend on the server http://schemas.xmlsoap.org/... we cauld find the schemas for wsdl, soap
etc. This url is used in the wsdl-file e.g. in the example addressbook2 in the apache-soap. Now you can´t
get the files from that server. So the addressbook2-client failes if it is a ms-soap-client.
Where can I get the files to save them local?
best regards
Oliver
where to get the schemas for wsdl/xmlsoap etc.
Posted by Oliver Rettig <Ol...@telda.net>.
Hi all,
since last weekend on the server http://schemas.xmlsoap.org/... we cauld find the schemas for wsdl, soap
etc. This url is used in the wsdl-file e.g. in the example addressbook2 in the apache-soap. Now you can´t
get the files from that server. So the addressbook2-client failes if it is a ms-soap-client.
Where can I get the files to save them local?
best regards
Oliver
http://schemas.xmlsoap.org/... does´t work
Posted by Oliver Rettig <Ol...@telda.net>.
Hallo,
schemas.xmlsoap.org/... does´t work so all my ms-soap-clients which includes in the wsdl-file links to
that server to get the schemas fails without error-message. All my java-clients which invokes my
apache-soap-server works fine. Yeahh!!!!
But where can I get the schemas?
Please help
Oliver Rettig
Re: Apache-SOAP EJBtest Example
Posted by Arno Hartmann <a....@teraport.de>.
Now I have a solution to our problem:
"Fault String = Error in connecting to EJB"
First you have to define the home interface in your DD:
<isd:java class="HelloServiceHome" />
I don't use the sample, so that my solution looks like:
<isd:java class="JobSessionHome" />
In addition I have to define a Parameter to put it in the call-object:
Without the params I had get other exceptions.
String encodingStyleURI = Constants.NS_URI_SOAP_ENC;
URL url = new URL(args[0]);
// Build the call.
Call call = new Call();
// the service was deployed with this address: see DD
call.setTargetObjectURI("urn:result-files-fetcher");
// the service offer the following methods: see DD
call.setMethodName("listAllFinishedJobs");
call.setEncodingStyleURI(encodingStyleURI);
Vector params = new Vector();
params.addElement(new Parameter("login", String.class,
"arno2", encodingStyleURI));
call.setParams(params);
// Invoke the call.
Response resp;
try
{
resp = call.invoke(url, "");
}
catch (SOAPException e)
{
System.err.println("Caught SOAPException (" +
e.getFaultCode() + "): " +
e.getMessage());
return;
}
// Check the response.
if (!resp.generatedFault())
{
Parameter ret = resp.getReturnValue();
Object value = ret.getValue();
System.out.println(value != null ? "\n" + value : "I don't
know.");
}
else
{
Fault fault = resp.getFault();
System.err.println("Generated fault: ");
System.out.println (" Fault Code = " + fault.getFaultCode());
System.out.println (" Fault String = " + fault.getFaultString());
}
My DeploymentDescriptor :
<?xml version="1.0"?>
<isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment"
id="urn:result-files-fetcher">
<isd:provider type="org.apache.soap.providers.StatelessEJBProvider"
scope="Application"
methods="listAllFinishedJobs">
<isd:java class="JobSessionHome"/>
<isd:option key="FullHomeInterfaceName"
value="de.teraport.enap.ejb.jobsession.JobSessionHome" />
<isd:option key="ContextProviderURL" value="rmi://localhost:1099" />
<isd:option key="FullContextFactoryName"
value="com.sun.jndi.rmi.registry.RegistryContextFactory" />
</isd:provider>
<isd:faultListener>org.apache.soap.server.DOMFaultListener</isd:faultListener>
</isd:service>
With this I call the method listAllFinishedJobs from my JobSessionBean.
In the first step I response a single String-object. In future I return
a vector or something else with a collection of jobIDs.
For further information you can look at the source of soap (available in
www.apache.org ...)
Good luck
Arno
"M. en C. Jesús Sosa Iglesias" wrote:
>
> Hi
>
> I want to test the ejbtest.java example but unsuccesfully yet.
>
> After some modifications to the deploymentdescriptor.xml file
> finally I got:
>
> <?xml version="1.0"?>
> <isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment"
> id="urn:ejbhello">
> <isd:provider type="org.apache.soap.providers.StatelessEJBProvider"
> scope="Application"
> methods="create">
> <isd:java class="samples/HelloService"/>
> <isd:option key="FullHomeInterfaceName" value="samples.HelloServiceHome"
> />
> <isd:option key="ContextProviderURL" value="rmi://localhost:1099" />
> <isd:option key="FullContextFactoryName"
> value="com.sun.jndi.rmi.registry.RegistryContextFactory"/>
> </isd:provider>
>
> <isd:faultListener>org.apache.soap.server.DOMFaultListener</isd:faultLis
> </isd:service>
>
> -----------------------------------------------------------------------
> but now the SOAP client reports Error Connecting to EJB:
>
> java samples.ejb.ejbtest http://localhost:8286/soap21/se
> rvlet/rpcrouter
> Ouch, the call failed:
> Fault Code = SOAP-ENV:Server
> Fault String = Error in connecting to EJB
>
> --------------------------------------
> and Tomcat Displays
>
> =============================================
> In TemplateProvider.locate()
> URI: urn:ejbhello
> DD.ServiceClass: org.apache.soap.providers.StatelessEJBProvider
> DD.ProviderClass: samples/HelloService
> Call.MethodName: sayHello
> Exception caught: javax.naming.NameNotFoundException: samples
>
> ------------------------------------------------------------------------
> My EJB Container is running on the local machine using rmi Registry:
>
> java -Dinstall.root=e:\jonas -Djava.security.policy
> e:\jonas\java.policy org.objectweb.jonas.server.Server
> JOnAS Server, version 2.2.7, running on rmi.
> Mapping ConnectionManager jdbc:oracle:thin:@javax:1521:javax on jdbc_1
> EJBHome:samples.JOnASsamplesHome for samples available
> EJBServer is ready
> -----------------------------------------
>
> and TunnelGUI utility shows:
>
> HTTP/1.0 500 Error Interno del Servidor
> Content-Type: text/xml; charset=utf-8
> Content-Length: 1767
> Set-Cookie2: JSESSIONID=gi9h024dr1;Version=1;Discard;Path="/soap21"
> Set-Cookie: JSESSIONID=gi9h024dr1;Path=/soap21
> Servlet-Engine: Tomcat Web Server/3.2.1 (JSP 1.1; Servlet 2.2; Java
> 1.3.0_02; Windows 2000 5.0 x86; java.vendor=Sun Microsystems Inc.)
> <?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/1999/XMLSchema-instance"
> xmlns:xsd="http://www.w3.org/1999/XMLSchema">
> <SOAP-ENV:Body>
> <SOAP-ENV:Fault>
> <faultcode>SOAP-ENV:Server</faultcode>
> <faultstring>Error in connecting to EJB</faultstring>
> <faultactor>/soap21/servlet/rpcrouter</faultactor>
> <detail>
> ....<stackTrace>javax.naming.NameNotFoundException: samples
> at
> com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:93)
> at
> com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:101)
> at javax.naming.InitialContext.lookup(InitialContext.java:350)
> at
> org.apache.soap.providers.StatelessEJBProvider.locate(StatelessEJBProvider.java:263)
>
> at
> org.apache.soap.server.http.RPCRouterServlet.doPost(RPCRouterServlet.java:265)
>
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
>
> at org.apache.tomcat.core.Handler.service(Handler.java:286)
> at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
> at
> org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
>
> at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
> at
> org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:210)
>
> at
> org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
> at
> org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
> at java.lang.Thread.run(Thread.java:484)
> </stackTrace>
> </detail>
> </SOAP-ENV:Fault>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
>
> Somebody had run this example ?...
> Someone can Help?
>
> thanks
>
> "M. en C. Jesús Sosa Iglesias" wrote:
>
> > Hi
> >
> > I wonder how your deploymentdescriptor.xml file looks like
> > I have throubles trying to run the ejbtest.java client.
> >
> > I´m running Jonas 2.2.7 [EJB Container] with Apache-SOAP 2.1 and Tomcat
> > 3.2.1
> > This is my deploymentdescriptor.xml file
> >
> > <?xml version="1.0"?>
> > <isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment"
> > id="urn:ejbhello">
> > <isd:provider type="org.apache.soap.providers.StatelessEJBProvider"
> > scope="Application"
> > methods="create">
> > <isd:java class="samples/HelloService"/>
> > <isd:option key="HelloService" value="samples.HelloServiceHome" />
> > <isd:option key="ContextProviderURL" value="rmi://localhost:1099" />
> >
> > <isd:option key="FullContextFactoryName"
> > value="com.sun.jndi.rmi.registry.RegistryContextFactory"/>
> > </isd:provider>
> >
> > <isd:faultListener>org.apache.soap.server.DOMFaultListener</isd:faultLis
> >
> > </isd:service>
> >
> > And this is my client Fault:
> >
> > java samples.ejb.ejbtest http://localhost:8080/soap21/servlet/rpcrouter
> >
> > Ouch, the call failed:
> > Fault Code = SOAP-ENV:Server
> > Fault String = Error in Deployment Descriptor Property Settings
http://schemas.xmlsoap.org/... does´t work
Posted by Oliver Rettig <Ol...@telda.net>.
Hallo,
schemas.xmlsoap.org/... does´t work so all my ms-soap-clients which includes in the wsdl-file links to
that server to get the schemas fails without error-message. All my java-clients which invokes my
apache-soap-server works fine. Yeahh!!!!
But where can I get the schemas?
Please help
Oliver Rettig
Re: Apache-SOAP EJBtest Example
Posted by "M. en C. Jesús Sosa Iglesias" <js...@imp.mx>.
Hi
I want to test the ejbtest.java example but unsuccesfully yet.
After some modifications to the deploymentdescriptor.xml file
finally I got:
<?xml version="1.0"?>
<isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment"
id="urn:ejbhello">
<isd:provider type="org.apache.soap.providers.StatelessEJBProvider"
scope="Application"
methods="create">
<isd:java class="samples/HelloService"/>
<isd:option key="FullHomeInterfaceName" value="samples.HelloServiceHome"
/>
<isd:option key="ContextProviderURL" value="rmi://localhost:1099" />
<isd:option key="FullContextFactoryName"
value="com.sun.jndi.rmi.registry.RegistryContextFactory"/>
</isd:provider>
<isd:faultListener>org.apache.soap.server.DOMFaultListener</isd:faultLis
</isd:service>
-----------------------------------------------------------------------
but now the SOAP client reports Error Connecting to EJB:
java samples.ejb.ejbtest http://localhost:8286/soap21/se
rvlet/rpcrouter
Ouch, the call failed:
Fault Code = SOAP-ENV:Server
Fault String = Error in connecting to EJB
--------------------------------------
and Tomcat Displays
=============================================
In TemplateProvider.locate()
URI: urn:ejbhello
DD.ServiceClass: org.apache.soap.providers.StatelessEJBProvider
DD.ProviderClass: samples/HelloService
Call.MethodName: sayHello
Exception caught: javax.naming.NameNotFoundException: samples
------------------------------------------------------------------------
My EJB Container is running on the local machine using rmi Registry:
java -Dinstall.root=e:\jonas -Djava.security.policy
e:\jonas\java.policy org.objectweb.jonas.server.Server
JOnAS Server, version 2.2.7, running on rmi.
Mapping ConnectionManager jdbc:oracle:thin:@javax:1521:javax on jdbc_1
EJBHome:samples.JOnASsamplesHome for samples available
EJBServer is ready
-----------------------------------------
and TunnelGUI utility shows:
HTTP/1.0 500 Error Interno del Servidor
Content-Type: text/xml; charset=utf-8
Content-Length: 1767
Set-Cookie2: JSESSIONID=gi9h024dr1;Version=1;Discard;Path="/soap21"
Set-Cookie: JSESSIONID=gi9h024dr1;Path=/soap21
Servlet-Engine: Tomcat Web Server/3.2.1 (JSP 1.1; Servlet 2.2; Java
1.3.0_02; Windows 2000 5.0 x86; java.vendor=Sun Microsystems Inc.)
<?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/1999/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Server</faultcode>
<faultstring>Error in connecting to EJB</faultstring>
<faultactor>/soap21/servlet/rpcrouter</faultactor>
<detail>
...<stackTrace>javax.naming.NameNotFoundException: samples
at
com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:93)
at
com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:101)
at javax.naming.InitialContext.lookup(InitialContext.java:350)
at
org.apache.soap.providers.StatelessEJBProvider.locate(StatelessEJBProvider.java:263)
at
org.apache.soap.server.http.RPCRouterServlet.doPost(RPCRouterServlet.java:265)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:210)
at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:484)
</stackTrace>
</detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Somebody had run this example ?...
Someone can Help?
thanks
"M. en C. Jesús Sosa Iglesias" wrote:
> Hi
>
> I wonder how your deploymentdescriptor.xml file looks like
> I have throubles trying to run the ejbtest.java client.
>
> I´m running Jonas 2.2.7 [EJB Container] with Apache-SOAP 2.1 and Tomcat
> 3.2.1
> This is my deploymentdescriptor.xml file
>
> <?xml version="1.0"?>
> <isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment"
> id="urn:ejbhello">
> <isd:provider type="org.apache.soap.providers.StatelessEJBProvider"
> scope="Application"
> methods="create">
> <isd:java class="samples/HelloService"/>
> <isd:option key="HelloService" value="samples.HelloServiceHome" />
> <isd:option key="ContextProviderURL" value="rmi://localhost:1099" />
>
> <isd:option key="FullContextFactoryName"
> value="com.sun.jndi.rmi.registry.RegistryContextFactory"/>
> </isd:provider>
>
> <isd:faultListener>org.apache.soap.server.DOMFaultListener</isd:faultLis
>
> </isd:service>
>
> And this is my client Fault:
>
> java samples.ejb.ejbtest http://localhost:8080/soap21/servlet/rpcrouter
>
> Ouch, the call failed:
> Fault Code = SOAP-ENV:Server
> Fault String = Error in Deployment Descriptor Property Settings
Re: Apache-SOAP EJBtest Example
Posted by "Michael J. Hudson" <mh...@blueprinttech.com>.
Your interface option should be this instead:
<isd:option key="FullHomeInterfaceName" value="samples.HelloServiceHome"
/>
and make sure your Context Provider URL is correct.
--------------------"M. en C. Jesús Sosa Iglesias" wrote:
>
> Hi
>
> I wonder how your deploymentdescriptor.xml file looks like
> I have throubles trying to run the ejbtest.java client.
>
> I´m running Jonas 2.2.7 [EJB Container] with Apache-SOAP 2.1 and Tomcat
> 3.2.1
> This is my deploymentdescriptor.xml file
>
> <?xml version="1.0"?>
> <isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment"
> id="urn:ejbhello">
> <isd:provider type="org.apache.soap.providers.StatelessEJBProvider"
> scope="Application"
> methods="create">
> <isd:java class="samples/HelloService"/>
> <isd:option key="HelloService" value="samples.HelloServiceHome" />
> <isd:option key="ContextProviderURL" value="rmi://localhost:1099" />
>
> <isd:option key="FullContextFactoryName"
> value="com.sun.jndi.rmi.registry.RegistryContextFactory"/>
> </isd:provider>
>
> <isd:faultListener>org.apache.soap.server.DOMFaultListener</isd:faultLis
>
> </isd:service>
>
> And this is my client Fault:
>
> java samples.ejb.ejbtest http://localhost:8080/soap21/servlet/rpcrouter
>
> Ouch, the call failed:
> Fault Code = SOAP-ENV:Server
> Fault String = Error in Deployment Descriptor Property Settings
---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org
Re: Apache-SOAP EJBtest Example
Posted by "Michael J. Hudson" <mh...@blueprinttech.com>.
Your interface option should be this instead:
<isd:option key="FullHomeInterfaceName" value="samples.HelloServiceHome"
/>
and make sure your Context Provider URL is correct.
--------------------"M. en C. Jesús Sosa Iglesias" wrote:
>
> Hi
>
> I wonder how your deploymentdescriptor.xml file looks like
> I have throubles trying to run the ejbtest.java client.
>
> I´m running Jonas 2.2.7 [EJB Container] with Apache-SOAP 2.1 and Tomcat
> 3.2.1
> This is my deploymentdescriptor.xml file
>
> <?xml version="1.0"?>
> <isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment"
> id="urn:ejbhello">
> <isd:provider type="org.apache.soap.providers.StatelessEJBProvider"
> scope="Application"
> methods="create">
> <isd:java class="samples/HelloService"/>
> <isd:option key="HelloService" value="samples.HelloServiceHome" />
> <isd:option key="ContextProviderURL" value="rmi://localhost:1099" />
>
> <isd:option key="FullContextFactoryName"
> value="com.sun.jndi.rmi.registry.RegistryContextFactory"/>
> </isd:provider>
>
> <isd:faultListener>org.apache.soap.server.DOMFaultListener</isd:faultLis
>
> </isd:service>
>
> And this is my client Fault:
>
> java samples.ejb.ejbtest http://localhost:8080/soap21/servlet/rpcrouter
>
> Ouch, the call failed:
> Fault Code = SOAP-ENV:Server
> Fault String = Error in Deployment Descriptor Property Settings
---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org
Re: Apache-SOAP EJBtest Example
Posted by Saint-Martin Cecile <cs...@symetrx.com>.
You should run TcpTunnel tool to have complete SOAP message error...
Cecile Saint-Martin
csaintmartin@symetrx.com
----- Original Message -----
From: "Arno Hartmann" <a....@teraport.de>
To: <so...@xml.apache.org>
Sent: Monday, May 14, 2001 7:14 PM
Subject: Re: Apache-SOAP EJBtest Example
the line
<isd:option key="HelloService" value="samples.HelloServiceHome" />
may be
<isd:option key="FullHomeInterfaceName" value="samples.HelloServiceHome"
/>
I try the sample too,
and now I have problems to connect to my EJBServer (JOnAS 2.2.6)
If you will not have these problems, it would be fine you can
send me your solution as an example. thanks
The message is :
Generated fault:
Fault Code = SOAP-ENV:Server
Fault String = Error in connecting to EJB
My DD looks like :
<?xml version="1.0"?>
<isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment"
id="urn:result-files-fetcher">
<isd:provider type="org.apache.soap.providers.StatefulEJBProvider"
scope="Application"
methods="create">
<isd:java class="jobsession/JobSession"/>
<isd:option key="FullHomeInterfaceName"
value="ejb.jobsession.JobSessionHome" />
<isd:option key="ContextProviderURL" value="rmi://localhost:1099" />
<isd:option key="FullContextFactoryName"
value="com.sun.jndi.rmi.registry.RegistryContextFactory" />
</isd:provider>
<isd:faultListener>org.apache.soap.server.DOMFaultListener</isd:faultListener>
</isd:service>
And this is my main:
**************************************************************************************************************
public static void main(String[] args) throws Exception
{
// Usage: java de.teraport.enap.ador.GetResultFiles
http://localhost:8080/soap/service/rpcrouter loginname
if (args.length != 2){
System.err.println("Usage:");
System.err.println(" java " + GetResultFiles.class.getName() +
" SOAP-router-URL loginname");
System.exit (1);
}
System.out.println(args[0] +"..." +args[1]);
String encodingStyleURI = Constants.NS_URI_SOAP_ENC;
URL url = new URL(args[0]);
// Build the call.
Call call = new Call();
// the service was deployed with this address: see DD
call.setTargetObjectURI("urn:result-files-fetcher");
// the service offer the following methods: see DD
call.setMethodName("listAllFinishedJobs");
//call.setEncodingStyleURI(encodingStyleURI);
Vector params = new Vector();
/**params.addElement(new Parameter("login", String.class,
"arno2", null));
*/
call.setParams(params);
// Invoke the call.
Response resp;
try
{
resp = call.invoke(url, "");
}
catch (SOAPException e)
{
System.err.println("Caught SOAPException (" +
e.getFaultCode() + "): " +
e.getMessage());
return;
}
// Check the response.
if (!resp.generatedFault())
{
Parameter ret = resp.getReturnValue();
Object value = ret.getValue();
System.out.println(value != null ? "\n" + value : "I don't
know.");
}
else
{
Fault fault = resp.getFault();
System.err.println("Generated fault: ");
System.out.println (" Fault Code = " + fault.getFaultCode());
System.out.println (" Fault String = " + fault.getFaultString());
}
}
********************************************************************************************
"M. en C. Jesús Sosa Iglesias" wrote:
>
> Hi
>
> I wonder how your deploymentdescriptor.xml file looks like
> I have throubles trying to run the ejbtest.java client.
>
> I´m running Jonas 2.2.7 [EJB Container] with Apache-SOAP 2.1 and Tomcat
> 3.2.1
> This is my deploymentdescriptor.xml file
>
> <?xml version="1.0"?>
> <isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment"
> id="urn:ejbhello">
> <isd:provider type="org.apache.soap.providers.StatelessEJBProvider"
> scope="Application"
> methods="create">
> <isd:java class="samples/HelloService"/>
> <isd:option key="HelloService" value="samples.HelloServiceHome" />
> <isd:option key="ContextProviderURL" value="rmi://localhost:1099" />
>
> <isd:option key="FullContextFactoryName"
> value="com.sun.jndi.rmi.registry.RegistryContextFactory"/>
> </isd:provider>
>
> <isd:faultListener>org.apache.soap.server.DOMFaultListener</isd:faultLis
>
> </isd:service>
>
> And this is my client Fault:
>
> java samples.ejb.ejbtest http://localhost:8080/soap21/servlet/rpcrouter
>
> Ouch, the call failed:
> Fault Code = SOAP-ENV:Server
> Fault String = Error in Deployment Descriptor Property Settings
--------------------------------------------------------------------------------
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> For additional commands, email: soap-user-help@xml.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org
Re: Apache-SOAP EJBtest Example
Posted by Saint-Martin Cecile <cs...@symetrx.com>.
You should run TcpTunnel tool to have complete SOAP message error...
Cecile Saint-Martin
csaintmartin@symetrx.com
----- Original Message -----
From: "Arno Hartmann" <a....@teraport.de>
To: <so...@xml.apache.org>
Sent: Monday, May 14, 2001 7:14 PM
Subject: Re: Apache-SOAP EJBtest Example
the line
<isd:option key="HelloService" value="samples.HelloServiceHome" />
may be
<isd:option key="FullHomeInterfaceName" value="samples.HelloServiceHome"
/>
I try the sample too,
and now I have problems to connect to my EJBServer (JOnAS 2.2.6)
If you will not have these problems, it would be fine you can
send me your solution as an example. thanks
The message is :
Generated fault:
Fault Code = SOAP-ENV:Server
Fault String = Error in connecting to EJB
My DD looks like :
<?xml version="1.0"?>
<isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment"
id="urn:result-files-fetcher">
<isd:provider type="org.apache.soap.providers.StatefulEJBProvider"
scope="Application"
methods="create">
<isd:java class="jobsession/JobSession"/>
<isd:option key="FullHomeInterfaceName"
value="ejb.jobsession.JobSessionHome" />
<isd:option key="ContextProviderURL" value="rmi://localhost:1099" />
<isd:option key="FullContextFactoryName"
value="com.sun.jndi.rmi.registry.RegistryContextFactory" />
</isd:provider>
<isd:faultListener>org.apache.soap.server.DOMFaultListener</isd:faultListener>
</isd:service>
And this is my main:
**************************************************************************************************************
public static void main(String[] args) throws Exception
{
// Usage: java de.teraport.enap.ador.GetResultFiles
http://localhost:8080/soap/service/rpcrouter loginname
if (args.length != 2){
System.err.println("Usage:");
System.err.println(" java " + GetResultFiles.class.getName() +
" SOAP-router-URL loginname");
System.exit (1);
}
System.out.println(args[0] +"..." +args[1]);
String encodingStyleURI = Constants.NS_URI_SOAP_ENC;
URL url = new URL(args[0]);
// Build the call.
Call call = new Call();
// the service was deployed with this address: see DD
call.setTargetObjectURI("urn:result-files-fetcher");
// the service offer the following methods: see DD
call.setMethodName("listAllFinishedJobs");
//call.setEncodingStyleURI(encodingStyleURI);
Vector params = new Vector();
/**params.addElement(new Parameter("login", String.class,
"arno2", null));
*/
call.setParams(params);
// Invoke the call.
Response resp;
try
{
resp = call.invoke(url, "");
}
catch (SOAPException e)
{
System.err.println("Caught SOAPException (" +
e.getFaultCode() + "): " +
e.getMessage());
return;
}
// Check the response.
if (!resp.generatedFault())
{
Parameter ret = resp.getReturnValue();
Object value = ret.getValue();
System.out.println(value != null ? "\n" + value : "I don't
know.");
}
else
{
Fault fault = resp.getFault();
System.err.println("Generated fault: ");
System.out.println (" Fault Code = " + fault.getFaultCode());
System.out.println (" Fault String = " + fault.getFaultString());
}
}
********************************************************************************************
"M. en C. Jesús Sosa Iglesias" wrote:
>
> Hi
>
> I wonder how your deploymentdescriptor.xml file looks like
> I have throubles trying to run the ejbtest.java client.
>
> I´m running Jonas 2.2.7 [EJB Container] with Apache-SOAP 2.1 and Tomcat
> 3.2.1
> This is my deploymentdescriptor.xml file
>
> <?xml version="1.0"?>
> <isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment"
> id="urn:ejbhello">
> <isd:provider type="org.apache.soap.providers.StatelessEJBProvider"
> scope="Application"
> methods="create">
> <isd:java class="samples/HelloService"/>
> <isd:option key="HelloService" value="samples.HelloServiceHome" />
> <isd:option key="ContextProviderURL" value="rmi://localhost:1099" />
>
> <isd:option key="FullContextFactoryName"
> value="com.sun.jndi.rmi.registry.RegistryContextFactory"/>
> </isd:provider>
>
> <isd:faultListener>org.apache.soap.server.DOMFaultListener</isd:faultLis
>
> </isd:service>
>
> And this is my client Fault:
>
> java samples.ejb.ejbtest http://localhost:8080/soap21/servlet/rpcrouter
>
> Ouch, the call failed:
> Fault Code = SOAP-ENV:Server
> Fault String = Error in Deployment Descriptor Property Settings
--------------------------------------------------------------------------------
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> For additional commands, email: soap-user-help@xml.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org
Re: Apache-SOAP EJBtest Example
Posted by Arno Hartmann <a....@teraport.de>.
the line
<isd:option key="HelloService" value="samples.HelloServiceHome" />
may be
<isd:option key="FullHomeInterfaceName" value="samples.HelloServiceHome"
/>
I try the sample too,
and now I have problems to connect to my EJBServer (JOnAS 2.2.6)
If you will not have these problems, it would be fine you can
send me your solution as an example. thanks
The message is :
Generated fault:
Fault Code = SOAP-ENV:Server
Fault String = Error in connecting to EJB
My DD looks like :
<?xml version="1.0"?>
<isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment"
id="urn:result-files-fetcher">
<isd:provider type="org.apache.soap.providers.StatefulEJBProvider"
scope="Application"
methods="create">
<isd:java class="jobsession/JobSession"/>
<isd:option key="FullHomeInterfaceName"
value="ejb.jobsession.JobSessionHome" />
<isd:option key="ContextProviderURL" value="rmi://localhost:1099" />
<isd:option key="FullContextFactoryName"
value="com.sun.jndi.rmi.registry.RegistryContextFactory" />
</isd:provider>
<isd:faultListener>org.apache.soap.server.DOMFaultListener</isd:faultListener>
</isd:service>
And this is my main:
**************************************************************************************************************
public static void main(String[] args) throws Exception
{
// Usage: java de.teraport.enap.ador.GetResultFiles
http://localhost:8080/soap/service/rpcrouter loginname
if (args.length != 2){
System.err.println("Usage:");
System.err.println(" java " + GetResultFiles.class.getName() +
" SOAP-router-URL loginname");
System.exit (1);
}
System.out.println(args[0] +"..." +args[1]);
String encodingStyleURI = Constants.NS_URI_SOAP_ENC;
URL url = new URL(args[0]);
// Build the call.
Call call = new Call();
// the service was deployed with this address: see DD
call.setTargetObjectURI("urn:result-files-fetcher");
// the service offer the following methods: see DD
call.setMethodName("listAllFinishedJobs");
//call.setEncodingStyleURI(encodingStyleURI);
Vector params = new Vector();
/**params.addElement(new Parameter("login", String.class,
"arno2", null));
*/
call.setParams(params);
// Invoke the call.
Response resp;
try
{
resp = call.invoke(url, "");
}
catch (SOAPException e)
{
System.err.println("Caught SOAPException (" +
e.getFaultCode() + "): " +
e.getMessage());
return;
}
// Check the response.
if (!resp.generatedFault())
{
Parameter ret = resp.getReturnValue();
Object value = ret.getValue();
System.out.println(value != null ? "\n" + value : "I don't
know.");
}
else
{
Fault fault = resp.getFault();
System.err.println("Generated fault: ");
System.out.println (" Fault Code = " + fault.getFaultCode());
System.out.println (" Fault String = " + fault.getFaultString());
}
}
********************************************************************************************
"M. en C. Jesús Sosa Iglesias" wrote:
>
> Hi
>
> I wonder how your deploymentdescriptor.xml file looks like
> I have throubles trying to run the ejbtest.java client.
>
> I´m running Jonas 2.2.7 [EJB Container] with Apache-SOAP 2.1 and Tomcat
> 3.2.1
> This is my deploymentdescriptor.xml file
>
> <?xml version="1.0"?>
> <isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment"
> id="urn:ejbhello">
> <isd:provider type="org.apache.soap.providers.StatelessEJBProvider"
> scope="Application"
> methods="create">
> <isd:java class="samples/HelloService"/>
> <isd:option key="HelloService" value="samples.HelloServiceHome" />
> <isd:option key="ContextProviderURL" value="rmi://localhost:1099" />
>
> <isd:option key="FullContextFactoryName"
> value="com.sun.jndi.rmi.registry.RegistryContextFactory"/>
> </isd:provider>
>
> <isd:faultListener>org.apache.soap.server.DOMFaultListener</isd:faultLis
>
> </isd:service>
>
> And this is my client Fault:
>
> java samples.ejb.ejbtest http://localhost:8080/soap21/servlet/rpcrouter
>
> Ouch, the call failed:
> Fault Code = SOAP-ENV:Server
> Fault String = Error in Deployment Descriptor Property Settings
Re: Apache-SOAP EJBtest Example
Posted by "M. en C. Jesús Sosa Iglesias" <js...@imp.mx>.
Hi
I want to test the ejbtest.java example but unsuccesfully yet.
After some modifications to the deploymentdescriptor.xml file
finally I got:
<?xml version="1.0"?>
<isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment"
id="urn:ejbhello">
<isd:provider type="org.apache.soap.providers.StatelessEJBProvider"
scope="Application"
methods="create">
<isd:java class="samples/HelloService"/>
<isd:option key="FullHomeInterfaceName" value="samples.HelloServiceHome"
/>
<isd:option key="ContextProviderURL" value="rmi://localhost:1099" />
<isd:option key="FullContextFactoryName"
value="com.sun.jndi.rmi.registry.RegistryContextFactory"/>
</isd:provider>
<isd:faultListener>org.apache.soap.server.DOMFaultListener</isd:faultLis
</isd:service>
-----------------------------------------------------------------------
but now the SOAP client reports Error Connecting to EJB:
java samples.ejb.ejbtest http://localhost:8286/soap21/se
rvlet/rpcrouter
Ouch, the call failed:
Fault Code = SOAP-ENV:Server
Fault String = Error in connecting to EJB
--------------------------------------
and Tomcat Displays
=============================================
In TemplateProvider.locate()
URI: urn:ejbhello
DD.ServiceClass: org.apache.soap.providers.StatelessEJBProvider
DD.ProviderClass: samples/HelloService
Call.MethodName: sayHello
Exception caught: javax.naming.NameNotFoundException: samples
------------------------------------------------------------------------
My EJB Container is running on the local machine using rmi Registry:
java -Dinstall.root=e:\jonas -Djava.security.policy
e:\jonas\java.policy org.objectweb.jonas.server.Server
JOnAS Server, version 2.2.7, running on rmi.
Mapping ConnectionManager jdbc:oracle:thin:@javax:1521:javax on jdbc_1
EJBHome:samples.JOnASsamplesHome for samples available
EJBServer is ready
-----------------------------------------
and TunnelGUI utility shows:
HTTP/1.0 500 Error Interno del Servidor
Content-Type: text/xml; charset=utf-8
Content-Length: 1767
Set-Cookie2: JSESSIONID=gi9h024dr1;Version=1;Discard;Path="/soap21"
Set-Cookie: JSESSIONID=gi9h024dr1;Path=/soap21
Servlet-Engine: Tomcat Web Server/3.2.1 (JSP 1.1; Servlet 2.2; Java
1.3.0_02; Windows 2000 5.0 x86; java.vendor=Sun Microsystems Inc.)
<?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/1999/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Server</faultcode>
<faultstring>Error in connecting to EJB</faultstring>
<faultactor>/soap21/servlet/rpcrouter</faultactor>
<detail>
...<stackTrace>javax.naming.NameNotFoundException: samples
at
com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:93)
at
com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:101)
at javax.naming.InitialContext.lookup(InitialContext.java:350)
at
org.apache.soap.providers.StatelessEJBProvider.locate(StatelessEJBProvider.java:263)
at
org.apache.soap.server.http.RPCRouterServlet.doPost(RPCRouterServlet.java:265)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:210)
at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:484)
</stackTrace>
</detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Somebody had run this example ?...
Someone can Help?
thanks
"M. en C. Jesús Sosa Iglesias" wrote:
> Hi
>
> I wonder how your deploymentdescriptor.xml file looks like
> I have throubles trying to run the ejbtest.java client.
>
> I´m running Jonas 2.2.7 [EJB Container] with Apache-SOAP 2.1 and Tomcat
> 3.2.1
> This is my deploymentdescriptor.xml file
>
> <?xml version="1.0"?>
> <isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment"
> id="urn:ejbhello">
> <isd:provider type="org.apache.soap.providers.StatelessEJBProvider"
> scope="Application"
> methods="create">
> <isd:java class="samples/HelloService"/>
> <isd:option key="HelloService" value="samples.HelloServiceHome" />
> <isd:option key="ContextProviderURL" value="rmi://localhost:1099" />
>
> <isd:option key="FullContextFactoryName"
> value="com.sun.jndi.rmi.registry.RegistryContextFactory"/>
> </isd:provider>
>
> <isd:faultListener>org.apache.soap.server.DOMFaultListener</isd:faultLis
>
> </isd:service>
>
> And this is my client Fault:
>
> java samples.ejb.ejbtest http://localhost:8080/soap21/servlet/rpcrouter
>
> Ouch, the call failed:
> Fault Code = SOAP-ENV:Server
> Fault String = Error in Deployment Descriptor Property Settings
Re: Apache-SOAP EJBtest Example
Posted by Arno Hartmann <a....@teraport.de>.
the line
<isd:option key="HelloService" value="samples.HelloServiceHome" />
may be
<isd:option key="FullHomeInterfaceName" value="samples.HelloServiceHome"
/>
I try the sample too,
and now I have problems to connect to my EJBServer (JOnAS 2.2.6)
If you will not have these problems, it would be fine you can
send me your solution as an example. thanks
The message is :
Generated fault:
Fault Code = SOAP-ENV:Server
Fault String = Error in connecting to EJB
My DD looks like :
<?xml version="1.0"?>
<isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment"
id="urn:result-files-fetcher">
<isd:provider type="org.apache.soap.providers.StatefulEJBProvider"
scope="Application"
methods="create">
<isd:java class="jobsession/JobSession"/>
<isd:option key="FullHomeInterfaceName"
value="ejb.jobsession.JobSessionHome" />
<isd:option key="ContextProviderURL" value="rmi://localhost:1099" />
<isd:option key="FullContextFactoryName"
value="com.sun.jndi.rmi.registry.RegistryContextFactory" />
</isd:provider>
<isd:faultListener>org.apache.soap.server.DOMFaultListener</isd:faultListener>
</isd:service>
And this is my main:
**************************************************************************************************************
public static void main(String[] args) throws Exception
{
// Usage: java de.teraport.enap.ador.GetResultFiles
http://localhost:8080/soap/service/rpcrouter loginname
if (args.length != 2){
System.err.println("Usage:");
System.err.println(" java " + GetResultFiles.class.getName() +
" SOAP-router-URL loginname");
System.exit (1);
}
System.out.println(args[0] +"..." +args[1]);
String encodingStyleURI = Constants.NS_URI_SOAP_ENC;
URL url = new URL(args[0]);
// Build the call.
Call call = new Call();
// the service was deployed with this address: see DD
call.setTargetObjectURI("urn:result-files-fetcher");
// the service offer the following methods: see DD
call.setMethodName("listAllFinishedJobs");
//call.setEncodingStyleURI(encodingStyleURI);
Vector params = new Vector();
/**params.addElement(new Parameter("login", String.class,
"arno2", null));
*/
call.setParams(params);
// Invoke the call.
Response resp;
try
{
resp = call.invoke(url, "");
}
catch (SOAPException e)
{
System.err.println("Caught SOAPException (" +
e.getFaultCode() + "): " +
e.getMessage());
return;
}
// Check the response.
if (!resp.generatedFault())
{
Parameter ret = resp.getReturnValue();
Object value = ret.getValue();
System.out.println(value != null ? "\n" + value : "I don't
know.");
}
else
{
Fault fault = resp.getFault();
System.err.println("Generated fault: ");
System.out.println (" Fault Code = " + fault.getFaultCode());
System.out.println (" Fault String = " + fault.getFaultString());
}
}
********************************************************************************************
"M. en C. Jesús Sosa Iglesias" wrote:
>
> Hi
>
> I wonder how your deploymentdescriptor.xml file looks like
> I have throubles trying to run the ejbtest.java client.
>
> I´m running Jonas 2.2.7 [EJB Container] with Apache-SOAP 2.1 and Tomcat
> 3.2.1
> This is my deploymentdescriptor.xml file
>
> <?xml version="1.0"?>
> <isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment"
> id="urn:ejbhello">
> <isd:provider type="org.apache.soap.providers.StatelessEJBProvider"
> scope="Application"
> methods="create">
> <isd:java class="samples/HelloService"/>
> <isd:option key="HelloService" value="samples.HelloServiceHome" />
> <isd:option key="ContextProviderURL" value="rmi://localhost:1099" />
>
> <isd:option key="FullContextFactoryName"
> value="com.sun.jndi.rmi.registry.RegistryContextFactory"/>
> </isd:provider>
>
> <isd:faultListener>org.apache.soap.server.DOMFaultListener</isd:faultLis
>
> </isd:service>
>
> And this is my client Fault:
>
> java samples.ejb.ejbtest http://localhost:8080/soap21/servlet/rpcrouter
>
> Ouch, the call failed:
> Fault Code = SOAP-ENV:Server
> Fault String = Error in Deployment Descriptor Property Settings