on 04-30-2007 5:46 PM
HI ALL !
I have this scenario :
1) R3 send IDOC ORDERS01 to XI (3.0)
2) XI elabs IDOC fields (in mapping step)
3) XI with HTTP Adapter post data to a "page".asp on webserver using querystring (like page.asp?&ID_CUSTOMER=123&ORD_DOC=WE ...etc..)
My ASP page use this stantments for get values:
ID_CUSTOMER = Request.Form("ID_CUSTOMER");
ORD_DOC = Request.Form("ORD_DOC");
...
...
xml_content = Request.Form("xml_content");
At the moment XI call the page but the query string is empty ! I think that the message type of interface will be automatically added on URL (as when flags Additional Query on Comm.Channel - Sender Party, Sender Service... are selected).... it's wrong ?!? If yes how it's possible complete the flow ?!
Thks !!
Dear Jari,
For Additional Query String Attributes, set the indicator:
Sender party
Sender service
Receiver interface
Message ID
Quality of service
Queue ID
All attributes are selected except for the queue ID. If you do not want a value to be transferred to the receiver, deselect it. The queue ID is only required if the quality of service is EOIO.
Hope this is helpful.
Regards,
Naveen.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
ThankU but nothing !
On finally URL I don't find the IDOC data but only the information about namespace/interfaces etc..
I need to have the idoc data in the URL querystring like:
IDOC:
<STR1>
<F1>123</F1>
<F2>456</F2>
</STR1>
in http URL :
http://mywebserver/mypage.asp?&webfield=<STR1><F1>123</F1><F2>456</F2></STR1>;
Meanwhile, thanks for the interest
Jari
Ciao,
I try I use & work but "the way is't easy" because :
- now I need to transform structure XML (IDOC ORDERS) to single string (Xstring)
- manipulate URL adding Xstring
- in ASP page regenarate characters as "<" because the UTF-8 xml-code convert "special symbol"
When I finish all (I HOPE !!!), I'll post complete solution on SDN forum.
So, if someone know other way ..please post it !!
bye
Hi Jari,
I have configured RFC-HTTP. I have configured receiver HTTP adapter with the HTTP destination which triggers the ASP file in the third party system.
when i use url http://host:port/xxx.asp , i am getting the page is not displayed and i am not getting any response, but when i test with the sendtest.asp where i need to feed the xml, i am getting the correct response.
anybody can help me why my url http://host:port/xxx.asp is not working, anyhting to do in asp file.
help would be appreciated
Thanks,
srini
NOW WORKS !! but I don't use the URL querystring (for all problems like mapping/UTF-8 decode/undecode about "< , . >" etc..)
I suggest to use this other way :
insert in webserver receiver ASP page command[
set docReceived = CreateObject("Microsoft.XMLDOM")
docReceived.async = False
docReceived.load Request
]
so "REQUEST" is the XI Payload (XML structure data of Interface Determination datatype).
Now is possible to extract & manipulate all what we want.
Ciao
Jari
At the moment I write 1 file for log that a request is arrived on webserver & 1 file with the request (the XI PAYLOAD) .
So get 1 field of the request & create the message for back (XML to XI Comm.Channel)
this is my ASP page on webserver :
<%@ Language=VBScript %>
<%
'WRITE FILE TO SERVER FOR CHECK PAYLOAD
Dim objNewFile, objOpenFile, objFSO, strPath
strPath = Server.MapPath("/archive/testjari/xmltesto.txt")
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
If objFSO.FileExists(strPath) Then
Set objOpenFile = objFSO.OpenTextFile(strPath, 2)
else
Set objOpenFile = objFSO.CreateTextFile(strPath)
end if
objOpenFile.Write("NEW REQUEST...")
objOpenFile.Close
Set objOpenFile = Nothing
Set objFSO = Nothing
'Create an XML DOM Object to receive the request
set docReceived = CreateObject("Microsoft.XMLDOM")
docReceived.async = False
docReceived.load Request
'SAVE XML REQUEST
strPath = Server.MapPath("/archive/testjari/documento.txt")
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
If objFSO.FileExists(strPath) Then
Set objOpenFile = objFSO.OpenTextFile(strPath, 2)
else
Set objOpenFile = objFSO.CreateTextFile(strPath)
end if
objOpenFile.Write(docReceived.xml)
objOpenFile.Close
Set objOpenFile = Nothing
Set objFSO = Nothing
'Create a piece of XML to send back
Set listItem = docReceived.selectnodes("....NODE OF XML THAT WE NEEDS....")
strResponse = "<?xml version=""1.0""?>" & vbcrlf
strResponse = strResponse & "<MYBACKNODE>" & vbcrlf
'For the purposes of this example we modify
'the response based on the request
for each node in listItem
name = node.selectsinglenode("...FIELD IN NODE...").firstchild.nodevalue
strResponse = strResponse & " <MYBACKFIELD>Thanks " & name & "</MYBACKFIELD>" & vbcrlf
next
strResponse = strResponse & "</MYBACKNODE>"
'Send the response back
response.write strResponse
%>
Ciao
Jari
Hi Jari,
Thanks for the reply,
I have the asp file as below and plz suggest for any changes,
<%
Function BinToText(varBinData, intDataSizeInBytes)
Const adFldLong = 128 '&H00000080
Const adVarChar = 129
Set objRS = Server.CreateObject("ADODB.Recordset")
objRS.Fields.Append "txt", adVarChar, intDataSizeInBytes, adFldLong
objRS.Open
objRS.AddNew
objRS.Fields("txt").AppendChunk varBinData
BinToText = objRS("txt").Value
objRS.Close
Set objRS = Nothing
End Function
server.scripttimeout = 600
dim binXML, strXML, outXML, objFundsDelete
'if Request.TotalBytes > 0 then
' binXML=Request.BinaryRead(Request.TotalBytes)
' strXML=BinToText(binXML,lenb(binXML))
'else
' strXML=""
'end if
strxml = Request("xmlData")
'Response.ContentType="TEXT/XML"
'Response.Write(strXML)
'dim fs, LogFile
'logFile = "c:\received.xml"
'set fs = server.CreateObject("Scripting.FilesystemObject")
'on error resume next
'if fs.FileExists(LogFile) = false then
' set ts = fs.CreateTextFile(LogFile)
'end if
'set ts = fs.OpenTextFile(LogFile,2)
'ts.writeline strXML
'ts.close
'set fs = nothing
'set ts = nothing
set objFundsDelete=server.CreateObject("FundsDelete.CFundsTransfer")
outXML=objFundsDelete.FundsProcess(strXML)
set objFundsDelete=nothing
Response.ContentType="TEXT/XML"
Response.Write(outXML)
%>
Thanks,
srini
Hi,
Considering the address "http://mywebserver.com/dir1/dir2/mypage.asp "
the configuration of HTTP Adapter is the basic for Receiver, where :
- Addressing Type is URL Avvress (in my case but is possible to use SM59 HTTP definition)
- Target Host is "mywebserver.com" (without http....)
- service number is 80 (generic port)
- Path is the "/.../.../mypage.asp"
Ciao
Jari
Please, any experiences ???
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.