Click to See Complete Forum and Search --> : Error with web service client


samjam
February 24th, 2005, 05:04 PM
I am trying to create a client that consumes a web service that returns DIME attachment. But when I run the client, I get this error message.....

"Client found response content type of 'application/dime', but expected 'text/xml'"

Does anyone have an idea why?

Youe help is much appreciated.

-SamJam

jcmorin
February 24th, 2005, 06:46 PM
Hello samjam,
Web service usualy return an xml file... you return an attachement?

You want to send a "download" file via simple web page?
You need to add the header information.
Response.AddHeader("Content-Disposition", "filename=file.dime")

You want to keep the web service?
Then your output must be an xml and the return content should be encoded inside the xml (use base64 if the content is binary).

--------------------------
Jean-Claude Morin, MCP
Software Developer
2k1Soft/kCentric, Canada

bhashasy77
January 12th, 2007, 09:59 AM
Hi

How to get the attachment using href and content-id if the attachment is in the vector array?
I need to get the first element in the vector and typecast to byte[] object.

I have given the Sample Response i am receiving.

....</xxx><ns1:attachments xmlns="
AttachmentRef" xmlns:ns1="FabAttachmentRef">
<attachment href="cid:FE8D3D29383FD9ACC2DEFBC4EFA70BC9" xmlns="FabAtt
mentRef"/>
</ns1:attachments></soapenv:Body></soapenv:Envelope>
------=_Part_14_8781471.1168613845357
Content-Type: application/x-java-serialized-object; class="java.util.Vector"
Content-Transfer-Encoding: binary
Content-Id: <FE8D3D29383FD9ACC2DEFBC4EFA70BC9>
------