Hi,
Please try changing your code in the following way
=====
InputStream is = new
StringBufferInputStream("<doSpellingSuggestion><key>some_valid_key</key><phrase>gogle</phrase></doSpellingSuggestion>");
StAXBuilder builder = new StAXOMBuilder(is);
OMElement documentElement = builder.getDocumentElement();
=====
Usually the document element should come from the builder
Ajith
On 8/3/06, Brecht Yperman <[EMAIL PROTECTED]> wrote:
Hi,
I'm trying to call the GoogleSearch webservice, for a simple test, but I
don't seem to succeed.
When reading in a very simple document, I get an OMException, without
detailMessage.
Definition serviceDefinition = getWsdlDefinition(wsdl);
AxisConfiguration config = new AxisConfiguration();
ConfigurationContext context = new ConfigurationContext(config);
ServiceClient client = new ServiceClient(context, serviceDefinition,
serviceName, port);
OMFactory omFactory = OMAbstractFactory.getOMFactory();
InputStream is = new
StringBufferInputStream("<doSpellingSuggestion><key>some_valid_key</key><phrase>gogle</phrase></doSpellingSuggestion>");
StAXBuilder builder = new StAXOMBuilder(is);
OMDocument omDocument = omFactory.createOMDocument(builder);
// the following instruction throws the Exception
OMElement documentElement = omDocument.getOMDocumentElement();
client.sendReceive(documentElement);
The following is reported in the logging:
START_ELEMENT: doSpellingSuggestion:doSpellingSuggestion
START_ELEMENT: key:key
CHARACTERS: [some_valid_key]
END_ELEMENT: key:key
START_ELEMENT: phrase:phrase
CHARACTERS: [gogle]
END_ELEMENT: phrase:phrase
END_ELEMENT: doSpellingSuggestion:doSpellingSuggestion
END_DOCUMENT:
org.apache.axiom.om.OMException
at
org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:121)
at
org.apache.axiom.om.impl.llom.OMDocumentImpl.getOMDocumentElement(OMDocumentImpl.java:144)
at
com.invenso.xb.isp.xbconnect.wscall.WebserviceCallWorker.run(WebserviceCallWorker.java:121)
This is Axiom-related ofcourse, but I think this is the best place to ask
this question?
Any help is very much appreciated.
Thanks,
Brecht
Invenso - The "Integration Software" specialists.
_____________________________________________
Brecht Yperman
Development team
Direct: +32 (0)3 780 30 05
Email: [EMAIL PROTECTED]
INVENSO bvba
Industriepark-West 75
9100 Sint-Niklaas
Belgium - Europe
Phone: +32 (0)3 780 30 02
Fax: +32 (0)3 780 30 03
Email: [EMAIL PROTECTED]
Website: www.invenso.com
"E-mail disclaimer: This e-mail, and any attachments thereto, is intended
only for use by the addressee(s) named herein and may contain legally
privileged and/or confidential information. If you are not the intended
recipient, please note that any review, dissemination, disclosure,
alteration, printing, copying or transmission of this e-mail and/or any file
transmitted with it, is strictly prohibited and may be unlawful. If you have
received this e-mail by mistake, please immediately notify the sender and
permanently delete the original as well as any copy of any e-mail and any
printout thereof."
--
Ajith Ranabahu
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]