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 » Namespace declaration help

Post new topic  Reply to topic
 Namespace declaration help « View previous topic :: View next topic » 
Author Message
vids
PostPosted: Tue Mar 29, 2005 10:55 am    Post subject: Namespace declaration help Reply with quote

Acolyte

Joined: 24 Mar 2003
Posts: 68
Location: CA, USA

Hi,

I'm trying to construct the SOAP message in the compute node. I have a problem creating the envelope tag. Here is how I need the Envelope tag....

<SOAPENV:Envelope xmlns:SOAPENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
</SOAPENV:Envelope>

Here is the code......

DECLARE Env NAMESPACE 'http://schemas.xmlsoap.org/soap/envelope/';
DECLARE Inst NAMESPACE 'http://www.w3.org/2001/XMLSchema-instance';

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

Is there any error in this code??
I see the warning message "Namespace constant xmlns has not been defined " on the second line.

I also tried to just declare the namespaces under Envelope as below...

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

Same warning message I see in this case too. Can anyone help me out in resolving this issue.

I'm using WBIMB5.0.2 on windows.

Thanks so much
Vids
Back to top
View user's profile Send private message
Nizam
PostPosted: Tue Mar 29, 2005 11:17 am    Post subject: Reply with quote

Disciple

Joined: 10 Feb 2004
Posts: 160

vids,
I am using WBIMB V5.0.4 and my code looks just like your code. I do have the warnings but it works fine.
_________________
Nyzam
IBM Cert. Solution Designer - WBIMB V5
IBM Cert. Administrator - WBIMB V5
IBM Cert. Administrator - WebSphere MQ V5.3
Back to top
View user's profile Send private message
vids
PostPosted: Tue Mar 29, 2005 11:27 am    Post subject: Reply with quote

Acolyte

Joined: 24 Mar 2003
Posts: 68
Location: CA, USA

It's not working for me. Let me try it again.

Thanks
Vids
Back to top
View user's profile Send private message
JLRowe
PostPosted: Tue Mar 29, 2005 11:39 am    Post subject: Reply with quote

Yatiri

Joined: 25 May 2002
Posts: 664
Location: South East London

You have declared Env as a namespace, but are referring to it as a variable {Env}.

Code should be:

DECLARE Env NAMESPACE .....
SET OutputRoot.XMLNS.Env:Envelope.(XML.....
Back to top
View user's profile Send private message Send e-mail
vids
PostPosted: Tue Mar 29, 2005 11:53 am    Post subject: Reply with quote

Acolyte

Joined: 24 Mar 2003
Posts: 68
Location: CA, USA

I don't think that is the problem because I have all the other codes which are using the namespace are written in the same way i.e {Env}: and they work absolutely fine.

I have problem declaring the namespace to associate prefix.

Thanks
Vids
Back to top
View user's profile Send private message
vids
PostPosted: Tue Mar 29, 2005 1:33 pm    Post subject: Reply with quote

Acolyte

Joined: 24 Mar 2003
Posts: 68
Location: CA, USA

As Nizam said, It works fine even though there is a warning showing up. My message was going to the failure queue not because of the namespace issue. The above mentioned code works absolutely fine.

Thanks so much...

Vids
Back to top
View user's profile Send private message
ChrisThomas
PostPosted: Tue Mar 29, 2005 1:36 pm    Post subject: Reply with quote

Apprentice

Joined: 14 May 2003
Posts: 29
Location: Wisconsin

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


Have you tried to " " around your fields. I am doing the code listed above and I have no issues. I also don't put brackets around the namespace element. No sure why you need to do that.
Back to top
View user's profile Send private message
vids
PostPosted: Tue Mar 29, 2005 2:06 pm    Post subject: Reply with quote

Acolyte

Joined: 24 Mar 2003
Posts: 68
Location: CA, USA

Chris,

I tried your code and it works fine. We don't even have to have the declare statement for namespace like
DECLARE Env NAMESPACE 'http://schemas.xmlsoap.org/soap/envelope/';

It's pretty simple. Thanks so much.

My code works fine too but we need to have the DECLARE NAMESPACE statement.


Thanks
Vids
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 » Namespace declaration help
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.