On Wednesday, July 11, 2012 11:36:17 AM rouble wrote: > Hi Dan, > > >> The only options I know of to specify the namespace is via annotation > >> or > >> package-info both of which do not work for an Exception. > > > > You may need to setup the exception to look like one that is generated > > from wsdl2java. That would mean that is would have a getFaultInfo() > > method that returns a JAXB bean of the information that would be > > transferred. THAT object should be able to have all the JAXB > > annotations on it to set the namespaces and such. Take your wsdl and > > run a wsdl2java on it to see what it generates for the faults and use > > that as a starting point. > > Yes - I am able to control the package/namespace of the fault bean. > However I want to be able to control the package/namespace of the > Exception itself. Is that possible?
I'm completely confused now.... When doing a Java -> WSDL translation, the FaultInfo bean would control the namespace and class name and such for the bean created in the Schema part of the wsdl. That also the only thing that would appear in the SOAP message on the wire. Thus, the annotations there are what are important for the namespace of the on-the-wire detail child element. The @WebFault on the Exception itself really just controls the name of the message in the wsdl and part name. Nothing really namespace related at all for that. For wsdl -> java, you can create a JAX-WS binding file that would map the wsdl:portType/wsdl:operation/wsdl:fault to a fully qualified exception class name. See section 8.7.4 of the JAX-WS spec. -- Daniel Kulp [email protected] - http://dankulp.com/blog Talend Community Coder - http://coders.talend.com
