ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Building arrayType element

Post new topic  Reply to topic
 Building arrayType element « View previous topic :: View next topic » 
Author Message
mq_abcd
PostPosted: Wed Oct 07, 2009 9:08 pm    Post subject: Building arrayType element Reply with quote

Acolyte

Joined: 13 Jun 2004
Posts: 69

Hello All,

I am trying to invoke a webservice which has one of its elements defined as of type ArrayOf_xsd_string
Below is the definition
Quote:
<element name="empIds" nillable="true" type="impl:ArrayOf_xsd_string"/>

<complexType name="ArrayOf_xsd_string">
<complexContent>
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:string[]"/>
</restriction>
</complexContent>
</complexType>


I have tried couple of different statements as below to create that element but all of them are sending the field as a string.
Code:
DECLARE EMP_ID CHARACTER '12345678';

SET outCursor.empIds = EMP_ID;
SET outCursor.empIds[1] = EMP_ID;
SET outCursor.empIds[] = LIST{EMP_ID, ''};


The error I get from the webservice is
Quote:
faultstring:CHARACTER:org.xml.sax.SAXException: Found character data inside an array element while deserializing


I did searched in the forum but that didn't helped.
My Broker Version is 6.1.0.5

Thanks in advance.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Oct 07, 2009 9:51 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Ask the provider of the service for a sample message.

Go look up "SOAP Encoding".

Look up the definition of the BASE type of your type, which is "soapenc:Array".
Back to top
View user's profile Send private message
mq_abcd
PostPosted: Thu Oct 15, 2009 1:10 pm    Post subject: Reply with quote

Acolyte

Joined: 13 Jun 2004
Posts: 69

Thanks Jeff for the hints, were really helpful.

I now understand how the arrays are represented, the below defintion
Quote:
<element name="empIds" nillable="true" type="impl:ArrayOf_xsd_string"/>
can be modelled as:
FORMAT 1
Quote:
<empIds soapenc:arrayType = "xsd:string[]">
<Item>abcd</Item>
<Item>xyz</Item>
</empIds>

FORMAT 2
Quote:
<empIds soapenc:arrayType = "xsd:string[2]" xsi:type="soapenc:Array">
<Item href="#id1" />
<Item href="#id2" />
</empIds>
<multiRef id="id1" soapenc:root="0" xsi:type="xsd:string[]">
<Item>abcd</Item>
</mutiRef>
<multiRef id="id2" soapenc:root="0" xsi:type="xsd:string[]">
<Item>xyz</Item>
</mutiRef>


I am able to generate and validate the request if fomatted using FORMAT 1.
But my provider is using FORMAT 2
They successfully processed my request (sent in FORMAT1) and responded back in FORMAT2. But the response message fails in the broker validation.

My questions are
How to model my message set to understand the href format?
Does broker understand the href linking??

Thanks for all the help.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Building arrayType element
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.