• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Problems working with an Axis2 Web Service

New Here ,
Dec 15, 2007 Dec 15, 2007

Copy link to clipboard

Copied

Please please can anyone point me in the right direction with a problem I have been stuck on for quite a while?

I am currently facing issues invoking an Apache Axis2 Web Service written in Java from my ColdFusion (MX7) application. The Web Service has been written in-house by a colleague and deployed on a Linux server running Apache2 and Tomcat (6.0.14). The WS location is:

http://gw.bedsearcher.co.uk/BsTestWebService?wsdl

All methods of the WS expect 1 XML doc request and return 1 XML doc response. Every time I invoke a method for example searchEstabs I receive the following error message:

'No serializer found for class coldfusion.xml.XmlNodeList in registry org.apache.axis.encoding'

<!--- /// Start: Example Code --->

<cffile action="READ" file="C:\xyz\ExampleRequest1.xml" variable="ExampleRequest1">

<cfscript>
websrv = CreateObject("webservice"," http://gw.bedsearcher.co.uk/BsTestWebService?wsdl");
res = websrv.searchEstabs(XMLParse(Trim(ExampleRequest1)));
</cfscript>

<cfdump var="#res#">

<!--- /// End: Example Code --->

Thanks again,
Stewart 🙂
TOPICS
Advanced techniques

Views

587

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 16, 2007 Dec 16, 2007

Copy link to clipboard

Copied

It should be sufficient to just pass XML text, thus:

res = websrv.searchEstabs(ExampleRequest1);


Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 17, 2007 Dec 17, 2007

Copy link to clipboard

Copied

I wish it was that easy. If I don't pass an XML document object I get a

'stackTrace:error: The document is not a BsSearchEstabsRQ@ http://www.bedsearcher.co.uk/Bs/2007/01: document element mismatch'

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 19, 2007 Dec 19, 2007

Copy link to clipboard

Copied

Most services that require you to input an xml object do accept the xml text. Could there be a problem in how your webservice receives the xml input? For example, a Coldfusion xml document object is not a Java object.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 24, 2007 Dec 24, 2007

Copy link to clipboard

Copied

LATEST
An experiment shows that

<cfargument name= "orderXML" type = "string" required="Yes">

will work in a web service, but

<cfargument name= "orderXML" type = "xml" required="Yes">

will cause an exception. An example follows:


Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation