Thanks Guillaume,

Well, the suggestion you made worked in terms of getting maven to
successfully package the jbi project.  Too bad when I deploy it in
servicemix I get a "Unable to find jbi descriptor" error message...  I guess
I'll have to figure out something else...

-los



gnodet wrote:
> 
> Failed to generate jbi.xml
> 
> You can easily disable the jbi descriptor generation that may fail in some
> valid cases by setting the following definition in your pom.xml
> 
>       <plugin>
>         <groupId>org.apache.servicemix.tooling</groupId>
>         <artifactId>jbi-maven-plugin</artifactId>
>         <version>${servicemix-version}</version>
>         <extensions>true</extensions>
>         <configuration>
>            <generateJbiDescriptor>false</generateJbiDescriptor>
>         </configuration>
>       </plugin>
> 
> 
> On 11/16/06, moraleslos <[EMAIL PROTECTED]> wrote:
>>
>> I think I'm running into the same problem(s) that this thread was trying
>> to
>> solve.  I'm currently writing one jsr component to invoke a "test"
>> service
>> that will accept a domain object that was jaxb2-unmarshaled.  I've tried
>> the
>> many suggestions on this thread but I can't seem to move pass this error
>> I'm
>> getting:
>>
>> ########################
>> [INFO] Created Service Unit Analyzer
>> org.apache.servicemix.jsr181.packaging.Jsr1
>> [EMAIL PROTECTED]
>> [INFO]
>> ------------------------------------------------------------------------
>> [ERROR] BUILD ERROR
>> [INFO]
>> ------------------------------------------------------------------------
>> [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-nul
>> l and non-empty Strings.
>> [INFO]
>> ------------------------------------------------------------------------
>> [DEBUG] Trace
>> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to
>> generate
>> jbi.x
>> ml
>>         at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
>> ultLifecycleExecutor.java:559)
>>         at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi
>> fecycle(DefaultLifecycleExecutor.java:475)
>>         at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
>> ltLifecycleExecutor.java:454)
>>         at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
>> dleFailures(DefaultLifecycleExecutor.java:306)
>>         at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
>> ts(DefaultLifecycleExecutor.java:273)
>>         at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
>> fecycleExecutor.java:140)
>>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
>>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
>>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
>>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>         at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
>> java:39)
>>         at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
>> sorImpl.java:25)
>>         at java.lang.reflect.Method.invoke(Method.java:597)
>>         at
>> org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>>         at
>> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>>
>>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
>> Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to
>> generate jb
>> i.xml
>>         at
>> org.apache.servicemix.maven.plugin.jbi.GenerateServiceUnitDescriptorM
>> ojo.execute(GenerateServiceUnitDescriptorMojo.java:126)
>>         at
>> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
>> nManager.java:412)
>>         at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
>> ultLifecycleExecutor.java:534)
>>         ... 16 more
>> Caused by: org.apache.servicemix.maven.plugin.jbi.JbiPluginException:
>> Unable
>> to
>> generate service unit descriptor!
>>         at
>> org.apache.servicemix.maven.plugin.jbi.GenerateServiceUnitDescriptorM
>> ojo.generateJbiDescriptor(GenerateServiceUnitDescriptorMojo.java:217)
>>         at
>> org.apache.servicemix.maven.plugin.jbi.GenerateServiceUnitDescriptorM
>> ojo.execute(GenerateServiceUnitDescriptorMojo.java:124)
>>         ... 18 more
>> Caused by: java.lang.RuntimeException: Unable to register JSR-181
>> service,
>> Error
>>  calling init
>>         at
>> org.apache.servicemix.jsr181.packaging.Jsr181ServiceUnitAnalyzer.getP
>> rovides(Jsr181ServiceUnitAnalyzer.java:57)
>>         at
>> org.apache.servicemix.common.xbean.AbstractXBeanServiceUnitAnalyzer.i
>> nit(AbstractXBeanServiceUnitAnalyzer.java:89)
>>         at
>> org.apache.servicemix.maven.plugin.jbi.GenerateServiceUnitDescriptorM
>> ojo.generateJbiDescriptor(GenerateServiceUnitDescriptorMojo.java:204)
>>         ... 19 more
>> Caused by: javax.jbi.JBIException: Error calling init
>>         at
>> org.apache.servicemix.common.AsyncBaseLifeCycle.init(AsyncBaseLifeCyc
>> le.java:122)
>>         at
>> org.apache.servicemix.jsr181.packaging.Jsr181ServiceUnitAnalyzer.getP
>> rovides(Jsr181ServiceUnitAnalyzer.java:55)
>>         ... 21 more
>> Caused by: org.jdom.IllegalNameException: The name "" is not legal for
>> JDOM/XML
>> namespaces: Namespace URIs must be non-null and non-empty Strings.
>>         at org.jdom.Namespace.getNamespace(Namespace.java:164)
>>         at
>> org.codehaus.xfire.util.NamespaceHelper.getUniquePrefix(NamespaceHelp
>> er.java:58)
>>         at
>> org.codehaus.xfire.wsdl.AbstractWSDL.getNamespacePrefix(AbstractWSDL.
>> java:285)
>>         at
>> org.codehaus.xfire.wsdl11.builder.WSDLBuilder.writeParametersSchema(W
>> SDLBuilder.java:581)
>>         at
>> org.codehaus.xfire.wsdl11.builder.WSDLBuilder.createDocumentType(WSDL
>> Builder.java:549)
>>         at
>> org.codehaus.xfire.wsdl11.builder.WSDLBuilder.createWrappedInputParts
>> (WSDLBuilder.java:517)
>>         at
>> org.codehaus.xfire.wsdl11.builder.WSDLBuilder.createInputMessage(WSDL
>> Builder.java:312)
>>         at
>> org.codehaus.xfire.wsdl11.builder.WSDLBuilder.createAbstractInterface
>> (WSDLBuilder.java:216)
>>         at
>> org.codehaus.xfire.wsdl11.builder.WSDLBuilder.write(WSDLBuilder.java:
>> 151)
>>         at
>> org.codehaus.xfire.wsdl11.builder.WSDLBuilderAdapter.write(WSDLBuilde
>> rAdapter.java:40)
>>         at
>> org.codehaus.xfire.DefaultXFire.generateWSDL(DefaultXFire.java:104)
>>         at
>> org.apache.servicemix.jsr181.Jsr181Endpoint.generateWsdl(Jsr181Endpoi
>> nt.java:342)
>>         at
>> org.apache.servicemix.jsr181.Jsr181Endpoint.registerService(Jsr181End
>> point.java:272)
>>         at
>> org.apache.servicemix.jsr181.Jsr181SpringComponent$LifeCycle.doInit(J
>> sr181SpringComponent.java:67)
>>         at
>> org.apache.servicemix.common.AsyncBaseLifeCycle.init(AsyncBaseLifeCyc
>> le.java:115)
>>         ... 22 more
>> #################################
>>
>>
>> I've temporarily moved all of my jaxb2-annotated domain POJOs to the same
>> directory as the JSR181 service so that they contain the same package
>> structure... to no avail.  Below is my test services as well as my
>> xbean.xml:
>>
>> ################################
>> package com.test.integration.servicemix;
>>
>> public interface TestDataService {
>>         public void retrieveData(Document document);
>> }
>>
>> -------------------------------
>>
>> package com.test.integration.servicemix;
>>
>> public class TestDataServiceImpl implements TestDataService {
>>         public void retrieveData(Document document) {
>>              System.out.println(document);
>>         }
>> }
>>
>> -------------------------------
>>
>> package com.test.integration.servicemix;
>>
>> @XmlRootElement
>> public class Document {
>>    private String id;
>>
>>    // accessors for id
>> }
>>
>> -----------------------------
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>>
>> <beans
>>         xmlns:jsr181="http://servicemix.apache.org/jsr181/1.0";
>>         xmlns:foo="http://servicemix.integration.test.com";>
>>
>>     <classpath>
>>                 <location>.</location>
>>     </classpath>
>>
>>         <jsr181:endpoint
>>                 service="foo:xmlUnmarshaller"
>>
>> serviceInterface="com.test.integration.servicemix.TestDataService"
>>                
>> pojoClass="com.test.integration.servicemix.TestDataServiceImpl"
>>                 typeMapping="jaxb2"/>
>>
>> </beans>
>> --------------------------------
>> ##################################
>>
>> BTW, is there a way to see the generated WSDL?  I can't seem to find out
>> how/where the WSDL gets generated.  Also this issue stems from this
>> thread:
>> http://www.nabble.com/connecting-to-jsr-181-jaxb2-tf2523299s12049.html
>>
>> Thanks in advance.
>>
>> -los
>>
>> Christian Schneider-16 wrote:
>> >
>> > Hi Ken,
>> >
>> > I got your example working by doing some small changes. First I made
>> the
>> > service and endpoint names easier and made sure they match in the http
>> > and jsr definition.
>> > Btw. I wonder why it worked at all with the original definitions. But
>> > perhaps I don“t completely understand servicemix here.
>> >
>> > But the thing that really made the difference is that I used the
>> > namespace of your java package in the xmlns:serviceNS. It seems like a
>> > complex object is only included in the wsdl if it is in the same
>> > namespace as the service itself. I think this could be a bug in
>> > servicemix or xfire. Perhaps Guillaume can comment on this.
>> >
>> > Best regards
>> >
>> > Christian
>> >
>> >
>> > <?xml version="1.0" encoding="UTF-8"?>
>> >
>> > <beans xmlns:http="http://servicemix.apache.org/http/1.0";
>> > xmlns:serviceNS="http://service.edgenet.com";>
>> >    <http:endpoint service="serviceNS:OrderService" endpoint="soap"
>> > role="consumer" locationURI="http://localhost:8080/Order";
>> > defaultMep="http://www.w3.org/2004/08/wsdl/in-out"; soap="true"/>
>> > </beans>
>> >
>> > <?xml version="1.0" encoding="UTF-8"?>
>> >
>> > <beans xmlns:jsr181="http://servicemix.apache.org/jsr181/1.0";
>> > xmlns:serviceNS="http://service.edgenet.com";>
>> >    <classpath>
>> >      <location>.</location>
>> >    </classpath>
>> >    <jsr181:endpoint service="serviceNS:OrderService" endpoint="soap"
>> > pojoClass="com.edgenet.service.SubmitOrderService"
>> > serviceInterface="com.edgenet.service.SubmitOrder" style="wrapped"/>
>> > </beans>
>> >
>> >
>> >
>> > Ken Berthelot schrieb:
>> >> Thanks for the response, but still no luck.  I added a SubmitOrder
>> >> interface (and had SubmitOrderService implement it) and referenced it
>> in
>> >> the jsr181 config:
>> >>
>> >>
>> >
>> > --
>> >
>> > Christian Schneider
>> > ---
>> > http://www.liquid-reality.de
>> >
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Incorrect-wsdl-for-jsr181-component-tf2585069s12049.html#a7389608
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> Cheers,
> Guillaume Nodet
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Incorrect-wsdl-for-jsr181-component-tf2585069s12049.html#a7403266
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to