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 » Using SOAP 1.2 on SOAPRequest-node in gateway mode

Post new topic  Reply to topic
 Using SOAP 1.2 on SOAPRequest-node in gateway mode « View previous topic :: View next topic » 
Author Message
sebgerhal
PostPosted: Mon Aug 24, 2015 1:59 am    Post subject: Using SOAP 1.2 on SOAPRequest-node in gateway mode Reply with quote

Newbie

Joined: 24 Aug 2015
Posts: 5

Hello,

we have got a problem using SOAPRequest-Node in IBM Integration Bus v9. We are using this node in gateway mode to connect to several webservices. Using the gateway mode, the IBM documentation states that the SOAPRequest-Node does only send SOAP-Messages in SOAP version 1.1. We now have webservice which needs the message to be in SOAP version 1.2. From the IBM docs, we got a hint on setting the SOAP-Version manually via a Compute-Node in ESQL.

We are setting the SOAP version in an ESQL-Node directly before the SOAPRequest-Node. Unfortunately, this does not have any effect for us. Is anyone aware of any open issues concerning this topic? Can anyone point me to other hints?
Back to top
View user's profile Send private message
sebgerhal
PostPosted: Mon Aug 24, 2015 2:00 am    Post subject: Reply with quote

Newbie

Joined: 24 Aug 2015
Posts: 5

Appendix: the link with the hint on setting the SOAP version manually is:

http://www-01.ibm.com/support/knowledgecenter/SSMKHH_9.0.0/com.ibm.etools.mft.doc/bc19040_.htm?lang=en
Back to top
View user's profile Send private message
mgk
PostPosted: Mon Aug 24, 2015 2:19 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

The code shown in the link you posted should work. For reference the code is:

Code:
DECLARE soapenc NAMESPACE 'http://www.w3.org/2003/05/soap-envelope';
SET OutputRoot.SOAP.Context.Namespace.(SOAP.NamespaceDecl)xmlns:soap12 = soapenc;
SET OutputRoot.SOAP.Context.SOAP_Version = '1.2';


If this does not work for you, post your ESQL code so we can see what you are doing...

Kind regards,
_________________
MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
Back to top
View user's profile Send private message
sebgerhal
PostPosted: Mon Aug 24, 2015 4:35 am    Post subject: Reply with quote

Newbie

Joined: 24 Aug 2015
Posts: 5

Dear mgk,

we set the SOAP parameter in the following code (snippet):

Code:

CREATE FUNCTION Main() RETURNS BOOLEAN
   BEGIN
      -- CALL CopyMessageHeaders();
      CALL CopyEntireMessage();
      
      DECLARE TargetParameter REFERENCE TO OutputRoot.MQRFH2.usr.GLOBAL_PARAMETER.TARGET.COMMUNICATION;
            
      SET OutputLocalEnvironment.Destination.SOAP.Request.Transport.HTTP.WebServiceURL = THE( SELECT ITEM P.VALUE FROM TargetParameter.PARAMETER[] AS P WHERE P.NAME = 'URL');
      
      --set authentication values if needed
      IF EXISTS(SELECT ITEM P.VALUE FROM TargetParameter.PARAMETER[] AS P WHERE P.NAME = 'USER') THEN
         DECLARE SOAP_USER CHARACTER THE( SELECT ITEM P.VALUE FROM TargetParameter.PARAMETER[] AS P WHERE P.NAME = 'USER');
         IF (SOAP_USER IS NOT NULL AND LENGTH(SOAP_USER) > 0) THEN
            CALL SECLIB.setCredentials(   OutputRoot.Properties ,
                                 SOAP_USER,
                                 THE( SELECT ITEM P.VALUE FROM TargetParameter.PARAMETER[] AS P WHERE P.NAME = 'PASSWORD'));
         END IF;
      END IF;

      --set proxy-values if needed
      IF EXISTS(SELECT ITEM P.VALUE FROM TargetParameter.PARAMETER[] AS P WHERE P.NAME = 'PROXY_URL') THEN
         DECLARE SOAP_PROXY_URL CHARACTER THE( SELECT ITEM P.VALUE FROM TargetParameter.PARAMETER[] AS P WHERE P.NAME = 'PROXY_URL');
         DECLARE SOAP_PROXY_USER CHARACTER COALESCE(THE( SELECT ITEM P.VALUE FROM TargetParameter.PARAMETER[] AS P WHERE P.NAME = 'PROXY_USER'), NULL);
         DECLARE SOAP_PROXY_PWD CHARACTER COALESCE(THE( SELECT ITEM P.VALUE FROM TargetParameter.PARAMETER[] AS P WHERE P.NAME = 'PROXY_PASSWORD'), NULL);
         
         IF (SOAP_PROXY_URL IS NOT NULL AND LENGTH(SOAP_PROXY_URL) > 0) THEN
            CALL SECLIB.setProxy(   OutputLocalEnvironment.Destination.HTTP,
                              OutputRoot.HTTPRequestHeader,
                              SOAP_PROXY_URL,
                              SOAP_PROXY_USER,
                              SOAP_PROXY_PWD);
         END IF;
      END IF;
      
      SET Environment.GLOBAL_PARAMETER = OutputRoot.MQRFH2.usr.GLOBAL_PARAMETER;
      
      SET OutputRoot.HTTPRequestHeader."Content-Type" = 'application/soap+xml; charset=utf-8';
      SET OutputRoot.SOAP.Context.SOAP_Version = '1.2';
      DECLARE soapenc NAMESPACE 'http://www.w3.org/2003/05/soap-envelope/';
      SET OutputRoot.SOAP.Context.Namespace.(SOAP.NamespaceDecl)xmlns:soap12 = soapenc;
      
      --move XMLNSC to last position under OutputRoot
      DELETE FIELD OutputRoot.XMLNSC;
      SET OutputRoot.XMLNSC = InputRoot.XMLNSC;
      
      RETURN TRUE;
   END;



