[ 
http://jira.codehaus.org/browse/XFIRE-509?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_86410
 ] 

Ashley McConnell commented on XFIRE-509:
----------------------------------------

We fixed this by adding the JaxbServiceFactory into services.xml like so: -

<beans>
  <service xmlns="http://xfire.codehaus.org/config/1.0";>
    <name>Test</name>
    <namespace>http://localhost:8080/bam/services/TestDemo</namespace>
    <serviceClass>com.blah.MyServiceClass</serviceClass>
   *<serviceFactory>org.codehaus.xfire.jaxb2.JaxbServiceFactory 
</serviceFactory>*
  </service>
</beans>

I hope this helps somebody!

> XFireFault exception: "No write method for property"
> ----------------------------------------------------
>
>                 Key: XFIRE-509
>                 URL: http://jira.codehaus.org/browse/XFIRE-509
>             Project: XFire
>          Issue Type: Bug
>    Affects Versions: 1.1
>         Environment: Windows XP Professional; version 2002; service pack2, 
> Jvm 1.5, Dell Pentium 4; 1GB Ram
>            Reporter: Christian Nuesa
>         Assigned To: Dan Diephouse
>             Fix For: 1.2.5
>
>         Attachments: EntityFactory.java, Persons.java, SOAPport.java, 
> UnboundedElementProblems.zip
>
>
> 1. Given this XML Schema:
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";
> elementFormDefault="qualified"><xs:element name="persons">
>   <xs:complexType>
>     <xs:sequence>
>       <xs:element name="person" maxOccurs="unbounded">
>         <xs:complexType>
>           <xs:sequence>
>             <xs:element name="full_name" type="xs:string"/>
>             <xs:element name="child_name" type="xs:string"
>             minOccurs="0" maxOccurs="5"/>
>           </xs:sequence>
>         </xs:complexType>
>       </xs:element>
>     </xs:sequence>
>   </xs:complexType>
> </xs:element></xs:schema>
> - I generated this Schema to java classes.. And I use the Persons class as my 
> service's parameter.  Please see attachements.
> 2. Snippet from my Client Code to call a Service Method.
> Service serviceModel = new ObjectServiceFactory().create(SOAPport.class) ;
> XFire xfire = XFireFactory.newInstance().getXFire();
> XFireProxyFactory factory = new XFireProxyFactory(xfire);
> String serviceUrl = "http://localhost:8080/xfire/services/Provisioning";;
>   
> SOAPport client = (SOAPport) factory.create(serviceModel, serviceUrl);
>    try {
>                 EntityFactory ef = new EntityFactory() ;
>                 // Create entities
>                 Persons pers = ef.createPersons() ;
>                 Person per = ef.createPersonsPerson() ;
>                 
>                 // Set Values on Person Entity
>                 per.getChildName().add("Mayette") ;
>                 per.getChildName().add("Lito") ;
>                 per.setFullName("Christian Nuesa") ;
>                 // Add a person to Persons Object
>                 pers.getPerson().add(per) ;
>                 
>                 // Call service
>                 pers = client.addPersons(pers) ;
>     }
> 3. When I call my Service I get this exception.
> Exception in thread "main" org.codehaus.xfire.XFireRuntimeException: Could 
> not invoke service.. Nested exception is org.codehaus.xfire.fault.XFireFault: 
> No write method for property 
> {http://entity.dataprovisioningserver.getgamma.com}childName in class 
> com.getgamma.dataprovisioningserver.entity.Persons$Person
> org.codehaus.xfire.fault.XFireFault: No write method for property 
> {http://entity.dataprovisioningserver.getgamma.com}childName in class 
> com.getgamma.dataprovisioningserver.entity.Persons$Person
>       at 
> org.codehaus.xfire.fault.Soap11FaultSerializer.readMessage(Soap11FaultSerializer.java:31)
>       at 
> org.codehaus.xfire.fault.SoapFaultSerializer.readMessage(SoapFaultSerializer.java:28)
>       at 
> org.codehaus.xfire.soap.handler.ReadHeadersHandler.checkForFault(ReadHeadersHandler.java:108)
>       at 
> org.codehaus.xfire.soap.handler.ReadHeadersHandler.invoke(ReadHeadersHandler.java:67)
>       at 
> org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:98)
>       at org.codehaus.xfire.client.Client.onReceive(Client.java:450)
>       at 
> org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChannel.java:182)
>       at 
> org.codehaus.xfire.transport.http.HttpChannel.send(HttpChannel.java:67)
>       at 
> org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java:26)
>       at 
> org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:98)
>       at org.codehaus.xfire.client.Client.invoke(Client.java:360)
>       at 
> org.codehaus.xfire.client.XFireProxy.handleRequest(XFireProxy.java:77)
>       at org.codehaus.xfire.client.XFireProxy.invoke(XFireProxy.java:57)
>       at $Proxy10.addPersons(Unknown Source)
>       at 
> test.sample.client.provisioning.aegis.CProvisioning.callService3(CProvisioning.java:148)
>       at 
> test.sample.client.provisioning.aegis.CProvisioning.main(CProvisioning.java:185)
> - I get this exception using the default binding, aegis.  And if I change 
> that to JaxB2 binding I do not get this exception but when I receive the 
> object from the server, the datas I set from the client is gone!  I get nulls 
> on my fields.  
> - I checked and I think the problem lies on ArrayList.  Whenever I take this 
> out, I do not get an exception.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

    http://xircles.codehaus.org/manage_email

Reply via email to