You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "Podgorni, Derek" <po...@sonusnet.com> on 2003/06/05 17:54:12 UTC

WSDLException mystery

I am getting the following error:

Retrieving document at '/a/location/wsdl/DataServerImpl.wsdl'.
WSDLException: faultCode=OTHER_ERROR: Unable to resolve imported document at
'/a/location/wsdl/DataServerImpl.wsdl'.: no content-type:
java.net.UnknownServiceException: no content-type

This calling code simply does this:

WSDLFactory fact = WSDLFactory.newInstance();
WSDLReader aDoc = fact.newWSDLReader();
if (aDoc != null) {
  javax.wsdl.Definition aDef = null;
  try {
    aDef = aDoc.readWSDL(file);
  } catch (WSDLException we) {
    we.printStackTrace();
  }
<-- snipped -->

If I invoke the main method (from a shell) of the class which calls the
method that executes this code segment, it works fine. When this code gets
executed from the web app running under JBoss I get the message above. I
cannot determine why this works from a shell but not from the app server.

I have made sure that the following System properties were the same when
invoking from a shell and from the app server prior to this code section
being hit:

java.protocol.handler.pkgs = org.jboss.net.protocol
java.content.handler.pkgs = null

Derek Podgorni



Re: WSDLException mystery

Posted by Costas Polychronopoulos <co...@b-online.gr>.
Hi Derek!

I'm not too sure about it at all, but I would say that the exception is
thrown because the WSDLReader tries to find a document (possibly the
interface wsdl doc) described in the import statement of your
'DataServerImpl.wsdl' to read its contents but can't find it.
It's really strange that you don't get this all the time but just when you
call the method from within the app server. I would look for some kind of
property having to do with processing (or not) the files described in the
import statemement.
I hope this helps. Good luck!

Regards,
Costas


----- Original Message -----
From: "Podgorni, Derek" <po...@sonusnet.com>
To: <ax...@ws.apache.org>
Sent: Thursday, June 05, 2003 6:54 PM
Subject: WSDLException mystery


> I am getting the following error:
>
> Retrieving document at '/a/location/wsdl/DataServerImpl.wsdl'.
> WSDLException: faultCode=OTHER_ERROR: Unable to resolve imported document
at
> '/a/location/wsdl/DataServerImpl.wsdl'.: no content-type:
> java.net.UnknownServiceException: no content-type
>
> This calling code simply does this:
>
> WSDLFactory fact = WSDLFactory.newInstance();
> WSDLReader aDoc = fact.newWSDLReader();
> if (aDoc != null) {
>   javax.wsdl.Definition aDef = null;
>   try {
>     aDef = aDoc.readWSDL(file);
>   } catch (WSDLException we) {
>     we.printStackTrace();
>   }
> <-- snipped -->
>
> If I invoke the main method (from a shell) of the class which calls the
> method that executes this code segment, it works fine. When this code gets
> executed from the web app running under JBoss I get the message above. I
> cannot determine why this works from a shell but not from the app server.
>
> I have made sure that the following System properties were the same when
> invoking from a shell and from the app server prior to this code section
> being hit:
>
> java.protocol.handler.pkgs = org.jboss.net.protocol
> java.content.handler.pkgs = null
>
> Derek Podgorni
>
>