| Author | 
		  Message
		 | 
		
		  | ntwmb | 
		  
		    
			  
				 Posted: Thu Sep 18, 2008 12:59 pm    Post subject: Mapping SOAP data to SAP data | 
				     | 
			   
			 
		   | 
		
		
		   Apprentice
 
 Joined: 18 Sep 2008 Posts: 34
  
  | 
		  
		    
			  
				Hi
 
 
SAP - > Message Broker -> SOAP
 
 
Message broker will receive message from SAP and transforms it to SOAP format. For this iam using statement like
 
 
SET Outputroot.SOAP.Body.m:data.message =
 
       Inputroot.SAP.message;
 
 
This is working fine.
 
 
When SOAP response message came into broker, need to map SOAP data to SIEBEL data to send back to SAP system.
 
 
IF EXISTS(Inputrot.soap.body.m:data.topic.message1[]) THEN
 
    SET Outputroot.SAP.message =
 
           Inputroot.soap.body.m:data.topic.message1;
 
END IF;
 
 
 
There are multiple IF, SET statements like this, but SOAP message is not getting mapped to SAP.
 
 
Can I use SINGULAR function instead of EXISTS? | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | broker_new | 
		  
		    
			  
				 Posted: Thu Sep 18, 2008 2:50 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Yatiri
 
 Joined: 30 Nov 2006 Posts: 614 Location: Washington DC 
  | 
		  
		    
			  
				Have a close look at your mapping...
 
You are missing the message format(XMLNSC,MRM or XMLNS) in the InputRoot..and also you are missing the SoapEnvelope in the mapping...   
 
 
try to use the following statement as a best practice
 
IF (InputRoot..........= NameValue) THEN 
 
.......
 
END IF; | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | elvis_gn | 
		  
		    
			  
				 Posted: Thu Sep 18, 2008 6:41 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Padawan
 
 Joined: 08 Oct 2004 Posts: 1905 Location: Dubai 
  | 
		  
		    
			  
				Hi broker_new,
 
   
	| broker_new wrote: | 
   
  
	Have a close look at your mapping...
 
You are missing the message format(XMLNSC,MRM or XMLNS) in the InputRoot..and also you are missing the SoapEnvelope in the mapping...   | 
   
 
SOAP Tree Structure
 
 
   
	| ntwmb wrote: | 
   
  
	IF EXISTS(Inputrot.soap.body.m:data.topic.message1[]) THEN
 
SET Outputroot.SAP.message =
 
Inputroot.soap.body.m:data.topic.message1;
 
END IF;
 
 
 
There are multiple IF, SET statements like this, but SOAP message is not getting mapped to SAP.
 
 
Can I use SINGULAR function instead of EXISTS? | 
   
 
I think EXISTS requires to be used with a SELECT...not sure, I could be wrong...
 
 
You can simply check for Field not null or FieldType check would also work I suppose.
 
 
Regards. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | broker_new | 
		  
		    
			  
				 Posted: Thu Sep 18, 2008 8:29 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Yatiri
 
 Joined: 30 Nov 2006 Posts: 614 Location: Washington DC 
  | 
		  
		    
			  
				correct elvis_gn,i shall remodify my statement to
 
 
IF (FieldType(InputRoot..........)= NameValue) THEN
 
.......
 
END IF;   | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | ntwmb | 
		  
		    
			  
				 Posted: Thu Sep 18, 2008 11:32 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Apprentice
 
 Joined: 18 Sep 2008 Posts: 34
  
  | 
		  
		    
			  
				Hi
 
 
I dont know what values SOAP(client) will be responding back.
 
 
So I have used
 
 
IF EXISTS(InputRoot.SOAP.Body.ns:data.message[]) 
 
OR SINGULAR(InputRoot.SOAP.Body.ns:data.message[])
 
OR FIELDVALUE(InputRoot.SOAP.Body.ns:data.message) IS NOT NULL ) THEN
 
 
SET OutputRoot.DataObject.ns1:sapdata.msg =
 
       InputRoot.SOAP.Body.ns:data.message;
 
multiple SET statements here............
 
 
 
This is not working
 
 
SOAP message flow is responding back like this
 
