Marshalling 'autotype' generated objects back to XML

I have a document-literal webservice implementation that uses
WebLogic request/response binding classes generated by
'autotype'. My trouble is that there does not seem to be any way to programmatically
transform these Java objects back into XML form. I'm fairly new to web services
development with webLogic, so I may be missing something, and my hope is that
there is a straight-forward solution for this.
I have tried to use the serialize method from the Codec class, but something in
the underlying implementation throws a NullPointerException in reference to the
SerializationContext object. And I can't seem to find any documentation on this
object, or anything explicitly pertaining to marshalling back to XML. So at this
point, my less than desirable approach is to create a set of parallel classes
using JAXB, so that I can have access to the JAXBContext marshaller.
Here is the underlying method for our web service operation (which unsuccessfully
calls the serialize method on the codec class):
public com.hp.bea.OutValidateConfig validate_v1_2(com.hp.bea.InValidateConfig
validateRequest)
InValidateConfigCodec vcrequestCodec = new InValidateConfigCodec();
weblogic.xml.stream.XMLName xmlType =
weblogic.xml.stream.ElementFactory.createXMLName( "http://production.psg.hp.com/types"
, "InValidateConfigType" );
try {
DocumentBuilder docBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
Document vcDoc = docBuilder.newDocument();
XMLOutputStream xmlOutputStream = XMLOutputStreamFactory.newInstance().newOutputStream(vcDoc);
SerializationContext ctx= SerializationContextFactory.newInstance().createSerializationContext();
// ctx.setNamespacePrefixMap();
if ( validateRequest == null )
System.out.println("ValidateRequest is null");
else
System.out.println("ValidateRequest is not null");
System.out.println(validateRequest);
try
vcrequestCodec.serialize(validateRequest, xmlType, xmlOutputStream, ctx);
catch (Exception excp)
excp.printStackTrace();
// TODO - call service handler
Document vcResp = docBuilder.newDocument();
OutValidateConfigCodec vcResponseCodec = new OutValidateConfigCodec();
XMLInputStream xmlInputStream = XMLInputStreamFactory.newInstance().newInputStream(vcResp);
DeserializationContext dCtx= DeserializationContextFactory.newInstance().createDeserializationContext();
vcResponseCodec.deserialize(xmlType, xmlInputStream, dCtx);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
return null;
There must be something I'm missing, because I'm sure there is a simple way to
Marshall my object back to XML. Am I using the wrong API? Can someone please
shed some light on this? Any insight or suggestions are much appreciated.
Thank you,
Matt

Hi Matthew,
Try this example from Manoj [1] and see it fits your use case.
Hope this helps,
Bruce
[1]
http://www.manojc.com/?sample43
Matthew Cohen wrote:
>
I have a document-literal webservice implementation that uses
WebLogic request/response binding classes generated by
'autotype'. My trouble is that there does not seem to be any way to programmatically
transform these Java objects back into XML form. I'm fairly new to web services
development with webLogic, so I may be missing something, and my hope is that
there is a straight-forward solution for this.
I have tried to use the serialize method from the Codec class, but something in
the underlying implementation throws a NullPointerException in reference to the
SerializationContext object. And I can't seem to find any documentation on this
object, or anything explicitly pertaining to marshalling back to XML. So at this
point, my less than desirable approach is to create a set of parallel classes
using JAXB, so that I can have access to the JAXBContext marshaller.
Here is the underlying method for our web service operation (which unsuccessfully
calls the serialize method on the codec class):
public com.hp.bea.OutValidateConfig validate_v1_2(com.hp.bea.InValidateConfig
validateRequest)
InValidateConfigCodec vcrequestCodec = new InValidateConfigCodec();
weblogic.xml.stream.XMLName xmlType =
weblogic.xml.stream.ElementFactory.createXMLName( "http://production.psg.hp.com/types"
, "InValidateConfigType" );
try {
DocumentBuilder docBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
Document vcDoc = docBuilder.newDocument();
XMLOutputStream xmlOutputStream = XMLOutputStreamFactory.newInstance().newOutputStream(vcDoc);
SerializationContext ctx= SerializationContextFactory.newInstance().createSerializationContext();
// ctx.setNamespacePrefixMap();
if ( validateRequest == null )
System.out.println("ValidateRequest is null");
else
System.out.println("ValidateRequest is not null");
System.out.println(validateRequest);
try
vcrequestCodec.serialize(validateRequest, xmlType, xmlOutputStream, ctx);
catch (Exception excp)
excp.printStackTrace();
// TODO - call service handler
Document vcResp = docBuilder.newDocument();
OutValidateConfigCodec vcResponseCodec = new OutValidateConfigCodec();
XMLInputStream xmlInputStream = XMLInputStreamFactory.newInstance().newInputStream(vcResp);
DeserializationContext dCtx= DeserializationContextFactory.newInstance().createDeserializationContext();
vcResponseCodec.deserialize(xmlType, xmlInputStream, dCtx);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
return null;
There must be something I'm missing, because I'm sure there is a simple way to
Marshall my object back to XML. Am I using the wrong API? Can someone please
shed some light on this? Any insight or suggestions are much appreciated.
Thank you,
Matt

Similar Messages

  • Unmarshall and Marshall back to XML yeild different result

    Hi,
    Iam unmarshalling input.xml to an java object and marshal it back to xml string. Iam not getting the same result. Any light on this? Is is because of the anyType? If validate the unmarshalled object it throws an error, but if i dont validate the code works giving the following result.
    PTest.xsd
    <?xml version="1.0" encoding="UTF-8"?>
    <schema targetNamespace="http://test.com"
    xmlns="http://www.w3.org/2001/XMLSchema"
    xmlns:tns="http://test.com"
    elementFormDefault="qualified">
    <complexType name="POuterType" abstract="true">
    <sequence>
    <choice>
    <element name="Inner1" type="anyType" />
    <element name="Inner2" type="anyType"/>
    </choice>
    </sequence>
    </complexType>
    </schema>
    Test.xsd
    <?xml version="1.0" encoding="UTF-8"?>
    <schema targetNamespace="http://test.com"
    xmlns="http://www.w3.org/2001/XMLSchema"
    xmlns:tns="http://test.com" elementFormDefault="qualified" >
    <include schemaLocation="PTest.xsd"></include>
    <complexType name="OuterType">
    <complexContent>
    <restriction base="tns:POuterType">
    <sequence>
    <choice>
    <element name="Inner1">
    <complexType>
    <sequence>
    <element name="TimeStamp" type="dateTime">
    </element>
    </sequence>
    </complexType>
    </element>
    <element name="Inner2">
    <complexType>
    <sequence>
    <element name="TimeStamp" type="dateTime">
    </element>
    </sequence>
    </complexType>
    </element>
    </choice>
    </sequence>
    </restriction>
    </complexContent>
    </complexType>
    <element name="Outer" type="tnsuterType"></element>
    </schema>
    Test.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <tnsuter xmlns:tns="http://test.com"
    xmlnssi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://test.com Test.xsd ">
    <tns:Inner1>
    <tns:TimeStamp>2001-12-31T12:00:00</tns:TimeStamp>
    </tns:Inner1>
    </tnsuter>
    Main.java
    public static void main(String[] args) throws Exception {
    JAXBContext ctx = JAXBContext.newInstance("test.vo" );
    Unmarshaller unmarsh = ctx.createUnmarshaller();
    Marshaller marsh = ctx.createMarshaller();
    marsh.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, new Boolean(true));
    marsh.setProperty(Marshaller.JAXB_SCHEMA_LOCATION,"http://test.com Test.xsd");
    Validator validator = ctx.createValidator();
    //Create an Object
    ObjectFactory obj = new ObjectFactory();
    Outer out =
    (Outer)unmarsh.unmarshal(
    new FileInputStream( "e:/agilan/JAXBTest/JAXBTe/references/XMLSchema/test/Test.xml" ) );
    StringWriter sw2 = new StringWriter();
    marsh.marshal(out, new PrintWriter(sw2) );
    StringBuffer sb2 = sw2.getBuffer();
    System.out.println(sb2.toString() );
    Result
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <Outer xsi:schemaLocation="http://test.com Test.xsd" xmlnssi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://test.com">
    <Inner1>
    </Inner1>
    </Outer>
    Please not the timestamp tag is missing, which is present in the input.xml
    Iam struck up with is problem for the past 5days, without any clue. Please help.
    Additionally if I add the validation code after unmarsh.unmarshal(..).
    Iam getting the following exception
    Exception in thread "main" com.sun.xml.bind.serializer.AbortSerializationException: tag name "test.vo.AnyType" is not allowed. Possible tag names are: <test.vo.OuterType.Inner1Type>
         at test.vo.impl.runtime.ValidationContext.reportEvent(ValidationContext.java:199)
         at test.vo.impl.runtime.ValidationContext.reportEvent(ValidationContext.java:166)
         at test.vo.impl.runtime.MSVValidator.childAsElementBody(MSVValidator.java:336)
         at test.vo.impl.runtime.MSVValidator.childAsBody(MSVValidator.java:292)
         at test.vo.impl.POuterTypeImpl.serializeBody(POuterTypeImpl.java:61)
         at test.vo.impl.OuterTypeImpl.serializeBody(OuterTypeImpl.java:30)
         at test.vo.impl.runtime.MSVValidator._validate(MSVValidator.java:102)
         at test.vo.impl.runtime.MSVValidator.validate(MSVValidator.java:77)
         at test.vo.impl.runtime.ValidationContext.validate(ValidationContext.java:75)
         at test.vo.impl.runtime.MSVValidator.childAsElementBody(MSVValidator.java:366)
         at test.vo.impl.runtime.MSVValidator.childAsBody(MSVValidator.java:292)
         at test.vo.impl.OuterImpl.serializeBody(OuterImpl.java:87)
         at test.vo.impl.runtime.MSVValidator._validate(MSVValidator.java:102)
         at test.vo.impl.runtime.MSVValidator.validate(MSVValidator.java:77)
         at test.vo.impl.runtime.ValidationContext.validate(ValidationContext.java:75)
         at test.vo.impl.runtime.ValidatorImpl.validate(ValidatorImpl.java:121)
         at test.vo.impl.runtime.ValidatorImpl.validateRoot(ValidatorImpl.java:95)
         at client.Main.main(Main.java:72)
    --------------- linked to ------------------
    javax.xml.bind.ValidationException
    - with linked exception:
    [com.sun.xml.bind.serializer.AbortSerializationException: tag name "test.vo.AnyType" is not allowed. Possible tag names are: <test.vo.OuterType.Inner1Type>]
         at test.vo.impl.runtime.ValidatorImpl.validate(ValidatorImpl.java:131)
         at test.vo.impl.runtime.ValidatorImpl.validateRoot(ValidatorImpl.java:95)
         at client.Main.main(Main.java:72)
    DefaultValidationEventHandler: [ERROR]: tag name "test.vo.AnyType" is not allowed. Possible tag names are: <test.vo.OuterType.Inner1Type>
    Location: obj: test.vo.impl.OuterTypeImpl@f84386
    Iam badly struckup with this problem for the past 5 days please help

    Hi,
    Iam unmarshalling input.xml to an java object and marshal it back to xml string. Iam not getting the same result. Any light on this? Is is because of the anyType? If validate the unmarshalled object it throws an error, but if i dont validate the code works giving the following result.
    PTest.xsd
    <?xml version="1.0" encoding="UTF-8"?>
    <schema targetNamespace="http://test.com"
    xmlns="http://www.w3.org/2001/XMLSchema"
    xmlns:tns="http://test.com"
    elementFormDefault="qualified">
    <complexType name="POuterType" abstract="true">
    <sequence>
    <choice>
    <element name="Inner1" type="anyType" />
    <element name="Inner2" type="anyType"/>
    </choice>
    </sequence>
    </complexType>
    </schema>
    Test.xsd
    <?xml version="1.0" encoding="UTF-8"?>
    <schema targetNamespace="http://test.com"
    xmlns="http://www.w3.org/2001/XMLSchema"
    xmlns:tns="http://test.com" elementFormDefault="qualified" >
    <include schemaLocation="PTest.xsd"></include>
    <complexType name="OuterType">
    <complexContent>
    <restriction base="tns:POuterType">
    <sequence>
    <choice>
    <element name="Inner1">
    <complexType>
    <sequence>
    <element name="TimeStamp" type="dateTime">
    </element>
    </sequence>
    </complexType>
    </element>
    <element name="Inner2">
    <complexType>
    <sequence>
    <element name="TimeStamp" type="dateTime">
    </element>
    </sequence>
    </complexType>
    </element>
    </choice>
    </sequence>
    </restriction>
    </complexContent>
    </complexType>
    <element name="Outer" type="tnsuterType"></element>
    </schema>
    Test.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <tnsuter xmlns:tns="http://test.com"
    xmlnssi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://test.com Test.xsd ">
    <tns:Inner1>
    <tns:TimeStamp>2001-12-31T12:00:00</tns:TimeStamp>
    </tns:Inner1>
    </tnsuter>
    Main.java
    public static void main(String[] args) throws Exception {
    JAXBContext ctx = JAXBContext.newInstance("test.vo" );
    Unmarshaller unmarsh = ctx.createUnmarshaller();
    Marshaller marsh = ctx.createMarshaller();
    marsh.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, new Boolean(true));
    marsh.setProperty(Marshaller.JAXB_SCHEMA_LOCATION,"http://test.com Test.xsd");
    Validator validator = ctx.createValidator();
    //Create an Object
    ObjectFactory obj = new ObjectFactory();
    Outer out =
    (Outer)unmarsh.unmarshal(
    new FileInputStream( "e:/agilan/JAXBTest/JAXBTe/references/XMLSchema/test/Test.xml" ) );
    StringWriter sw2 = new StringWriter();
    marsh.marshal(out, new PrintWriter(sw2) );
    StringBuffer sb2 = sw2.getBuffer();
    System.out.println(sb2.toString() );
    Result
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <Outer xsi:schemaLocation="http://test.com Test.xsd" xmlnssi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://test.com">
    <Inner1>
    </Inner1>
    </Outer>
    Please not the timestamp tag is missing, which is present in the input.xml
    Iam struck up with is problem for the past 5days, without any clue. Please help.
    Additionally if I add the validation code after unmarsh.unmarshal(..).
    Iam getting the following exception
    Exception in thread "main" com.sun.xml.bind.serializer.AbortSerializationException: tag name "test.vo.AnyType" is not allowed. Possible tag names are: <test.vo.OuterType.Inner1Type>
         at test.vo.impl.runtime.ValidationContext.reportEvent(ValidationContext.java:199)
         at test.vo.impl.runtime.ValidationContext.reportEvent(ValidationContext.java:166)
         at test.vo.impl.runtime.MSVValidator.childAsElementBody(MSVValidator.java:336)
         at test.vo.impl.runtime.MSVValidator.childAsBody(MSVValidator.java:292)
         at test.vo.impl.POuterTypeImpl.serializeBody(POuterTypeImpl.java:61)
         at test.vo.impl.OuterTypeImpl.serializeBody(OuterTypeImpl.java:30)
         at test.vo.impl.runtime.MSVValidator._validate(MSVValidator.java:102)
         at test.vo.impl.runtime.MSVValidator.validate(MSVValidator.java:77)
         at test.vo.impl.runtime.ValidationContext.validate(ValidationContext.java:75)
         at test.vo.impl.runtime.MSVValidator.childAsElementBody(MSVValidator.java:366)
         at test.vo.impl.runtime.MSVValidator.childAsBody(MSVValidator.java:292)
         at test.vo.impl.OuterImpl.serializeBody(OuterImpl.java:87)
         at test.vo.impl.runtime.MSVValidator._validate(MSVValidator.java:102)
         at test.vo.impl.runtime.MSVValidator.validate(MSVValidator.java:77)
         at test.vo.impl.runtime.ValidationContext.validate(ValidationContext.java:75)
         at test.vo.impl.runtime.ValidatorImpl.validate(ValidatorImpl.java:121)
         at test.vo.impl.runtime.ValidatorImpl.validateRoot(ValidatorImpl.java:95)
         at client.Main.main(Main.java:72)
    --------------- linked to ------------------
    javax.xml.bind.ValidationException
    - with linked exception:
    [com.sun.xml.bind.serializer.AbortSerializationException: tag name "test.vo.AnyType" is not allowed. Possible tag names are: <test.vo.OuterType.Inner1Type>]
         at test.vo.impl.runtime.ValidatorImpl.validate(ValidatorImpl.java:131)
         at test.vo.impl.runtime.ValidatorImpl.validateRoot(ValidatorImpl.java:95)
         at client.Main.main(Main.java:72)
    DefaultValidationEventHandler: [ERROR]: tag name "test.vo.AnyType" is not allowed. Possible tag names are: <test.vo.OuterType.Inner1Type>
    Location: obj: test.vo.impl.OuterTypeImpl@f84386
    Iam badly struckup with this problem for the past 5 days please help

  • How To Generate Objects From XML and DTD?

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

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

  • Converting a class object back to a .class file

    Hi,
    How can i convert a class object back to a .class file ? Thanks

    any pointers on how to do it then ? i don't have
    access to the native codeIf I have understood you correctly, you have native code that generates bytecode. Currently you load the class this bytecode represents right into the classloader, but you want to save it to disk as a .class file. Right?
    If so, you just have to get hold of that bytecode before it "disappears" into the classloader, and save it to disk. How you can best do this depends on exactly how you communicate with that native code.
    If I have misunderstood your problem (and that's not unlikely), please try to be clearer.

  • Xml data type is not supported in distributed queries. Remote object 'OPENROWSET' has xml column(s).

    Hi,
    Can anyone help me out please.
    I have written one stored Procedure to create a views using Openrowset(openquery) but for tables which contains xml data types throwing error while executing the SP. Error
    " Xml data type is not supported in distributed queries. Remote object 'OPENROWSET' has xml column(s)."
    Please refer the Stored Procedure & error message below.
    USE [Ice]
    GO
    /****** Object:  StoredProcedure [dbo].[Pr_DBAccess]    Script Date: 08/14/2014 16:08:20 ******/
    SET
    ANSI_NULLS ON
    GO
    SET
    QUOTED_IDENTIFIER ON
    GO
    ALTER
    PROCEDURE [dbo].[ Pr_DBAccess](@SERVERTYPE
    NVARCHAR(50),@SERVERNAME
    NVARCHAR(100),@DATABASENAME
    NVARCHAR(100),@SCHEMANAME
    NVARCHAR(100),@TABLENAME
    NVARCHAR(100),@USERNAME
    NVARCHAR(100),@PASSWORD
    NVARCHAR(100))
    AS
    BEGIN
    DECLARE @openquery
    NVARCHAR(4000),
    @ETL_CONFIG_IDN
    NVARCHAR(100);
     IF @SERVERTYPE='SQL'
     BEGIN
    SET @openquery= 
    'CREATE VIEW '+@TABLENAME+
    ' WITH ENCRYPTION AS SELECT * FROM OPENROWSET(''SQLNCLI'',''SERVER='+@SERVERNAME+';TRUSTED_CONNECTION=YES;'',''SELECT * FROM '+@DATABASENAME+'.'+@SCHEMANAME+'.'+@TABLENAME+''')'
    SELECT @openquery
    END
    EXECUTE
    sp_executesql @openquery
    END
    ----While running the SP manually below error occured

    HI ,
    1. You cannot use a table or view that contains xml or clr type as 4-part name in your query
    2. You need to cast the column to either nvarchar(max) or varbinary(max) or other appropriate type to use
    3. If you have a table that has xml type for example then you need to create a view that contains all columns other than xml and query it instead. Or you can issue a pass-through query using OPEN QUERY with the appropriate columns only.
    Here is a work around:
    SELECT
          Cast(a.XML_Data as XML) as XML_Data
    FROM
          OPENQUERY([LINKED SERVER NAME HERE],'
              SELECT
                Cast(XML_Data as Varchar) as XML_Data
             FROM
                [DATABASE NAME].[SCHEMA].[TABLE NAME]'
    ) a
    Basically, the data is queried on the remote server, converts the XML data to a varchar, sends the data to the requesting server and then reconverts it back to XML.
    You can take help from below link;
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/c6e0f4da-821f-4ba2-9b01-c141744076ef/xml-data-type-not-supported-in-distributed-queries?forum=transactsql
    Thanks

  • O/R tool generates invalid ejb-jar.xml for 1-n cmp bean-to-bean relations

    TopLink generates:
    <ejb-relation>
    <ejb-relation-name>Parent-Child</ejb-relation-name>
    <ejb-relationship-role>
    <ejb-relationship-role-name>Parent-has-childs</ejb-relationship-role-name>
    <multiplicity>One</multiplicity>
    <relationship-role-source>
    <ejb-name>Parent</ejb-name>
    </relationship-role-source>
    <cmr-field>
    <cmr-field-name>childs</cmr-field-name>
    </cmr-field>
    </ejb-relationship-role>
    <ejb-relationship-role>
    <ejb-relationship-role-name>child-owned-by-Parent</ejb-relationship-role-name>
    <multiplicity>Many</multiplicity>
    <cascade-delete></cascade-delete>
    <relationship-role-source>
    <ejb-name>Child</ejb-name>
    </relationship-role-source>
    </ejb-relationship-role>
    </ejb-relation>
    what's wrong?
    it's missing the following tag:
    '<cmr-field-type>java.util.Collection</cmr-field-type>'
    which should be in the <cmr-field> element after the <cmr-field-name>.
    I cannot get the UI tool to add this tag, whenever I manually add it to the ejb-jar.xml it gets removed the next time I generate the ejb-jar.xml. Additionally, if I try to update the project from the ejb-jar.xml, the O/R tool loses ALL my mappings for entity beans.
    Expected questions:
    TopLink 9.0.3
    WebLogic 7.0.1
    CMP 2.0
    JDK 1.3.1_03
    Yes the getter/setter are defined (on the local interface and bean)
    FYI,
    Andrew

    This should take care of it
    <ejb-jar>
    <enterprise-beans>
    <entity>
    <ejb-name>IDMaster</ejb-name>
    <home>maxateev.mondial.brg.idmaster.IDMasterHome</home>
    <remote>maxateev.mondial.brg.idmaster.IDMaster</remote>
    <local-home>maxateev.mondial.brg.idmaster.IDMasterLocalHome</local-home>
    <local>maxateev.mondial.brg.idmaster.IDMasterLocal</local>
    <ejb-class>maxateev.mondial.brg.idmaster.IDMasterEJB</ejb-class>
    <persistence-type>Container</persistence-type>
    <ejb-local-ref>
    <ejb-ref-name>ejb/IDMasterLocalHome</ejb-ref-name>
    <ejb-ref-type>Entity</ejb-ref-type>
    <local-home>maxateev.mondial.brg.idmaster.IDMasterLocalHome</local-home>
    <local>maxateev.mondial.brg.idmaster.IDMasterLocal</local>
    </ejb-local-ref>
    <prim-key-class>java.lang.String</prim-key-class>
    <reentrant>False</reentrant>
    <cmp-version>2.x</cmp-version>
    <abstract-schema-name>IDMaster</abstract-schema-name>
    <cmp-field>
    <field-name>idPrefix</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>idValue</field-name>
    </cmp-field>
    <primkey-field>idPrefix</primkey-field>
    <ejb-local-ref>
    <ejb-ref-name>ejb/IDMasterLocalHome</ejb-ref-name>
    <ejb-ref-type>Entity</ejb-ref-type>
    <local-home>maxateev.mondial.brg.idmaster.IDMasterLocalHome</local-home>
    <local>maxateev.mondial.brg.idmaster.IDMasterLocal</local>
    </ejb-local-ref>
    <query>
    <query-method>
    <method-name>findAllIDMasters</method-name>
    <method-params/>
    </query-method>
    <ejb-ql><![CDATA[SELECT OBJECT (f) FROM IDMaster as f]]></ejb-ql>
    </query>
    </entity>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name>IDMaster</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>

  • Test-OutlookConnectivity WARNING: An unexpected error has occurred and a Watson dump is being generated: Object reference not set to an instance of an object.

    Hi All,
    When we do a test-outlookconnectivity -protocol:http the result is a success but then we get the following:
    ClientAccessServer   ServiceEndpoint                               Scenario                           
    Result  Latency
    (MS)
    xxxxxxxxxxxx... xxxxxxxxxxxxxx                 Autodiscover: Web service request.  Success   46.80
    WARNING: An unexpected error has occurred and a Watson dump is being generated: Object reference not set to an instance
     of an object.
    Object reference not set to an instance of an object.
        + CategoryInfo          : NotSpecified: (:) [Test-OutlookConnectivity], NullReferenceException
        + FullyQualifiedErrorId : System.NullReferenceException,Microsoft.Exchange.Monitoring.TestOutlookConnectivityTask
    So it looks like it's not completing successfully.
    I can't find anything on this in particular, and don't really know how to go about solving it - We are fully up to date, Exchange 2010 Sp2 with Rollup 5-v2
    Any help appreciated!

    hi,
    I have the same issue also on Exchange 2010 SP2 RU5v2
    I ran your command and get the below
    [PS] C:\Installs\report\Activesync>Test-OutlookConnectivity -Protocol:http |FL
    RunspaceId                  : ebd2c626-1634-40ad-a17e-c9a713d1a62b
    ServiceEndpoint             : autodiscover.domain.com
    Id                          : Autodiscover
    ClientAccessServer          : CAS01.domain.com
    Scenario                    : Autodiscover: Web service request.
    ScenarioDescription         :
    PerformanceCounterName      :
    Result                      : Success
    Error                       :
    UserName                    : Gazpromuk.intra\extest_645e41faa55f4
    StartTime                   : 8/21/2013 4:08:50 PM
    Latency                     : 00:00:00.1250048
    EventType                   : Success
    LatencyInMillisecondsString : 125.00
    Identity                    :
    IsValid                     : True
    WARNING: An unexpected error has occurred and a Watson dump is being generated: Object reference not set to an instance of an object.
    Object reference not set to an instance of an object.
        + CategoryInfo          : NotSpecified: (:) [Test-OutlookConnectivity], NullReferenceException
        + FullyQualifiedErrorId : System.NullReferenceException,Microsoft.Exchange.Monitoring.TestOutlookConnectivityTask
     Any help would be greatly appreciated, I also get random failures of OWA, EAS and web services, very frustrating
    I have no errors in the app event log
    thanks
    Faisal Saleem Windows Systems Analyst 07595781867

  • How can we assign sproxy generated objects to a different package?

    Hello Expert,
    We need to change the package assigment of sproxy generated DDIC objects. How can we assign sproxy generated objects to a different package?
    Regards,
    Thulasi

    Any idea?

  • How to generate MT100 file in XML ?

    How to generate MT100 file in XML ?
    Dear All,
    Base:      We are working on ECC 6.0 version and developing B2B with bank.
    Requirement:     For B2B bank requires payment orders in MT100 format wrapped in XML.
    At Present:     I am using PMW format MT100(standard) in payment method. With the use of this format system is generating MT100 text file.
    In this standard PMW format MT100, check box for u201Dmapping using DME engineu201D is not selected. 
    My Try:      I  change in format output from file to XML in Payment Media Format (T. Code OBPM1), but it doesnu2019t work.
    In data medium display (T. Code FDTA) system is showing the following error.
    The XML page cannot be displayed
    Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.
    XML document must have a top level element. Error processing resource 'file:///C:/Users/888881/AppData/Local/Microsoft/Wind...
    In view source system is showing only this,
    <?xml version="1.0" encoding="utf-8"?>
    My Question:      How to generate MT100 file in XML ?
    Should I have to create DME Format Tree in ( T. Code DMEE )  and  create new Payment Media Format (T. Code OBPM1), with the mapping using DME engine ?
    Please give your valuable suggesions,
    Thank you,
    Rony

    Hi Prabhu,
    The program SAPFPAYM generates the payment Medium  on the basis of your configuration and background settings, this program does not bydefault give the output in the XML.
    Varient creation for the PMW in T. Code OBPM4, use the same program, which i already done it, even without this it is not be possible to create any payment Medium.
    Regards,
    Rony

  • Middleware:-Getting an error while generating objects

    Hi experts,
        While generating objects as part of middleware generation in CRM 5.0 i am getting errors in transaction "GENSTATUS" because of which i am not able to perform my initial load and the error message is "TIME LIMIT EXCEEDED". Also i am getting a short dump for that.
        Is there anything new in CRM 5.0 which needs to be done that was not there in CRM 4.0.
         Can anyone help me on how shall i proceed. 
    Thanks,
    Rahul

    Hi Natarajan,
           The above mentioned note is for an upgrade and not for new installation and even after doing it my problem is not resolved.
           Does anyone know how to remove the error that i am getting in transaction "genstatus".
    Regards,
    Rahul

  • Problem Updating Business Partner DI Object loaded via XML

    Hello,
    I'm working with  SB1 8.81 PL 08
    I have to Update a Business Partner Object in a Target SB1 Company Database starting from a Business Partner Objects saved as XML from the Source SB1 Company Database.
    Normally this works fine, I load from XML this Object and calling the Method Update all data is Syncronized in the Target DB.
    But if the Business Partner Object has at least a Contact Person and in the Target Company DB a Marketing Document has been created for this particular Business Partner the Update Method called on the loaded by XML object always fail giving the following error:
    Error: -10
    Message: Contact Person is referenced by another object.  , 'Sales Quotations [...contact Person ID...]'
    The modifications I need to update do not involve contact person in the BP object but only other simple properties like Tel Nr. ...
    In conclusion ... if the target BP has a marketing document created it seems no more possible to update it with an XML load, instead if a load the BP using the   GetByKey() Method and changing manually some properties of the object the Update works fine.
    Thank you for support.
    Max

    Hi,
    First Use the getbykey to get the Business partnet then update.
    sample code is available with B1WS package
    Regards.

  • CA - Error when trying to generate an amended RL1 XML file

    Dear Community,
    In case you try to generate an amended RL1 XML file and you get the error "Element content is invalid according to the DTD/Schema", it means the system incorrectly missed the tag corresponding to Box O. If you are facing this issue please access the wiki page below, which points to a FAQ in PY-CA, where you will be able to find how to solve it.
    http://wiki.sdn.sap.com/wiki/display/ERPHCM/FAQinPY-CA
    BTW, we created the question/answer from a suggestion of a customer who faced this issue before and believes through this way more people can find help and solve their issues quickly. Suggestions like this are more than welcome. Thanks for that!
    Kind regards.
    Felipe Grandi

    Hello All
    Those who are facing the DE9 SUI XML download issue for CA. I  created the very high priority OSS note to SAP, I explained issue to them. Please find their email below:
    They are going to come up with the fix on 04/25/2011
    Hi Murugappan,
    Thanks for raising the issue.
    As spoke on the phone, I'm fowarding your message to development. They
    will keep the analysis on monday and contact you with their results.
    Best regards,
    Gabriel Marx Bellina
    Support Engineer MS
    SAP Active Global Support- HCM

  • How to write the nodevalue back to xml file?

    Hi, Everybody:
    These are two packages I used. javax.xml.parsers.*,org.w3c.dom.*
    Now I use "setNodeValue("abc") to set the node value to "abc". But it is not really saved back into XML file. It only change the node value in memory.
    How to write the changes back to XML file? Thank you very much for your help.
    Michelle

    * Version : 1.00
    * File Purpose : Given the xml file loads into dom and recreate the file with the updated values.
    * Developer : Kashif Qasim : 25/july/04
    * Modify detail :
    import java.lang.*;
    import java.io.*;
    import java.util.*;
    import java.text.*;
    import org.w3c.dom.*;
    import org.apache.xerces.parsers.DOMParser;
    import org.apache.xerces.*;
    public class XMLWriter
    private String displayStrings[] = new String[5000];
    private int numberDisplayLines = 0;
    private Document document;
    //private final Node c;
    public synchronized void displayDocument(String uri,Vector UpdatedValues,String getTaskID)
    try {
    DOMParser parser = new DOMParser();
    parser.parse(uri);
    document = parser.getDocument();
    display(document, "",UpdatedValues);
    } catch (Exception e) {
    e.printStackTrace(System.err);
    ReadXmlConfig objReadXmlConfig = null;
    FileWriter filewriter = null;
    try {
    filewriter = new FileWriter(uri);
    for(int loopIndex = 0; loopIndex < numberDisplayLines; loopIndex++){
    filewriter.write(displayStrings[loopIndex].toCharArray());
    //System.out.println("displayStrings[loopIndex].toCharArray() "+displayStrings[loopIndex].toString());
    //filewriter.write("\n");
    filewriter.close();
    System.gc();
    objReadXmlConfig = new ReadXmlConfig();
    objReadXmlConfig.ITSLog("File updated for "+getTaskID+" succesfully, file is closed now ");
    } catch (IOException e) {
    System.err.println("Caught IOException: " + e.getMessage());
    objReadXmlConfig = new ReadXmlConfig();
    objReadXmlConfig.ITSErrorLog("File updated FAILED for "+getTaskID+". Reason for file error "+e.toString());
    }finally {
    if (filewriter != null) {
    System.out.println("Closing File");
    objReadXmlConfig =null;
    try{
    filewriter.close();
    }catch(IOException e){
    System.err.println("Caught IOException: " + e.getMessage());
    } else {
    System.out.println("File not open");
    private void display(Node node, String indent, Vector UpdtRecs)
    if (node == null) {
    return;
    int type = node.getNodeType();
    NodeList nodeList = document.getElementsByTagName("QueryParm");
    int TotalRecs = UpdtRecs.size();
    switch (type) {
    case Node.DOCUMENT_NODE: {
    displayStrings[numberDisplayLines] = indent;
    displayStrings[numberDisplayLines] +=
    "<?xml version=\"1.0\" encoding=\""+
    "UTF-8" + "\"?>";
    numberDisplayLines++;
    displayStrings[numberDisplayLines] += "\n";
    display(((Document)node).getDocumentElement(), "",UpdtRecs);
    break;
    case Node.ELEMENT_NODE: {
    if(node.getNodeName().equals("QueryParm")) {
    for(int i =0 ; i< nodeList.getLength() ; i++)
    Node nodeQry = nodeList.item(i);
    NamedNodeMap nnp = nodeQry.getAttributes();
    for(int j= 0 ; j < nnp.getLength() ; j++)
    Attr atr = (Attr) nnp.item(j);
    if(atr.getName().equalsIgnoreCase("value_"+(i+1)))
    //System.out.println(atr.getName() +" : " + atr.getNodeValue() );
    atr.setNodeValue(UpdtRecs.get(i).toString());
    displayStrings[numberDisplayLines] = indent;
    displayStrings[numberDisplayLines] += "<";
    displayStrings[numberDisplayLines] += node.getNodeName();
    int length = (node.getAttributes() != null) ?
    node.getAttributes().getLength() : 0;
    Attr attributes[] = new Attr[length];
    for (int loopIndex = 0; loopIndex < length; loopIndex++) {
    attributes[loopIndex] = (Attr)node.getAttributes().item(loopIndex);
    for (int loopIndex = 0; loopIndex < attributes.length; loopIndex++) {
    Attr attribute = attributes[loopIndex];
    displayStrings[numberDisplayLines] += " ";
    displayStrings[numberDisplayLines] += attribute.getNodeName();
    displayStrings[numberDisplayLines] += "=\"";
    displayStrings[numberDisplayLines] += attribute.getNodeValue();
    displayStrings[numberDisplayLines] += "\"";
    displayStrings[numberDisplayLines]+=">";
    numberDisplayLines++;
    NodeList childNodes = node.getChildNodes();
    if (childNodes != null) {
    length = childNodes.getLength();
    indent += " ";
    for (int loopIndex = 0; loopIndex < length; loopIndex++ ) {
    display(childNodes.item(loopIndex), indent,UpdtRecs);
    break;
    case Node.CDATA_SECTION_NODE: {
    displayStrings[numberDisplayLines] = "";
    displayStrings[numberDisplayLines] += "<![CDATA[";
    displayStrings[numberDisplayLines] += node.getNodeValue();
    displayStrings[numberDisplayLines] += "]]>";
    numberDisplayLines++;
    break;
    case Node.TEXT_NODE: {
    displayStrings[numberDisplayLines] = "";
    String newText = node.getNodeValue().trim();
    if(newText.indexOf("\n") < 0 && newText.length() > 0) {
    displayStrings[numberDisplayLines] += newText;
    displayStrings[numberDisplayLines] += "\n";
    numberDisplayLines++;
    break;
    case Node.PROCESSING_INSTRUCTION_NODE: {
    displayStrings[numberDisplayLines] = "";
    displayStrings[numberDisplayLines] += "<?";
    displayStrings[numberDisplayLines] += node.getNodeName();
    String text = node.getNodeValue();
    if (text != null && text.length() > 0) {
    displayStrings[numberDisplayLines] += text;
    displayStrings[numberDisplayLines] += "?>";
    displayStrings[numberDisplayLines] += "\n";
    numberDisplayLines++;
    break;
    if (type == Node.ELEMENT_NODE) {
    displayStrings[numberDisplayLines] = indent.substring(0,
    indent.length() - 4);
    displayStrings[numberDisplayLines] += "</";
    displayStrings[numberDisplayLines] += node.getNodeName();
    displayStrings[numberDisplayLines] += ">";
    displayStrings[numberDisplayLines] += "\n";
    numberDisplayLines++;
    indent += " ";
    public static void main(String args[])
    Vector xmlValue = new Vector();
    xmlValue.add(0,"Kashif");
    xmlValue.add(1,"Qasim");
    //displayDocument("NewMediation.xml",xmlValue);
    <?xml version="1.0" encoding="UTF-8"?>
    <Mediation>
    <Task1>
    <Source>
    <SourceDriver>com.microsoft.jdbc.sqlserver.SQLServerDriver</SourceDriver>
    <SourceConnection>jdbc:microsoft:sqlserver://10.2.1.58:1433;DatabaseName=MTCVB_HDS;</SourceConnection>
    <SourceUser>sa</SourceUser>
    <SourcePassword>sa</SourcePassword>
    <Table>
    <SourceTable>t_Agent</SourceTable>
    <SourceQuery><![CDATA[SELECT SkillTargetID,PersonID,PeripheralID,EnterpriseName,PeripheralNumber,Deleted,TemporaryAgent,AgentStateTrace,ChangeStamp FROM t_Agent where SkillTargetID > {value_1} order by SkillTargetID]]>
    </SourceQuery>
    <SourceParm BusinessRule="" ColumnName="SKILLTARGETID" ColumnNumber="1" DataType="Numeric" DefaultValue="0" Format="mm/dd/yyyy xx:xx:xx XX">
    </SourceParm>
    <SourceParm BusinessRule="" ColumnName="PERSONID" ColumnNumber="2" DataType="String" DefaultValue="" Format="">
    </SourceParm>
    <SourceParm BusinessRule="" ColumnName="PERIPHERALID" ColumnNumber="3" DataType="String" DefaultValue="" Format="">
    </SourceParm>
    <SourceParm BusinessRule="" ColumnName="ENTERPRISENAME" ColumnNumber="4" DataType="String" DefaultValue="" Format="">
    </SourceParm>
    <SourceParm BusinessRule="" ColumnName="PERIPHERALNUMBER" ColumnNumber="5" DataType="String" DefaultValue="" Format="">
    </SourceParm>
    <SourceParm BusinessRule="" ColumnName="DELETED" ColumnNumber="6" DataType="String" DefaultValue="" Format="">
    </SourceParm>
    <SourceParm BusinessRule="" ColumnName="TEMPORARYAGENT" ColumnNumber="7" DataType="String" DefaultValue="" Format="">
    </SourceParm>
    <SourceParm BusinessRule="" ColumnName="AGENTSTATETRACE" ColumnNumber="8" DataType="String" DefaultValue="" Format="">
    </SourceParm>
    <SourceParm BusinessRule="" ColumnName="CHANGESTAMP" ColumnNumber="9" DataType="String" DefaultValue="" Format="">
    </SourceParm>
    <QueryParm FldName_1="SkillTargetID" FldType_1="Number" value_1="0">
    </QueryParm>
    </Table>
    </Source>
    </Task1>
    </Mediation>
    The QueryParm values are updated thru this code :)
    Hope it helps u ...

  • How to create and instance of Java Object from an XML Document.

    Hi,
    How can we use a XML Document to create an instance of Java Object and do vice versa ie from the Java Object creating the XML Document.
    XML Document is available in the form of a String Object.
    Are there helper class available to achieve this.
    I need to do this in a Servlet.
    Regards
    Pramod.

    JAXB is part of JavaSE while Xmlbeans claims full schema support and full infoset fidelity.
    If the standard APIs do all that you need well then use them.

  • Display generated objects in BW 7.0

    Dear Experts,
    I wanted to display generated objects in BW 7.0 In 3.x it was possible to activate this setting via "settings -> display generated objects". I cannot find the setting in the BW 7.0
    Can someone give me an advice?
    Thanks in advance.
    Martina

    Hi, have you checked if your 8* object is visible when you search for it?  If you can check and just let us know, have checked my end and it is visible but see your point re the option from Settings menu
    Thanks

Maybe you are looking for