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 c-...@dagnon.net on 2009/12/06 06:36:04 UTC

WSDL errors on AXIS/2 but works elsewhere?

Hello all,

BACKGROUND: I have a WSDL file which others are successfully using.  I
have generated the background code and all structures from it (with a
slightly older MyEclipse), and sending/receiving dummy data works for the
basics.  This is also my first time creating a web service from a provided
WSDL.

PROBLEM: Using the Eclipse SOAP Explorer I query for and get the WSDL
file, but it also shows a slew of validation errors.  Meanwhile the
company who created the WSDL uses another SOAP client and they don't see
the errors, just the partial WSDL.  When I hit the same URL with a web
browser it shows the XML, but it is about 1/8 of the original file size
(5k instead of 42k).  The most obvious problem is that every
xs:complexType is missing from the returned WSDL - in fact the xsd:schema
definitions are empty except for the import tags which are being reported
as errors (see below).

I thought the XML itself was corrupt or the namespace URLs (which I don't
think are valid URLs) were the problem, but others have confirmed that
they are using the same WSDL successfully even though I had problems with
it in the w3 validator.  I also wondered if it was because of some
networking/firewall issues, but the referenced targetNamespace is pingable
from the development machine and server.

At this point I'm grasping at straws to identify where the problem is
happening (within JAX-WS? AXIS? Apache? Tomcat?), let alone the cause of
the problem and what I can do about it.  Maybe I have some mis-matched JAR
files - at least on the server I used findjar to solve Java problems.  The
problem with that theory is that MyEclipse's internal server should be
JAR-consistent but has the same problems serving the WSDL.


Thanks for any feedback!

-Chris

--------- part of errors reported from SOAP Explorer:
IWAB0380E Errors were encountered while validating XML schemas.
XSD: Type reference
'http://customerlookup.domain.webservice.midtier.websolutions.dcs/xsd#CustomerInformationInput'
is unresolved
XSD: Type reference
'http://customerlookup.domain.webservice.midtier.websolutions.dcs/xsd#CustomerInformationOutput'
is unresolved
...
XSD: The location 'http://server:8080/test/webservice?xsd=5' has not been
resolved because the import is unused
XSD: There is no xmlns declaration for namespace
'http://customerlookup.domain.webservice.midtier.websolutions.dcs/xsd'
IWAB0381I http://server:8080/test/webservice?wsdl was successfully open


RE: Newbie needs help/resources crafting AXIS2 services.xml

Posted by Kamran Shah <ka...@mythsoftware.com>.
It seems to me that the original poster is using JAX-WS.  As I understand
it, wsimport, rather than wsdl2java is what he should be using?  Maybe I am
wrong.  Also, if he is using jax-ws annotations, while I understand he can
still use a services.xml, just to have axis2 use his wsdl, he just needs to
set his @WebService annotation's wsdlLocation parameter.  Please correct me
if I am wrong, I might not know what I am talking about, but this might
clear up my understanding as well.

 

--Kamran

 

From: Amila Suriarachchi [mailto:amilasuriarachchi@gmail.com] 
Sent: Friday, December 11, 2009 3:10 AM
To: axis-user@ws.apache.org
Subject: Re: Newbie needs help/resources crafting AXIS2 services.xml

 

 

On Mon, Dec 7, 2009 at 9:44 PM, <c-...@dagnon.net> wrote:

Good morning,

It appears my lack of being immersed in AXIS2 means nothing works quite
how I expect it to.  From a recent email on a different topic it sounds
like I need to set useOriginalwsdl in a services.xml file in my META-INF
directory for AXIS2 (1.3) to actually use the WSDL I was given.

Or perhaps part of the problem is that the WSDL is in META-INF/wsdl/ and
isn't where AXIS2 expects it to be?

