Error in the response of a webservice

Dedicated to DataStage and DataStage TX editions featuring IBM<sup>®</sup> Service-Oriented Architectures.

Moderators: chulett, rschirm

Post Reply
suryadev
Premium Member
Premium Member
Posts: 211
Joined: Sun Jul 11, 2010 7:39 pm

Error in the response of a webservice

Post by suryadev »

I see the output in this way.....

nique_row_id><reason>Name,&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;</reason><first_nm xsi:nil="

and the below error

java.io.IOException: Character reference "&#0" is an invalid XML character

the output has to be only Name....but I see all the other characters....which results to error...


Do I need to change anything?
Thanks,
Surya
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You have a data type CHAR in your data, which DataStage has padded with the default string pad character 0x00 because of how the environment variable APT_STRING_PADCHAR has been set.

Either change the data type to VARCHAR and trim it, or specify " " as the pad character for CHAR data type.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
suryadev
Premium Member
Premium Member
Posts: 211
Joined: Sun Jul 11, 2010 7:39 pm

Post by suryadev »

where can I change the environment variable?apt_string_padchar....
I can see the output properly in a sequential file but when I change the target as WISD output.....I see the data....in that manner with an error also.
Thanks,
Surya
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Load the environment variable as a job parameter. Then you can change its default value and, if necessary, override its default value at run time.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

One additional note....I had a funny thing happen once with this variable where I had to set it to a single space.....with no quotes.....to get it to work.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
suryadev
Premium Member
Premium Member
Posts: 211
Joined: Sun Jul 11, 2010 7:39 pm

Post by suryadev »

Thanks,

I can see the output now

but it appears as NAME@@@@@@@@

any other change for only NAME

I used apt_string_padchar as job parameter and made it 0x40...
Thanks,
Surya
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

hex 40's are mainframe EBCDIC blanks... you probably want hex 20's (ASCII blanks). Or just use a single space in the display editor. Internally it should be a hex 20.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
suryadev
Premium Member
Premium Member
Posts: 211
Joined: Sun Jul 11, 2010 7:39 pm

Post by suryadev »

output now is "Name(emptyspace)"
Last edited by suryadev on Fri Jul 23, 2010 10:35 am, edited 1 time in total.
Thanks,
Surya
suryadev
Premium Member
Premium Member
Posts: 211
Joined: Sun Jul 11, 2010 7:39 pm

Post by suryadev »

where can I find the display editor?

will that allow me to send perfect response with out spaces
I mean "Name " to "Name"
Thanks,
Surya
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

see what happens if you use varchar on the final link instead...perhaps trimming it beforehand if necessary. You will have to redeploy the application.

Ernie
Ernie Ostic

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