axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Barth <thomasxba...@web.de>
Subject [newbie] server-application for soap-messages?
Date Tue, 06 Nov 2007 20:07:15 GMT
Hi,
I want to create a socket server to be able to get soap-messages from
connected clients. The client should get a response as soap-messag too.

The SocketServer reads data as follows

  public void run() {
    try {
      InputStream inputStream = socket.getInputStream();

      ByteArrayOutputStream byteArrayOutputStream = new
ByteArrayOutputStream();
      byte[] buf = new byte[4096];
      int bufcount;
      while ((bufcount = inputStream.read(buf)) > 0) {
        byteArrayOutputStream.write(buf, 0, bufcount);
      }

The data consist of a multipart/related message:

POST  HTTP/1.0
Content-Type: multipart/related;
        boundary="----=_Part_1_5546792.1194363637711"; type="text/xml";
start="3fa4a6eef42c6ae1bc2af56c84ffdeb43333479e"
Content-Length: 20388
Authorization: Basic dTAwMDFhNGQ6Nm5ScXNXbzE=
SOAPAction: ""

------=_Part_1_5546792.1194366154523
Content-Type: text/xml; charset=UTF-8
Content-Transfer-Encoding: binary
Content-ID: 0b3a28cf8e010f2f83c1edabe8b29546b8d776bc

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <soapenv:Header>
  <ns1:TransactionID soapenv:mustUnderstand="1" xsi:type="xsd:string"
xmlns:ns1="http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/
schema/REL-5-MM7-1-2">d3050f28b717095923f65657d427a8a8c63b5ea2</ns1:TransactionID>
 </soapenv:Header>
 <soapenv:Body>
  ....
 </soapenv:Body>
</soapenv:Envelope>

------=_Part_1_5546792.1194366154523
Content-Type: multipart/mixed;
        boundary="----=_Part_0_20590970.1194366154479"
Content-Transfer-Encoding: binary
Content-ID: <EA3DDCF918B7D8BB4388D3B59C58270FA55FB2FB>

------=_Part_0_20590970.1194366154479
Content-Type: text/plain; name=message.txt; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Content-ID: <message.txt>

my picture
------=_Part_0_20590970.1194366154479
Content-Type: image/jpg; name=pic.jpg
Content-Transfer-Encoding: base64
Content-ID: <pic.jpg>

/9j/4AAQSkZJRgABAQEASABIAAD/4QAWRXhpZgAATU0AKgAAAAgAAAAAAAD//gAXQ3JlYXRlZCB3
vUjAXvgHAoXMZ9VIyDLmH7G7Luc6P6JYflW6eqniBGPDpg64ed5zl0+HdLC8q5raP1Le32NJOo//
2Q==
------=_Part_0_20590970.1194363637674--

------=_Part_1_5546792.1194363637711--

Can you give me a hint of how to use axis to get the elements of the
message ? I just want to save the attachement of such a message as a
file and send the status code as a soap message back to connected client.

Regards,
Thomas B

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message