BizTalk Orchestration with Envelop Schema

I have Flat File Schema in which I set the Allow Message Breakup at Infix Root to true. And also I set the Record Max Occurrence 1. To dispatch the message and send the multiple message to the send port.I used a Receive Pipeline(with flat file disassemble)
and Send Pipeline(XML Transmit) in the receive and sen ports. Till this it worked fine.
The input .txt File at the receive Port
1000 ABC IT 1001 DEF Maintenece 1002 GHI Payroll
The Output was three .xml files like
<?xml version="1.0" encoding="utf-8" ?>
- <Record xmlns="http://FlatFilewithEnvelop.FlatFileSchema1">
- <Employee xmlns="">
<ID>1000</ID>
<Name>ABC</Name>
<Dept>IT</Dept>
</Employee>
</Record>
<?xml version="1.0" encoding="utf-8" ?>
- <Record xmlns="http://FlatFilewithEnvelop.FlatFileSchema1">
- <Employee xmlns="">
<ID>1001</ID>
<Name>DEF</Name>
<Dept>Maintenece</Dept>
</Employee>
</Record>
<?xml version="1.0" encoding="utf-8" ?>
- <Record xmlns="http://FlatFilewithEnvelop.FlatFileSchema1">
- <Employee xmlns="">
<ID>1002</ID>
<Name>GHI</Name>
<Dept>Payroll</Dept>
</Employee>
</Record>
Now I wanted to send only the message with specific ID.So I added a Orchestration in to the Project where I am using decision shape, using the expression. Else I didnt want to send any message to the send Port.
Msg(FlatFilewithEnvelop.PropertySchema.ID) == 1000
If I send the same message in the Receive Port, I am getting four messages in the Send port(shown as below). I dont what was the mistake can anybody tell me what is the mistake.
<?xml version="1.0" encoding="utf-8" ?>
- <Record xmlns="http://FlatFilewithEnvelop.FlatFileSchema1">
- <Employee xmlns="">
<ID>1000</ID>
<Name>ABC</Name>
<Dept>IT</Dept>
</Employee>
</Record>
<?xml version="1.0" encoding="utf-8" ?>
- <Record xmlns="http://FlatFilewithEnvelop.FlatFileSchema1">
- <Employee xmlns="">
<ID>1000</ID>
<Name>ABC</Name>
<Dept>IT</Dept>
</Employee>
</Record>
<?xml version="1.0" encoding="utf-8" ?>
- <Record xmlns="http://FlatFilewithEnvelop.FlatFileSchema1">
- <Employee xmlns="">
<ID>1001</ID>
<Name>DEF</Name>
<Dept>Maintenece</Dept>
</Employee>
</Record>
<?xml version="1.0" encoding="utf-8" ?>
- <Record xmlns="http://FlatFilewithEnvelop.FlatFileSchema1">
- <Employee xmlns="">
<ID>1002</ID>
<Name>GHI</Name>
<Dept>Payroll</Dept>
</Employee>
</Record>

The way in you have defined the schema (with batch) when its debatches all the debatches messages will have the same context property which in this case is 1000. So you're getting all the messages from the same batch passed through (true part of) the decide
shape.
Try this in the Decide shape:
xpath(YourReceivedMessage, "boolean(/*[local-name()='Record' and namespace-uri()='http://FlatFilewithEnvelop.FlatFileSchema1']/*[local-name()='Employee' and namespace-uri()='']/*[local-name()='ID' and namespace-uri()='']=1000)")
Replace "YourReceivedMessage" to the Biztalk message type you have set in the Receive shape.
If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

