How to pass http header in outbound HTTP Binding?
I have to call a Rest service from my composite. The Rest service needs couple of Headers. I'm using HTTP Binding for this call.
How can I set the HTTP headers in the HTTP Binding outbound call ?
Thanks
--Sreeny
1. Right-click on HTTP binding adapter and select "configure WS policy"
2. Under security, click on "+" sign and add oracle/wss_http_token_client_policy
3.Go to Oracle Weblogic Admin console
Under Security Realms->myrealm->Users and Groups-> New User.
Add username/password
4.Go to Oracle Weblogic Enterprise Manager(EM)
Right click on Weblogic Domain->mydomain(it could be anyname or SOAClusterDomain)
select Security->credentials
Create a key named "mykey" (or any name) under oracle.wsm.security with the same username/password you have given on step 3.
Similar Messages
-
How to pass Security Header from the Physical Service in ODSI
We have to call a secured Web service using ODSI. We are trying to build a physical service in ODSI using a WSDL which has username token with password text policy inside it. The requests to that web service are bound by the security policy. But ODSI is not allowing us to create a Physical service usin a WSDL with a security policy in it. How can we then pass the security header from the ODSI physical service to the external web service.
You would need to write a webservice handler for your physical data service to implement the security.
http://download.oracle.com/docs/cd/E13162_01/odsi/docs10gr3/datasrvc/How%20To%20Create%20SOAP%20Handlers%20for%20Imported%20WSDLs.html -
How to pass a header variable in jsp
Hi ,
I am using Headervariable login module(which takes user id form http header variable) for single sign on.
I configured the login module stack. But to test i need a jsp from which i can pass the user id in http header.
to test if i am able to set the user id in http header , i have written 2 jsps
1. Header.jsp
In this , i am setting the user id
response.addHeader("UserId" ,"user1");
and i am posting it to HeaderResult.jsp
2.HeaderResult.jsp
In this, i am tryng to rretrieve it By using
request.getHeader("UserId");
But i am not geeting any value.
Can i set user defined header variables?if not, can i set the standard http header variabes,
Please help me with the code.
Thanks,
LakshmiHi,
check this thread
http://help.sap.com/saphelp_nw04/helpdata/en/71/bcf3bf2ed7e142a5011b43c288f08c/content.htm
HTTP Header parameters in iView.
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes/bc-jas/~form/handler
May help you
Regards,
RK -
How to pass soap header variable for invoking siebel service in BPEL
Hi,
I am invoking siebel service in soa composite. siebel service have header variables username/password and session type. I have created global variable (message type) in BPEL anddeclare same in messages port in siebel wsdl. after that I passed the username/password and session type as hard coded in assign activity. I have deployed and tested this but, I have an exception like javax.xml.ws.soap.SOAPFaultException: Error Code: 10944642 Error Message: Error: Inbound SOAP Message - Session Token is missing or invalid or has expired
Can you please help on this..Hi,
check this thread
http://help.sap.com/saphelp_nw04/helpdata/en/71/bcf3bf2ed7e142a5011b43c288f08c/content.htm
HTTP Header parameters in iView.
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes/bc-jas/~form/handler
May help you
Regards,
RK -
How to pass JMS header Information to proxy field
Hi,
I am working with JMS to Proxy scenario (Synchronous).
I am getting one header field at sender JMS channel which need to be mapped with one of the Proxy field.
and similarly when proxy returning one field value that need to be mapped with receiver channel header information.
could any one help me on how to achieve this.
regards,
NavneetHi,
>>Now My Question is how can I get Dynamic Configuration Key
Like this
1. switch on ASMA in sender JMS communication channel
2 Assign this udf to target field
UDF code
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/JMS","DCJMSMessageProperty9";
String valueOld = conf.get(key);
return valueOld;
3. Do a end to end testing (message mapping test will;l throw error)
Regards
Suraj -
How to pass PS header data to pdfmark?
Hope this is the right place for this question:
I currently use a bit of PostScript in Distiller's epilogue.ps file to add my name as "Author" to all my PDFs as they are distilled:
[ /Author (My Name) /DOCINFO pdfmark
So far, so good.
Now what I want to do is automatically pass the data in the header of the PostScript file (such as %%Title, %% Creator) to the epilogue file.
e.g. something like this:
[ /Title TitleVariable /DOCINFO pdfmark
so that a .ps file with a header line
%%Title: My File.file
becomes a PDF file with Title: My File.file
Is this possible?
Hope this makes sense.
At the moment, the three "main" PDF metadata fields are always empty, and it's a pain having to fill them manually.I don't think that standard PostScript interpreters parse the comment lines automatically so that you would have populated variables/strings available to your PostScript program after the %%EndComments line. (maybe Dov Isaacs knows for sure).
One alternative would be to add at the end of your epiloque a procedure that reads lines in from "currentfile" as strings until "%%EndComments" is found and parses the strings (looking for strings that start with "%%Creator:", "%%Title", etc. and defining your own variables based on the value portion of the strings.
Redbook example of currentfile useage:
/str 100 string def
currentfile str readline
here is a line of text
pop /textline exch def
You would have to be a little bit fancier than this but I hope the concept makes sense. -
How to pass column header as a parameter in Validation Expression (APEX4.0)
Hello
I created a new Page validation in APEX4.0 ( not 4.1 ).
(1) Type : Function Returning error text
(2) Validation Expression 1 :
begin
return validate_name ( p_c=> #COLUMN_HEADER# ,p_c_value=> to_date(:p26_LEAVE_FROM,'dd/mm/yyyy') );
end;
note: the validate_name is an oracle pl/sql procedure which takes two input parameters ( column header name and actual value ) and return a specific error message ( to that column ) or NULL.
(3) In the Error Message section, I left Error Message blank ( as the app ignored the mssage but used the one returned from the above function)
However, I chose "The Error display location" to be inline with field and notification" and Associated Item to be "p26_LEAVE_FROM".
My question, it worked if I hard coded the actual column header "LEAVE FROM" , but it didn't work if I used the above #COLUMN_HEADER# in Validation Expression. Can I avoid hard coding as the column header might be changed one day. Is there a better way to deal with multiple column validations with different error message for each column ? It seems that I will have to create similar page valiation for each column to be validated.
Thanks for your advice.
Edited by: Susanna on 19/01/2012 17:45You want something like this:
DECLARE
lio_success VARCHAR2( 2000 );
li_id NUMBER;
li_dep_id NUMBER;
li_sel_id := NUMBER;
li_date DATE;
lo_date DATE;
lio_return_message xyz_bpe_rec_fn.xyz_bpe_rec_col;
l_ret xyz;
BEGIN
lio_success := 'some value';
li_id := NULL; -- or some number
li_dep_id := NULL; -- or some number
li_sel_id := NULL; -- or some number
li_date DATE := sysdate;
lio_return_message.col1 := somevalue;
lio_return_message.col2 := somevalue;
lio_return_message.coln := somevalue;
l_ret := get_xyz( lio_success
, li_id
, li_dep_id
, li_sel_id
, li_date
, lo_date
, lio_return_message );
END;
/ -
Passing Soap Header in Web Service
Hi Team,
In our application, we have used web service through webservice proxy wizard using the WSDL file. Now due to security reasons we need to pass Soap Header in the webservice call. Can you please help on how to pass soap header in the webservice call ?
Please find the below webservice code/
Long ll_ret
edpmdata ll_ReturnVal
edpmreq lnv_Request_data
//filter lnv_filter
Datawindowchild dwc_child
str_pass l_str_pass
long l_l_row_count, l_l_row
String l_s_code, l_s_modify, l_l_ret
String str_proxy_name = "sohedpmservice"
String l_s_delivery_pref, l_s_email
String ls_url, l_s_ini_file
l_s_ini_file = g_nv_ini.fnv_get_name ()
ls_url = ProfileString(l_s_ini_file,"External", "EDPM_URL", "")
Soapconnection lsc_Conn
sohedpmservice lproxy_obj
lsc_Conn = create Soapconnection
SetPointer (Hourglass!)
Try
ll_ret = lsc_Conn.CreateInstance(lproxy_obj, str_proxy_name, ls_url)
Catch (SoapException e )
Error.fnv_error("0001", This, "ue_process_fields","Error Creating Instance","",FALSE,1,0)
Message.ReturnValue = -1
RETURN -1
end try
IF ll_ret <> 0 THEN
Error.fnv_error("0001", This, "ue_process_fields","Error Creating Instance","",FALSE,1,0)
Message.ReturnValue = -1
RETURN -1
END IF
Try
lnv_Request_data = create edpmreq
lnv_Request_data.value = l_s_party_key
ll_ReturnVal = lproxy_obj.getcommpref(lnv_Request_data)
If ll_ReturnVal.ws_serviceresult.resultcode = '5' Then
Error.fnv_error("0001", This, "ue_process_fields",String(ll_returnval.ws_serviceresult.ws_resultinfo) ,"Error Response ", FALSE, 1,0)
Message.ReturnValue = -1
RETURN -1
End if
l_s_delivery_pref = ll_ReturnVal.deliverymethod
l_s_email = ll_ReturnVal.emailaddr
i_str_pass.s[86] = l_s_delivery_pref
i_str_pass.s[87] = l_s_email
i_str_pass.s[88] = l_s_party_key
Catch ( SoapException a )
Error.fnv_error("0001", This, "ue_process_fields","Error Response","Error Response",FALSE,1,0)
Message.ReturnValue = -1
RETURN -1
end try
Destroy lsc_Conn
Return 1What version of PowerBuilder?
PB.Net or Classic?
Are you using the SOAP or .Net Engine (if using Classic)?
What kind of header?
There is limited support for passing custom headers in the .Net engine in Classic. The header would need to be defined in the WSDL for the service.
Anything beyond that (e.g., WS-Security) would need to be handled in a WCF client in PB.Net. -
Hello, somebody out there who tried to connect to let's say OpenFire server from J2ME using HTTP Connection? I am having problems with my application right now when I installed in real device. My problem is quite similar to this: http://www.igniterealtime.org/community/message/122769.
Need some advice on how to make http binding work in j2me.My application is basically an IM service, implemented using xmpp/jabber. When I test through the emulator, the sending of presence and exchanging of messages to/from another jabber client via Openfire server (an xmpp server) seem to work fine. But when I installed in my phone, I cannot connect on my xmpp server. From reading other forums, it must be that the port i am using which is 5222, is being blocked by the network provider. I found this http binding technique which is a possible solution but have no idea on how to make it work with j2me, [xmpp over bosh|http://www.xmpp.org/extensions/xep-0124.html]. The idea is, I want my j2me app to connect to a java servlet implementing HTTP Binding (put my XMPP messages in the body of http if this is how it works) then route my XMPP messages to the Openfire server.
Anyone who has tried this? -
How to pass the SIN using a plain http adapter in sender side.
Hi all,
How to pass the SIN(System Identification Number) using a plain http adapter in sender side.
Regards,
Venu.You can set it in a specific HTTP header (as explained here : http://help.sap.com/saphelp_nw04/helpdata/en/43/64db4daf9f30b4e10000000a11466f/content.htm) ...
Rgds
Chris -
How to add HTTP Header Response X-Frame-Options:SAMEORIGIN from OWA published via Forefront TMG 2010 to stop Clickjacking. I have put the IIS setting X-Frame-Options:SAMEORIGIN on my Internal CAS Server. However as the OWA page is published through
Forefront TMG 2010, the iFrame tag is not blocked when the page is first opened. Only when you login with your credentials to the OWA page inside the frame and the page reaches IIS on the Internal CAS it gets blocked. I want to block it in the first
instance when it is opened from TMG.Hi,
Thank you for the post.
To modify the http header, please refer to this blog:
http://tmgblog.richardhicks.com/2009/03/27/using-the-isa-http-filter-to-modify-via-headers-and-prevent-information-disclosure/
Regards,
Nick Gu - MSFT -
How to pass parameter as http POST in pageContext.setForwardURL
Hi,
I need to call a third party application page in my custom OAF page. I need to pass parameter to this third party page using POST method. I am using following command to call that -
HashMap hm = new HashMap();
hm.put("FirstName",firstName );
hm.put("LastName",lastName);
hm.put("AppSignature", signature);
pageContext.setForwardURL(hopURL,
null, // not necessary with KEEP_MENU_CONTEXT
OAWebBeanConstants.KEEP_MENU_CONTEXT, // no change to menu context
null, // No need to specify since we're keeping menu context
hm, // request parameters
false, // retain the root application module
OAWebBeanConstants.ADD_BREAD_CRUMB_YES, // display breadcrumbs
OAException.ERROR);
I am passing parameter to the page using hash map table. That application is expecting the parameters in POST format and I believe using hash map table the parameters will be passed as GET format.
We figured that out because one of the parameter we have to send is AppSignature which is 160 characters long. When third party applicatoin received that parameter they got only 151 characters, looks like they are truncated by GET method.
Any idea how to pass parameter using POST format so that this issue could be fixed.
Regards
HiteshSumit,
Thanks for your reply. I have resolved this issue by forwarding all parameters in session using pageContext.putSessionValueDirect and redirect to a jsp using pageContext.redirectImmediately.
in jsp I read the params from session and set in the form , and then redirected to my third party application.
Regards
Hitesh -
How to pass username;password in to header Variable
Hi All,
I have to invoke client SOAP WSDL based web service, He has given the URL. I want to invoke it from bpel. It is sync based web service.
Please have look at sample input data. in the header section there is element called Token. what i need to do here I need to pass the user name and password those separated by ;
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.xxxxxxx.com/2005/">
<soapenv:Header>
<ns:AuthorizationToken>
<ns:Token>username;password</ns:Token>
</ns:AuthorizationToken>
</soapenv:Header>
<soapenv:Body>
<ns:WEBGet>
<ns:key>pass the input value</ns:key>
</ns:WEBGet>
</soapenv:Body>
</soapenv:Envelope>
Please advise me how to pass these values when i am invoking it through BPEL.
Thanks,Please help me out, It is little bit urgent.
-
How to handle http 302 response in OEG
how to handle http 302 response.
The URL has moved <a href="https://............................
I am using "Connect to URL" and "Reflect message" filters and I am getting http 302 response. In the http esponse body/content I have the "The URL has moved <a href="https://............................"
How to connect to this url.
Thank you very much for your help.hi
I took your advise on the second approach and added new filter to catch 302 response and read the new URL from Location. Here is the flow.
Connect to URL --> Is HTTP CODe =302 --> Retrieve Location from Http Header- Rewrite URL - Dynamic Router - Connection
I am getting a new error as below. I verified the certificates using the below open ssl comands and added them to the certificate store in OEG. The error comes from the Redirect URL which is cs12.salesforce.com
C:\Program Files\GnuWin32\bin>openssl s_client -connect test.salesforce.com:443 -showcerts
and
C:\Program Files\GnuWin32\bin>openssl s_client -connect cs12.salesforce.com:443 -showcerts
thank you for your time and help.
ERROR 06/May/2012:00:22:23.125 [14e0] nested fault: SSL protocol error
error:140CF086:SSL routines:SSL_VERIFY_CERT_CHAIN:certificate verify fai
led
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate veri
fy failed:
java.lang.RuntimeException: SSL protocol error
error:140CF086:SSL routines:SSL_VERIFY_CERT_CHAIN:certificate verify fai
led
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate veri
fy failed
at com.vordel.dwe.ConnectionCache.getConnection(Native Method)
at com.vordel.circuit.net.ConnectionProcessor$State.tryTransaction(Conne
ctionProcessor.java:482)
at com.vordel.circuit.net.ConnectionProcessor.invoke(ConnectionProcessor
.java:650)
at com.vordel.circuit.InvocationEngine.invokeFilter(InvocationEngine.jav
a:154)
at com.vordel.circuit.InvocationEngine.invokeCircuit(InvocationEngine.ja
va:43)
at com.vordel.circuit.InvocationEngine.processMessage(InvocationEngine.j
ava:229)
at com.vordel.circuit.SyntheticCircuitChainProcessor.invoke(SyntheticCir
cuitChainProcessor.java:36)
at com.vordel.dwe.http.HTTPPlugin.invokeDispose(HTTPPlugin.java:290)
at com.vordel.dwe.http.HTTPPlugin.invoke(HTTPPlugin.java:131) -
WebService Client - how to enable HTTP Compression
Hi
I have written a simple WebService Client. The WebService expects that the WebService clients enable HTTP compression. This is the exact text from the docs:-
""1. Client should be HTTP Compression enabled
HTTP Compression had been made mandatory for API�s. Thus API�s client should
include �Accept-Encoding: zip� header as part of request and should be able to
handle compressed data. Please note that system will send an error message if client
are not http compression enabled saying client should be compression enabled."
I do not know how to enable HTTP compression in the WebService Client. The method called is "GetInstantaneousFlowData". It accepts no arguments and returns xsd:datetime.
The wsdl can be found at:-
http://energywatch.natgrid.co.uk/EDP-PublicUI/PublicPI/InstantaneousFlowWebService.asmx?WSDL
Can someone please help :-
import javax.xml.rpc.ServiceFactory;
import javax.xml.rpc.Service;
import javax.xml.rpc.Call;
import javax.xml.rpc.ParameterMode;
import javax.xml.namespace.QName;
import java.util.Calendar;
public class TestNGPubTime4 {
public static void main(String[] args) throws Exception {
// Setup the global JAX-RPC service factory
System.setProperty( "javax.xml.rpc.ServiceFactory", "weblogic.webservice.core.rpc.ServiceFactoryImpl");
// create service factory
ServiceFactory factory = ServiceFactory.newInstance();
// define qnames
String targetNamespace = "http://www.NationalGrid.com/EDP/BusinessEntities/Public/";
QName serviceName = new QName(targetNamespace, "InstantaneousFlowWebService");
QName portName = new QName(targetNamespace, "InstantaneousFlowWebServiceSoap");
QName operationName = new QName("http://www.NationalGrid.com/EDP/UI/GetInstantaneousFlowData",
"GetLatestPublicationTime");
// create service
Service service = factory.createService(serviceName);
// create call
Call call = service.createCall();
// set port and operation name
call.setPortTypeName(portName);
call.setOperationName(operationName); // add parameters
call.setProperty(Call.SOAPACTION_USE_PROPERTY, Boolean.TRUE);
call.setProperty(Call.SOAPACTION_URI_PROPERTY, "http://www.NationalGrid.com/EDP/UI/GetInstantaneousFlowData");
// call.setProperty(Call.ENCODINGSTYLE_URI_PROPERTY, "http://schemas.xmlsoap.org/soap/encoding/");
call.setReturnType(new QName( "http://www.w3.org/2001/XMLSchema","datetime") );
// set end point address : soap address location
call.setTargetEndpointAddress("http://energywatch.natgrid.co.uk/EDP-PublicUI/PublicPI/InstantaneousFlowWebService.asmx");
// invoke the remote web service
Calendar result = (Calendar) call.invoke(new Object[] {});
System.out.println("result=" + result);
}Rishika,
Thanks for your reply.
Could I get clariffication on some more thing?
I am using Axis 1.4 version. And I am able to implement the gzip while doing the following steps.
1) Change the pivote value to CommonsHTTpSender.
<transport name="http" pivot="java:org.apache.axis.transport.http.CommonsHTTPSender"/>
2) public class RetreiveReservationsSOAPBindingStubLocal extends RetreiveReservationsSOAPBindingStub.
I Override the method to support GZIP.
org.apache.axis.client.Call _call = super.createCall();
call.setOperation(operations[0]);
_call.setUseSOAPAction(true);
_call.setSOAPActionURI("retreiveReservations");
_call.setEncodingStyle(null);
call.setProperty(org.apache.axis.client.Call.SENDTYPE_ATTR, Boolean.FALSE);
call.setProperty(org.apache.axis.AxisEngine.PROPDOMULTIREFS, Boolean.FALSE);
call.setProperty(HTTPConstants.MCACCEPT_GZIP, Boolean.TRUE);
call.setProperty(HTTPConstants.MCGZIP_REQUEST, Boolean.TRUE);
call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11CONSTANTS);
_call.setOperationName(new javax.xml.namespace.QName("", "retreiveReservations"));
super.setRequestHeaders(_call);
super.setAttachments(_call);
Object resp = call.invoke(new Object[] {retreiveReservationsRequest});
I am able to send and receive the request and response in gzip encoded format.
Now my clarrification is,
Is it possible to set the piote value to CommonsHTTPSender for the transport http through my code?
How could I set the values from code?
Reason is, I don't want to manually edit the axis 1.4's client-config.wsdd
Since this is very critical thing, please please help me.
Thanks in advance.
Regards,
Nishad Ponery
Maybe you are looking for
-
RSDG_DATCLS_ASSIGN - Upgrade BW 3.5 to BI 70
Hi there, I am trying to do the BI upgrade from BW 3.5 to BI 7.0, and I am currently working on the preparation phase. I am struck at steps where they are mentioned about SAP NW BI: Converting Data Classes of infocubes. I am lilttel confused. We are
-
Dial-up access # w/o monthly fee?
I've hung onto my old dial-up account all these years just in case I ever get somewhere wihtout a high-speed connection ... or for those times when the Cable modem goes on the blink and I have to get online. These occasions are fewer and far between,
-
Help with Apache Reverse Proxy configuration with SAP Portal and SAP Webgui
Dear Experts, I have an issue configuring Apache to work with SAP Portal and ERP webgui. Accessing Portal through Reverse Proxy is working fine. But the problem arises when we try to open an iView ERP webgui transaction page from Portal with the Reve
-
Hello All, When SAP is triggers an IDOC to SAP XI, the conversion from IDOC to IDOC XML takes place in SAP XI(correct me If Im wrong here). Can some body tell me what is the mechanism behind this conversion from IDoc to IDOC xml....and there is no ad
-
Installation of Sun Directory Server on Home PC - Domain name problem
Hi! I would like to install SunONE directory server on my home PC but, I am unable to do so because one of the installation steps requires the fully qualified machine name. This is of format <hostname>.<domainname>. My home PC doesnot belong to any d