Business Connector, Posting an XML document
HI,
I've got a service : Z_ASN_CREATE, and an XML file which works fine for this service when I use the 'Test\send xml file' tool to test this service from BC DEVELOPPER.
My Question is : What should I do now to post this XML file from outisde the BC, from a browser for example ?
Thanks.
Vincent
Hi Vincent,
If you want to send a request to a BC Service using just a browser and html (without any activex Objects), review the code below. You will notice that you send it as a string called xmlData. In you input service you should have a input variable called exactly xmlData (case sensitive). Then convert it to document using <i>stringToDocument</i> and from document to record using <i>documentToRecord</i> (pretty straightforward, is it? ).
good luck,
David R.
<html>
<head></head>
<body>
<form name="frm2BC" action="http://localhost:5555/invoke/Default/you_service_name">
<textarea name="xmlData" rows="10" cols="60"><?xml version="1.0" encoding="UTF-8" ?><test>Send me!!</test></textarea>
<br>
<input type="submit" value="Send" >
</form>
</body>
Similar Messages
-
pretty new to java. How can I post an XML document to the server? I want to do some sort of HTTP Request from a managed bean. Can't find anything on this. Isn't there some sort of HTTP Request in the base Java libraries?
General flow of what I'm attempting:
JSP entry of data
managed bean controller gets data entered into entity class
XMLencoder used to create string of xml representing entity data.
need to send that XML to an .ASP page (yes, .ASP page because need to call pre existing com component).
would rather not send this as a string, but rather as an XML in the body of the request. Not sure if any opf this makes sense, but trolling through the endless returns of a google search has me wasting away my last 2 days of work. Thanks for any info provided.Not sure if I understood you question right!! Are you trying to upload an XML document to the server? Or are you looking for AJAX to deal with XMLHttpRequest and XMLHttpResponse?
-
SAP Business Connector XML File processing
Hi All,
we're using SAP Business Connector to process XML Files (from NON-SAP system).
XML-Files are mapped to IDOCs and sent to our sap-system in order to create purchase orders.
Let's say we have 3 Purchase Orders (XML) in our SAP BC input directory,
the first purchase order has a header text (customer field), the following 2 dont. After processing the xml-files all 3 Idocs have the same header text of the first purchase order.
How can i change this behaviour?
Regards
REAHello Ramy,
You have to check this logic of t BC. if you want to check the Idocs then goto WE02 in SAP.
if you are using message type PORDCR1 then check segment E1BPMEPOTEXTHEADER or PORDCR thne check segment E1BPEKPOTX
Regards
Naresh -
Receiving Custom XML Document over AS2 (HTTPS) - Inbound Processing
Hi All,
Need help in Receiving Custom XML Document over AS2 (HTTPS) - Inbound Processing
External Trading Partner will be able to post the XML Documents to https://<b2bconsolehost>:<b2bconsoleport>/b2b/httpReceiver.
Here is the process flow:
1. External Trading Partner will be posting the XML Documents to https://<b2bconsolehost>:<b2bconsoleport>/b2b/httpReceiver
2. B2B, consumes the Custom XML validates as per the XSD and process it.
3. How to send the ACK back to External Trading Partner if it validates successfully and sent it to 'IP_IN_QUEUE'
4. How to send the ACK back to External Trading Partner if the validation fails after receiving the XML document.
5. Does the External Trading Partner require any certificates to post the XML Documents to https://<b2bconsolehost>:<b2bconsoleport>/b2b/httpReceiver (no need of encryption/decryption)?
6. How to enable the B2B server to accept the HTTPS messages from the Trading Partner (no need of encryption/decryption).
Please let me know. Thanks In Advance.
Regards,
AmirineniHi Nandu, Ramesh,
We have done the set-ups for transmitting a Custom XML Document over HTTP1.1 in B2B.
Our Business Case is as follows:
1. Read the Flat File using BPEL File Adapter
2. Transform the Message in BPEL and send it to B2B
2. Based on the set-ups in B2B, we need to post the XML message to the folliwng URL:-
http://databridge.buy.datastream.net:5555/invoke/dsImport/receiveXML
In the B2B Set-Ups, I have done the following:
Business Protocol name: Custom Document over Internet
Exchange Protocol: AS
Document Protocol: Custom
Transport Protocol: HTTP-1.1
Host name : http://databridge.buy.datastream.net
Port: 5555
I have also deployed the agreement as well as the configuration. The issue that I am currently facing is when I select the configuration in WSIL browser in JDeveloper, I am getting the following error:
"Unable to get schema information for target".
Hence I am not able to map the message in BPEL and send it to B2B.
Could you please let me know the possible causes and if I am missing anything in the set-ups in B2B.
As always, your help and guidance is highly appreciated.
Thanks,
Dibya -
Business connector documentation
Hey Guys,
Where can I get documentation on Business Connector related development. Especially the architecture and development of the same.
I am well versed with XI development. However, I have not found the same level of documentation for Business Connector in the help portal in SAP.
I am especially looking for docuemntation on Configuration and Implementation of Integration Scenarions in Business Connector.
Any links documents would be appreciated.
Thank you for the help.
Sumit.Hi,
Check this also-
http://help.sap.com/saphelp_nw2004s/helpdata/en/6f/1bd5c2a85b11d6b28500508b5d5211/frameset.htm
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/b4f3755a-0401-0010-b6b3-9b65bb7d4503
Regards,
Moorthy -
Using Business Connector to convert a file to XML
Hi, I have been asked to see if a flat file created by an abap program can be converted to XML format using Business Connector (4.7). I have looked in the tutorial and the pdf documents but can not see how this is done. Please could someone give me some advice?
- Is this possible using built-in Business Connector services - or is it more complicated?
- Should I even bother to try to do this when it it easy for me to create an XML format file from ABAP?
- Is there a good course, book, documentation that would help me?
Thanks, AndyHi Andy!
Our customers have this requirement to convert some "flat-file" into some XML format via Business Connector quite often. The best way (as the last post sugessted) is indeed to use the "EDI-Adapter" which is free of charge (service.sap.com/connectors).
With that module you can convert all flat-files (delimiter based, offset based, mixed, even classical EDI formats, ...) based on some definition ( = template). Be careful the EDI-Adapter Module download page states that it is supported for BC version 4.6 . However it is absolutely no problem to use it in BC 4.7 versions as well. Remember that you will NOT get any official support by SAP when using the EDI-Adapter module.
Simply import the EDI-Module as general BC package (server/replicate/inbound directory).
Generally it is very powerful, stable and well documented ...
Best regards, Andy -
How to HTTP POST data to SAP Business Connector
Hello,
I would like to transfer data from a client with HTTP POST to SAP Business Connector. SAP BC acts as server. In SAP BC I created a Java service containing the code:
IDataCursor idatacursor = pipeline.getCursor();
idatacursor.first("node");
Object obj1 = idatacursor.getValue();
System.out.println(obj1.toString()); //for test
But how can I access the data that was sent with HTTP POST in my service?
Thank you
Piotr DudzikHi,
quite easy:
StringBuffer buffer = new StringBuffer();
String resultString = null;
String xmlString = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"+
"<biztalk_1 xmlns=\"urn:biztalk-org:biztalk:biztalk_1\">"+
"<header>"+
"<delivery>"+
"<to>"+
"<address>urn:sap-com:logical-system:XXX</address>"+
"</to>"+
"<from>"+
"<address>urn:sap-com:logical-system:YYY</address>"+
"</from>"+
"</delivery>"+
"</header>"+
"<body>"+
"<doc:Z_RFC_CALL_NAME> xmlns:doc=\"urn:sap-com:document:sap:rfc:functions\" xmlns=\"\">"+
... [PARAMETERS]
"</doc:Z_RFC_CALL_NAME>"+
"</body>"+
"</biztalk_1>";
try {
URL url = new URL(SCHEMA, this.host, Integer.parseInt(PORT), FILE);
HttpURLConnection connection = (HttpURLConnection)url.openConnection();
initConnection(connection);
OutputStream out = connection.getOutputStream();
out.write(xmlString.getBytes());
out.close();
InputStream reader = connection.getInputStream();
char ch;
while((ch = (char)reader.read()) != -1 && ch != 0xFFFF)
buffer.append(ch);
resultString = buffer.toString();
if (this.getXMLEntry(resultString, "E_STATUS").equals("E")) { // ERROR
System.out.println("errormessage: "+this.getXMLEntry(resultString, "E_EMSG"));
} else {
// ok, is supose this is an S (success), parse the stuff
reader.close();
catch (Exception e){
e.printStackTrace();
System.out.println(e); -
Plugging XSLT / XML processors into Business Connector 4.7
Hi,
I need to use Xalan 2.6.0 and the associated XML parsers
in the Business Connector.
Does anyone know whether any built-in services or
SAP Adapter services would be negatively impacted by
this change? I have found nothing in the documentation.
(Among the reasons I need to do this are that the
processors in package com.inqmy.lib.jaxp do not seem to
be JAXP 1.2 compliant. Also, they neither respect the
encoding-attribute of <xsl:output>, nor allow to override
it from the outside. When generating HTML, this has
created problems for some clients).
In order to use Xalan/Xerces, one needs to set the
variable PREPENDCLASSES in server.bat to contain
the Xalan jars, and change the value of the configuration
variable watt.xslt.jaxp.properties in the server.cnf file.
The value of this variable is the name of a file in normal
Java properties syntax, which contains values for the
relevant System properties:
javax.xml.transform.TransformerFactory
javax.xml.parsers.DocumentBuilderFactory
javax.xml.parsers.SAXParserFactory
I'm using BC 4.7 SR2, Core Fix 2, JDK 1.3.1_09 under WinXP
At first glance everything seems to work fine (I can
still use recordToDocument), but I'd like to be sure.
And what about BC 4.6?
-- Sebastian Millies
IDS Scheer AGCheck out this weblog series for starters: /people/tobias.trapp/blog
Then I would suggest you post your question to the ABAP forum. -
Forwarding XML/EDI from SAP Business connector to EDI (cloverleaf)
Hello,
We are having issues setting SAP up to work with the business connector and our EDI system - cloverleaf.
For testing, we would like to:
1. Create an idoc in SAP and send it to the Busness Connector.
2. Have the busness connector send the doc via XML to our EDI system cloverleaf.
Currently, I have things setup like so:
SAP/ECC6:
SM59: RFC setup as type T and works fine.
WE20: Partner Type LS:
I have 2 message types setup (in outboard: I have "orders" and in Inbound I have the same).
in WE21: I have a cloverleaf (our EDI system) to run with the RFC destination I setup in SM59.
On the Business connector, I have the following under routing rules:
From SAP to the Business connector:
Sender: 8805
Reciver: 10000000008
Message Type: Orders
ACL Group: none
Package: default
Main Flow Services: wm.PartnerMgr.flows.88605.1000000008:ORDERS
Transport: ALE (R3/IDOC)
SAP destination: RD1 (our sid).
FOR my outgoing to our EDI system cloverleaf:
I am using the sender: * - Not sure if this should be SAP or the BC.
Reciver: * - Our EDI system. our EDI system is listening on port 49001.
Message Type: Orders
Under URL (not sure about this one)
I have http://reg2lxap0725:5555/MessagingSystem/receive/BcAdapter/BC
I am however stummped on how the URL shold look..
Now, when we test the above config... I recive the following results in WE02.
0000000000003024 25 03 Green Light: IDoc Successful Green LS/ /SAPBC ORDERS05 ORDERS Outbox CLOVERLEAF
For some reason, we also have an "inbound" that fails.
0000000000003025 25 56 Red Light: IDoc Has Errors KU/ /0000088605 ORDERS05 ORDERS Inbox SAPRD1
My main question is however around routing...
We are trying to send these to our EDI system which is listening on 49001.
I am not sure how they want us to setup the routing rules to pass this over to the right port..
I have also searched the documentation, and have not found any real step by step guides, so I may be missing a few things..
Any advice to point me to the right direction is greatly appriciated....
Thanks everyone,
RichardHello Prateek,
Thank you very much for your answer. The AdapterGuide was really helpfull.
Now the routing rule is associated to the correct Service (that was a the problem). So the rule started to process the XML files from the folder (the XML files disappeared immediately after I corrected the rule).
But now my problem is that on the SAP side there is no inbound IDOCs so it seems the trasmission may failed.
Moreover under "Routing"-->"Transactions" I don't see these entries with the the current date.
Our routing rule is simple: "wildcard" "wildcard" "wildcard" "ALE (R/3 IDOC)"--><OUR SAP SYSTEM>
The SAP connection is working as I can test under "SAP..." menu.
Is there any other way to monitor what had happened with these XML files? I'm sure the BC processed as the files are gone, but there is no IDOC in the destination SAP...
Thanks a lot! -
XSQL: How to embed the XML document(s) instead of posting?
Dear all.
I'm trying to use XSQL for a self-contained database schema setup. This setup should be able to handle DML (INSERT/UPDATE/DELETE), PL/SQL calls etc and I thought XSQL looks perfect for the job. As such, I wouldn't be using XSQL as a publishing framework but as kind of an ETL tool. The only output I would be interested in would be the xsql-status in order to check that the number of rows processed matches my expectations. I would prefer XSQL to run entirely within the database and not depend on any servlet container.
However, it seems that XSQL's only way of obtaining the canonical XML (ROWSET/ROW) that is used by xsql:insert-request/xsql:update-request/xsql:delete-request is through HTTP POST/GET. It doesn't seem that it's possible to embed the XML directly in the page, nor does it seem possible to handle more than one XML.
I'm trying to achieve something like this:
<?xml version="1.0"?>
<page connection="scott" xmlns:xsql="urn:oracle-xsq">
<xsql:insert-request table="DEPT">
<ROWSET>
<ROW>
<DEPTNO>-10</DEPTNO>
<DNAME>NEW DEPT 1</DNAME>
<LOC>COPENHAGEN</LOC>
</ROW>
<ROW>
<DEPTNO>-20</DEPTNO>
<DNAME>NEW DEPT 2</DNAME>
<LOC>LONDON</LOC>
</ROW>
</ROWSET>
</xsql:insert-request>
<xsql:insert-request table="EMP">
<ROWSET>
<ROW>
<EMPNO>-10</EMPNO>
<ENAME>NEW EMP 1</ENAME>
</ROW>
<ROW>
<EMPNO>-20</EMPNO>
<ENAME>NEW EMP 2</ENAME>
</ROW>
</ROWSET>
</xsql:insert-request>
</page>
or perhaps
<?xml version="1.0"?>
<page connection="scott" xmlns:xsql="urn:oracle-xsq">
<request>
<parameters>
<dept>
<ROWSET>
<ROW>
<DEPTNO>-10</DEPTNO>
<DNAME>NEW DEPT 1</DNAME>
<LOC>COPENHAGEN</LOC>
</ROW>
<ROW>
<DEPTNO>-20</DEPTNO>
<DNAME>NEW DEPT 2</DNAME>
<LOC>LONDON</LOC>
</ROW>
</ROWSET>
</dept>
</parameters>
</request>
<xsql:insert-request table="DEPT" param="dept"/>
<xsql:insert-request table="EMP" param="emp"/>
</page>
I need both INSERT/UPDATE/DELETE so xsql:insert-param isn't enough, would also need an xsql:update-param and xsql:delete-param.
A way of referring to the canonical XML through an URI or XPath expression (referring to a registered XML document in the database) would also be cool.
Perhaps implementing custom action handlers would work but not sure whether they'll be able to refer to any child XML elements within them? Furthermore, the syntax for these would also be slightly inconvenient:
<xsql:action handler=com.ellebaek-consulting.xsql.InsertActionHandler" table="DEPT">
My alternative would be to re-implement an extended version of XSQL (XSQLX :-)?) but I'm trying to avoid that.
Any pointers and ideas are very much appreciated.
Thanks in advance.
Best regards
Finn Ellebaek NielsenHi.
Thanks for your reply but the article only talks about how to query data with XSQL and I need to INSERT/UPDATE/DELETE data embedded in XSQL pages into the database so I'm afraid that the article doesn't apply.
Cheers
Finn -
How to encode XML to Idoc and decode Idoc to XML in business connector?
Hi all,
first of all: thanks for all, who are reading and perhaps responding this question!
Here some facts and my question(s):
The facts:
- I have the business connector version 4.6!
- I'm not working with any SAP Netviewer!
- I have XML files on an FTP-server and Idoc-files on an FTP-server --> so no connection between SAP and business connector, meaning: the files are just on the ftp-server!
What am i doing and what is working properly:
- Business connector logs in into the FTP-server (with FTP-service: pub.client.ftp:login)
- gets the file (with FTP-service: pub.client.ftp:get) (the idoc-file, when i want to convert it into XML or the XML-file, when i want to convert it into idoc-format)
- puts the file into another place in the server (with service wm.PartnerMgr.gateway.transport.FTPTransport:OutboundProcess)
!!!So far only getting and putting of the file works!!!
What is missing between getting the file in one format - for example idoc-format - and putting the file into the server in the other format - for example XML-format is:
CONVERSION FROM XML INTO IDOC AND VICE VERSA
My question:
- which services i have to use between getting and putting the files?
Thanks to all,
TamerHi,
I have the same problem. I do fix it?
Thanks
Wilson Xavier
Brazil -
Can business area change when we post a clearing document?
Hi all,
Is it possible to change the business area when we post a clearing document?
For example, we need to pay the line item that have business area 3000. Then we use transaction F110 to create a payment then a clearing docuement will be created with business area 3000. Can we configure it to change to Business area 1000 when we do the payment.
I tried to implement a FI substitution but Business area field cannot be changed(OSS Note 42615). we can do that by changing standard program but it is not recommended by SAP.
Any idea on how to do this? Configuration, BTE or any user exits? Point will be rewarded for any helpful answer.
Thanks,
Chaiphonhi raj,
Could you please explain more about assignment and substitution? did you implement this before?
I am in doubt because OSS Note 42615 said that GSBER (Business area) must not be substituted. Therefore, if you implement it and there is no problem, I will do the same.
Thanks,
Chaiphon -
ABAP Query output to XML file using Business connector
Hi All,
I would request your help on to know, how can I read the output of ABAP query executed in SAP system via Business connector and then generate a XML file.
Also the existing business connector system, generates the XML file in encoding iso-8859-1. Where as customer wants the output XML file in encoding windows-1252.
Please help with your valuable ideas.
Thanks,Hello,
possible solution:
1. create a remote function module (FM) in SAP which returns your needed data
2. create outbound map in BC for this FM
3. call this FM from BC in a flow
3. extract the result to XML (e.g. with service recordToDocument)
CSY -
Receiving a inbound xml file in Business Connector
Hi All,
The requirement is we are receiving an inbound xml file at the BC end from a third party application.
We have configured the url in the third party end as follows -
http://ip address of BC:port address/invoke/Folder/Service
When the file is posted, the xml file is normally routed to the service in the developer.
In the developer we are using the service load document to load the file from the url location.
But at present when a xml file is triggered from the third party application it is routed to the service, and on checking the url location http://ip address of BC:port address/invoke/Folder/Service the server slows down slowly and we are not able to access both the developer and administrator after this.
Are we following the correct steps, or else is there anyother way of receiving the inbound file in BC.
Any suggestions on this would be of great help.
Please let me know if we are going wrong anywhere.
Regards,
PriyaHi priye,
I am agreed with you approach, and this is what everyone do. :). So that is not a problem. May be something else will be the cause.
>>>>In the developer we are using the service load document to load the file from the url location
For load document, i don't think its necessary because using the URL post, you are submitting data directly to the Flow Service. So no need to do document load or anything. Also i am against to use the Save data in pipeline (savePipeline) service because when you transport this in production you need to comment this step otherwise it will give other problems when this will run.
if this approach is giving you performance problem, then try putting your xml file in you package directory and the write a file pooler and then parse this xml for ur use. this is one of the simple solutions.
hope this will help you.
Regards
Aashish Sinha
PS : reward points if helpful -
Receive XML with Business Connector, convert to IDoc
Hi all,
I am trying to receive XML files with SAP Business Connector (4.7) and convert them to IDOC and then forward the IDoc file to SAP System.
At the moment, I have to do the testing for this.
I don't know how to send the XML file to the special port (5555) of the server. I read that there are serveral possibilities like http, mail, ftp. Can anybody give me an advice how this works?
Next problem is to get the created IDoc file to the SAP system. The SAP server is added in the SAP Business Connector and the connection works.
I would be very pleased if anybody could help me.
Thanks in advance!
Kaihi,
What i understand from your scenario is XI> BC> SAP system.
1)XI-->BC
U need to configure XI's-BCAdapeter(as receiver).
in URL specify teh follwoing :
http://<hostname>:5555/invoke/folder1.folder2./<service-to-be invoked>
together with the username and password.
2) BC--> SAP
To invoke an IDoc, go to Routing rules and specify the sender, receiver, and the Message Type(IDoc name). In the next page, specify the name of the flow service to be created. and the Flowservice to be invoked whenever a message comes in.
Hope this gives you some input.
Regards,
Siva Maranani
Maybe you are looking for
-
Not only is photoshop, are all that is installed in my computer. I need the programs for college studies, for I Design. Help me please.
-
Shuttering MPEG HD - BUG?
We are using Adobe Media Encoder for encoding video files to our prefered codec. (MPEG HD - .TS) This used to be no problem. Since a few months (november 2013?) we get only video files with shuttering pixel every second. We didn't change the preset a
-
Installing Third Party Actions in PSE 7
I have figured out a way to add third party actions to PSE 7.<br /><br />It is similar to PSE 6, byt now all the files are in one directory, and they have changed the format of the XML files.<br /><br />Any suggestions or comments on how to improve t
-
Dear All , While making vendor payment with Tcode F-53 / F-58 or while clearing Vendor with tcode F-44 , Profit center not dispaly. In Profit center field there is blank insted of actual Profit center. At the time of Bill booking (MIRO/FB60), We are
-
Storage problem with ML installation
How can Imnotice if I may not have enough storage for the installation? All went smoothly but after restart I have had white locked screen with windmill for the past thirty minutes and I cannot do anything, nothing moves. Should I try forced restart?