Similar Messages

  • Error in debatching with the help of envelope schema

    Hi, I have following orchestration :
    I am getting the following error after deploying my project :
    xlang/s engine event log entry: Uncaught exception (see the 'inner exception' below) has suspended an instance of service 'Interplx.EmployeeExpenseToIDOC(5a39c530-92f1-87fd-a074-b64bc295058c)'.
    The service instance will remain suspended until administratively resumed or terminated. 
    If resumed the instance will continue from its last persisted state and may re-throw the same unexpected exception.
    InstanceId: ceec1c30-3196-4b09-9094-1c37f9f13c13
    Shape name: CallPipeline
    ShapeId: 19fd46ea-99f6-4a31-bf70-c6490b94d72e
    Exception thrown from: segment 1, progress 14
    Inner exception: There was a failure executing pipeline "Interplx.ReceivePipeline2". Error details: "Finding the document specification by message type "IdocData" failed. Verify the schema deployed properly. ".
    Exception type: XLANGPipelineManagerException
    Source: Microsoft.XLANGs.Pipeline
    Target Site: Microsoft.XLANGs.Pipeline.ReceivePipelineOutputMessages ExecutePipeline(Microsoft.BizTalk.PipelineOM.ReceivePipeline, Microsoft.XLANGs.BaseTypes.XLANGMessage)
    The following is a stack trace that identifies the location where the exception occured
       at Microsoft.XLANGs.Pipeline.XLANGPipelineManager.ExecutePipeline(ReceivePipeline p, XLANGMessage inMsg)
       at Microsoft.XLANGs.Pipeline.XLANGPipelineManager.ExecuteReceivePipeline(Type receivePipelineType, XLANGMessage inMsg)
       at Interplx.EmployeeExpenseToIDOC.segment1(StopConditions stopOn)
       at Microsoft.XLANGs.Core.SegmentScheduler.RunASegment(Segment s, StopConditions stopCond, Exception& exp)
    Additional error information:
            Finding the document specification by message type "IdocData" failed. Verify the schema deployed properly. 
    Exception type: COMException
    Source: XML disassembler
    Target Site: Microsoft.BizTalk.Component.NodeProcessor CreateProcessor(System.String)
    The following is a stack trace that identifies the location where the exception occured
       at Microsoft.BizTalk.Component.XmlDasmReader.CreateProcessor(String docType)
       at Microsoft.BizTalk.Component.XmlDasmReader.ShiftState(Boolean readState)
       at Microsoft.BizTalk.Component.XmlDasmReader.Read()
       at Microsoft.BizTalk.Component.XmlDasmComp.Disassemble2(IPipelineContext pc, IBaseMessage inMsg)
       at Microsoft.BizTalk.Component.XmlDasmComp.Disassemble(IPipelineContext pc, IBaseMessage inMsg)
       at Microsoft.BizTalk.Internal.ComponentWrapper.Disassemble(IPipelineContext pc, IBaseMessage inmsg)
       at Microsoft.BizTalk.PipelineOM.DisassemblerComponent.Disassemble(IPipelineContext pipelineContext, IBaseMessage message)
       at Microsoft.BizTalk.PipelineOM.DisassemblingParserStage.Disassemble(IBTMPipelineContext pc, IBaseMessage inMsg, Int32 dasmStageIndex)
       at Microsoft.BizTalk.PipelineOM.ReceivePipeline.Execute(IBaseMessage msgIn)
       at Microsoft.BizTalk.PipelineOM.PipelineManager.ExecuteReceivePipeline(ReceivePipeline receivePipeline, IBaseMessage message, Object interceptor, Stream perInstanceCofigStrm, Object transaction, IPipelineContext pBTMPipeCtx)
       at Microsoft.BizTalk.PipelineOM.PipelineManager.ExecuteReceivePipeline(ReceivePipeline receivePipeline, IBaseMessage msg, IResourceTracker& rt)
       at Microsoft.XLANGs.Pipeline.XLANGPipelineManager.ExecutePipeline(ReceivePipeline p, XLANGMessage inMsg)
    In call Pipeline expression shape I am using the following code :
    InputPipeline =Microsoft.XLANGs.Pipeline.XLANGPipelineManager.ExecuteReceivePipeline(typeof(Interplx.ReceivePipeline2),IDOCMessage);
    I made IDOCMessage to envelope schema which is using Destination Schema as a Message Type.
    the structure of  my Destination schema is as follows:
    I set the Envelope property of schema to Yes.Body Xpath of send node is as follows:
    /*[local-name()='Send' and namespace-uri()='http://Interplx.DestinationSchema']
    I just take a ReceivePipeiline named ReceivePipeline2and not set its any property.
    I am confuse whether is the mistake has been done by me ?
    Please help.
    Prakash

    ok also check the "build
    Action" is set to "BtsCompile"
    for the schema properties .
    And make sure you restart host instances (this may not be the reason, but just make sure)
    "Finding the document specification by message
    type "IdocData" failed. Verify the schema deployed properly. ".
    the above error occurs in few cases like below,
    1. you deployed the schema but did not restart the host instances
    2. you deployed the schema, but the schema message type you deployed and the message type your application
    is expecting is not present in database.
    Please mark the post as answer if this answers your question. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

  • Envelope Schema Issue : Routing failure :No Subscriber is found

    Hi,
    This is my envelope schema:
    This is my original Schema:
    My scenario is as follows:
    I have two orchestration :
    In orchestration A,I am getting a input schema,map that input schema to above envelope schema.Then doing de-batching with the help of call pipeline in orchestration A.I am getting the proper output for orchestration A and saved it to location X.
    In orchestartion B, I am using direct binding, and making filter on receive message context property GL_Journal_SetNumber.
    When I am making a filter on Message Type, it is working fine.
    When  I am making filter on message type then it is pick up the file from message box and working fine but when I am using filter on GL_Journal_SetNumber then it is not pick up the file from message box.
    Any kind of help would be appreciated.
    Is there any alternative solution for this scenario.
    Prakash

    I checked in BizTalk Admin Console --> BizTalk Group ---> New Query---> Subscription and
    got my promoted property there:
    Prakash

  • Obtain wsa:MessageID in BizTalk Orchestration

    I am receiving a message into a WCF Receive Location which has the Soap Envelope and WS Addressing elements in the Soap Header.
    soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing">
    <wsa:Action>XXXX</wsa:Action>
    <wsa:MessageID>uuid:4f8b9fa8-8041-4f44-a09a-3918091b0694</wsa:MessageID>
    <wsa:To>XXXX</wsa:To>
    <To xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none" soapenv:mustUnderstand="1">XXXX</To>
    <Action xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none" soapenv:mustUnderstand="1">XXXX</Action>
    </soapenv:Header><soapenv:Body>...
    How do I access the wsa:MessageID field in my BizTalk Orchestration?

    Did you try the WCF.InboundHeaders Context Propety?
    See this article:
    http://msdn.microsoft.com/en-us/library/bb259987.aspx
    It's populated with the Xml content so you'll have to extract whatever specific value you want yourself.

  • Soap response with envelope

    Hi
    My PI server is able to make a soap call to the SFDC ( webservice ) ...however the response that is received within PI
    has a SOAP envelope...and hence the response mapping is going in error....because the source data type in response mapping doesnot match with the soap response ( with envelope )
      <?xml version="1.0" encoding="UTF-8" ?>
    - <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns="urn:enterprise.soap.sforce.com">
    - <soapenv:Body>
    - <upsertResponse>
    - <result>
      <created>false</created>
      <id>a0UT0000004aeaMMAQ</id>
      <success>true</success>
      </result>
      </upsertResponse>
      </soapenv:Body>
      </soapenv:Envelope>
    how do i handle this

    Hi,
    I think there is an option while configuration of SOAP adapter, where you can define, not to keep SOAP envelop. Please check the option Conversion Parameters\Do Not Use SOAP Envelope and set it as per your requirement. That might solve the problem. Here is the link which can be helpful
    http://help.sap.com/saphelp_nw04/helpdata/en/29/5bd93f130f9215e10000000a155106/content.htm
    Alternatively you need a java mapping or XSLT mapping to remove the envelop.
    Here is the java mapping code to remove SOAP envelop
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.util.Map;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.StreamResult;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    import com.sap.aii.mapping.api.StreamTransformation;
    import com.sap.aii.mapping.api.StreamTransformationException;
    public class RemoveSoapEnvelop implements StreamTransformation{
    public void execute(InputStream in, OutputStream out)
    throws StreamTransformationException {
    try
         DocumentBuilderFactory factory=DocumentBuilderFactory.newInstance();
         DocumentBuilder builderel=factory.newDocumentBuilder();
         /*input document in form of XML*/
         Document docIn=builderel.parse(in);
         /*document after parsing*/
         Document docOut=builderel.newDocument();
         TransformerFactory tf=TransformerFactory.newInstance();
         Transformer transform=tf.newTransformer();
         Element root;
         Node p;
         NodeList l;
         int mm,n1;
         //if you need to include namespace use next two lines
         //root=docOut.createElement("ns0:upsertResponse");
         //root.setAttribute("xmlns:ns0","http://connectsystems.be/MAINFR/AccDocument");
         root=docOut.createElement("upsertResponse");
         p=docIn.getElementsByTagName("upsertResponse").item(0);
         l=p.getChildNodes();
         n1=l.getLength();
         for(mm=0;mm<n1;++mm)
              Node temp=docOut.importNode(l.item(mm),true);
              root.appendChild(temp);
         docOut.appendChild(root);
         transform.transform(new DOMSource(docOut), new StreamResult(out));
    catch(Exception e)
         e.printStackTrace();
    public void setParameter(Map arg0) {
    public static void main(String[] args) {
    try{
         RemoveSoapEnvelop genFormat=new RemoveSoapEnvelop();
         FileInputStream in=new FileInputStream("C:\\Apps\\my folder\\sdn\\sd2.xml");
         FileOutputStream out=new FileOutputStream("C:\\Apps\\my folder\\sdn\\removedEnvelop.xml");
         genFormat.execute(in,out);
    catch(Exception e)
    e.printStackTrace();
    input xml file sd2.xml
      <?xml version="1.0" encoding="UTF-8" ?>
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns="urn:enterprise.soap.sforce.com">
    <soapenv:Body>
    <upsertResponse>
    <result>
      <created>false</created>
      <id>a0UT0000004aeaMMAQ</id>
      <success>true</success>
      </result>
      </upsertResponse>
      </soapenv:Body>
      </soapenv:Envelope>
    Here is the output xml removedEnvelop.xml
      <?xml version="1.0" encoding="UTF-8" ?>
    <upsertResponse>
    <result>
      <created>false</created>
      <id>a0UT0000004aeaMMAQ</id>
      <success>true</success>
      </result>
      </upsertResponse>
    Helpful articles on java mapping for PI 7.1
    http://wiki.sdn.sap.com/wiki/display/XI/SampleJAVAMappingcodeusingPI7.1+API
    You can also try following XSLT mapping to get the same output as java mapping
    <xsl:stylesheet version="1.0"
    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    exclude-result-prefixes="SOAP-ENV">
    <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" />
    <xsl:template match="/">
    <xsl:for-each select="SOAP-ENV:Envelope/SOAP-ENV:Body">     
    <upsertResponse>
    <result>
         <xsl:variable name="var" select="normalize-space(.)"></xsl:variable>
         <xsl:variable name="tokenizedSample" select="tokenize($var,' ')"/>
        <created><xsl:value-of select="$tokenizedSample[1]"/></created>
        <id><xsl:value-of select="$tokenizedSample[2]"/></id>
        <success><xsl:value-of select="$tokenizedSample[3]"/></success>
    </result>
    </upsertResponse>
    </xsl:for-each>
    </xsl:template>
    </xsl:stylesheet>
    Other than these please refer to following links for further examples on the topic
    Remove SOAP-ENV tags from xml RECEIVER RESPONSE payload (XSL needed?)
    Remove SOAP Envelop using XSLT  mapping.
    Hope this helps your cause.
    regards
    Anupam

  • One application with Multiple schemas- common application frame work

    Hi All,
    I am trying setup a common application frame work in apex. Please help me.
    How to achieve this.
    Creation of one application attached to different schemas at run time. So that my application maintaince is going to be easy instated of creating copies of same application.
    More details:
    1. I have one application with 100 pages pointing to a schema dev_common in one workspace APP_COMMON. I have 50 schemas with same structure of dev_common schema with different set of data ( because of large amount of data).
    So I want to create one application attached to different schemas.
    2. And another thing is I have 100 users, the user can work on 1 or multiple schemas ( I mean same application with different schemas attached)
    Any help much appreciated.
    Thanks,

    Thank you for the reply.
    >> b) I think you have to give access rights for the dev_common and app_common to all users.
    Dev_common schema is a kind of placeholder. I have 50 schemas same as dev_common because of different business requirements but the front end is same for all 50 schemas. How can we create one application used for 50 schemas instead of creating 50 applications and 50 workspaces.
    Please help me.

  • How to develope application with multiple schema

    Hi,
    In my application, there is 3 schema, forms are from different schema, but the database is one. How should I manage it, When i open the form with different schema I am not getting the expected result,
    I am using Oracle 10g Forms & Database
    Thanks in advance
    Rizly

    hi,
    what database-user is the user connected with, when executing the forms ? Is it one of the three schemaowners or has each logical user his own database-user?
    About your db-objects:
    I would create 3 roles, one for each schema, and grant the needed privileges for one schema to the according role
    Example:
    CREATE ROLE RL_SCHEMA1;
    GRANT SELECT, INSERT, UPDATE, DELETE ON SCHEMA1.TABLE RO RL_SCHEMA1;
    ...Then you can grant the roles to the databaseuser you are connected with at runtime.
    If you use named users (each logical user has it's own database-user) then you assign each user only those roles he needs.

  • ORA-00600 problem when create XMLType table with registerd schema

    Hi,
    I am using Oracle9i Enterprise Edition Release 9.2.0.4.0 on RedHat Linux 7.2
    I found a problem when I create table with registered schema with follow content:
         <xs:element name="body">
              <xs:complexType>
                   <xs:sequence>
                   </xs:sequence>
                   <xs:attribute name="id" type="xs:ID"/>
                   <xs:attribute name="class" type="xs:NMTOKENS"/>
                   <xs:attribute name="style" type="xs:string"/>
              </xs:complexType>
         </xs:element>
         <xs:element name="body.content">
              <xs:complexType>
                   <xs:choice minOccurs="0" maxOccurs="unbounded">
                        <xs:element ref="p"/>
                        <xs:element ref="hl2"/>
                        <xs:element ref="nitf-table"/>
                        <xs:element ref="ol"/>
                   </xs:choice>
                   <xs:attribute name="id" type="xs:ID"/>
              </xs:complexType>
         </xs:element>
    Does Oracle not support element reference to other element with dot?
    For instance, body -> body.content
    Thanks for your attention.

    Sorry, amendment on the schema
         <xs:element name="body">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="body.head" minOccurs="0"/>
                        <xs:element ref="body.content" minOccurs="0" maxOccurs="unbounded"/>
                        <xs:element ref="body.end" minOccurs="0"/>
                   </xs:sequence>
                   <xs:attribute name="id" type="xs:ID"/>
                   <xs:attribute name="class" type="xs:NMTOKENS"/>
                   <xs:attribute name="style" type="xs:string"/>
              </xs:complexType>
         </xs:element>

  • Error creating dynamic page in an application with a schema other than portal30

    Running 9iAS 1.0.2.2 on Solaris.
    Database 8.1.7.1
    I cannot seem to create a default dynamic page (select 'x' from dual) in an application that has a schema (e.g. test) other
    than portal30. The error seems to be when portal tries to compile the dynamic-page package, it references itself from
    within the package but prefixing the call with the other (test) schema. It never seems to compile? What seems to be the
    problem? Any ideas?

    If you are using any database object other than the applcation owned,then it has to be prefixed with the schema owner.
    For example,
    if the application schema is based on the schema "schema1" (say)
    and your query is based on one of the object on "schema2"
    and if you have necessary privilegves to access that object from schema2, then the compiler wont throw any error.
    Can u explain, what u problem you are experiencing in detail?
    (Also, if u give me the portal version, I can cross-verify that).

  • Catch all error information while validating xml content with xsd schema

    Hi experts,
    I created a java mapping to validating the input xml content with xsd schema (schema validation). What I want is to catch all error message to the xml not just the first error. I used SAXParser in sapxmltoolkit.jar to do the schema validation. The below is a part of my java mapping.
    XMLReader parser = XMLReaderFactory.createXMLReader("com.sap.engine.lib.xml.parser.SAXParser");
    parser.setFeature( "http://xml.org/sax/features/validation" ,  true);
    parser.setFeature( "http://apache.org/xml/features/validation/schema" , true);
    parser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaLanguage", "http://www.w3.org/2001/XMLSchema");          parser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaSource",this.getClass().getClassLoader().getResourceAsStream(schema)); // schema is my schema name
    parser.setErrorHandler(new ParseErrorHandler()); // ParseErrorHandler is my own ErrorHandler which extends DefaultHandler
    parser.parse(new InputSource(new ByteArrayInputStream(sinput.getBytes())));
    // In error handler, I comment all code so as not to throw any exception
    public class ParseErrorHandler extends DefaultHandler
         public void error(SAXParseException e) throws SAXException
              // sSystem.out.println("Error" + e.getMessage());
              // throw e;
         public void fatalError(SAXParseException e)
              // throw e;
              // System.out.println("SAP Fatal Error" + e.getMessage());
    Unfortunately the program always stopped while catching the first error. Check the below log.
    com.sap.engine.lib.xml.parser.NestedSAXParserException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException:
    ERRORS :
    cvc-simple-type : information item '/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]/:CityName[1]' is not valid, because it's value does not satisfy the constraints of facet 'minLength' with value '1'.
    cvc-data : information item '/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]/:CityName[1]' is is not valid with respoct to the corresponding simple type definition.
    cvc-element : element information item '/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]/:CityName[1]' is associated with invalid data.
    cvc-element : element information item '/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]' is not valid with respect to it's complex type definition..
    cvc-element : element information item '/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]' is not valid with respect to it's complex type definition..
    cvc-element : element information item '/:ShipNotice[1]/:Header[1]/:To[1]' is not valid with respect to it's complex type definition..
    cvc-element : element information item '/:ShipNotice[1]/:Header[1]' is not valid with respect to it's complex type definition..
    cvc-element : element information item '/:ShipNotice[1]' is not valid with respect to it's complex type definition..
    -> com.sap.engine.lib.xml.parser.ParserException:
    I tried using Xerces and JAXP to do validation, the same error happened. I have no idea on this. Does xi has its own error handler logic? Is there any body can make me get out of this?
    Thanks.

    <h6>Hi experts,
    <h6>
    <h6>I created a java mapping to validating the input xml content with xsd schema (schema validation). What I want is to catch all <h6>error message to the xml not just the first error. I used SAXParser in sapxmltoolkit.jar to do the schema validation. The below <h6>is a part of my java mapping.
    <h6>XMLReader parser = XMLReaderFactory.createXMLReader("com.sap.engine.lib.xml.parser.SAXParser");
    <h6>parser.setFeature( "http://xml.org/sax/features/validation" ,  true);
    <h6>parser.setFeature( "http://apache.org/xml/features/validation/schema" , true);
    <h6>parser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaLanguage", "http://www.w3.org/2001/XMLSchema");          <h6>parser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaSource",this.getClass().getClassLoader().getResourceAsStream(schema)); <h6>// schema is my schema name
    <h6>parser.setErrorHandler(new ParseErrorHandler()); // ParseErrorHandler is my own ErrorHandler which extends Default Handler
    <h6>parser.parse(new InputSource(new ByteArrayInputStream(sinput.getBytes())));
    <h6>
    <h6>// In error handler, I comment all code so as not to throw any exception
    <h6>public class ParseErrorHandler extends DefaultHandler
    <h6>{
    <h6>     public void error(SAXParseException e) throws SAXException
    <h6>     {
    <h6>          // sSystem.out.println("Error" + e.getMessage());
    <h6>          // throw e;
    <h6>     }
    <h6>
    <h6>     public void fatalError(SAXParseException e)
    <h6>     {
    <h6>          // throw e;
    <h6>          // System.out.println("SAP Fatal Error" + e.getMessage());
    <h6>
    <h6>     }
    <h6>
    <h6>}
    <h6>
    <h6>Unfortunately the program always stopped while catching the first error. Check the below log.
    <h6>
    <h6>com.sap.engine.lib.xml.parser.NestedSAXParserException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException:
    <h6>ERRORS :
    <h6>cvc-simple-type : information item <h6>'/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]/:CityName[1]' <h6>is not valid, because it's value does not satisfy the constraints of facet 'minLength' with value '1'.
    <h6>cvc-data : information item <h6>'/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]/:CityName[1]' <h6>is is not valid with respoct to the corresponding simple type definition.
    <h6>cvc-element : element information item <h6>'/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]/:CityName[1]' <h6>is associated with invalid data.
    <h6>cvc-element : element information item <h6>'/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]' <h6>is not valid with respect to it's complex type definition..
    <h6>cvc-element : element information item <h6>'/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]' <h6>is not valid with respect to it's complex type definition..
    <h6>cvc-element : element information item <h6>'/:ShipNotice[1]/:Header[1]/:To[1]' <h6>is not valid with respect to it's complex type definition..
    <h6>cvc-element : element information item <h6>'/:ShipNotice[1]/:Header[1]' <h6>is not valid with respect to it's complex type definition..
    <h6>cvc-element : element information item '/:ShipNotice[1]' is not valid with <h6>respect to it's complex type definition..
    <h6> -> com.sap.engine.lib.xml.parser.ParserException:
    <h6>
    <h6>
    <h6>I tried using Xerces and JAXP to do validation, the same error happened. I have no idea on this. Does xi has its own error <h6>handler logic? Is there any body can make me get out of this?
    <h6>Thanks.

  • Database with many schemas - query schema depending on user

    Let's assume we have a number of schemas in a database (hundred or so), which all contain the same tables.
    The customer wants one application express application which accesses only the schema corresponding to the user that is currently logged in.
    So database schema user1 contains table EMP, and schema user2 also contains EMP. Now the application is assigned both schemas user1 and user2, and when user2 logs in he only sees database schema user2.
    Is this possible with Apex? I've tried both built-in authentication and database authentication for the application, but found out this is truly only about authentication, because the query is always executed by APEX_PUBLIC_USER.
    How can I manage which schema is accessed with the authenticated user?
    Thanks in advance!

    Patrick,
    Every apex application has an "owner" attribute which is used as the parsing schema. All SQL and PL/SQL in your app is parsed as that schema using that schema's privileges. It is as if your application were a definer's rights stored procedure in that schema. The APEX_PUBLIC_USER schema is simply used to create the session and has no bearing on privileges. Currently there is no way to change the owner attribute of an application at runtime. However, your application can operate with any schema in the database according to the privileges granted to the parsing schema. Something along the lines of what you described was discussed at length in the following thread, maybe it will give you some ideas to try out: Access to owner schema throught APIs
    Scott

  • Using dbms_datapump package to export the schema with the schema name as pa

    Hi,
    I am using the pl/sql block to export schema using dbms_datapump package,Now I want to pass the scheme name as the parameter to the procedure and get the .dmp and .log files with the schema name included.
    CREATE OR REPLACE PROCEDURE export
    IS
    h1 number;
    begin
    h1 := dbms_datapump.open (operation => 'EXPORT', job_mode => 'SCHEMA', job_name => 'export1', version => 'COMPATIBLE');
    dbms_datapump.set_parallel(handle => h1, degree => 1);
    dbms_datapump.add_file(handle => h1, filename => 'EXPDAT.LOG', directory => 'DATA_PUMP_DIR', filetype => 3);
    dbms_datapump.set_parameter(handle => h1, name => 'KEEP_MASTER', value => 0);
    dbms_datapump.metadata_filter(handle => h1, name => 'SCHEMA_EXPR', value => 'IN(''CHECKOUT'')');
    dbms_datapump.set_parameter(handle => h1, name => 'ESTIMATE', value => 'BLOCKS');
    dbms_datapump.add_file(handle => h1, filename => 'EXPDAT%U' || to_char(sysdate,'dd-mm-yyyy') || '.DMP', directory => 'DATA_PUMP_DIR', filetype => 1);
    dbms_datapump.set_parameter(handle => h1, name => 'INCLUDE_METADATA', value => 1);
    dbms_datapump.set_parameter(handle => h1, name => 'DATA_ACCESS_METHOD', value => 'AUTOMATIC');
    dbms_datapump.start_job(handle => h1, skip_current => 0, abort_step => 0);
    dbms_datapump.detach (handle => h1);
    exception
    when others then
    raise_application_error(-20001,'An error was encountered - '||SQLCODE||' -ERROR- '||SQLERRM);
    end;
    Thank you in advanced
    Sri

    user12062360 wrote:
    Hi,
    I am using the pl/sql block to export schema using dbms_datapump package,Now I want to pass the scheme name as the parameter to the procedure and get the .dmp and .log files with the schema name included.
    OK, please proceed to do so
    >
    CREATE OR REPLACE PROCEDURE export
    IS
    h1 number;
    begin
    h1 := dbms_datapump.open (operation => 'EXPORT', job_mode => 'SCHEMA', job_name => 'export1', version => 'COMPATIBLE');
    dbms_datapump.set_parallel(handle => h1, degree => 1);
    dbms_datapump.add_file(handle => h1, filename => 'EXPDAT.LOG', directory => 'DATA_PUMP_DIR', filetype => 3);
    dbms_datapump.set_parameter(handle => h1, name => 'KEEP_MASTER', value => 0);
    dbms_datapump.metadata_filter(handle => h1, name => 'SCHEMA_EXPR', value => 'IN(''CHECKOUT'')');
    dbms_datapump.set_parameter(handle => h1, name => 'ESTIMATE', value => 'BLOCKS');
    dbms_datapump.add_file(handle => h1, filename => 'EXPDAT%U' || to_char(sysdate,'dd-mm-yyyy') || '.DMP', directory => 'DATA_PUMP_DIR', filetype => 1);
    dbms_datapump.set_parameter(handle => h1, name => 'INCLUDE_METADATA', value => 1);
    dbms_datapump.set_parameter(handle => h1, name => 'DATA_ACCESS_METHOD', value => 'AUTOMATIC');
    dbms_datapump.start_job(handle => h1, skip_current => 0, abort_step => 0);
    dbms_datapump.detach (handle => h1);
    exception
    when others then
    raise_application_error(-20001,'An error was encountered - '||SQLCODE||' -ERROR- '||SQLERRM);
    end;
    EXCEPTION handler is a bug waiting to happen.
    eliminate it entirely

  • How to share data in "User_*" tables with another schema

    I would like to share the data in the USER_SEGMENTS table with another schema. If I create a view and grant select on the view, when the other schema queries the view the data is identical to themselves querying the SYS.user_segments table directly.
    create view sys_user_segments as select * from sys.user_segments;
    grant select on sys_user_segments to A;My guess is that the SYS.user_segments table is a view based on the current user.
    Is there a way to share this data without creating a copy of the table?
    Oracle: 10g
    Thanks

    Hi,
    All the data dictionary "tables" whose names start with user_ (or all_ or dba_) are actually views, and what results they bring back depend on what schema you logged in to. I don't think there's any way to allow user A to directly see what's in user B's version of user_segments.
    Why do you need this? Can you use the all_ views instead, by giving A some privileges on B's objects?
    Failing that, you can replicate the data into a regular table. Inside a AUTHID DEFINER stored procedure, the data dictionary views (such as user_segments) are the versions of the procedure owner, so B can write a stored procedure (let's call it populate_my_segments) that populates a regular table (let's call it my_segements), and then grant EXECUTE privilges on populat_my_segments and SELECT privileges on my_segements to user A. A can then refresh the table and look at it whenever he wants to.
    If A only needs to see a little information, e.g. the total number of bytes, from B's user_segments, then B can write a function just to return that information.

  • Unable to access the objects with out schema as prefix.. can any body help

    Hi,
    i am using 10g.I have one problem like i unable to get the table access with out mention prefix for that table.
    but i created public synonym and gave all grants to all users also. but still i need to mention schema name as prefix otherwise it give the error..
    can any body tell me reason and give me solution.
    ex: owner:eiis table:eiis_wipstock
    connect to: egps schema
    in this position if i try with eiis.wipstock it gives error but if i mention like eiis.wiis_wipstock then its working fine.

    Pl do not spam the forums with duplicate posts - Unable to access the objects with out schema as prefix.. can any body help

  • Mapping with xml-schema XML-data to relational tables

    Hello,
    is it possible to map data from xml documents to relational tables with xml-schema?
    I mean not in nested tables but in relational tables with primary and foreign keys!
    With SQL Server 2005 it is very easy, I dont believe that Oracle couldn't do this!
    I searched but i cant find anything about that!
    Thx
    user445232

    indeed, oracle does this for xml schema based xmltype data, however, these underlying tables are not accessable to the application. Maybe It should for next version, so folks who like to use relational model can use it without mapping it manually.
    Actually, nested tables, are the same, their underlying tables (segments) are indeed relational tables, oracle manages them internally and not visiable to the application. You can find them in the user_segments, user_objects views though.

Maybe you are looking for

  • Does DVI-to-HDMI work with my Mini DisplayPort to DVI adapter?

    Hi, I have a Mini DisplayPort to DVI adapter and was wondering if I get a DVI-to-HDMI, will I be able to get HDMI output? If yes, should I get any specific DVI-to-HDMI adapter? If yes, will it have sound with it? Thanks.

  • Components inside components (Flash 8)

    Hi, I have an Accordion component which needs to contain a number of small forms, each of which is built as a MovieClip containing TextInput, Button, ComboBox, etc. So, I build my little forms in Flash, make them into MovieClips, give them a linkage

  • Mail not sending attachments

    On behalf of a friend who I usually do phone support for when he has a problem. This problem has stumped me! Mail 4.5 (1084) Mac OSX 10.6.8 He has mail set to access Gmail (IMAP) and it works fine when sending a normal email, however, when sending an

  • X60 Preloaded w/ Vista, currently running Windows 7, needs to reformat

    I have a Thinkpad X60 that came with Windows Vista Business Edition, installed Windows 7 Professional when it came out.  I want to clean everything off of the hard drive but keep Windows 7 on there.  Is it true that if I use  the "ThinkVantage" butt

  • Icloud app does not load when I open outlook

    I installed control panel & set it up for outlook. when I open outlook I have to manually start Icloud add in.  shows add in as inactive in "file"/ "options"/. I have uninstalled/re-installed icloud which hasn't made a difference.