Author |
Message
|
shammi80 |
Posted: Fri Feb 17, 2012 5:09 pm Post subject: Create Soap Request in Message broker Node with WS security |
|
|
Apprentice
Joined: 17 Feb 2012 Posts: 32
|
Hi Friends,
I have to create the soap request via Compute node with WS security in Envelop with username token in WMB.
Thanks |
|
Back to top |
|
 |
smdavies99 |
Posted: Sat Feb 18, 2012 5:56 am Post subject: Re: Create Soap Request in Message broker Node with WS secur |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
shammi80 wrote: |
Hi Friends,
I have to create the soap request via Compute node with WS security in Envelop with username token in WMB.
Thanks |
Jolly good for you  _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
bruce2359 |
Posted: Sat Feb 18, 2012 7:16 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
What manuals did you research? What have you tried? What were the results? _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
shammi80 |
Posted: Sat Feb 18, 2012 9:18 am Post subject: |
|
|
Apprentice
Joined: 17 Feb 2012 Posts: 32
|
Hi ,
I have created a soap request in broker to hit a webservice but the other component want to authenticate first before hitting there operations.
They want WS security feature in the envelope of the soap request.
I have tried the tutorial of WS security in developer works but not succeeded ,
Please advice .. |
|
Back to top |
|
 |
smdavies99 |
Posted: Sat Feb 18, 2012 10:00 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
Sadly WS Security is not something for a beginner to attempt. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
goffinf |
Posted: Sat Feb 18, 2012 10:51 am Post subject: |
|
|
Chevalier
Joined: 05 Nov 2005 Posts: 401
|
shammi80 wrote: |
They want WS security feature in the envelope of the soap request.
|
Whilst you *might* have some success implementing the most basic Username Token for WS-Sec even this feels like re-inventing the wheel. If your endpoint needs the X509 flavour it would be more than foolish to even start down that road.
The SOAP nodes support WS-Sec, look to using them instead of rolling your own, that's really the whole point of using products like Broker.
Fraser. |
|
Back to top |
|
 |
shammi80 |
Posted: Sat Feb 18, 2012 11:22 am Post subject: |
|
|
Apprentice
Joined: 17 Feb 2012 Posts: 32
|
I have to put the below part in xml request :
<wsse:Security soap:mustUnderstand="1">
<wsse:UsernameToken xmlns:wsu="http://schemas.xmlsoap.org/ws/2002/07/utility"
wsu:Id="SecurityToken-0c708387-2e7d-45b5-9029-b1108cf5527e">
<wsse:Username>Administrator</wsse:Username>
<wsse:Password Type="wsse:PasswordText">secured</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
and I have created the Soap request using ESQL like this ..
SOAP_Domain_Msg>
<Body>
<NS1:Launch_Integration_Event_Request xmlns:NS1="urn:com.yz/bsvc">
<NS1:Debug_Mode>false</NS1:Debug_Mode>
<NS1:version>v15</NS1:version>
<NS1:Integration_System_Reference>
<NS1:ID>
Ceridian Payroll System
<NS1:type>Integration_System_ID</NS1:type>
</NS1:ID>
</NS1:Integration_System_Reference>
<NS1:Invoke_Integration_As_Current_User>true</NS1:Invoke_Integration_As_Current_User>
<NS1:Integration_Launch_Parameter_Data>
<NS1:Launch_Parameter_Reference>
<NS1:ID>
Pay Group
<NS1:type>Workday Launch Parameter_Name</NS1:type>
<NS1:parent_type>Workday_Integration_Service_Name</NS1:parent_type>
<NS1:parent_id>PI Launch Parameters</NS1:parent_id>
</NS1:ID>
</NS1:Launch_Parameter_Reference>
<NS1:Launch_Parameter_Value_Data>
<NS1:Instance_Reference>
<NS1:ID>
SDM Hourly Pay Group
<NS1:type>Organization_Reference_ID</NS1:type>
</NS1:ID>
</NS1:Instance_Reference>
</NS1:Launch_Parameter_Value_Data>
</NS1:Integration_Launch_Parameter_Data>
</NS1:Launch_Integration_Event_Request>
</Body>
</SOAP_Domain_Msg> |
|
Back to top |
|
 |
