Want to send information in Header dynamically using HTTP adapter using post method
Hi ,
I have a requirement to send below information in http Adapter header dynamically using post method. which will be authenticated by third party system.
Authorization : WSSE realm="SDP", profile="UsernameToken", type="AppKey" X-WSSE : UsernameToken Username="XXXX", PasswordDigest="Qd0QnQn0eaAHpOiuk/0QhV+Bzdc=", Nonce="eUZZZXpSczFycXJCNVhCWU1mS3ZScldOYg==", Created="2013-09-05T02:12:21Z"
I have followed below link to create UDF
http://scn.sap.com/thread/3241568
As if now my third party system is not available while sending request I am getting 504 gateway error. is there any approach I can validate my request is working fine?
Regards,
Hi Abhay,
Correct me if I'm wrong but I think WSSE requires a SOAP Envelope. If that is the case, there are two approaches: the first one is to use SOAP Axis and the second one is just to build SOAP Envelope via Java mapping.
You also need to test it successfully externally, capture the request and replicate it in XI.
Hope this helps,
Mark
Similar Messages
-
Sending XML messages from server to client using POST method
Dear everyone,
I have a simple client server system - using Socket
class on the server side and URLConnection class on
the client side. The client sends requests to the
server in the form of an XML message using POST method.
The server processes the request and responds with
another XML message through the same connection.
That's the basic idea.
I have a few questions about headers and formats
especially with respect to POST.
1. In what format should the response messages from the
server be, for the client? Does the server need to
send the HTTP headers - for the POST type requests?
Is this correct?:
out.println("HTTP/1.1 200 My Server\r");
out.println("Content-type: text/xml\r");
out.println("Content-length: 1024\r");
out.println("\r");
out.println("My XML response goes here...");2. How do I read these headers and the actual message
in the client side? I figured my actual message was
immediately after the blank line. So I wrote
something like this:
String inMsg;
// loop until the blank line is through.
while (!"".equals(inMsg = reader.readLine()))
System.out.println(inMsg);
// get the actual message and process it.
inMsg = reader.readLine();
processMessage(inMsg);But the above did not work for me. Because I seem to
be receiving a blank line after each header! (I suppose
that was because of the "\r".) So what should I do?
3. What are the different headers I must pass from
server to the client to safeguard against every
possible problem?
4. What are the different exceptions I must be prepared
for this situation? How could I cope with them? For
example, time outs, IOExceptions, etc.
Thanks a lot! I appreciate all your help!
Georgehello,
1) if you want to develop a distributed application with XML messages, you can look in SOAP.
it's a solution to communicate objects distributed java (or COM or other) and it constructs XML flux to communicate between them.
2) if it can help you, I have developed a chat in TCP/IP and, to my mind, when you send datas it's only text, so the format isn't important, the important is your traitement behind.
examples :
a client method to send a message to the server :
public void send(String message)
fluxOut.println(message);
fluxOut.flush();
whith
connexionCourante = new Socket(lAdresServeur, noPort);
fluxOut= new PrintWriter( new OutputStreamWriter(connexionCourante.getOutputStream()) );
a server method in a thread to receive and print the message :
while(true)
if (laThread == null)
break;
texte = fluxIn.readLine();
System.out.println(texte);
that's all ! :)
If you want to use it for your XML communication, it could be a good idea to use a special message, for example "@end", to finish the server
ex :
while(true)
if (laThread == null)
break;
texte = fluxIn.readLine();
// to stop
if (texte.equals("@end"))
{break;}
processMessage(texte );
hope it will help you
David -
How to use POST method to send & recieve XML data in WebDynpro application
Hi There,
How can we use POST method in a Url (callign weebdynpro application) and pass XML String content. How can we read this this inside WD Application.
Any pointers will be great help.
RgdsClosed
-
Hi,
Can anyone please explain meaning of "Header fields in HTTP adapter" ? It has "Name" and "Value" fields in the receiver HTTP channel.
If I enter values like:
Name Value
Source XYZ
Destination ABC
Where will these appear in outbound HTTP post ?
Also, is this different from "HTTP Header Fields" checkbox available in "Adapter specific message attributes" section ?
Thanks
Bhaven> Also, is this different from "HTTP Header Fields" checkbox available in "Adapter specific message attributes" section ?
You use this, when you want to have dynamic header fields. You put here a key, but instead of a value you put a parameter name, which can be filled with a value during mapping runtime.
Regards
Stefan -
HTTP Transformation using POST Method
Hi, I will have to use POST method with header as application/json to get the results in http transformation. I downloaded the RESTFUL client utility from Chrome, to see how JSON would look like by passing parameters and the result is displayed as expected. But I'm not sure how the URL to be constructed in HTTP transformation and appreciate if you have any suggestions. My URLL http://dev1.com/contract-api/contract/public/contractValidationMy input parameters: {"hierarchies":[10],"properties":[18],"licId":123} If I use the above URL and parameters in RESTFUL client, I'm getting the output, but having difficulty in setting up the URL using HTTP transformation. RegardsSelva
Thanks Marc.
Let me rephrase the scenario.
I have an external application which is capable of sending information only in XML through HTTP requests. It does not send SOAP messages. I guess in this case, we would need to use the HTTP binding using POST method. Much like the sample at http://blogs.oracle.com/reynolds/2005/09/invoking_bpel_from_an_html_for.html which uses the GET method.
In this sample reynolds is using the GET method. I have been trying to get the POST method to work.
Regards
John -
HTTP Binding using POST Method
Hi all,
I need to pass XML to a BPEL using HTTP POST. I have got a sample running for passing information to BPEL through GET method of HTTP. But do not have any idea about how to pass XML using HTTP POST. Please put forward your suggestions.
Thanks.
JohnThanks Marc.
Let me rephrase the scenario.
I have an external application which is capable of sending information only in XML through HTTP requests. It does not send SOAP messages. I guess in this case, we would need to use the HTTP binding using POST method. Much like the sample at http://blogs.oracle.com/reynolds/2005/09/invoking_bpel_from_an_html_for.html which uses the GET method.
In this sample reynolds is using the GET method. I have been trying to get the POST method to work.
Regards
John -
How to use post method in j2me
I used post method and when im about to receive the response from the servelt i get the output like
str=<html><head><title>Apache Tomcat/4.1.24 - Error report</title><STYLE><!--H1{font-family : sans-serif,Arial,Tahoma;color : white;background-color : #0086b2;} H3{font-family : sans-serif,Arial,Tahoma;color : white;background-color : #0086b2;} BODY{font-family : sans-serif,Arial,Tahoma;color : black;background-color : white;} B{ ................Thanks supareno I have tried the weblink u hav given. It helped me a lot
-
Open URL, use POST method in new window
From a Java program, how do we open a https connection, basically a secured site, in a new window and pass some parameters to the link, using POST method?
Hi
Is JavaProgram a Applet or Servlet?
Opening a new window directly from server,probably not possible? From your question
what I understand is, A html page is displayed
and when u click on a link opens a new window.
The parameters to the link should be posted using POST method, again
it is not possible this can be done only by appending
"?name1=value1&name2=value2..."to the link
Vinay
[email protected] -
[REPOST]How to force ADF Dialog / POPUP to use POST method ?
Hi all,
Is there any way to make ADF Dialog / POPUP to use POST method ?
I need that approach to implement this post : [SOLVED] Faces - Preventing user from entering URL manually
But it breaks in my application because ADF Dialog / POPUP is using GET method.
Thank you very much,
xtantorepost.
Thank you -
Exchange – Emails in sent folder have no sender information in header
Hey Everybody,
when I send emails with my exchange account in mail.app the copy of the email that is stored in the sent folder is missing the sender information in its header. The "from" column is empty, however, it should say my name there.
Pretty annoying because I use smart folders to organize my mails that depend on the sender information in the header. The only workaround I found so far is using imap in mail.app instead of exchange – but that's not a really satisfying solution.
I only have this problem when using mail.app with exchange. When I use the outlook.com web interface to send emails they are shown correctly in the sent folder in mail.app. Same goes for sending mails via exchange from my iPhone. My MobileMe account also works perfectly in mail.app. For the receiver there is no problem either - my name is correclty displayed as the sender.
Is anybody else having that problem or knows or solution?Open Apple Contacts and verify your contact as "My Card". Microsoft calls this card "This is me". It's not stored on Exchange but in the local Outlook Address Book. I don't use Exchange so not sure if Apple will let you select your contact on Exchange contacts. You might need to select the local or iCloud contact.
http://support.apple.com/kb/PH11582
Once you set "My Card", check to see if the issue is fixed.
If you still have issues.....
Let's eliminate issues in your User's folder by testing in a new User.
CREATE A NEW USER
Go to System Preferences --> Create a New User in Accounts. Switch to the New User by logging out/in or use Fast User Switching.
Add your Exchange account to Mail.
Do you still see the issue?
If yes, then the problem is with your base files.
If no, then the problem is in your User's folder.
Option to repair Mail in your User's folder:
Go to your User's Library folder. (if you don't know how to find, see this link.)
Scroll to Mail folder.
Select the V2 > MailData folder.
Delete any files in MailData with envelope in the name. (should be 3)
You can test Mail after deleting envelope files. When you open Mail it will re-index your files.
If you still have problems....
Go to Containers in the User's Library folder.
Delete the com.apple.mail folder.
Go to Preferences in the User's Library folder.
If you find any com.apple.mail.plist files, delete these.
Log out under the Apple in the Menu bar
Log in
Open Mail. -
I want to send the data on internet using my laptop as a hotspot of wifi ?
Dear Team,
I have created an I/O server & sucessfully made communication with Modbus RTU device.
Now I want to send this data on an internet.
I have a laptop, which i have made hotspot using connectify.
so i wish to transmit the data via wifi hot spot.
How to transmit the data via wifi from laptop ?
Can any one help me out on this...This is the easy part. Once you connect via the hotspot you can communicate using your standard internet protocols. Is the application accessing you laptop also running code you have written in
LV?
If so there are examples that show how to transfer data via a TCP/IP connection.
Mike...
Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion
"... after all, He's not a tame lion..."
Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps -
My computer is running very slowly and I have been told to delete everything off it and reinstall applications I need - iTunes is one of them...
However I'm scared that if I uninstall iTunes then reinstall it my music on my iPod will be deleted. If I use this method will my music be saved and be able to be reloaded onto iTunes and my iPod?!Backup iTunes to an External Hard Drive... Make sure Everything is on the EHD and Working to your satisfaction BEFORE Deleting anything on your computer.
iTunes: How to move the library to an EHD -
Passing values from applet using POST method to PHP page
Hello there ;)
I realy need a help here.. I`ve been working all day on sending mail from applet. I didn`t succeed bcs of the security restrictions.
So I decided just to pass arguments into PHP page, which process them and send e-mail to me.
So here is the problem.. I need to send String variables througth POST into my php page. Now I`m using GET method, but I need more than 4000 characters.
My actual solution is:
URL url = new URL("http://127.0.0.1/index.php?name=" + name + "&message=" + message);
this.getAppletContext().showDocument(url,"_self");I really need to rewrite it into POST. Would you be so kind and write few lines example [applet + php code]? I`ve already searched, googled, etc.. Pls don`t copy links to other forums here, probably I`ve read it.
Thanx in advance to all :)hi!
i`ve got some news about my applet.. so take this applet code:
public class Apletik extends JApplet {
public void init() { }
public void start()
try
String aLine; // only if reading response
String parametersAsString = "msg=ahoj&to=world";
byte[] parameterAsBytes = parametersAsString.getBytes();
// send parameters to server
URL url = this.getCodeBase();
url = new URL(url + "spracuj.php");
URLConnection con = url.openConnection();
con.setDoOutput(true);
con.setDoInput(true); // only if reading response
con.setUseCaches(false);
con.setRequestProperty("Content=length", String.valueOf(parameterAsBytes.length));
OutputStream oStream = con.getOutputStream();
oStream.write(parameterAsBytes);
oStream.flush();
String line="";
BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
while ((aLine = in.readLine()) != null)
JOptionPane.showMessageDialog(null, aLine);
if(aLine.equals("")) break;
in.close();
oStream.close();
catch (Exception ex)
JOptionPane.showMessageDialog(null, ex.toString());
}here is code of spracuj.php which is on server:
<?php
if(isset($_POST['msg']))
echo('hurray!');
?>it has only 1 problem.. when i test it on my localhost, everything seems to be all right. but when i post it to my server, i got IOException HTTP 400 error code :( where is the problem? please help me, i`m so close :D thanx -
How to use POST method in PI 7.11 when using HTTP adapter
Hi
I need to use the POST method when using the http receiver adapter in PI 7.11. Now the GET method is used. I am using the Addressing Type = "HTTP Destination" where you create an RFC of type 3 in SM59 and reference this in your HTTP receiver adapter.
What do I do?
BR
MIkaelHi Patrick
I need to use the POST method, not the GET method. The external partner, which is receiving our message, says, that we are using GET.
This is from their log where we are DongEnergy:
From DongEnergy:
2010-01-14 09:46:11 W3SVC1 10.1.2.37 GET /DongEnergy/xxxxxxxxx.dll - 443 - 193.162.91.1 SAPNetWeaverApplicationServer(1.0;711) 500 0 0 214 172
From Danisco:
2010-01-14 07:54:13 W3SVC1 10.1.2.37 POST /Danisco/xxxxxxxxxx.dll - 443 - 193.XXX.191.1 SAPWebApplicationServer(1.0;640) 202 0 0 380 5984
Could it be our firewall which vonverts the method from POST to GET?
MIkael -
How to configure message header in receiver http adapter?
Hi all
I need the outgoing message payload from receiver http adapter to backend system with below form.
POST http://222.222.33.22 /HTTP1.0
content-type:application/x-www-form-urlencoded
USERID=xxxxxx&PASSWORD=xxxx&SRCID=10&CDDATE=20070601...........................................................................
×POST http://222.222.33.22 /HTTP1.0
○content-type:application/x-www-form-urlencoded
○USERID=xxxxxx&PASSWORD=xxxx&SRCID=10&CDDATE=20070601...........................................................................
Is there a parameter to enable POST method as a part of message header outputing?
thanks in advance.The parameters available in HTTP adapter for message header are:
HeaderFieldFive http://sap.com/xi/XI/System/HTTP
HeaderFieldFour http://sap.com/xi/XI/System/HTTP
HeaderFieldOne http://sap.com/xi/XI/System/HTTP
HeaderFieldSix http://sap.com/xi/XI/System/HTTP
HeaderFieldThree http://sap.com/xi/XI/System/HTTP
HeaderFieldTwo http://sap.com/xi/XI/System/HTTP
HTTPDest http://sap.com/xi/XI/System/HTTP
TargetURL http://sap.com/xi/XI/System/HTTP
URLParamFive http://sap.com/xi/XI/System/HTTP
URLParamFour http://sap.com/xi/XI/System/HTTP
URLParamOne http://sap.com/xi/XI/System/HTTP
URLParamSix http://sap.com/xi/XI/System/HTTP
URLParamThree http://sap.com/xi/XI/System/HTTP
URLParamTwo http://sap.com/xi/XI/System/HTTP
Maybe you are looking for
-
I am not able to download PDF files all the sudden.
Recently I tried to download a manual for a PowerMac G4. I used my Intel iMac running Snow Leapard. I just got a message that ot could not downlaod the file. (I can't remember the exact language.) I researched it on the Web and it seems that the solu
-
How can I remove a trojan?
As my Mail Application keeps asking for a Password, even though I have just given it, I entered BT Yahoo, which is still working. There I found about 3,000 failed EMail reports. All refered to a need to check security and were from a Bank in Qatar. T
-
Lightroom 6 desktop will not download--says' not applicable'
I bought an upgrade for Mac Lightroom 5.7 to Lightroom 6 and it displays my new serial number but it won't give me the option to download. s.chism
-
Installing Leopard 10.5.x on an older Intel Core Duo based Mac Mini
I have an opportunity to purchase a new in box Intel Core Duo based Mac Mini (last years model), seller is throwing in a sealed copy of Leopard 10.5.x and says I can install it, but I'm wondering if someone can tell me how well Leopard will run on a
-
I am in the process of switching from iPhoto and Flickr to Revel. Everything went fine with dozens of albums and thousands of photos, until I tried to import photos directly from an SD card on my desktop. After I (perhaps too early) removed the SD ca