users@jax-rpc.java.net

Re: Client with attachments!

From: Oancea Daniel <doancea_at_gmail.com>
Date: Fri, 23 Sep 2005 11:07:10 +0100

Hi ,

here is my entire log message:

==============
Listen Port: 1201
Target Host: 127.0.0.1 <http://127.0.0.1>
Target Port: 8080
==== Request ====
POST /streamFile/Stream HTTP/1.1
Content-Type: text/xml; charset=utf-8
Content-Length: 384
SOAPAction: "getFile"
User-Agent: Java/1.5.0_03
Host: 127.0.0.1:1201 <http://127.0.0.1:1201>
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Connection: keep-alive

<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" xmlns:enc="
http://schemas.xmlsoap.org/soap/encoding/">
<env:Body>
<ans1:request xmlns:ans1="http://www.your-company.com/StreamFile.xsd1"
>2</ans1:request>
</env:Body>
</env:Envelope>
==== Response ====
HTTP/1.1 200 OK
Accept: application/fastinfoset, text/html, image/gif, image/jpeg, *; q=.2,
*/*; q=.2
SOAPAction: ""
Content-Type: multipart/related; type="text/xml";
boundary="----=_Part_2_32717744.1127469653710"
Transfer-Encoding: chunked
Date: Fri, 23 Sep 2005 10:00:53 GMT
Server: Sun-Java-System/Web-Services-Pack-1.4

2be
------=_Part_2_32717744.1127469653710
Content-Type: text/xml; charset=utf-8

<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" xmlns:enc="
http://schemas.xmlsoap.org/soap/encoding/">
<env:Body/>
</env:Envelope>------=_Part_2_32717744.1127469653710Content-Type:
text/xmlContent-Id:
<response=1afa54bf-f2b5-4f9a-b266-abc1d1f9186e_at_jaxrpc.sun.com>
<properties>
<test1>1</test1>
<test2>2</test2>
<test3>3</test3>
<test4>4</test4>
</properties>------=_Part_2_32717744.1127469653710--
0


==============

Thanks,
Daniel



On 9/22/05, Vivek Pandey <Vivek.Pandey_at_sun.com> wrote:
>
> can you send the complete message log from your monitoring tool
> including the attachment part. Looks like the Content-ID of the
> attachment is not whats expected by the client side stub.
>
> -vivek.
>
> Oancea Daniel wrote:
>
> > Hi all,
> >
> > I have an problem with an client that has to receive an attachment.
> > From what I see, using an monitoring tool, the response SOAP Message
> > contain the attachment that suppose to arrive on client side, but the
> > client is not capable to dispatch it.
> >
> > Here is my operation description from the WSDL file:
> >
> > <wsdl:operation name="getFile">
> > <soap:operation soapAction="getFile"/>
> > <wsdl:input>
> > <soap:body parts="request" use="literal"/>
> > </wsdl:input>
> > <wsdl:output>
> > <mime:multipartRelated>
> > <mime:part>
> > <soap:body parts="" use="literal"/>
> > </mime:part>
> > <mime:part>
> > <mime:content part="response"
> > type="application/octet-stream"/>
> > </mime:part>
> > </mime:multipartRelated>
> > </wsdl:output>
> > </wsdl:operation>
> >
> > on the client side I made something like that:
> > .............
> > DataHandler dh = client.getFile(2);
> > int resp = data.getInputStream().available();
> > System.out.println("receive: "+resp+" bytes!");
> > ...............
> >
> > the error response is:
> > java.rmi.RemoteException: no attachment with id "response" found in
> > message; nested exception is:
> > [java] no attachment with id "response" found in message
> > [java] at
> > enthrone.StreamFilePortType_Stub.getFile
> (StreamFilePortType_Stub.java:79)
> > [java] at enthrone.Client.main(Client.java:24)
> > [java] Caused by: no attachment with id "response" found in message
> > [java] at
> > enthrone.StreamFilePortType_Stub.getAttachment
> (StreamFilePortType_Stub.java:194)
> > [java] at
> > enthrone.StreamFilePortType_Stub.getFile
> (StreamFilePortType_Stub.java:72)
> > [java] ... 1 more
> >
> > Any suggestions will be overcome!
> >
> > Thanks
> >
> >
>
> --
> Vivek Pandey
> Web Services Standards and Technologies
> Sun Microsystems Inc.
>
>
>
>