goffinf |
Posted: Sat Feb 18, 2012 2:58 pm Post subject: |
|
|
Chevalier
Joined: 05 Nov 2005 Posts: 401
|
You haven't described the structure of your flow yet other than stating that you are using a Compute node to create the message. Your example would suggest that you are using the SOAP domain and a SOAPRequest node to call the web service, but you haven't confirmed that. If you are then you need to read up on the use of policy sets.
If you want to use vanilla HTTP with the XMLNSC domain, then the structure of your message should look something like this (you also need to declare the namespace bound to the wsse: prefix which I didn't see in your example) :-
Code: |
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<!-- Put you WS-Sec header here -->
</soap:Header>
<soap:Body>
<NS1:Launch_Integration_Event_Request xmlns:NS1="urn:com.yz/bsvc">
...
</soap:Body>
</soap:Envelope>
|
|
|
Back to top |
|
 |
shammi80 |
Posted: Sat Feb 18, 2012 3:51 pm Post subject: |
|
|
Apprentice
Joined: 17 Feb 2012 Posts: 32
|
Thanks goffinf.
Sorry for that.
Yes you are right I will be creating the Soap message via Soap request node
My structure of message will be like the same . But I have read abut the policy set but how It will create the WS security message could you please advice me or giving me some example. I am doing this is soap requst node esql ...
Code: |
DECLARE soapenv NAMESPACE 'http://schemas.xmlsoap.org/soap/envelope/';
DECLARE ns2 NAMESPACE 'urn:com.xyz/bsvc';
--This Module create the Soap Request for Workday Launch IntegrationRequest.
CREATE COMPUTE MODULE CreateLaunchIntegrationRequest
CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
-- SET OutputRoot.HTTPRequestHeader."Authotization"='Basic'||b64Encode(CAST(SOM-User||':'||37abb0f30b7e6 as BLOB CCSID 1208));
SET OutputRoot.Properties.CodedCharSetId = 1208;
SET OutputRoot.SOAP.Body.ns2:Launch_Integration_Event_Request.ns2:Debug_Mode=False;
SET OutputRoot.SOAP.Body.ns2:Launch_Integration_Event_Request.ns2:version='v15';
SET OutputRoot.SOAP.Body.ns2:Launch_Integration_Event_Request.ns2:Integration_System_Reference.ns2:ID='Ceridian Payroll System';
SET OutputRoot.SOAP.Body.ns2:Launch_Integration_Event_Request.ns2:Integration_System_Reference.ns2:ID.ns2:type='Integration_System_ID';
SET OutputRoot.SOAP.Body.ns2:Launch_Integration_Event_Request.ns2:Invoke_Integration_As_Current_User=true;
--- As there are two xml group of Integration Launch Parameter Data so we have created array.
SET OutputRoot.SOAP.Body.ns2:Launch_Integration_Event_Request.ns2:Integration_Launch_Parameter_Data[1].ns2:Launch_Parameter_Reference.ns2:ID='Pay Group';
SET OutputRoot.SOAP.Body.ns2:Launch_Integration_Event_Request.ns2:Integration_Launch_Parameter_Data[1].ns2:Launch_Parameter_Reference.ns2:ID.ns2:type='Workday Launch Parameter_Name';
SET OutputRoot.SOAP.Body.ns2:Launch_Integration_Event_Request.ns2:Integration_Launch_Parameter_Data[1].ns2:Launch_Parameter_Reference.ns2:ID.ns2:parent_type='Workday_Integration_Service_Name';
SET OutputRoot.SOAP.Body.ns2:Launch_Integration_Event_Request.ns2:Integration_Launch_Parameter_Data[1].ns2:Launch_Parameter_Reference.ns2:ID.ns2:parent_id='PI Launch Parameters';
SET OutputRoot.SOAP.Body.ns2:Launch_Integration_Event_Request.ns2:Integration_Launch_Parameter_Data[1].ns2:Launch_Parameter_Value_Data.ns2:Instance_Reference.ns2:ID='SDM Salary Pay Group';
SET OutputRoot.SOAP.Body.ns2:Launch_Integration_Event_Request.ns2:Integration_Launch_Parameter_Data[1].ns2:Launch_Parameter_Value_Data.ns2:Instance_Reference.ns2:ID.ns2:type='Organization_Reference_ID';
SET OutputRoot.SOAP.Body.ns2:Launch_Integration_Event_Request.ns2:Integration_Launch_Parameter_Data[1].ns2:Launch_Parameter_Value_Data.ns2:Instance_Reference.ns2:ID='SDM Hourly Pay Group';
SET OutputRoot.SOAP.Body.ns2:Launch_Integration_Event_Request.ns2:Integration_Launch_Parameter_Data[1].ns2:Launch_Parameter_Value_Data.ns2:Instance_Reference.ns2:ID.ns2:type='Organization_Reference_ID';
SET OutputRoot.SOAP.Body.ns2:Launch_Integration_Event_Request.ns2:Integration_Launch_Parameter_Data[2].ns2:Launch_Parameter_Reference.ns2:ID='Pay Period Selection Option';
SET OutputRoot.SOAP.Body.ns2:Launch_Integration_Event_Request.ns2:Integration_Launch_Parameter_Data[2].ns2:Launch_Parameter_Reference.ns2:ID.ns2:type='Workday Launch Parameter_Name';
SET OutputRoot.SOAP.Body.ns2:Launch_Integration_Event_Request.ns2:Integration_Launch_Parameter_Data[2].ns2:Launch_Parameter_Reference.ns2:ID.ns2:parent_type='Workday_Integration_Service_Name';
SET OutputRoot.SOAP.Body.ns2:Launch_Integration_Event_Request.ns2:Integration_Launch_Parameter_Data[2].ns2:Launch_Parameter_Reference.ns2:ID.ns2:parent_id='PI Launch Parameters';
SET OutputRoot.SOAP.Body.ns2:Launch_Integration_Event_Request.ns2:Integration_Launch_Parameter_Data[2].ns2:Launch_Parameter_Value_Data.ns2:Instance_Reference.ns2:Descriptor='Use Pay Period for Current Date';
SET OutputRoot.SOAP.Body.ns2:Launch_Integration_Event_Request.ns2:Integration_Launch_Parameter_Data[2].ns2:Launch_Parameter_Value_Data.ns2:Instance_Reference.ns2:ID='2';
SET OutputRoot.SOAP.Body.ns2:Launch_Integration_Event_Request.ns2:Integration_Launch_Parameter_Data[2].ns2:Launch_Parameter_Value_Data.ns2:Instance_Reference.ns2:ID.ns2:type='External_Pay_Period_Option_ID';
-- CALL CopyMessageHeaders();
-- CALL CopyEntireMessage();
RETURN TRUE;
END;
CREATE PROCEDURE CopyMessageHeaders() BEGIN
DECLARE I INTEGER 1;
DECLARE J INTEGER;
SET J = CARDINALITY(InputRoot.*[]);
WHILE I < J DO
SET OutputRoot.*[I] = InputRoot.*[I];
SET I = I + 1;
END WHILE;
END;
CREATE PROCEDURE CopyEntireMessage() BEGIN
SET OutputRoot = InputRoot;
END;
END MODULE; |
|
|
Back to top |
|
 |
Vitor |
Posted: Sun Feb 19, 2012 6:48 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
shammi80 wrote: |
I have read abut the policy set but how It will create the WS security message |
Because that's what the software does?
Seriously, that's why earlier in this thread you were advised to use this node; it does the heavy lifting for you.
Re-read the documentation on this starting here. It's more complex than a few sample lines of ESQL (and involes policy sets which are not ESQL at all) so is really outside the scope of this forum & into the realm of training/mentoring. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
anuj.garg |
Posted: Mon Sep 12, 2016 11:50 pm Post subject: soapRequest creation |
|
|
Newbie
Joined: 12 Sep 2016 Posts: 3
|
I am trying to send a soap request from wmb and i use fileInput and fileOutput as a input and output nodes to soapRequest node and parse wsdl file. but when i am trying to send request (xml file) it returning same file again. |
|
Back to top |
|
 |
smdavies99 |
Posted: Tue Sep 13, 2016 12:16 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
Your question is different to the one that this thread was used for.
Please open a new thread with your question.
We will need a lot more detail before we can even begin to answer your question.
Platform?
IIB Version including fix Pack?
Please try to break down your problem into simple bits.
1) does the file Input to file output (without the SOAP bit) work?
2) Does the SOAP bit work on its own. i.e. send a message that contains the same data as the file to a flow that contains only the SOAP parts using MQ.
Then when both are working put them together.
We really appreciate you telling us what things you have tried and exactly what went wrong. We all (even us experts) make mistakes so there is no loss of face amongst us to get something simple wrong. A second (or more) pair of eyes can often see the problem with your code that you can't see. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
|