[vwnc] Opentalk & Soap attachments

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[vwnc] Opentalk & Soap attachments

Reinout Heeck-2
Hi,

I am working on a project where I need to send and receive files with
SOAP as an attachment.
I have up to now not found a way to do this in VW76, but maybe I have
overlooked something.
Does anybody know if this is supported in VW7.6 or any other releases,
or how to implement this?
See specifications for SOAP attachments:
http://www.w3.org/TR/SOAP-attachments

Regards,

Christiaan
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Opentalk & Soap attachments

Kogan, Tamara
Christian,

The SOAP attachments are not supported in VW.

You can try something like this:
client := WsdlClient readFrom: wsdlSchema readStream.
request := client newRequest.
args := anObject.
request smalltalkEntity: (Message selector: #myOperation arguments: args).
request setOperation.
request marshal. <- it will create a simple Http request with marshaled contents
contents := request contents.
You can extract binary elements from the contents and add them as attachements
xpath := XML.XPathParser new parse: 'myData' as: #locationPath.
Nodes := (xpath xpathValueFor: anElement variables: nil) sortedNodes.
Part := MimeEntity new contents: nodes first printString.
Part contentType: 'image/tiff'/Content-Transfer-Encoding: binary/Content-ID: some id
Request addPart: part.
Set correct contents type for the request and sent the request;
response := request executeWith: client  transportClient.

HTH,
Tamara Kogan
Smalltalk development,
Cincom Systems
 

> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of Christiaan Nooteboom
> Sent: Monday, November 16, 2009 8:28 AM
> To: [hidden email]
> Subject: [vwnc] Opentalk & Soap attachments
>
> Hi,
>
> I am working on a project where I need to send and receive files with
> SOAP as an attachment.
> I have up to now not found a way to do this in VW76, but maybe I have
> overlooked something.
> Does anybody know if this is supported in VW7.6 or any other
> releases,
> or how to implement this?
> See specifications for SOAP attachments:
> http://www.w3.org/TR/SOAP-attachments
>
> Regards,
>
> Christiaan
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Opentalk & Soap attachments

Reinout Heeck-2
Thank you very much!
For the client that would work, I do no know yet how I could apply this to a SOAP service though...

Regards,

Christiaan


Kogan, Tamara wrote:
Christian,

The SOAP attachments are not supported in VW.

You can try something like this:
client := WsdlClient readFrom: wsdlSchema readStream. 
request := client newRequest.
args := anObject.
request smalltalkEntity: (Message selector: #myOperation arguments: args).
request setOperation.
request marshal. <- it will create a simple Http request with marshaled contents
contents := request contents. 
You can extract binary elements from the contents and add them as attachements
xpath := XML.XPathParser new parse: 'myData' as: #locationPath.
Nodes := (xpath xpathValueFor: anElement variables: nil) sortedNodes.
Part := MimeEntity new contents: nodes first printString.
Part contentType: 'image/tiff'/Content-Transfer-Encoding: binary/Content-ID: some id
Request addPart: part.
Set correct contents type for the request and sent the request;
response := request executeWith: client  transportClient. 

HTH,
Tamara Kogan 
Smalltalk development,
Cincom Systems
 

  
-----Original Message-----
From: [hidden email] 
[[hidden email]] On Behalf Of Christiaan Nooteboom
Sent: Monday, November 16, 2009 8:28 AM
To: [hidden email]
Subject: [vwnc] Opentalk & Soap attachments

Hi,

I am working on a project where I need to send and receive files with 
SOAP as an attachment.
I have up to now not found a way to do this in VW76, but maybe I have 
overlooked something.
Does anybody know if this is supported in VW7.6 or any other 
releases, 
or how to implement this?
See specifications for SOAP attachments: 
http://www.w3.org/TR/SOAP-attachments

Regards,

Christiaan
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

    

  


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Opentalk & Soap attachments

kobetic
In reply to this post by Reinout Heeck-2
"Christiaan Nooteboom"<[hidden email]> wrote:
> Thank you very much!
> For the client that would work, I do no know yet how I could apply this
> to a SOAP service though...

On the server side you should be able to inject similar sort of extra processing using broker events or interceptors.

Martin
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Opentalk & Soap attachments

Reinout Heeck-2
Hi Martin,

Thank you for your response!

I am not sure what you are talking about, I have last week investigated possibilities and implemented a working solution.
We had slightly more work to get SOAP attachments working correctly in our system on both Service and Client side.
We have subclassed:
WebServices.HrefMarshaler
Opentalk.SOAPReply
Opentalk.SOAPRequest
Opentalk.SOAPMarshaler
Opentalk.SOAPMarshalerConfiguration
WebServices.SoapMarshalingManager
WebServices.SoapMessage
WebServices.SoapRequest
WebServices.SoapResponse
 and extended the SoapParameterMarshaler, RelationMarshaler and XMLTypeMarshaler.
and can now marshal and unmarshal filehandles that are referenced by href from the soap body or header.

This now works, but is there a simpler way of doing this?
On another note when will there be support for SOAP 1.2 in VW?

Regards,

Christiaan


[hidden email] wrote:
"Christiaan Nooteboom"[hidden email] wrote:
  
Thank you very much!
For the client that would work, I do no know yet how I could apply this
to a SOAP service though...
    

On the server side you should be able to inject similar sort of extra processing using broker events or interceptors.

Martin

  


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Opentalk & Soap attachments

kobetic
In reply to this post by Reinout Heeck-2
What I had in mind was hooking into the server side processing using broker events. See "Using Broker Events" in the OpentalkDevGuide, or for quick illustration try running a broker with the following applied to it:

        brokers sendAllEventsTo: EventPrinter new

(Note that the above will attempt to print any arguments of any remote messages and their replies, so if that goes wrong the communication breaks down).

Interceptors are a more recent variation of the same. They are described in "Message Interceptors" in ReleaseNotes7.4.pdf. For example all the SOAP header processing is implemented in terms of interceptors. For a simpler example you can also take a look at the tests using the UCPasswordProcessor in Opentalk-SOAP-Tests (in the public repository).

These might help you avoid subclassing and overriding internal details of the implementation.

HTH,

Martin

"Christiaan Nooteboom"<[hidden email]> wrote:

> Hi Martin,
>
> Thank you for your response!
>
> I am not sure what you are talking about, I have last week investigated
> possibilities and implemented a working solution.
> We had slightly more work to get SOAP attachments working correctly in
> our system on both Service and Client side.
> We have subclassed:
> WebServices.HrefMarshaler
> Opentalk.SOAPReply
> Opentalk.SOAPRequest
> Opentalk.SOAPMarshaler
> Opentalk.SOAPMarshalerConfiguration
> WebServices.SoapMarshalingManager
> WebServices.SoapMessage
> WebServices.SoapRequest
> WebServices.SoapResponse
> &nbsp;and extended the SoapParameterMarshaler, RelationMarshaler and
> XMLTypeMarshaler.
> and can now marshal and unmarshal filehandles that are referenced by
> href from the soap body or header.
>
> This now works, but is there a simpler way of doing this?
> On another note when will there be support for SOAP 1.2 in VW?
>
> Regards,
>
> Christiaan
>
>
> [hidden email] wrote:
>
>   "Christiaan Nooteboom"&lt;[hidden email]&gt; wrote:
>  
>  
>     Thank you very much!
> For the client that would work, I do no know yet how I could apply this
> to a SOAP service though...
>    
>  
>  
> On the server side you should be able to inject similar sort of extra processing using broker events or interceptors.
>
> Martin
>
>  
>
>
>
>

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc