Generating Input XML

Hi,
I have a schema and a xsl file.Is there any way to generate the input xml file using the same?
find my sample xsl file below :
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- � 2004-2005 Pantero Corporation. All rights reserved. -->
<!-- Exporting Pantero maps to XSLT file:                  -->
<!-- Source Type: com.cingular.ngLimitedXmlSchemaDataSource.Contact -->
<!-- Target Type: com.cingular.cingularCommon.Contact -->
<xsl:stylesheet version="1.1"
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
     <xsl:output method="xml" encoding="UTF-8"/>
     <xsl:template match="/Contact">
               <xsl:element name="Contact" namespace="http://www.CingularCommonXmlSchema.com/CingularCommonXmlSchema.xsd">
               <xsl:element name="BusinessPhone" namespace="http://www.CingularCommonXmlSchema.com/CingularCommonXmlSchema.xsd">
                         <xsl:value-of select="./businessPhone"/>
               </xsl:element>
               <xsl:element name="City" namespace="http://www.CingularCommonXmlSchema.com/CingularCommonXmlSchema.xsd">
                         <xsl:value-of select="./city"/>
               </xsl:element>
               <xsl:element name="ContactType" namespace="http://www.CingularCommonXmlSchema.com/CingularCommonXmlSchema.xsd">
                         <xsl:value-of select="./contactType"/>
               </xsl:element>
               <xsl:element name="EntityName" namespace="http://www.CingularCommonXmlSchema.com/CingularCommonXmlSchema.xsd">
                         <xsl:value-of select="./name"/>
               </xsl:element>
               <xsl:element name="StateAbbreviation" namespace="http://www.CingularCommonXmlSchema.com/CingularCommonXmlSchema.xsd">
                         <xsl:value-of select="./state"/>
               </xsl:element>
          <xsl:comment> concatWithDelimiter(AddressLineOne, AddressLineTwo, ", ") TO StreetAddress1 </xsl:comment>
               <xsl:element name="TollFreePhone" namespace="http://www.CingularCommonXmlSchema.com/CingularCommonXmlSchema.xsd">
                         <xsl:value-of select="./tollFreePhone"/>
               </xsl:element>
               <xsl:element name="Zip" namespace="http://www.CingularCommonXmlSchema.com/CingularCommonXmlSchema.xsd">
                         <xsl:value-of select="./zip"/>
               </xsl:element>
               </xsl:element>
     </xsl:template>
</xsl:stylesheet>here is the xsd :
i am using CONTACT in this xsd....
<?xml version="1.0" encoding="utf-8"?>
<!--  CONFIDENTIAL LICENSED MATERIAL
      � 2004-2005 Pantero Corporation. All rights reserved.     -->
<!-- Exporter Configuration Options:
     Include all the packages in the selected schema.
     Complex Types Only - false               
     Include Required Rules - true               
     Include Reverse Relationships - false     
     Export with Weak Typing - false-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:tns="http://www.CingularCommonXmlSchema.com/CingularCommonXmlSchema.xsd"
targetNamespace="http://www.CingularCommonXmlSchema.com/CingularCommonXmlSchema.xsd">
<!-- Type name: com.cingular.cingularCommonXmlSchema.Battery-->
   <xs:element name="Battery" type="tns:Battery"/>
   <xs:complexType name="Battery">
      <xs:sequence>
         <xs:element name="HoursAtFullCapacity" minOccurs="0" type="xs:int"/>
         <xs:element name="InstallationDate" minOccurs="0" type="xs:date"/>
         <xs:element name="Manufacturer" minOccurs="0" type="xs:string"/>
         <xs:element name="Model" minOccurs="0" type="xs:string"/>
         <xs:element name="NumberOfBatteries" minOccurs="0" type="xs:int"/>
         <xs:element name="NumberOfCells" minOccurs="0" type="xs:int"/>
      </xs:sequence>
   </xs:complexType>
<!-- Type name: com.cingular.cingularCommonXmlSchema.Contact-->
   <xs:element name="Contact" type="tns:Contact"/>
   <xs:complexType name="Contact">
      <xs:sequence>
         <xs:element name="BusinessPhone" minOccurs="0" type="xs:string"/>
         <xs:element name="City" minOccurs="0" type="xs:string"/>
         <xs:element name="ContactType" minOccurs="0" type="xs:string"/>
         <xs:element name="EntityName" minOccurs="0" type="xs:string"/>
         <xs:element name="StateAbbreviation" minOccurs="0" type="xs:string"/>
         <xs:element name="StreetAddress1" minOccurs="0" type="xs:string"/>
         <xs:element name="TollFreePhone" minOccurs="0" type="xs:string"/>
         <xs:element name="Zip" minOccurs="0" type="xs:string"/>
      </xs:sequence>
   </xs:complexType>
<!-- Type name: com.cingular.cingularCommonXmlSchema.Generator-->
   <xs:element name="Generator" type="tns:Generator"/>
   <xs:complexType name="Generator">
      <xs:sequence>
         <xs:element name="Manufacturer" minOccurs="0" type="xs:string"/>
         <xs:element name="Rating" minOccurs="0" type="xs:string"/>
         <xs:element name="Receptacle" minOccurs="0" type="xs:string"/>
      </xs:sequence>
   </xs:complexType>
<!-- Type name: com.cingular.cingularCommonXmlSchema.GetContactByKeyRequest-->
   <xs:element name="GetContactByKeyRequest" type="tns:GetContactByKeyRequest"/>
   <xs:complexType name="GetContactByKeyRequest">
      <xs:sequence>
         <xs:element name="contactId" minOccurs="0" type="xs:string"/>
      </xs:sequence>
   </xs:complexType>
<!-- Type name: com.cingular.cingularCommonXmlSchema.GetContactByKeyResponse-->
   <xs:element name="GetContactByKeyResponse" type="tns:GetContactByKeyResponse"/>
   <xs:complexType name="GetContactByKeyResponse">
      <xs:sequence>
         <xs:element name="Contact" type="tns:Contact" minOccurs="0"/>
      </xs:sequence>
   </xs:complexType>
<!-- Type name: com.cingular.cingularCommonXmlSchema.Location-->
   <xs:element name="Location" type="tns:Location"/>
   <xs:complexType name="Location">
      <xs:sequence>
         <xs:element name="AlarmResponsibility" minOccurs="0" type="xs:string"/>
         <xs:element name="CellSiteId" minOccurs="0" type="xs:int"/>
         <xs:element name="City" minOccurs="0" type="xs:string"/>
         <xs:element name="CLLI" minOccurs="0" type="xs:string"/>
         <xs:element name="ConstructionDate" minOccurs="0" type="xs:date"/>
         <xs:element name="Country" minOccurs="0" type="xs:string"/>
         <xs:element name="County" minOccurs="0" type="xs:string"/>
         <xs:element name="CTSEntryId" minOccurs="0" type="xs:string"/>
         <xs:element name="CTSLocationId" minOccurs="0" type="xs:string"/>
         <xs:element name="Directions" minOccurs="0" type="xs:string"/>
         <xs:element name="FCCASRNumber" minOccurs="0" type="xs:string"/>
         <xs:element name="FinancialLocation" minOccurs="0" type="xs:string"/>
         <xs:element name="Floor" minOccurs="0" type="xs:string"/>
         <xs:element name="Height" minOccurs="0" type="xs:int"/>
         <xs:element name="IsActive" minOccurs="0" type="xs:int"/>
         <xs:element name="IsCingularOwned" minOccurs="0" type="xs:int"/>
         <xs:element name="IsLighted" minOccurs="0" type="xs:int"/>
         <xs:element name="Latitude" minOccurs="0" type="xs:double"/>
         <xs:element name="LocationId" minOccurs="0" type="xs:int"/>
         <xs:element name="LocationType" minOccurs="0" type="xs:string"/>
         <xs:element name="Longitude" minOccurs="0" type="xs:double"/>
         <xs:element name="MeanHeightAboveSeaLevel" minOccurs="0" type="xs:int"/>
         <xs:element name="MorphologyType" minOccurs="0" type="xs:string"/>
         <xs:element name="PhoneNumber" minOccurs="0" type="xs:string"/>
         <xs:element name="Room" minOccurs="0" type="xs:string"/>
         <xs:element name="SiteAccessDescription" minOccurs="0" type="xs:string"/>
         <xs:element name="StateAbbreviation" minOccurs="0" type="xs:string"/>
         <xs:element name="StreetAddress1" minOccurs="0" type="xs:string"/>
         <xs:element name="StreetAddress2" minOccurs="0" type="xs:string"/>
         <xs:element name="SubleaseRights" minOccurs="0" type="xs:int"/>
         <xs:element name="UsId" minOccurs="0" type="xs:string"/>
         <xs:element name="XNGAltSiteId" minOccurs="0" type="xs:string"/>
         <xs:element name="Zip" minOccurs="0" type="xs:string"/>
         <xs:element name="ZipPLUS4" minOccurs="0" type="xs:string"/>
         <xs:element name="Contact" type="tns:Contact" minOccurs="0" maxOccurs="unbounded"/>
         <xs:element name="Market" type="tns:Market" minOccurs="0"/>
      </xs:sequence>
   </xs:complexType>
<!-- Type name: com.cingular.cingularCommonXmlSchema.Market-->
   <xs:element name="Market" type="tns:Market"/>
   <xs:complexType name="Market">
      <xs:sequence>
         <xs:element name="Market" minOccurs="0" type="xs:string"/>
         <xs:element name="MarketCluster" minOccurs="0" type="xs:string"/>
         <xs:element name="Region" minOccurs="0" type="xs:string"/>
      </xs:sequence>
   </xs:complexType>
<!-- Type name: com.cingular.cingularCommonXmlSchema.Project-->
   <xs:element name="Project" type="tns:Project"/>
   <xs:complexType name="Project">
      <xs:sequence>
         <xs:element name="M145ActualDate" minOccurs="0" type="xs:date"/>
         <xs:element name="M145ForecastDate" minOccurs="0" type="xs:date"/>
         <xs:element name="M150ActualDate" minOccurs="0" type="xs:date"/>
         <xs:element name="M150ForecastDate" minOccurs="0" type="xs:date"/>
         <xs:element name="M80ActualDate" minOccurs="0" type="xs:date"/>
         <xs:element name="M80ForecastDate" minOccurs="0" type="xs:date"/>
         <xs:element name="ProjectNumber" minOccurs="0" type="xs:string"/>
         <xs:element name="SearchringName" minOccurs="0" type="xs:string"/>
         <xs:element name="Location" type="tns:Location" minOccurs="0"/>
      </xs:sequence>
   </xs:complexType>
<!-- Type name: com.cingular.cingularCommonXmlSchema.RBS-->
   <xs:element name="RBS" type="tns:RBS"/>
   <xs:complexType name="RBS">
      <xs:sequence>
         <xs:element name="AffectedManagedObject" minOccurs="0" type="xs:string"/>
         <xs:element name="CTSSiteId" minOccurs="0" type="xs:string"/>
         <xs:element name="BaseStationType" minOccurs="0" type="xs:string"/>
         <xs:element name="BeastBSCName" minOccurs="0" type="xs:string"/>
         <xs:element name="BeastCellId" minOccurs="0" type="xs:string"/>
         <xs:element name="CellNetwork" minOccurs="0" type="xs:string"/>
         <xs:element name="CLLI3" minOccurs="0" type="xs:string"/>
         <xs:element name="CTSCellId" minOccurs="0" type="xs:string"/>
         <xs:element name="CTSSwitchName" minOccurs="0" type="xs:string"/>
         <xs:element name="DisasterRecoveryType" minOccurs="0" type="xs:string"/>
         <xs:element name="EquipmentType" minOccurs="0" type="xs:string"/>
         <xs:element name="Frequency" minOccurs="0" type="xs:string"/>
         <xs:element name="IntegrationActualCompletionDate" minOccurs="0" type="xs:date"/>
         <xs:element name="IntegrationDirectionType" minOccurs="0" type="xs:string"/>
         <xs:element name="IntegrationPlannedCompletionDate" minOccurs="0" type="xs:date"/>
         <xs:element name="IntegrationStartDate" minOccurs="0" type="xs:date"/>
         <xs:element name="IsActive" minOccurs="0" type="xs:int"/>
         <xs:element name="Name" minOccurs="0" type="xs:string"/>
         <xs:element name="OffAirDate" minOccurs="0" type="xs:date"/>
         <xs:element name="OnAirPublicDate" minOccurs="0" type="xs:date"/>
         <xs:element name="OPSDistrict" minOccurs="0" type="xs:string"/>
         <xs:element name="OPSZone" minOccurs="0" type="xs:string"/>
         <xs:element name="PromisSiteId" minOccurs="0" type="xs:string"/>
         <xs:element name="RBSId" minOccurs="0" type="xs:int"/>
         <xs:element name="RFDistrict" minOccurs="0" type="xs:string"/>
         <xs:element name="SiteType" minOccurs="0" type="xs:string"/>
         <xs:element name="TechnologyDefinitionType" minOccurs="0" type="xs:string"/>
         <xs:element name="TechnologyType" minOccurs="0" type="xs:string"/>
         <xs:element name="TeleserviceType" minOccurs="0" type="xs:string"/>
         <xs:element name="UsId" minOccurs="0" type="xs:string"/>
         <xs:element name="Vendor" minOccurs="0" type="xs:string"/>
         <xs:element name="Location" type="tns:Location" minOccurs="0"/>
         <xs:element name="Market" type="tns:Market" minOccurs="0"/>
      </xs:sequence>
   </xs:complexType>
<!-- Type name: com.cingular.cingularCommonXmlSchema.Sector-->
   <xs:element name="Sector" type="tns:Sector"/>
   <xs:complexType name="Sector">
      <xs:sequence>
         <xs:element name="AntennaAverageCellRadius" minOccurs="0" type="xs:double"/>
         <xs:element name="AntennaBeamWidth" minOccurs="0" type="xs:double"/>
         <xs:element name="AntennaBearing" minOccurs="0" type="xs:double"/>
         <xs:element name="AntennaEffectiveRadiatedPower" minOccurs="0" type="xs:double"/>
         <xs:element name="AntennaEffectiveRadiatedPowerUOM" minOccurs="0" type="xs:string"/>
         <xs:element name="AntennaForwardPower" minOccurs="0" type="xs:double"/>
         <xs:element name="AntennaRadiationCenter" minOccurs="0" type="xs:double"/>
         <xs:element name="AntennaTiltDegrees" minOccurs="0" type="xs:int"/>
         <xs:element name="AntennaTiltType" minOccurs="0" type="xs:string"/>
         <xs:element name="AntennaType" minOccurs="0" type="xs:string"/>
         <xs:element name="CellId" minOccurs="0" type="xs:string"/>
         <xs:element name="HardSector" minOccurs="0" type="xs:string"/>
         <xs:element name="IsActive" minOccurs="0" type="xs:int"/>
         <xs:element name="LocationAreaCode" minOccurs="0" type="xs:string"/>
         <xs:element name="OnAirDate" minOccurs="0" type="xs:date"/>
         <xs:element name="ParentId" minOccurs="0" type="xs:int"/>
         <xs:element name="ParentName" minOccurs="0" type="xs:string"/>
         <xs:element name="RBSId" minOccurs="0" type="xs:int"/>
         <xs:element name="RBSSId" minOccurs="0" type="xs:int"/>
         <xs:element name="SoftSector" minOccurs="0" type="xs:string"/>
         <xs:element name="UseId" minOccurs="0" type="xs:string"/>
         <xs:element name="Project" type="tns:Project" minOccurs="0"/>
         <xs:element name="RBS" type="tns:RBS" minOccurs="0"/>
      </xs:sequence>
   </xs:complexType>
<!-- Type name: com.cingular.cingularCommonXmlSchema.Tank-->
   <xs:element name="Tank" type="tns:Tank"/>
   <xs:complexType name="Tank">
      <xs:sequence>
         <xs:element name="TotalStorageCapacity" minOccurs="0" type="xs:double"/>
      </xs:sequence>
   </xs:complexType>
</xs:schema>Thanks
Vivek

Madhu,
You may:
1. Generate XML Document manually with DOM API
2. Use some complex lib like implementation of <a href="http://java.sun.com/webservices/jaxb/">JAXB</a> with ad-hoc control over format.
3. Use some simple library like <a href="http://xstream.codehaus.org/">XStream</a> with minimal format control.
Valery Silaev
EPAM Systems
http://www.NetWeaverTeam.com

Similar Messages

  • How to generate the User-Input XML Body for executing workflows via REST APIs: The Solution

    I see that executing a workflow via REST APIs requires lot of work to be done just to prepare the right User-input XML body. Any mistake and you have some major debugging to do. Larger the number of User-Inputs, the bigger is the problem.Life is so much easier at the WFA GUI with Display names and tooltip help for User Inputs which are very easy for reading and providing the right values. I don't have any such privileges when manually preparing the User-Input XML body.It’s been asked numerous times how to provide User-Input values for type table, or Query (Multi-Select) etc. These are complex User-Input types and has lots of scope for user mistakes.I can have User-input dependency at WFA GUI which allows me to make the right selection, but while preparing my XML body I need to take care of it myself.An operator is allowed to execute workflows, but the same Display names which help him make the right user-inputs, makes it impossible for him to prepare the user-input body xml. Display names can't be used in in XML body and he can't know the exact parameter names by looking at the Display names. So he need to always contact the Admins/Architects for this. And Architects/Admins can't be expected to keep providing User-Input XML body to operators every operator. How about if I could enter all the User-Input values in my workflow execution at WFA GUI, I can do a preview which passed to my satisfaction and then I can magically get the XML body for it which I can use to execute my workflow from REST APIs from any client. It could be so very much easy for me than building my User-Input XML body manually. This is exactly what I'm going to give you right now. You open the WFA in browser, Go to your workflow, Start execution, you input values from GUI reading carefully the display names, preview it to your satisfaction and then get the XML body. Assume your workflow is called “Workflow to Print a given Message”. It’s a simple workflow with only 1 user-input Displayed as "Message to Print" Prerequisites:  The following are the one-time prerequisites. You need PowerShell 3.0 on your WFA server.Import the attached Generate_Workflow_User_Input_Body_in_XML.dar in your WFA. It’s our magical command called "Generate Workflow User Input Body in XML"Add credentials of a WFA Admin/Architect in you WFA itself with Name/IP: localhostMatch: ExactType: OtherName/IP: localhostUsername: <WFA Admin/Architect Username>Password: <User Password>   Steps: Suppose you have a workflow called "Workflow to Print a given Message". You want to execute it from REST apis and need to prepare the user input XML body.  Select this workflow and clone it. The workflow clone is the exact copy of your original workflow word by word, input-by-input. It will open in Edit mode with name "Workflow to Print a given Message - copy".Add the command "Generate Workflow User Input Body in XML" at the beginning of your workflow. This is a must. This command need to be the first command in your cloned workflow.This command requires no input. So for its Parameters just press okay and save the workflow.You are done.Now Execute the clone workflow. You'll see all the user-inputs available to you. Make your choices as you wish. Preview it to confirm that planning is passed and u have no errors.Execute it now.You'll see that the our magical command "Generate Workflow User Input Body in XML" has failed in our clone workflow execution. Don't worry, its fate was decided to be so. But it didn't fail before giving me what I really wanted. i.e. my XML body for my real workflow. It displayed it in the GUI as well as saved it in your WFA server @ C:\temp\<workflow_name_dd_MM_yyyy_hh_mm_ss_.xmlIt also deleted all the reservations of this particular failed job. So NO major residue left to be cleaned.To summarize: Clone Your workflow and Add the command "Generate Workflow User Input Body in XML" as your first command.    Start Execution, provide your User-inputs and preview it. Be satisfied and Press Okay.   Now Execute it.  After a few scconds this cloned workflow will fail with Error "All done. The Workflow will fail now."     See the command execution logs for this command. You'll see the User-Input XML body. It has also saved the XML file at C:\temp in your WFA server.   Have fun. sinhaa  

    Providing a new version 1.1.0 of the command "WFA Schedular" Changes made: Added conditional String Representation based on the Scheduling parameter provided. Provided check for the right number of parameters passed into the command.Added a new parameter "Expiry Date" to automatically stop the recurring execution upon expiry.Check for Posh3.0 version in code.Have Fun!! sinhaa Below example for:Schedule a workflow for recurring execution every alternate day i.e. once in 2 days at 10:30 PM starting 06-Jul-2015 (Today's date is 02-Jul-2015) . The recurring workflow execution  should expire on 31-Dec-2015 and stop.  

  • Generate dummy XML for an empty input text file

    Hi All,
    i know when XI gets an empty input text file, it does not generate a send message for it in sender communication channel.
    in my scenario, if i get a file with data, i have to generate an XML message for it using file content conversion - this i have done...........
    but if i get an empty text file, then i have to generate a dummy XML send message for it for my BPM.......
    <b>Has anybody generated a dummy XML message for an empty input file........please respond only if you have practically generated a XML message in SXMB_MONI for an empty input text file.</b>
    Thanks,
    Rajeev Gupta

    Hi All,
    i made a J2EE adapter module to generate dummy xml for empty file.....but when i give a file with data in it, then my adapter module is called..... but when i give an empty file, then my adapter module is not called.........
    so if somebody has practically generated a dummy XML for an empty file by any method, please tell.
    Thanks,
    Rajeev Gupta

  • Using a variable value in CDATA for generating an XML type in Oracle

    Hello,
    I have prepared a function given below where I have some input variables & I have to generate one XML with those input variables as tag attribute value:
    create or replace function NEW_PROJECT_DETAILS
    ( p_ReferenceId in varchar2 ,
    p_Project_No in varchar2,
    p_Project_Name in varchar2,
    p_Project_Desc in varchar2 ,
    p_Project_Type in varchar2,
    p_Project_Location in varchar2,
    p_Project_Status in varchar2 )
    return xmltype
    as
    payload xmltype;
    begin
    dbms_output.put_line('Payload Started');
    payload:= xmltype('<?xml version="1.0" encoding="UTF-8"?>
    <ProjectDetails>
    <RefID>'||p_ReferenceId||'</RefID>
    <ProjectNo>'||p_Project_No||'</ProjectNo>
    <ProjectName>'||p_Project_Name||'</ProjectName>
    <ProjectDesc>'||p_Project_Desc||'</ProjectDesc>
    <ProjectType>'||p_Project_Type||'</ProjectType>
    <ProjectLocation><![CDATA[p_Project_Location]]></ProjectLocation>
    /* <ProjectLocation>'||p_Project_Location||'</ProjectLocation> */
    <ProjectStatus>'||p_Project_Status||'</ProjectStatus>
    </ProjectDetails>');
    dbms_output.put_line('Payload Comp1');
    return payload;
    end;
    This procedure works absolutely fine.
    Now the problem which I am having is that the variable p_Project_Location has value like "6747:BBO&M SBV".
    Due to the '*&*' in that value I have to use CDATA. But i dont know how to pass this variable directly in the CDATA in the XML.
    Please help me with this asap.
    Thanks & Regards,
    Divya Aggarwal
    Edited by: 784414 on Dec 2, 2010 4:15 AM
    Edited by: 784414 on Dec 2, 2010 4:16 AM

    Hi,
    If you absolutely want to use a CDATA section, then :
    payload:= xmltype('<?xml version="1.0" encoding="UTF-8"?>
    <ProjectDetails>
    <RefID>'||p_ReferenceId||'</RefID>
    <ProjectNo>'||p_Project_No||'</ProjectNo>
    <ProjectName>'||p_Project_Name||'</ProjectName>
    <ProjectDesc>'||p_Project_Desc||'</ProjectDesc>
    <ProjectType>'||p_Project_Type||'</ProjectType>
    <ProjectLocation><![CDATA['||p_Project_Location||']]></ProjectLocation>
    <ProjectStatus>'||p_Project_Status||'</ProjectStatus>
    </ProjectDetails>');Alternatively, you can escape non valid characters with DBMS_XMLGEN.CONVERT, e.g. :
    payload:= xmltype('<?xml version="1.0" encoding="UTF-8"?>
    <ProjectDetails>
    <RefID>'||p_ReferenceId||'</RefID>
    <ProjectNo>'||p_Project_No||'</ProjectNo>
    <ProjectName>'||p_Project_Name||'</ProjectName>
    <ProjectDesc>'||p_Project_Desc||'</ProjectDesc>
    <ProjectType>'||p_Project_Type||'</ProjectType>
    <ProjectLocation>'||dbms_xmlgen.convert(p_Project_Location)||'</ProjectLocation>
    <ProjectStatus>'||p_Project_Status||'</ProjectStatus>
    </ProjectDetails>');which outputs :
    <?xml version="1.0" encoding="UTF-8"?>
    <ProjectDetails>
    <RefID>1</RefID>
    <ProjectNo>1</ProjectNo>
    <ProjectName>PRJ1</ProjectName>
    <ProjectDesc>This is project 1</ProjectDesc>
    <ProjectType>P</ProjectType>
    <ProjectLocation>6747:BBO&amp;M SBV</ProjectLocation>
    <ProjectStatus>S</ProjectStatus>
    </ProjectDetails>Any basic XML parser should then convert back escaped characters when processing the document.
    You can also use SQL/XML functions, which will take care of that automatically.
    For example :
    SELECT appendChildXML(
            XMLType('<?xml version="1.0" encoding="UTF-8"?><ProjectDetails/>'),
            XMLForest(
             '1'                 as "RefID",
             '1'                 as "ProjectNo",
             'PRJ1'              as "ProjectName",
             'This is project 1' as "ProjectDesc",
             'P'                 as "ProjectType",
             '6747:BBO&M SBV'    as "ProjectLocation",
             'S'                 as "ProjectStatus"
    FROM dual;or,
    SELECT appendChildXML(
            XMLType('<?xml version="1.0" encoding="UTF-8"?><ProjectDetails/>'),
            XMLForest(
             '1'                 as "RefID",
             '1'                 as "ProjectNo",
             'PRJ1'              as "ProjectName",
             'This is project 1' as "ProjectDesc",
             'P'                 as "ProjectType",
             XMLCData('6747:BBO&M SBV') as "ProjectLocation",
             'S'                 as "ProjectStatus"
    FROM dual;

  • Unable to generate the XML file through SQL script. getting error PLS-00306

    I am fetching the data from cursor and generating the xml output I am getting the below error.
    When I have checked the cursor query it is fetching the data in to single column.
    Input truncated to 1 characters
    Enter value for 7: EXEC FND_CONC_STAT.COLLECT;
    DBMS_LOB.append (tmp_file, r.core_xml);
    ERROR at line 95:
    ORA-06550: line 95, column 7:
    PLS-00306: wrong number or types of arguments in call to 'APPEND'
    ORA-06550: line 95, column 7:
    PL/SQL: Statement ignored

    Hi Alex,
    thanks for the responce..
    i have fixed the issue
    i have used XMLAttributes to get the value
    SELECT XMLELEMENT (
    NAME "TranACK",
    XMLAttributes ('1' as "TranNum",
    (select distinct to_char(SYSDATE,'yyyy-mm-dd')
    from DUAL) as "PrcDate"),
    XMLFOREST (
    a.PAYMENT_ID AS "PmtID"),
    XMLFOREST (
    a.ACK_TRANSACTION_RECEIVER AS "Name1"),
    XMLFOREST (
    to_char(a.VALUE_DATE,'yyyy-mm-dd') as "ValueDate" ),
    XMLFOREST (
    a.PAYMENT_AMOUNT AS "CurAmt"),
    XMLFOREST (
    a.CURRENCY_CODE AS "CurCode")
    ).getclobval ()
    AS line_xml
    FROM XXWAP_PAYMENT_LINE_TBL a
    where a.PAYMENT_BATCH_ID=P_batch_id;

  • Re: Describe input xml

    Anamitra,
    I didn't get a chance to work on this issue.
    From my understanding I have quickly created a test wsdl and test xsd.
    I don't know whether it will work. I have not tested it. It needs many
    corrections.
    Take a look at the attached wsdl and xsd and let me know your suggestion.
    Scenario:
    1. Exposed method:
    public String requestPurchaseOrder(String poXML)
    2. poXML should be of type po.xsd
    3. Validation - ?? No Idea. For now manual validation.
    I guess we both have similar requirement, if you get it working before me,
    please post your finding.
    Thanks,
    Karthik.
    "Anamitra" <[email protected]> wrote in message
    news:[email protected]...
    >
    Hi karthik
    I still dont get how the poXML can be represented by a schema in a WSDL.Can you
    give me a sample wsdl for that?
    Thanks
    Anamitra
    "Karthik V" <[email protected]> wrote:
    Manoj:
    Sorry, I got confused when you said, "the runtime will strip the xml
    tags".
    After your explanation, I understand that the runtime is actually going
    to
    perform some conversion without any loss of data.
    To conclude, logically,
    public void test(String poXML) is valid, and poXML can be represented
    by
    a schema definition.
    When I get a chance, I'm going to create a quick example of this use
    case
    and post it.
    Thanks,
    /k
    "manoj cheenath" <[email protected]> wrote in message
    news:[email protected]...
    java.lang.String is mapped to xsd:string which means the xml
    should look like:
    <foo xsi:type=xsd:string >sometext without any xml tags</foo>
    So if there are xml tags inside the string you passed
    in, runtime need to replace the tags with > and
    <.
    On the other end the runtime will again replace
    etc back to < or >. So you will get back theright XML. But on the wire it will be plain text
    not XML.
    So, if you dont want to convert to string, then you should use
    javax.xml.soap.SOAPElement or org.w3c.Element as
    your parameter type instead of java.lang.String.
    http://manojc.com
    "Karthik V" <[email protected]> wrote in message
    news:[email protected]...
    Manoj:
    I do not understand how the runtime will strip the xml.
    I think Anamitra's requirement of:
    public void test(String poXML)
    is very valid and a simple requirement.
    Infact, my requirement too is similar..
    1. Expose a method which takes in a String object.
    2. Define how the String is going to look like (using xsd).
    3. Instead of defining the schema in WSDL, we would like to import
    the
    schema and use it.
    4. Later use the schema to validate the incoming request.
    In real time most of us would like to work with String because ofits
    simplicity.
    Is there any reason why the implementation for such a simple usecase is
    so
    confusing?
    /k
    "manoj cheenath" <[email protected]> wrote in message
    news:[email protected]...
    public void test( String poXML )
    is not the best solution for you, i think, because
    in this case the runtime will strip the xml tags
    inside poXML. so the envelope will look like:
    <m:my-method>
    <poXML>sdfjds >some thing < something else...</poXML>
    </m:my-method>
    instead of:
    <m:my-method>
    <poXML>some thing <foo> something else</foo></poXML>
    </m:my-method>
    Will that be ok for you? Else, you can use DOM or
    javax.xml.soap.SOAPElement:
    public void test( org.w3c.Dom poXML );
    It looks like there is bug in WLS 7.0.2. The CR for this
    is CR104719. Please contact support if you need a patch.
    If you do clientgen on the WSDL, it is going to generate
    the classes (value types) for you. It looks like you do not
    want to do data binding. Take a look at DII client with generic
    type-mapping. Will this help you?
    package examples.jaxrpc.call5;
    import java.net.URL;
    import javax.xml.soap.SOAPConstants;
    import javax.xml.rpc.ServiceFactory;
    import javax.xml.rpc.Service;
    import javax.xml.rpc.Call;
    import javax.xml.rpc.ParameterMode;
    import javax.xml.namespace.QName;
    import javax.xml.rpc.encoding.TypeMapping;
    import javax.xml.rpc.encoding.TypeMappingRegistry;
    import javax.xml.soap.SOAPElement;
    import weblogic.webservice.encoding.GenericTypeMapping;
    import weblogic.webservice.core.soap.SOAPElementImpl;
    public class MSInterop{
    public static void main( String[] args ) throws Exception{
    //dont parse wsdl till we set the typemapping
    System.setProperty( "weblogic.webservice.servicenamechecking",
    "false" );
    //create service factory
    ServiceFactory factory = ServiceFactory.newInstance();
    //define qnames
    String targetNamespace = "http://soapinterop.org/";
    QName serviceName = new QName( targetNamespace, "SimpleTest"
    QName portName = new QName( targetNamespace, "SimpleTestSoap");
    QName operationName = new QName( "http://soapinterop.org/",
    "echoStruct" );
    URL wsdlLocation = new URL(
    "http://www.mssoapinterop.org/asmx/simple.asmx?WSDL" );
    //create service
    Service service = factory.createService( wsdlLocation,serviceName );
    TypeMappingRegistry registry =
    service.getTypeMappingRegistry();
    >>>>>
    registry.register( SOAPConstants.URI_NS_SOAP_ENCODING,
    new GenericTypeMapping() );
    //create call
    Call call = service.createCall( portName, operationName );
    //construct struct
    SOAPElement elem = new SOAPElementImpl( "inputStruct", null,null );
    elem.addChildElement( "varInt" ).addTextNode( "1" );
    elem.addChildElement( "varString" ).addTextNode( "samplestring" );
    elem.addChildElement( "varFloat" ).addTextNode( "2.2" );
    System.out.println( elem );
    try{
    SOAPElement res = (SOAPElement)call.invoke(new Object[]{elem } );
    System.out.println( res );
    }catch( javax.xml.rpc.JAXRPCException e ){
    e.printStackTrace();
    e.getLinkedCause().printStackTrace();
    Call echoFloat = service.createCall( portName,
    new QName( "http://soapinterop.org/", "echoFloat" ) );
    System.out.println( echoFloat.invoke( new Object[]{new
    Float(100.0)} ) );
    http://manojc.com
    "Anamitra" <[email protected]> wrote in message
    news:[email protected]...
    Hi Bruce
    I think the wsdl that you sent was very near to what I was
    looking
    for.
    But I
    would try to make the requirement more clear: The points below
    are
    listed
    in order
    of priority:
    1>First and foremost I am looking to create a Webservice such
    that
    it
    exposes
    a method which takes in a java.lang.String
    public void test(String poXML)
    But in the WSDL I want to show the user the schema definition
    for
    the
    po
    XML.
    And would desire that the Webservices framework do the schema
    validation
    of the
    incoming xml. But I dont thing this works as the wsdl generated
    always
    says the
    type is "xsd:string". So I started looking into the 2nd option:
    2>Create a doc/literal type service and expose that method as:
    public void test(POXMLBean poXML)
    This generated the reqd schema in the wsdl level but the client
    is
    being
    forced
    to use the POXMLBean to invoke the method. I would ideally want
    the
    client
    to
    just deal with the XML of the pobean as described in the
    generated
    schema
    definition.
    For example the client using JAXRPC should be say doing the code
    like
    this:
    String poXML = "<po> <order>000</order> </po>"
    call.invoke(poXML").
    Is this possible? I am not able to do this. My primary important
    thing
    is
    that
    the client has to deal with XML and not with anything else. The
    client
    shouldnot
    have to deal with POXMLBean. This is what I am trying to acheive
    and
    not
    able
    to.
    3> So that leaves me to the last option which is not that good:
    ie I keep my original approach:
    public void test(String poXML)
    and somehow via wsdl:documentation say that the schema for this
    poXML
    is
    this...
    But I cannot change the type in the parameter poXML from
    xs:string
    right?
    Bottom line is there any way for the client to pass string/byte[]
    xml
    data
    to
    the webservice - but still be able to look into the WSDL and
    see
    what
    the
    reqd
    XML structure should be? I thought doc/literal should do it -
    but
    using
    weblogic
    I am not able to do it. Can u help me with this pls.
    thanks
    Anamitra
    Bruce Stephens <[email protected]> wrote:
    Hello,
    See what you think of this example of using import. It seems
    to
    describe your exact use case:
    http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Retai
    l
    er.wsdl
    (Disclaimer, anyone could have found this via public UDDI.)
    The issue I believe that Anamitra sees is the gap between the
    runtime
    and the toolset.
    Bruce
    Anamitra wrote:
    Hi Karthik
    I am a bit confused as to what you mean when u say "import".
    The
    generated
    webservices.xml
    contains a <types> and a <type-mapping> element. I suppose
    u r
    asking
    me to put
    the xsd definition in the <types> section - right?
    If the method is like this:
    public String doit(String msg)
    How do I attach the <xs:string> type "msg" to the actual
    XML
    schema
    that I just
    imported?
    I dont know whether I am asking stupid questions or not -
    but I
    would
    have ideall
    liked to see my "msg" of type say "PurchaseOrder" which is
    the
    schema
    that I imported.
    And the external client should just be able to give the
    "PurchaseOrder"
    xml to
    the Webservice and invoke the "doit" method.
    Am I making any sense?
    thanks
    Anamitra
    "Karthik V" <[email protected]> wrote:
    I doubt if servicegen has any option for doing it
    automatically.
    You should manually edit web-services.xml and import thexsd.
    /k
    "Anamitra" <[email protected]> wrote in message
    news:[email protected]...
    Hi Karthik/Bruce
    Can you pls explain to me how using weblogic tools
    [servicegen]
    one
    can
    include
    the xsd pointers in the WSDL file.
    We have a similar kind of requirement where we have
    webservices
    which
    take
    in
    string [XML data] as a parameter and the WSDL only shows
    method
    parameter
    types
    as xsd:string - but we want to show something like a schema
    definition.
    So
    if
    there is anyway to put the schema definition in the WSDL
    - pls
    let
    me know
    that
    would be very very helpful.
    thanks
    Anamitra
    "Karthik V" <[email protected]> wrote:
    Bruce,
    Thanks for your response. That helped.
    I have another question for you.
    I know this would sound strange.
    But my requirement is to expose a session bean method
    that
    could
    take
    different xml inputs.
    For example:
    TestBean exposes testMethod(String xmlstr)
    xmlstr could be of schema xmlSchema1.xsd
    or xmlstr could be of schema xmlSchema2.xsd
    In future it could also represent xmlSchema3.xsd... and
    so
    on.
    What is the right approach in this scenario?
    I was thinking to create a different web service fordifferent
    xsd.
    Say, webservice1 imports xmlSchema1.xsd, webservice2
    imports
    xmlSchema2.xsd...
    Un fortunately due to some design restrictions, I cannotcreate
    different
    methods in my session bean like testMethod1,
    testMethod2....
    Is there any other better way to do this in one webservice?
    >>>>>>>>>>>
    Thanks in advance for any suggestions. And excuse myunusual
    requirement.
    /k
    "Bruce Stephens" <[email protected]> wrote in message
    news:[email protected]...
    Hello,
    Personally I like to see everything in one place, i.e.
    in
    the
    WSDL,
    however everyone else :-) uses the import. The
    SOAPBuilders
    round
    3
    have several tests showing imports. Also WSI Basic
    profile
    has
    some
    helpful guidelines on using import:
    http://www.ws-i.org/Profiles/Basic/2003-03/BasicProfile-1.0-BdAD.html
    >>>>>>>>>>>>
    HTHs,
    Bruce
    Karthik V wrote:
    Hi,
    I have created few doc style web services, with a
    very
    complex
    xml
    input
    and
    output. (1200 lines of xsd)
    Input and out put are xml as java.lang.String.
    What would be the best practice to represent this
    in the
    WSDL?
    Just
    a
    reference to the xsd file is good, or should it be
    completely
    presented
    within the WSDL? I'm not sure how my wsdl should look
    like...
    I will be using the same schema (xsd) in other web
    services
    too
    to
    perform
    different functions.
    Any suggestions would be greatly appreciated.
    Thanks
    /k
    [testWSDL.wsdl]
    [PO.xsd]

    Hello Karthik/Anamitra,
    i have the same requirements in my webservices:
    1) Expose the Handler method receiving String
    public String runRequest(String poXML)
    2) On the other hand - the message (the poXML string) should be in XML format according to some XSD file.
    Have you got this working already?
    If so, please explain what the WSDL looks like.
    Thanks in advance,
    Orly

  • FODC0002 [{bea-err}FODC0002a]: Error parsing input XML: Error at line:2 col

    I have an ODSI Physical Service that is based on a Java Function. The Java Function builds a SQL statement and uses JDBC to query for a ResultSet. One of the columns that is queried is a Clob. Sometimes, the data in this column causes an XMLBeans validation exception in ODSI: {err}XQ0027: Validation failed: error: decimal: Invalid decimal value: unexpected char '114'
    The issue is not consistently replicable with particular database record, the database records that present this issue at one point in time will be resolved after a restart of ODSI and replaced by another list of records that present the same error.
    As can be seen from the stack trace, it looks like the issue is happening after the database query has returned and while the process is assembling the SOAP response.
    Error at line:2 col:481 Line:2 '=' expected, got char[99]
    at weblogic.xml.babel.scanner.ScannerState.expect(ScannerState.java:241)
    at weblogic.xml.babel.scanner.OpenTag.read(OpenTag.java:60)
    at weblogic.xml.babel.scanner.Scanner.startState(Scanner.java:251)
    at weblogic.xml.babel.scanner.Scanner.scan(Scanner.java:178)
    at weblogic.xml.babel.baseparser.BaseParser.accept(BaseParser.java:533)
    at weblogic.xml.babel.baseparser.BaseParser.accept(BaseParser.java:510)
    at weblogic.xml.babel.baseparser.EndElement.parse(EndElement.java:34)
    at weblogic.xml.babel.baseparser.BaseParser.parseElement(BaseParser.java:457)
    at weblogic.xml.babel.baseparser.BaseParser.parseSome(BaseParser.java:326)
    at weblogic.xml.stax.XMLStreamReaderBase.advance(XMLStreamReaderBase.java:195)
    at weblogic.xml.stax.XMLStreamReaderBase.next(XMLStreamReaderBase.java:237)
    at weblogic.xml.stax.XMLEventReaderBase.parseSome(XMLEventReaderBase.java:189)
    at weblogic.xml.stax.XMLEventReaderBase.nextEvent(XMLEventReaderBase.java:122)
    at weblogic.xml.query.parsers.StAXEventAdaptor.queueNextTokens(StAXEventAdaptor.java:136)
    at weblogic.xml.query.parsers.StAXEventAdaptor.queueNextTokens(StAXEventAdaptor.java:124)
    at weblogic.xml.query.parsers.BufferedParser.fetchNext(BufferedParser.java:79)
    at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
    at weblogic.xml.query.runtime.navigation.ChildPath.fetchNext(ChildPath.java:308)
    at weblogic.xml.query.iterators.GenericIterator.hasNext(GenericIterator.java:133)
    at weblogic.xml.query.schema.BestEffortValidatingIterator$OpenedIterator.hasNext(BestEffortValidatingIterator.java:224)
    at weblogic.xml.query.schema.ValidatingIterator.fetchNext(ValidatingIterator.java:82)
    at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
    at weblogic.xml.query.xdbc.iterators.ItemIterator.fetchNext(ItemIterator.java:86)
    at weblogic.xml.query.iterators.LegacyGenericIterator.next(LegacyGenericIterator.java:109)
    at weblogic.xml.query.schema.BestEffortValidatingIterator.fetchNext(BestEffortValidatingIterator.java:85)
    at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
    at weblogic.xml.query.xdbc.iterators.ItemIterator.fetchNext(ItemIterator.java:86)
    at weblogic.xml.query.iterators.LegacyGenericIterator.next(LegacyGenericIterator.java:109)
    at weblogic.xml.query.runtime.typing.SeqTypeMatching.fetchNext(SeqTypeMatching.java:137)
    at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
    at com.bea.dsp.wrappers.jf.JavaFunctionIterator.fetchNext(JavaFunctionIterator.java:273)
    at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
    at weblogic.xml.query.runtime.querycide.QueryAssassin.fetchNext(QueryAssassin.java:54)
    at weblogic.xml.query.iterators.GenericIterator.peekNext(GenericIterator.java:163)
    at weblogic.xml.query.runtime.qname.InsertNamespaces.fetchNext(InsertNamespaces.java:247)
    at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
    at weblogic.xml.query.runtime.core.ExecutionWrapper.fetchNext(ExecutionWrapper.java:88)
    at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
    at weblogic.xml.query.xdbc.iterators.ItemIterator.fetchNext(ItemIterator.java:86)
    at weblogic.xml.query.iterators.LegacyGenericIterator.hasNext(LegacyGenericIterator.java:130)
    at weblogic.xml.query.xdbc.util.Serializer.serializeItems(Serializer.java:251)
    at com.bea.ld.server.ResultPusher$DSP25CompatibilityPusher.next(ResultPusher.java:236)
    at com.bea.ld.server.ResultPusher.pushResults(ResultPusher.java:112)
    at com.bea.ld.server.XQueryInvocation.execute(XQueryInvocation.java:770)
    at com.bea.ld.EJBRequestHandler.invokeQueryInternal(EJBRequestHandler.java:624)
    at com.bea.ld.EJBRequestHandler.invokeOperationInternal(EJBRequestHandler.java:478)
    at com.bea.ld.EJBRequestHandler.invokeOperation(EJBRequestHandler.java:323)
    at com.bea.ld.ServerWrapperBean.invoke(ServerWrapperBean.java:153)
    at com.bea.ld.ServerWrapperBean.invokeOperation(ServerWrapperBean.java:80)
    at com.bea.ld.ServerWrapper_s9smk0_ELOImpl.invokeOperation(ServerWrapper_s9smk0_ELOImpl.java:63)
    at com.bea.dsp.ws.RoutingHandler$PriviledgedRunner.run(RoutingHandler.java:96)
    at com.bea.dsp.ws.RoutingHandler.handleResponse(RoutingHandler.java:217)
    at weblogic.wsee.handler.HandlerIterator.handleResponse(HandlerIterator.java:287)
    at weblogic.wsee.handler.HandlerIterator.handleResponse(HandlerIterator.java:271)
    at weblogic.wsee.ws.dispatch.server.ServerDispatcher.dispatch(ServerDispatcher.java:176)
    at weblogic.wsee.ws.WsSkel.invoke(WsSkel.java:80)
    at weblogic.wsee.server.servlet.SoapProcessor.handlePost(SoapProcessor.java:66)
    at weblogic.wsee.server.servlet.SoapProcessor.process(SoapProcessor.java:44)
    at weblogic.wsee.server.servlet.BaseWSServlet$AuthorizedInvoke.run(BaseWSServlet.java:285)
    at weblogic.wsee.server.servlet.BaseWSServlet.service(BaseWSServlet.java:169)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3498)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(Unknown Source)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    <Apr 29, 2011 12:47:01 PM EDT> <Notice> <ODSI> <BEA-000000> <LabOrderDataServices> <Error occurred performing ODSI operation: {ld:LabOrder/logical/LabOrderReport}getLabOrderDetails:1
    weblogic.xml.query.exceptions.XQueryDynamicException: ld:LabOrder/logical/LabOrderReport.ds, line 34, column 6: {err}FODC0002 [{bea-err}FODC0002a]: Error parsing input XML: Error at line:2 col:481 Line:2 '=' expected, got char[99]
    at weblogic.xml.query.iterators.AbstractIterator.reportUserError(AbstractIterator.java:95)
    at weblogic.xml.query.iterators.AbstractIterator.reportUserError(AbstractIterator.java:147)
    at weblogic.xml.query.parsers.Parser.reportParseError(Parser.java:157)
    at weblogic.xml.query.parsers.StAXEventAdaptor.queueNextTokens(StAXEventAdaptor.java:225)
    at weblogic.xml.query.parsers.StAXEventAdaptor.queueNextTokens(StAXEventAdaptor.java:124)
    Truncated. see log file for complete stacktrace
    javax.xml.stream.XMLStreamException: Error at line:2 col:481 Line:2 '=' expected, got char[99]
    at weblogic.xml.stax.XMLStreamReaderBase.advance(XMLStreamReaderBase.java:206)
    at weblogic.xml.stax.XMLStreamReaderBase.next(XMLStreamReaderBase.java:237)
    at weblogic.xml.stax.XMLEventReaderBase.parseSome(XMLEventReaderBase.java:189)
    at weblogic.xml.stax.XMLEventReaderBase.nextEvent(XMLEventReaderBase.java:122)
    at weblogic.xml.query.parsers.StAXEventAdaptor.queueNextTokens(StAXEventAdaptor.java:136)
    Truncated. see log file for complete stacktrace
    Error at line:2 col:481 Line:2 '=' expected, got char[99]
    at weblogic.xml.babel.scanner.ScannerState.expect(ScannerState.java:241)
    at weblogic.xml.babel.scanner.OpenTag.read(OpenTag.java:60)
    at weblogic.xml.babel.scanner.Scanner.startState(Scanner.java:251)
    at weblogic.xml.babel.scanner.Scanner.scan(Scanner.java:178)
    at weblogic.xml.babel.baseparser.BaseParser.accept(BaseParser.java:533)
    Truncated. see log file for complete stacktrace
    >
    Can somebody shed some light on this issue?
    Thanks
    Edited by: user738507 on May 6, 2011 7:21 AM

    Here is the java function:
         * Iterate through the search results and build out the XmlBean response
         * @param helper A helper class used to simplify common JDBC commands
         * @param doc The XmlBean document to populate
         * @param isCollectionsIncluded True if Collection info should be included in results, False otherwise
         * @param isFullDetailsIncluded True if Result data should be included in results, False otherwise
         * @throws Exception
         private static void addOrders(XmlBeansJDBCHelper helper, LabOrderReportDocument doc,
                   boolean isCollectionsIncluded, boolean isFullDetailsIncluded) throws Exception {
              int rows = 0;
              ResultSet rs = helper.getResultSet();
              LabOrders labOrders = doc.getLabOrderReport().addNewLabOrders();
              LabOrder record = null;
              HashMap<Long, Collection> parentCollectionMap = null;
              // initialize variable used to track when child elements of the XML should be created
              long previousRowOrderId = 0;
              long previousRowParentOrderCollectionId = 0;
              long previousRowOrderCollectionId = 0;
              long previousRowResultId = 0;
              boolean isRootCollectionNode = false;
              LabOrder.Collections lastParentOuterCollectionsAdded = null;
              com.idexx.services.lde.laborder.Collection.Collections lastParentInnerCollectionsAdded = null;
              com.idexx.services.lde.laborder.Collection lastCollectionAdded = null;
              Result lastResultAdded = null;
              // Loop through the results and build XmlBean nodes for each row
              // Since the SQL is joining Orders to Collections (one-to-many) to Results (one-to-many),
              // and returning a flat structure, there will be duplicate Order data on each row when
              // multiple collections exist on the Order, and duplicate Collection data when multiple
              // Results exist. We can use this fact to determine when to create a new Collection, or
              // Result node.
              while (helper.getResultSet().next())
                   rows++;
                   long currentRowParentOrderCollectionId = 0;
                   long currentRowOrderCollectionId = 0;
                   long currentRowResultId = 0;
                   long currentRowResultRemarkId = 0;
                   //int rowno = helper.getResultSet().getRow();
                   // Get the Order ID
                   logDebug("Getting the OrderId.....");
                   BigInteger dbOrderId = JDBCHelper.getBigInteger(rs, DataConstants.ORDER_ID);
                   logDebug("DONE getting the OrderId.");
                   long currentRowOrderId = dbOrderId.longValue();
                   // Determine the Order ID, Order Collection ID, and Result ID currently being processed.
                   // These will be used to determine whether to start a new LabOrder Bean, Collections Bean, or Results Bean
                   if (isCollectionsIncluded || isFullDetailsIncluded) {
                        // Get the ParentOrderCollectionID
                        logDebug("Getting the Parent Collection Order ID.....");
                        BigInteger dbParentOrderCollectionId = JDBCHelper.getBigInteger(rs, DataConstants.PARENT_ORDER_COLLECTION_ID);
                        if ( dbParentOrderCollectionId != null )
                             currentRowParentOrderCollectionId = dbParentOrderCollectionId.longValue();
                        else
                             currentRowParentOrderCollectionId = 0;
                        // Get the OrderCollectionID
                        logDebug("Getting the Order Collection ID.....");
                        BigInteger dbOrderCollectionId = JDBCHelper.getBigInteger(rs, DataConstants.ORDER_COLLECTION_ID);
                        if ( dbOrderCollectionId != null )
                             currentRowOrderCollectionId = dbOrderCollectionId.longValue();
                        else
                             currentRowOrderCollectionId = 0;
                        if ( isFullDetailsIncluded ) {
                             // Get the ResultID
                             logDebug("Getting the Result Id.....");
                             BigInteger dbResultId = JDBCHelper.getBigInteger(rs, DataConstants.RESULT_ID);
                             if ( dbResultId != null )
                                  currentRowResultId = dbResultId.longValue();
                             else
                                  currentRowResultId = 0;
                             // Get the ResultRemarkID
                             BigInteger dbResultRemarkId = JDBCHelper.getBigInteger(rs, DataConstants.RESULT_REMARK_ID);
                             if ( dbResultRemarkId != null )
                                  currentRowResultRemarkId = dbResultRemarkId.longValue();
                             else
                                  currentRowResultRemarkId = 0;
                   isRootCollectionNode = (currentRowParentOrderCollectionId == 0);
                   logDebug("currentRowOrderId: " + currentRowOrderId);
                   logDebug("previousRowOrderId: " + previousRowOrderId);
                   logDebug("currentRowResultId: " + currentRowResultId);
                   logDebug("previousRowResultId: " + previousRowResultId);
                   logDebug("currentRowResultRemarkId: " + currentRowResultRemarkId);
                   logDebug("previousRowResultRemarkId: N/A");
                   logDebug("currentRowParentOrderCollectionId: " + currentRowParentOrderCollectionId);
                   logDebug("previousRowParentOrderCollectionId: " + previousRowParentOrderCollectionId);
                   logDebug("currentRowOrderCollectionId: " + currentRowOrderCollectionId);
                   logDebug("previousRowOrderCollectionId: " + previousRowOrderCollectionId);
                   if ( currentRowOrderId != previousRowOrderId ) {
                        parentCollectionMap = new HashMap<Long, Collection>();
                        lastParentOuterCollectionsAdded = null;
                        lastParentInnerCollectionsAdded = null;
                        lastCollectionAdded = null;
                        lastResultAdded = null;
                        // This is a new Order, generate a new Lab Order bean
                        record = addOrder(labOrders, helper, dbOrderId, isFullDetailsIncluded);
                        logDebug("Order Added!");
                        // If there is Parent Collection data and it should be included, build a Collections element,
                        // and populate the first one
                        if ( !isRootCollectionNode && (isCollectionsIncluded || isFullDetailsIncluded) ) {
                             lastParentOuterCollectionsAdded = record.addNewCollections();
                             lastCollectionAdded = addCollection(record, helper, lastParentOuterCollectionsAdded, true);
                             logDebug("Collection Added! Is it null? " + (lastCollectionAdded == null));
                        // If there is Collection data and it should be included, build a Collections element,
                        // and populate the first one
                        if ( currentRowOrderCollectionId > 0 && (isCollectionsIncluded || isFullDetailsIncluded) ) {
                             if ( isRootCollectionNode ) {
                                  lastParentOuterCollectionsAdded = record.addNewCollections();
                                  lastCollectionAdded = addCollection(record, helper, lastParentOuterCollectionsAdded, false);
                                  parentCollectionMap.put(new Long(currentRowOrderCollectionId), lastCollectionAdded);
                                  logDebug("parent collection added to map: " + currentRowOrderCollectionId);
                             else {
                                  lastParentInnerCollectionsAdded = lastCollectionAdded.addNewCollections();
                                  lastCollectionAdded = addCollection(record, helper, lastParentInnerCollectionsAdded, false);
                             logDebug("Collection Added! Is it null? " + (lastCollectionAdded == null));
                             // If there is Result data and it should be included, build a Results element,
                             // and populate the first one
                             if ( currentRowResultId > 0 && isFullDetailsIncluded ) {
                                  logDebug("Adding result....");
                                  lastResultAdded = addResult(record, helper, lastCollectionAdded);
                                  logDebug("Result Added!");
                                  // If there is Result Remark data and it should be included, build a ResultRemarks element,
                                  // and populate the first one
                                  if ( currentRowResultRemarkId > 0 && isFullDetailsIncluded ) {
                                       addResultRemark(record, helper, lastResultAdded);
                        logDebug("DONE getting first Collection and Result.");
                   else if ( currentRowParentOrderCollectionId != previousRowParentOrderCollectionId
                             && (isCollectionsIncluded || isFullDetailsIncluded) ) {
                        // This is a new, top level, Order Collection to be included
                        lastParentOuterCollectionsAdded = null;
                        lastParentInnerCollectionsAdded = null;
                        lastCollectionAdded = null;
                        lastResultAdded = null;
                        logDebug("Getting next Order Collection...");
                        // If there is Parent Collection data and it should be included, build a Collections element,
                        // and populate the first one
                        if ( !isRootCollectionNode ) {
                             lastCollectionAdded = (com.idexx.services.lde.laborder.Collection)parentCollectionMap.get(new Long(currentRowParentOrderCollectionId));
                             logDebug("A Collection Added! Is it null? " + (lastCollectionAdded == null));
                        // If there is Collection data and it should be included, build a Collections element,
                        // and populate the first one
                        if ( currentRowOrderCollectionId > 0 ) {
                             if ( isRootCollectionNode ) {
                                  //LabOrder.Collections collections = record.addNewCollections();
                                  lastParentOuterCollectionsAdded = record.getCollections();
                                  lastCollectionAdded = addCollection(record, helper, lastParentOuterCollectionsAdded, false);
                                  parentCollectionMap.put(new Long(currentRowOrderCollectionId), lastCollectionAdded);
                             else {
                                  lastParentInnerCollectionsAdded = lastCollectionAdded.addNewCollections();
                                  lastCollectionAdded = addCollection(record, helper, lastParentInnerCollectionsAdded, false);
                             logDebug("B Collection Added! Is it null? " + (lastCollectionAdded == null));
                             // If there is Result data and it should be included, build a Results element,
                             // and populate the first one
                             if ( currentRowResultId > 0 && isFullDetailsIncluded ) {
                                  lastResultAdded = addResult(record, helper, lastCollectionAdded);
                                  // If there is Result Remark data and it should be included, build a ResultRemarks element,
                                  // and populate the first one
                                  if ( currentRowResultRemarkId > 0 && isFullDetailsIncluded ) {
                                       addResultRemark(record, helper, lastResultAdded);
                   else if ( currentRowOrderCollectionId != previousRowOrderCollectionId
                             && (isCollectionsIncluded || isFullDetailsIncluded) ) {
                        // This is a new Order Collection to be included inside of a parent collection
                        logDebug("Getting next CHILD Order Collection...");
                        logDebug("isRootCollectionNode: " + isRootCollectionNode);
                        logDebug("Order ID: " + helper.getBigInteger(DataConstants.ORDER_ID));
                        logDebug("Order Collection ID: " + helper.getBigInteger(DataConstants.ORDER_COLLECTION_ID));
                        logDebug("Collection ID: " + helper.getBigInteger(DataConstants.COLLECTION_ID));
                        if ( isRootCollectionNode ) {
                             lastCollectionAdded = addCollection(record, helper, lastParentOuterCollectionsAdded, false);
                             parentCollectionMap.put(new Long(currentRowOrderCollectionId), lastCollectionAdded);
                        else {
                             com.idexx.services.lde.laborder.Collection parentCollection = (com.idexx.services.lde.laborder.Collection)parentCollectionMap.get(new Long(currentRowParentOrderCollectionId));
                             if(parentCollection == null) {
                                  log(LOG_LEVEL.WARN, "Parent Collection with id: " + currentRowParentOrderCollectionId + " is null for collection id: " + currentRowOrderCollectionId + " but isRootCollectionNode is " + isRootCollectionNode);
                             } else {
                                  lastParentInnerCollectionsAdded = parentCollection.getCollections();
                                  logDebug("Is lastParentInnerCollectionsAdded null? " + (lastParentInnerCollectionsAdded == null));
                                  lastCollectionAdded = addCollection(record, helper, lastParentInnerCollectionsAdded, false);
                        // If there is Result data and it should be included, build a Results element,
                        // and populate the first one
                        if ( currentRowResultId > 0 && isFullDetailsIncluded ) {
                             lastResultAdded = addResult(record, helper, lastCollectionAdded);
                             // If there is Result Remark data and it should be included, build a ResultRemarks element,
                             // and populate the first one
                             if ( currentRowResultRemarkId > 0 && isFullDetailsIncluded ) {
                                  addResultRemark(record, helper, lastResultAdded);
                   else if ( currentRowResultId != previousRowResultId
                             && isFullDetailsIncluded ) {
                        // There is a new Result to be included
                        logDebug("Getting next Result...");
                        // This is a new result to be included
                        lastResultAdded = addResult(record, helper, lastCollectionAdded);
                        // If there is Result Remark data and it should be included, build a ResultRemarks element,
                        // and populate the first one
                        if ( currentRowResultRemarkId > 0 && isFullDetailsIncluded ) {
                             addResultRemark(record, helper, lastResultAdded);
                   else if ( isFullDetailsIncluded ) {
                        // There is a new Result Remark to include
                        logDebug("Getting next Result Remark...");
                        // This is a new result remark to be included
                        addResultRemark(record, helper, lastResultAdded);
                   logDebug("Done building response.");
                   previousRowResultId = currentRowResultId;
                   previousRowParentOrderCollectionId = currentRowParentOrderCollectionId;
                   previousRowOrderCollectionId = currentRowOrderCollectionId;
                   previousRowOrderId = currentRowOrderId;
              logDebug("Found " + rows + " rows of data.");
         }

  • Describe input xml

    Hi,
    I have created few doc style web services, with a very complex xml input and
    output. (1200 lines of xsd)
    Input and out put are xml as java.lang.String.
    What would be the best practice to represent this in the WSDL? Just a
    reference to the xsd file is good, or should it be completely presented
    within the WSDL? I'm not sure how my wsdl should look like...
    I will be using the same schema (xsd) in other web services too to perform
    different functions.
    Any suggestions would be greatly appreciated.
    Thanks
    /k

    Hi karthik
    I still dont get how the poXML can be represented by a schema in a WSDL. Can you
    give me a sample wsdl for that?
    Thanks
    Anamitra
    "Karthik V" <[email protected]> wrote:
    Manoj:
    Sorry, I got confused when you said, "the runtime will strip the xml
    tags".
    After your explanation, I understand that the runtime is actually going
    to
    perform some conversion without any loss of data.
    To conclude, logically,
    public void test(String poXML) is valid, and poXML can be represented
    by
    a schema definition.
    When I get a chance, I'm going to create a quick example of this use
    case
    and post it.
    Thanks,
    /k
    "manoj cheenath" <[email protected]> wrote in message
    news:[email protected]...
    java.lang.String is mapped to xsd:string which means the xml
    should look like:
    <foo xsi:type=xsd:string >sometext without any xml tags</foo>
    So if there are xml tags inside the string you passed
    in, runtime need to replace the tags with > and
    <.
    On the other end the runtime will again replace
    etc back to < or >. So you will get back theright XML. But on the wire it will be plain text
    not XML.
    So, if you dont want to convert to string, then you should use
    javax.xml.soap.SOAPElement or org.w3c.Element as
    your parameter type instead of java.lang.String.
    http://manojc.com
    "Karthik V" <[email protected]> wrote in message
    news:[email protected]...
    Manoj:
    I do not understand how the runtime will strip the xml.
    I think Anamitra's requirement of:
    public void test(String poXML)
    is very valid and a simple requirement.
    Infact, my requirement too is similar..
    1. Expose a method which takes in a String object.
    2. Define how the String is going to look like (using xsd).
    3. Instead of defining the schema in WSDL, we would like to import
    the
    schema and use it.
    4. Later use the schema to validate the incoming request.
    In real time most of us would like to work with String because ofits
    simplicity.
    Is there any reason why the implementation for such a simple usecase is
    so
    confusing?
    /k
    "manoj cheenath" <[email protected]> wrote in message
    news:[email protected]...
    public void test( String poXML )
    is not the best solution for you, i think, because
    in this case the runtime will strip the xml tags
    inside poXML. so the envelope will look like:
    <m:my-method>
    <poXML>sdfjds >some thing < something else...</poXML>
    </m:my-method>
    instead of:
    <m:my-method>
    <poXML>some thing <foo> something else</foo></poXML>
    </m:my-method>
    Will that be ok for you? Else, you can use DOM or
    javax.xml.soap.SOAPElement:
    public void test( org.w3c.Dom poXML );
    It looks like there is bug in WLS 7.0.2. The CR for this
    is CR104719. Please contact support if you need a patch.
    If you do clientgen on the WSDL, it is going to generate
    the classes (value types) for you. It looks like you do not
    want to do data binding. Take a look at DII client with generic
    type-mapping. Will this help you?
    package examples.jaxrpc.call5;
    import java.net.URL;
    import javax.xml.soap.SOAPConstants;
    import javax.xml.rpc.ServiceFactory;
    import javax.xml.rpc.Service;
    import javax.xml.rpc.Call;
    import javax.xml.rpc.ParameterMode;
    import javax.xml.namespace.QName;
    import javax.xml.rpc.encoding.TypeMapping;
    import javax.xml.rpc.encoding.TypeMappingRegistry;
    import javax.xml.soap.SOAPElement;
    import weblogic.webservice.encoding.GenericTypeMapping;
    import weblogic.webservice.core.soap.SOAPElementImpl;
    public class MSInterop{
    public static void main( String[] args ) throws Exception{
    //dont parse wsdl till we set the typemapping
    System.setProperty( "weblogic.webservice.servicenamechecking",
    "false" );
    //create service factory
    ServiceFactory factory = ServiceFactory.newInstance();
    //define qnames
    String targetNamespace = "http://soapinterop.org/";
    QName serviceName = new QName( targetNamespace, "SimpleTest"
    QName portName = new QName( targetNamespace, "SimpleTestSoap");
    QName operationName = new QName( "http://soapinterop.org/",
    "echoStruct" );
    URL wsdlLocation = new URL(
    "http://www.mssoapinterop.org/asmx/simple.asmx?WSDL" );
    //create service
    Service service = factory.createService( wsdlLocation,serviceName );
    TypeMappingRegistry registry = service.getTypeMappingRegistry();
    registry.register( SOAPConstants.URI_NS_SOAP_ENCODING,
    new GenericTypeMapping() );
    //create call
    Call call = service.createCall( portName, operationName );
    //construct struct
    SOAPElement elem = new SOAPElementImpl( "inputStruct", null,
    null );
    elem.addChildElement( "varInt" ).addTextNode( "1" );
    elem.addChildElement( "varString" ).addTextNode( "samplestring" );
    elem.addChildElement( "varFloat" ).addTextNode( "2.2" );
    System.out.println( elem );
    try{
    SOAPElement res = (SOAPElement)call.invoke(new Object[]{elem } );
    System.out.println( res );
    }catch( javax.xml.rpc.JAXRPCException e ){
    e.printStackTrace();
    e.getLinkedCause().printStackTrace();
    Call echoFloat = service.createCall( portName,
    new QName( "http://soapinterop.org/", "echoFloat" ) );
    System.out.println( echoFloat.invoke( new Object[]{new
    Float(100.0)} ) );
    http://manojc.com
    "Anamitra" <[email protected]> wrote in message
    news:[email protected]...
    Hi Bruce
    I think the wsdl that you sent was very near to what I was looking
    for.
    But I
    would try to make the requirement more clear: The points below
    are
    listed
    in order
    of priority:
    1>First and foremost I am looking to create a Webservice such
    that
    it
    exposes
    a method which takes in a java.lang.String
    public void test(String poXML)
    But in the WSDL I want to show the user the schema definition
    for
    the
    po
    XML.
    And would desire that the Webservices framework do the schema
    validation
    of the
    incoming xml. But I dont thing this works as the wsdl generated
    always
    says the
    type is "xsd:string". So I started looking into the 2nd option:
    2>Create a doc/literal type service and expose that method as:
    public void test(POXMLBean poXML)
    This generated the reqd schema in the wsdl level but the client
    is
    being
    forced
    to use the POXMLBean to invoke the method. I would ideally want
    the
    client
    to
    just deal with the XML of the pobean as described in the generated
    schema
    definition.
    For example the client using JAXRPC should be say doing the code
    like
    this:
    String poXML = "<po> <order>000</order> </po>"
    call.invoke(poXML").
    Is this possible? I am not able to do this. My primary important
    thing
    is
    that
    the client has to deal with XML and not with anything else. The
    client
    shouldnot
    have to deal with POXMLBean. This is what I am trying to acheive
    and
    not
    able
    to.
    3> So that leaves me to the last option which is not that good:
    ie I keep my original approach:
    public void test(String poXML)
    and somehow via wsdl:documentation say that the schema for this
    poXML
    is
    this...
    But I cannot change the type in the parameter poXML from xs:string
    right?
    Bottom line is there any way for the client to pass string/byte[]
    xml
    data
    to
    the webservice - but still be able to look into the WSDL and
    see
    what
    the
    reqd
    XML structure should be? I thought doc/literal should do it -
    but
    using
    weblogic
    I am not able to do it. Can u help me with this pls.
    thanks
    Anamitra
    Bruce Stephens <[email protected]> wrote:
    Hello,
    See what you think of this example of using import. It seems
    to
    describe your exact use case:
    http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Retail
    er.wsdl
    (Disclaimer, anyone could have found this via public UDDI.)
    The issue I believe that Anamitra sees is the gap between the
    runtime
    and the toolset.
    Bruce
    Anamitra wrote:
    Hi Karthik
    I am a bit confused as to what you mean when u say "import".
    The
    generated
    webservices.xml
    contains a <types> and a <type-mapping> element. I suppose
    u r
    asking
    me to put
    the xsd definition in the <types> section - right?
    If the method is like this:
    public String doit(String msg)
    How do I attach the <xs:string> type "msg" to the actual
    XML
    schema
    that I just
    imported?
    I dont know whether I am asking stupid questions or not -
    but I
    would
    have ideall
    liked to see my "msg" of type say "PurchaseOrder" which is
    the
    schema
    that I imported.
    And the external client should just be able to give the
    "PurchaseOrder"
    xml to
    the Webservice and invoke the "doit" method.
    Am I making any sense?
    thanks
    Anamitra
    "Karthik V" <[email protected]> wrote:
    I doubt if servicegen has any option for doing it automatically.
    You should manually edit web-services.xml and import the
    xsd.
    /k
    "Anamitra" <[email protected]> wrote in message
    news:[email protected]...
    Hi Karthik/Bruce
    Can you pls explain to me how using weblogic tools
    [servicegen]
    one
    can
    include
    the xsd pointers in the WSDL file.
    We have a similar kind of requirement where we have
    webservices
    which
    take
    in
    string [XML data] as a parameter and the WSDL only shows
    method
    parameter
    types
    as xsd:string - but we want to show something like a schema
    definition.
    So
    if
    there is anyway to put the schema definition in the WSDL
    - pls
    let
    me know
    that
    would be very very helpful.
    thanks
    Anamitra
    "Karthik V" <[email protected]> wrote:
    Bruce,
    Thanks for your response. That helped.
    I have another question for you.
    I know this would sound strange.
    But my requirement is to expose a session bean method
    that
    could
    take
    different xml inputs.
    For example:
    TestBean exposes testMethod(String xmlstr)
    xmlstr could be of schema xmlSchema1.xsd
    or xmlstr could be of schema xmlSchema2.xsd
    In future it could also represent xmlSchema3.xsd... and
    so
    on.
    What is the right approach in this scenario?
    I was thinking to create a different web service fordifferent
    xsd.
    Say, webservice1 imports xmlSchema1.xsd, webservice2 imports
    xmlSchema2.xsd...
    Un fortunately due to some design restrictions, I cannot
    create
    different
    methods in my session bean like testMethod1, testMethod2....
    Is there any other better way to do this in one web service?
    Thanks in advance for any suggestions. And excuse my unusual
    requirement.
    /k
    "Bruce Stephens" <[email protected]> wrote in message
    news:[email protected]...
    Hello,
    Personally I like to see everything in one place, i.e.
    in
    the
    WSDL,
    however everyone else :-) uses the import. The
    SOAPBuilders
    round
    3
    have several tests showing imports. Also WSI Basic
    profile
    has
    some
    helpful guidelines on using import:
    http://www.ws-i.org/Profiles/Basic/2003-03/BasicProfile-1.0-BdAD.html
    HTHs,
    Bruce
    Karthik V wrote:
    Hi,
    I have created few doc style web services, with a
    very
    complex
    xml
    input
    and
    output. (1200 lines of xsd)
    Input and out put are xml as java.lang.String.
    What would be the best practice to represent this
    in the
    WSDL?
    Just
    a
    reference to the xsd file is good, or should it be
    completely
    presented
    within the WSDL? I'm not sure how my wsdl should look
    like...
    I will be using the same schema (xsd) in other web
    services
    too
    to
    perform
    different functions.
    Any suggestions would be greatly appreciated.
    Thanks
    /k

  • Could not initiate the BPEL process because the input xml is not well forme

    Your test request generated the following exception/fault:
    Could not initiate the BPEL process because the input xml is not well formed, the reason is :
    Error parsing envelope: (2, 152) Invalid char in text. Please correct the input xml.
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body xmlns:ns1="http://xmlns.oracle.com/RO_Update2">
    <ns1:RO_Update2ProcessRequest>
    <ns1:UserName>operations</ns1:UserName>
    <ns1:Responsibility>Depot Repair Engineer</ns1:Responsibility>
    <ns1:API_VER>1.0</ns1:API_VER>
    <ns1:P_commit>T</ns1:P_commit>
    <ns1:init_msg>T</ns1:init_msg>
    <ns1:Org_ID>207</ns1:Org_ID>
    <ns1:R_Number>10782</ns1:R_Number>
    <ns1:R_Status>1008</ns1:R_Status>
    <ns1:Obj_Ver_No>1</ns1:Obj_Ver_No>
    </ns1:RO_Update2ProcessRequest>
    </soap:Body>
    </soap:Envelope>

    Try
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
    <ns1:RO_Update2ProcessRequest xmlns:ns1="http://xmlns.oracle.com/RO_Update2">
    <ns1:UserName>operations</ns1:UserName>
    <ns1:Responsibility>Depot Repair Engineer</ns1:Responsibility>
    <ns1:API_VER>1.0</ns1:API_VER>
    <ns1:P_commit>T</ns1:P_commit>
    <ns1:init_msg>T</ns1:init_msg>
    <ns1:Org_ID>207</ns1:Org_ID>
    <ns1:R_Number>10782</ns1:R_Number>
    <ns1:R_Status>1008</ns1:R_Status>
    <ns1:Obj_Ver_No>1</ns1:Obj_Ver_No>
    </ns1:RO_Update2ProcessRequest>
    </soap:Body>
    </soap:Envelope>

  • Can I an html file to generate a xml file?

    Is it passable to have a html document that the user selects
    different files to be added, and different options for the files.
    Then generates an xml file for uploading?
    All help much appreciated :)

    Hmmm well what about a text file? (with the xml code
    incerted)
    Below is the type of code I need to generate with the clients
    input in {} this could be a text file that I then convert to xml.
    Thanks for all your help :)
    <GenresToAddList>
    - <GenreToAdd>
    <GenreName>Classic Hits</GenreName>
    <MediaClass>MUSIC</MediaClass>
    <ImageFile>classic hits.jpg</ImageFile>
    </GenreToAdd>
    </GenresToAddList>
    - <SongsToAddList>
    - <SongToAdd>
    <Title> {entered by user} </Title>
    <Artists> {entered by user} </Artists>
    <SongID> {auto incremented} </SongID>
    <MediaClass>MUSIC</MediaClass>
    <MediaFormat>MPEG1</MediaFormat>
    <MediaType> {selected by user} </MediaType>
    <ImageFile> {location entered by user}
    </ImageFile>
    <MusicFile> {location entered by user}
    </MusicFile>
    - <GenreList>
    <Genre>Classic Hits</Genre>
    </GenreList>
    <DateReleased> {entered by user}</DateReleased>
    <BeatsPerMinute> {entered by
    user}</BeatsPerMinute>
    <CDCatalogNumber> { auto incremented}
    </CDCatalogNumber>
    </SongToAdd>
    </SongsToAddList>

  • Generate prov.xml for Creative Cloud. Return Code 27

    We're trying to follow this guide (Creative Cloud Help | Using Adobe Provisioning Toolkit Enterprise Edition) to serialize a package (or something). We're stuck on generating prov.xml. My best attempt at an entry is:
    C:\Program Files (x86)\Common Files\Adobe\OOBE\PDApp\CCP\utilities\APTEE>adobe_prtk.exe --tool=VolumeSerialize --generate --serial=xxxx-xxxx-xxxx-xxxx-xxxx-xxxx --regsuppress=ss --eulasuppress --locales=en_US --provfilepath=C:\Program Fil
    es (x86)\Common Files\Adobe\OOBE\PDApp\CCP
    It says half of this is optional, but I'm skeptical.
    Anyway, I'm getting return code 27. This indicates that it is unable to edit the prov.xml file specified. I didn't specify a prov.xml file, I'm trying to make one. The syntax I'm using differs from what I found on the page I linked, as that was giving me syntax errors. I lifted this off someone else's code. I've tried just about every variation I can think of. Any help would be appreciated.
    This is on Windows

    One of these links may help
    http://helpx.adobe.com/creative-cloud/packager.html
    http://forums.adobe.com/community/download_install_setup/creative_suite_enterprise_deploym ent

  • Generating an xml from a pl/sql procedure

    Hi Friends,
    I have come up with a requirement to generate an xml from a pl/sql procedure.
    I did some R & D and also got some sample procedures but could not understand the datatypes being used.
    The procedure declares variables like this:
    doc                  xmldom.DOMDocument;
    mainNode         xmldom.DOMNode;
    headerElem      xmldom.DOMElement; Pls could anyone tell what do these xmldom.DOMDocument, xmldom.DOMNode and xmldom.DOMElement mean?
    Later in the procedure, these variables are assigned values like
    doc      := xmldom.newDOMDocument;
    mainNode := xmldom.makenode(doc); This went a bouncer on me.
    Pls help.
    Thanks in advance ...!

    You can check this one -- Learned this from michael.
    satyaki>
    satyaki>
    satyaki>select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
    PL/SQL Release 10.2.0.1.0 - Production
    CORE    10.2.0.1.0      Production
    TNS for Linux: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    satyaki>
    satyaki>
    satyaki>with person_h
      2  as
      3    (
      4      select 1 id, 'M' gender, 'W' race, '170' weight from dual union all
      5      select 1, 'M', 'W', '170' from dual union all
      6      select 1, 'M', 'W', '180' from dual union all
      7      select 1, 'M', NULL, '175' from dual union all
      8      select 1, NULL, 'W', NULL from dual
      9    )
    10    select xmlelement("Person",(
    11                                 select xmlagg(xmlelement("Sex", gender))
    12                                 from (
    13                                        select distinct gender
    14                                        from person_h
    15                                        where id = 1
    16                                        and gender is not null
    17                                      ) pg
    18                                ),
    19                                (
    20                                  select xmlagg(xmlforest(race as "Race"))
    21                                  from (
    22                                         select distinct race
    23                                         from person_h
    24                                         where id = 1
    25                                       ) pg
    26                                ),
    27                                (
    28                                  select xmlagg(xmlforest(weight as "Weight"))
    29                                  from (
    30                                         select distinct weight
    31                                         from person_h
    32                                         where id = 1
    33                                       ) pg
    34                                 )
    35                     ).getstringval() Res
    36    from dual;
    RES
    <Person><Sex>M</Sex><Race>W</Race><Weight>170</Weight><Weight>175</Weight><Weight>180</Weight></Person>
    satyaki>Regards.
    Satyaki De.

  • How to generate an XML Configuration File for EBS Source Type

    Hi,
    We have installed SES, I want to integrate it to enable for searching repository contracts.
    In the sources I have selected oracle.apps.okc.repository.textsearch.server.RepHeaderSearchExpVO.
    For this source I need to specify the Configuration URL.
    Here I need to provide the path for configuration XML file. But before that I need to generate the XML Configuration file.
    Is there any steps on how we can create this XML file.
    like I would want to know how we can create the XML file and on which folder on the server should I be putting it
    Thanks

    Hi there,
    We are running into same issue and need the exact same information. Can someone help with this question on priority?
    Thanks,
    Darshan

  • Generate own xml tags

    Hi,
    I have to generate an xml file out of a table in oracle.
    Thats my test function
    DECLARE
    queryCtx dbms_xmlquery.ctxType;
    result CLOB;
    BEGIN
    -- set up the query context
    queryCtx := dbms_xmlquery.newContext('Select
         empno "EMP_NO"
    , ename "NAME"
    , deptno "DEPT_NO" from test_emp'
    -- set row tag name and row set tag name
    dbms_xmlquery.setRowTag(
    queryCtx
    , 'EMP'
    dbms_xmlquery.setRowSetTag(
    queryCtx
    , 'EMPSET'
    -- run query and print out result
    result := dbms_xmlquery.getXml(queryCtx);
    printClobOut(result);
    -- free resources
    dbms_xmlquery.closeContext(queryCtx);
    END;
    the result is an xml like that:
    <?xml version = '1.0'?>
    <EMPSET>
    <EMP num="1">
    <EMP_NO>7369</EMP_NO>
    <NAME>Smith</NAME>
    <DEPT_NO>20</DEPT_NO>
    </EMP>
    </EMPSET>
    but now i have to set own tags around a row in the table... for example:
    <?xml version = '1.0'?>
    <EMPSET>
    <EMP num="1">
    <ownTag>
    <EMP_NO>7369</EMP_NO>
    <NAME>Smith</NAME>
    <DEPT_NO>20</DEPT_NO>
    </ownTag>
    </EMP>
    </EMPSET>
    I searched now around two hours and nothing found..
    can anybody help me

    try xdb-forum here at OTN...

  • How to generate a XML file from a XML schema...?

    Hi guys...!
    I have a XML schema and I want to write a XML file based on that schema. I have heard about this feature that eclipse has, which given a XML schema, can generate a XML file for you.
    Does anyone of you know about this feature? or is there another way to do it. The schema that I have is very huge...
    I will really appreciate any help from you guys...
    Thank...you..
    --- Spirit Away...

    don't cross post
    http://forum.java.sun.com/thread.jspa?threadID=649205&tstart=10

Maybe you are looking for