M
mchristyuk
Hi everyone,
I was hoping somebody could shed some light on a puzzling issue I have
doing attachments with Jax-WS.
The scenario is that I send a file to a service as an attachment.. the
service processes the file.. then at a later date I call the service
again to get the processed file back.
I am using Java 6, Netbeans 6 and Sun App Server 9 (bundled with
Netbeans 6) as my platform.
Now my problem is that I can send attachments fine from the client to
the service.. however when ever I put an attachment on a response from
a service it never gets back to the client. The response arrives but
with no attachments.
When I send from the client to the service I get a context from a
BindingProvider, put in a DataHandler and add this to the context as
an OUTBOUND_MESSAGE_ATTACHMENTS type.. this arrives at the service and
I can get my attachments from the WebServiceContext object and they
are there as INBOUND_MESSAGE_ATTACHMENTS.
I thought that to send a file as an attachment back to the client I
would do a very similar thing.. except instead of using the
BindingProvider I just use the WebServiceContext. I go through exactly
the same process.. however my message received at the client has no
attachments.
I'm tearing my hair out over this one.. is there something silly I'm
missing? I've searched on Google high and low but all the posts I see
are about client to service.. not service to client..
I am getting no errors exceptions either..
Help!.. what am I doing wrong? Is the WebServiceContext only
applicable to incoming calls and therefore I need to create something
else for a response call?
Many Thanks
Mark Christy
I was hoping somebody could shed some light on a puzzling issue I have
doing attachments with Jax-WS.
The scenario is that I send a file to a service as an attachment.. the
service processes the file.. then at a later date I call the service
again to get the processed file back.
I am using Java 6, Netbeans 6 and Sun App Server 9 (bundled with
Netbeans 6) as my platform.
Now my problem is that I can send attachments fine from the client to
the service.. however when ever I put an attachment on a response from
a service it never gets back to the client. The response arrives but
with no attachments.
When I send from the client to the service I get a context from a
BindingProvider, put in a DataHandler and add this to the context as
an OUTBOUND_MESSAGE_ATTACHMENTS type.. this arrives at the service and
I can get my attachments from the WebServiceContext object and they
are there as INBOUND_MESSAGE_ATTACHMENTS.
I thought that to send a file as an attachment back to the client I
would do a very similar thing.. except instead of using the
BindingProvider I just use the WebServiceContext. I go through exactly
the same process.. however my message received at the client has no
attachments.
I'm tearing my hair out over this one.. is there something silly I'm
missing? I've searched on Google high and low but all the posts I see
are about client to service.. not service to client..
I am getting no errors exceptions either..
Help!.. what am I doing wrong? Is the WebServiceContext only
applicable to incoming calls and therefore I need to create something
else for a response call?
Many Thanks
Mark Christy