Thanks Dan, that did the trick! Indeed, my colleague already informed me we 
weren't using a jaxbWsdlBuilder or something like that.

On the other hand, the generics in my Map are still ignored ... Can I do 
something about that? Right now, I'm going to provide our customer with a 
self-written wsdl to limit the possibilities of the generated :

<xsd:element maxOccurs="unbounded" minOccurs="0" name="entry">
        <xsd:complexType>
                <xsd:sequence>
                        <xsd:element maxOccurs="1" minOccurs="0" name="key" 
type="xsd:anyType"/>
                        <xsd:element maxOccurs="1" minOccurs="0" name="value" 
type="xsd:anyType"/>
                </xsd:sequence>
        </xsd:complexType>
</xsd:element>

In my custom wsdl this will look like:
<xsd:element maxOccurs="unbounded" minOccurs="0" name="entry">
        <xsd:complexType>
                <xsd:sequence>
                        <xsd:element maxOccurs="1" minOccurs="0" name="key" 
type="tns:myCriteria"/>
                        <xsd:element maxOccurs="1" minOccurs="0" name="value" 
type="tns:arrayOfString"/>
                </xsd:sequence>
        </xsd:complexType>
</xsd:element>

With myCriteria a simpleType enum and arrayOfString, well you can guess what's 
behind that.

Is there a better way to do this?

Dylan Honorez
R & D Consultant
4C Technologies / kZen
+32 (0)485 / 69.28.12
[EMAIL PROTECTED]


-----Original Message-----
From: Dan Diephouse [mailto:[EMAIL PROTECTED] 
Sent: woensdag 14 maart 2007 6:49
To: [email protected]
Subject: Re: [xfire-user] FW: XFire-Spring-JAXB - numerous difficulties

Background: JAXB needs a custom WSDLBuilder. Normally the
JaxbServiceFactory sets this up for you. By combining the
JaxbTypeRegistry with the Jsr181HandlerMapping you are missing this
step. In 1.2.5 (just released) you can specify a service factory
instead which should fix it:

<bean id="handlerMapping"...>
<property name="serviceFactory">
  <bean class="org.codehaus.xfire.jaxb2.JaxbServiceFactory"/>
</property>
</bean>

(Note: you no longer need to specify a type registry then)

- Dan

On 3/13/07, Honorez Dylan <[EMAIL PROTECTED]> wrote:
>
>
>
>
> Hi,
>
>
>
> I am developing a webservice using XFire, Spring and JAXB bindings. I'm
> using code-first approach, and I want to see how far I can push
> customization of my WSDL with this.
>
>
>
> Since I am not sure I am wiring everything like I should, let me start with
> posting my XFire/Spring/JAXB configuration:
>
>
>
> <!-XFIRE STUFF à
>
> <import
> resource="classpath:org/codehaus/xfire/spring/xfire.xml"
> />
>
>
>
> <bean id="jaxbTypeMappingRegistry"
> class="org.codehaus.xfire.jaxb2.JaxbTypeRegistry"
> init-method="createDefaultMappings"/>
>
>
>
> <bean id="webAnnotations"
> class="org.codehaus.xfire.annotations.jsr181.Jsr181WebAnnotations"/>
>
>
>
> <bean id="handlerMapping"
> class="org.codehaus.xfire.spring.remoting.Jsr181HandlerMapping">
>
> <property name="typeMappingRegistry">
>
>            <ref bean="jaxbTypeMappingRegistry"/>
>
>        </property>
>
>        <property name="xfire">
>
>            <ref bean="xfire"/>
>
>        </property>
>
>        <property name="webAnnotations">
>
>            <ref bean="webAnnotations"/>
>
>        </property>
>
> </bean>
>
>
>
> <bean
> class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
>
>        <property name="urlMap">
>
>            <map>
>
>                <entry key="/services/SearchService">
>
>                    <ref bean="searchService"/>
>
>                </entry>
>
>            </map>
>
>        </property>
>
> </bean>
>
>
>
> <!-MY SERVICE STUFF à
>
> <bean id="genericServiceBean"
> class="org.codehaus.xfire.spring.ServiceBean"
> abstract="true">
>
>       <property name="serviceFactory" ref="jaxbServiceFactory" />
>
> </bean>
>
>
>
> <bean id="searchService" parent="genericServiceBean">
>
>       <property name="serviceBean" ref="searchServiceImpl" />
>
> </bean>
>
>
>
> <bean name="jaxbServiceFactory"
> class="org.codehaus.xfire.jaxb2.JaxbServiceFactory">
>
>       <constructor-arg ref="xfire.transportManager" />
>
> </bean>
>
>
>
>
>
> Fact is, the service works, but not all of my annotations are respected.
> That's why I wonder if I wired everything correctly. So can anyone confirm?
>
>
>
> Dylan Honorez
>  R & D Consultant
>  4C Technologies / kZen
>  +32 (0)485 / 69.28.12
>  [EMAIL PROTECTED]
>
>


-- 
Dan Diephouse
Envoi Solutions
http://envoisolutions.com | http://netzooid.com/blog

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to