I am aware so maybe my question is a bit dumb so really what i need to do is
use aegis to do the mapping in code which i have had a stab at with the
below code however with the below i get a StackOverflowError. I am usure
about the org.codehaus.xfire.aegis.type.basic.ObjectType. Any ideas?
import javax.xml.namespace.QName;
import org.codehaus.xfire.aegis.AegisBindingProvider;
import org.codehaus.xfire.aegis.type.DefaultTypeMappingRegistry;
import org.codehaus.xfire.aegis.type.TypeMapping;
import org.codehaus.xfire.aegis.type.basic.ObjectType;
public class OidObjectServiceFactory extends
org.codehaus.xfire.service.binding.ObjectServiceFactory {
public OidObjectServiceFactory() {
super();
AegisBindingProvider provider = new AegisBindingProvider();
DefaultTypeMappingRegistry registry =
(DefaultTypeMappingRegistry)
provider.getTypeMappingRegistry();
TypeMapping mapping = registry.createDefaultMappings();
registerBeanMapping(mapping, PrincipalValue.class,
"PrincipalValue");
registry.register("http://schemas.xmlsoap.org/soap/encoding/",
mapping);
this.setBindingProvider(provider);
}
protected void registerBeanMapping(TypeMapping mapping, Class type,
String
name) {
QName qName = new QName("http://oidservice.uk.lsb.com", name);
ObjectType t = new ObjectType();
t.setTypeClass(type);
t.setSchemaType(qName);
t.setTypeMapping(mapping);
mapping.register(t);
}
}
Tomek Sztelak wrote:
>
> Just to make sure. Are you aware that XFire doesn't support RPC/Encoded ?
>
> On 5/22/07, David Melia <[EMAIL PROTECTED]> wrote:
>>
>> Hi,
>>
>> I am migrating from the Spring/Axis web service client to the
>> Spring/XFire
>> client (XFireClientFactoryBean). The problem is I cannot find any
>> examples
>> of mapping from my web service to my POJO's
>>
>> Does anybody know how i can do the following JAX RPC AXIS mapping using
>> the
>> XFire client. (i think you need to use
>> org.codehaus.xfire.service.binding.ObjectServiceFa ctory)
>>
>>
>> public class SsoRpcPortProxyFactoryBean extends
>> JaxRpcPortProxyFactoryBean {
>>
>> protected void postProcessJaxRpcService(Service service) {
>> TypeMappingRegistry registry = service.getTypeMappingRegistry();
>> TypeMapping mapping = registry.createTypeMapping();
>> registerBeanMapping(mapping, PrincipalValue.class,
>> "com_lsb_uk_sso_value_PrincipalValue");
>> registry.register("http://schemas.xmlsoap.org/soap/encoding/", mapping);
>> }
>>
>> protected void registerBeanMapping(TypeMapping mapping, Class type,
>> String
>> name) {
>> QName qName = new QName("http://com.lsb.uk.sso/ISsoServices.xsd", name);
>> mapping.register(type, qName, new BeanSerializerFactory(type, qName), new
>> BeanDeserializerFactory(type, qName));
>> }
>> }
>>
>> Basically i am mapping the same object from the web service to my client
>> but
>> with a different package name com.lsb.uk.oid.value.PrincipalValue to
>> com.lsb.uk.mqs.value.PrincipalValue. If i leave the mapping out i get
>> blanks in my value object results
>> --
>> View this message in context:
>> http://www.nabble.com/Migrating-Spring-Axis-to-XFire-Client--Binding-issue-%28JaxRpcPortProxyFactoryBean-equivilant%29-tf3795724.html#a10735968
>> Sent from the XFire - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list please visit:
>>
>> http://xircles.codehaus.org/manage_email
>>
>>
>
>
> --
> -----
> When one of our products stops working, we'll blame another vendor
> within 24 hours.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
> http://xircles.codehaus.org/manage_email
>
>
>
--
View this message in context:
http://www.nabble.com/Migrating-Spring-Axis-to-XFire-Client--Binding-issue-%28JaxRpcPortProxyFactoryBean-equivilant%29-tf3795724.html#a10737102
Sent from the XFire - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email