cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dave Brosius" <dbros...@mebigfatguy.com>
Subject Re: Java First problems with Infopath
Date Wed, 14 May 2008 20:11:19 GMT
OK, i figured out the problem.

CXF generates this:

    <xsd:element name="echo" type="tns:echo"/>
    <xsd:complexType name="echo">
        <xsd:sequence>
            <xsd:element minOccurs="0" name="message" type="xsd:string"/>
        </xsd:sequence>
    </xsd:complexType>
    <xsd:element name="echoResponse" type="tns:echoResponse"/>
    <xsd:complexType name="echoResponse">
        <xsd:sequence>
            <xsd:element minOccurs="0" name="return" type="xsd:string"/>
        </xsd:sequence>
    </xsd:complexType>


which by the way seems odd to me that the complexType name wasn't qualified with tns, but
anyway, InfoPath only accepts

    <xsd:element name="echo">
	    <xsd:complexType>
	        <xsd:sequence>
	            <xsd:element minOccurs="0" name="message" type="xsd:string"/>
	        </xsd:sequence>
	    </xsd:complexType>
	</xsd:element>
    <xsd:element name="echoResponse">
	    <xsd:complexType>
	        <xsd:sequence>
	            <xsd:element minOccurs="0" name="return" type="xsd:string"/>
	        </xsd:sequence>
	    </xsd:complexType>
	</xsd:element>


When i create a file, and point InfoPath to it, it works. So now i want to get CXF to return
this 'canned' wsdl, as opposed to generating one. So i did this:


@WebService(endpointInterface = "com.primavera.echo.ws.EchoService", serviceName = "EchoService",
wsdlLocation="META-INF/echo.wsdl")
public class EchoServiceImpl implements EchoService {

	public String echo(String message) {
		return "W00T: " + message;
	}

}

and placed the wsdl at META-INF/echo.wsdl. But no luck, CXF just keeps generating new ones.
I've tried /META-INF/echo.wsdl, and file:///META-INF/echo.wsdl, but nothing i do can get CXF
to NOT dynamically generate the wsdl.

Any ideas?


-----Original Message-----
From: Dave Brosius <dbrosius@mebigfatguy.com>
Sent: Wednesday, May 14, 2008 1:25pm
To: users@cxf.apache.org
Subject: Re: Java First problems with Infopath

InfoPath is a basic component in the Microsoft Office suite, and is probably a very common
partner to sharepoint. While i don't argue that probably microsoft is wacked here, it is most
likely one of the biggest players from a penetration point of view in the market.

I did try what you suggested and that is the message i got.

I'm guessing that this message 

http://groups.google.com/group/microsoft.public.infopath/browse_thread/thread/b7af1940f6c0ecc1

is related to the problem i'm having. And thus i have to write my own wsdls from now on.


So to do this, i just capture the wsdl and save it to a file, modify it and then add a wsdlLocation
attribute to my @WebService, right?



-----Original Message-----
From: Daniel Kulp <dkulp@apache.org>
Sent: Wednesday, May 14, 2008 12:35pm
To: users@cxf.apache.org
Subject: Re: Java First problems with Infopath


Not having ever used or even seen InfoPath, I'm not sure how much help  
I can be here, but I'll try.   (and I don't even have a windows box to  
even try.

Even in java first, a contract is available.   You can get the wsdl  
contract just by browsing to the URL with  ?wsdl appended.    I guess  
I would try downloading that wsdl and pointing InfoPath at it and  
seeing what it says.

Dan



On May 13, 2008, at 4:40 PM, Dave Brosius wrote:

> I used the sample echo and generated a java first webservice. When  
> accessed by soapUI it works fine. when used from InfoPath, it fails  
> with message "InfoPath cannot use the selected Web service method  
> for receiving data because the method does not provide valid XML  
> data."
>
>
> Am I to understand that one can only use contract first ws?
>

---
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog









Mime
View raw message