MS InfoPath cannot consume a web service developed using JEE

N

Neeraj Vora

I deployed a simple web service that returns a string that has xml data
within it. I developed it using NetBeans 5.5 Beta, as EJB @WebMethod. When I
try to access it from Microsoft InfoPath I get an error: InfoPath cannot use
the selected Web service method for receiving data because the method does
not provide valid XML data.

I searched and found another web service on the internet that similarly
returns a string that has XML data and InfoPath could consume it. This was
created, however, with MS tools.

Any pointers as to what could be the underlying issue?
 
N

Neeraj Vora

Upon further research and investigation, I found that the web service I
created with NetBeans 5.5 Beta/Glassfish returns the string like this.

<return><![CDATA[...]]></return>

where ... is the xml string.

The other WS I found on the Internet (created with MS tools) and also one
created with Tomcat/Axis returns like this.

<GetSpeechResult><MESSAGE>Request length is shorter than minimum
requirement.</MESSAGE></GetSpeechResult>

Can someone tell me the difference, and why does InfoPath not be able to
consume the first but can consume the second? Thanks.
 
N

Neeraj Vora

I also saw another difference.

I then looked further and saw another difference. The Web Service on the
Internet and one developed using Tomcat/Axis had the following first line.

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:
xsd="http://www.w3.org/2001/XMLSchema" xmlns:
xsi="http://www.w3.org/2001/XMLSchema-instance">


The one created using NetBeans 5.5 Beta/Glassfish had the following first
line.

<soapenv:Envelope xmlns:ns1="http://ws.dts.conexant.com/"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:
xsd="http://www.w3.org/2001/XMLSchema">

The latter is missing the xmlns: xsi attribute. Could there be any
significance to this?

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top