Ok, my apologies about the list thing, didn't realize that i hadn't.
Anyway, I see the post, and that looks promising, however whatever site i got
the instructions from, had me configure stuff in code, so i took a stab at what
to do here, as such:
public void init() {
EchoServiceImpl implementor = new EchoServiceImpl();
JaxWsServerFactoryBean svrFactory = new
JaxWsServerFactoryBean();
svrFactory.setServiceClass(EchoService.class);
svrFactory.setAddress("http://localhost:8080/echo");
svrFactory.setServiceBean(implementor);
svrFactory.getInInterceptors().add(new LoggingInInterceptor());
svrFactory.getOutInterceptors().add(new
LoggingOutInterceptor());
Map<String, Object> properties = svrFactory.getProperties();
if (properties == null)
properties = new HashMap<String, Object>();
properties.put("anonymousWrapperTypes", Boolean.TRUE);
svrFactory.setProperties(properties);
svrFactory.create();
}
specifically, adding an anonymouseWrapperTypes-> true property to the
JaxWsServerFactoryBean, but that didn't do anything. Should that work?
-----Original Message-----
From: Daniel Kulp <[EMAIL PROTECTED]>
Sent: Thursday, May 15, 2008 1:12pm
To: [email protected]
Cc: [EMAIL PROTECTED]
Subject: Re: Java First problems with Infopath
On May 15, 2008, at 12:53 PM, Dave Brosius wrote:
> Hmmm, no one can help me? Surely this is done all the time right?
I think the issue is that you aren't subscribed to the cxf users
list. Thus, you may not have seen my first response:
http://www.nabble.com/Java-First-problems-with-Infopath-to17218159.html#a17237207
Basically, cxf can be configured to generate the anonymous wrapper
types.. See my last comment in:
https://issues.apache.org/jira/browse/CXF-1144
> So i looked in the interum, i'm debugging in
> WSDLQueryHandler.writeResponse, and my code always goes thru the
> build dynamically condition. It would seem I need it to read the
> document, and so the param xsd needs to be set? Am i completely
> loopy? This has got to be documented somewhere, no?
I'm not sure why it's not returning your modified wsdl. Any chance
you can send me your example?
Dan
>
>
> -----Original Message-----
> From: Dave Brosius <[EMAIL PROTECTED]>
> Sent: Wednesday, May 14, 2008 4:11pm
> To: [EMAIL PROTECTED]
> Cc: [email protected]
> Subject: Re: Java First problems with Infopath
>
> 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 <[EMAIL PROTECTED]>
> Sent: Wednesday, May 14, 2008 1:25pm
> To: [email protected]
> 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 <[EMAIL PROTECTED]>
> Sent: Wednesday, May 14, 2008 12:35pm
> To: [email protected]
> 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
> [EMAIL PROTECTED]
> http://www.dankulp.com/blog
>
>
>
>
>
>
>
>
>
---
Daniel Kulp
[EMAIL PROTECTED]
http://www.dankulp.com/blog