Nobody has idea, why my method receives "" instead of NULL? Leos
______________________________________________________________ > Od: [EMAIL PROTECTED] > Komu: <[email protected]> > Datum: 03.09.2008 23:16 > Předmět: issues with PHP integration (null is not sent) > >Hi, > >my web service is up and running and now the other developer starts to use it >in his PHP project. It worked fine on local copies, but it behaves strange on >live server :-( Suddenly I receive all parameters as "" instead of NULL, when >not specified on PHP side. > >I started implementation from java interface: > public void registerUser(@WebParam(name = "login") String login, > @WebParam(name = "password") String password, > @WebParam(name = "openId") String openId, > @WebParam(name = "name") String name, > @WebParam(name = "portal") String portal, > @WebParam(name = "portalPassword") String portalPassword) > throws DuplicateKeyException, InvalidInputException, > AccessDeniedException, LdapException; > >And here you can see generated WSDL: >http://www.abclinuxu.cz/services/users?wsdl ><xs:complexType name="registerUser"> ><xs:sequence> ><xs:element minOccurs="0" name="login" type="xs:string"/> ><xs:element minOccurs="0" name="password" type="xs:string"/> ><xs:element minOccurs="0" name="openId" type="xs:string"/> ><xs:element minOccurs="0" name="name" type="xs:string"/> ><xs:element minOccurs="0" name="portal" type="xs:string"/> ><xs:element minOccurs="0" name="portalPassword" type="xs:string"/> ></xs:sequence> > >1) How can I influence this WSDL? For example I want to specify minOccurs=1 to >make login and password mandatory, but nillable=true for openid. > >2) Do you know, why CXF sends "" instead of NULL? This is in SOAP body >(different method): > ><ns1:updateUser><acount><city/><country/><deliveryAddressCity/><deliveryAddressCountry>null</deliveryAddressCountry><deliveryAddressName/><deliveryAddressStreet/><deliveryAddressZIP/><emailAddress>[EMAIL > >PROTECTED]</emailAddress><emailBlocked/><emailVerified/><forgottenPasswordToken/><homepageURL/><invoicingAddressCity>Praha > 3</invoicingAddressCity><invoicingAddressCountry>ceska >republika</invoicingAddressCountry><invoicingAddressName/><invoicingAddressStreet>Konevova > </invoicingAddressStreet><invoicingAddressZIP>130 >83</invoicingAddressZIP><invoicingCompany/><invoicingCompanyDIC/><invoicingCompanyICO/><lastLoginDate/><login>literakl2</login><name>Leos > >Literak</name><openID/><passwordAnswer/><passwordHash/><passwordQuestion/><phone/><registrationDate/><sex/><userPassword/></acount><portal>secret/portal><portalPassword>secret</portalPassword></ns1:updateUser> > >The developer tried to modify this SOAP message and sent <openID >xsi:nil="true" /> but CXF though translated it into "" parameter. > >I use CXF 2.0.5 in jetty 6.1.11, no spring, deploy the service with: > Endpoint.publish(endpointUrlServices, new UserAccountServiceImpl()); > >public class AbcCxfServlet extends CXFNonSpringServlet { > public void init(ServletConfig servletConfig) throws ServletException { > super.init(servletConfig); > Bus bus = this.getBus(); > BusFactory.setDefaultBus(bus); > } >} > >Any help will be appreciated. > >Leos > >
