I am implementing a WS client with JBossWS to access a third-party web service, one of the service operations takes a xsd:anyType type as the parameter, and it gets mapped to SOAPElement in the wstools generated code. When I invoke the service, I got this exception:
javax.xml.rpc.JAXRPCException: Cannot obtain serializer factory for: [xmlType={http://www.w3.org/2001/XMLSchema}anyType,javaType=interface javax.xml.soap.SOAPElement]
This article (http://wiki.jboss.org/wiki/Wiki.jsp?page=WS4EETypeMapping) talks about how to add type mappings for service endpoint, not the WS client. But anyway, I tried to add file ws4ee-deployment.xml to my client's META-INF folder with following mapping:
<typeMapping qname="xsd:anyType"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
serializer="org.jboss.ws.jaxrpc.encoding.ElementSerializerFactory" deserializer="org.jboss.ws.jaxrpc.encoding.ElementDeserializerFactory"
type="java:javax.xml.soap.SOAPElement"
encodingStyle="" />
and it didn't work.
Does anyone know a solution to this issue?
Much thanks!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4032531#4032531
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4032531
Yes it makes more sense on the implementation bean than the interface. Although the spec unfortunately requires that we support it on the interface:
>From JAXWSWebServiceMetaDataBuilder:
| // The spec states that WSDL location should be allowed on an SEI, although it
| // makes far more sense on the implementation bean, so we ALWAYS override the SEI
| // when wsdlLocation is defined on the bean
| if (wsdlLocation.length() == 0)
| wsdlLocation = seiAnnotation.wsdlLocation();
|
-Jason
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4032530#4032530
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4032530
The spec requires that all wrappers be generated in the jaxws sub package by default (to avoid name conflicts). You can however control their destination using the RequestWrapper and ResponseWrapper annotations
| @RequestWrapper(classname="beispiel_9.Hello");
|
Keep in mind though that you do not need to use wsprovide to deploy on jbossws, we generate all of the wrapper classes dynamically at deploy time. You only need them if you want your deployment to be portable to other containers.
-Jason
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4032525#4032525
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4032525