cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Nintex Newbie

Get byte stream of a picture

Hi,

I would like to get the byte stream of a picture in order to save this stream into the AD attribute thumbnailPhoto via the use of the action "Update AD user"

So far I'm using the Copy.GetItem method and in general it looks quite promising...

 

When running a test I can see the stream in the result box.

But when running the workflow it throws me the error...

Failed to invoke web service. 'undefined/undefined:m:Stream' has an invalid token
Variable Var_Picture_Bytes is Multiple lines of text.
Does anybody has an idea how to fix this?
Thank you
Reply
12 Replies
Highlighted
Automation Master
Automation Master

Re: Get byte stream of a picture

there is something weird with your output configureation.

how did you get there 'undefined'?

there should be a xpath to an element (m:stream) you want to extract.

try to remove output configuration and set it up once again.

Reply
Highlighted
Nintex Newbie

Re: Get byte stream of a picture

Hi Marian,

I did it several times and I also tried other attributes than m:Stream

But always the selected result is undefined:m:Stream.

Today I have implemented it within a list workflow not a site workflow because I thought maybe then the undefined will be replaced. But unfortunately same situation.

As you can see I always get "undefined..." and not "/soap:Evelope/..." as you have.

Is there something which needs to be configured somewhere centrally?

Reply
Highlighted
Automation Master
Automation Master

Re: Get byte stream of a picture

it looks like it can not read or parse response definition from wsdl correctly.

can you post how does XML tree looks like in 'specify element' dialog?

try to directly read wsdl definition by putting   <site_URL>/_vti_bin/Copy.asmx?wsdl into browser and check definition of GetItem element and its response.

Reply
Highlighted
Nintex Newbie

Re: Get byte stream of a picture

I have now put <site_URL>/_vti_bin/Copy.asmx?wsdl into the action but there is still "undefined" even after refreshing the method selection.

XML tree looks like this:

I am able to read <site_URL>/_vti_bin/Copy.asmx?wsdl properly.

Thank you

Reply
Highlighted
Automation Master
Automation Master

Re: Get byte stream of a picture

hm, that all seems to be correct....

have you tried to read ?wsdl with the same user credentials as you invoke web service?

if you try to get default value, does it work?

Reply
Highlighted
Nintex Newbie

Re: Get byte stream of a picture

Yes I am using the same user.

When changing to the default value everything is fine without an error. Result is "0"

Reply
Highlighted
Automation Master
Automation Master

Re: Get byte stream of a picture

do you have a chance to call the web service from an other application/tool (like soapui)?

just to proof whether problem is at service side or at nintex side.

what workflow version are you on?

Reply
Highlighted
Nintex Newbie

Re: Get byte stream of a picture

Hello Marian,

I have tried with soapui but without success --> "Unexpected end of file after null"

I have also found this thread with similar problem Call WebService action can't parse XML-schema 

My version is: Version: 3.1.6.0 - English, License type: Development (Enterprise)

Thank you

Reply
Highlighted
Automation Master
Automation Master

Re: Get byte stream of a picture

so you are on release from Oct 2015 and it's reported there to be resolved in Feb 2016 release 3.1.7.10

it looks your only option is to upgrade your env.

Reply