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 Rich Catlett <ri...@more.net> on 2001/08/10 21:30:52 UTC
IllegalArgument Exception
I have created a client and a service. The client sends an XML document
as an attachment, currently the service just retrieves the document and
sends it back. I wrap the attachment in a MimeBodyPart and add it to
the message that gets sent. I also create an envelope
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<ServiceRouter xmlns="urn:routeService">
<attach name="XMLData" location="0">XMLData</attach>
</ServiceRouter>
</s:Body>
</s:Envelope>
I do the following to unmarshall it into an envelope
DocumentBuilder xdb = XMLParserUtils.getXMLDocBuilder();
StringReader reader = new StringReader(envelope);
doc = xdb.parse(new InputSource(reader));
msgenv = Envelope.unmarshall(doc.getDocumentElement());
and then I send it
msg.send("https://localhost:445/soap/servlet/messagerouter", "", msgenv);
I've already worked through the SSL stuff and all of that works I can
run the mime sample and that sends an attachment over SSL.
When I get to this point I get an error
SOAPException: faultCode=SOAP-ENV:Client; msg=Error opening socket:
null; targetException=java.lang.IllegalArgumentException: Error opening
socket: null]
at
org.apache.soap.transport.http.SOAPHTTPConnection.send(SOAPHTTPConnection.java:324)
at org.apache.soap.messaging.Message.send(Message.java:123)
at
net.more.servlets.schema.ExecuteSoap.executeSoap(ExecuteSoap.java:157)
at MoreMessage.main(MoreMessage.java:47)
This is the deployment descriptor for my service
<isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment"
id="urn:routeService" type="message">
<isd:provider type="java" scope="Application" methods="ServiceRouter">
<isd:java class="net.more.servlets.schema.RouteService" static="false"/>
</isd:provider>
<isd:faultListener>org.apache.soap.server.DOMFaultListener</isd:faultListener>
</isd:service>
Does anybody have any ideas what might be wrong. xerces.jar is the only
parser in my classpath, and I can get the samples to work.
Thanks.
Rich Catlett