Marshalling: Configure JAXB Context

Hi,
  I'm trying to marshall objects which weren't included in the original (XML Schema) type definitions when creating a web service client from a WSDL file. I've create the respective classes/object factory and annotated them accordingly. How do I add the classes in my package to the JAXBContext so that I can marshall the object appropriately?
The following excerpt is the exception I'm getting currently, when trying to marshall a sample MyClass object.
Caused by: javax.xml.bind.JAXBException: com.example.MyClass nor any of its super class is known to this context
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getBeanInfo(JAXBContextImpl.java:477)
at com.sun.xml.bind.v2.runtime.property.SingleReferenceNodeProperty.serializeBody(SingleReferenceNodeProperty.java:68)
... 85 more
Please let me know if I should supply any further information. Any hints would be greatly appreciated.
Cheers,
felix

Hi,
  I'm trying to marshall objects which weren't included in the original (XML Schema) type definitions when creating a web service client from a WSDL file. I've create the respective classes/object factory and annotated them accordingly. How do I add the classes in my package to the JAXBContext so that I can marshall the object appropriately?
The following excerpt is the exception I'm getting currently, when trying to marshall a sample MyClass object.
Caused by: javax.xml.bind.JAXBException: com.example.MyClass nor any of its super class is known to this context
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getBeanInfo(JAXBContextImpl.java:477)
at com.sun.xml.bind.v2.runtime.property.SingleReferenceNodeProperty.serializeBody(SingleReferenceNodeProperty.java:68)
... 85 more
Please let me know if I should supply any further information. Any hints would be greatly appreciated.
Cheers,
felix

