Re: Exception doesnt contain ObjectFactory.class or jaxb.index

2008-01-12 Thread Andreas Veithen

Virgil,

You are right. Only the ObjectFactory class is generated in XSD-Java  
mode. The file jaxb.index is only used when in Java-XSD mode and you  
don't need it.


Andreas

On 10 Jan 2008, at 20:49, Trasca Virgil wrote:


Hi Andreas,

   Thanks for help. I am generating jaxb2 code with XJC ant task.  
This is generating ObjectFactory.java but not jaxb.index file. Is  
this file from jaxb2 or it is from old jaxb1? If I am googling for  
this file I get so few references and no clear documentation for  
jaxb.index.


I putted the generated classes including ObjectFactory.java as a jar  
in WEB-INF\lib folder of the Axis2 web-app in order  to be in the  
classpath but still the same error. What do you think I am doing  
wrong?


Thanks,
Virgil

- Original Message 
From: Andreas Veithen [EMAIL PROTECTED]
To: axis-user@ws.apache.org
Sent: Thursday, January 10, 2008 8:53:46 PM
Subject: Re: Exception doesnt contain ObjectFactory.class or  
jaxb.index



Virgil,

Both the ObjectFactory class and the jaxb.index file are generated by
JAXB 2. They are required by JAXB to load the generated classes at
runtime. So, the message basically tells you that the generated
classes are not available in the classpath.

Andreas

On 10 Jan 2008, at 19:33, Trasca Virgil wrote:


Hello,

   I have a service which is exposing some classes which are mapped



to an external xml file with jaxb2. I want to use jaxb2 for getting/
writting values to my xml but when I send data on http for
webservice I want to use the axis2 adb binding. My method that is
exposing xml with jaxb2 is working outside axis2.

But when I deploy this method as a web service and I call the web
service I get javax.xml.bind.JAXBException:
burster.generated.jaxb2 doesnt contain ObjectFactory.class or
jaxb.index.

What is this exception? What is jaxb.index? I want to use ADB as
binding over the htpp.

Thank you,
Virgil



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Exception doesnt contain ObjectFactory.class or jaxb.index

2008-01-12 Thread Trasca Virgil
Hi Andreas,

Meenwhile I changed the tactic and I am generating the xsd from java and I 
have also the jaxb.index file. I took the jar with datatypes I putted 
everywhere in axis2\web-inf\lib in axis2\web-inf\classes hopping that it is a 
classpath issue and I will fix it that way but no success. I am getting the 
same exception.

Do you have some advice?

Thank you,
Virgil

- Original Message 
From: Andreas Veithen [EMAIL PROTECTED]
To: axis-user@ws.apache.org
Sent: Saturday, January 12, 2008 4:57:01 PM
Subject: Re: Exception doesnt contain ObjectFactory.class or jaxb.index


Virgil,

You are right. Only the ObjectFactory class is generated in XSD-Java  
mode. The file jaxb.index is only used when in Java-XSD mode and you  
don't need it.

Andreas

On 10 Jan 2008, at 20:49, Trasca Virgil wrote:

 Hi Andreas,

Thanks for help. I am generating jaxb2 code with XJC ant task.  
 This is generating ObjectFactory.java but not jaxb.index file. Is  
 this file from jaxb2 or it is from old jaxb1? If I am googling for  
 this file I get so few references and no clear documentation for  
 jaxb.index.

 I putted the generated classes including ObjectFactory.java as a jar
  
 in WEB-INF\lib folder of the Axis2 web-app in order  to be in the  
 classpath but still the same error. What do you think I am doing  
 wrong?

 Thanks,
 Virgil

 - Original Message 
 From: Andreas Veithen [EMAIL PROTECTED]
 To: axis-user@ws.apache.org
 Sent: Thursday, January 10, 2008 8:53:46 PM
 Subject: Re: Exception doesnt contain ObjectFactory.class or  
 jaxb.index


 Virgil,

 Both the ObjectFactory class and the jaxb.index file are generated by
 JAXB 2. They are required by JAXB to load the generated classes at
 runtime. So, the message basically tells you that the generated
 classes are not available in the classpath.

 Andreas

 On 10 Jan 2008, at 19:33, Trasca Virgil wrote:

 Hello,

