Apache SOAP and JBoss
cdg511 Dec 7, 2001 10:44 AMHi, I'm having some issue with SOAP. I've got an EJB deployed through apache SOAP and JBOSS, but it appears that when tomcat comes to JBOSS to look up the bean, it's having issues even though I can look up the bean directly from a Java App. The deployment descriptor I'm using is this:
<?xml version="1.0"?>
<isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment" id="urn:demographics">
<isd: provider type="org.apache.soap.providers.StatelessEJBProvider" scope="Request" methods="getDemo">
<isd:java class="Demographics"/>
<isd:option key="FullHomeInterfaceName" value="com.nw.adaptors.demographics.DemographicsHome" />
<isd:option key="ContextProviderURL" value="jnp://localhost:1099" />
<isd:option key="FullContextFactoryName" value="org.jnp.interfaces.NamingContextFactory" />
</isd: provider>
<isd:faultListener>org.apache.soap.server.DOMFaultListener</isd:faultListener>
</isd:service>
And I'm trying to call the service like this:
String AO = "usernamepassword";
Vector params = new Vector();
params.addElement(new org.apache.soap.rpc.Parameter("MRN", String.class, "0000023211-03", null));
params.addElement(new org.apache.soap.rpc.Parameter("FACILITY_ID", String.class, "", null));
params.addElement(new org.apache.soap.rpc.Parameter("Authentication", String.class, AO, null));
Call c = new Call();
c.setMethodName("getDemo");
c.setParams(params);
c.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
c.setTargetObjectURI("urn:demographics");
Response resp = c.invoke(new URL("http://localhost:8080/soap/servlet/rpcrouter"), "http://localhost:8080/soap/servlet/rpcrouter/demographics");
if (resp.generatedFault()) {
System.out.println(resp.getFault().toString());
}else {
System.out.println((String)resp.getReturnValue().getValue());
}
The result that I get is:
[SOAPException: faultCode=SOAP-ENV:Client; msg=A 'http://schemas.xmlsoap.org/soap/envelope/:Fault' element must contain a: 'faultcode' element.; targetException=java.lang.IllegalArgumentException: A 'http://schemas.xmlsoap.org/soap/envelope/:Fault' element must contain a: 'faultcode' element.]
at org.apache.soap.rpc.Call.invoke(Call.java:246)
at test.Test.main(Test.java:36)
And in the JBoss window I see:
[Default] In TemplateProvider.locate()
[Default] URI: urn:demographics
[Default] DD.ServiceClass: org.apache.soap.providers.StatelessEJBProvider
[Default] DD.ProviderClass: Demographics
[Default] Call.MethodName: getDemo
[Default] Exception caught: javax.naming.NameNotFoundException: Demographics not
bound
Any help with this would be greatly appreciated, as I'm completely stumped at this point