Hi,
Thank you for the hint!
Unfortunately this did not help.
Do you know, what could cause this problem or is it a problem at all?
I mean probably only the Stub-class and the CallbackHandler-class are
generated into the specified package and all other types defined in the
XSD are created in a package specified by the targetNamespace. I didn't
find anything about this in the Axis2 doc, but probably it is some kind
of hidden feature.

Regards,
Atanas

-----Original Message-----
From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] 
Sent: Mittwoch, 05. Juli 2006 14:58
To: [email protected]
Subject: Re: Axis2 WSDL2Java generator

You need to make sure you use the correct namespace in yout soap12
binding. Your <soap:fault> elements must be <soap12:fault> :

    <wsdl:binding name="TestWebServiceSoap12"
type="tns:TestWebServiceSoap">
        <soap12:binding transport="http://schemas.xmlsoap.org/soap/http";
/>
        <wsdl:operation name="getSum">
            <soap12:operation soapAction="test.ws.com/Ver2/getSum"
style="document" />
            <wsdl:input>
                <soap12:body use="literal" />
            </wsdl:input>
            <wsdl:output>
                <soap12:body use="literal" />
            </wsdl:output>
            <wsdl:fault name="serviceException">
                <soap:fault name="serviceException" use="literal" />
            </wsdl:fault>
            <wsdl:fault name="invalidFieldException">
                <soap:fault name="invalidFieldException" use="literal"
/>
            </wsdl:fault>
        </wsdl:operation>
    </wsdl:binding>

Other than that, the WSDL validates. Please make this correction and run
your test again.

Anne

On 7/5/06, Atanas Ianev <[EMAIL PROTECTED]> wrote:
> Yes that's right! I've just played and tried something and forgot to 
> put it back. But This should not be the problem.
> Please find attached a WSDL and XSD, which are much more simple and 
> just point to the problem.
>
> When I create the client classes and define a package like 
> "test.ws.com", it gets ignored and the types and elements defined in 
> the XSD file became a package as defined in the namespace 
> "test.ws.com/Ver2". This causes a compiler error, because of the 
> invalid package format. Only the "TestWebServiceCallbackHandler" and 
> the "TestWebServiceStub" classes a created in the specified package. I

> cannot find any error in the WSDL or XSD.
> The simplest solution would be to change the namespace, but it is not 
> possible, because the service is for a year in production and it is 
> just impossible to change it on all the clients. In production we have

