With the limited information that you have supplied, I would think
that you have to do --PkgtoNS for the User class as well.

Might be best to create the wsdl first and generate the java sources
from the wsdl, if you are able to.

Regards,

Patrick.

P.S. Wasn't aware Vodaphone was outsourcing to the Netherlands!! ;-)

On Mon, 24 Jan 2005 10:56:19 +0100, Harm de Laat <[EMAIL PROTECTED]> wrote:
> Hi all,
> 
> I'm trying to generate an WSDL file using the following Java class:
> 
> package nl.mycomp.quicksilver.jaxb.dataservices;
> 
> import nl.vodafone.quicksilver.jaxb.User;
> 
> public class ChangeSimFormService {
>    public User getString() {
>       return null;
>    }
> 
>    public void echo( User user ) {
>       return;
>    }
> }
> 
> I'm running the following command:
> 
> java2wsdl -o webservices/ChangeSimFormService.wsdl -yRPC -uLITERAL -l 
> http://localhost:8080/WEO/webservices/ChangeSimFormService -n 
> http://dataservices.weo.mycomp.nl/SOAP/ChangeSimFormService --PkgtoNS 
> nl.mycomp.quicksilver.jaxb=http://axistypes.quicksilver.mycomp.nl/ 
> nl.mycomp.weo.dataservides.ChangeSimFormService
> 
> I get the following exception:
> 
> WSDLException: faultCode=OTHER_ERROR: Can't find prefix for 
> 'http://axistypes.quicksilver.mycomp.nl/'. Namespace prefixes must be set on 
> the Definition object using the addNamespace(...) method.
> 
> If I change my class to:
> 
> package nl.mycomp.quicksilver.jaxb.dataservices;
> 
> public class ChangeSimFormService {
>    public Object getString() {
>       return null;
>    }
> 
>    public void echo( Object user ) {
>       return;
>    }
> }
> 
> everything runs just fine...
> 
> I'm realy puzzled by this. It seems that Axis doesn't like my User object?  
> This User object is an class generated by JAXB. Can somebody please explain 
> why I'm getting the error mentioned above?
> 
> Many thanks,
> 
> Regards,
> 
> Harm de Laat
> Ciber
> The Netherlands
> 
>

Reply via email to