Hello again.

Thank you again Bruce for your help. I created the project fine.
However, looking at ExampleService.java in my NB editor, I see that it
is complaining that it can't find the classes javax.jws.WebMethod and
javax.jws.WebService. 

Before I wrote this message, I said to myself to hang on, it might be
just that Maven needs to download the required jars from the remote
repository, so I attempted to build the project to get these files.

So I built, and Maven returned the following error:

*
****** Start of output 
[INFO]------------------------------------------------------------------
------
[ERROR]BUILD ERROR
[INFO]------------------------------------------------------------------
------
[INFO]Failed to resolve artifact.

Missing:
----------
1) org.codehaus.xfire:xfire-jaxws:jar:${xfire-version}
[INFO]
[INFO]  Try downloading the file manually from the project website.
[INFO]
[INFO]  Then, install it using the command: 
[INFO]      mvn install:install-file -DgroupId=org.codehaus.xfire
-DartifactId=xfire-jaxws \
          -Dversion=${xfire-version} -Dpackaging=jar
-Dfile=/path/to/file
[INFO]
****** End of output
*

I assume that xfire-version is to be substituted somewhere, and this was
why, when I looked on http://mvnrepository.com/ without substituting any
intended value for this, I could not locate the jar. When I searched the
site again using just xfire-jaxws, I observed that 1.2.5 appeared the
most recent stable version.

Following the vervicemix-version declaration, I declared a property tag
in the POM called xfire-version, and assigned it 1.2.5 as its value.
This substituted correctly as I had deduced in the project tree in
NetBeans.

I also added the following dependency when I searched the Maven
repository for 'javax.jws':

<dependency>
    <groupId>javax.jws</groupId>
    <artifactId>jsr181</artifactId>
    <version>1.0</version>
</dependency>

After attempting another build, I received the following error and
instruction on how to remedy it:

*
****** Start of output
[INFO]------------------------------------------------------------------
------
[ERROR]BUILD ERROR
[INFO]------------------------------------------------------------------
------
[INFO]Failed to resolve artifact.

Missing:
----------
1) javax.jws:jsr181:jar:1.0
[INFO]
[INFO]  Try downloading the file manually from: 
[INFO]      http://ftpna2.bea.com/pub/downloads/jwsri-1.0.zip
[INFO]
[INFO]  Then, install it using the command: 
[INFO]      mvn install:install-file -DgroupId=javax.jws
-DartifactId=jsr181 \
          -Dversion=1.0 -Dpackaging=jar -Dfile=/path/to/file
****** End of output
*

After following the instructions, I try to build again.

This time, I received the following error:

*
****** Start of output 
[INFO]------------------------------------------------------------------
------
[ERROR]BUILD ERROR
[INFO]------------------------------------------------------------------
------
[INFO]Failed to generate jbi.xml

Embedded error: Unable to generate service unit descriptor!
<component-task-result
xmlns="http://java.sun.com/xml/ns/jbi/management-message";>
        <component-name>null</component-name>
        <component-task-result-details>
                <task-result-details>
                        <task-id>deploy</task-id>
                        <task-result>FAILED</task-result>
                        <message-type>ERROR</message-type>
 
<task-status-msg><msg-loc-info><loc-token/><loc-message>java.lang.Illega
lArgumentException: Invalid name
[]</loc-message></msg-loc-info></task-status-msg>
                        <exception-info>
                                <nesting-level>1</nesting-level>
                                <msg-loc-info>
                                        <loc-token />
                                        <loc-message>Invalid name
[]</loc-message>
 