Similar Messages

  • Configure the Context menu

    Is it possible to configure the context menu in BEx 3.5?
    What I want is to give the user the possibility to access Go-To reports but not e.g use the drill-down option.

    There isn't option to modify the context menu.
    You can give only quey without free-characteristics and give only possibility of Report-to-report interface (query jump):
    Regards,
    Sergio

  • FWSM Failover configuration - One Context

    Hi,
    Is it possible to configure only one context in H.A. in FWSM? , yesterday  I tried to configure this but I can´t .
    Please check my configuration and tell me your opinon, or not is possible ,  maybe I have to configure all context in H.A.
    This message appears in the console when I active the FAILOVER
    Nov 23 2011 19:20:04: %FWSM-1-105002: (Secondary) Enabling failover.
    Nov 23 2011 19:20:08: %FWSM-1-105038: (Secondary) Interface count mismatch
    Nov 23 2011 19:20:08: %FWSM-1-104002: (Secondary) Switching to STNDBY - Other unit has different set of vlans configured
    Nov 23 2011 19:20:11: %FWSM-1-105001: (Secondary) Disabling failover.
    Nov 23 2011 19:23:58: %FWSM-6-302010: 0 in use, 46069 most used
    FWSM-Primario# show failover
    Failover On
    Failover unit PrimaryFailover LAN Interface: FAILLINK Vlan 1100 (up)
    Unit Poll frequency 1 seconds, holdtime 15 seconds
    Interface Poll frequency 15 seconds
    Interface Policy 50%
    Monitored Interfaces 1 of 250 maximum
    failover replication http
    Config sync: active
    Version: Ours 4.1(5), Mate 4.1(5)
    Last Failover at: 19:18:35 UTC Nov 23 2011
            This host: Primary - Active
                    Active time: 1125 (sec)
                    admin Interface inside (10.1.1.1): Normal (Not-Monitored)
                    admin Interface outside (20.1.1.1): No Link (Not-Monitored)
                    FW-GoB-Fija Interface WASOB2N-SISOB2N-Fija (10.115.30.36): Normal (Waiting)
                    GESTION-WAS Interface OUTSIDE (10.116.20.22): Normal (Not-Monitored)
                    GESTION-WAS Interface U2000 (10.123.20.1): Normal (Not-Monitored)
            Other host: Secondary - Cold Standby
                    Active time: 0 (sec)
                    admin Interface inside (0.0.0.0): Unknown (Not-Monitored)
                    admin Interface outside (0.0.0.0): Unknown (Not-Monitored)
                    FW-GoB-Fija Interface WASOB2N-SISOB2N-Fija (10.115.30.37): Unknown (Waiting)
                    GESTION-WAS Interface OUTSIDE (0.0.0.0): Unknown (Not-Monitored)
                    GESTION-WAS Interface U2000 (0.0.0.0): Unknown (Not-Monitored)
    Stateful Failover Logical Update Statistics
            Link : STATELINK Vlan 1101 (up)
            Stateful Obj    xmit       xerr       rcv        rerr     
            General         0          0          0          0       
            sys cmd         0          0          0          0       
            up time         0          0          0          0       
            RPC services    0          0          0          0       
            TCP conn        0          0          0          0       
            UDP conn        0          0          0          0       
            ARP tbl         0          0          0          0       
            Xlate_Timeout   0          0          0          0       
            AAA tbl         0          0          0          0       
            DACL            0          0          0          0       
            Acl optimization        0          0          0          0       
            OSPF Area SeqNo         0          0          0          0       
            Mamba stats msg         0          0          0          0       
            Logical Update Queue Information
                            Cur     Max     Total
            Recv Q:         0       0       0
            Xmit Q:         0       0       0
    FWSM-Primario# 
    FWSM-Primario#
    The configuration in the SW-6500
    SW-PRIMARY#sh run | in fire
    firewall multiple-vlan-interfaces
    firewall module 3 vlan-group 1,2
    firewall vlan-group 1  10,20,25,400,1709
    firewall vlan-group 2  1100,1101,1111,1112
    SW-SECUNDARY#sh run | in fire
    firewall multiple-vlan-interfaces
    firewall module 3 vlan-group 1,2
    firewall vlan-group 1  900,1709
    firewall vlan-group 2  1100,1101,1111,1112
    ip subnet-zero
    FWSM-Primario(config)# sh run
    : Saved
    FWSM Version 4.1(5) <system>
    resource acl-partition 12
    hostname FWSM-Primario
    hostname secondary FWSM-Secundario
    domain-name cisco.com
    enable password 8Ry2YjIyt7RRXU24 encrypted
    interface Vlan10
    interface Vlan29
    shutdown
    interface Vlan400
    interface Vlan1100
    description LAN Failover Interface
    interface Vlan1101
    description STATE Failover Interface
    interface Vlan1111
    description FWSW_7200_GoB_Fija
    interface Vlan1112
    description FWSW_7200_GoB_BA
    interface Vlan1709
    passwd 2KFQnbNIdI.2KYOU encrypted
    class default
      limit-resource IPSec 5
      limit-resource Mac-addresses 65535
      limit-resource ASDM 5
      limit-resource SSH 5
      limit-resource Telnet 5
      limit-resource All 0
    ftp mode passive
    pager lines 24
    failover
    failover lan unit primary
    failover lan interface FAILLINK Vlan1100
    failover replication http
    failover link STATELINK Vlan1101
    failover interface ip FAILLINK 10.115.30.17 255.255.255.252 standby 10.115.30.18
    failover interface ip STATELINK 10.115.30.21 255.255.255.252 standby 10.115.30.22
    failover group 1
      preempt
      replication http
    no asdm history enable
    arp timeout 14400
    console timeout 0
    admin-context admin
    context admin
      allocate-interface Vlan10
      allocate-interface Vlan29
      config-url disk:/admin.cfg
    context GESTION-WAS
      allocate-interface Vlan1709
      allocate-interface Vlan400
      config-url disk:/GESTION-WAS
    context FW-GoB-Fija
      allocate-interface Vlan1111
      allocate-interface Vlan1112
      config-url disk:/FW-GoB-Fija.cfg
      join-failover-group 1
    prompt hostname context
    Cryptochecksum:8b5fabc676745cfbafd6569c623a98b1
    : end
    SECUNDARY FIREWALL.
    FWSM# sh run
    : Saved
    FWSM Version 4.1(5) <system>
    resource acl-partition 12
    hostname FWSM
    domain-name cisco.com
    enable password S13FcA2URRiGrTIN encrypted
    interface Vlan100
    shutdown
    interface Vlan900
    interface Vlan1100
    description LAN Failover Interface
    interface Vlan1101
    description STATE Failover Interface
    interface Vlan1111
    interface Vlan1112
    interface Vlan1709
    passwd 2KFQnbNIdI.2KYOU encrypted
    class default
      limit-resource IPSec 5
      limit-resource Mac-addresses 65535
      limit-resource ASDM 5
      limit-resource SSH 5
      limit-resource Telnet 5
      limit-resource All 0
    ftp mode passive
    pager lines 24
    no failover
    failover lan unit secondary
    failover lan interface FAILLINK Vlan1100
    failover replication http
    failover link STATELINK Vlan1101
    failover interface ip FAILLINK 10.115.30.17 255.255.255.252 standby 10.115.30.18
    failover interface ip STATELINK 10.115.30.21 255.255.255.252 standby 10.115.30.22
    failover group 1
      preempt
      replication http
    no asdm history enable
    arp timeout 14400
    console timeout 0
    admin-context PCBA-NAT
    context PCBA-NAT
      allocate-interface Vlan1709
      allocate-interface Vlan900
      config-url disk:/PCBA-NAT
    context FW-GoB-Fija
      allocate-interface Vlan1111
      allocate-interface Vlan1112
      config-url disk:/FW-GoB-Fija
      join-failover-group 1
    prompt hostname context
    Cryptochecksum:c7529707b6d10d02c296a57253a925b2
    : end
    FWSM#
    I WILL APRECIATE YOUR COMMENTS, BECAUSE IT´S IMPORTANT , THE FWSM SUPPORT FOR DEFAULT 3 CONTEXT.
    Regards,
    Robert Soto.

    Hi Robert,
    Unfortunately no, this is not possible.
    Since you enable failover at the system level, all contexts will particpate in failover and there is no way to change this.
    Additionally, both firewalls in the failover pair must have identical licenses, VLANs, and software versions in order for failover to work properly.
    -Mike

  • Problem with JAXB context.createUnmarshaller();

    hi,
    I'm running into problems when trying to use JAXB context.createUnmarshaller();
    so far I have:
    1. extracted an xsd from my XML
    2. Added the following 4 jars to my project: jaxb-api,jaxb-xjc,jaxb-impl,jaxb1-impl
    3. used xjc and successfully generate the source for my custom classes
    4. compiled my custom classes and added them to my project's build path.
    I have the following code:
    //this line works and I can see the context being generated with my custom classes
    JAXBContext context = JAXBContext.newInstance("path.to.my.jaxb.bo's");
    //the following line returns an error
    Unmarshaller unmarshaller = context.createUnmarshaller();
    the error I get is:
    Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/stream/XMLStreamException
         at com.sun.xml.bind.v2.runtime.JAXBContextImpl.createUnmarshaller(JAXBContextImpl.java:604)
         at com.sun.xml.bind.v2.runtime.JAXBContextImpl.createUnmarshaller(JAXBContextImpl.java:107)
         at com.cyclicom.sem.ApiDao.SEMApiReader.readApi(SEMApiReader.java:46)
         at com.cyclicom.sem.SEMDataWriter.init(SEMDataWriter.java:26)
         at com.cyclicom.sem.SEMDataWriter.main(SEMDataWriter.java:19)

    ok, I just found the problem myself seems like a bunch of jars were missing, if your reading this and ran into the same problem make sure you have the following libs in your build path, on top of JAXB lib:
    sjsxp
    jwsdp-shared
    both are a part of the jwsdp

  • Xsi:type information is missing after Marshalling in JAXB

    Hi,
    I'm trying to mock the webservice, i have created classes for schema using JAXB (without any customization) and it's working. But when i try to marhsall my objects , it doesn't generate the xsi:type information of any element and attribute. I want this information since my webservice client needs this information.
    I have tried to use mapSimpleTypeDef ="true" generateElementProperty="false" but it doesn�t help.
    Following is output of marshal process
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <MessageRetrieveResponseReturn xmlns:java="java:types.api.brokerapi.soap.mms"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
         <return>
         <APIVersion>1.0</APIVersion>
         <ErrorCode>1000</ErrorCode>
         <ErrorInfo> Success</ErrorInfo>
         <BillingInfo xsi:type="java:BillingInfoObject" xsi:nil="true"/>
              <HeaderInfo xsi:type="java:HeaderInfoType" xsi:nil="true"/>
              <Content xsi:type="java:MessageContentType" xsi:nil="true"/>
              </return>
    </MessageRetrieveResponseReturn>
    I want output to be look like following
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <MessageRetrieveResponseReturn xmlns:java="java:types.api.brokerapi.soap.mms" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
         <return xsi:type="java:MessageRetrieveResponse" >
         <APIVersion xsi:type="java:apiVersionType">1.0</APIVersion>
         <ErrorCode xsi:type="xsd:string">1000</ErrorCode>
         <ErrorInfo xsi:type="xsd:string">Success</ErrorInfo>
         <BillingInfo xsi:type="java:BillingInfoObject" xsi:nil="true"/>
              <HeaderInfo xsi:type="java:HeaderInfoType" xsi:nil="true"/>
              <Content xsi:type="java:MessageContentType" xsi:nil="true"/>
              </return>
    </MessageRetrieveResponseReturn>
    I'm new to JAXB. Please let me know what I�m missing here
    Regards

    Not got a single answer , surprise whether the question is too dumb to ask or JAXB doesn't support feature or my requirement is weird :-) ... in any case let me know please
    regards

  • Marshalling with JaxB and HyperJaxb

    Hi guys,
    Can you guys help me based on what is happening below? What I don't
    understand is that HyperJaxB inserts the data fine. I only have
    this problem when pulling it out.
    In the schema, the element type is stated with minoccurs=0. It is true, that sometimes the data may or may not be present. I have also added nillable="true" to the XSD, but this doesn't seem to make a difference.
    Doing some more research on the problem, I discovered that it is
    because some of the XML types in my schema are optional. They occur
    in some documents and not others of the same type.
    Thanks,
    I am getting a null pointer exception as shown below:
    java.lang.NullPointerException
         at org.midwestiso.markets.markets.xml.impl.runtime.Util.getUserFriendlyTypeName(Util.java:71)
         at org.midwestiso.markets.markets.xml.impl.runtime.Util.handleTypeMismatchError(Util.java:56)
         at org.midwestiso.markets.markets.xml.impl.MKTDETTYPTypeImpl.serializeURIs(MKTDETTYPTypeImpl.java:137)
         at org.midwestiso.markets.markets.xml.impl.runtime.SAXMarshaller.childAsURIs(SAXMarshaller.java:419)
         at org.midwestiso.markets.markets.xml.impl.DASTLMTTypeImpl.serializeBody(DASTLMTTypeImpl.java:251)
         at org.midwestiso.markets.markets.xml.impl.DASTLMTImpl.serializeBody(DASTLMTImpl.java:50)
         at org.midwestiso.markets.markets.xml.impl.runtime.SAXMarshaller.childAsBody(SAXMarshaller.java:391)
         at org.midwestiso.markets.markets.xml.impl.runtime.MarshallerImpl.write(MarshallerImpl.java:171)
         at org.midwestiso.markets.markets.xml.impl.runtime.MarshallerImpl.marshal(MarshallerImpl.java:144)
         at javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMarshallerImpl.java:66)
         at com.transalta.miso.model.factory.SettlementTypeFactory.retrieveSettlements(SettlementTypeFactory.java:254)
         at com.transalta.miso.model.system.WebScrapeHandler.execute(WebScrapeHandler.java:146)
         at org.quartz.core.JobRunShell.run(JobRunShell.java:191)
         at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:516)

    JAXB does not support xs:any

  • Step by Step to configure cross-context in Weblogic 10.3.2

    Hello Everyone,
    How to configure a web application to allow cross context calls in Weblogic 10.3.2?
    Please let me know the solution on this?
    Thanks,
    Praveen

    Hi Praveen,
    Maybe you could take a look at [Using Sessions and Session Persistence|http://download.oracle.com/docs/cd/E17904_01/web.1111/e13712/sessions.htm#WBAPP300]
    Hope it helps,
    Luis

  • XML (un)marshalling with JAXB and "any" blocks

    I have 2 very simple XSD schema's.
    SchemaA.xsd:
    [request]-------[element_A] is xs:string
    |__(ANY)
    SchemaB.xsd:
    [body]--------[element_B] is xs:string
    The any block says that there can follow any type of xml after the element_a.
    In the xsd it is coded as: <xs:any />
    I compiled both schema's with jaxb, using this command line:
    xjc SchemaA.xsd -p test.request
    xjc SchemaB.xsd -p test.body -use-runtime test.request.impl.runtime
    I created the following code :
    test.request.ObjectFactory of1 = new test.request.ObjectFactory();
    test.body.ObjectFactory of2 = new test.body.ObjectFactory();
    Request r = of1.createRequest();
    r.setElementA("testing, element one");
    Body b = of2.createBody();
    b.setElementB("testing, element two");
    r.setAny(b);
    Marshaller m = of1.createMarshaller();
    m.marshal(r,System.out);
    And the result is what I expected:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <request><element_a>testing, element one</element_a><body><element_b>testing, element two</element_b></body></request>
    JAXB added the xml from the second schema to the first.
    Ok, so far so good. Now I'm trying to do it the other way around, I want to unmarshall that XML to objects again:
    String xml <- contains the outputted xml from the marshall (as pasted a few lines above)
    Unmarshaller um = of1.createUnmarshaller();
    Request r2 = (Request)um.unmarshal(new ByteArrayInputStream(xml.getBytes()));
    System.err.println(r2.getElementA());
    System.err.println(r2.getAny());
    The output:
    testing, element one
    null
    now, the first message is good. The second is not however...why is the "getAny" null ? I can't figure this one out. In the best possible case it should return an object that can be cast to "Body" .
    In the worst case it should just return the "<Body> ...." xml as string. But not null ...
    Any help on this is appreciated !

    JAXB does not support xs:any

  • How to configure initial-context-factory and provider_url on Websphere MQ

    I have a few questions about WebSphere MQ. Currently, my application is able work well with other JMS provider. But I would like to move to use WebSphere instead.
    Can anyone suggest me how to configure the application connecting WebSphere?
    �     I�m using the Initial java naming factory as bellows: com.sun.jndi.fscontext.RefFSContextFactoryIs it the correct class?
    �     About the java-naming-factory-url, How do I know what object that I should use? I found this example in JMSAdmin.config � iiop://localhost:7555� What�s iiop ?
    �     What jar file that I should add in my classpath?

    Hi,
    You have a few options...
    1. Use WebSphere Application Server as the JNDI provider
    2. Don't use JNDI
    3. Use the File System Context as the JNDI provider
    Exploring these options in a bit more detail...
    1. Use WebSphere Application Server as the JNDI provider
    Assuming you have WAS, the best way of obtaining your queue is to define the Queue and Queue Connection Factory objects in WAS using the admin console, then obtain them from the Initial Context as per the following article
    http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsp?topic=/com.ibm.websphere.express.doc/info/exp/ae/rnam_example_prop2.html
    If you prefer not to do JNDI lookups in your code a great alternative is to use Spring (www.springframework.org). If you haven't come across spring before it's well worth a look. One of it's many features is a bean factory for creating your objects. There is lots of support for retrieving JMS objects from JNDI, so in the main all you have to do is write some XML similar to the following...
    <bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate">
           <property name="environment">
                  <props>
                         <prop key="java.naming.factory.initial">${jndi.initialContextFactory}</prop>
                         <prop key="java.naming.provider.url">${jndi.providerUrl}</prop>
                  </props>
           </property>
    </bean>
    <bean id="queueConnectionFactory" class="org.springframework.jndi.JndiObjectFactoryBean">
           <property name="jndiTemplate" ref="jndiTemplate"/>
           <property name="jndiName" value="${jndi.queueConnectionFactory}"/>
    </bean>
    <bean id="queueName" class="org.springframework.jndi.JndiObjectFactoryBean">
           <property name="jndiTemplate" ref="jndiTemplate"/>
           <property name="jndiName" value="${jndi.queueName}"/>
    </bean>There's a bit more to it than this, but not much. I've been meaning to write a tutorial on this for a while so if you're interested let me know.
    2. Don't use JNDI
    This approach involves using the creating the native MQ Queue Connection Factory and Queue classes. You can hard code this, but it's much better to abstract it from your application. Again you can use Spring. The definition would look something like the following...
    <bean id="MQJMS_TP_CLIENT_MQ_TCPIP"
    class="org.springframework.beans.factory.config.FieldRetrievingFactoryBean">
           <property name="staticField">
                  <value>com.ibm.mq.jms.JMSC.MQJMS_TP_CLIENT_MQ_TCPIP</value>
           </property>
    </bean>
    <bean id="queueConnectionFactory" class="com.ibm.mq.jms.MQQueueConnectionFactory">
           <property name="transportType" ref="MQJMS_TP_CLIENT_MQ_TCPIP" />
           <property name="queueManager" value="${mq.queueManager}" />
           <property name="hostName" value="${mq.host}" />
           <property name="port" value="${mq.port}" />
           <property name="channel" value="${mq.channel}" />
    </bean>
    <bean id="publishInvoiceQ" class="com.ibm.mq.jms.MQQueue">
           <constructor-arg value="${mq.queueName}" />
    </bean>
    3. Use the File System Context
    The file system context is just like a JNDI context, but instead of using a url like iiop://host:port you have to specify a file system url. Because FSContext is just another JNDI context you can still use the spring configuration from option 1, but just change the relevant parameters.
    In order to define you queues and queue connection factory using the File System Context, you need to download a swing application called JMS Admin. Get it here
    http://www-1.ibm.com/support/docview.wss?rs=171&uid=swg24004691&loc=en_US&cs=utf-8&lang=en
    With regards your specific questions...
    IIOP is just another communication protocol. If you want more details I'm sure typing "what is iiop" into google will provide plenty of hits.
    I'll do my best to answer the remain two tomorrow - I wrote an application a few months ago which used the File System Context, but don't have the details to hand.

  • How to configure Goto context menu function on the web?

    We are running a web template on IE browser.  After the report run successfully, left click on any key figure column, we can see Goto context menu, from here, we can go to detailed report (e.g. from the current Cube level to more detailed ODS level).  However we find this jump from cube level to ODS level (Goto context manu) works on our QA system other than DEV system.  
    These stuff were configured by SAP consultants who left our company one year ago, if anyone knows how to make the Goto context menu works by drilling down from cube level to ODS level, please let us know and we are really appreciated!

    dear Bhanu,
    We figured out the problem, it is because we click Goto then select "Display Documents" which yields a 400 error, then go back to click Goto, pick up the target link we want and it yield the error.  After we hit F5 to reload the URL link, then directly select Goto our target, then it works fine!
    But one more question, under Goto context menu, we find four menu context items:
    1. Display Documents
    2. Documents for Navigation Status
    3. Our application target1
    4. Our application target2
    Select option 1 yields an error like mentioned above.
    Select option 2 pops up a new window with Key Figure selection box and a button called "Additional Functions", but seems go nowhere.
    Option 3 is setup in our system by using RSBBS like you suggested.
    Option 4 is not in RSBBS.
    Then our questions are for option 1, 2, and 4.  What are the functionalities of option 1 and 2, are these two standard web functionalities of BW web reports? and these two options always show up on the web no matter whether they work or not, right?  We are confused with option 4, it's not listed in RSBBS, then how come it show up?

  • Can an arbitrary object be marshalled with JAXB?

    Is it possible to marshall an arbitrary Java object with JAXB?
    I would think this is possible if
    (i) marshalling works on non-public fields
    (ii) xml can handle all Java primitive types, including byte[]
    And, it it is possible, how would you unmarshall it?
    bw

    I don't believe it is possible for JAXB to marshal and un-marshal an arbitrary object. Your object would need to implement the MarshallableObject. Usually with JAXB you wouldn't actually create the MarshallableObject yourself, you would just create it from your binding schema and DTD.

  • Configure webservice context url

    Hi
    I´m developing a jax-ws Web Service over Weblogic 11g.
    Every thing works fine, but I need to configure de URL in which this WS is deployed (I´m working on the server side, not on client). Now, this URL is http://localhost:7001/myContextApp/TestWSImplService.
    Line: -----
    @WebService(name = "myTestService", serviceName = "myTestServiceProvider", targetNamespace = "http://myWeb/services/")
    public interface TestWS;
    Line: -----
    @WebService
    public class TestWSImpl implements TestWS
    Line: -----
    I tried to use [JAX-WS Bindings Custumizations|http://docs.oracle.com/cd/E27086_05/help/oracle.eclipse.tools.weblogic.doc/html/webservices/start.html#customiz], but I think this is not what I was looking for.
    Any idea would be apreciate.
    Thanks

    try providing servicename for interface
    @WebService()
    public interface TestWS;
    @WebService(name = "myTestService", serviceName = "myTestServiceProvider", targetNamespace = "http://myWeb/services/")
    public class TestWSImpl implements TestWS
    Regards,
    Sunil P

  • Problems configuring a Context path=

    Hi,
    I�m running Apache 2.0, Tomcat 5.5.17, jdk 1.5
    I�m upgrading from Apache 1.3 Tomcat 3.* jdk 1.4
    In my Apache log file I have the following:
    JkMount /manager* foo
    JkMount /servlets/* foo
    The manager application works fine, when typing the URL
    http://website/manager/html
    Everything is ok.
    Now I�m trying to install an application on the path /servlets/myapplication. The Context file looks like this:
    <Context reloadable="true" path="/servlets/myapplication/" docBase="${catalina.home}/home/schade/myapplication/" debug="5" allowoverride="true">
         <Valve className="org.apache.catalina.valves.AccessLogValve"
         prefix="kvisremote_by_schade." suffix=".txt"
              pattern="common"/>
    </Context>
    Typing a URL like http://website/servlets/myapplication/testfile.html does not trigger this context. I�ve made a similar Valve for the manager-application, and here every request to the manager Context is logged.
    I guess it has something to do with the path-attribute. A similar solution worked fine on the old server�
    Any help is appreciated!
    Regards,
    Ren�

    Hi, java_dm.
    One of my opened threads, here in Java Forum, is about retrieving the httpRequest from a non-servlet class ( [(Red5) Needing help to retrieve Session Variables  |http://forums.sun.com/thread.jspa?threadID=5320290] ).
    I have a webservice accessed from Flash through AMF3. So, I don't have access to the HttpServletRequest, other thing that would be great to accomplish!
    Thank you!
    CaioToOn!

  • JAXB Configuration

    how to configure JAXB to add equal and hashCode methods to the generated classes ?

    In fact, I am familiar with JAXB and used it in several projects. I wrote the ObjectFactory by myself, of course, we can generate it by using xjc command. The project runs well in eclipse or netbeans without this exception because the file is there.
    This exceptioin occurs only when I make installation package by using BuildDesk. I find when I don't choose the obfuscation options in BuildDesk, it runs well. I think the shrink/optimize/obfuscate operation destroyed the ObjectFactory.class when processing the .jar file. I think the solution is package the JAXB model into a separate jar and use it as a external library, so BuildDesk doesn't process it in any case. Thank you all the same. :)
    Edited by: 807218 on Nov 3, 2010 7:29 AM

  • JAXB Marshalling Question

    below is what I get for marshalling some JAXB generated class instance, and i notice that several namespace was create ns1, ns2, ns3.... which are actually all sharing the same namespace, is there anyway (any option) that I can set to optimize it, so they can all simply use ns1, and won't define ns2, ns3...
    thank you.
    Jacob
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <aaa xmlns="http://schema.abc.com/def/gh">
    <ns1:HeaderReq xmlns:ns1="http://schema.abc.com/def">
    <ns1:Header>
    <ns1:sessionToken>sessionToken</ns1:sessionToken>
    <ns1:language>eng</ns1:language>
    <ns1:version>version2</ns1:version>
    </ns1:Header>
    <ns1:ddd>web</ns1:ddd>
    <ns1:eee>a</ns1:eee>
    </ns1:HeaderReq>
    <ns2:ccc xmlns:ns2="http://schema.abc.com/def">accountToken</ns2:ccc>
    <bbb>
    <ns3:firstName xmlns:ns3="http://schema.abc.com/def">Jacob</ns3:firstName>
    <ns4:lastName xmlns:ns4="http://schema.abc.com/def">Tseng</ns4:lastName>
    <relationship>SON</relationship>
    </bbb>
    </aaa>

    Hi Jacob,
    Here is the solution I used for getting rid of ns1,ns2 etc..when I was getting ns1,ns2.. etc.along with http://www.xyz.com/xml/yourxml in the generated XML output
    It worked for me. Let me know if you need any further help.
    -bhanu
    Please include the Following Code when you are marshalling the Document
    ======================== Your Main Java File ======================
    try {
              m.setProperty("com.sun.xml.bind.namespacePrefixMapper",new NamespacePrefixMapperImpl());
    // m is the Marshaller Object
    // NamespacePrefixMapperImpl()
    // You have to implement, sample code is given below
         catch ( PropertyException pe)
              System.out.println("Property Exception : " + pe.toString());
    ===============================================================
    Here is the Sample Code to implement NamespacePrefixMapperImpl()
    =========================================================
    import com.sun.xml.bind.marshaller.NamespacePrefixMapper;
    class NamespacePrefixMapperImpl extends NamespacePrefixMapper {
    public String getPreferredPrefix(String namespaceUri, String suggestion, boolean requirePrefix) {
    // W3c to show a prefix "xsi"
    if( "http://www.w3.org/2001/XMLSchema-instance".equals(namespaceUri) )
    return "xsi";
    // Your namespace http://www.xyz.com/yourxml/ to show prefix "tns"
    if( "http://www.xyz.com/yourxml/".equals(namespaceUri) )
    return "tns";
    return suggestion;

Maybe you are looking for

  • Align in smartforms

    hai frnds     i need to align the fields in the data area to the right side of the cell in the smartforms i had tried the ' field(R) ' options but it is not working. plz suggest any help its urgent.

  • Broken arrow but no errors?

    I have a VI that has a broken run arrow but displays no errors when I clicked the broken arrow. I can find no obvious errors on the diagram. It was working fine and then I added another control to a cluster and it started giving me the broken arrow.

  • AAA accounting for per-user data amount limit

    Hello, I don't have too much experience with AAA, and I want to implement the following: - I have a FreeRadius, ASR1001-X with IOS XE - I want to keep records of how many data is consumed by each user Any suggestion will be welcome. Thank you.

  • Canbus traffic monitoring problem

    As a part of a test application I want to have an indicator that shows abolutely all traffic on the CAN network...receive and transmit...I can use the Read Multiple Interface Object VI on a separate port to do this, however I want to only use one por

  • Sql join

    HI, How to join these two statement on TripId. you don't need to  understand the query . statement 1 SELECT   tblTrips.TripId,tblTrips.DestinationDistrictId, tblTrips.VehicleId, tblTrips.No,tblVehicles.VehicleNo, tblTrips.CoachNo,CONVERT(VARCHAR(24),