(0x01000000)http://example.com/:response = (
 
        (0x03000102):xmlns                                      = 'http://example.com/' (CHARACTER)
 
  (0x01000000)http://example.com/:result = (
 
          (0x01000000)http://example.com/:data = (
 
            (0x03000000)http://example.com/:message1       = 'aaa' (CHARACTER)
 
            (0x03000000)http://example.com/:messgae2 = 'bbb' (CHARACTER)
 
            (0x03000000)http://example.com/:message3       = 'ccc' (CHARACTER)
 
            (0x03000000)http://example.com/:message4          = 'ddd' (CHARACTER)
 
            (0x03000000)http://example.com/:message5 = 'eee' (CHARACTER)
 
          )
 
       
 
 
My new question is 
 
 
Do I have to use
 
 
InputRoot.SOAP.Body.ns:response.result.data.message1[])  or
 
 
InputRoot.SOAP.Body.ns:result.ns:response.ns:data.ns:message1[])
 
 
????? | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | elvis_gn | 
		  
		    
			  
				 Posted: Fri Sep 19, 2008 1:18 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Padawan
 
 Joined: 08 Oct 2004 Posts: 1905 Location: Dubai 
  | 
		  
		    
			  
				Hi ntwmb,
 
   
	| ntwmb wrote: | 
   
  
	
 
SOAP message flow is responding back like this
 
(0x01000000)http://example.com/:response = (
 
        (0x03000102):xmlns                                      = 'http://example.com/' (CHARACTER)
 
  (0x01000000)http://example.com/:result = (
 
          (0x01000000)http://example.com/:data = (
 
            (0x03000000)http://example.com/:message1       = 'aaa' (CHARACTER)
 
            (0x03000000)http://example.com/:messgae2 = 'bbb' (CHARACTER)
 
            (0x03000000)http://example.com/:message3       = 'ccc' (CHARACTER)
 
            (0x03000000)http://example.com/:message4          = 'ddd' (CHARACTER)
 
            (0x03000000)http://example.com/:message5 = 'eee' (CHARACTER)
 
          )
 
       
 
 
My new question is 
 
 
Do I have to use
 
 
InputRoot.SOAP.Body.ns:response.result.data.message1[])  or
 
 
InputRoot.SOAP.Body.ns:result.ns:response.ns:data.ns:message1[])
 
 
????? | 
   
 
Both seem to be wrong...
 
 
I guess it should be 
   
	| Code: | 
   
  
	| InputRoot.SOAP.Body.ns:response.ns:result.ns:data.ns:message1 | 
   
 
 
And also, your tags are named "message1, message2, message3...etc" ? If yes, then what is the array for ? Are you going to get multiples of message1, message2 etc ?
 
 
You could do a wildcard search rather, * should work, but not sure of 'message*', anyway try
 
   
	| Code: | 
   
  
	| InputRoot.SOAP.Body.ns:response.ns:result.ns:data.ns:message*[] | 
   
 
 
Regards. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | ntwmb | 
		  
		    
			  
				 Posted: Fri Sep 19, 2008 2:56 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Apprentice
 
 Joined: 18 Sep 2008 Posts: 34
  
  | 
		  
		    
			  
				Hi
 
 
I have used message1,message2... to show as they are different fields
 
It is not an array, all r single fields.
 
 
While sending SOAP message from main flow to next flow(client)
 
 
I have used
 
 
SET OutputRoot.SOAP.Body.ns:data.update.message =
 
       InputRoot.DataObject.ns1:SAP.data.message;
 
 
This message worked fine, by sending message value to next flow.
 
So I have used the same sequence while receiving response also.
 
 
What is the difference in using ns for every field?
 
 
Do I have to use exactly
 
 
OutputRoot.SOAP.Body.ns:data.ns:update.ns:message for sending
 
 
InputRoot.SOAP.Body.ns:response.ns:result.ns:data.ns:message1 for receiving ????
 
 
If this format is correct
 
 
then should I use
 
 
EXISTS(InputRoot.SOAP.Body.ns:response.ns:result.ns:data.ns:message[])
 
 
OR
 
 
SINGULAR(InputRoot.SOAP.Body.ns:response.ns:result.ns:data.ns:message[]) 
 
 
OR
 
 
FIELDVALUE(InputRoot.SOAP.Body.ns:response.ns:result.ns:data.ns:message) IS NOT NULL
 
 
????? | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |