[prev in list] [next in list] [prev in thread] [next in thread]
List: xmlbeans-dev
Subject: FW: Unable to create a soap message using xmlbeans [2.1.0]
From: <andrew.j.hahn () wellsfargo ! com>
Date: 2006-08-01 21:31:13
Message-ID: F9A2D83067787E4DA4094F4A6D33700F019F69EC () msgswbiadsm37 ! wellsfargo ! com
[Download RAW message or body]
Hi,
I have posted this on the xmlbeans user mailing list but maybe I should
have posted this onthe dev mailing list.
I am pretty juch stumped on this one..
Please advise.
Thanks!
Andy
This message may contain confidential and/or privileged information. If
you are not the addressee or authorized to receive this for the
addressee, you must not use, copy, disclose, or take any action based on
this message or any information herein. If you have received this
message in error, please advise the sender immediately by reply e-mail
and delete this message. Thank you for your cooperation.
_____
From: Hahn, Andrew
Sent: Tuesday, August 01, 2006 2:30 PM
To: 'user@xmlbeans.apache.org'
Subject: RE: Unable to create a soap message using xmlbeans [2.1.0]
It looks like there may be an issue (bug) with the
DEFAULT_MESSAGE_FACTORY.
In the MessageFactory.java source (the code below), the
FactoryFinder.find() returns an org.apache.axis.soap.MessageFactoryImpl
and then the code is attempting to cast it to a
org.apache.xmlbeans.impl.soap.MessageFactory. This results in a
ClassCastException. This appears to be a bug.
Is this the correct list to be posting this item on or should I post
this on the developer list? Any recommendations?
Thanks!
================================================
public static MessageFactory newInstance() throws SOAPException {
try {
return (MessageFactory)
FactoryFinder.find(MESSAGE_FACTORY_PROPERTY,
DEFAULT_MESSAGE_FACTORY);
} catch (Exception exception) {
throw new SOAPException(
"Unable to create message factory for SOAP: "
+ exception.getMessage());
}
}
=================================================
This message may contain confidential and/or privileged information. If
you are not the addressee or authorized to receive this for the
addressee, you must not use, copy, disclose, or take any action based on
this message or any information herein. If you have received this
message in error, please advise the sender immediately by reply e-mail
and delete this message. Thank you for your cooperation.
_____
From: Hahn, Andrew
Sent: Tuesday, August 01, 2006 12:57 PM
To: 'user@xmlbeans.apache.org'
Subject: RE: Unable to create a soap message using xmlbeans [2.1.0]
I have just added the following jars to my classpath (from the apache
axis 1_2RC2 distribution) and I am still getting the same exception:
axis-ant.jar
axis.jar
commons-discovery.jar
commons-logging.jar
jaxrpc.jar
log4j-1.2.8.jar
log4j.properties
saaj.jar
wsdl4j.jar
The exception is occurring on this line:
MessageFactory messageFactory = MessageFactory.newInstance();
Here are my imports:
import org.apache.xmlbeans.XmlObject;
import org.apache.xmlbeans.impl.soap.*;
This message may contain confidential and/or privileged information. If
you are not the addressee or authorized to receive this for the
addressee, you must not use, copy, disclose, or take any action based on
this message or any information herein. If you have received this
message in error, please advise the sender immediately by reply e-mail
and delete this message. Thank you for your cooperation.
_____
From: Jacob Danner [mailto:jacobd@bea.com]
Sent: Tuesday, August 01, 2006 12:52 PM
To: user@xmlbeans.apache.org
Subject: RE: Unable to create a soap message using xmlbeans [2.1.0]
at quick glance, it looks like you might want to add the SAAJ jars to
your classpath
_____
From: andrew.j.hahn@wellsfargo.com [mailto:andrew.j.hahn@wellsfargo.com]
Sent: Tuesday, August 01, 2006 10:38 AM
To: user@xmlbeans.apache.org
Subject: Unable to create a soap message using xmlbeans [2.1.0]
Hi,
I am trying to create a simple SOAP message using the XML beans 2.1.0
library.
The code I am using is:
===========================================
public static void createSoapEnvelope() throws SOAPException {
MessageFactory messageFactory = MessageFactory.newInstance();
SOAPMessage message = messageFactory.createMessage();
SOAPPart prt = message.getSOAPPart();
SOAPEnvelope envelope = prt.getEnvelope();
SOAPBody body = envelope.getBody();
SOAPHeader header = envelope.getHeader();
System.out.println("====message: " + envelope.toString());
}
The problem I am having is that I am receiving the following exception:
===========================================
org.apache.xmlbeans.impl.soap.SOAPException: Unable to create message
factory for SOAP: null
at
org.apache.xmlbeans.impl.soap.MessageFactory.newInstance(MessageFactory.
java:119)
at com.NtlmHelper.createSoapEnvelope(NtlmHelper.java:63)
at com.NtlmHelper.invokeService(NtlmHelper.java:51)
at com.TestService.main(TestService.java:19)
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:324)
at
com.intellij.rt.execution.application.AppMain.main(AppMain.java:78)
Exception in thread "main"
Process finished with exit code 1
Here are the jars in my classpath:
===========================================
commons-codec-1.3.jar
commons-httpclient-3.1-alpha1.jar
commons-logging-1.0.4.jar
ezimg.jar
jms.jar
jsr173_1.0_api.jar
request.xml
resolver.jar
wlclient.jar
wljmsclient.jar
xbean.jar
xbean_xpath.jar
xmlpublic.jar
Any ideas?
Thanks!
Andy
This message may contain confidential and/or privileged information. If
you are not the addressee or authorized to receive this for the
addressee, you must not use, copy, disclose, or take any action based on
this message or any information herein. If you have received this
message in error, please advise the sender immediately by reply e-mail
and delete this message. Thank you for your cooperation.
_______________________________________________________________________
Notice: This email message, together with any attachments, may contain
information of BEA Systems, Inc., its subsidiaries and affiliated
entities, that may be confidential, proprietary, copyrighted and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it.
[Attachment #3 (text/html)]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Unable to create a soap message using xmlbeans [2.1.0]</TITLE>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2912" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><FONT face=Tahoma color=#000080 size=2><SPAN
class=269402821-01082006>Hi,</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Tahoma color=#000080 size=2><SPAN
class=269402821-01082006>I have posted this on the xmlbeans user mailing list
but maybe I should have posted this onthe dev mailing list.
</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Tahoma color=#000080 size=2><SPAN
class=269402821-01082006></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Tahoma color=#000080 size=2><SPAN
class=269402821-01082006>I am pretty juch stumped on this one..
</SPAN></FONT><FONT face=Tahoma color=#000080 size=2><SPAN
class=269402821-01082006></SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Tahoma color=#000080 size=2><SPAN
class=269402821-01082006>Please advise.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Tahoma color=#000080 size=2><SPAN
class=269402821-01082006>Thanks!</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Tahoma color=#000080 size=2><SPAN
class=269402821-01082006>Andy</SPAN></FONT></DIV><!-- Converted from text/rtf format \
--><BR><BR> <P><SPAN lang=en-us><FONT face=Tahoma color=#000080 size=1>This message \
may contain confidential and/or privileged information. If you are not the
addressee or authorized to receive this for the addressee, you must not use,
copy, disclose, or take any action based on this message or any information
herein. If you have received this message in error, please advise the
sender immediately by reply e-mail and delete this message. Thank you for
your cooperation.</FONT></SPAN></P>
<DIV> </DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> Hahn, Andrew <BR><B>Sent:</B> Tuesday,
August 01, 2006 2:30 PM<BR><B>To:</B>
'user@xmlbeans.apache.org'<BR><B>Subject:</B> RE: Unable to create a soap
message using xmlbeans [2.1.0]<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV dir=ltr align=left><FONT face=Tahoma color=#000080 size=2><SPAN
class=203531919-01082006>It looks like there may be an issue
(bug) with the DEFAULT_MESSAGE_FACTORY. </SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Tahoma color=#000080 size=2><SPAN
class=203531919-01082006></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Tahoma color=#000080 size=2><SPAN
class=203531919-01082006>In the MessageFactory.java source (the code
below), the FactoryFinder.find() returns an
org.apache.axis.soap.MessageFactoryImpl and then the code is attempting to cast
it to a org.apache.xmlbeans.impl.soap.MessageFactory. This results in a
ClassCastException. This appears to be a bug. </SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Tahoma color=#000080 size=2><SPAN
class=203531919-01082006></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Tahoma color=#000080 size=2><SPAN
class=203531919-01082006>Is this the correct list to be posting this item on or
should I post this on the developer list? Any
recommendations?</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Tahoma color=#000080 size=2><SPAN
class=203531919-01082006></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Tahoma color=#000080 size=2><SPAN
class=203531919-01082006>Thanks!</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Tahoma color=#000080 size=2><SPAN
class=203531919-01082006></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Tahoma color=#000080 size=2><SPAN
class=203531919-01082006>================================================</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Tahoma color=#000080 size=2><SPAN
class=203531919-01082006>public static MessageFactory newInstance() throws
SOAPException {</SPAN></FONT></DIV>
<DIV><FONT face=Tahoma color=#000080 size=2></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Tahoma color=#000080 size=2><SPAN
class=203531919-01082006> try
{<BR> return (MessageFactory)
FactoryFinder.find(MESSAGE_FACTORY_PROPERTY,<BR> \
& \
nbsp; \
DEFAULT_MESSAGE_FACTORY);<BR> } catch (Exception exception)
{<BR> throw new
SOAPException(<BR>
"Unable to create message factory for SOAP:
"<BR> +
exception.getMessage());<BR> }</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Tahoma color=#000080 size=2><SPAN
class=203531919-01082006>}<BR>=================================================</DIV></SPAN></FONT>
<DIV dir=ltr align=left><FONT face=Tahoma color=#000080 size=2><SPAN
class=203531919-01082006></SPAN></FONT> </DIV>
<DIV> </DIV><!-- Converted from text/rtf format --><BR><BR>
<P><SPAN lang=en-us><FONT face=Tahoma color=#000080 size=1>This message may
contain confidential and/or privileged information. If you are not the
addressee or authorized to receive this for the addressee, you must not use,
copy, disclose, or take any action based on this message or any information
herein. If you have received this message in error, please advise the
sender immediately by reply e-mail and delete this message. Thank you for
your cooperation.</FONT></SPAN></P><BR><BR>
<DIV> </DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> Hahn, Andrew <BR><B>Sent:</B> Tuesday,
August 01, 2006 12:57 PM<BR><B>To:</B>
'user@xmlbeans.apache.org'<BR><B>Subject:</B> RE: Unable to create a soap
message using xmlbeans [2.1.0]<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV dir=ltr align=left><FONT face=Tahoma color=#000080 size=2><SPAN
class=336155417-01082006>I have just added the following jars to my classpath
(from the apache axis 1_2RC2 distribution) and I am still getting the same
exception:</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Tahoma color=#000080 size=2><SPAN
class=336155417-01082006></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Tahoma color=#000080 size=2><SPAN
class=336155417-01082006>axis-ant.jar<BR>axis.jar<BR>commons-discovery.jar<BR>commons- \
logging.jar<BR>jaxrpc.jar<BR>log4j-1.2.8.jar<BR>log4j.properties<BR>saaj.jar<BR>wsdl4j.jar</SPAN></FONT></DIV>
<DIV><FONT face=Tahoma color=#000080 size=2></FONT> </DIV>
<DIV><FONT face=Tahoma color=#000080 size=2></FONT> </DIV>
<DIV><SPAN class=336155417-01082006><FONT face=Tahoma color=#000080 size=2>The
exception is occurring on this line:</FONT></SPAN></DIV>
<DIV><SPAN class=336155417-01082006><FONT face=Tahoma
size=2> MessageFactory messageFactory = MessageFactory.newInstance();<FONT
face="Times New Roman" size=3> </FONT></FONT></SPAN></DIV>
<DIV><SPAN class=336155417-01082006></SPAN> </DIV>
<DIV><SPAN class=336155417-01082006><FONT face=Tahoma color=#000080
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=336155417-01082006><FONT face=Tahoma color=#000080 size=2>Here
are my imports:</FONT></SPAN></DIV>
<DIV><SPAN class=336155417-01082006><FONT face=Tahoma color=#000080
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=336155417-01082006><FONT face=Tahoma color=#000080
size=2>import org.apache.xmlbeans.XmlObject;<BR>import
org.apache.xmlbeans.impl.soap.*;</FONT></SPAN></DIV>
<DIV><SPAN class=336155417-01082006><FONT face=Tahoma color=#000080
size=2></FONT></SPAN> </DIV><!-- Converted from text/rtf format --><BR><BR>
<P><SPAN lang=en-us><FONT face=Tahoma color=#000080 size=1>This message may
contain confidential and/or privileged information. If you are not the
addressee or authorized to receive this for the addressee, you must not use,
copy, disclose, or take any action based on this message or any information
herein. If you have received this message in error, please advise the
sender immediately by reply e-mail and delete this message. Thank you for
your cooperation.</FONT></SPAN></P><BR><BR>
<DIV> </DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> Jacob Danner [mailto:jacobd@bea.com]
<BR><B>Sent:</B> Tuesday, August 01, 2006 12:52 PM<BR><B>To:</B>
user@xmlbeans.apache.org<BR><B>Subject:</B> RE: Unable to create a soap message
using xmlbeans [2.1.0]<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV dir=ltr align=left><SPAN class=564275117-01082006><FONT face=Arial
color=#0000ff size=2>at quick glance, it looks like you might want to add the
SAAJ jars to your classpath</FONT></SPAN></DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> andrew.j.hahn@wellsfargo.com
[mailto:andrew.j.hahn@wellsfargo.com] <BR><B>Sent:</B> Tuesday, August 01, 2006
10:38 AM<BR><B>To:</B> user@xmlbeans.apache.org<BR><B>Subject:</B> Unable to
create a soap message using xmlbeans [2.1.0]<BR></FONT><BR></DIV>
<DIV></DIV><!-- Converted from text/rtf format --><BR>
<P><FONT face=Tahoma size=2>Hi,</FONT> <BR><FONT face=Tahoma size=2>I am trying
to create a simple SOAP message using the XML beans 2.1.0 library.
</FONT></P>
<P><FONT face=Tahoma size=2>The code I am using is:</FONT> <BR><FONT face=Tahoma
size=2>===========================================</FONT> <BR><FONT face=Tahoma
size=2>public static void createSoapEnvelope() throws SOAPException {</FONT>
<BR><FONT face=Tahoma size=2> MessageFactory messageFactory =
MessageFactory.newInstance();</FONT> </P>
<P><FONT face=Tahoma size=2> SOAPMessage message =
messageFactory.createMessage();</FONT> </P>
<P><FONT face=Tahoma size=2> SOAPPart prt =
message.getSOAPPart();</FONT> <BR><FONT face=Tahoma size=2>
SOAPEnvelope envelope = prt.getEnvelope();</FONT> <BR><FONT face=Tahoma
size=2> SOAPBody body = envelope.getBody();</FONT> <BR><FONT
face=Tahoma size=2> SOAPHeader header =
envelope.getHeader();</FONT> </P>
<P><FONT face=Tahoma size=2> System.out.println("====message:
" + envelope.toString());</FONT> <BR><FONT face=Tahoma size=2>}</FONT>
</P><BR><BR>
<P><FONT face=Tahoma size=2>The problem I am having is that I am receiving the
following exception:</FONT> <BR><FONT face=Tahoma
size=2>===========================================</FONT> <BR><FONT face=Tahoma
size=2>org.apache.xmlbeans.impl.soap.SOAPException: Unable to create message
factory for SOAP: null</FONT> <BR>
<FONT face=Tahoma size=2>at
org.apache.xmlbeans.impl.soap.MessageFactory.newInstance(MessageFactory.java:119)</FONT> \
<BR> <FONT face=Tahoma size=2>at
com.NtlmHelper.createSoapEnvelope(NtlmHelper.java:63)</FONT>
<BR> <FONT face=Tahoma size=2>at
com.NtlmHelper.invokeService(NtlmHelper.java:51)</FONT>
<BR> <FONT face=Tahoma size=2>at
com.TestService.main(TestService.java:19)</FONT>
<BR> <FONT face=Tahoma size=2>at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)</FONT>
<BR> <FONT face=Tahoma size=2>at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)</FONT>
<BR> <FONT face=Tahoma size=2>at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)</FONT> \
<BR> <FONT face=Tahoma size=2>at
java.lang.reflect.Method.invoke(Method.java:324)</FONT>
<BR> <FONT face=Tahoma size=2>at
com.intellij.rt.execution.application.AppMain.main(AppMain.java:78)</FONT>
<BR><FONT face=Tahoma size=2>Exception in thread "main" </FONT><BR><FONT
face=Tahoma size=2>Process finished with exit code 1</FONT> </P><BR><BR>
<P><FONT face=Tahoma size=2>Here are the jars in my classpath:</FONT> <BR><FONT
face=Tahoma size=2>===========================================</FONT> <BR><FONT
face=Tahoma size=2>commons-codec-1.3.jar</FONT> <BR><FONT face=Tahoma
size=2>commons-httpclient-3.1-alpha1.jar</FONT> <BR><FONT face=Tahoma
size=2>commons-logging-1.0.4.jar</FONT> <BR><FONT face=Tahoma
size=2>ezimg.jar</FONT> <BR><FONT face=Tahoma size=2>jms.jar</FONT> <BR><FONT
face=Tahoma size=2>jsr173_1.0_api.jar</FONT> <BR><FONT face=Tahoma
size=2>request.xml</FONT> <BR><FONT face=Tahoma size=2>resolver.jar</FONT>
<BR><FONT face=Tahoma size=2>wlclient.jar</FONT> <BR><FONT face=Tahoma
size=2>wljmsclient.jar</FONT> <BR><FONT face=Tahoma size=2>xbean.jar</FONT>
<BR><FONT face=Tahoma size=2>xbean_xpath.jar</FONT> <BR><FONT face=Tahoma
size=2>xmlpublic.jar</FONT> </P><BR><BR>
<P><FONT face=Tahoma size=2>Any ideas?</FONT> <BR><FONT face=Tahoma
size=2>Thanks!</FONT> <BR><FONT face=Tahoma size=2>Andy</FONT> </P><BR><BR>
<P><FONT face=Tahoma color=#000080 size=1>This message may contain confidential
and/or privileged information. If you are not the addressee or authorized
to receive this for the addressee, you must not use, copy, disclose, or take any
action based on this message or any information herein. If you have
received this message in error, please advise the sender immediately by reply
e-mail and delete this message. Thank you for your
cooperation.</FONT></P><BR><BR><BR><PRE>_______________________________________________________________________
Notice: This email message, together with any attachments, may contain
information of BEA Systems, Inc., its subsidiaries and affiliated
entities, that may be confidential, proprietary, copyrighted and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it.
</PRE></BODY></HTML>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic