1 Reply Latest reply on Sep 20, 2005 10:10 AM by Thomas Diesler

    Webservice Client Consuming An External Webservice

    Richard Hopkirk Newbie

      Hi all,

      We have the need for a web application POJO web service client to consume an externally provided web service. I have read through the examples on the WIKI and have also gone through the examples-4.0.2.zip.
      I'm getting an exception when my client does the JNDI lookup to retrieve the dynamic proxy created by JBoss.

      I have performed the following steps to deploy my client inside a war:

      1. Generated client side artifacts using wscompile from JWSDP1.6 and the externally provide WSDL file. I had to add a

      tag to fix some namespace problems with the XSD files that came along with the WSDL.
      2. Packaged only the generated interfaces from the above step into a jar to include in my deployment.
      3. Have added <service-ref> tag in my web.xml file. The <wsdl-file> tag points to my wsdl file in WEB-INF/wsdl.
      4. Have packaged the wsdl + jaxrpc-mapping.xml file from step 1 into the war in WEB-INF/wsdl directory.

      When my client does the JNDI lookup, I get the following exception:

      10:40:39,258 INFO [STDOUT] Caused by: java.lang.IllegalArgumentException: Multiple bindings not supported for service: {http://xxx.xx.
      10:40:39,274 INFO [STDOUT] at org.jboss.webservice.deployment.ServiceDescription.getWsdlBinding(ServiceDescription.java:1028)
      10:40:39,274 INFO [STDOUT] at org.jboss.webservice.deployment.ServiceDescription.<init>(ServiceDescription.java:104)
      10:40:39,274 INFO [STDOUT] at org.jboss.webservice.client.ServiceObjectFactory.getObjectInstance(ServiceObjectFactory.java:200)
      10:40:39,274 INFO [STDOUT] at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
      10:40:39,289 INFO [STDOUT] at org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:1110)
      10:40:39,289 INFO [STDOUT] at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1127)

      I'm assuming that this is due to the namespace clashes from step 1 above. Is there anyway to pass the equivalent
      info to JBoss at runtime so that it can parse the WSDL and XSD files correctly ? Or do I have to manually correct the problems with the XSD files myself ?

      Running on JBoss-4.0.3RC1, JDK 1.5.

      thanks for any help,