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 "P.N." <pe...@gmx.de> on 2009/11/17 17:06:11 UTC

Where are the locator and the service?

Hello!

I want to create a WS client from wsdl using:
WSDL2Java -uri file:///C:/Dokumente%20und%20Einstellungen/.../xxx.wsdl 
-d xmlbeans -s -o "C:\my-sources"

Though there's a service defined, no locator or service file are created.

Here's a snippet from my wsdl (guessing this should be the needed part, 
i.e. schemas, service with name):

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
... >
     <!--WSDL created by Apache Axis version: 1.3 Built on Oct 05, 2005 
(05:23:37 EDT)-->
     <wsdl:types>
         ...
     </wsdl:types>
     ...
     <wsdl:service name="Export">
         ...
     </wsdl:service>
</wsdl:definitions>


I've tested with one wsdl file resulting in a very big (some MB!) java 
source, when using ADB, so I'd prefer using XmlBeans.

Kind regards

Peter Nabbefeld


Re: Where are the locator and the service?

Posted by Amila Suriarachchi <am...@gmail.com>.
On Tue, Nov 17, 2009 at 9:36 PM, P.N. <pe...@gmx.de> wrote:

>
> Hello!
>
> I want to create a WS client from wsdl using:
> WSDL2Java -uri file:///C:/Dokumente%20und%20Einstellungen/.../xxx.wsdl -d
> xmlbeans -s -o "C:\my-sources"
>
> Though there's a service defined, no locator or service file are created.
>
> Here's a snippet from my wsdl (guessing this should be the needed part,
> i.e. schemas, service with name):
>
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="
> http://www.w3.org/2001/XMLSchema"
> ... >
>    <!--WSDL created by Apache Axis version: 1.3 Built on Oct 05, 2005
> (05:23:37 EDT)-->
>    <wsdl:types>
>        ...
>    </wsdl:types>
>    ...
>    <wsdl:service name="Export">
>        ...
>    </wsdl:service>
> </wsdl:definitions>
>
>
> I've tested with one wsdl file resulting in a very big (some MB!) java
> source, when using ADB, so I'd prefer using XmlBeans.
>

try -u option.

thanks,
Amila.

>
> Kind regards
>
> Peter Nabbefeld
>
>


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

Re: use abstract in complextype

Posted by Amila Suriarachchi <am...@gmail.com>.
Please create a jira with wsdl if you have this problem with Axis2 1.5.

thanks,
Amila.

On Wed, Nov 18, 2009 at 4:09 PM, Kang, YongLiang <yl...@telenav.cn> wrote:

> Hi guys,
>
>
> I use axis2 v1.4
>
> I claim a complex type as abstract in xsd and derived some subclass from
> it. Then I use soapUi for testing.
> In soapUI when I set the subtype and request, everything works fine.
> However I found I can set the field as the 'abstract' type and do the
> request.
> I suppose to received some warning in soapUI. However it reaches my
> axis2 server directly.
> I use wsdl2java to generate code. I checked the generated code and found
> this:
>
>       public static FieldBase parse(javax.xml.stream.XMLStreamReader
> reader) throws java.lang.Exception{
>            FieldBase object =
>                null;
>                        ...
>                        ...
>                    // handle attribute "id"
>                    java.lang.String tempAttribId =
>
>                                reader.getAttributeValue(null,"id");
>
>                   if (tempAttribId!=null){
>                         java.lang.String content = tempAttribId;
>
>                                                 object.setId(
>
> org.apache.axis2.databinding.utils.ConverterUtil.convertToLong(tempAttri
> bId));
>
> Seems the auto generated code declare a null object and set value for it
> directly. No matter how soapUI works. I think it is a bug in axis2
> code-gen part.
> Please correct me if I am wrong about some parts.
>
> soap with normal subtype:   <field xsi:type="v101: fieldText" id="1" ...
> soap with abstract subtype:  <field id="1" ...
>
> xsd sample:
>  <complexType name="fieldBase" abstract="true">
>        <complexContent>
>            <extension base="comm10:tExtensibleElement">
>                <sequence>
>                    ...
>    <complexType name="fieldText">
>        <complexContent>
>            <extension base="tns: fieldBase ">
>                                ...
>
> Best wishes!
>
> Peter Y.L.Kang
> msn: peter_ylkang@hotmail.com
> Software Engineer, Sever Dept.
>
>


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

Re: use abstract in complextype

Posted by "P.N." <pe...@gmx.de>.
Please, don't capture other people's threads. Create Your own, instead!

P.


use abstract in complextype

Posted by "Kang, YongLiang" <yl...@telenav.cn>.
Hi guys,


I use axis2 v1.4

I claim a complex type as abstract in xsd and derived some subclass from
it. Then I use soapUi for testing.
In soapUI when I set the subtype and request, everything works fine.
However I found I can set the field as the 'abstract' type and do the
request.
I suppose to received some warning in soapUI. However it reaches my
axis2 server directly.
I use wsdl2java to generate code. I checked the generated code and found
this:

       public static FieldBase parse(javax.xml.stream.XMLStreamReader
reader) throws java.lang.Exception{
            FieldBase object =
                null;
			...
			...
                    // handle attribute "id"
                    java.lang.String tempAttribId =
                        
                                reader.getAttributeValue(null,"id");
                            
                   if (tempAttribId!=null){
                         java.lang.String content = tempAttribId;
                        
                                                 object.setId(
 
org.apache.axis2.databinding.utils.ConverterUtil.convertToLong(tempAttri
bId));

Seems the auto generated code declare a null object and set value for it
directly. No matter how soapUI works. I think it is a bug in axis2
code-gen part.
Please correct me if I am wrong about some parts.

soap with normal subtype:   <field xsi:type="v101: fieldText" id="1" ...
soap with abstract subtype:  <field id="1" ...

xsd sample:
  <complexType name="fieldBase" abstract="true">
        <complexContent>
            <extension base="comm10:tExtensibleElement">
                <sequence>
                    ...
    <complexType name="fieldText">
        <complexContent>
            <extension base="tns: fieldBase ">
				...

Best wishes!

Peter Y.L.Kang
msn: peter_ylkang@hotmail.com 
Software Engineer, Sever Dept.


Re: Where are the locator and the service?

Posted by "P.N." <pe...@gmx.de>.
P.N. wrote:
>
> [snip]
>
>
Forgot to mention:
<wsdlsoap:binding style="document" 
transport="http://schemas.xmlsoap.org/soap/http"/>

Regards

Peter