Anyways, MyEclipse never generated a services.xml file.  In fact I'm just
deploying a WAR (what's an AAR?) which seems to be working but may be
confusing matters, what with combining JAX-WS and AXIS2.

The couple of brief examples of services.xml files I've found look to
recreate the basic definitions in the WSDL file, so I'm here in part to
ask for any good references to hand-crafting services.xml files -
primarily about what I need to include so the whole thing still works.
Or... with my setup will it even try to read the services.xml file since
the basic web services have worked so far (just not successfully with
complex types)?

So is the XML at the end of this a complete services.xml file where the
WSDL has a line:
   <wsdl:operation name="Foo">
and that service has types defined for the input and output?  Or do I need
to bring more of the WSDL into it?


generate the code to your wsdl with the wsdl2java tool. with -ss -sd
parameters. 
you will see a sample services.xml file under resource folder.

thanks,
Amila.



Thanks,

-Chris


--- services.xml? ---
<definition>
 <service name="Foo"> </service>
</definition>
<serviceGroup>
 <service name="Foo" scope="application">
   <parameter name="useOriginalwsdl">true</parameter>
 </service>
</serviceGroup>




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/

No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.5.426 / Virus Database: 270.14.102/2556 - Release Date: 12/10/09
07:36:00


Re: Newbie needs help/resources crafting AXIS2 services.xml

Posted by Amila Suriarachchi <am...@gmail.com>.
On Mon, Dec 7, 2009 at 9:44 PM, <c-...@dagnon.net> wrote:

> Good morning,
>
> It appears my lack of being immersed in AXIS2 means nothing works quite
> how I expect it to.  From a recent email on a different topic it sounds
> like I need to set useOriginalwsdl in a services.xml file in my META-INF
> directory for AXIS2 (1.3) to actually use the WSDL I was given.
>
> Or perhaps part of the problem is that the WSDL is in META-INF/wsdl/ and
> isn't where AXIS2 expects it to be?
>
> Anyways, MyEclipse never generated a services.xml file.  In fact I'm just
> deploying a WAR (what's an AAR?) which seems to be working but may be
> confusing matters, what with combining JAX-WS and AXIS2.
>
> The couple of brief examples of services.xml files I've found look to
> recreate the basic definitions in the WSDL file, so I'm here in part to
> ask for any good references to hand-crafting services.xml files -
> primarily about what I need to include so the whole thing still works.
> Or... with my setup will it even try to read the services.xml file since
> the basic web services have worked so far (just not successfully with
> complex types)?
>
> So is the XML at the end of this a complete services.xml file where the
> WSDL has a line:
>    <wsdl:operation name="Foo">
> and that service has types defined for the input and output?  Or do I need
> to bring more of the WSDL into it?
>

generate the code to your wsdl with the wsdl2java tool. with -ss -sd
parameters.
you will see a sample services.xml file under resource folder.

thanks,
Amila.

>
>
> Thanks,
>
> -Chris
>
>
> --- services.xml? ---
> <definition>
>  <service name="Foo"> </service>
> </definition>
> <serviceGroup>
>  <service name="Foo" scope="application">
>    <parameter name="useOriginalwsdl">true</parameter>
>  </service>
> </serviceGroup>
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/

Newbie needs help/resources crafting AXIS2 services.xml

Posted by c-...@dagnon.net.
Good morning,

It appears my lack of being immersed in AXIS2 means nothing works quite
how I expect it to.  From a recent email on a different topic it sounds
like I need to set useOriginalwsdl in a services.xml file in my META-INF
directory for AXIS2 (1.3) to actually use the WSDL I was given.

Or perhaps part of the problem is that the WSDL is in META-INF/wsdl/ and
isn't where AXIS2 expects it to be?

Anyways, MyEclipse never generated a services.xml file.  In fact I'm just
deploying a WAR (what's an AAR?) which seems to be working but may be
confusing matters, what with combining JAX-WS and AXIS2.

The couple of brief examples of services.xml files I've found look to
recreate the basic definitions in the WSDL file, so I'm here in part to
ask for any good references to hand-crafting services.xml files -
primarily about what I need to include so the whole thing still works. 
Or... with my setup will it even try to read the services.xml file since
the basic web services have worked so far (just not successfully with
complex types)?

So is the XML at the end of this a complete services.xml file where the
WSDL has a line:
    <wsdl:operation name="Foo">
and that service has types defined for the input and output?  Or do I need
to bring more of the WSDL into it?


Thanks,

-Chris


--- services.xml? ---
<definition>
  <service name="Foo"> </service>
</definition>
<serviceGroup>
  <service name="Foo" scope="application">
    <parameter name="useOriginalwsdl">true</parameter>
  </service>
</serviceGroup>