I have a service which is exposing some classes which are mapped

 to an external xml file with jaxb2. I want to use jaxb2 for getting/
 writting values to my xml but when I send data on http for
 webservice I want to use the axis2 adb binding. My method that is
 exposing xml with jaxb2 is working outside axis2.

 But when I deploy this method as a web service and I call the web
 service I get javax.xml.bind.JAXBException:
 burster.generated.jaxb2 doesnt contain ObjectFactory.class or
 jaxb.index.

 What is this exception? What is jaxb.index? I want to use ADB as
 binding over the htpp.

 Thank you,
 Virgil


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Exception doesnt contain ObjectFactory.class or jaxb.index

2008-01-10 Thread Trasca Virgil
Hello,

 I have a service which is exposing some classes which are mapped to an 
external xml file with jaxb2. I want to use jaxb2 for getting/writting values 
to my xml but when I send data on http for webservice I want to use the axis2 
adb binding. My method that is exposing xml with jaxb2 is working outside axis2.

But when I deploy this method as a web service and I call the web service I get 
javax.xml.bind.JAXBException: burster.generated.jaxb2 doesnt contain 
ObjectFactory.class or jaxb.index.

What is this exception? What is jaxb.index? I want to use ADB as binding over 
the htpp.

Thank you,
Virgil

- Original Message 
From: andreas netter [EMAIL PROTECTED]
To: axis-user@ws.apache.org
Sent: Thursday, January 10, 2008 5:35:46 PM
Subject: Re: [Axis2] RuntimeException when using SOAPMonitor


Hi Robert,

I'm using SOAP 1.1 and JAXB-RI data binding.

The correct soap envelope for the response should look like this:
soapenv:Envelope
 xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;
soapenv:Bodyns1:RESPONSE
 xmlns:ns1=http://my.company.com;../ns1:RESPONSE
/soapenv:Body/soapenv:Envelope

But i'm not 100% sure if it does because i can't monitor the correct
 response due to the Exception.

The log statement before the Exception prints the following (RESPONSE
 is the Element name in the Response Message):
[OMSourcedElementImpl] forceExpand: expected element namespace
 RESPONSE, found

The fact that the service works normal when SOAPMonitor is *NOT* used
 confuses me a bit, 
because the exception is thrown deep into axiom, as you mentioned.

Greets,
Andi

 Original-Nachricht 
 Datum: Thu, 10 Jan 2008 12:33:48 -0200
 Von: robert lazarski [EMAIL PROTECTED]
 An: axis-user@ws.apache.org
 Betreff: Re: [Axis2] RuntimeException when using SOAPMonitor

 What SOAP version (1.1 or 1.2) and databinding are you using? You
 seem
 to missing a uri in your envelope. All the soap monitor does is
 convert the soap envelope to a string, and this error seems to be
 deep
 into axiom. Seems to be failing around this code:
 

 
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMSourcedElementImpl.java?view=markup
 
 String readerURI = readerFromDS.getNamespaceURI();
 readerURI = (readerURI == null) ?  : readerURI;
 String uri = getNamespace().getNamespaceURI();
if (!readerURI.equals(uri)) {
log.error(forceExpand: expected element namespace  +
 getLocalName() + , found  + uri);
 throw new RuntimeException(Element namespace from
 data source is  +
 readerURI + , not the expected  + uri);
 }
 
 Post your envelope and maybe we can help.  It also would help if you
 post the logs that are printed on this line:
 
 log.error(forceExpand: expected element namespace  +
 getLocalName() + , found  + uri);
 
 So you need a uri and it doesn't appear you have one for some reason.
 
 You could try a nightly release or use TCPMon instead of the
 soapmonitor.
 
 HTH,
 Robert
 
 On Jan 10, 2008 12:00 PM,  [EMAIL PROTECTED] wrote:
  Hi Axis2 users,
 
  i have implemented a very simple Axis2 webservice
 (request-response),
 which works correct as long as i don't use SOAPMonitor.
 
  When I integrate SOAPMonitor into my Axis2 web-application, i get
 the
 following RuntimeException (mapped to an axis2fault) at the
 webservice
 response:
  java.lang.RuntimeException: Element namespace from data source is
 http://my.company.com, not the expected
 
  I assume i configured SOAPMonitor correct. I can use the
 SOAPMonitor
 applet, it shows the correct request message and the above-named
 fault-message. SOAPMonitor also works fine for me with one-way
 webservices.
 
  So why do i get an error at the response when using SOAPMonitor?
  Has anyone an idea or a similar problem?
 
  Version:
  Axis2-1.3
  SOAPMonitor applet classes taken from
 Axis2-1.3/lib/soapmonitor-1.3.jar
 
  The RuntimeException stacktrace is attached.
 
  Thanks in advance,
  Andi
 
 
  Stacktrace (part of):
  java.lang.RuntimeException: Element namespace from data source is
 http://my.company.com, not the expected
  at

 
