axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From TMG <...@nc.rr.com>
Subject Re: WSDLException: Can't find prefix for...
Date Fri, 28 Jan 2005 15:59:35 GMT
Greg,

Without being able to review all the parts, my first guess is that you 
have inconsistencies with your namespace.  It appears you are using an 
URN namespace  xmlns:ns="urn:notification:voxsurf.com" in the wsdd, and 
the wsdl has a URL namespace xmlns:"http://notification.voxsurf.com".

Tom Gordon

Greg Cawthorn wrote:

> I am having a problem with a web service under Axis 1.1 in Tomcat 5. 
> The service is a stub for a data handler and declares CRUD methods for 
> a profile object which I have built custom serializers for and 
> declared in my deployment descriptor. The interface looks like this:
>
>    public void addNotificationProfile(VxsNotificationProfile profile) 
> throws VxsPersistenceException;
>    public void deleteNotificationProfile(VxsUserId userId) throws 
> VxsPersistenceException;
>    public VxsNotificationProfile retrieveNotificationProfile(VxsUserId 
> userId) throws VxsPersistenceException;
>    public void updateNotificationProfile(VxsNotificationProfile 
> profile) throws VxsPersistenceException;
>
> It deploys successfully but when I try to view the WSDL I get the 
> following exception:
>
> Fault - ; nested exception is:     WSDLException: 
> faultCode=OTHER_ERROR: Can't find prefix for 
> 'http://notification.voxsurf.com'. Namespace prefixes must be set on 
> the Definition object using the addNamespace(...) method.:
> AxisFault
> faultCode: 
> {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
> faultSubcode: faultString: WSDLException: faultCode=OTHER_ERROR: Can't 
> find prefix for 'http://notification.voxsurf.com'. Namespace prefixes 
> must be set on the Definition object using the addNamespace(...) 
> method.: faultActor: faultNode: faultDetail:
>
> However if I remove some of the class's methods from the 
> allowedMethods parameter in the wsdd (which I've attached), then I can 
> view the WSDL with no error. It appears that I can declare a single 
> method that takes a VxsNotificationProfile object as a parameter, but 
> if I declare two methods such as addNotificationProfile and 
> updateNotificationProfile then the error occurs. It may be a problem 
> with my custom serializer for that class but the fact that I can view 
> the WSDL for certain methods that take in or return an instance of the 
> object suggests otherwise.
>
> Does anyone have any ideas as to what I'm doing wrong?
>
> Thanks
>
> Greg Cawthorn
>
>------------------------------------------------------------------------
>
><deployment name="test" xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"
xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance">
>  <service name="NotificationService" style="message">
>    <parameter name="className" value="com.voxsurf.notification.service.VxsNotificationWebService"/>
>    <parameter name="allowedMethods" value="submitEvent"/>
>  </service>
>  <service name="NotificationProfileService" style="java:RPC">
>    <parameter name="className" value="com.voxsurf.notification.service.VxsWebServiceNotificationProfileDataHandler"/>
>    <!--<parameter name="allowedMethods" value="addNotificationProfile deleteNotificationProfile
retrieveNotificationProfile updateNotificationProfile"/>-->
>    <parameter name="allowedMethods" value="deleteNotificationProfile retrieveNotificationProfile"/>
>    
>    <typeMapping qname="ns:VxsUserId" xmlns:ns="urn:notification.voxsurf.com"
>    	languageSpecificType="java:com.voxsurf.core.entities.VxsUserId"
>    	deserializer="com.voxsurf.notification.service.axis.VxsUserIdDeserializerFactory"
>    	encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
>
>    <typeMapping qname="ns:VxsNotificationRuleId" xmlns:ns="urn:notification.voxsurf.com"
>    	languageSpecificType="java:com.voxsurf.notification.ruleengine.VxsNotificationRuleId"
>    	deserializer="com.voxsurf.notification.service.axis.VxsNotificationRuleIdDeserializerFactory"
>    	encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
>
>    <typeMapping qname="ns:VxsNotificationDeviceId" xmlns:ns="urn:notification.voxsurf.com"
>    	languageSpecificType="java:com.voxsurf.notification.VxsNotificationDeviceId"
>    	deserializer="com.voxsurf.notification.service.axis.VxsNotificationDeviceIdDeserializerFactory"
>    	encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
>
>    <typeMapping qname="ns:VxsNotificationRule" xmlns:ns="urn:notification.voxsurf.com"
>    	languageSpecificType="java:com.voxsurf.notification.ruleengine.VxsNotificationRule"
>    	serializer="com.voxsurf.notification.service.axis.VxsNotificationRuleSerializerFactory"
>    	deserializer="com.voxsurf.notification.service.axis.VxsNotificationRuleDeserializerFactory"
>    	encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
>
>    <typeMapping qname="ns:VxsNotificationDevice" xmlns:ns="urn:notification.voxsurf.com"
>    	languageSpecificType="java:com.voxsurf.notification.VxsNotificationDevice"
>    	serializer="com.voxsurf.notification.service.axis.VxsNotificationDeviceSerializerFactory"
>    	deserializer="com.voxsurf.notification.service.axis.VxsNotificationDeviceDeserializerFactory"
>    	encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
>  </service>
></deployment>
>  
>


Mime
View raw message