Objects and XML-Transfer

Hello, I'm a newbie to web services and I'm also not very experienced in programming. After reading through a number of articles and following some tutorials I'm still not sure about data and object transfer with JAX-WS and the binding with JAXB
---> let's say I have a web service that calculates signal path loss of an access point in a room. So I could create a room class that consists of a list of walls, and an access point. The wall class has the 2dimensional coordinates for it's 2 ends and the access point class has only it's 2d coordinate.... and so on.
The client against this web service would have to create this room-object with the other objects it consists of and send it to the web service to calculate the signal map of the room.
My question is: What ways can I use to transfer such a data structure and what is the best practice?
1st way: I can create the room-object as a plain old java object and let JAX-WS do the marshalling to XML and the unmarshalling back to java object on the server side. (I tried this, it works quite easiely, but I doubt this is the right way, because client and server must be written in Java, and the client also need the Room-class in its library to compile....not really the goal of SOAP and WS's)
2nd way: I guess that I also can create an XML-document that represent this room as I descibed above and send it to the server to process. <<<--- how do I do that?, do you know any tutorials about this?
3rd way:? is there a better way to transfer such datastructures, with focus on language independency?
Thank you in advance!

VirtualG wrote:
2nd way: I guess that I also can create an XML-document that represent this room as I descibed above and send it to the server to process. <<<--- how do I do that?, do you know any tutorials about this?you have already done that, you just don't realize it because of all the work that java is doing. you created a webservice with jaxws. did you see the wsdl which was generated by the webservice? this is the language independent piece of the puzzle.
you in fact do not need the existing java classes in order to create a new java client. you could use the wsimport tool pointed at the wsdl from your service to generate the classes that you need to write a new java client. in this same fashion, a developer could use a similar tool written for another language (say .NET), to generate the necessary client side code to use your webservice.

Similar Messages

  • Serialising data objects using XML

    Does the support for XML in wl6.0 mean that java data objects can be serialized using xml entirely within weblogic (currently we use a 3rd party product, and are hoping to remove this if possible)?

    What about SOAP?
    Isn't that what SOAP does - marshals and unmarshals between objects and XML
    You can use SOAP from Java, or C++ or whatever.
    Contrary to a commonly held perception, SOAP doesn't require remote
    transmission of the serialized XML datastream.
    Where is the SOAP support for WLS6 ? I heard it was separately
    downloadable?
    "Alex Thomas" <[email protected]> wrote in message
    news:3a532681$[email protected]..
    >
    With some limitations, yes, if you are starting from a DTD - see the docsfor the WebLogic DTD2Parser tool which generates a high-speed custom parser
    for a given DTD.
    >
    This tool anticipates the JAXB standard (aka Data Binding, formerlyProject Adelard) - see http://java.sun.com/xml/ - which is due fairly
    shortly AFAIK.
    >
    If you were wanting to start with arbitrary Java classes and serializethem to XML you'd have to wait longer unfortunately, though there are some
    implementations around, e.g. http://www.wutka.com/jox.html. This would then
    correspond to marshalling if the objects were parameters to an RPC of some
    kind.
    >
    cheers
    (another) alex
    "alex" <[email protected]> wrote:
    What I should have said is: can wl6 automatically populate java objects
    from xml and vice versa? I believe this is called 'data marshalling and
    unmarshalling', but I cannot find references to this in the doco.
    >>
    >

  • How do I check if section and subdivision exist inside object's xml?

    My function is working but not as I expect it to. The problem is that when Section and Subvision are not found in the object aobjXmlGetStatuteRequestNode xml, I get an error NullReference Exception was unhandled by user code. Object reference not set
    to an instance of an object. 
    For that reason, because the two elements are optional, I would like to check if they exist before adding their value into the xml inside the object objXmlRequestMessageDoc.
    The if statement I used in my function did not work. When it found Section element, it did not check for Subdivision. 
    How do I check for both and add them if they exist. If they do not exist, I do not need to do anything and should not throw an error since they are optional.
     Object aobjXmlGetStatuteRequestNode has this xml
    <ns:GetStatutesRequest xmlns:ns="http://www.courts.state.mn.us/StatuteService/1.0">
    <ns:Statute>
    <ns:Chapter>169</ns:Chapter>
    <!--Optional:-->
    <ns:Section>191</ns:Section>
    <!--Optional:-->
    <ns:Subdivision>a</ns:Subdivision>
    </ns:Statute>
    The following output in the objXmlRequestMessageDoc object is correct but this does not work when Section and or Subdivision are not found in the object aobjXmlGetStatuteRequestNode.
    <ns:BasicSearchQueryRequest xmlns:ns="http://crimnet.state.mn.us/mnjustice/statute/service/4.0">
    <ns1:BasicSearchCriteria xmlns:ns1="http://crimnet.state.mn.us/mnjustice/statute/messages/4.0">
    <ns2:Chapter xmlns:ns2="http://crimnet.state.mn.us/mnjustice/statute/4.0"/169</ns2:Chapter>>
    <ns2:Section xmlns:ns2="http://crimnet.state.mn.us/mnjustice/statute/4.0"/>191</ns2:Chapter>
    <ns2:Subdivision xmlns:ns2="http://crimnet.state.mn.us/mnjustice/statute/4.0"/>a</ns2:Chapter>
    </ns1:BasicSearchCriteria>
    </ns:BasicSearchQueryRequest>
    My Function
    Function GetStatutesByChapter(ByVal aobjXmlGetStatuteRequestNode As XmlNode, ByVal aobjXMLNameSpaceManager As XmlNamespaceManager, ByVal aobjBroker As ServiceCatalog.Library.v4.Broker) As XmlDocument
    Dim objXmlRequestMessageDoc As XmlDocument
    Dim objXmlResponseMessageDoc As XmlDocument
    Dim intCount As Integer
    aobjBroker.PostMessageWarehouseInformationalMessage("Chapter found.", 1)
    objXmlResponseMessageDoc = New XmlDocument
    'Add the first element into the document GetStatuteByChapter with its namespace
    objXmlResponseMessageDoc.AppendChild(objXmlResponseMessageDoc.CreateElement("BasicSearchQueryResponse", "http://crimnet.state.mn.us/mnjustice/statute/service/4.0"))
    'Create the BCA request message
    objXmlRequestMessageDoc = New XmlDocument
    objXmlRequestMessageDoc.AppendChild(objXmlRequestMessageDoc.CreateElement("ns:BasicSearchQueryRequest", aobjXMLNameSpaceManager.LookupNamespace("ns")))
    objXmlRequestMessageDoc.SelectSingleNode("ns:BasicSearchQueryRequest", aobjXMLNameSpaceManager).AppendChild(objXmlRequestMessageDoc.CreateElement("ns1:BasicSearchCriteria", aobjXMLNameSpaceManager.LookupNamespace("ns1")))
    objXmlRequestMessageDoc.SelectSingleNode("ns:BasicSearchQueryRequest/ns1:BasicSearchCriteria", aobjXMLNameSpaceManager).AppendChild(objXmlRequestMessageDoc.CreateElement("ns2:Chapter", aobjXMLNameSpaceManager.LookupNamespace("st")))
    objXmlRequestMessageDoc.SelectSingleNode("ns:BasicSearchQueryRequest/ns1:BasicSearchCriteria", aobjXMLNameSpaceManager).AppendChild(objXmlRequestMessageDoc.CreateElement("ns2:Section", aobjXMLNameSpaceManager.LookupNamespace("st")))
    objXmlRequestMessageDoc.SelectSingleNode("ns:BasicSearchQueryRequest/ns1:BasicSearchCriteria", aobjXMLNameSpaceManager).AppendChild(objXmlRequestMessageDoc.CreateElement("ns2:Subdivision", aobjXMLNameSpaceManager.LookupNamespace("st")))
    objXmlRequestMessageDoc.DocumentElement.SelectSingleNode("ns1:BasicSearchCriteria/st:Chapter", aobjXMLNameSpaceManager).InnerText = aobjXmlGetStatuteRequestNode.SelectSingleNode("ss:Statute/ss:Chapter", aobjXMLNameSpaceManager).InnerText
    objXmlRequestMessageDoc.DocumentElement.SelectSingleNode("ns1:BasicSearchCriteria/st:Section", aobjXMLNameSpaceManager).InnerText = aobjXmlGetStatuteRequestNode.SelectSingleNode("ss:Statute/ss:Section", aobjXMLNameSpaceManager).InnerText
    objXmlRequestMessageDoc.DocumentElement.SelectSingleNode("ns1:BasicSearchCriteria/st:Subdivision", aobjXMLNameSpaceManager).InnerText = aobjXmlGetStatuteRequestNode.SelectSingleNode("ss:Statute/ss:Subdivision", aobjXMLNameSpaceManager).InnerText
    'check if there is a section and or subdivision if it is there then set the value
    'If Not (aobjXmlGetStatuteRequestNode.SelectSingleNode("ss:Statute/ss:Section", aobjXMLNameSpaceManager).InnerText) Is Nothing Then
    ' objXmlRequestMessageDoc.DocumentElement.SelectSingleNode("ns1:BasicSearchCriteria/st:Section", aobjXMLNameSpaceManager).InnerText = aobjXmlGetStatuteRequestNode.SelectSingleNode("ss:Statute/ss:Section", aobjXMLNameSpaceManager).InnerText
    'End If
    'check if there is a section and or subdivision if it is there then set the value
    aobjBroker.PostMessageWarehouseSnapshot(objXmlRequestMessageDoc.OuterXml, "Request Message", 1)
    'Call the BCA service
    intCount = 0
    'Count how many Statute node found
    CType(objXmlResponseMessageDoc.SelectSingleNode("ss:GetStatutesResponse/ss:StatutesXml/ss:Statutes", aobjXMLNameSpaceManager), System.Xml.XmlElement).SetAttribute("totalCount", CStr(intCount))
    Return objXmlResponseMessageDoc
    End Function

    I have resolved this issue by using two if statements as follows
    'check if there is a section and or subdivision if it is there then set the value
    If Not (aobjXmlGetStatuteRequestNode.SelectSingleNode("ss:Statute/ss:Section", aobjXMLNameSpaceManager) Is Nothing) Then
    objXmlRequestMessageDoc.DocumentElement.SelectSingleNode("ns1:BasicSearchCriteria/st:Section", aobjXMLNameSpaceManager).InnerText = aobjXmlGetStatuteRequestNode.SelectSingleNode("ss:Statute/ss:Section", aobjXMLNameSpaceManager).InnerText
    End If
    If Not (aobjXmlGetStatuteRequestNode.SelectSingleNode("ss:Statute/ss:Subdivision", aobjXMLNameSpaceManager) Is Nothing) Then
    objXmlRequestMessageDoc.DocumentElement.SelectSingleNode("ns1:BasicSearchCriteria/st:Subdivision", aobjXMLNameSpaceManager).InnerText = aobjXmlGetStatuteRequestNode.SelectSingleNode("ss:Statute/ss:Subdivision", aobjXMLNameSpaceManager).InnerText
    End If

  • Is it mandatory to use Business object for data transfer and work flow?

    <font size="3">
    <pre>
    In our enterprise projects we deal with some screens where we add or update some data and again
    we retrieve that data and display to user in various ways like displaying on screen as
    a report or viewing in excel etc.. Most of the times, though we identify the business objects
    based on the nouns in requirements document, really while implementing there will not be any
    business logic in the objects. Almost all the objects which we identfy as business objects
    may have methods like add, delete, update and retrieve methods. Still in these cases, is it required to
    have business objects or can we use transfer object to send the data for saving and retriving or any other
    pattern/guideline is there for dealing such cases?
    I really appreciate your comments on this topic.
    Also I apologize ahead of time if my explanation is not clear to you.
    </pre>
    </font>
    <p>
    Thanks in advance.
    <p>
    Regards,
    <p>
    Rizwan.

    In my opinion, DAO pattern would be suitable for you. Generally the DAO (Data Access Object) will have the CRUD (create, read, update, delete) methods to retrieve data from data-source (e.g. database). Based on the data it will create the DTOs (Data Transfer Objects) and pass them to the caller. It will also receive the DTOs from the caller and save it the data-source. Thus in your case you can
    - remove the CRUD methods from the Business Objects (BO) and make them pure DTOs and use them with DAOs (If you are using JDBC codes inside your application and you don't have much of validation or processing logic in your BOs).
    http://www.corej2eepatterns.com/Patterns2ndEd/DataAccessObject.htm
    OR
    - use BOs in combination in DAOs (if using the database connection from a pool and BOs are having complicated processing logic).
    http://www.corej2eepatterns.com/Patterns2ndEd/BusinessObject.htm

  • How to combine "Object-to-XML (OXM)" and "Direct to XML Type" mapping?

    hi
    If I have an XMLType column in my table (wich I can map using TopLink) and I have defined the structure of the contents of this XMLType column using XML Schema (wich I can map using Toplink), how can I combine both types of TopLink mappings "as transparently as possible"?
    for "Object-to-XML (OXM)" mapping
    see http://www.oracle.com/technology/products/ias/toplink/technical/tips/ox/index.htm
    for "Direct to XML Type" mapping
    see http://www.oracle.com/technology/products/ias/toplink/doc/1013/main/_html/relmapun004.htm#CHDFIFEF
    thanks
    Jan Vervecken

    Thanks for your reply James Sutherland.
    Although I haven't used a "TopLink Converter" before, this seems like a good idea.
    The thing is that the "TopLink Workbench Editor" for my "Direct to XML Type" mapping doesn't have a "Converter" tab, some other mapping type editors do have such a "Converter" tab.
    I'm not sure if I completely understand how such a "TopLink Converter" is supposed to work. How many attributes do I need in the "XMLRow" Java object for the "MY_XML" column in the "XML_TABLE" table I try to map to?
    I suppose I should try to get a situation where the "XMLRow" Java object has an "myXML" attribute of Java class type "MyXML" (where "MyXML" has been mapped to an XML Schema), not?
    So do I also still need an attribute "myXMLDocument" of type org.w3c.dom.Document as I do now for the "Direct to XML Type" mapping?
    Oh, by the way ... for anyone who hits this forum thread looking for the reason why the TopLink Workbench reports the problem "Attribute must be assignable to java.lang.String, org.w3c.dom.Document, or org.w3c.Node" while your attribute is of such a type, read this forum post
    Re: Toplink WB 10.1.3 - Aggregate field mapping bug and XMLType question
    For me the "Direct to XML Type" mapping works fine, just ignoring the waring. This is supposed to be bug number 5071250.
    thanks
    Jan Vervecken

  • How To Generate Objects From XML and DTD?

    Are there tools to generate objects from dtd's and xml files?
    If this is not possible for some reason: is there a tool to generate classes from a dtd?
    I can not find the "XML Java Class Generator" (from oracle) anymore.

    XMLBeans
    There are other solutions, but I know this one is pretty good.

  • New PC-do I need to transfer Itunes library files (itl and xml files?)

    Hi gang,
    I followed the Itunes tutorial for Windows and moved my Itunes music library to a EHD as it was filling up my laptop. I left the itl and xml library files on the laptop hard drive as instructed.
    However, this laptop is a work PC and if I change jobs I will need to download a new version of Itunes to the new PC. I know how to import the files from the EHD but my question is the following:
    1. Do I need to back up the itl and xml library files to the EHD before I give back the work PC? It seems likely since they contain info about the playlists.
    2. Once I download Itunes on the new PC would I just copy the library files onto the hard drive or can they remain on the EHD?
    It sounds like (from reading some info from Chris CA) that I need to make a copy of the Itunes folder (which includes the itl and xml files) from the laptop hard drive and put it on the EHD inside the EHD Itunes folder. Then with the new PC load a new version of Itunes and hold the shift key when launching. Then I would select the library from the EHD.
    Is that correct?
    Thanks!
    Any help would be appreciated as I cannot find anything on this in Itunes help or the forum.

    Assuming you start with a standard configuration which is:
    The iTunes folder in My music on your c: drive and all your music in the iTunes Music folder in the iTunes folder on the c: drive.
    Starting from there, with iTunes closed, you copy the iTunes folder to an external drive, this also copies the music in the iTunes Muisc folder.
    To move to a new PC, you install iTunes, then you drag your new iTunes folder to the desktop, then you replace it by copying the iTunes folder from the external drive.
    With this set up you can also run entirely on the EHD if you want to. Just start iTunes with the shift key held down, navigate to the iTunes folder on the external drive an choose iTunes Library.itl. This could be useful if you want to dake the EHD to work.
    If you are not starting from the default position I described, some adjustments would have to be made, but it would need an exact descripition of how your folders are set up at the moment.

  • How do I add a variable into an object as xml

    I have a xml document with 2 protection order numbers. I want to get the information for one of them which is **protectionOrderNumber="1400042"**. I would like to add strPoNumber variable to the object objXmlCaseDoc. Inside this object is the xml
    that was read and put inside the object. I want at the beginning of the xml code inside the objXmlCaseDoc to add the protectionOrderNumber at the end of the first line. This should be added at the beginning of the xml document. In my object (objXmlCaseDoc)
    there is no variable strPoNumber. This is why I want to add it at the top. The object has xml document in it. 
    It should look like this:
    <Integration xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:tsg="http://tsgweb.com" xmlns:IXML="http://tsgweb.com" xmlns:CMCodeQueryHelper="urn:CMCodeQueryHelper" protectionOrderNumber="1400042">
    My vb code: I have the variable strPoNumber and the object where the xml document is. Object name is objXmlCaseDoc
    I want to add the line of code where I have comment Tranform case information into the output format near the bottom of the code.
    Option Strict On
    Option Explicit On
    Imports System.Xml
    Public Class BcaPoRequests
    Shared Sub Main()
    Dim objMessageProcessor As New MessageProcessor
    Dim objSchemasCollection As New Msc.Integration.MessageBroker.Library.v4.SchemasCollection
    Dim objTransformsCollection As New Msc.Integration.MessageBroker.Library.v4.TransformsCollection
    objMessageProcessor.ProcessInputQueue(False, False, objSchemasCollection, objTransformsCollection)
    End Sub
    Private Class MessageProcessor
    Inherits Msc.Integration.ServiceCatalog.Library.v4.SoapMessageProcessor
    Protected Overrides Sub ProcessMessage(ByRef aobjBroker As ServiceCatalog.Library.v4.Broker, ByRef aobjXMLInputSoapEnvelopeDoc As System.Xml.XmlDocument, ByRef aobjInstantiatedObjectsCstrollection As Microsoft.VisualBasic.Collection, ByRef aobjConsumer As ServiceCatalog.Library.v4.Consumer)
    MyBase.ProcessMessage(aobjBroker, aobjXMLInputSoapEnvelopeDoc, aobjInstantiatedObjectsCollection, aobjConsumer)
    Dim objXmlMessageDoc As XmlDocument
    Dim objXmlMessageNode As XmlNode
    Dim objNameTable As NameTable
    Dim objXMLNameSpaceManager As XmlNamespaceManager
    Dim objXMLSchemaException As Xml.Schema.XmlSchemaException
    Dim strCaseNumber As String
    Dim strPoNumber As String
    Dim objXmlCaseDoc As XmlDocument
    'create a namespace manager used for queries into inputmessage (because of namespace)
    objNameTable = New NameTable
    objXMLNameSpaceManager = New XmlNamespaceManager(objNameTable)
    objXMLNameSpaceManager.AddNamespace("ext", "http://www.courts.state.mn.us/ProtectionOrderExtension/1.0")
    objXMLNameSpaceManager.AddNamespace("exc", "http://www.courts.state.mn.us/ProtectionOrderQuery/1.0")
    objXMLNameSpaceManager.AddNamespace("soap", "http://www.w3.org/2003/05/soap-envelope")
    objXMLNameSpaceManager.AddNamespace("wsa", "http://schemas.xmlsoap.org/ws/2004/08/addressing")
    objXmlMessageNode = aobjXMLInputSoapEnvelopeDoc.DocumentElement.SelectSingleNode("soap:Body/exc:ProtectionOrderQueryRequest", objXMLNameSpaceManager)
    objXmlMessageDoc = New XmlDocument
    objXmlMessageDoc.LoadXml(objXmlMessageNode.OuterXml)
    'Check authorization
    'Validate the input message
    objXMLSchemaException = aobjBroker.ValidateXmlDocument(objXmlMessageDoc, "ProtectionOrderQuery_1_0.xsd", "NiemExchanges\ProtectionOrders\Exchange", , False)
    If Not objXMLSchemaException Is Nothing Then
    'return fault if invalid
    aobjBroker.Reply(aobjBroker.CreateSoapFault(Msc.Integration.Utility.Library.v4.Soap.udtSoapCodes.Sender, Msc.Integration.Utility.Library.v4.Xml.FormatXmlSchemaValidationErrorText(objXMLSchemaException), Msc.Integration.Utility.Library.v4.Soap.udtSoapRoles.RoleUltimateReceiver, aobjXMLInputSoapEnvelopeDoc, "soap:InvalidMessage", "soap:Body", Msc.Integration.Utility.Library.v4.Soap.GetReplyEndpointReference(aobjXMLInputSoapEnvelopeDoc), aobjXMLInputSoapEnvelopeDoc.DocumentElement.SelectSingleNode("soap:Header/wsa:MessageID", objXMLNameSpaceManager).InnerText, aobjConsumer))
    Exit Sub
    End If
    'Get the case number and the PO number from the input message
    strCaseNumber = objXmlMessageDoc.DocumentElement.SelectSingleNode("ext:CourtFileNumber", objXMLNameSpaceManager).InnerText
    strPoNumber = objXmlMessageDoc.DocumentElement.SelectSingleNode("ext:ProtectionOrderID", objXMLNameSpaceManager).InnerText
    'Get the case information from Mncis
    'Code for calling the case
    objXmlCaseDoc = Msc.Integration.Mncis.Library.v4.Case.GetIxmlForCaseNumber(strCaseNumber, "CourtCaseHeader,ProtectionOrder,SubjectParties,HearingTrialSetting", False)
    'Tranform case information into the output format
    End Sub
    End Class
    End Class
    xslt code
    <?xml version="1.0" encoding="UTF-8"?>
    <?altova_samplexml file:///Z:/Training%20with%20Tim%20XML%20code%20various/BcaRequestIxml.xml?>
    <xsl:stylesheet version="3.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:poq="http://www.courts.state.mn.us/ProtectionOrderQuery/1.0" xmlns:ext="http://www.courts.state.mn.us/ProtectionOrderExtension/1.0" xmlns:nc="http://niem.gov/niem/niem-core/2.0" xmlns:j="http://niem.gov/niem/domains/jxdm/4.1" xmlns:mscef="courts.state.mn.us/extfun" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:exsl="urn:schemas-microsoft-com:xslt" extension-element-prefixes="exsl" exclude-result-prefixes="mscef msxsl exsl">
    <xsl:import href="../General/ExtensionFunctions.xsl"/>
    <xsl:import href="MNCIS_PO_BCA_ProtectionOrder_1_0.xsl"/>
    <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
    <!-- Path to environment folder used by document function. Relative to location of stylesheet. -->
    <xsl:param name="gEnvPath">../..</xsl:param>
    <xsl:template match="/">
    <xsl:variable name="vPoNumber">
    <xsl:value-of select="Integration/@protectionOrderNumber"/>
    </xsl:variable>
    <poq:ProtectionOrderQueryResponse>
    <xsl:for-each select="//Integration/ProtectionOrder[ProtectionOrderNumber=$vPoNumber]">
    <xsl:call-template name="ProtectionOrder"/>
    </xsl:for-each>
    </poq:ProtectionOrderQueryResponse>
    </xsl:template>
    </xsl:stylesheet>
    XML document output  from my xslt code
    <?xml version="1.0" encoding="UTF-8"?>
    <poq:ProtectionOrderQueryResponse xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:poq="http://www.courts.state.mn.us/ProtectionOrderQuery/1.0" xmlns:ext="http://www.courts.state.mn.us/ProtectionOrderExtension/1.0" xmlns:nc="http://niem.gov/niem/niem-core/2.0" xmlns:j="http://niem.gov/niem/domains/jxdm/4.1">
    <ext:ProtectionOrder xmlns:exc="http://www.courts.state.mn.us/ProtectionOrderServiceExchange/1.0" xmlns:s="http://niem.gov/niem/structures/2.0" xmlns:usps="http://niem.gov/niem/usps_states/2.0">
    <j:CourtOrderEnforcementAgency>
    <nc:OrganizationIdentification>
    <nc:IdentificationID>MN0700000</nc:IdentificationID>
    </nc:OrganizationIdentification>
    </j:CourtOrderEnforcementAgency>
    <ext:ForeignOrderIdentification>
    <nc:IdentificationID/>
    <ext:ForeignOrderIdentificationTypeCode/>
    </ext:ForeignOrderIdentification>
    <ext:HearingHeldIndicator>false</ext:HearingHeldIndicator>
    <nc:Location s:id="DB1618611387">
    <nc:LocationAddress>
    <nc:StructuredAddress>
    <nc:LocationStreet>
    <nc:StreetFullText>3434 Bohnsack Way</nc:StreetFullText>
    <nc:StreetFullText>Unit 75 B</nc:StreetFullText>
    <nc:StreetFullText/>
    </nc:LocationStreet>
    <nc:LocationCityName>New Prague</nc:LocationCityName>
    <nc:LocationStateUSPostalServiceCode>MN</nc:LocationStateUSPostalServiceCode>
    <nc:LocationPostalCode>56071</nc:LocationPostalCode>
    </nc:StructuredAddress>
    </nc:LocationAddress>
    </nc:Location>
    <ext:ProtectedParty>
    <ext:PersonBirthDate ext:approximateDateIndicator="false" ext:currentIndicator="true">1987-11-21</ext:PersonBirthDate>
    <nc:PersonName>
    <nc:PersonGivenName>Jennifer</nc:PersonGivenName>
    <nc:PersonMiddleName>Marie</nc:PersonMiddleName>
    <nc:PersonSurName>O'Brien</nc:PersonSurName>
    <nc:PersonNameSuffixText/>
    <nc:PersonFullName>O'Brien, Jennifer Marie</nc:PersonFullName>
    </nc:PersonName>
    <ext:PersonRaceCode/>
    <nc:PersonSexCode>F</nc:PersonSexCode>
    <ext:PetitionerIndicator>true</ext:PetitionerIndicator>
    </ext:ProtectedParty>
    <ext:ProtectedParty>
    <ext:PersonBirthDate ext:approximateDateIndicator="false" ext:currentIndicator="true">2008-03-24</ext:PersonBirthDate>
    <nc:PersonName>
    <nc:PersonGivenName>Eli</nc:PersonGivenName>
    <nc:PersonMiddleName>Rose</nc:PersonMiddleName>
    <nc:PersonSurName>Noir</nc:PersonSurName>
    <nc:PersonNameSuffixText/>
    <nc:PersonFullName>Noir, Eli Rose</nc:PersonFullName>
    </nc:PersonName>
    <ext:PersonRaceCode/>
    <nc:PersonSexCode>F</nc:PersonSexCode>
    <ext:PetitionerIndicator>false</ext:PetitionerIndicator>
    </ext:ProtectedParty>
    <ext:ProtectionOrderBradyIndicator>N</ext:ProtectionOrderBradyIndicator>
    <ext:ProtectionOrderCondition>
    <ext:ConditionText>Respondent must not have any contact with the Protected Person(s) whether in person, with or through other persons, by telephone, mail, e-mail, through electronic devices, social media, or by any other means except as follows: [] </ext:ConditionText>
    <ext:ConditionCode>08</ext:ConditionCode>
    </ext:ProtectionOrderCondition>
    <ext:ProtectionOrderCondition>
    <ext:ConditionText>Respondent must stay a reasonable distance away from the residence(s) of the Protected Person(s), specifically as follows: [distance]; and Respondent must stay a reasonable distance away from ANY FUTURE RESIDENCES of the Protected Person(s). </ext:ConditionText>
    <ext:ConditionCode>04</ext:ConditionCode>
    </ext:ProtectionOrderCondition>
    <ext:ProtectionOrderCondition>
    <ext:ConditionText>Respondent shall not call or enter Petitioner's place of employment which includes all land, parking lots, and buildings at: </ext:ConditionText>
    <ext:ConditionCode>04</ext:ConditionCode>
    </ext:ProtectionOrderCondition>
    <ext:ProtectionOrderExpirationDate>2015-12-22</ext:ProtectionOrderExpirationDate>
    <ext:ProtectionOrderFinding>
    <ext:FindingText>Respondent personally appeared or had reasonable notice and opportunity to be heard. The procedures for service upon Respondent set forth in the Minnesota Domestic Abuse Act (Minn.Stat. 518B.01) were followed, and the court has jurisdiction over the parties and subject matter. </ext:FindingText>
    <ext:FindingCode>OAH1</ext:FindingCode>
    </ext:ProtectionOrderFinding>
    <ext:ProtectionOrderFinding>
    <ext:FindingText>Acts of domestic abuse have occurred, including the following: [] </ext:FindingText>
    <ext:FindingCode>OAH4A</ext:FindingCode>
    </ext:ProtectionOrderFinding>
    <ext:ProtectionOrderID>1400042</ext:ProtectionOrderID>
    <ext:ProtectionOrderIssuingCourt>
    <nc:OrganizationIdentification>
    <nc:IdentificationID>MN070015J</nc:IdentificationID>
    </nc:OrganizationIdentification>
    <ext:CourtFaxNumber>
    <nc:TelephoneNumberFullID>952-496-8211</nc:TelephoneNumberFullID>
    </ext:CourtFaxNumber>
    <ext:CourtTelephoneNumber>
    <nc:TelephoneNumberFullID>952-496-8200</nc:TelephoneNumberFullID>
    <nc:TelephoneSuffixID/>
    </ext:CourtTelephoneNumber>
    </ext:ProtectionOrderIssuingCourt>
    <ext:ProtectionOrderIssuingDate>2014-12-22</ext:ProtectionOrderIssuingDate>
    <ext:ProtectionOrderIssuingJudicialOfficial>
    <nc:PersonName>
    <nc:PersonGivenName>Do</nc:PersonGivenName>
    <nc:PersonMiddleName>P.</nc:PersonMiddleName>
    <nc:PersonSurName>Ande</nc:PersonSurName>
    <nc:PersonNameSuffixText/>
    <nc:PersonFullName>Ande, Do P.</nc:PersonFullName>
    </nc:PersonName>
    </ext:ProtectionOrderIssuingJudicialOfficial>
    <ext:ProtectionOrderOtherIdentification>
    <nc:IdentificationID>12345</nc:IdentificationID>
    <ext:ProtectionOrderOtherIdentificationTypeCode>NCICNUM</ext:ProtectionOrderOtherIdentificationTypeCode>
    </ext:ProtectionOrderOtherIdentification>
    <ext:ProtectionOrderService>
    <ext:ProtectionOrderServiceAgency>
    <nc:OrganizationIdentification>
    <nc:IdentificationID>MN0191000</nc:IdentificationID>
    </nc:OrganizationIdentification>
    </ext:ProtectionOrderServiceAgency>
    <ext:ProtectionOrderServiceDate>2015-01-10</ext:ProtectionOrderServiceDate>
    <ext:ProtectionOrderServiceTime>16:25:00-06:00</ext:ProtectionOrderServiceTime>
    <ext:ProtectionOrderServiceToCode>Respondent</ext:ProtectionOrderServiceToCode>
    <ext:ProtectionOrderServiceTypeCode>BYPUB</ext:ProtectionOrderServiceTypeCode>
    </ext:ProtectionOrderService>
    <ext:ProtectionOrderService>
    <ext:ProtectionOrderServiceAgency>
    <nc:OrganizationIdentification>
    <nc:IdentificationID>MN0191000</nc:IdentificationID>
    </nc:OrganizationIdentification>
    </ext:ProtectionOrderServiceAgency>
    <ext:ProtectionOrderServiceDate>2015-01-10</ext:ProtectionOrderServiceDate>
    <ext:ProtectionOrderServiceTime>16:25:00-06:00</ext:ProtectionOrderServiceTime>
    <ext:ProtectionOrderServiceToCode>Respondent</ext:ProtectionOrderServiceToCode>
    <ext:ProtectionOrderServiceTypeCode>BYPUB</ext:ProtectionOrderServiceTypeCode>
    </ext:ProtectionOrderService>
    <ext:ProtectionOrderService>
    <ext:ProtectionOrderServiceAgency>
    <nc:OrganizationIdentification>
    <nc:IdentificationID>MN0191000</nc:IdentificationID>
    </nc:OrganizationIdentification>
    </ext:ProtectionOrderServiceAgency>
    <ext:ProtectionOrderServiceDate>2015-01-10</ext:ProtectionOrderServiceDate>
    <ext:ProtectionOrderServiceToCode>Respondent</ext:ProtectionOrderServiceToCode>
    <ext:ProtectionOrderServiceTypeCode>BYPUB</ext:ProtectionOrderServiceTypeCode>
    </ext:ProtectionOrderService>
    <ext:ProtectionOrderService>
    <ext:ProtectionOrderServiceAgency>
    <nc:OrganizationIdentification>
    <nc:IdentificationID>MN0250800</nc:IdentificationID>
    </nc:OrganizationIdentification>
    </ext:ProtectionOrderServiceAgency>
    <ext:ProtectionOrderServiceDate>2015-01-09</ext:ProtectionOrderServiceDate>
    <ext:ProtectionOrderServiceToCode>Respondent</ext:ProtectionOrderServiceToCode>
    <ext:ProtectionOrderServiceTypeCode>BYMAIL</ext:ProtectionOrderServiceTypeCode>
    </ext:ProtectionOrderService>
    <ext:ProtectionOrderService>
    <ext:ProtectionOrderServiceAgency>
    <nc:OrganizationIdentification>
    <nc:IdentificationID>MN0720100</nc:IdentificationID>
    </nc:OrganizationIdentification>
    </ext:ProtectionOrderServiceAgency>
    <ext:ProtectionOrderServiceDate>2014-12-22</ext:ProtectionOrderServiceDate>
    <ext:ProtectionOrderServiceToCode>Respondent</ext:ProtectionOrderServiceToCode>
    <ext:ProtectionOrderServiceTypeCode>BYPUB</ext:ProtectionOrderServiceTypeCode>
    </ext:ProtectionOrderService>
    <ext:ProtectionOrderStatus>
    <ext:ProtectionOrderStatusCode>SBJO</ext:ProtectionOrderStatusCode>
    <ext:ProtectionOrderStatusDate>2014-12-22</ext:ProtectionOrderStatusDate>
    </ext:ProtectionOrderStatus>
    <ext:ProtectionOrderTypeCode>OFP</ext:ProtectionOrderTypeCode>
    <ext:QualifyingRelationship>
    <ext:QualifyingRelationshipCode>LIVTOGTHR</ext:QualifyingRelationshipCode>
    <ext:QualifyingRelationshipText>Lived Together</ext:QualifyingRelationshipText>
    </ext:QualifyingRelationship>
    <ext:Respondent>
    <nc:PersonEthnicityCode/>
    <nc:PersonEyeColorCode/>
    <nc:PersonHairColorCode>XXX</nc:PersonHairColorCode>
    <nc:PersonHeightMeasure>
    <nc:MeasureText>71</nc:MeasureText>
    <nc:MeasureUnitText>inches</nc:MeasureUnitText>
    <nc:LengthUnitCode>INH</nc:LengthUnitCode>
    </nc:PersonHeightMeasure>
    <ext:PersonRaceCode>W</ext:PersonRaceCode>
    <nc:PersonSexCode>M</nc:PersonSexCode>
    <nc:PersonWeightMeasure>
    <nc:MeasureText>210</nc:MeasureText>
    <nc:MeasureUnitText>pounds</nc:MeasureUnitText>
    <nc:WeightUnitCode>LBR</nc:WeightUnitCode>
    </nc:PersonWeightMeasure>
    <ext:AddressReference ext:currentIndicator="true">
    <nc:LocationReference s:ref="DB1618611387"/>
    </ext:AddressReference>
    <ext:PersonBirthDate ext:approximateDateIndicator="true" ext:currentIndicator="false">1990-12-23</ext:PersonBirthDate>
    <ext:PersonBirthDate ext:approximateDateIndicator="false" ext:currentIndicator="false">1989-12-23</ext:PersonBirthDate>
    <ext:PersonBirthDate ext:approximateDateIndicator="false" ext:currentIndicator="true">1991-12-23</ext:PersonBirthDate>
    <ext:PersonName ext:currentIndicator="true">
    <nc:PersonGivenName>Guy</nc:PersonGivenName>
    <nc:PersonMiddleName>Andr</nc:PersonMiddleName>
    <nc:PersonSurName>Noir</nc:PersonSurName>
    <nc:PersonNameSuffixText>Jr.</nc:PersonNameSuffixText>
    <nc:PersonFullName>Noir Jr , Guy Andr</nc:PersonFullName>
    </ext:PersonName>
    </ext:Respondent>
    <ext:RespondentPresentAtHearingIndicator>false</ext:RespondentPresentAtHearingIndicator>
    </ext:ProtectionOrder>
    <ext:SupersededProtectionOrderID xmlns:exc="http://www.courts.state.mn.us/ProtectionOrderServiceExchange/1.0" xmlns:s="http://niem.gov/niem/structures/2.0" xmlns:usps="http://niem.gov/niem/usps_states/2.0"/>
    <ext:Hearing xmlns:exc="http://www.courts.state.mn.us/ProtectionOrderServiceExchange/1.0" xmlns:s="http://niem.gov/niem/structures/2.0" xmlns:usps="http://niem.gov/niem/usps_states/2.0">
    <ext:HearingDateTime>2015-01-20T09:00:00-06:00</ext:HearingDateTime>
    <ext:HearingLocationText>Scott County</ext:HearingLocationText>
    </ext:Hearing>
    </poq:ProtectionOrderQueryResponse>

    Inert to root as first nood.
    http://msdn.microsoft.com/en-us/library/system.xml.xmlnode.insertbefore(v=vs.110).aspx
    Dim doc As New XmlDocument()
    doc.LoadXml("<book genre='novel' ISBN='1-861001-57-5'>" & _
    "<title>Pride And Prejudice</title>" & _
    "</book>")
    Dim root As XmlNode = doc.DocumentElement
    'Create a new node.
    Dim elem As XmlElement = doc.CreateElement("price")
    elem.InnerText = "19.95"
    'Add the node to the document.
    root.InsertBefore(elem, root.FirstChild)
    Console.WriteLine("Display the modified XML...")
    doc.Save(Console.Out)
    remember make the reply as answer and vote the reply as helpful if it helps.

  • How can I use XStream to persist complicated Java Object  to XML & backward

    Dear Sir:
    I met a problem as demo in my code below when i use XTream to persist my Java Object;
    How can I use XStream to persist complicated Java Object to XML & backward??
    See
    [1] main code
    import java.io.BufferedReader;
    import java.io.BufferedWriter;
    import java.io.FileReader;
    import java.io.FileWriter;
    import java.io.IOException;
    import java.util.ArrayList;
    import com.thoughtworks.xstream.XStream;
    import com.thoughtworks.xstream.io.xml.DomDriver;
    public class PhoneList {
         ArrayList<PhoneNumber> phones;
         ArrayList<Person> person;
         private PhoneList myphonelist ;
         private LocationTest location;
         private PhoneList(String name) {
         phones = new ArrayList<PhoneNumber>();
         person = new ArrayList<Person>();
         public ArrayList<PhoneNumber> getphones() {
              return phones;
         public ArrayList<Person> getperson() {
              return person;
         public void addPhoneNumber(PhoneNumber b1) {
              this.phones.add(b1);
         public void removePhoneNumber(PhoneNumber b1) {
              this.phones.remove(b1);
         public void addPerson(Person p1) {
              this.person.add(p1);
         public void removePerson(Person p1) {
              this.person.remove(p1);
         public void BuildList(){
              location = new LocationTest();
              XStream xstream = new XStream();
              myphonelist = new PhoneList("PhoneList");
              Person joe = new Person("Joe, Wallace");
              joe.setPhone(new PhoneNumber(123, "1234-456"));
              joe.setFax(new PhoneNumber(123, "9999-999"));
              Person geo= new Person("George Nixson");
              geo.setPhone(new PhoneNumber(925, "228-9999"));
              geo.getPhone().setLocationTest(location);          
              myphonelist.addPerson(joe);
              myphonelist.addPerson(geo);
         public PhoneList(){
              XStream xstream = new XStream();
              BuildList();
              saveStringToFile("C:\\temp\\test\\PhoneList.xml",convertToXML(myphonelist));
         public void saveStringToFile(String fileName, String saveString) {
              BufferedWriter bw = null;
              try {
                   bw = new BufferedWriter(
                             new FileWriter(fileName));
                   try {
                        bw.write(saveString);
                   finally {
                        bw.close();
              catch (IOException ex) {
                   ex.printStackTrace();
              //return saved;
         public String getStringFromFile(String fileName) {
              BufferedReader br = null;
              StringBuilder sb = new StringBuilder();
              try {
                   br = new BufferedReader(
                             new FileReader(fileName));
                   try {
                        String s;
                        while ((s = br.readLine()) != null) {
                             // add linefeed (\n) back since stripped by readline()
                             sb.append(s + "\n");
                   finally {
                        br.close();
              catch (Exception ex) {
                   ex.printStackTrace();
              return sb.toString();
         public  String convertToXML(PhoneList phonelist) {
              XStream xstream = new  XStream(new DomDriver());
              xstream.setMode(xstream.ID_REFERENCES) ;
              return xstream.toXML(phonelist);
         public static void main(String[] args) {
              new PhoneList();
    }[2].
    import java.io.Serializable;
    import javax.swing.JFrame;
    public class PhoneNumber implements Serializable{
           private      String      phone;
           private      String      fax;
           private      int      code;
           private      String      number;
           private      String      address;
           private      String      school;
           private      LocationTest      location;
           public PhoneNumber(int i, String str) {
                setCode(i);
                setNumber(str);
                address = "4256, Washington DC, USA";
                school = "Washington State University";
         public Object getPerson() {
              return null;
         public void setPhone(String phone) {
              this.phone = phone;
         public String getPhone() {
              return phone;
         public void setFax(String fax) {
              this.fax = fax;
         public String getFax() {
              return fax;
         public void setCode(int code) {
              this.code = code;
         public int getCode() {
              return code;
         public void setNumber(String number) {
              this.number = number;
         public String getNumber() {
              return number;
         public void setLocationTest(LocationTest bd) {
              this.location = bd;
            JFrame f = new JFrame();
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.getContentPane().add(location);
            f.getContentPane().add(location.getControls(), "Last");
            f.setSize(400,400);
            f.setLocation(200,200);
            f.setVisible(true);
         public LocationTest getLocationTest() {
              return location;
         }[3].
    package test.temp;
    import java.io.Serializable;
    public class Person implements Serializable{
         private String           fullname;
           @SuppressWarnings("unused")
         private PhoneNumber      phone;
           @SuppressWarnings("unused")
         private PhoneNumber      fax;
         public Person(){
         public Person(String fname){
                fullname=fname;           
         public void setPhone(PhoneNumber phoneNumber) {
              phone = phoneNumber;
         public void setFax(PhoneNumber phoneNumber) {
              fax = phoneNumber;
         public PhoneNumber getPhone() {
              return phone ;
         public PhoneNumber getFax() {
              return fax;
        public String getName() {
            return fullname ;
        public void setName(String name) {
            this.fullname      = name;
        public String toString() {
            return getName();
    }[4]. LocationTest.java
    package test.temp;
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import javax.swing.*;
    import javax.swing.event.*;
    public class LocationTest extends JPanel implements ChangeListener
        Ellipse2D.Double ball;
        Line2D.Double    line;
        JSlider          translate;
        double           lastTheta = 0;
        public void stateChanged(ChangeEvent e)
            JSlider slider = (JSlider)e.getSource();
            String name = slider.getName();
            int value = slider.getValue();
            if(name.equals("rotation"))
                tilt(Math.toRadians(value));
            else if(name.equals("translate"))
                moveBall(value);
            repaint();
        protected void paintComponent(Graphics g)
            super.paintComponent(g);
            Graphics2D g2 = (Graphics2D)g;
            g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                                RenderingHints.VALUE_ANTIALIAS_ON);
            if(ball == null)
                initGeom();
            g2.setPaint(Color.green.darker());
            g2.draw(line);
            g2.setPaint(Color.red);
            g2.fill(ball);
        private void initGeom()
            int w = getWidth();
            int h = getHeight();
            int DIA = 30;
            int padFromEnd = 5;
            line = new Line2D.Double(w/4, h*15/16, w*3/4, h*15/16);
            double x = line.x2 - padFromEnd - DIA;
            double y = line.y2 - DIA;
            ball = new Ellipse2D.Double(x, y, DIA, DIA);
            // update translate slider values
            int max = (int)line.getP1().distance(line.getP2());
            translate.setMaximum(max);
            translate.setValue(max-padFromEnd);
        private void tilt(double theta)
            // rotate line from left end
            Point2D pivot = line.getP1();
            double lineLength = pivot.distance(line.getP2());
            Point2D.Double p2 = new Point2D.Double();
            p2.x = pivot.getX() + lineLength*Math.cos(theta);
            p2.y = pivot.getY() + lineLength*Math.sin(theta);
            line.setLine(pivot, p2);
            // find angle from pivot to ball center relative to line
            // ie, ball center -> pivot -> line end
            double cx = ball.getCenterX();
            double cy = ball.getCenterY();
            double pivotToCenter = pivot.distance(cx, cy);
            // angle of ball to horizon
            double dy = cy - pivot.getY();
            double dx = cx - pivot.getX();
            // relative angle phi = ball_to_horizon - last line_to_horizon
            double phi = Math.atan2(dy, dx) - lastTheta;
            // rotate ball from pivot
            double x = pivot.getX() + pivotToCenter*Math.cos(theta+phi);
            double y = pivot.getY() + pivotToCenter*Math.sin(theta+phi);
            ball.setFrameFromCenter(x, y, x+ball.width/2, y+ball.height/2);
            lastTheta = theta;  // save theta for next time
        private void moveBall(int distance)
            Point2D pivot = line.getP1();
            // ball touches line at distance from pivot
            double contactX = pivot.getX() + distance*Math.cos(lastTheta);
            double contactY = pivot.getY() + distance*Math.sin(lastTheta);
            // find new center location of ball
            // angle lambda = lastTheta - 90 degrees (anti-clockwise)
            double lambda = lastTheta - Math.PI/2;
            double x = contactX + (ball.width/2)*Math.cos(lambda);
            double y = contactY + (ball.height/2)*Math.sin(lambda);
            ball.setFrameFromCenter(x, y, x+ball.width/2, y+ball.height/2);
        JPanel getControls()
            JSlider rotate = getSlider("rotation angle", "rotation", -90, 0, 0, 5, 15);
            translate = getSlider("distance from end",  "translate", 0, 100, 100,25, 50);
            JPanel panel = new JPanel(new GridLayout(0,1));
            panel.add(rotate);
            panel.add(translate);
            return panel;
        private JSlider getSlider(String title, String name, int min, int max,
                                  int value, int minorSpace, int majorSpace)
            JSlider slider = new JSlider(JSlider.HORIZONTAL, min, max, value);
            slider.setBorder(BorderFactory.createTitledBorder(title));
            slider.setName(name);
            slider.setPaintTicks(true);
            slider.setMinorTickSpacing(minorSpace);
            slider.setMajorTickSpacing(majorSpace);
            slider.setPaintLabels(true);
            slider.addChangeListener(this);
            return slider;
    }OK, My questions are:
    [1]. what I generated XML by XSTream is very complicated, especially for object LocationTest, Can we make it as simple as others such as Person object??
    [2]. after I run it, LocationTest will popup and a red ball in a panel will dsiplay, after I change red ball's position, I hope to persist it to xml, then when I read it back, I hope to get same picture, ie, red ball stiil in old position, How to do that??
    Thanks a lot!!

    Positive feedback? Then please take this in a positive way: if you want to work on persisting Java objects into XML, then GUI programming is irrelevant to that goal. The 1,000 lines of code you posted there appeared to me to have a whole lot of GUI code in it. You should produce a smaller (much smaller) example of what you want to do. Calling the working code from your GUI program should come later.

  • Dynamically create Value Objects from XML file

    Hi
    I want to create a value object from Xml file dynamically,like in the xml file i have the name of the variable and the datatype of the variable.is it possible do that,if so how.

    Read about apache's Digester tool. This is part of the Jakartha project. This tool helps in creating java objects from the XML files. I am not sure, if that is what u r looking for.

  • Loading LOTS of objects from xml

    hi
    I'm developing code that parses an XML file with known elements and reads the contents into objects
    I've been doing this using DOM
    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
    DocumentBuilder db = dbf.newDocumentBuilder();
    InputSource in = new InputSource(xmlFile);
    Document doc = db.parse(in);The trouble is that when I test reading in of over 6000 objects, I'm getting
    Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
    at com.sun.org.apache.xerces.internal.dom.DeferredDocumentImpl.getNodeObject(DeferredDocumentImpl.java:1000)
    at com.sun.org.apache.xerces.internal.dom.DeferredDocumentImpl.synchronizeChildren(DeferredDocumentImpl.java:1741)
    at com.sun.org.apache.xerces.internal.dom.DeferredElementImpl.synchronizeChildren(DeferredElementImpl.java:132)
    at com.sun.org.apache.xerces.internal.dom.ParentNode.hasChildNodes(ParentNode.java:194)
    at com.sun.org.apache.xerces.internal.dom.DeepNodeListImpl.nextMatchingElementAfter(DeepNodeListImpl.java:168)
    at com.sun.org.apache.xerces.internal.dom.DeepNodeListImpl.item(DeepNodeListImpl.java:143)
    at com.sun.org.apache.xerces.internal.dom.DeepNodeListImpl.getLength(DeepNodeListImpl.java:114)
    at business.PersonRegister.persist(PersonRegister.java:247)
    at business.PersonRegister.main(PersonRegister.java:807)
    I believe this is because there is insufficent memory to read the whole Dom document in before parsing...?
    Creating the objects and using them in memory is not a problem - it's much quicker than a SQL database, but I need a way of reading the XML file without first creating the entire DOM document.
    There must be a way of reading and parsing one element, creating the object, reading and parsing, creating and so on to save loading up the whole DOM document
    has anyone got any bright ideas please?

    thanks for both the replies above - essentially the same correct solution.
    something worth noting now that I've written and tested both a SAX solution and a DOM solution is that there is a significant (4 x) time penalty using SAX.
    I considering dividing the vector I am storing/recovering into chunks and saving each chunk separately using DOM to speed things up...
    any thoughts on this approach?

  • ABAP Objects and BADI

    HI
    Can anyone give me the link for ABAP Objects and BADI'S.
    I would like to have ABAP Objects with Example as well as BADIS.
    Please tell me as iam new to those.
    Thanks in advance

    Hi,
    ABAP objects have an elaborated list plz mention specific objects u want to know.
    These are few of the links which I got through the sdn.sap for the objects like ALV,LSMW,IDOCS, etc..
    Start with this.Refer this
    For BDC:
    http://myweb.dal.ca/hchinni/sap/bdc_home.htm
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/bdc&
    http://www.sap-img.com/abap/learning-bdc-programming.htm
    http://www.sapdevelopment.co.uk/bdc/bdchome.htm
    http://www.sap-img.com/abap/difference-between-batch-input-and-call-transaction-in-bdc.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/69/c250684ba111d189750000e8322d00/frameset.htm
    http://www.sapbrain.com/TUTORIALS/TECHNICAL/BDC_tutorial.html
    Check these link:
    http://www.sap-img.com/abap/difference-between-batch-input-and-call-transaction-in-bdc.htm
    http://www.sap-img.com/abap/question-about-bdc-program.htm
    http://www.itcserver.com/blog/2006/06/30/batch-input-vs-call-transaction/
    http://www.planetsap.com/bdc_main_page.htm
    call Transaction or session method ?
    http://www.sapbrain.com/FAQs/TECHNICAL/SAP_ABAP_DATADICTIONARY_FAQ.html
    http://www.****************/InterviewQ/interviewQ.htm
    http://help.sap.com/saphelp_46c/helpdata/en/35/2cd77bd7705394e10000009b387c12/frameset.htm
    Reports
    http://www.sapgenie.com/abap/reports.htm
    http://www.allsaplinks.com/material.html
    http://www.sapdevelopment.co.uk/reporting/reportinghome.htm
    http://www.sapfans.com/forums/viewtopic.php?t=58286
    http://www.sapfans.com/forums/viewtopic.php?t=76490
    http://www.sapfans.com/forums/viewtopic.php?t=20591
    http://www.sapfans.com/forums/viewtopic.php?t=66305 - this one discusses which way should you use - ABAP Objects calls or simple function modules.
    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
    Check these step-by-step links
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/ccab6730-0501-0010-ee84-de050a6cc287
    https://sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/8fd773b3-0301-0010-eabe-82149bcc292e
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/3c5d9ae3-0501-0010-0090-bdfb2d458985
    for Smartforms material
    http://www.sap-basis-abap.com/sapsf001.htm
    http://www.sap-press.com/downloads/h955_preview.pdf
    http://www.ossincorp.com/Black_Box/Black_Box_2.htm
    http://www.sap-img.com/smartforms/sap-smart-forms.htm
    http://www.sap-img.com/smartforms/smartform-tutorial.htm
    http://www.sapgenie.com/abap/smartforms.htm
    How to trace smartform
    http://help.sap.com/saphelp_47x200/helpdata/en/49/c3d8a4a05b11d5b6ef006094192fe3/frameset.htm
    http://www.help.sap.com/bp_presmartformsv1500/DOCU/OVIEW_EN.PDF
    http://www.sap-img.com/smartforms/smart-006.htm
    http://www.sap-img.com/smartforms/smartforms-faq-part-two.htm
    Re: Need FAQ's
    check most imp link
    http://www.sapbrain.com/ARTICLES/TECHNICAL/SMARTFORMS/smartforms.html
    step by step good ex link is....
    http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html
    SAPScripts
    http://esnips.com/doc/1ff9f8e8-0a4c-42a7-8819-6e3ff9e7ab44/sapscripts.pdf
    http://esnips.com/doc/1e487f0c-8009-4ae1-9f9c-c07bd953dbfa/script-command.pdf
    http://esnips.com/doc/64d4eccb-e09b-48e1-9be9-e2818d73f074/faqss.pdf
    http://esnips.com/doc/cb7e39b4-3161-437f-bfc6-21e6a50e1b39/sscript.pdf
    http://esnips.com/doc/fced4d36-ba52-4df9-ab35-b3d194830bbf/symbols-in-scripts.pdf
    http://esnips.com/doc/b57e8989-ccf0-40d0-8992-8183be831030/sapscript-how-to-calculate-totals-and-subtotals.htm
    SAP SCRIPT FIELDS
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/d1/8033ea454211d189710000e8322d00/content.htm
    scripts easy material
    http://www.allsaplinks.com/sap_script_made_easy.html
    Debugging Document.
    http://www.cba.nau.edu/haney-j/CIS497/Assignments/Debugging.doc
    http://help.sap.com/saphelp_47x200/helpdata/en/c6/617ca9e68c11d2b2ab080009b43351/content.htm
    http://www.cba.nau.edu/haney-j/CIS497/Assignments/Debugging.doc
    http://help.sap.com/saphelp_erp2005/helpdata/en/b3/d322540c3beb4ba53795784eebb680/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/84/1f624f4505144199e3d570cf7a9225/frameset.htm
    http://help.sap.com/saphelp_bw30b/helpdata/en/c6/617ca9e68c11d2b2ab080009b43351/content.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/b3/d322540c3beb4ba53795784eebb680/frameset.htm
    BAPI
    http://help.sap.com/saphelp_46c/helpdata/en/9b/417f07ee2211d1ad14080009b0fb56/frameset.htm
    http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html
    Checkout !!
    http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html
    http://techrepublic.com.com/5100-6329-1051160.html#
    http://www.sap-img.com/bapi.htm
    http://www.sap-img.com/abap/bapi-conventions.htm
    http://www.sappoint.com/abap/bapiintro.pdf
    http://www.sapgenie.com/abap/bapi/example.htm
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDAPII/CABFAAPIINTRO.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFABAPIREF/CABFABAPIPG.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCFESDE8/BCFESDE8.pdf
    List of all BAPIs
    http://www.planetsap.com/LIST_ALL_BAPIs.htm
    http://www.sappoint.com/abap/bapiintro.pdf
    http://www.sappoint.com/abap/bapiprg.pdf
    http://www.sappoint.com/abap/bapiactx.pdf
    http://www.sappoint.com/abap/bapilst.pdf
    http://www.sappoint.com/abap/bapiexer.pdf
    http://service.sap.com/ale
    http://service.sap.com/bapi
    http://www.geocities.com/mpioud/Abap_programs.html
    http://www.sapdevelopment.co.uk/reporting/reportinghome.htm
    Simple ALV report
    http://www.sapgenie.com/abap/controls/alvgrid.htm
    http://wiki.ittoolbox.com/index.php/Code:Ultimate_ALV_table_toolbox
    ALV
    1. Please give me general info on ALV.
    http://www.sapfans.com/forums/viewtopic.php?t=58286
    http://www.sapfans.com/forums/viewtopic.php?t=76490
    http://www.sapfans.com/forums/viewtopic.php?t=20591
    http://www.sapfans.com/forums/viewtopic.php?t=66305 - this one discusses which way should you use - ABAP Objects calls or simple function modules.
    2. How do I program double click in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=11601
    http://www.sapfans.com/forums/viewtopic.php?t=23010
    3. How do I add subtotals (I have problem to add them)...
    http://www.sapfans.com/forums/viewtopic.php?t=20386
    http://www.sapfans.com/forums/viewtopic.php?t=85191
    http://www.sapfans.com/forums/viewtopic.php?t=88401
    http://www.sapfans.com/forums/viewtopic.php?t=17335
    4. How to add list heading like top-of-page in ABAP lists?
    http://www.sapfans.com/forums/viewtopic.php?t=58775
    http://www.sapfans.com/forums/viewtopic.php?t=60550
    http://www.sapfans.com/forums/viewtopic.php?t=16629
    5. How to print page number / total number of pages X/XX in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=29597 (no direct solution)
    6. ALV printing problems. The favourite is: The first page shows the number of records selected but I don't need this.
    http://www.sapfans.com/forums/viewtopic.php?t=64320
    http://www.sapfans.com/forums/viewtopic.php?t=44477
    7. How can I set the cell color in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=52107
    8. How do I print a logo/graphics in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=81149
    http://www.sapfans.com/forums/viewtopic.php?t=35498
    http://www.sapfans.com/forums/viewtopic.php?t=5013
    9. How do I create and use input-enabled fields in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=84933
    http://www.sapfans.com/forums/viewtopic.php?t=69878
    10. How can I use ALV for reports that are going to be run in background?
    http://www.sapfans.com/forums/viewtopic.php?t=83243
    http://www.sapfans.com/forums/viewtopic.php?t=19224
    11. How can I display an icon in ALV? (Common requirement is traffic light icon).
    http://www.sapfans.com/forums/viewtopic.php?t=79424
    http://www.sapfans.com/forums/viewtopic.php?t=24512
    12. How can I display a checkbox in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=88376
    http://www.sapfans.com/forums/viewtopic.php?t=40968
    http://www.sapfans.com/forums/viewtopic.php?t=6919
    Go thru these programs they may help u to try on some hands on
    ALV Demo program
    BCALV_DEMO_HTML
    BCALV_FULLSCREEN_DEMO ALV Demo: Fullscreen Mode
    BCALV_FULLSCREEN_DEMO_CLASSIC ALV demo: Fullscreen mode
    BCALV_GRID_DEMO Simple ALV Control Call Demo Program
    BCALV_TREE_DEMO Demo for ALV tree control
    BCALV_TREE_SIMPLE_DEMO
    BC_ALV_DEMO_HTML_D0100
    Remote Function Call:
    RFC is an SAP interface protocol. Based on CPI-C, it considerably simplifies the programming of communication processes between systems.
    RFCs enable you to call and execute predefined functions in a remote system - or even in the same system.
    RFCs manage the communication process, parameter transfer and error handling.
    http://help.sap.com/saphelp_47x200/helpdata/en/22/042860488911d189490000e829fbbd/frameset.htm.
    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
    Refer this
    http://www.sapbrain.com/FAQs/TECHNICAL/SAP_ABAP_DATADICTIONARY_FAQ.html
    http://www.****************/InterviewQ/interviewQ.htm
    http://help.sap.com/saphelp_46c/helpdata/en/35/2cd77bd7705394e10000009b387c12/frameset.htm
    http://www.techinterviews.com/?p=198
    http://www.techinterviews.com/?p=326
    http://www.sap-img.com/abap/answers-to-some-abap-interview-questions.htm
    http://www.sap-img.com/abap/more-than-100-abap-interview-faqs.htm
    http://www.geekinterview.com/Interview-Questions/SAP-R-3/ABAP
    http://sap.ittoolbox.com/documents/popular-q-and-a/abap-sample-interview-questions-3240
    http://www.sap-img.com/abap/abap-interview-question.htm
    http://www.allinterview.com/Interview-Questions/ABAP.html
    links for OO ABAP.
    http://www.sapgenie.com/abap/OO/
    http://www.sapgenie.com/abap/OO/index.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
    http://www.esnips.com/doc/375fff1b-5a62-444d-8ec1-55508c308b17/prefinalppt.ppt
    http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://www.esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
    http://www.allsaplinks.com/
    http://www.sap-img.com/
    http://www.sapgenie.com/
    http://help.sap.com
    http://www.sapgenie.com/abap/OO/
    http://www.sapgenie.com.
    http://www.sapgenie.com/abap/OO/index.htm
    http://www.sapgenie.com/abap/controls/index.htm
    http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://www.esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
    http://www.sapgenie.com/abap/OO/index.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    http://www.sapgenie.com/abap/OO/
    some more materials.
    Go through the following Documents Links & Materials for ABAP Objects
    check the below links lot of info and examples r there
    http://www.sapgenie.com/abap/OO/index.htm
    http://www.geocities.com/victorav15/sapr3/abap_ood.html
    http://www.brabandt.de/html/abap_oo.html
    Check this cool weblog:
    /people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
    /people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
    /people/sap.user72/blog/2005/05/10/a-small-tip-for-the-beginners-in-oo-abap
    /people/ravikumar.allampallam/blog/2005/02/11/abap-oo-in-action
    /people/thomas.jung3/blog/2005/09/08/oo-abap-dynpro-programming
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b6254f411d194a60000e8353423/frameset.htm
    http://www.sapgenie.com/abap/OO/
    http://www.sapgenie.com/abap/OO/index.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
    http://www.esnips.com/doc/375fff1b-5a62-444d-8ec1-55508c308b17/prefinalppt.ppt
    http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://www.esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
    http://www.allsaplinks.com/
    http://www.sap-img.com/
    http://www.sapgenie.com/
    http://help.sap.com
    http://www.sapgenie.com/abap/OO/
    http://www.sapgenie.com/abap/OO/index.htm
    http://www.sapgenie.com/abap/controls/index.htm
    http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://www.esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
    http://www.sapgenie.com/abap/OO/index.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    http://www.sapgenie.com/abap/OO/
    these links
    http://help.sap.com/saphelp_47x200/helpdata/en/ce/b518b6513611d194a50000e8353423/content.htm
    For funtion module to class
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5954f411d194a60000e8353423/content.htm
    for classes
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5c54f411d194a60000e8353423/content.htm
    for methods
    http://help.sap.com/saphelp_47x200/helpdata/en/08/d27c03b81011d194f60000e8353423/content.htm
    for inheritance
    http://help.sap.com/saphelp_47x200/helpdata/en/dd/4049c40f4611d3b9380000e8353423/content.htm
    for interfaces
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b6254f411d194a60000e8353423/content.htm
    For Materials:
    1) http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCABA/BCABA.pdf -- Page no: 1291
    2) http://esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
    3) http://esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    4) http://esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
    5) http://esnips.com/doc/92be4457-1b6e-4061-92e5-8e4b3a6e3239/Object-Oriented-ABAP.ppt
    6) http://esnips.com/doc/448e8302-68b1-4046-9fef-8fa8808caee0/abap-objects-by-helen.pdf
    7) http://esnips.com/doc/39fdc647-1aed-4b40-a476-4d3042b6ec28/class_builder.ppt
    8) http://www.amazon.com/gp/explorer/0201750805/2/ref=pd_lpo_ase/102-9378020-8749710?ie=UTF8
    1) http://www.erpgenie.com/sap/abap/OO/index.htm
    2) http://help.sap.com/saphelp_nw04/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/profile/2007/07/09/understandingABAPObjects&
    Please visit the following links:
    http://service.sap.com/erp
    http://solutionbrowser.erp.sap.fmpmedia.com/ (Functional prespective)
    http://service.sap.com/instguides --> mySAP Business Suite Applications --> mySAP ERP --> mySAP ERP 2005 --> Upgrade
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/LOVC/LOVC.pdf
    For Functionality Differences pls refer to the below site -
    http://solutionbrowser.erp.sap.fmpmedia.com/
    FOR BADI'S:
    Check this blogs 2 find a BADI:
    How to find if we have a BADI in Transaction VB02
    Re: BADI for screen enhancement in MM01  transaction
    Re: BADI and User exits
    How To Define a New BAdI Within the Enhancement Framework (Some Basics About the BAdI,BAdI Commands in ABAP,
    When to Use a BAdI?)
    /people/thomas.weiss/blog/2006/04/03/how-to-define-a-new-badi-within-the-enhancement-framework--part-3-of-the-series
    How to implement a BAdI And How to Use a Filter
    /people/thomas.weiss/blog/2006/04/18/how-to-implement-a-badi-and-how-to-use-a-filter--part-4-of-the-series-on-the-new-enhancement-framework
    Introducing Business Add-Ins
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f3202186-0601-0010-6591-b832b1a0d0de
    How to implement BAdi in Enhancement Framework
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d0456c54-0901-0010-f0b3-cd765fb99702
    Business Add-Ins
    http://help.sap.com/saphelp_47x200/helpdata/en/ee/a1d548892b11d295d60000e82de14a/frameset.htm
    BAdI: Customer-Defined Functions in the Formula Builder
    http://help.sap.com/saphelp_nw04/helpdata/en/04/f3683c05ea4464e10000000a114084/content.htm
    Difference Between BADI and User Exits
    http://www.sap-img.com/abap/difference-between-badi-and-user-exits.htm
    To Use BADI - Business Add In you need to Understand ABAP OO Interface Concept
    http://www.sap-img.com/abap/business-add-in-you-need-to-understand-abap-oo-interface-concept.htm
    You can check the links for Step by Step Badi Implemntation
    (very helpful self learning docs).
    BADI Step by Step Implementation.
    http://www.esnips.com/doc/e06e4171-29df-462f-b857-54fac19a9d8e/ppt-on-badis.ppt
    http://www.esnips.com/doc/10016c34-55a7-4b13-8f5f-bf720422d265/BADIs.pdf
    http://www.esnips.com/doc/43a58f51-5d92-4213-913a-de05e9faac0d/Business-Addin.doc
    http://www.esnips.com/doc/1e10392e-64d8-4181-b2a5-5f04d8f87839/badi.doc
    www.sapgenie.com/publications/saptips/022006%20-%20Zaidi%20BADI.pdf
    http://www.sapdevelopment.co.uk/enhance/enhance_badi.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/04/f3683c05ea4464e10000000a114084/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/e6/d54d3c596f0b26e10000000a11402f/content.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/c2/eab541c5b63031e10000000a155106/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/04/f3683c05ea4464e10000000a114084/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/e6/63ee7f486cc143a560799d8803ce29/content.htm
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/srm/badi-general+information&
    http://www.esnips.com/doc/e06e4171-29df-462f-b857-54fac19a9d8e/ppt-on-badis.ppt
    http://www.esnips.com/doc/10016c34-55a7-4b13-8f5f-bf720422d265/BADIs.pdf
    http://www.esnips.com/doc/43a58f51-5d92-4213-913a-de05e9faac0d/Business-Addin.doc
    http://www.esnips.com/doc/1e10392e-64d8-4181-b2a5-5f04d8f87839/badi.doc
    www.sapgenie.com/publications/saptips/022006%20-%20Zaidi%20BADI.pdf
    http://www.sapdevelopment.co.uk/enhance/enhance_badi.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/04/f3683c05ea4464e10000000a114084/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/e6/d54d3c596f0b26e10000000a11402f/content.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/c2/eab541c5b63031e10000000a155106/frameset.htm
    The specified item was not found.
    http://help.sap.com/saphelp_erp2005/helpdata/en/73/7e7941601b1d09e10000000a155106/frameset.htm
    http://support.sas.com/rnd/papers/sugi30/SAP.ppt
    http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/abapindx.htm
    http://members.aol.com/_ht_a/skarkada/sap/
    http://www.ct-software.com/reportpool_frame.htm
    http://www.saphelp.com/SAP_Technical.htm
    http://www.kabai.com/abaps/q.htm
    http://www.guidancetech.com/people/holland/sap/abap/
    http://www.planetsap.com/download_abap_programs.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c8/1975cc43b111d1896f0000e8322d00/content.htm
    http://www.allsaplinks.com/badi.html
    /people/thomas.weiss/blog/2006/04/03/how-to-define-a-new-badi-within-the-enhancement-framework--part-3-of-the-serieshttps:///people/alwin.vandeput2/blog/2006/04/13/how-to-search-for-badis-trace-it
    /people/thomas.weiss/blog/2006/04/18/how-to-implement-a-badi-and-how-to-use-a-filter--part-4-of-the-series-on-the-new-enhancement-framework /people/thomas.weiss/blog/2006/05/03/source-code-enhancements--part-5-of-the-series-on-the-new-enhancement-framework
    http://www.esnips.com/doc/e06e4171-29df-462f-b857-54fac19a9d8e/ppt-on-badis.ppt
    http://www.esnips.com/doc/10016c34-55a7-4b13-8f5f-bf720422d265/BADIs.pdf
    http://www.esnips.com/doc/43a58f51-5d92-4213-913a-de05e9faac0d/Business-Addin.doc
    http://www.esnips.com/doc/1e10392e-64d8-4181-b2a5-5f04d8f87839/badi.doc
    http://www.esnips.com/doc/3b7bbc09-c095-45a0-9e89-91f2f86ee8e9/BADI-Introduction.ppt
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/40921dd7-d5cf-2910-1894-bb62316afbd1
    http://help.sap.com/saphelp_erp2005/helpdata/en/73/7e7941601b1d09e10000000a155106/frameset.htm
    http://support.sas.com/rnd/papers/sugi30/SAP.ppt
    http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/abapindx.htm
    http://members.aol.com/_ht_a/skarkada/sap/
    http://www.ct-software.com/reportpool_frame.htm
    http://www.saphelp.com/SAP_Technical.htm
    http://www.kabai.com/abaps/q.htm
    http://www.guidancetech.com/people/holland/sap/abap/
    http://www.planetsap.com/download_abap_programs.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c8/1975cc43b111d1896f0000e8322d00/content.htm
    /people/thomas.weiss/blog/2006/04/03/how-to-define-a-new-badi-within-the-enhancement-framework--part-3-of-the-series
    /people/thomas.weiss/blog/2006/04/18/how-to-implement-a-badi-and-how-to-use-a-filter--part-4-of-the-series-on-the-new-enhancement-framework
    http://esnips.com/doc/e06e4171-29df-462f-b857-54fac19a9d8e/ppt-on-badis.ppt
    http://esnips.com/doc/43a58f51-5d92-4213-913a-de05e9faac0d/Business-Addin.doc
    http://esnips.com/doc/10016c34-55a7-4b13-8f5f-bf720422d265/BADIs.pdf
    http://esnips.com/doc/1e10392e-64d8-4181-b2a5-5f04d8f87839/badi.doc
    http://esnips.com/doc/365d4c4d-9fcb-4189-85fd-866b7bf25257/customer-exits--badi.zip
    http://esnips.com/doc/3b7bbc09-c095-45a0-9e89-91f2f86ee8e9/BADI-Introduction.ppt
    http://help.sap.com//saphelp_470/helpdata/EN/eb/3e7cee940e11d295df0000e82de14a/frameset.htm
    Difference Between BADI and User Exits
    http://www.sap-img.com/abap/difference-between-badi-and-user-exits.htm
    Reward Points if found helpfull..
    Cheers,
    Chandra Sekhar.

  • WebService response object in XML - parsing attributes

    Hi- new to Flex and I'm trying to parse out the attributes of the response object. I can get the entire object and see that its working, but I cant get just a single attribute. It pulls weather info for world cities. For example, I just want the location name and temperature.
    Any advice on this? Thanks!
    <?xml version="1.0"?>
    <!-- fds\rpc\RPCResultFaultMXML.mxml -->
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
                    xmlns:s="library://ns.adobe.com/flex/spark">
        <mx:Script>
            <![CDATA[
                import mx.rpc.soap.SOAPFault;        
                import mx.rpc.events.ResultEvent;
                import mx.rpc.events.FaultEvent;
                import mx.controls.Alert;
                import mx.utils.ObjectUtil;
                public function showErrorDialog(event:FaultEvent):void {
                    // Handle operation fault.
                    Alert.show(event.fault.faultString, "Error");
                public function defaultFault(event:FaultEvent):void {
                    // Handle service fault.
                    if (event.fault is SOAPFault) {
                        var fault:SOAPFault=event.fault as SOAPFault;
                        var faultElement:XML=fault.element;
                        // You could use E4X to traverse the raw fault element returned in the SOAP envelope.
                    Alert.show(event.fault.faultString, "Error");              
                public function log(event:ResultEvent):void {
                    // Handle result.
                    trace(event.result);
                    //trace(ObjectUtil.toString(event.result));
                    //var len:int;
                    //len = event.result.length;
                    //trace(len);
                    //trace(event.result);
                    //trace(event.result.GetWeatherResponse.Location);
                    //var myXML:XML = new XML(event.result);
                    //trace(myXML.attribute("Location"));
            ]]>
        </mx:Script>
        <mx:WebService id="WeatherService" wsdl="http://www.webservicex.com/globalweather.asmx?wsdl"
                       fault="defaultFault(event)">
            <mx:operation name="GetWeather"
                          fault="showErrorDialog(event)"
                          result="log(event)"
                          resultFormat="xml">
                <mx:request>
                    <CityName>{myCity.text}</CityName>
                    <CountryName>{myCountry.text}</CountryName>
                </mx:request>
            </mx:operation>
        </mx:WebService>
        <mx:TextInput id="myCity" text="Madrid"/>
        <mx:TextInput id="myCountry" text="Spain"/>
        <!-- Call the web service operation with a Button click. -->
        <mx:Button width="60" label="Get Weather"
                  click="WeatherService.GetWeather.send();"/>
        <!-- Display the Weather -->
        <mx:Label text="Weather:"/>
        <mx:TextArea text="{WeatherService.GetWeather.lastResult}" height="200"/>
    </mx:Application>

    The WSDL says GetWeatherResponse is a string, and it appears to be a string of XML, so set <mx:operation resultFormat="object"> as this will unwrap the SOAP response value and leave a string typed value intact. You can then create a new ActionScript 3.0 E4X-based XML instance from the unwrapped string:
        var myXML:XML = new XML(event.result.toString());
    You can then travese the XML document using E4X syntax, a simple example is included below:
        trace(myXML..Location);
        trace(myXML..Temperature);

  • Java framework/toolkit for POJO, database persistence and XML

    Hi all,
    I've been wondering if there's a toolkit or framework for developing Java program (could be standalone Java program, EJBs etc.)
    I surfed around casually and found some but there isn't any detailed description of what and how each framework/toolkit does. So I hope to ask around if you've anything that you have used before and would like to point to me to look further.
    Given the huge number of open source toolkits, libraries and frameworks out there, it can be quite confusing as to which one is more suitable for me. Also with Sun's move into JDO and Java Persistence API, things become more messy and complicated - there isn't any clear leader in this area and things are starting to change with the inclusion of JDO which seems to be the future standard persistence API to use.
    So far, I've only worked with Hibernate for database persistence before. So I'm wondering if there're other options such as Hibernate with XDoclet, Castor and Spring framework etc. that can easily transform Plain Old Java Objects (POJO) -- hopefully using Java Reflection w/o using mapping XML files like in Hibernate -- into SQL for database persistence and XML text data and vice-versa. The current problem is that I've been spending tons of time writing code to transform data in Java objects into XML (using my own format) and also doing mapping files for Hibernate.
    I am hoping for something simple like:
    Object o = new Object();
    o.setProperty = "something";
    String xml = o.toXML(); // Convert object to XML text.
    o.save(); // Save to database.
    // The reverse: Parse XML into object and load from database
    Object o = new Object();
    o.fromXML(xml);
    o.load();
    // Properties should be initialized from database or XML.
    Anything similar to this out there?

    Hi,
    Just to share what I've found after surfing a bit more on this issue to promote more discussion on this area.
    For mapping of Java objects to XML, we can try looking more at Castor and JAXB.
    For database persistence to/from Java objects, look at Hibernate and JDO.
    There is this Hydrate project (hydrate.sourceforge.net) that I do not know where it fits in still. But it is supposed to do data transformation and mapping between Java objects, XML and database representation.
    Fyi.

  • Regarding mandatory fields, Context Objects and Fault Message Types

    Hi All,
    1) I am creating a structure with fields "Name", "Street" and "City". While creation i want to make "Name" fields as mandatory. Is it possible. If so how to achieve this.
    2) What is the purpose of Context Object and in which situation we will use this.
    3) What is the purpose of Fault Message Types and in which situation we will use this.
    4) I am doing file to file scenario, at sender side i have set the adapter as file and transport protocol as "FTP" . It is asking for "Server", "PORT" and "Login Details". What is this FTP, for this do i need to take any login details. I am totally not aware of FTP, could please explain more about this.
    Kindly look into the above points and respond point by point.
    Thanks in advance.
    Regards,
    Prem.S

    Hi prem,
    <b>1) I am creating a structure with fields "Name", "Street" and "City". While creation i want to make "Name" fields as mandatory. Is it possible. If so how to achieve this.</b>
    give occurence 1..unbounded. for the field name.
    <b>2) What is the purpose of Context Object and in which situation we will use this.</b>
    If u have multiple receiver system then to determine the reciever u can use context object.....
    the alternative of context objetc is X-Path...
    Check out these
    http://help.sap.com/saphelp_nw2004s/helpdata/en/d6/e44fcf98baa24a9686a7643a33f26f/content.htm
    /people/prasadbabu.nemalikanti3/blog/2006/09/20/receiver-determination-based-on-the-payload-of-input-dataextended-xpathcontext-object
    Here is a scenario where context objects were used for BPM
    Technical Context Object in ccBPM
    Get the details here:
    http://help.sap.com/saphelp_nw04/helpdata/en/d6/e44fcf98baa24a9686a7643a33f26f/frameset.htm
    Technical Context Objects :
    http://help.sap.com/saphelp_nw04/helpdata/en/d6/e44fcf98baa24a9686a7643a33f26f/frameset.htm
    A list of the Technical Context Objects names can be found here:
    http://help.sap.com/saphelp_nw04/helpdata/en/6e/ff0bf75772457b863ef5d99bc92404/content.htm
    Difference between context object and x-path:
    diff between context object and x path
    <b>3) What is the purpose of Fault Message Types and in which situation we will use this</b>
    whenever u want to catch some exception u can use fault message types.Just for a example u r sending some data to SAP system.But due to some reason the R/3 system is down.so in this case if u have implemented fault message ..u can get a error message specifying r/3 is down....
    Fault message implementation.
    /people/shabarish.vijayakumar/blog/2006/11/02/fault-message-types--a-demo-part-1
    How to Guide
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/40574601-ec97-2910-3cba-a0fdc10f4dce
    <b>4) I am doing file to file scenario, at sender side i have set the adapter as file and transport protocol as "FTP" . It is asking for "Server", "PORT" and "Login Details". What is this FTP, for this do i need to take any login details. I am totally not aware of FTP, could please explain more about this.</b>
    there are two transport protocol for File adapter
    1)FTP(File transfer protocol)
    to know abt FTP check here
    http://help.sap.com/saphelp_nw04/helpdata/en/43/0e16bfd7b021aee10000000a1553f6/content.htm
    2)NFS(Network File System)
    in server :Enter the host name or IP address of the FTP server.
    in PORT:Specify the port number of the FTP server.
                 The default is the standard port for the FTP server (21)
    check here
    http://help.sap.com/saphelp_nw04/helpdata/en/e3/94007075cae04f930cc4c034e411e1/content.htm
    Regards
    BILL
    <b>***reward with points if ity helps u!!</b>

Maybe you are looking for

  • March's TechNet Wiki BizTalk Guru Winners announced!!

    The results for March'sTechNet Guru competition have been posted! http://blogs.technet.com/b/wikininjas/archive/2014/04/17/the-microsoft-technet-guru-awards-march-2014.aspx <- results page! Congratulations to all our new Gurus for March! We will be i

  • Who is controller in a quickcluster?

    Folks, I've got three G5s setup as quickcluster with services. My machine typically would be set as the controller, but I am just testing the software right now. Is the machine that sends the job automatically the controller when all the machines are

  • I need to know what the part number is for a replacment hard drive chasis - 8460p

    I need to order a replacment chassis that the hard drive screws into for the 8460p, does anybody know the part number for this piece?

  • Question about bluetooth speakers

    I'm getting the Philips HTL3140B/12 soundbar on the cheap. Once paired with my ipad, can I send audio from every music streaming app, even from free spotify and Google Music accounts? Is there any way to do that aside of using a 3.5mm audio cable? Ai

  • Macbook Pro 10.6.5 can't find my LCD-tv

    Hello! I'm having issues connecting my Macbook Pro to my LG-LCd with this update. It works well with update 10.6.2 but not: 10.6.3 10.6.4 and now 10.6.5 The screen does flash in light blue on MB as it usually does when it is connected but I get no pi