Between the ESQL-node containing the above code and the SOAPRequest-Node there is a flow order node, the SOAPRequest-Node is connected to the first output of the flow order node.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Aug 24, 2015 7:57 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

I don't see you deleting / removing / moving to JMS header... OutputRoot.MQRFH2...
Also you do not specify whether this is SOAP over JMS or SOAP over HTTP...

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
sebgerhal
PostPosted: Mon Aug 24, 2015 10:15 pm    Post subject: Reply with quote

Newbie

Joined: 24 Aug 2015
Posts: 5

fjb_saber,

the OutputRoot.MQRFH2 is set in previous nodes, so it is accessible at this point. But I don't think that's the point here.

We are using SOAP over HTTP.
Back to top
View user's profile Send private message
Simbu
PostPosted: Tue Aug 25, 2015 3:54 am    Post subject: Reply with quote

Master

Joined: 17 Jun 2011
Posts: 289
Location: Tamil Nadu, India

Hi, Is it ok to have both SOAP and XMLNSC Domain in OutputRoot tree when sending to SOAPRequest Node?. This might be the issue and I'm not sure on this.

Code:

      SET OutputRoot.SOAP.Context.Namespace.(SOAP.NamespaceDecl)xmlns:soap12 = soapenc;
      
      --move XMLNSC to last position under OutputRoot
      DELETE FIELD OutputRoot.XMLNSC;
      SET OutputRoot.XMLNSC = InputRoot.XMLNSC;
      
      RETURN TRUE;
   END;
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Aug 25, 2015 4:30 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

When any Output node serializes the message tree, it only ever serializes the Last Child of Root.

So if you have Two domain trees, then only the last one will get serialized.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Aug 25, 2015 4:53 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

mqjeff wrote:
When any Output node serializes the message tree, it only ever serializes the Last Child of Root.

So if you have Two domain trees, then only the last one will get serialized.

@OP
Which means that your hint is good for nothing as your last child of Root is XMLNSC...
Instead try moving the xml document root under OutputRoot.SOAP.Body...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
sebgerhal
PostPosted: Tue Aug 25, 2015 7:23 am    Post subject: Reply with quote

Newbie

Joined: 24 Aug 2015
Posts: 5

Thanks guys, I got it solved now. I expected the SOAPRequest-Node to move the value of the XMLNSC-domain to my SOAP-domain automatically and regard all of my settings on the SOAP domain (especially in SOAP_Context), but it's not the case.

After moving the value of my XMLNSC-domain to the Body-element of my SOAP-domain and removing the XMLNSC-domain afterwards, it worked like a charm. In this special case, XMLNSC of OutputRoot is equal to XMLNSC from InputRoot.

New code is as follows:
Code:

SET OutputRoot.HTTPRequestHeader."Content-Type" = 'application/soap+xml; charset=utf-8';
SET OutputRoot.SOAP.Context.SOAP_Version = '1.2';

--move XMLNSC to SOAP body and delete XMLNSC under OutputRoot
DELETE FIELD OutputRoot.XMLNSC;
SET OutputRoot.SOAP.Body = InputRoot.XMLNSC;
Back to top
View user's profile Send private message
Simbu
PostPosted: Tue Aug 25, 2015 10:58 pm    Post subject: Reply with quote

Master

Joined: 17 Jun 2011
Posts: 289
Location: Tamil Nadu, India

mqjeff wrote:
When any Output node serializes the message tree, it only ever serializes the Last Child of Root.

So if you have Two domain trees, then only the last one will get serialized.


Hi mqjeff, Thanks for the clarification.
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 » Using SOAP 1.2 on SOAPRequest-node in gateway mode
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.