aspose file tools*
The moose likes Web Services and the fly likes SOAP (Axis) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "SOAP (Axis)" Watch "SOAP (Axis)" New topic
Author

SOAP (Axis)

Tina Shupe
Greenhorn

Joined: Dec 27, 2002
Posts: 7
I am having an issue that I can't solve. I have a decent understanding of SOAP,not a great understanding.
I have download Axis and have it working. I got WSDL from the company and created the code from that using Axis.
It did create the interface definition for the portType(DWImportSoap).
It also created the binding element, I have only one(DWImportSoapStub).
It also created the factory pattern style class(DWImportLocator).
It also create a PoDocument object that was derived from the name attribute of the complexType element.
I then created a class with a main(I do use a try-catch)

The part I am not getting is the PoDocument Object. I have to pass a PoDocument to the submit. The PoDocuement has a method of set_any(MessageElement[]) void PoDocument. I have looked at the MessageElement documentation, and I don't know where I would put an xml file. Our SOAP is to include an xml file that has all the data we are submiting to the Web Service.
Below is the part of the WSDL Axis got the PoDocument information from.

Any help would be good. Is this enough information? Am I in neverland?
Rich Raposa
Ranch Hand

Joined: Dec 06, 2001
Posts: 46
It looks like PoDocument is a class that is defined in the WSDL. Maybe you could look at the source code of this class, since the WSDL2Java tool from Axis has to generate it. Use the "-keep" flag when running WSDL2Java, and see if it generates a PoDocument.java file. Seeing the source code might answer your question.


Rich Raposa<br /><a href="http://www.javalicense.com" target="_blank" rel="nofollow">http://www.javalicense.com</a><br />Buy Java courseware -> get a free XBox!
Tina Shupe
Greenhorn

Joined: Dec 27, 2002
Posts: 7
I do have the code that Axis created for PoDocument. That is how I got the set_any method that accepts the array of MessageElement. My issue is that I have looked at the MessageElement API and I am unsure what I need to use. I need to be able to pass to the web service my xml document that is being "embeded" into the SOAP information. I relize that AXIS created the code that does the SOAP. I don't know what I need to do to take the xml doc that I have and pass that as an value to the web service.
I have included the error message that I am getting when I pass a null. However, I am unsure if it is because I am passing a null.
- Mapping Exception to AxisFault
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: org.xml.sax.SAXNotRecognizedException: Feature: http://xml.org/sax/properties/lexical-handler
faultActor: null
faultNode: null
faultDetail:
stackTrace: org.xml.sax.SAXNotRecognizedException: Feature: http://xml.org/sax/properties/lexical-handler
at org.apache.xerces.jaxp.SAXParserImpl.setProperty(SAXParserImpl.java:155)
at org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationContextImpl.java:235)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:541)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:379)
at org.apache.axis.client.Call.invokeEngine(Call.java:2395)
at org.apache.axis.client.Call.invoke(Call.java:2365)
at org.apache.axis.client.Call.invoke(Call.java:2062)
at org.apache.axis.client.Call.invoke(Call.java:1986)
at org.apache.axis.client.Call.invoke(Call.java:1509)
at nautilus.upload.DWImportSoapStub.submit(DWImportSoapStub.java:156)
at nautilus.upload.SubmitTest.main(SubmitTest.java:13)

org.xml.sax.SAXNotRecognizedException: Feature: http://xml.org/sax/properties/lexical-handler
org.xml.sax.SAXNotRecognizedException: Feature: http://xml.org/sax/properties/lexical-handler
at org.apache.xerces.jaxp.SAXParserImpl.setProperty(SAXParserImpl.java:155)
at org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationContextImpl.java:235)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:541)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:379)
at org.apache.axis.client.Call.invokeEngine(Call.java:2395)
at org.apache.axis.client.Call.invoke(Call.java:2365)
at org.apache.axis.client.Call.invoke(Call.java:2062)
at org.apache.axis.client.Call.invoke(Call.java:1986)
at org.apache.axis.client.Call.invoke(Call.java:1509)
at nautilus.upload.DWImportSoapStub.submit(DWImportSoapStub.java:156)
at nautilus.upload.SubmitTest.main(SubmitTest.java:13)
Am I clear on what I have stated?
[ February 12, 2003: Message edited by: Tena Shupe ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: SOAP (Axis)