<stack-trace><![CDATA[java.lang.IllegalArgumentException: Invalid name
[]
[INFO]  at
org.codehaus.xfire.service.ServiceInfo.addOperation(ServiceInfo.java:73)
[INFO]  at
org.codehaus.xfire.service.binding.ObjectServiceFactory.addOperation(Obj
ectServiceFactory.java:792)
[INFO]  at
org.apache.servicemix.jsr181.xfire.ServiceFactoryHelper$FixedJAXWSServic
eFactory.addOperation(ServiceFactoryHelper.java:210)
[INFO]  at
org.codehaus.xfire.service.binding.ObjectServiceFactory.initializeOperat
ions(ObjectServiceFactory.java:752)
[INFO]  at
org.codehaus.xfire.service.binding.ObjectServiceFactory.create(ObjectSer
viceFactory.java:435)
[INFO]  at
org.codehaus.xfire.annotations.AnnotationServiceFactory.create(Annotatio
nServiceFactory.java:256)
[INFO]  at
org.apache.servicemix.jsr181.Jsr181Endpoint.registerService(Jsr181Endpoi
nt.java:301)
[INFO]  at
org.apache.servicemix.jsr181.Jsr181Endpoint.validate(Jsr181Endpoint.java
:216)
[INFO]  at
org.apache.servicemix.common.DefaultComponent.addEndpoint(DefaultCompone
nt.java:300)
[INFO]  at
org.apache.servicemix.common.DefaultComponent.doInit(DefaultComponent.ja
va:287)
[INFO]  at
org.apache.servicemix.jsr181.Jsr181Component.doInit(Jsr181Component.java
:81)
[INFO]  at
org.apache.servicemix.common.AsyncBaseLifeCycle.init(AsyncBaseLifeCycle.
java:142)
[INFO]  at
org.apache.servicemix.jsr181.packaging.Jsr181ServiceUnitAnalyzer.getProv
ides(Jsr181ServiceUnitAnalyzer.java:57)
[INFO]  at
org.apache.servicemix.common.xbean.AbstractXBeanServiceUnitAnalyzer.init
(AbstractXBeanServiceUnitAnalyzer.java:96)
[INFO]  at
org.apache.servicemix.maven.plugin.jbi.GenerateServiceUnitDescriptorMojo
.generateJbiDescriptor(GenerateServiceUnitDescriptorMojo.java:166)
[INFO]  at
org.apache.servicemix.maven.plugin.jbi.GenerateServiceUnitDescriptorMojo
.execute(GenerateServiceUnitDescriptorMojo.java:129)
[INFO]  at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginMa
nager.java:417)
[INFO]  at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Default
LifecycleExecutor.java:610)
[INFO]  at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifec
ycle(DefaultLifecycleExecutor.java:551)
[INFO]  at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultL
ifecycleExecutor.java:530)
[INFO]  at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandle
Failures(DefaultLifecycleExecutor.java:309)
[INFO]  at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
DefaultLifecycleExecutor.java:276)
[INFO]  at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifec
ycleExecutor.java:143)
[INFO]  at
org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:393)
[INFO]  at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:182)
[INFO]  at
org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java:760)
[INFO]  at
org.codehaus.mevenide.netbeans.execute.MavenJavaExecutor.run(MavenJavaEx
ecutor.java:257)
[INFO]  at
org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:131)
[INFO]]]></stack-trace>
                                </msg-loc-info>
                        </exception-info>
                </task-result-details>
        </component-task-result-details>
</component-task-result>
****** End of output
*

I've done my best to attempt to fix this problem myself. Now exhausted
of ideas, I again ask for help from the mailing list.
 
Thank you for your consideration,

  Owen.

-----Original Message-----
From: Bruce Snyder [mailto:[EMAIL PROTECTED] 
Sent: Saturday, March 17, 2007 5:35 AM
To: [email protected]
Subject: Re: Maven archetype for jsr181 component.

On 3/15/07, Owen Thomas <[EMAIL PROTECTED]> wrote:
> Good day to you all.
>
>
>
> If I'm going to use Maven to develop a component that will fit in to a
> servicemix-jsr181 container, will I need a web-service archetype of
some
> description? What archetype do people recommend my using? I would also
> like to know why.

If you want to deploy your project to the servicemix-jsr181 component,
you want to use either the servicemix-jsr181-annotated-service-unit
Maven archetype or the servicemix-jsr181-wsdl-first-service-unit Maven
Maven archetype to create the JBI service unit (SU) for your project.

Reply via email to