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 Sekhar Nadella <sh...@mastercard.com> on 2001/08/24 22:19:12 UTC
UnSupportedEncodingException
Hi,
I have installed apache/soap on WebSphere3.5(os/390). The rpcrouter servlet
working fine. I'm getting error when I'm trying to execute
ServiceManagerClient from my NT m/c to list the webservices on the server.
The command i used is
java org.apache.soap.server.ServiceManagerClient
http://myhost:80/soap/servlet/rpcrouter list
The Error message is
SOAPException: failed to encode mime multipart:
java.io.UnSupportedEncodingException: IBM-1047
So I have changed the code by replacing the the following line of code
Response resp = call.invoke (routerURL, "");
with the following code
SOAPMappingRegistry smr = call.getSOAPMappingRegistry();
SOAPContext reqCtx = call.getSOAPContext();
DocumentBuilder xdb = XMLParserUtils.getXMLDocBuilder();
Envelope callEnv = call.buildEnvelope();
StringWriter payloadSW = new StringWriter();
callEnv.marshall(payloadSW, smr, reqCtx);
reqCtx.setRootPart(payloadSW.toString(),
"text/xml; charset=IBM-1047");
hc.send(routerURL, "", null, null, smr, reqCtx);
SOAPContext respCtx = hc.getResponseSOAPContext();
String payloadStr = Call.getEnvelopeString(hc);
Document respDoc =
xdb.parse(new InputSource(new StringReader(payloadStr)));
Element payload = null;
if (respDoc != null)
{
payload = respDoc.getDocumentElement();
}
else
{
throw new SOAPException (Constants.FAULT_CODE_CLIENT,
"Parsing error, response was:\n" + payloadStr);
}
Envelope respEnv = Envelope.unmarshall(payload, respCtx);
Response resp = Response.extractFromEnvelope(respEnv, smr,
respCtx);
but still I'm getting the same error.
Has anybody faced this problem before ? any helps/suggestions are highly
appreciated.
Thanks & Regards,
Sekhar Nadella