org.apache.axiom.om.impl.llom.OMSourcedElementImpl.forceExpand(OMSourcedElementImpl.java:184)
  at

 
org.apache.axiom.om.impl.llom.OMSourcedElementImpl.internalSerialize(OMSourcedElementImpl.java:568)
  at

 
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:772)
  at

 
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:756)
  at

 
org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAPEnvelopeImpl.java:210)
  at

 
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:756)
  at

 org.apache.axiom.om.impl.llom.OMNodeImpl.serialize(OMNodeImpl.java:345)
  at

Re: Exception doesnt contain ObjectFactory.class or jaxb.index

2008-01-10 Thread Andreas Veithen

Virgil,

Both the ObjectFactory class and the jaxb.index file are generated by  
JAXB 2. They are required by JAXB to load the generated classes at  
runtime. So, the message basically tells you that the generated  
classes are not available in the classpath.


Andreas

On 10 Jan 2008, at 19:33, Trasca Virgil wrote:


Hello,

I have a service which is exposing some classes which are mapped  
to an external xml file with jaxb2. I want to use jaxb2 for getting/ 
writting values to my xml but when I send data on http for  
webservice I want to use the axis2 adb binding. My method that is  
exposing xml with jaxb2 is working outside axis2.


But when I deploy this method as a web service and I call the web  
service I get javax.xml.bind.JAXBException:  
burster.generated.jaxb2 doesnt contain ObjectFactory.class or  
jaxb.index.


What is this exception? What is jaxb.index? I want to use ADB as  
binding over the htpp.


Thank you,
Virgil



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Exception doesnt contain ObjectFactory.class or jaxb.index

2008-01-10 Thread Trasca Virgil
Hi Andreas,

Thanks for help. I am generating jaxb2 code with XJC ant task. This is 
generating ObjectFactory.java but not jaxb.index file. Is this file from jaxb2 
or it is from old jaxb1? If I am googling for this file I get so few references 
and no clear documentation for jaxb.index.

I putted the generated classes including ObjectFactory.java as a jar in 
WEB-INF\lib folder of the Axis2 web-app in order  to be in the classpath but 
still the same error. What do you think I am doing wrong?

Thanks,
Virgil

- Original Message 
From: Andreas Veithen [EMAIL PROTECTED]
To: axis-user@ws.apache.org
Sent: Thursday, January 10, 2008 8:53:46 PM
Subject: Re: Exception doesnt contain ObjectFactory.class or jaxb.index


Virgil,

Both the ObjectFactory class and the jaxb.index file are generated by  
JAXB 2. They are required by JAXB to load the generated classes at  
runtime. So, the message basically tells you that the generated  
classes are not available in the classpath.

Andreas

On 10 Jan 2008, at 19:33, Trasca Virgil wrote:

 Hello,

 I have a service which is exposing some classes which are mapped
  
 to an external xml file with jaxb2. I want to use jaxb2 for getting/ 
 writting values to my xml but when I send data on http for  
 webservice I want to use the axis2 adb binding. My method that is  
 exposing xml with jaxb2 is working outside axis2.

 But when I deploy this method as a web service and I call the web  
 service I get javax.xml.bind.JAXBException:  
 burster.generated.jaxb2 doesnt contain ObjectFactory.class or  
 jaxb.index.

 What is this exception? What is jaxb.index? I want to use ADB as  
 binding over the htpp.

 Thank you,
 Virgil


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]