axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Philippe GENESTE" <genes...@club-internet.fr>
Subject help !!! DIME attachments problems
Date Wed, 09 Jul 2003 05:28:13 GMT
Hello,

Sorry i'm new on SOAP with attachments !!!


I try to download file from Server (AXIS) on client (Gsoap) via a web
service. I have a problem to retrieve files on client side (problem
in GSOAP soap_lookup_type function)

Perhaps someone can tell me what is wrong in my implementation.

Here my server side code (i send in response the received request):

public Element test(Element xmlRequest)
throws org.apache.axis.AxisFault,java.io.IOException,
org.xml.sax.SAXException,java.awt.datatransfer.UnsupportedFlavorExcept
ion,javax.xml.parsers.ParserConfigurationException,
java.lang.ClassNotFoundException,javax.xml.soap.SOAPException {

//force to do a DIME transfer
Message rspmsg = AxisEngine.getCurrentMessageContext
().getResponseMessage();
rspmsg..getAttachmentsImpl().setSendType
(org.apache.axis.attachments.Attachments.SEND_TYPE_DIME);

AttachmentPart replyPart= new
org.apache.axis.attachments.AttachmentPart(
new DataHandler(new FileDataSource
("c:\\test\\test1.zip")));
replyPart.setContentId("xaoTransfert_toto63");
rspmsg.addAttachmentPart(replyPart);

replyPart= new org.apache.axis.attachments.AttachmentPart(
new DataHandler(new FileDataSource
("c:\\test\\test2.zip")));
replyPart.setContentId("xaoTransfert_toto64");
rspmsg.addAttachmentPart(replyPart);

return xmlRequest;
}


Here's my deployment file for server

<deployment xmlns="http://xml.apache.org/axis/wsdd/"
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"
xmlns:ns1="urn:XAOEnvironmentWService">
<service name="urn:XAOEnvironmentWService" provider="java:RPC" >
<parameter name="className"
value="com.test.ctd.webservice.XAOEnvironmentServices"/>
<parameter name="allowedMethods" value="test download"/>

<operation name="test" returnQName="getObjectResponseReturn" >
<parameter name="xmlRequest"/>
</operation>
<operation name="download" returnQName="getObjectResponseReturn">
<parameter name="xmlRequest"/>
</operation>
</service>
</deployment>



Here's the request (and response in test)
<Root>
<Test> Here is a test</Test>
</Root>


I supposed i make a mistake somewhere in references or something like
that because on client side, i don't retrieve anything in iht table.

How to add reference id of DIME attachment in my XML response (or in another
place.

Thanks in advance for your help

Philippe



Mime
View raw message