File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes Using xmlbeans to create a soap message Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Web Services
Bookmark "Using xmlbeans to create a soap message" Watch "Using xmlbeans to create a soap message" New topic
Author

Using xmlbeans to create a soap message

Andy Hahn
Ranch Hand

Joined: Aug 31, 2004
Posts: 225
I am using xml beans 2.1.0 to construct a simple blank soap message and am having an issue with the first line of the method below, where it is creating the message factory. I have been stuck on this for a while. Has anyone done this before?



I am receiving this exception:
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12792
    
    5
This is just a wild guess - is the library you are using expecting you to declare a MessageFactory implementation class - possibly as an environment variable - thus resulting in the "null" because the variable does not exist?
Bill
Andy Hahn
Ranch Hand

Joined: Aug 31, 2004
Posts: 225
Actually I downloaded the source and the null is do to a ClassCastException. The default message factory is not related to the MessageFactoryImpl returned. I think I have figured out a workaround though.. I am now using this package for all of my SOAP classes instead of the xmlbeans package - javax.xml.soap.*.
 
GeeCON Prague 2014
 
subject: Using xmlbeans to create a soap message