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 » ESQL Problem using namespace

Post new topic  Reply to topic
 ESQL Problem using namespace « View previous topic :: View next topic » 
Author Message
Galichet
PostPosted: Mon Dec 04, 2006 2:44 am    Post subject: ESQL Problem using namespace Reply with quote

Acolyte

Joined: 26 Jun 2001
Posts: 69
Location: Paris - France

Hi all,

I'm using WBI V5 and I've a problem trying to generate the following message :

<Parametre>
...<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
......<soapenv:Body>
.........<validerFluxProspect soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
............<arg0 xsi:type="xsd:string">Something</arg0>
.........</validerFluxProspect>
......</soapenv:Body>
...</soapenv:Envelope>
</Parametre>


Someone could help me ? (I'm not used with namespace)
_________________
Eric Galichet
SMABTP
France
Back to top
View user's profile Send private message Send e-mail
Vitor
PostPosted: Mon Dec 04, 2006 2:59 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

If you could elaborate on the nature of your problem.....
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
elvis_gn
PostPosted: Mon Dec 04, 2006 3:00 am    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi Galichet,

Please look for code on this forum, you'll find snippets to help you out...

Regards.
Back to top
View user's profile Send private message Send e-mail
Galichet
PostPosted: Mon Dec 04, 2006 4:38 am    Post subject: Reply with quote

Acolyte

Joined: 26 Jun 2001
Posts: 69
Location: Paris - France

In fact, my problem is with the esql code ...

I've coded this :

DECLARE soapenv NAMESPACE 'http://schemas.xmlsoap.org/soap/envelope/';
DECLARE xsd NAMESPACE 'http://www.w3.org/2001/XMLSchema';
DECLARE xsi NAMESPACE 'http://www.w3.org/2001/XMLSchema-instance';
DECLARE encodingStyle NAMESPACE 'http://schemas.xmlsoap.org/soap/encoding/';

SET OutputRoot.XMLNS.Parametre.soapenv:Envelope.(XML.NamespaceDecl)xmlns:soapenv = 'http://schemas.xmlsoap.org/soap/envelope/';
SET OutputRoot.XMLNS.Parametre.soapenv:Envelope.(XML.NamespaceDecl)xmlns:xsd = 'http://www.w3.org/2001/XMLSchema';
SET OutputRoot.XMLNS.Parametre.soapenv:Envelope.(XML.NamespaceDecl)xmlns:xsi = 'http://www.w3.org/2001/XMLSchema-instance';

SET OutputRoot.XMLNS.Parametre.soapenv:Body.encodingStyle:ValiderFluxProspect.(XML.NamespaceDecl)soapenv:encodingStyle = 'http://schemas.xmlsoap.org/soap/encoding/';
SET OutputRoot.XMLNS.Parametre.soapenv:Body.encodingStyle:ValiderFluxProspect.arg0.(XML.NamespaceDecl)xsi:type = 'xsd.string';
SET OutputRoot.XMLNS.Parametre.soapenv:Body.encodingStyle:ValiderFluxProspect.arg0.(XML.Content) = InputRoot.XML.Msg;

SET OutputRoot.Properties.MessageDomain = 'XMLNS';


But the result is :

<Parametre>
...<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
......<NS1:Body xmlns:NS1="http://schemas.xmlsoap.org/soap/envelope/">
.........<NS2:ValiderFluxProspect xmlns:NS2="http://schemas.xmlsoap.org/soap/encoding/" NS1:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<arg0 xmlns:NS3="http://www.w3.org/2001/XMLSchema-instance" NS3:type="xsd.string"/>
.........</NS2:ValiderFluxProspect>
......</NS1:Body>
</Parametre>



I'm still trying to correct this...
_________________
Eric Galichet
SMABTP
France
Back to top
View user's profile Send private message Send e-mail
Galichet
PostPosted: Mon Dec 04, 2006 5:04 am    Post subject: Reply with quote

Acolyte

Joined: 26 Jun 2001
Posts: 69
Location: Paris - France

Ok, I've seen where was my problem. Now it's working well.
The code looks like this now :

DECLARE soapenv NAMESPACE 'http://schemas.xmlsoap.org/soap/envelope/';
DECLARE xsd NAMESPACE 'http://www.w3.org/2001/XMLSchema';
DECLARE xsi NAMESPACE 'http://www.w3.org/2001/XMLSchema-instance';
DECLARE encodingStyle NAMESPACE 'http://schemas.xmlsoap.org/soap/encoding/';

SET OutputRoot.XMLNS.Parametre.soapenv:Envelope.(XML.NamespaceDecl)xmlns:soapenv = 'http://schemas.xmlsoap.org/soap/envelope/';
SET OutputRoot.XMLNS.Parametre.soapenv:Envelope.(XML.NamespaceDecl)xmlns:xsd = 'http://www.w3.org/2001/XMLSchema';
SET OutputRoot.XMLNS.Parametre.soapenv:Envelope.(XML.NamespaceDecl)xmlns:xsi = 'http://www.w3.org/2001/XMLSchema-instance';

SET OutputRoot.XMLNS.Parametre.soapenv:Envelope.soapenv:Body.validerFluxProspect.(XML.NamespaceDecl)soapenv:encodingStyle = 'http://schemas.xmlsoap.org/soap/encoding/';
SET OutputRoot.XMLNS.Parametre.soapenv:Envelope.soapenv:Body.validerFluxProspect.arg0.(XML.NamespaceDecl)xsi:type = 'xsd.string';
SET OutputRoot.XMLNS.Parametre.soapenv:Envelope.soapenv:Body.validerFluxProspect.arg0.(XML.Content) = CAST(InputRoot.BLOB.BLOB AS CHAR CCSID InputRoot.MQMD.CodedCharSetId ENCODING InputRoot.MQMD.Encoding);

SET OutputRoot.Properties.MessageDomain = 'XMLNS';


However, the 3 firsts line starting with SET are in warning : namespace xmlns is not defined. What can I do correct that ?
_________________
Eric Galichet
SMABTP
France
Back to top
View user's profile Send private message Send e-mail
kimbert
PostPosted: Mon Dec 04, 2006 5:08 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

1. You don't have to set MessageDomain explicitly.
2. Body should be a child of Envelope.
Code:
SET OutputRoot.XMLNS.Parametre.soapenv:Envelope.soapenv:Body.encodingStyle:ValiderFluxProspect.(XML.NamespaceDecl)soapenv:encodingStyle = 'http://schemas.xmlsoap.org/soap/encoding/';
etc...
3. 'xsd:string' not 'xsd.string'
4. What are you trying to do with (XML.Content)?
Back to top
View user's profile Send private message
fat_tony
PostPosted: Mon Dec 04, 2006 5:23 am    Post subject: Reply with quote

Novice

Joined: 02 Dec 2006
Posts: 15

Quote:
1. You don't have to set MessageDomain explicitly.
3. 'xsd:string' not 'xsd.string'


1. Agreed, although to be fair the example in the Help that this ESQL is clearly based on sets this in exactly the same place!
3. Shouldn't xsi:type also be an attribute rather than a namespace declaration?
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 » ESQL Problem using namespace
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.