DTD generation for IDOC- XI- Web-Method(SOAP)
Hi All,
Our web method team wants DTD from XI to design there development.
I can provide XML structure but I do not know how to generate DTD file from XI.
Also I am trying to generate DTD following site : http://www.hitsw.com/xml_utilites/ But web-method team saying there is no Root node in above generated DTD.
Please guide me how to generate DTD from XI?
Regards
Bhavesh,
I am working on a MDM(FILE)-XI-IDOC interface. I need to have the IDOC structure for my file structure. I have exported XSD from the IDOC and created an external definition file and using it.
Otherwise, can I create a DTD file out of IDOC and import that into any data type? I created the DTD for the IDOC in WE60 and tried to import that into XI data type which is giving PARSER ERROR.
Do you have any idea how to create a DTD file from a XSD file as you mentioned in this message?
Thanks
Kalyan
Similar Messages
-
Web Methods- SOAP-XI Integration
Hi All,
I am working on a scenario where I need to integrate web methods and XI using web services. I got WSDLs from my web methods team I have tested the same in XML spy they are working fine and I am able to see response in it.
I have imported the same WSDL in XI and done with all the XI developments. When I am trying to send any request to web methods I am getting an exception from web methods like below,
<?xml version="1.0" encoding="UTF-8" ?>
- <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <SOAP-ENV:Body>
- <SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Server</faultcode>
<faultstring>[ISS.0088.9112] An Exception was thrown in the server</faultstring>
<faultactor>http://abcdefgh.com:6557/soap/default</faultactor>
- <detail xmlns:webM="http://www.webMethods.com/2001/10/soap/encoding">
- <webM:exception>
<webM:className>java.lang.NullPointerException</webM:className>
<webM:message xml:lang="" />
<webM:stackTrace xml:lang="">java.lang.NullPointerException at com.wm.util.LocalizedException.<init>(LocalizedException.java:229) at com.wm.app.b2b.server.ServerException.<init>(ServerException.java:55) at com.wm.app.b2b.server.ServiceException.<init>(ServiceException.java:43) at com.wm.app.b2b.server.SOAPException.<init>(SOAPException.java:102) at com.wm.app.b2b.server.SOAPMessage.validate(SOAPMessage.java:957) at com.wm.app.b2b.server.HTTPSOAPHandler._process(HTTPSOAPHandler.java:429) at com.wm.app.b2b.server.HTTPSOAPHandler.process(HTTPSOAPHandler.java:111) at com.wm.app.b2b.server.Dispatch.run(Dispatch.java:298) at com.wm.util.pool.PooledThread.run(PooledThread.java:105) at java.lang.Thread.run(Thread.java:534)</webM:stackTrace>
</webM:exception>
</detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
I have configured my SOAP communication channel as below,
Transport protocol: HTTP
Message protocol : SOAP 1.1
Target URL : http:// abcdefgh.com:6557/soap/default
Do not use SOAP envelop (Checked)
Any help on this would be greatly appreciated.
Regards,
Prasad Babu.Hi !
<b>XI->SOAP->Webmethod</b>
also check with these
XI->SOAP->Webmethod we can achieve it.
This might help you
XI with Webmethods
Differences between XI and webMethods
/people/abhy.thomas/blog/2007/04/19/sap-xi--webmethods-integration-150-challenges-and-migration-strategies
XI and webMethos connectivity
Integrate Webmethods and XI
Just a thought
SAP BC is also a webmethods proprietary integration solution. So in my opinion u should look into SAP BC adapter for ur integration requirements.
/people/michal.krawczyk2/blog/2005/09/15/xi-rfc-mapping-lookups-from-bc-to-xi
/people/bla.suranyi/blog/2006/07/10/xi--sap-business-connector-integration-using-the-http-adapter
WebMethods has developed a WebMethods XI adapter that is plugged into WebMethods and that can post messages into the XI PipleLine url in the XI SOAP Message Format.
Liewise XI can use the XI receiver adapter to post the message to a particualr URL on WebMethods.
WebMethods will read the info from this URL using the Sender XI Adapter plugged into WebMethods.
Abhy Thomas has also posted a Article on SDN and this should be out soon that discusses the finer acspects of this implementation while his blog provides a high level overview.
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/a%20case%20study%20sap%20xi%20-%20webmethods%20integration.pdf
There are couple of docs available - kind of case study..
/people/abhy.thomas/blog/2007/04/19/sap-xi--webmethods-integration-150-challenges-and-migration-strategies
thread discussion.. XI with Webmethods
<b>Questions are welcome here!!
Also mark helpful answers
Thanks,
Abhishek Agrahari </b> -
Examples needed for Idoc to file and IDOC to web services
Hi ,
Could any one of you give some examples which take me through step-by-step in building IDOC-TO-FILE and IDOC-TO-WEB SERVICES?
Regards,
XI Developer.Hi,
For IDOC scenario you need to first do the required configuration:
ALE configuration for pushing idocs from SAP to XI
/people/swaroopa.vishwanath/blog/2007/01/22/ale-configuration-for-pushing-idocs-from-sap-to-xi
Testing purpose u can use the below method:
IDOC testing using WE19
/people/sameer.shadab/blog/2005/07/25/reposting-idocs-instead-of-recreating--for-testing-purpose-xi
/people/prateek.shah/blog/2005/06/08/introduction-to-idoc-xi-file-scenario-and-complete-walk-through-for-starters --> For Idoc sender: IDOC -file
IDOC configuration:
Please follow the below process for configuration:
Pre-requisites for Inbound IDoc to R/3 from PI:
Configuration required at Xi side:
Go to IDX1: configure the port.
Go to IDX2: load the DOC metadata.
Go to SM59: Create RFC destination which points to R3 system this is require in the case where your IDOC is sent to R 3 system,
Configiration required at R3 side:
Maintain Logical System for PI (SALE transaction):
Maintain Partner Profile for XI system(WE20):
Pre-requisites for Outbound IDoc from R/3 to PI:
Configurations required in R/3:
Maintain Logical System (SALE)
Define RFC Destination (SM59) which points to PI system
Maintain Port (WE21)
Maintain partner profile. (WE20):
Maintain Distribution Model (BD64):
File To IDOC - Part1 (SLD and Design):
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/profile/2007/05/11/fileToIDOC&
File To IDOC - Part2 (Configuration):
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/profile/2007/05/11/fileToIDOC-Part2+(Configuration)&
File To IDOC - Part3 (Steps required in XI and R3):
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/profile/2007/05/11/fileToIDOC-Part3(StepsrequiredinXIandR3)&
SOAP scenario:
YOu have to first create the WSDL through ID and import that WSDL in to IR external definition.
Refer the below thread and pdf:
How to use SOAP adapter:
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/40611dd6-e66e-2910-f383-e80fb44f9cd4
SAP AII - How to consume and expose webservices ?
Thnx
Chirag
reward points if it helps. -
WSDL for web method with parameters from different namespaces
I'm trying to create a web service that exposes a method that accepts a JAXB XML object and a timestamp as parameters and returns another JAXB XML object. I've tried to follow the contract-first method by creating the schema and WSDLs first. I've created the schemas for the XML and deployed them on a web server and I've written the following WSDL:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://bar.org"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="MyWebService"
xmlns:ns0="http://foo.org/Transaction"
xmlns:ns1="http://bar.org/TransactionResponse"
targetNamespace="http://bar.org">
<!-- T Y P E S -->
<wsdl:types>
<xsd:schema targetNamespace="http://bar.org"
xmlns:ns0="http://foo.org/Transaction"
xmlns:ns1="http://bar.org/TransactionResponse"
xmlns="http://bar.org">
<xsd:import namespace="http://foo.org/Transaction" schemaLocation="http://myHost/schemas/Transaction.xsd"/>
<xsd:import namespace="http://bar.org/TransactionResponse" schemaLocation="http://myHost/schemas/TransactionResponse.xsd"/>
<xsd:element name="ProcessTransactionRequest">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="ns0:Transaction"/>
<xsd:element name="TransactionTime" type="xsd:dateTime"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
</wsdl:types>
<!-- M E S S A G E S -->
<wsdl:message name="ProcessTransactionRequest">
<wsdl:part element="tns:ProcessTransactionRequest" name="parameters" />
</wsdl:message>
<wsdl:message name="ProcessTransactionResponse">
<wsdl:part element="ns1:TransactionResponse" name="parameters" />
</wsdl:message>
<!-- P O R T T Y P E -->
<wsdl:portType name="MyWebServicePortType">
<wsdl:operation name="ProcessTransaction">
<wsdl:input message="tns:ProcessTransactionRequest" />
<wsdl:output message="tns:ProcessTransactionResponse" />
</wsdl:operation>
</wsdl:portType>
<!-- B I N D I N G -->
<wsdl:binding name="MyWebServiceSOAP" type="tns:MyWebServicePortType">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="ProcessTransaction">
<soap:operation soapAction=""/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<!-- S E R V I C E -->
<wsdl:service name="MyWebService">
<wsdl:port binding="tns:MyWebServiceSOAP" name="MyWebServiceSOAP">
<soap:address location="http://www.example.org/"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>However when I run the WsImport tool bundled with JAX-WS RI 2.1.1, I get the following interface:
public interface MyWebServicePortType {
* @param parameters
* @return
* returns org.bar.transactionresponse.TransactionResponse
@WebMethod(operationName = "ProcessTransaction")
@WebResult(name = "TransactionResponse", targetNamespace = "http://bar.org/TransactionResponse", partName = "parameters")
public TransactionResponse processTransaction(
@WebParam(name = "ProcessTransactionRequest", targetNamespace = "http://bar.org", partName = "parameters")
ProcessTransactionRequest parameters);
}Which is workable, but I was wondering how to modify the WSDL to get a web method signature similar to:
public TransactionResponse processTransaction(
@WebParam(name = "Transaction", targetNamespace = "http://foo.org/Transaction", partName = "transaction")
Transaction transaction,
@WebParam(name = "TransactionTime", targetNamespace = "http://bar.org", partName = "transactionTime")
XMLGregorianCalendar transactionTime);With two parameters in the parameter list instead of one. Is there a way to do this?Try changing the <xsd:element name="ProcessTransactionRequest"> element name to: <xsd:element name="ProcessTransaction"> and update the reference to it in the <wsdl:message name="ProcessTransactionRequest"> message.
In order to use wrapper style, your WSDL needs to have the following characteristics:
1) The operation's input and output messages (if present) each contain a single part
2) The input message part refers to a global element declaration whose localname is equal to the operation name
3) The output message refers to a global element declaration
4) The elements referred to by the input and output message parts (henceforth referred to as wrapper elements) are both complex types defined using the xsd:sequence compositor
5 The wrapper elements only contain child elements, they must not contain other structures such as wildcards... -
Stub(Proxy) generation for external Web Service in SAP NW WebAS 6.40
Hi,
Can anyone tell me what tool is used to generate the proxy files for accessing any external web services in SAP NetWeaver WebAS 6.40 for JAVA (SAP DevStudio 2.0.5).
Do i have to install any components or configuration for using external web services?
Thanks,
Mital.Hi Peter,
Thanks for the reply.
I have already gone through the Email Web Service tutorial. And implemented the tutorila.But no where they have mentioned about the toolkit they are using to generate stub files and SOAP request.(for eg Axis tool for WSDL to java generation).
Also I am facing problems while I am trying to use an external webservice. I have posted the problem at Re: WebDynpro External Web Service Model.
It would be nice if uyou can go through the problem and help me in solving the problem.
Also can you please tell me the link for the mentioned documents on importing web service model.
Thanks,
Mital. -
Inbound SOAP for IDoc : Register Service
Hi ,
We have a requirement where we need to post an Inbound IDoc in the R3 from a Web Service that is called from a 3rd party application, I found something in the Transaction
SALE->Basic Settings-> Inbound SOAP for IDoc : Register Service in R3 , the documentation says "You execute the report SRT_REGISTER_SERVICE to activate Inbound SOAP for IDocs." But I'm confused what needs to be done after that.
Can anyone throw some more light on the following issues :
a) where does the WSDL get stored for the IDoc,
b) how to register a particular IDoc as a web service such that it can be called from third party system.
Thanking all the experts in advance for their valuable time and help.
Regards,
Advait.Hi Advait,
Did you get any further with this problem. I have the same issue and I don't know how to go further on this
Ron -
Unable to convert sender service for IDoc to SOAP Scenario
Hi,
I tried to find the solution my way and by using the search function but without any success. I have the folowing scenario:
SYS(my sap system) => IDoc => PI (Process Integration) => SOAP => XML
When i send the IDoc to the PI System and open SXI_Moni the folowing error is shown:
"Unable to convert the sender service receiver_service to an ALE logical system"
I read about Adapter Specific Identifies so i go to ID->Service without partner->Business System->MyBusinessSystem(SYS) then in Menü on Services and checked Adapter Specific Identifies. They are like maintained in SLD.
Next is a Cache refresh i tried a full one but no impact
Then i tried a header mapping in receiver agreement. I mapped there the receiver party to the definied receiver party and the receiver_service to the service.
I have no idea
Thanks for help, be sure that helpful answers will be awarded
regards
Matthias
P.S. What causes this error ? For my opinion ALE has already done all neccesary things (The Idoc is in PI System and the data is available in mesaage payload) so why didn't the pi map it and send it via Soap?Hi Matthias
>>I dont know if its helpful but in SLD are only the system of our landscape so i have no entry for the external Party.
Party information is generally not required to be maintained in SLD
>>Adapter Specific Identifies
What is the value you have given for sender Business system->adapter specific identifier. Is it the same as the partner profile name in sender SAPECC. if not try making them same.
Regards
Suraj -
Hi all
I need to create idoc from VL02N on goods issue....
I have one particular output type configured in nace . When that gets triggered i need to create the idoc by taking the outbound delivery number from VL02N and then fetching certain data.
I am confused as to how to approach for this.....Where do i need to write my code for idoc generation so that it can access the outbound delivery number and then do the rest of the processingHi,
Your custom function module needs to be defined as the same structure as below.
Local Interface:
*" IMPORTING
*" REFERENCE(OBJECT) LIKE NAST STRUCTURE NAST
*" REFERENCE(CONTROL_RECORD_IN) LIKE EDIDC STRUCTURE EDIDC
*" EXPORTING
*" VALUE(OBJECT_TYPE) LIKE WFAS1-ASGTP
*" VALUE(CONTROL_RECORD_OUT) LIKE EDIDC STRUCTURE EDIDC
*" TABLES
*" INT_EDIDD STRUCTURE EDIDD
In function module add following code to get the delivery number.
move object-objky(10) to del_no.
You can see the function module definition of IDOC_OUTPUT_DELVRY which is related to standard outbound process code "DELV".
Regards
Vinod -
Problem generating stubs for Java EJB web service deployed in OAS
I created an EJB web service and I've successfully deployed it in my Oracle App Server. Some of the methods work fine but others produce the ff error:
org.apache.soap.SOAPException - java.lang.IllegalArgumentException: No Serializer found to serialize [classname] using encoding style [encoding]It seems that the objects specified as parameters in the web service methods exposed are the only ones that had stubs generated for them. Other objects I use, which are usually wrapped inside a Vector, did not have generated stubs.
Example:
public String loginUser(UserDTO userDTO) throws RemoteException, NamingException, SQLException;
public String addItems (Vector vecItems) throws RemoteException, NamingException, SQLException; // where vecItems is a collection of ItemDTO objects In this scenario, stubs were generated for the UserDTO class, but not for the ItemDTO class. In effect, calling the addItems method resulted to the exception I mentioned above.
I did a workaround wherein I declared a dummy method which accepted all the types of objects I needed as parameters so all the necessary stubs can be generated, but this fix doesn't feel like it's the proper solution to my problem.
If anyone can help me, it would be greatly appreciated. Thanks!Crossposted:
Problem generating stubs for Java EJB web service deployed in OAS -
Do we need a sender channel for IDOC to file scenario.
Hi,
Do we need a sender channel in IDOC to FILE scenario.
Because IDOC is being sent by SAP R/3 System and when creating objects in ID using wizard, it doesn't ask for sender channel.
What is the reason for this?
Regards,
YounusYounus,
to add more...
From <b>WAS(Web Application Server) 6.20</b> and above BASIS is not the runtime for SAP.WAS is the runtime for SAP.
And it has got ABAP and JAVA engine in it.
It handles connections made over various protocols such as SMTP for mail, HTTP(S), and SOAP/XML.
<b>
The SAP Web AS 6.10 did not have a Java engine.</b>
and IDOC and HTTP are present on the ABAP engine and the rest reside on JAVA engine.
and that is the reason why IDOC and HTTP doesnt require Sender Adapter and Sender Aggrement aswell.
Hope i cleared ur point...
Cheers,
Raghavesh
Message was edited by:
Raghavesh Reddy -
Use BizTalk 2006 as a proxy for an external Web Service
Hi
We have a solution that is going to work just as a proxy for an external Web Service.
It works like this:
1. We have a Request-Response receive port that receives the calls for the WS.
2. Different Static Solicit-Response ports that have filters for each method in the WS receive the requests and then send them to the external WS.
3. The response from the external WS is then sendt back to the caller via the Request-Response port in point 1.
This generally works like it should. The only problem i have is when the external WS returns a Fault message. I get this fault from the external WS:
<s:Fault xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><faultcode>s:Client</faultcode><faultstring xml:lang="nb-NO">Some error message the caller should see.</faultstring><detail><GenericFault
xmlns="http://register.test.com/Common" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ErrorCode>SomthingWentWrong</ErrorCode><Message>Some error message the caller should see.</Message></GenericFault></detail></s:Fault>
This message then failes on BizTalk and BizTalk returns this Fault message to the caller:
<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP:Body><SOAP:Fault><faultcode>Microsoft BizTalk Server Negative Acknowledgment
</faultcode><faultstring>An error occurred while processing the message, refer to the details section for more information </faultstring><faultactor>/Hemit.BizTalk.NHN.Position.ws/IPositionService.asmx</faultactor><detail><ns0:NACK
Type="NACK" xmlns:ns0="http://schema.microsoft.com/BizTalk/2003/NACKMessage.xsd"><NAckID>{7AC314FE-2CA3-44AE-8208-180495500481}</NAckID><ErrorCode>0xc0c016b7</ErrorCode><ErrorCategory>0</ErrorCategory><ErrorDescription>There
is an error in XML document (1, 2).</ErrorDescription><ErrorDetail><Fault xmlns='http://schemas.xmlsoap.org/soap/envelope/'> was not expected.</ErrorDetail></ns0:NACK></detail></SOAP:Fault></SOAP:Body></SOAP:Envelope>
So the problem seems to be that the Request-Response port in point one will ONLY accept the real response that is specified in the response schema for that particular method, and not a Fault. And when it receives a fault, it generates its own Fault saying
a Fault message was not expected.
Does anyone know how i can be able to send the actual fault from the external WS all the way back to the caller on the inside?
I know how to do it with an orchestration, but can not figure out how to get it done just with the ports.
Kind regars
John ViggoHi John,
Enable Propagate fault message
on the WCF solict –response port.
For the two-way send port, you can choose whether to forward
SOAP fault messages on to the original caller over a solicit-response send port by selecting
Propagate fault message. If this option is not selected, BizTalk Server will generate a NACK. What you see is the NACK.
If it is selected, BizTalk Server will treat the message as a valid WCF response message from the external service and the response message will not be suspended because it is propagated.
Then you need to map the fault message to the actual response in the map. Set this Fault-Message to Caller-Response map in the outbound map of the Requeust-Response port.
In this case of messaging-only scenario, this method shall help in handling the fault message and passing fault details back to the caller. Refer the following articles for more details.
Synchronous web services calls and Faults
BizTalk and
SOAPFault
version issues
If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful. -
How to disable u201Csticky sessionu201D for the particular web application?
Hi All,
Is there a possibility to disable so called u201Csticky sessionu201D for the particular web application? We have deployed a WAR file with the Axis 1.4 based web service into SAP NW 7.1. The web service works fine but when the client makes SOAP request the server creates a so-called u201Cstickyu201D HTTP session with the default (30 minutes) timeout. Such u201Csessionsu201D are created on each SOAP request from the same client. The maximum number for Java Web Sessions (SAP Management Console) is 1000. After a while the clients start getting the u201C503 Service not availableu201D errors:
503 Service not available.
Error: -6
Version: 7010
Component: ICM Java
Date/Time: Tue Mar 03 14:30:12 2009
Module: http_j2ee2.c
Line: 1166
Server: XXXXXXXXXXX
Error Tag:
Detail: server overload: no more sessions available
The only way to improve the situation we found so far was to set session timeout to 1 minute. That u201Csticky sessionu201D will still be created, though.
This is a testing environment and we do not use any hardware/software loadbalancer.
Any help/advice is appreciated. (Please let me know if you need more information.)
Thanks,
Dmitry VasilenkoThe practical workaround we finally come up with for this problem was to create a servlet filter and map it to the AxisServlet. The servlet filter will invalidate the HTTP session and effectively destroy the sticky session created by the server on each SOAP request.
Here is the fragment from the web.xml
<filter>
<filter-name>StickySessionFilter</filter-name>
<filter-class>com.xxxxx.xxxxx.xxxx.services.StickySessionFilter</filter-class>
</filter>
<filter-mapping>
<filter-name> StickySessionFilter </filter-name>
<servlet-name>AxisServlet</servlet-name>
</filter-mapping>
<servlet>
<servlet-name>AxisServlet</servlet-name>
<servlet-class>org.apache.axis.transport.http.AxisServlet</servlet-class>
</servlet>
The doFilter() method looks like this:
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
try {
chain.doFilter(request, response);
} finally {
javax.servlet.http.HttpServletRequest httpRequest = (javax.servlet.http.HttpServletRequest)request;
javax.servlet.http.HttpSession session = httpRequest.getSession();
session.invalidate();
Thanks,
Dmitry Vasilenko -
Need docs. for IDoc & RFC
Hi All,
Please help me with documents of IDoc & RFC.
Thanks in advance.
Regards,
SreeHi,
Data Creation in Idoc
IDocs are text encoded documents with a rigid structure that are used to exchange data between R/3 and a foreign system. Instead of calling a program in the destination system directly, the data is first packed into an IDoc and then sent to the receiving system, where it is analyzed and properly processed. Therefore an IDoc data exchange is always an
asynchronous process. The significant difference between simple RFC-calls and IDoc data exchange is the fact, that every action performed on IDocs are protocolled by R/3 and IDocs can be reprocessed if an error occurred in one of the message steps.
While IDocs have to be understood as a data exchange protocol, EDI and ALE are typical use cases for IDocs. R/3 uses IDocs for both EDI and ALE to deliver data to the receiving system. ALE is basically the scheduling mechanism that defines when and between which partners and what kind of data will be exchanged on a regular or event triggered basis. Such a set-up is called an ALE-scenario.
IDoc is a intermediate document to exchange data between two SAP Systems.
*IDocs are structured ASCII files (or a virtual equivalent).
*Electronic Interchange Document
*They are the file format used by SAP R/3 to exchange data with foreign systems.
*Data Is transmitted in ASCII format, i.e. human readable form
*IDocs exchange messages
*IDocs are used like classical interface files
IDOC types are templates for specific message types depending on what is the business document, you want to exchange.
WE30 - you can create a IDOC type.
An IDOC with data, will have to be triggered by the application that is trying to send out the data.
FOr testing you can use WE19.
How to create idoc?
*WE30 - you can create a IDOC type
For more information in details on the same along with the examples can be viewed on:
http://www.netweaverguru.com/EDI/HTML/IDocBook.htm#_Toc8400404
http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a6620507d11d18ee90000e8366fc2/frameset.htm
http://www.sappoint.com/presentation.html
http://www.allsaplinks.com/idoc_search.html
http://www.sapgenie.com/sapedi/idoc_abap.htm
http://www.erpgenie.com/sapedi/idoc_abap.htm
To Create Idoc we need to follow these steps:
Create Segment ( WE31)
Create Idoc Type ( WE30 )
Create Message Type ( WE81 )
Assign Idoc Type to Message Type ( WE82 )
Creating a Segment
Go to transaction code WE31
Enter the name for your segment type and click on the Create icon
Type the short text
Enter the variable names and data elements
Save it and go back
Go to Edit -> Set Release
Follow steps to create more number of segments
Create IDOC Type
Go to transaction code WE30
Enter the Object Name, select Basic type and click Create icon
Select the create new option and enter a description for your basic IDOC type and press enter
Select the IDOC Name and click Create icon
The system prompts us to enter a segment type and its attributes
Choose the appropriate values and press Enter
The system transfers the name of the segment type to the IDOC editor.
Follow these steps to add more number of segments to Parent or as Parent-child relation
Save it and go back
Go to Edit -> Set release
Create Message Type
Go to transaction code WE81
Change the details from Display mode to Change mode
After selection, the system will give this message The table is cross-client (see Help for further info). Press Enter
Click New Entries to create new Message Type
Fill details
Save it and go back
Assign Message Type to IDoc Type
Go to transaction code WE82
Change the details from Display mode to Change mode
After selection, the system will give this message The table is cross-client (see Help for further info). Press Enter.
Click New Entries to create new Message Type.
Fill details
Save it and go back
Check these out..
Re: How to create IDOC
Check below link. It will give the step by step procedure for IDOC creation.
http://www.supinfo-projects.com/cn/2005/idocs_en/2/
ALE/ IDOC
http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
http://www.sapgenie.com/sapedi/index.htm
http://www.sappoint.com/abap/ale.pdf
http://www.sappoint.com/abap/ale2.pdf
http://www.sapgenie.com/sapedi/idoc_abap.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a60bb507d11d18ee90000e8366fc2/frameset.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/78/217da751ce11d189570000e829fbbd/frameset.htm
http://www.allsaplinks.com/idoc_sample.html
http://www.sappoint.com/abap.html
http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
http://www.sapgenie.com/sapedi/index.htm
http://www.allsaplinks.com/idoc_sample.html
http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.docs
go trough these links.
http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
http://www.sapgenie.com/sapedi/index.htm
http://www.sappoint.com/abap/ale.pdf
http://www.sappoint.com/abap/ale2.pdf
http://www.sapgenie.com/sapedi/idoc_abap.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a60bb507d11d18ee90000e8366fc2/frameset.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/78/217da751ce11d189570000e829fbbd/frameset.htm
http://www.allsaplinks.com/idoc_sample.html
http://www.sappoint.com/abap.html
http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
http://www.sapgenie.com/sapedi/index.htm
http://www.allsaplinks.com/idoc_sample.html
http://http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
An IDoc is simply a data container that is used to exchange information between any two processes that can understand the syntax and semantics of the data...
1.IDOCs are stored in the database. In the SAP system, IDOCs are stored in database tables.
2.IDOCs are independent of the sending and receiving systems.
3.IDOCs are independent of the direction of data exchange.
The two available process for IDOCs are
Outbound Process
Inbound Process
AND There are basically two types of IDOCs.
Basic IDOCs
Basic IDOC type defines the structure and format of the business document that is to be exchanged between two systems.
Extended IDOCs
Extending the functionality by adding more segments to existing Basic IDOCs.
To Create Idoc we need to follow these steps:
Create Segment ( WE31)
Create Idoc Type ( WE30)
Create Message Type ( WE81)
Assign Idoc Type to Message Type ( WE82)
imp links
http://www.allsaplinks.com/idoc_sample.html
http://www.sapgenie.com/sapedi/idoc_abap.htm
www.sappoint.com
--here u can find the ppts and basic seetings for ALE
http://sappoint.com/presentation.html
www.sapgenie.com
http://www.sapgenie.com/ale/index.htm
WE30 - you can create a IDOC type.
An IDOC with data, will have to be triggered by the application that is trying to send out the data.
Try this..Hope this will help.
SAP ALE & IDOC<<<<
Steps to configuration(Basis) >>
1. Create Logical System (LS) for each applicable ALE-enabled client
2. Link client to Logical System on the respective servers
3. Create background user, to be used by ALE(with authorizaton for ALE postings)
4. Create RFC Destinations(SM59)
5. Ports in Idoc processing(WE21)
6. Generate partner profiles for sending system
The functional configuration(Tcode: SALE)
Create a Customer Distribution Model (CDM);
Add appropriate message types and filters to the CDM;
Generate outbound partner profiles;
Distribute the CDM to the receiving systems; and
Generate inbound partner profiles on each of the clients.
Steps to customize a new IDoc >>>
1. Define IDoc Segment (WE31)
2. Convert Segments into an IDoc type (WE30)
3. Create a Message Type (WE81)
4. Create valid Combination of Message & IDoc type(WE82)
5. Define Processing Code(WE41 for OUT / WE42 for IN)
6. Define Partner Profile(WE20)
Important Transaction Codes:
SALE - IMG ALE Configuration root
WE20 - Manually maintain partner profiles
BD64 - Maintain customer distribution model
BD71 - Distribute customer distribution model
SM59 - Create RFC Destinations
BDM5 - Consistency check (Transaction scenarios)
BD82 - Generate Partner Profiles
BD61 - Activate Change Pointers - Globally
BD50 - Activate Change Pointer for Msg Type
BD52 - Activate change pointer per change.doc object
BD59 - Allocation object type -> IDOC type
BD56 - Maintain IDOC Segment Filters
BD53 - Reduction of Message Types
BD21 - Select Change Pointer
BD87 - Status Monitor for ALE Messages
BDM5 - Consistency check (Transaction scenarios)
BD62 - Define rules
BD79 - Maintain rules
BD55 - Defining settings for IDoc conversion
WEDI - ALE IDoc Administration
WE21 - Ports in Idoc processing
WE60 - IDoc documentation
SARA - IDoc archiving (Object type IDOC)
WE47 - IDoc status maintenance
WE07 - IDoc statistics
BALE - ALE Distribution Administration
WE05 - IDoc overview
BD87 - Inbound IDoc reprocessing
BD88 - Outbound IDoc reprocessing
BDM2 - IDoc Trace
BDM7 - IDoc Audit Analysis
BD21 - Create IDocs from change pointers
SM58 - Schedule RFC Failures
Basic config for Distributed data:
BD64: Maintain a Distributed Model
BD82: Generate Partner Profile
BD64: Distribute the distribution Model
Programs
RBDMIDOC Creating IDoc Type from Change Pointers
RSEOUT00 Process all selected IDocs (EDI)
RBDAPP01 - Inbound Processing of IDocs Ready for Transfer
RSARFCEX - Execute Calls Not Yet Executed
RBDMOIND - Status Conversion with Successful tRFC Execution
RBDMANIN - Start error handling for non-posted IDocs
RBDSTATE - Send Audit Confirmations
FOr testing you can use WE19.
RFC and BAPI:
RFC is Remote Function Call - a function module, which can be called remotely from outside
BAPI is also a Remote enabled function module but the difference between BAPI and RFC is in BAPI there is a bussiness object attached to it which calls SAP application internally.
can you explain RFC and BAPI???
The difference between RFc and BAPI are business objects. You create business objects and those are then registered in your BOR (Business Object Repository) which can be accessed outside the SAP system by using some other applications (Non-SAP) such as VB or JAVA. in this case u only specify the business object and its method from external system in BAPI there is no direct system call. while RFC are direct system call Some BAPIs provide basic functions and can be used for most SAP business object types. These BAPIs should be implemented the same for all business object types. Standardized BAPIs are easier to use and prevent users having to deal with a number of different BAPIs. Whenever possible, a standardized BAPI must be used in preference to an individual BAPI.
RFC is the protocol used to call functions in an R/3 system by a caller external to R/3 or to call programs external to R/3 from an R/3 system. Functions can only be called via RFC, if they are tagged as RFC functions in the SAP development workbench. They are then called RFC function modules. BAPIs are complete sets of (BAPI) function modules that model a business application.
RFC is the protocol used by SAP for remote communication, that is, for communications between remote independent systems.RFC is used for communications between two independent SAP systems, or for communications between an SAP system and a non-SAP system, such as an external application. It can also be used for communications between modules on the same system.Using the RFC interfaces you can extend the functionality of R/3 applications from an external program.
An R/3 system also contains Business Application Programming Interfaces (also called Business APIs, or BAPIs), which provide a programming interface to business objects. BAPIs are a set of methods for working with and manipulating SAP business objects.Internally, BAPIs are implemented as function modules stored in the R/3 Function Builder. Each BAPI has an equivalent internally-named function module. However, you should use the BAPI and not the function module behind it, because the BAPI provides a stable, object-oriented view of R/3 applications and data. The internal function modules or even the fact that the BAPIs are implemented as function modules are not guaranteed to remain the same in future releases of R/3.
BAPI stands for Business Application Programming Interface.
It is a library of functions that are released to the public
as an interface into an existing SAP system from an external
system.
RFC is the protocol used to call functions in an R/3 system
by a caller external to R/3 or to call programs external to
R/3 from an R/3 system.
Functions can only be called via RFC, if they are tagged as
RFC functions in the SAP development workbench. They are
then called RFC function modules. BAPIs are complete sets of
(BAPI) function modules that model a business application.
When you are familiar with web developments: RFC can be
compared to HTTP and BAPIs are CGI applications.
In other words: A BAPI function is a function module that
can be called remotely using the RFC technology.
RFC and BAPIs are remote enabled function modules. They are practicly the same. A BAPI is one step further as it usually is a self contained business function, such as "Create Purchase Order", or "Change Sales Document". BAPIs interface is very well defined and documented. BAPIs can be found in the BAPI browser via transaction BAPI. RFCs are just remote enabled function modules.
BAPI stands for Business Application Programming Interface. It is a library of functions that are released to the public as an interface into an existing SAP system from an external system.
RFC is the protocol used to call functions in an R/3 system by a caller external to R/3 or to call programs external to R/3 from an R/3 system. Functions can only be called via RFC, if they are tagged as RFC functions in the SAP development workbench.
BAPIs are RFCs, the only difference is that BAPIs usually encapulate some complete business object. For example, creating a sales order, the BAPI would do all of the steps required to create a sales order.
Regards,
Shiva. -
Problem with Configuring Tomcat for running jsp web applications..Plz HELP
I am using Tomcat 5.5 and Jdk 1.5.0_12 and Oracle 10g. I am using jdbc-odbc bridge connection
to connect to the database. I have placed my project folder called
tdm under the webapps folder in Tomcat. This 'tdm' folder consists of
a collection of html pages,jsp pages and images of my project. Also I created a
WEB-INF folderand in that I have lib folder which contains catalina-root.jar
, classes12.jar and nls_charset.jar files. And also in the WEB-INF folder I have the web.xml
file which looks like this
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
Copyright 2004 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<web-app>
<resource-ref>
<description>Oracle Datasource example</description>
<res-ref-name>jdbc/gdn</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</web-app>
My Server.xml file in Tomcat\conf folder is as follows
<!-- Example Server Configuration File -->
<!-- Note that component elements are nested corresponding to their
parent-child relationships with each other -->
<!-- A "Server" is a singleton element that represents the entire JVM,
which may contain one or more "Service" instances. The Server
listens for a shutdown command on the indicated port.
Note: A "Server" is not itself a "Container", so you may not
define subcomponents such as "Valves" or "Loggers" at this level.
-->
<Server port="8005" shutdown="SHUTDOWN">
<!-- Comment these entries out to disable JMX MBeans support used for the
administration web application -->
<Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
<!-- Global JNDI resources -->
<GlobalNamingResources>
<!-- Test entry for demonstration purposes -->
<Environment name="simpleValue" type="java.lang.Integer" value="30"/>
<!-- Editable user database that can also be used by
UserDatabaseRealm to authenticate users -->
<Resource name="UserDatabase" auth="Container"
type="org.apache.catalina.UserDatabase"
description="User database that can be updated and saved"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
pathname="conf/tomcat-users.xml" />
<Resource name="jdbc/gdn" auth="Container"
type="javax.sql.DataSource" driverClassName="sun.jdbc.odbc.JdbcOdbcDriver"
url="jdbc:odbc:gdn"
username="system" password="tiger" maxActive="20" maxIdle="10"
maxWait="-1"/>
</GlobalNamingResources>
<!-- A "Service" is a collection of one or more "Connectors" that share
a single "Container" (and therefore the web applications visible
within that Container). Normally, that Container is an "Engine",
but this is not required.
Note: A "Service" is not itself a "Container", so you may not
define subcomponents such as "Valves" or "Loggers" at this level.
-->
<!-- Define the Tomcat Stand-Alone Service -->
<Service name="Catalina">
<!-- A "Connector" represents an endpoint by which requests are received
and responses are returned. Each Connector passes requests on to the
associated "Container" (normally an Engine) for processing.
By default, a non-SSL HTTP/1.1 Connector is established on port 8080.
You can also enable an SSL HTTP/1.1 Connector on port 8443 by
following the instructions below and uncommenting the second Connector
entry. SSL support requires the following steps (see the SSL Config
HOWTO in the Tomcat 5 documentation bundle for more detailed
instructions):
* If your JDK version 1.3 or prior, download and install JSSE 1.0.2 or
later, and put the JAR files into "$JAVA_HOME/jre/lib/ext".
* Execute:
%JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA (Windows)
$JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA (Unix)
with a password value of "changeit" for both the certificate and
the keystore itself.
By default, DNS lookups are enabled when a web application calls
request.getRemoteHost(). This can have an adverse impact on
performance, so you can disable it by setting the
"enableLookups" attribute to "false". When DNS lookups are disabled,
request.getRemoteHost() will return the String version of the
IP address of the remote client.
-->
<!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
<Connector
port="5050" maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true" />
<!-- Note : To disable connection timeouts, set connectionTimeout value
to 0 -->
<!-- Note : To use gzip compression you could set the following properties :
compression="on"
compressionMinSize="2048"
noCompressionUserAgents="gozilla, traviata"
compressableMimeType="text/html,text/xml"
-->
<!-- Define a SSL HTTP/1.1 Connector on port 8443 -->
<!--
<Connector port="8443"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" disableUploadTimeout="true"
acceptCount="100" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS" />
-->
<!-- Define an AJP 1.3 Connector on port 8009 -->
<Connector port="8009"
enableLookups="false" redirectPort="8443" protocol="AJP/1.3" />
<!-- Define a Proxied HTTP/1.1 Connector on port 8082 -->
<!-- See proxy documentation for more information about using this. -->
<!--
<Connector port="8082"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" acceptCount="100" connectionTimeout="20000"
proxyPort="80" disableUploadTimeout="true" />
-->
<!-- An Engine represents the entry point (within Catalina) that processes
every request. The Engine implementation for Tomcat stand alone
analyzes the HTTP headers included with the request, and passes them
on to the appropriate Host (virtual host). -->
<!-- You should set jvmRoute to support load-balancing via AJP ie :
<Engine name="Standalone" defaultHost="localhost" jvmRoute="jvm1">
-->
<!-- Define the top level container in our container hierarchy -->
<Engine name="Catalina" defaultHost="localhost">
<!-- The request dumper valve dumps useful debugging information about
the request headers and cookies that were received, and the response
headers and cookies that were sent, for all requests received by
this instance of Tomcat. If you care only about requests to a
particular virtual host, or a particular application, nest this
element inside the corresponding <Host> or <Context> entry instead.
For a similar mechanism that is portable to all Servlet 2.4
containers, check out the "RequestDumperFilter" Filter in the
example application (the source for this filter may be found in
"$CATALINA_HOME/webapps/examples/WEB-INF/classes/filters").
Request dumping is disabled by default. Uncomment the following
element to enable it. -->
<!--
<Valve className="org.apache.catalina.valves.RequestDumperValve"/>
-->
<!-- Because this Realm is here, an instance will be shared globally -->
<!-- This Realm uses the UserDatabase configured in the global JNDI
resources under the key "UserDatabase". Any edits
that are performed against this UserDatabase are immediately
available for use by the Realm. -->
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
resourceName="UserDatabase"/>
<!-- Comment out the old realm but leave here for now in case we
need to go back quickly -->
<!--
<Realm className="org.apache.catalina.realm.MemoryRealm" />
-->
<!-- Replace the above Realm with one of the following to get a Realm
stored in a database and accessed via JDBC -->
<!--
<Realm className="org.apache.catalina.realm.JDBCRealm"
driverName="org.gjt.mm.mysql.Driver"
connectionURL="jdbc:mysql://localhost/authority"
connectionName="test" connectionPassword="test"
userTable="users" userNameCol="user_name" userCredCol="user_pass"
userRoleTable="user_roles" roleNameCol="role_name" />
-->
<!--
<Realm className="org.apache.catalina.realm.JDBCRealm"
driverName="oracle.jdbc.driver.OracleDriver"
connectionURL="jdbc:oracle:thin:@ntserver:1521:ORCL"
connectionName="scott" connectionPassword="tiger"
userTable="users" userNameCol="user_name" userCredCol="user_pass"
userRoleTable="user_roles" roleNameCol="role_name" />
-->
<!--
<Realm className="org.apache.catalina.realm.JDBCRealm"
driverName="sun.jdbc.odbc.JdbcOdbcDriver"
connectionURL="jdbc:odbc:CATALINA"
userTable="users" userNameCol="user_name" userCredCol="user_pass"
userRoleTable="user_roles" roleNameCol="role_name" />
-->
<!-- Define the default virtual host
Note: XML Schema validation will not work with Xerces 2.2.
-->
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<!-- Defines a cluster for this node,
By defining this element, means that every manager will be changed.
So when running a cluster, only make sure that you have webapps in there
that need to be clustered and remove the other ones.
A cluster has the following parameters:
className = the fully qualified name of the cluster class
name = a descriptive name for your cluster, can be anything
mcastAddr = the multicast address, has to be the same for all the nodes
mcastPort = the multicast port, has to be the same for all the nodes
mcastBindAddr = bind the multicast socket to a specific address
mcastTTL = the multicast TTL if you want to limit your broadcast
mcastSoTimeout = the multicast readtimeout
mcastFrequency = the number of milliseconds in between sending a "I'm alive" heartbeat
mcastDropTime = the number a milliseconds before a node is considered "dead" if no heartbeat is received
tcpThreadCount = the number of threads to handle incoming replication requests, optimal would be the same amount of threads as nodes
tcpListenAddress = the listen address (bind address) for TCP cluster request on this host,
in case of multiple ethernet cards.
auto means that address becomes
InetAddress.getLocalHost().getHostAddress()
tcpListenPort = the tcp listen port
tcpSelectorTimeout = the timeout (ms) for the Selector.select() method in case the OS
has a wakup bug in java.nio. Set to 0 for no timeout
printToScreen = true means that managers will also print to std.out
expireSessionsOnShutdown = true means that
useDirtyFlag = true means that we only replicate a session after setAttribute,removeAttribute has been called.
false means to replicate the session after each request.
false means that replication would work for the following piece of code: (only for SimpleTcpReplicationManager)
<%
HashMap map = (HashMap)session.getAttribute("map");
map.put("key","value");
%>
replicationMode = can be either 'pooled', 'synchronous' or 'asynchronous'.
* Pooled means that the replication happens using several sockets in a synchronous way. Ie, the data gets replicated, then the request return. This is the same as the 'synchronous' setting except it uses a pool of sockets, hence it is multithreaded. This is the fastest and safest configuration. To use this, also increase the nr of tcp threads that you have dealing with replication.
* Synchronous means that the thread that executes the request, is also the
thread the replicates the data to the other nodes, and will not return until all
nodes have received the information.
* Asynchronous means that there is a specific 'sender' thread for each cluster node,
so the request thread will queue the replication request into a "smart" queue,
and then return to the client.
The "smart" queue is a queue where when a session is added to the queue, and the same session
already exists in the queue from a previous request, that session will be replaced
in the queue instead of replicating two requests. This almost never happens, unless there is a
large network delay.
-->
<!--
When configuring for clustering, you also add in a valve to catch all the requests
coming in, at the end of the request, the session may or may not be replicated.
A session is replicated if and only if all the conditions are met:
1. useDirtyFlag is true or setAttribute or removeAttribute has been called AND
2. a session exists (has been created)
3. the request is not trapped by the "filter" attribute
The filter attribute is to filter out requests that could not modify the session,
hence we don't replicate the session after the end of this request.
The filter is negative, ie, anything you put in the filter, you mean to filter out,
ie, no replication will be done on requests that match one of the filters.
The filter attribute is delimited by ;, so you can't escape out ; even if you wanted to.
filter=".*\.gif;.*\.js;" means that we will not replicate the session after requests with the URI
ending with .gif and .js are intercepted.
The deployer element can be used to deploy apps cluster wide.
Currently the deployment only deploys/undeploys to working members in the cluster
so no WARs are copied upons startup of a broken node.
The deployer watches a directory (watchDir) for WAR files when watchEnabled="true"
When a new war file is added the war gets deployed to the local instance,
and then deployed to the other instances in the cluster.
When a war file is deleted from the watchDir the war is undeployed locally
and cluster wide
-->
<!--
<Cluster className="org.apache.catalina.cluster.tcp.SimpleTcpCluster"
managerClassName="org.apache.catalina.cluster.session.DeltaManager"
expireSessionsOnShutdown="false"
useDirtyFlag="true"
notifyListenersOnReplication="true">
<Membership
className="org.apache.catalina.cluster.mcast.McastService"
mcastAddr="228.0.0.4"
mcastPort="45564"
mcastFrequency="500"
mcastDropTime="3000"/>
<Receiver
className="org.apache.catalina.cluster.tcp.ReplicationListener"
tcpListenAddress="auto"
tcpListenPort="4001"
tcpSelectorTimeout="100"
tcpThreadCount="6"/>
<Sender
className="org.apache.catalina.cluster.tcp.ReplicationTransmitter"
replicationMode="pooled"
ackTimeout="15000"/>
<Valve className="org.apache.catalina.cluster.tcp.ReplicationValve"
filter=".*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt;"/>
<Deployer className="org.apache.catalina.cluster.deploy.FarmWarDeployer"
tempDir="/tmp/war-temp/"
deployDir="/tmp/war-deploy/"
watchDir="/tmp/war-listen/"
watchEnabled="false"/>
</Cluster>
-->
<!-- Normally, users must authenticate themselves to each web app
individually. Uncomment the following entry if you would like
a user to be authenticated the first time they encounter a
resource protected by a security constraint, and then have that
user identity maintained across all web applications contained
in this virtual host. -->
<!--
<Valve className="org.apache.catalina.authenticator.SingleSignOn" />
-->
<!-- Access log processes all requests for this virtual host. By
default, log files are created in the "logs" directory relative to
$CATALINA_HOME. If you wish, you can specify a different
directory with the "directory" attribute. Specify either a relative
(to $CATALINA_HOME) or absolute path to the desired directory.
-->
<!--
<Valve className="org.apache.catalina.valves.AccessLogValve"
directory="logs" prefix="localhost_access_log." suffix=".txt"
pattern="common" resolveHosts="false"/>
-->
<!-- Access log processes all requests for this virtual host. By
default, log files are created in the "logs" directory relative to
$CATALINA_HOME. If you wish, you can specify a different
directory with the "directory" attribute. Specify either a relative
(to $CATALINA_HOME) or absolute path to the desired directory.
This access log implementation is optimized for maximum performance,
but is hardcoded to support only the "common" and "combined" patterns.
-->
<!--
<Valve className="org.apache.catalina.valves.FastCommonAccessLogValve"
directory="logs" prefix="localhost_access_log." suffix=".txt"
pattern="common" resolveHosts="false"/>
-->
<Context path="/tdm" docBase="tdm" debug="0" reloadable="true" />
</Host>
</Engine>
</Service>
</Server>
I have set the context path to /tdm in the server.xml file. Should this be placed in context.xml?
My first page in the project is called Homepage.html. To start my project I give http://localhost:5050/tdm/homepage.html
in a browser. Here I accept a username and password from the user and then do the validation in
a valid.jsp file, where I connect to the database and check and use jsp:forward to go to next pages
accordingly. However when I enter the username and password and click Go in the homepage, nothing is
displayed on the next page. The URL in the browser says valid.jsp but a blank screen appears.
WHY DOES IT HAPPEN SO? DOES IT MEAN THAT TOMCAT IS NOT RECOGNIZING JAVA IN MY SYSTEM OR IS IT A PROBLEM
WITH THE DATABASE CONNECTION OR SOMETHING ELSE? I FEEL THAT TOMCAT IS NOT EXECUTING JSP COMMANDS?
IS IT POSSIBLE?WHY WILL THIS HAPPEN?
I set the JAVA_HOME and CATALINA_HOME environment to the jdk and tomcat folders resp.
Is there any other thing that I need to set in classpath? Should I have my project as a
WAR file in the webapps of TOMCAT or just a folder i.e. directory structure will fine?I am using Tomcat 5.5 and Jdk 1.5.0_12 and Oracle 10g. I am using jdbc-odbc bridge connection
to connect to the database. I have placed my project folder called
tdm under the webapps folder in Tomcat. This 'tdm' folder consists of
a collection of html pages,jsp pages and images of my project. Also I created a
WEB-INF folderand in that I have lib folder which contains catalina-root.jar
, classes12.jar and nls_charset.jar files. And also in the WEB-INF folder I have the web.xml
file which looks like this
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
Copyright 2004 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<web-app>
<resource-ref>
<description>Oracle Datasource example</description>
<res-ref-name>jdbc/gdn</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</web-app>
My Server.xml file in Tomcat\conf folder is as follows
<!-- Example Server Configuration File -->
<!-- Note that component elements are nested corresponding to their
parent-child relationships with each other -->
<!-- A "Server" is a singleton element that represents the entire JVM,
which may contain one or more "Service" instances. The Server
listens for a shutdown command on the indicated port.
Note: A "Server" is not itself a "Container", so you may not
define subcomponents such as "Valves" or "Loggers" at this level.
-->
<Server port="8005" shutdown="SHUTDOWN">
<!-- Comment these entries out to disable JMX MBeans support used for the
administration web application -->
<Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
<!-- Global JNDI resources -->
<GlobalNamingResources>
<!-- Test entry for demonstration purposes -->
<Environment name="simpleValue" type="java.lang.Integer" value="30"/>
<!-- Editable user database that can also be used by
UserDatabaseRealm to authenticate users -->
<Resource name="UserDatabase" auth="Container"
type="org.apache.catalina.UserDatabase"
description="User database that can be updated and saved"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
pathname="conf/tomcat-users.xml" />
<Resource name="jdbc/gdn" auth="Container"
type="javax.sql.DataSource" driverClassName="sun.jdbc.odbc.JdbcOdbcDriver"
url="jdbc:odbc:gdn"
username="system" password="tiger" maxActive="20" maxIdle="10"
maxWait="-1"/>
</GlobalNamingResources>
<!-- A "Service" is a collection of one or more "Connectors" that share
a single "Container" (and therefore the web applications visible
within that Container). Normally, that Container is an "Engine",
but this is not required.
Note: A "Service" is not itself a "Container", so you may not
define subcomponents such as "Valves" or "Loggers" at this level.
-->
<!-- Define the Tomcat Stand-Alone Service -->
<Service name="Catalina">
<!-- A "Connector" represents an endpoint by which requests are received
and responses are returned. Each Connector passes requests on to the
associated "Container" (normally an Engine) for processing.
By default, a non-SSL HTTP/1.1 Connector is established on port 8080.
You can also enable an SSL HTTP/1.1 Connector on port 8443 by
following the instructions below and uncommenting the second Connector
entry. SSL support requires the following steps (see the SSL Config
HOWTO in the Tomcat 5 documentation bundle for more detailed
instructions):
* If your JDK version 1.3 or prior, download and install JSSE 1.0.2 or
later, and put the JAR files into "$JAVA_HOME/jre/lib/ext".
* Execute:
%JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA (Windows)
$JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA (Unix)
with a password value of "changeit" for both the certificate and
the keystore itself.
By default, DNS lookups are enabled when a web application calls
request.getRemoteHost(). This can have an adverse impact on
performance, so you can disable it by setting the
"enableLookups" attribute to "false". When DNS lookups are disabled,
request.getRemoteHost() will return the String version of the
IP address of the remote client.
-->
<!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
<Connector
port="5050" maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true" />
<!-- Note : To disable connection timeouts, set connectionTimeout value
to 0 -->
<!-- Note : To use gzip compression you could set the following properties :
compression="on"
compressionMinSize="2048"
noCompressionUserAgents="gozilla, traviata"
compressableMimeType="text/html,text/xml"
-->
<!-- Define a SSL HTTP/1.1 Connector on port 8443 -->
<!--
<Connector port="8443"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" disableUploadTimeout="true"
acceptCount="100" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS" />
-->
<!-- Define an AJP 1.3 Connector on port 8009 -->
<Connector port="8009"
enableLookups="false" redirectPort="8443" protocol="AJP/1.3" />
<!-- Define a Proxied HTTP/1.1 Connector on port 8082 -->
<!-- See proxy documentation for more information about using this. -->
<!--
<Connector port="8082"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" acceptCount="100" connectionTimeout="20000"
proxyPort="80" disableUploadTimeout="true" />
-->
<!-- An Engine represents the entry point (within Catalina) that processes
every request. The Engine implementation for Tomcat stand alone
analyzes the HTTP headers included with the request, and passes them
on to the appropriate Host (virtual host). -->
<!-- You should set jvmRoute to support load-balancing via AJP ie :
<Engine name="Standalone" defaultHost="localhost" jvmRoute="jvm1">
-->
<!-- Define the top level container in our container hierarchy -->
<Engine name="Catalina" defaultHost="localhost">
<!-- The request dumper valve dumps useful debugging information about
the request headers and cookies that were received, and the response
headers and cookies that were sent, for all requests received by
this instance of Tomcat. If you care only about requests to a
particular virtual host, or a particular application, nest this
element inside the corresponding <Host> or <Context> entry instead.
For a similar mechanism that is portable to all Servlet 2.4
containers, check out the "RequestDumperFilter" Filter in the
example application (the source for this filter may be found in
"$CATALINA_HOME/webapps/examples/WEB-INF/classes/filters").
Request dumping is disabled by default. Uncomment the following
element to enable it. -->
<!--
<Valve className="org.apache.catalina.valves.RequestDumperValve"/>
-->
<!-- Because this Realm is here, an instance will be shared globally -->
<!-- This Realm uses the UserDatabase configured in the global JNDI
resources under the key "UserDatabase". Any edits
that are performed against this UserDatabase are immediately
available for use by the Realm. -->
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
resourceName="UserDatabase"/>
<!-- Comment out the old realm but leave here for now in case we
need to go back quickly -->
<!--
<Realm className="org.apache.catalina.realm.MemoryRealm" />
-->
<!-- Replace the above Realm with one of the following to get a Realm
stored in a database and accessed via JDBC -->
<!--
<Realm className="org.apache.catalina.realm.JDBCRealm"
driverName="org.gjt.mm.mysql.Driver"
connectionURL="jdbc:mysql://localhost/authority"
connectionName="test" connectionPassword="test"
userTable="users" userNameCol="user_name" userCredCol="user_pass"
userRoleTable="user_roles" roleNameCol="role_name" />
-->
<!--
<Realm className="org.apache.catalina.realm.JDBCRealm"
driverName="oracle.jdbc.driver.OracleDriver"
connectionURL="jdbc:oracle:thin:@ntserver:1521:ORCL"
connectionName="scott" connectionPassword="tiger"
userTable="users" userNameCol="user_name" userCredCol="user_pass"
userRoleTable="user_roles" roleNameCol="role_name" />
-->
<!--
<Realm className="org.apache.catalina.realm.JDBCRealm"
driverName="sun.jdbc.odbc.JdbcOdbcDriver"
connectionURL="jdbc:odbc:CATALINA"
userTable="users" userNameCol="user_name" userCredCol="user_pass"
userRoleTable="user_roles" roleNameCol="role_name" />
-->
<!-- Define the default virtual host
Note: XML Schema validation will not work with Xerces 2.2.
-->
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<!-- Defines a cluster for this node,
By defining this element, means that every manager will be changed.
So when running a cluster, only make sure that you have webapps in there
that need to be clustered and remove the other ones.
A cluster has the following parameters:
className = the fully qualified name of the cluster class
name = a descriptive name for your cluster, can be anything
mcastAddr = the multicast address, has to be the same for all the nodes
mcastPort = the multicast port, has to be the same for all the nodes
mcastBindAddr = bind the multicast socket to a specific address
mcastTTL = the multicast TTL if you want to limit your broadcast
mcastSoTimeout = the multicast readtimeout
mcastFrequency = the number of milliseconds in between sending a "I'm alive" heartbeat
mcastDropTime = the number a milliseconds before a node is considered "dead" if no heartbeat is received
tcpThreadCount = the number of threads to handle incoming replication requests, optimal would be the same amount of threads as nodes
tcpListenAddress = the listen address (bind address) for TCP cluster request on this host,
in case of multiple ethernet cards.
auto means that address becomes
InetAddress.getLocalHost().getHostAddress()
tcpListenPort = the tcp listen port
tcpSelectorTimeout = the timeout (ms) for the Selector.select() method in case the OS
has a wakup bug in java.nio. Set to 0 for no timeout
printToScreen = true means that managers will also print to std.out
expireSessionsOnShutdown = true means that
useDirtyFlag = true means that we only replicate a session after setAttribute,removeAttribute has been called.
false means to replicate the session after each request.
false means that replication would work for the following piece of code: (only for SimpleTcpReplicationManager)
<%
HashMap map = (HashMap)session.getAttribute("map");
map.put("key","value");
%>
replicationMode = can be either 'pooled', 'synchronous' or 'asynchronous'.
* Pooled means that the replication happens using several sockets in a synchronous way. Ie, the data gets replicated, then the request return. This is the same as the 'synchronous' setting except it uses a pool of sockets, hence it is multithreaded. This is the fastest and safest configuration. To use this, also increase the nr of tcp threads that you have dealing with replication.
* Synchronous means that the thread that executes the request, is also the
thread the replicates the data to the other nodes, and will not return until all
nodes have received the information.
* Asynchronous means that there is a specific 'sender' thread for each cluster node,
so the request thread will queue the replication request into a "smart" queue,
and then return to the client.
The "smart" queue is a queue where when a session is added to the queue, and the same session
already exists in the queue from a previous request, that session will be replaced
in the queue instead of replicating two requests. This almost never happens, unless there is a
large network delay.
-->
<!--
When configuring for clustering, you also add in a valve to catch all the requests
coming in, at the end of the request, the session may or may not be replicated.
A session is replicated if and only if all the conditions are met:
1. useDirtyFlag is true or setAttribute or removeAttribute has been called AND
2. a session exists (has been created)
3. the request is not trapped by the "filter" attribute
The filter attribute is to filter out requests that could not modify the session,
hence we don't replicate the session after the end of this request.
The filter is negative, ie, anything you put in the filter, you mean to filter out,
ie, no replication will be done on requests that match one of the filters.
The filter attribute is delimited by ;, so you can't escape out ; even if you wanted to.
filter=".*\.gif;.*\.js;" means that we will not replicate the session after requests with the URI
ending with .gif and .js are intercepted.
The deployer element can be used to deploy apps cluster wide.
Currently the deployment only deploys/undeploys to working members in the cluster
so no WARs are copied upons startup of a broken node.
The deployer watches a directory (watchDir) for WAR files when watchEnabled="true"
When a new war file is added the war gets deployed to the local instance,
and then deployed to the other instances in the cluster.
When a war file is deleted from the watchDir the war is undeployed locally
and cluster wide
-->
<!--
<Cluster className="org.apache.catalina.cluster.tcp.SimpleTcpCluster"
managerClassName="org.apache.catalina.cluster.session.DeltaManager"
expireSessionsOnShutdown="false"
useDirtyFlag="true"
notifyListenersOnReplication="true">
<Membership
className="org.apache.catalina.cluster.mcast.McastService"
mcastAddr="228.0.0.4"
mcastPort="45564"
mcastFrequency="500"
mcastDropTime="3000"/>
<Receiver
className="org.apache.catalina.cluster.tcp.ReplicationListener"
tcpListenAddress="auto"
tcpListenPort="4001"
tcpSelectorTimeout="100"
tcpThreadCount="6"/>
<Sender
className="org.apache.catalina.cluster.tcp.ReplicationTransmitter"
replicationMode="pooled"
ackTimeout="15000"/>
<Valve className="org.apache.catalina.cluster.tcp.ReplicationValve"
filter=".*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt;"/>
<Deployer className="org.apache.catalina.cluster.deploy.FarmWarDeployer"
tempDir="/tmp/war-temp/"
deployDir="/tmp/war-deploy/"
watchDir="/tmp/war-listen/"
watchEnabled="false"/>
</Cluster>
-->
<!-- Normally, users must authenticate themselves to each web app
individually. Uncomment the following entry if you would like
a user to be authenticated the first time they encounter a
resource protected by a security constraint, and then have that
user identity maintained across all web applications contained
in this virtual host. -->
<!--
<Valve className="org.apache.catalina.authenticator.SingleSignOn" />
-->
<!-- Access log processes all requests for this virtual host. By
default, log files are created in the "logs" directory relative to
$CATALINA_HOME. If you wish, you can specify a different
directory with the "directory" attribute. Specify either a relative
(to $CATALINA_HOME) or absolute path to the desired directory.
-->
<!--
<Valve className="org.apache.catalina.valves.AccessLogValve"
directory="logs" prefix="localhost_access_log." suffix=".txt"
pattern="common" resolveHosts="false"/>
-->
<!-- Access log processes all requests for this virtual host. By
default, log files are created in the "logs" directory relative to
$CATALINA_HOME. If you wish, you can specify a different
directory with the "directory" attribute. Specify either a relative
(to $CATALINA_HOME) or absolute path to the desired directory.
This access log implementation is optimized for maximum performance,
but is hardcoded to support only the "common" and "combined" patterns.
-->
<!--
<Valve className="org.apache.catalina.valves.FastCommonAccessLogValve"
directory="logs" prefix="localhost_access_log." suffix=".txt"
pattern="common" resolveHosts="false"/>
-->
<Context path="/tdm" docBase="tdm" debug="0" reloadable="true" />
</Host>
</Engine>
</Service>
</Server>
I have set the context path to /tdm in the server.xml file. Should this be placed in context.xml?
My first page in the project is called Homepage.html. To start my project I give http://localhost:5050/tdm/homepage.html
in a browser. Here I accept a username and password from the user and then do the validation in
a valid.jsp file, where I connect to the database and check and use jsp:forward to go to next pages
accordingly. However when I enter the username and password and click Go in the homepage, nothing is
displayed on the next page. The URL in the browser says valid.jsp but a blank screen appears.
WHY DOES IT HAPPEN SO? DOES IT MEAN THAT TOMCAT IS NOT RECOGNIZING JAVA IN MY SYSTEM OR IS IT A PROBLEM
WITH THE DATABASE CONNECTION OR SOMETHING ELSE? I FEEL THAT TOMCAT IS NOT EXECUTING JSP COMMANDS?
IS IT POSSIBLE?WHY WILL THIS HAPPEN?
I set the JAVA_HOME and CATALINA_HOME environment to the jdk and tomcat folders resp.
Is there any other thing that I need to set in classpath? Should I have my project as a
WAR file in the webapps of TOMCAT or just a folder i.e. directory structure will fine? -
Return multiple values from a web method??
Hi,
I am wondering if it's possible for a web method to return multiple values to a client. I know each web method can return only one value of a given data type. I am looking for something like ref or out keyword in C#. If it's not available, is there any workaround? Thanks.
RegardsJava web service endpoints can return multiple values by using the javax.xml.rpc.holders classes. The following post might help:
http://forum.java.sun.com/thread.jspa?threadID=684916
If you'll be returning lots of values, it might be worth considering a document-style implementation rather than RPC-style.
Maybe you are looking for
-
i was trying to update my iphone and it downloaded the software but when it went to install it it turned off and wont turn back on and says i need to connect to itunes and ive tried but itunes doesnt recognize its there
-
Dear All, in t-code fs10n my g/l acc is not balance in STO (Inter plant with same company code) the balance is occure my procedure is PO-DELIVERY & PICKING-BILLING -WRT BILLING EXCISE INVOICE DOING MIGO Actually in billing cenvat suspense is debit &c
-
Created a standard Inquiry (IN) with price but the price not copied to quotation
I created a standard inquiry of type IN and entered price for my items in inquiry. Now, I am creating a quotation with reference to inquiry. On the quotation landing page, everything like material, quantity, sold-to, ship-to are copied but the price
-
Substitution rule for STO - changing business area.
Hello Experts, We are transferring stock from one plant to another plant. Each plant is business area. We are doing stock transfer at some profit element of Rs. 250. Transfer is done from Business Area D002 to Business Area D001. When we do outbound
-
I'm using Linux with Tomcat 4.0. I found that the counter of session has something wrong. The time counter is not reset when the user access the session. I try to use Tomcat 3.2.3 and my programs work fine. Is this the problem of Tomcat 4.0 ? anyone