When trying different things I got the same error as you. The problem was the
jaxb2 annotations in the domain pojo. I don't get that error when annotated
as in my posting here, but if I only specify "@XmlType" I get your error.



moraleslos wrote:
> 
> I think I'm running into the issue you described below.  I searched the
> forums for something similar and also placed my service POJO in the same
> package as my domain POJOs to no avail.  The error I'm getting is this:
> 
> ################################
> [INFO] Failed to generate jbi.xml
> 
> Embedded error: Unable to generate service unit descriptor!
> The name "" is not legal for JDOM/XML namespaces: Namespace URIs must be
> non-null and non-empty Strings.
> ################################
> 
> 
> Tracing the code looks like its coming from the generateWsdl() method in
> Jsr181Endpoint.  I'm not sure what I'm missing in my xbean.xml or my
> jsr181 service so I'll provide the code below:
> 
> ################################
> My xbean.xml:
> 
> <beans 
>       xmlns:jsr181="http://servicemix.apache.org/jsr181/1.0";
>       xmlns:foo="http://test.com/integration/servicemix";>
> 
>     <classpath>
>               <location>.</location>
>     </classpath>
>           
>       <jsr181:endpoint 
>               service="foo:xmlUnmarshaller"
>               interfaceName="retrieveData"
>               
> pojoClass="com.test.integration.servicemix.TestUnmarshallingService"
>               typeMapping="jaxb2"/>
>                      
> </beans>
> 
> 
> and my JSR181 POJO:
> 
> public class TestUnmarshallingService{
>       public void retrieveData( Document document ) {
>           documentDAO.save( document );
>       }
> }
> 
> #####################################
> 
> Thanks in advance.
> 
> -los
> 
> 
> 
> 
> Anders Hammar wrote:
>> 
>> 
>> You probably want to read another thread here on the forum where a
>> problem with different namespaces for your service and your pojos is
>> described. As of now, your object model has to be in the same namespace
>> as your service or the generated schema will not include them. There is
>> also a Jira for this issue.
>> 
>> 
>> moraleslos wrote:
>>> 
>>> I'm a bit confused.  All I want to do is unmarshal data from an XML
>>> document that is coming from the NMR into my pojos... I thought that was
>>> what the typeMapping attribute was for.  
>>> 
>>> So if I'm understanding correctly, I'll need to create a Web service
>>> that will accept this XML document and then invoke another service that
>>> will use jaxb2 APIs to unmarshal the data?  Again, I'm still fairly new
>>> to all of this jsr181 stuff.  Thanks in advance.
>>> 
>>> -los
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/connecting-to-jsr-181-jaxb2-tf2523299s12049.html#a7396809
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to