Webservice : "No support for attachments"

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
DamienF
Participant
Posts: 5
Joined: Thu May 18, 2017 1:41 am

Webservice : "No support for attachments"

Post by DamienF »

Hello,

I'm facing a boring issue using webservice transformer in a PX job.

When calling for the webservice i got the following warning :

Code: Select all

Web_Services_Transformer,0: Warning: job_PS9_Get_Status_Job.Web_Services_Transformer: 0047`:`com.ascentialsoftware.wsclient.ServiceInvocationException: Service invocation exception: <Fault xmlns="http://schemas.xmlsoap.org/soap/envelope/">
   <faultcode xmlns="">Server.userException</faultcode>
   <faultstring xmlns="">java.lang.RuntimeException: No support for attachments</faultstring>
   <detail xmlns="">
    <stackTrace xmlns="http://xml.apache.org/axis/">java.lang.RuntimeException: No support for attachments
When looking in the web i found that i need to include activation.jar and mail.jar, so my question is the following : How can i add those jar to my webservice stage ?

Before you answer that it's not possible i have an example using it so it is possible. When i extract in dsx the one using those libs i got something like :

Code: Select all

 is_proxy_required=0, 
   user_classpath=\\'[&"DSCAPIOP_$THIRD_PARTY_LIBPATH"]\\/activation\\.jar [&"DSCAPIOP_$THIRD_PARTY_LIBPATH"]\\/mail\\.jar\\'
So a property user_classpath is added to the webservice stage but i can't figure out where i can add this.

Thanks for your help !
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

There isn't any way to do it via the Stage...meaning....there is no provision for telling the Stage about a file or files that you might want to attach, and the Stage does not support the protocols needed for SOAP 1.2, when SOAP with Attachments was first put into place.

Two possible options are:

a) use the WS Stage only for its HTTP protocol options. If you look carefully at the input and output link "message" tabs, you will see a pull down for "User Defined Message". This specifies a column that contains YOUR payload. Determine exactly what a "perfectly working" payload looks like for the Web Service you are trying to call when sending a file, and see what methods that payload is required to have in order to pass the content. There are many ways.... one common method is to send binary data by expanding it into a base64 encoding for shipment in xml over the wire. Upstream from the Stage, you could figure out a way to do that, build your payload, and go from there. Hard to say how you would pick up the files, but there are numerous ways that DataStage could reach out and "grab" something on the fly. Tedious. ...but do-able.

b) Write your own web service call using java and use the java integration stage. Find someone who knows how to do web services with attachments and integrate their code into DataStage..... this makes the most sense when you are already doing this as integration with sonmething else that DataStage was chosen for and is doing as a part of the same application....such as perhaps loading gigs of data into hadoop and "on the way" also needs to call a web service. This is probably the most appropriate path for most situations.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
Post Reply