| Author | 
		  Message
		 | 
		
		  | vids | 
		  
		    
			  
				 Posted: Tue Mar 29, 2005 10:55 am    Post subject: Namespace declaration help | 
				     | 
			   
			 
		   | 
		
		
		    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 | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | Nizam | 
		  
		    
			  
				 Posted: Tue Mar 29, 2005 11:17 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   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 | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | vids | 
		  
		    
			  
				 Posted: Tue Mar 29, 2005 11:27 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    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 | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | JLRowe | 
		  
		    
			  
				 Posted: Tue Mar 29, 2005 11:39 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    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 | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | vids | 
		  
		    
			  
				 Posted: Tue Mar 29, 2005 11:53 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    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 | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | vids | 
		  
		    
			  
				 Posted: Tue Mar 29, 2005 1:33 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    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 | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | ChrisThomas | 
		  
		    
			  
				 Posted: Tue Mar 29, 2005 1:36 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   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 | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | vids | 
		  
		    
			  
				 Posted: Tue Mar 29, 2005 2:06 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    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 | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |