Announcement Announcement Module
Collapse
No announcement yet.
Elephant on the Table: Reference Doc Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Elephant on the Table: Reference Doc

    Rhetorical question:
    "How can you expect widespread acceptance of Spring-WS without a server-side chapter in the reference document???"
    My only recourse at this time if I want to use Spring-WS is to study the examples. I keep checking the reference doc (and tutorial), hoping that you (plural) will get serious about documenting this project.

  • #2
    I know that rhetorical questions are not supposed to be answered, but here goes anyway:

    I recently added the second page of the tutorial (page 1, page 2), explaining how to implement the contract.

    I plan to release RC1 at the end of April, containing the reference documentation. At the time, I thought it was a good idea to wait for the server-side API to stabilize. And with the M3 release, that has happened, so the amount of documentation has increased since that release (i.e. tutorial, client-side documentation).

    I know it has been a long time waiting, but hopefully, you can wait one more month. Until that time, I am more than happy to answer your questions on this forum. A third option would be to contribute, it is open source after all .

    Comment


    • #3
      Thanks! Please know that your efforts are very much appreciated. It's just that missing documentation can be frustrating when an otherwise 100% Spring project has an immediate need to add web services.

      Comment


      • #4
        Originally posted by Arjen Poutsma View Post
        I know that rhetorical questions are not supposed to be answered, but here goes anyway:

        I recently added the second page of the tutorial (page 1, page 2), explaining how to implement the contract.
        Arjen,

        When I try to run the mvn archetype:create in the new tutorial page, I get an error that indicates that I'm not pointing at the right maven repository. Which repository contains the archetype? (TIA)

        Here's the command I ran:

        Code:
        mvn -e archetype:create -DarchetypeGroupId=org.springframework.ws -DarchetypeArtifactId=spring-ws-archetype -DarchetypeVersion=1.0-m4-SNAPSHOT -DgroupId=com.mycompany.hr -DartifactId=holidayService
        And here's its output:

        Code:
        + Error stacktraces are turned on.
        [INFO] Scanning for projects...
        [INFO] Searching repository for plugin with prefix: 'archetype'.
        [INFO] ----------------------------------------------------------------------------
        [INFO] Building Maven Default Project
        [INFO]    task-segment: [archetype:create] (aggregator-style)
        [INFO] ----------------------------------------------------------------------------
        [INFO] Setting property: classpath.resource.loader.class => 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.
        [INFO] Setting property: velocimacro.messages.on => 'false'.
        [INFO] Setting property: resource.loader => 'classpath'.
        [INFO] Setting property: resource.manager.logwhenfound => 'false'.
        [INFO] ************************************************************** 
        [INFO] Starting Jakarta Velocity v1.4
        [INFO] RuntimeInstance initializing.
        [INFO] Default Properties File: org\apache\velocity\runtime\defaults\velocity.properties
        [INFO] Default ResourceManager initializing. (class org.apache.velocity.runtime.resource.ResourceManagerImpl)
        [INFO] Resource Loader Instantiated: org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader
        [INFO] ClasspathResourceLoader : initialization starting.
        [INFO] ClasspathResourceLoader : initialization complete.
        [INFO] ResourceCache : initialized. (class org.apache.velocity.runtime.resource.ResourceCacheImpl)
        [INFO] Default ResourceManager initialization complete.
        [INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Literal
        [INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Macro
        [INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Parse
        [INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Include
        [INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Foreach
        [INFO] Created: 20 parsers.
        [INFO] Velocimacro : initialization starting.
        [INFO] Velocimacro : adding VMs from VM library template : VM_global_library.vm
        [ERROR] ResourceManager : unable to find resource 'VM_global_library.vm' in any resource loader.
        [INFO] Velocimacro : error using  VM library template VM_global_library.vm : org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource 'VM_global_library.vm'
        [INFO] Velocimacro :  VM library template macro registration complete.
        [INFO] Velocimacro : allowInline = true : VMs can be defined inline in templates
        [INFO] Velocimacro : allowInlineToOverride = false : VMs defined inline may NOT replace previous VM definitions
        [INFO] Velocimacro : allowInlineLocal = false : VMs defined inline will be  global in scope if allowed.
        [INFO] Velocimacro : initialization complete.
        [INFO] Velocity successfully started.
        [INFO] [archetype:create]
        [INFO] Defaulting package to group ID: com.mycompany.hr
        [INFO] ------------------------------------------------------------------------
        [ERROR] BUILD ERROR
        [INFO] ------------------------------------------------------------------------
        [INFO] Failed to resolve artifact.
        
        GroupId: org.springframework.ws
        ArtifactId: spring-ws-archetype
        Version: 1.0-m4-SNAPSHOT
        
        Reason: Unable to download the artifact from any repository
        
        Try downloading the file manually from the project website.
        
        Then, install it using the command: 
            mvn install:install-file -DgroupId=org.springframework.ws -DartifactId=spring-ws-archetype \
                -Dversion=1.0-m4-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file
        
        
          org.springframework.ws:spring-ws-archetype:jar:1.0-m4-SNAPSHOT
        
        from the specified remote repositories:
          central (http://repo1.maven.org/maven2)
        
        
        [INFO] ------------------------------------------------------------------------
        [INFO] Trace
        org.apache.maven.lifecycle.LifecycleExecutionException: Error creating from archetype
        	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:564)
        	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:493)
        	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:463)
        	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
        	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:224)
        	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
        	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:330)
        	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:123)
        	at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
        	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        	at java.lang.reflect.Method.invoke(Method.java:585)
        	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: Error creating from archetype
        	at org.apache.maven.plugin.archetype.MavenArchetypeMojo.execute(MavenArchetypeMojo.java:193)
        	at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:420)
        	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
        	... 16 more
        Caused by: org.apache.maven.archetype.ArchetypeNotFoundException: Archetype does not exist: Unable to download the artifact from any repository
        
        Try downloading the file manually from the project website.
        
        Then, install it using the command: 
            mvn install:install-file -DgroupId=org.springframework.ws -DartifactId=spring-ws-archetype \
                -Dversion=1.0-m4-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file
        
        
          org.springframework.ws:spring-ws-archetype:jar:1.0-m4-SNAPSHOT
        
        from the specified remote repositories:
          central (http://repo1.maven.org/maven2)
        
        	at org.apache.maven.archetype.DefaultArchetype.createArchetype(DefaultArchetype.java:123)
        	at org.apache.maven.plugin.archetype.MavenArchetypeMojo.execute(MavenArchetypeMojo.java:188)
        	... 18 more
        Caused by: org.apache.maven.artifact.resolver.ArtifactNotFoundException: Unable to download the artifact from any repository
        
        Try downloading the file manually from the project website.
        
        Then, install it using the command: 
            mvn install:install-file -DgroupId=org.springframework.ws -DartifactId=spring-ws-archetype \
                -Dversion=1.0-m4-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file
        
        
          org.springframework.ws:spring-ws-archetype:jar:1.0-m4-SNAPSHOT
        
        from the specified remote repositories:
          central (http://repo1.maven.org/maven2)
        
        	at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:197)
        	at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:73)
        	at org.apache.maven.archetype.DefaultArchetype.createArchetype(DefaultArchetype.java:115)
        	... 19 more
        Caused by: org.apache.maven.wagon.ResourceDoesNotExistException: Unable to download the artifact from any repository
        	at org.apache.maven.artifact.manager.DefaultWagonManager.getArtifact(DefaultWagonManager.java:308)
        	at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:185)
        	... 21 more
        [INFO] ------------------------------------------------------------------------
        [INFO] Total time: 1 second
        [INFO] Finished at: Mon Mar 26 21:55:30 PDT 2007
        [INFO] Final Memory: 4M/8M
        [INFO] ------------------------------------------------------------------------

        Comment


        • #5
          The problem was that I had no bootstrap pom.xml file to add in the snapshot repository. I got around the problem by copying the spring-ws pom.xml into my sandbox directory and adding the following repository incantation:

          Code:
          <repository>
              <id>springframework.org</id>
              <name>Springframework Maven SNAPSHOT Repository</name>
              <url>http://static.springframework.org/maven2-snapshots/</url>
          </repository>
          which I got from the snapshots page: http://www.springframework.org/spring-ws/snapshots.

          I had to strip out some stuff to make it work. Here's the final (hideous :o ) product:

          Code:
          <?xml version="1.0" encoding="UTF-8"?>
          <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
              <modelVersion>4.0.0</modelVersion>
              <groupId>org.springframework.ws</groupId>
              <artifactId>spring-ws</artifactId>
              <packaging>pom</packaging>
              <version>1.0-m4-SNAPSHOT</version>
              <name>Spring Web Services</name>
              <description>
                  Spring Web Services is a product of the Spring community focused on creating document-driven Web services.
                  It aims to facilitate contract-first SOAP service development, allowing for the creation of flexible web
                  services using one of the many ways to manipulate XML payloads.
              </description>
              <url>http://www.springframework.org/spring-ws</url>
              <scm>
                  <connection>scm:svn:https://springframework.svn.sourceforge.net/svnroot/springframework/spring-ws/trunk
                  </connection>
                  <developerConnection>scm:svn:https://springframework.svn.sourceforge.net/svnroot/springframework/spring-ws/trunk
                  </developerConnection>
                  <url>http://fisheye3.cenqua.com/browse/springframework/spring-ws/trunk</url>
              </scm>
              <profiles>
                  <profile>
                      <id>jdk1.5</id>
                      <activation>
                          <jdk>1.5</jdk>
                      </activation>
                  </profile>
              </profiles>
              <properties>
                  <spring.version>2.0.3</spring.version>
              </properties>
              <repositories>
                  <repository>
                      <id>spring-ext</id>
                      <name>Spring External Dependencies Repository</name>
                      <url>https://svn.sourceforge.net/svnroot/springframework/repos/repo-ext/</url>
                  </repository>
                  <repository>
                      <id>springframework.org</id>
                      <name>Springframework Maven SNAPSHOT Repository</name>
                      <url>http://static.springframework.org/maven2-snapshots/</url>
                  </repository>
              </repositories>
              <dependencyManagement>
                  <dependencies>
                      <!-- Spring-WS dependencies -->
                      <dependency>
                          <groupId>org.springframework.ws</groupId>
                          <artifactId>spring-xml</artifactId>
                          <version>${project.version}</version>
                      </dependency>
                  ...
                  ...
                  ...
                  (no changes here but too long for a post...)
                  ...
                  ...
                  ...
                  <dependency>
                      <groupId>log4j</groupId>
                      <artifactId>log4j</artifactId>
                      <scope>test</scope>
                  </dependency>
          
              </dependencies>
          
            <modules>
              <module>holidayService</module>
            </modules>
          </project>

          Comment


          • #6
            Thanks for pointing that out. The archetype hasn't been released yet (in a stable release), and is available only as a snapshot. I should put that in the tutorial, until it's available on repo.mergere.com.

            Comment


            • #7
              Probably a better way to bootstrap the archetype would be to add the snipplet:
              Code:
                 
              <!-- Added in for Spring-WS tutorial -->
              <repository>
                <snapshots>
                  <enabled>true</enabled>
                  <checksumPolicy>warn</checksumPolicy>
                </snapshots>
                <id>springframework.org</id>
                <name>Springframework Maven SNAPSHOT Repository</name>
                <url>http://static.springframework.org/maven2-snapshots/</url>
              </repository>
              to the ~/.m2/settings.xml file. That works too.
              Last edited by CorbaTheGeek; Mar 27th, 2007, 05:09 PM. Reason: Fixing the code snippet.

              Comment


              • #8
                Originally posted by Arjen Poutsma View Post
                Thanks for pointing that out. The archetype hasn't been released yet (in a stable release), and is available only as a snapshot. I should put that in the tutorial, until it's available on repo.mergere.com.
                Hi Arjen, it might be a good idea to update step2 of the tutorial where the one line command should create a basic holidayService project. Great idea but it didn't work for me. At least not easily.

                I am not the first expert on maven but have some experience. This is what I did and I'm sure there is a better way.

                First I tried adding a profile containing the springframework.org repo to my ~/.m2/settings.xml (as suggested in the last message above). I made sure this profile was active with the activeProfiles element at the bottom. This failed. Running 'mvn help:active-profiles' to see if it's using my profile also failed telling me I needed a pom.xml.

                So I created a basic pom.xml containing the springframework.org repo, which got the spring ws snapshot to get downloaded. However the presence of the pom.xml caused holidayService project itself not to get created successfully. So I removed the 'dummy' pom.xml, re-ran the command and succeeded.

                Rossen

                Comment


                • #9
                  Thanks Rossen, I've updated the tutorial accordingly, with a footnote. When RC1 is released, I'll simply remove it.

                  Comment


                  • #10
                    Arjen, thanks for the quick turn-around!

                    After following the steps here are a couple of other dependencies I found I had to add to my pom.xml to get the WSDL to auto-generate in the browser as is described at the end of step 2:

                    - jaxen/jaxen (1.1)
                    - javax.xml.soap/saaj-api (1.3)
                    - com.sun.xml.messaging.saaj/saaj-impl (1.3)

                    Finally, if activation.jar is not in the local repository it may need to be downloaded and installed manually with a command like this:

                    mvn install:install-file -DgroupId=javax.activation -DartifactId=activation -Dversion=1.0.2 -Dpackaging=jar -Dfile=activation.jar

                    Comment


                    • #11
                      Thanks again, Rossen. I've added a section describing the dependencies.

                      Comment

                      Working...
                      X