The beans.jar file is in my path, still get the null ptr.

I don't think I'm send an axis object per se, I am sending a object
created using xmlbeans.  We have to integrate with this external
service, the sample client is in axis but I'd really rather use xfire
for the client.  I'm not the experienced in mtom, especially mtom used
to send xml.  If I wanted to get rid of all axis and axiom stuff what do
you think I would need to pass to MtomRequest.setElement() ? a DOM ?
byte array of the xml ? in the sample code(axis) they pass the root note
of a xml tree.

Thanks

-----Original Message-----
From: Tomek Sztelak [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 12, 2007 3:01 PM
To: [email protected]
Subject: Re: [xfire-user] Mtom exception

The first error  ( java.lang.NullPointerException  ) i caused by your
classpath problem, you need to add XMLBeans generated classes manually
to classpath;
The second problem is kinda strange. Are you sure you have all
required classes in your classpath ? Btw. why are you trying to send
axis object with xfire ? Thats looks like a NOT good idea, because you
probably need to add half of axis code to make it run.
I would recommend to get rid of this axis stuff and use plain xfire
code.

On 2/12/07, Jim Apple <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
>
> I'm trying to create a MTOM based client, I used the wsdl generation
> technique with jaxb as the binding technique (xmlbean as a binding
threw
> "java.lang.NullPointerException
>
>         at
>
org.apache.xmlbeans.impl.common.QNameHelper.hexsafedir(QNameHelper.java:
176))"
>
>
>
> The sample code I have builds a Axiom tree and passes an OMElement to
> MtomRequest.setElement().  I have the following in my imports
>
>
>
> import org.apache.axiom.om.*;
>
> import org.apache.axiom.soap.SOAP11Constants;
>
>
>
> (Yes I know it sounds crazy but for some reason this service sends xml
back
> and forth via Mtom ...)
>
>
>
> Any Help would be great
>
>
>
> - Jim
>
>
>
> org.codehaus.xfire.XFireRuntimeException: Could not invoke
> service.. Nested exception is
> org.codehaus.xfire.fault.XFireFault: Could not marshall
> type.
>
> org.codehaus.xfire.fault.XFireFault: Could not marshall
> type.
>
>             at
> org.codehaus.xfire.jaxb2.JaxbType.writeObject(JaxbType.java:258)
>
>             at
>
org.codehaus.xfire.aegis.AegisBindingProvider.writeParameter(AegisBindin
gProvider.java:222)
>
>             at
>
org.codehaus.xfire.service.binding.AbstractBinding.writeParameter(Abstra
ctBinding.java:273)
>
>             at
>
org.codehaus.xfire.service.binding.DocumentBinding.writeMessage(Document
Binding.java:65)
>
>             at
>
org.codehaus.xfire.soap.SoapSerializer.writeMessage(SoapSerializer.java:
80)
>
>             at
>
org.codehaus.xfire.util.OutMessageDataSource.createInputStream(OutMessag
eDataSource.java:92)
>
>             at
>
org.codehaus.xfire.util.OutMessageDataSource.<init>(OutMessageDataSource
.java:37)
>
>             at
>
org.codehaus.xfire.transport.http.CommonsHttpMessageSender.open(CommonsH
ttpMessageSender.java:155)
>
>             at
>
org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChannel.
java:121)
>
>             at
>
org.codehaus.xfire.transport.http.HttpChannel.send(HttpChannel.java:48)
>
>             at
>
org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java
:26)
>
>             at
>
org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:1
31)
>
>             at
> org.codehaus.xfire.client.Invocation.invoke(Invocation.java:75)
>
>             at
> org.codehaus.xfire.client.Client.invoke(Client.java:335)
>
>             at
> org.codehaus.xfire.client.XFireProxy.handleRequest(XFireProxy.java:77)
>
>             at
> org.codehaus.xfire.client.XFireProxy.invoke(XFireProxy.java:57)
>
>             at $Proxy13.doStructuredSearch(Unknown Source)
>
>             at qa.LEXSServiceClient.main(LEXSServiceClient.java:224)
>
>             at
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>
>             at
>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
>
>             at
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
>
>             at java.lang.reflect.Method.invoke(Method.java:585)
>
>             at
> com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
>
> Caused by: javax.xml.bind.MarshalException
>
>  - with linked exception:
>
> [javax.xml.bind.JAXBException:
> org.apache.axiom.om.impl.llom.OMElementImpl nor any of its
> super class is known to this context]
>
>             at
>
com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:295
)
>
>             at
>
com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.java:2
21)
>
>             at
>
javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMarshaller
Impl.java:70)
>
>             at
> org.codehaus.xfire.jaxb2.JaxbType.writeObject(JaxbType.java:249)
>
>             ... 22 more
>
> Caused by: javax.xml.bind.JAXBException:
> org.apache.axiom.om.impl.llom.OMElementImpl nor any of its
> super class is known to this context
>
>             at
>
com.sun.xml.bind.v2.runtime.XMLSerializer.reportError(XMLSerializer.java
:223)
>
>             at
>
com.sun.xml.bind.v2.runtime.XMLSerializer.reportError(XMLSerializer.java
:238)
>
>             at
>
com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.j
ava:587)
>
>             at
>
com.sun.xml.bind.v2.runtime.property.SingleElementNodeProperty.serialize
Body(SingleElementNodeProperty.java:114)
>
>             at
>
com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeBody(ClassBeanInf
oImpl.java:293)
>
>             at
>
com.sun.xml.bind.v2.runtime.XMLSerializer.childAsSoleContent(XMLSerializ
er.java:532)
>
>             at
>
com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeRoot(ClassBeanInf
oImpl.java:283)
>
>             at
>
com.sun.xml.bind.v2.runtime.XMLSerializer.childAsRoot(XMLSerializer.java
:461)
>
>             at
>
com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:292
)
>
>             ... 25 more
>
> Caused by: javax.xml.bind.JAXBException:
> org.apache.axiom.om.impl.llom.OMElementImpl nor any of its
> super class is known to this context
>
>             at
>
com.sun.xml.bind.v2.runtime.JAXBContextImpl.getBeanInfo(JAXBContextImpl.
java:480)
>
>             at
>
com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.j
ava:582)
>
>             ... 31 more


-- 
-----
When one of our products stops working, we'll blame another vendor
within 24 hours.

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to