Hmm. Can I see your spring endpoint configuration?
On Fri, Dec 19, 2008 at 9:32 AM, Christian Landbo Frederiksen <[email protected]> wrote: > Yes that is exactly the situation. > > And yes the package-info.class is right there next to the other classes. > > It is not mentioned anywhere in any spring xml file. > > /Chr > > > -----Original Message----- > From: Benson Margulies [mailto:[email protected]] > Sent: 19. december 2008 15:22 > To: [email protected] > Subject: Re: Figuring out why params turn to null > > So, the net is that you add the package-info.java, compile it, and the > wsdl from ?wsdl does not change? You're sure that the > package-info.class is sitting there with your other .class files? > > Dan, am I missing something? Is there a JAX-WS versus JAX-B issue here? > > On Fri, Dec 19, 2008 at 9:11 AM, Christian Landbo Frederiksen > <[email protected]> wrote: >> Version 2.1 >> >> We don't use java2wsdl directly. >> >> We use Spring and the jaxws:endpoint tag >> >> /Chr >> >> >> >> -----Original Message----- >> From: Benson Margulies [mailto:[email protected]] >> Sent: 19. december 2008 14:43 >> To: [email protected] >> Subject: Re: Figuring out why params turn to null >> >> What version of CXF? What command-line args to java2wsdl? >> >> On Thu, Dec 18, 2008 at 5:41 PM, Christian Landbo Frederiksen >> <[email protected]> wrote: >>> OK Thanks. >>> >>> So now I try change it to qualified, since I have a client (Delphi) that >>> cannot handle this. >>> >>> Searching for how to do this I saw the package-info.java thing. >>> >>> So I put a package-info.java file into the package of the service with >>> this content: >>> >>> @javax.xml.bind.annotation.XmlSchema( >>> namespace = "http://echo/2008/11/16", >>> >>> attributeFormDefault=javax.xml.bind.annotation.XmlNsForm.UNQUALIFIED, >>> >>> elementFormDefault=javax.xml.bind.annotation.XmlNsForm.QUALIFIED) >>> package dk.something; >>> >>> >>> But nothing happens to the generated WSDL it still has both set to >>> unqualified. >>> >>> Am I missing something or is there another way? >>> >>> /Chr >>> >>> -----Original Message----- >>> From: Daniel Kulp [mailto:[email protected]] >>> Sent: 15. december 2008 17:52 >>> To: [email protected] >>> Cc: Christian Landbo Frederiksen >>> Subject: Re: Figuring out why params turn to null >>> >>> >>> The schema has: >>> >>> <xs:schema attributeFormDefault="unqualified" >>> elementFormDefault="unqualified" >>> >>> Thus, the "hello" child element MUST be unqualified. That's per the >>> schema >>> rules. If it's sent qualified, then it doesn't match the schema. >>> >>> Dan >>> >>> >>> >>> >>> On Monday 15 December 2008 9:57:19 am Christian Landbo Frederiksen >>> wrote: >>>> I am using CXF 2.1 >>>> >>>> >>>> >>>> I expose a java class/method like this >>>> >>>> >>>> >>>> @WebService(name="EchoService", >>>> targetNamespace="http://echo.dk/2008/11/16") >>>> >>>> public interface EchoService { >>>> >>>> >>>> >>>> @WebMethod >>>> >>>> public String echo(@WebParam(name = "hello") String hello) >>>> >>>> >>>> >>>> >>>> >>>> This turns into this wsdl: >>>> >>>> >>>> >>>> <xs:schema attributeFormDefault="unqualified" >>>> elementFormDefault="unqualified" >>>> targetNamespace="http://echo.dk/2008/11/16" >>>> xmlns="http://echo.dk/2008/11/16" >>>> xmlns:xs="http://www.w3.org/2001/XMLSchema"> >>>> >>>> <xs:element name="echo" type="echo"/> >>>> >>>> <xs:complexType name="echo"> >>>> >>>> <xs:sequence> >>>> >>>> <xs:element minOccurs="0" name="hello" type="xs:string"/> >>>> >>>> </xs:sequence> >>>> >>>> </xs:complexType> >>>> >>>> <xs:element name="echoResponse" type="echoResponse"/> >>>> >>>> <xs:complexType name="echoResponse"> >>>> >>>> <xs:sequence> >>>> >>>> <xs:element minOccurs="0" name="return" type="xs:string"/> >>>> >>>> </xs:sequence> >>>> >>>> </xs:complexType> >>>> >>>> </xs:schema> >>>> >>>> >>>> >>>> >>>> >>>> Can successfully be called in SOAP-UI: >>>> >>>> >>>> >>>> <soapenv:Envelope >>>> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" >>>> xmlns:ns="http://optagelse.dk/2008/11/16"> >>>> >>>> <soapenv:Header/> >>>> >>>> <soapenv:Body> >>>> >>>> <ns:echo> >>>> >>>> <hello>Champ</hello> >>>> >>>> </ns:echo> >>>> >>>> </soapenv:Body> >>>> >>>> </soapenv:Envelope> >>>> >>>> >>>> >>>> But another client generates this: >>>> >>>> >>>> >>>> <soapenv:Envelope >>>> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" > >>>> >>>> <soapenv:Header/> >>>> >>>> <soapenv:Body> >>>> >>>> <echo xmlns="http://optagelse.dk/2008/11/16"> >>>> >>>> <hello>Champ</hello> >>>> >>>> </echo> >>>> >>>> </soapenv:Body> >>>> >>>> </soapenv:Envelope> >>>> >>>> >>>> >>>> And this results in the param being null in the method >>>> >>>> >>>> >>>> The problem is that the param only works when it is given without >>>> namespace. >>>> >>>> ns:hello gives the same result in the first example. >>>> >>>> >>>> >>>> Is this not a bug? The schema in the wsdl has targetNamespace set so >>> you >>>> would assume that the client namespace on the param would work. >>>> >>>> >>>> >>>> /Chr >>> >>> >>> >>> -- >>> Daniel Kulp >>> [email protected] >>> http://dankulp.com/blog >>> >> >