> over 100 types and elements, which makes the manual change of the 
> package fairly difficult and fault-prone.
>
> I hope someone can help me to find another solution.
>
> Thank you!
>
> Atanas
>
>
> -----Original Message-----
> From: Anne Thomas Manes [mailto:[EMAIL PROTECTED]
> Sent: Dienstag, 04. Juli 2006 23:04
> To: [email protected]
> Subject: Re: Axis2 WSDL2Java generator
>
> I can;t believe that this WSDL actually works in Axis 1.
> You have a fundamental error.
>
> The binding references a portType called TestServiceSoap, which does 
> not exist. Your portType is called PaymentServiceSoap.
>
> Anne
>
> On 7/4/06, Anne Thomas Manes <[EMAIL PROTECTED]> wrote:
> > It may work in Axis 1, but that doesn't mean it is correct. Axis1 is

> > pretty lax about enforcing certain rules. e.g.,
> >
> > 1- Fault messages must always be defined with a document/literal 
> > binding
> > 2- A document/literal message must always reference an element, not 
> > a
> type.
> >
> > You must define elements for each of your three super exception 
> > types,
>
> > and reference those elements rather than the complexTypes.
> >
> > Anne
> >
> > On 7/4/06, Atanas Ianev <[EMAIL PROTECTED]> wrote:
> > > This is right!
> > > But those types are defined as "complexType" in the XSD and are 
> > > used
>
> > > as super types for the rest of the exceptions. As mentioned this 
> > > is working already with Axis v1.4. The question was, why the 
> > > defined package is ignored by the WSDL2Java tool provided with 
> > > Axis2 v1.0 and why there are method calls in the "Stub"-class, 
> > > which are not
> existing?
> > >
> > > Thank you!
> > > Atanas.
> > >
> > > -----Original Message-----
> > > From: Anne Thomas Manes [mailto:[EMAIL PROTECTED]
> > > Sent: Dienstag, 04. Juli 2006 17:48
> > > To: [email protected]
> > > Subject: Re: Axis2 WSDL2Java generator
> > >
> > > Could you also post the XSD file?
> > >
> > > There are some mistakes in the WSDL, though. A couple of your 
> > > exception messages are defined wrong -- they reference types 
> > > rather
> than elements.
> > > - objectNotFoundException
> > > - duplicateObjectException
> > > - paymentServiceException
> > >
> > > Anne
> > >
> > > On 7/4/06, Atanas Ianev <[EMAIL PROTECTED]> wrote:
> > > > Hi, Ajith!
> > > >
> > > > Thank you for the answer!
> > > > The strange thing is, when I use Axis v1.4 it works just fine. 
> > > > All
>
> > > > the
> > >
> > > > types are created correctly and the package is also set to the 
> > > > defined
> > >
> > > > one.
> > > >
> > > > Please, find attached the WSDL file. There is also an additional

> > > > XSD file for the defined types, which is currently in production

> > > > and I could hardly believe there is something wrong on it.
> > > >
> > > > I am pretty confused by the fact that it works with Axis v1.4, 
> > > > but
>
> > > > not
> > >
> > > > with Axis2 v1.0. Probably there are some differences in the way,

> > > > how the WSDL and XSD are handled. Further, it is a .NET web
> service.
> > > >
> > > > I will be very glad, if you will be able to help me.
> > > > Thank you!
> > > > Atanas
> > > >
> > > > -----Original Message-----
> > > > From: Ajith Ranabahu [mailto:[EMAIL PROTECTED]
> > > > Sent: Dienstag, 04. Juli 2006 15:56
> > > > To: [email protected]
> > > > Subject: Re: Axis2 WSDL2Java generator
> > > >
> > > > Hi,
> > > > This is a typical error that happens when the WSDL is having 
> > > > unresolvable references. Can you please post the WSDL ?
> > > >
> > > > Ajith
> > > >
> > > > On 7/3/06, Atanas Ianev <[EMAIL PROTECTED]> wrote:
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > Hi,
> > > > >
> > > > >
> > > > >
> > > > > I need to implement a WS client and want to use strong types 
> > > > > defined
> > >
> > > > > in a XSD, but I came to the following problems:
> > > > >
> > > > >
> > > > >
> > > > > 1.       The namespace deifined in the web service looks like
> this
> > > > > "test.ws.com/ver2". When I execute the WSDL2Java tool with 
> > > > > specified
> > >
> > > > > package "test.ws.com"  it gets ignored and the created classes

> > > > > become the package as specified in the namespace. Of course it

> > > > > comes
> > >
> > > > > to a compiler error, because of the invalid format.
> > > > >
> > > > > 2.       In the "stub" class the following method is called,
> which
> > > > does not
> > > > > exist; org.apache.axiom.om.OMElement.newXMLStreamReader()
> > > > >
> > > > > This I found is probably some version mismatch. The method is 
> > > > > now called getXMLStreamReader.
> > > > >
> > > > > 3.       Again in the "stub" class the method
> > > > > "org.apache.axiom.om.OMElement.Factory.parse" is called in a 
> > > > > static way and could not be found in the provided packages.
> > > > >
> > > > >
> > > > >
> > > > > Could you, please, point me to some solution or alternative?
> > > > >
> > > > > I use Axis2 v1.0 with databinding name "xmlbeans".
> > > > >
> > > > >
> > > > >
> > > > > Thank you in advance.
> > > > >
> > > > >
> > > > >
> > > > > Br,
> > > > >
> > > > > Atanas
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > Ajith Ranabahu
> > > >
> > > > ----------------------------------------------------------------
> > > > --
> > > > --- To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > > >
> > > >
> > > >
> > > > ----------------------------------------------------------------
> > > > --
> > > > --- To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > > >
> > > >
> > >
> > > ------------------------------------------------------------------
> > > --
> > > - To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> > >
> > >
> > > ------------------------------------------------------------------
> > > --
> > > - To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> > >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to