axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xinjun Chen" <xjchen...@gmail.com>
Subject [Axis2 1.2] Axis2 attachment interoperability???
Date Tue, 12 Jun 2007 10:27:38 GMT
Hi Axis2 users and developers,

I am not sure whether I should consider the problem I encountered as Axis2
attachment interoperability. I have posted the question in another thread.
But I hope this thread can explain my problem clearer.

The following is the problem I encountered:

Currently I have a web service receiving attachment and returning some other
attachment. Since currently the web service only returns one attachment and
returning only one attachment, my web service is assuming the first
attachment is the required attachment for further processing.

I have been using XML Exchanger Lite to produce the SOAP request with
attachment. The request is as follows:

##############################################
Multipart Request created by XML Exchanger Lite
##############################################

POST /wsg/services/coi/HWACEWebService HTTP/1.1
Content-Type: multipart/related; type="text/xml";
boundary="----=_Part_2_12191487.1181639896483"
Content-Length: 7120
SOAPAction: urn:submitManifest
Cache-Control: no-cache
Pragma: no-cache
User-Agent: Exchanger XML Editor/3.2 Java/1.4.2_11
Host: localhost:7001
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Connection: keep-alive

------=_Part_1_14487431.1181639896264
Content-Type: text/xml

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance">
  <SOAP-ENV:Body xmlns="http://hwams.mycompany.com/xsd">
    <submitManifest>
      <senderID>acews01</senderID>
      <password>testtest</password>
      <docType>standard_cuscar</docType>
      <submissionFileName>HQ-S-VIRTUALXML.CUSCAR.xml</submissionFileName>
    </submitManifest>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
------=_Part_1_14487431.1181639896264
Content-Type: application/octet-stream
Content-Id: HQ-S-VIRTUALXML.CUSCAR.xml

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<e_manifest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="R:\SCODE01\DEVM\IFX\IFX100\ACE\XSD\Manifest
External Schemas + Documentations\Manifest
1.12\CUSCAR(submission)\e_complete_cuscar.1.11.xsd">
<!-- Contents of an XML file whose size is about 7KB -->
</e_manifest>
------=_Part_1_14487431.1181639896264--

##############################################
END OF Multipart Request created by XML Exchanger Lite
##############################################


The server side is using Axis2 to send attachment. Please refer to the
attached ServerProgram.
The current server program can works properly, and send an acknowledgement
file as attachment:

##############################################
START of Server Response
##############################################

HTTP/1.1 200 OK
Date: Tue, 12 Jun 2007 09:18:16 GMT
Server: WebLogic Server 8.1 SP2 Fri Dec 5 15:01:51 PST 2003 316284
Content-Type: multipart/related;
boundary=MIMEBoundaryurn_uuid_3E24C909072BF5DDDF1181639896910;
type="text/xml"; start="<
0.urn:uuid:3E24C909072BF5DDDF1181639896911@apache.org>"; charset=UTF-8
Transfer-Encoding: chunked

--MIMEBoundaryurn_uuid_3E24C909072BF5DDDF1181639896910
Content-Type: text/xml; charset=UTF-8
Content-Transfer-Encoding: 8bit
Content-ID: <0.urn:uuid:3E24C909072BF5DDDF1181639896911@apache.org>

<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="
http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><acex:submitManifestResponse
xmlns:acex="http://hwams.mycompany.com/xsd"><acex:return>nullAck.xml
</acex:return></acex:submitManifestResponse></soapenv:Body></soapenv:Envelope>
--MIMEBoundaryurn_uuid_3E24C909072BF5DDDF1181639896910
Content-Type: application/octet-stream
Content-Transfer-Encoding: binary
Content-ID: <urn:uuid:3E24C909072BF5DDDF1181639896815>

<root>
    <originalFileName>This is an sample error acknowledgement
file.</originalFileName>
    <status>no ack generated.</status>
</root>
--MIMEBoundaryurn_uuid_3E24C909072BF5DDDF1181639896910--

##############################################
END of Server Response
##############################################


Using the Axis2 Client program (please refer to the attached ClientProgram),
I get the following Request message:

##############################################
Multipart Request created by Axis2 Client Program
##############################################

POST /wsg/services/coi/HWACEWebService HTTP/1.0
Content-Type: multipart/related;
boundary=MIMEBoundaryurn_uuid_1483F52F7EBB91BE7D1181639175926;
type="text/xml"; start="<
0.urn:uuid:1483F52F7EBB91BE7D1181639175927@apache.org>"; charset=UTF-8
SOAPAction: "urn:submitManifest"
User-Agent: Axis2
Host: localhost:7001
Content-Length: 7307

--MIMEBoundaryurn_uuid_1483F52F7EBB91BE7D1181639175926
Content-Type: text/xml; charset=UTF-8
Content-Transfer-Encoding: 8bit
Content-ID: <0.urn:uuid:1483F52F7EBB91BE7D1181639175927@apache.org>

<?xml version='1.0' encoding='UTF-8'?><SOAP-ENV:Envelope xmlns:SOAP-ENV="
http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="
http://www.w3.org/2001/XMLSchema">
  <SOAP-ENV:Body xmlns="http://ejb.hwams.trade.crimsonlogic.com/xsd">
    <submitManifest>
      <senderID>acews01</senderID>
      <password>testtest</password>
      <docType>standard_cuscar</docType>
      <submissionFileName>HQ-S-VIRTUALXML.CUSCAR.xml</submissionFileName>
    </submitManifest>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
--MIMEBoundaryurn_uuid_1483F52F7EBB91BE7D1181639175926
Content-Type: application/octet-stream
Content-Transfer-Encoding: binary
Content-ID: <urn:uuid:1483F52F7EBB91BE7D1181639175549>

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<e_manifest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="R:\SCODE01\DEVM\IFX\IFX100\ACE\XSD\Manifest
External Schemas + Documentations\Manifest
1.12\CUSCAR(submission)\e_complete_cuscar.1.11.xsd">
<!-- Contents of an XML file whose size is about 7KB -->
</e_manifest>

--MIMEBoundaryurn_uuid_1483F52F7EBB91BE7D1181639175926--

##############################################
END of Multipart Request created by Axis2 Client Program
##############################################



I have some questions about the server response:

The whole SOAP response envelope is considered as an attachment with
content-ID = <0.urn:uuid:3E24C909072BF5DDDF1181639896911@apache.org>.
This is exactly the value of "start" HTTP header in the response.

Is this a standard operation or it is proprietary to Axis2? I didn't see
"start" header in the SOAP request generated by XML Exchanger Lite.

Can I assume the following: If content-ID of a part starts with "<
0.urn:uuid:", then it must be the SOAP request/response part?


If my web service assumes XML Exchanger Lite as client, I need to extract
the FIRST (index 0) content-ID and treat its content as attachment. But if
my web service assumes Axis2 ClientProgram as client, I need to extract the
second (index 1) content-ID and treat its content as attachment.

How can I solve this interoperability issue on attachment?


Regards,
Xinjun

Mime
View raw message