0 Replies Latest reply on Nov 12, 2008 3:26 PM by mxc

    Accessing SOAP web services from session bean error

    mxc

      Hi all,

      I have a session bean that is trying to access a soap web service, wrap the response and return it to the callee. When I run unit test directly against the code that does the calling i.e. when it is outside the JEE container everything works as planned.

      However when I call the code from a standalone ejb test client via the session bean I get the following error in JBOSS:


      WARN [ServiceDelegateImpl] Cannot access wsdlURL: https://acme.com/test.wsdl
      WARN [ServiceDelegateImpl] Cannot get port meta data for: {http://acme.com/doc/2006-03-01/}TEST
      ERROR [TestFacade] There was an error creating a bucket
      ERROR [TestFacade] org.jboss.ws.WSException: Target endpoint address not set

      On the client I get the error:
      Caused by: java.lang.ClassNotFoundException: org.jboss.ws.WSException

      I have am using maven to do the build with the jaxws-maven-plugin. It seems that JBOSS has some issue with not being able to locate the wsdl. I have defined the wsimport part of my pom.xml as follows:

      <plugin>
       <groupId>org.codehaus.mojo</groupId>
       <artifactId>jaxws-maven-plugin</artifactId>
       <executions>
       <execution>
       <goals>
       <goal>wsimport</goal>
       </goals>
       <configuration>
       <verbose>true</verbose>
       <keep>true</keep>
       <packageName>za.co.jumpingbean.test</packageName>
       <sourceDestDir>src/main/java</sourceDestDir>
       <wsdlLocation>https://acme.com/doc/2006-03-01/test.wsdl</wsdlLocation>
       <!--wsdlUrls><wsdlUrl>https://acme.com/doc/2006-03-01/test.wsdl</wsdlUrl></wsdlUrls-->
       </configuration>
       </execution>
       </executions>
       </plugin>


      I have tried placing the wsdl location in the wsdlLocation element and wsdlUrl element but there is no difference in outcome. I have been unable to find any help on this. What I do find is talking more about creating you own web service with jaxws but I am looking at consuming a web service from an EJB session bean.

      Any pointer or help appreciated.
      thanks