You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@xml.apache.org by Marcus Daley <ma...@mdaley.net> on 2000/12/28 15:30:19 UTC

Create Call Object From Unknown Service - Possible?

I am curious if it is possible to create a call object from a non-registered
service?  I would like to be able to send SOAP messages that don't map to
registered services, but are instead fulfilled through other code I have
prepared.  However, using SOAP4J, I am getting an error when I execute this
code:

char[] payload = new char[contentLength];
Reader reader = request.getReader();
XMLParserLiaison xpl = new XercesParserLiaison ();
ServiceManager serviceManager = new ServiceManager ();
RPCRouter rpcRouter = new RPCRouter ();

reader.read(payload);

Document callDoc = xpl.read("- SOAP HTTP RPC Call Envelope -",
      new CharArrayReader (payload));
Element payloadEl = callDoc.getDocumentElement ();
Envelope callEnv = Envelope.unmarshall (payloadEl);

 rpcRouter.setServiceManager (serviceManager);
 Call call = rpcRouter.extractCallFromEnvelope (callEnv);

Here is the error that I get:

SOAP Service Manager: Unable to read 'DeployedServices.ds': assuming fresh
start

[SOAPException: faultCode=SOAP-ENV:Server; msg=service 'urn:xml ContactSync'
unk
nown]

Please remember, I don't want to have to register a service (hence "urn:xml
ContactSync" does not have a deployment descriptor).  I would like to just
instantiate the call object as is from the HTTPServletRequest object (as my
code attempts to do) and my code will then determine what to do from there
using the call object.  Does anyone have any suggestions, comments or ideas?
Thanks in advance,

     Marcus