Anne,
I've removed the "namespace" attributes and I'm still getting the extra
methods; and in the one method, the sessionId is still changed from a
long to an int. 

-----Original Message-----
From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] 
Sent: 25 August 2006 14:07
To: axis-user@ws.apache.org
Subject: Re: WSDL2Java Question

Marius,

The only errors that I see in the WSDL is that you need to remove the
"namespace" attributes from all the <soap:body> definitions in the
binding. (You use the namespace attribute only when using RPC style.)
Please make this fix and regenerate (although I doubt this is causing
the anomoly).

Please let us know what happens.

Anne

On 8/24/06, Marius Hugo <[EMAIL PROTECTED]> wrote:
> Sure, no problem, I've attached the files.
> I'm sending the entire files, cause I don't want to go and send what I

> think is important and then it ends up that I am missing something 
> (look for the SessionId).
> The extra methods (in the Document) seem to be created for each of the

> xs:simpleTypes that are declared in TradeRootMerchantTypes.xsd.
>
> The types aren't always changed (from long to int for instance), but 
> the other types are int and string and I don't really see what else 
> they could change to anyway.
>
>
> Another question:
> I am not sure how the restrictions that are placed on a type are 
> imposed in the generated code.
> For instance, in the case of the SessionId type, I don't see any code 
> that enforces the restrictions that are defined (maxInclusive and 
> minInclusive).
>
> If I go look at the following generated code though:
>
> <xs:complexType name="AdditionalDataNOTIFY">
>                 <xs:annotation>
>                         <xs:documentation>This Additional Data is 
> provided by the EUA when there exists a requirement to dispatch a 
> notification instruction.</xs:documentation>
>                 </xs:annotation>
>                 <xs:sequence>
>                         <xs:element name="notificationType">
>                                 <xs:simpleType>
>                                         <xs:restriction 
> base="xs:string">
>                                                 <xs:enumeration 
> value="EMAIL"/>
>                                                 <xs:enumeration 
> value="SMS"/>
>                                         </xs:restriction>
>                                 </xs:simpleType>
>                         </xs:element>
>                         <xs:element name="notificationAddress">
>                                 <xs:simpleType>
>                                         <xs:restriction 
> base="xs:string">
>                                                 <xs:maxLength 
> value="120"/>
>                                         </xs:restriction>
>                                 </xs:simpleType>
>                         </xs:element>
>                 </xs:sequence>
>         </xs:complexType>
>
> Then I can see the restriction enforced for notifactionType, but not 
> for notificationAddress.  I haven't worked with xsd and wsdl before, 
> so I don't really know if I'm just not understanding the concept of 
> these restrictions or if I'm missing something really obvious, so if 
> anyone would care to explain it to me in very simple terms...that 
> would really be appreciated:D
>
> Thanks,
> Marius
>
> -----Original Message-----
> From: Anne Thomas Manes [mailto:[EMAIL PROTECTED]
> Sent: 23 August 2006 19:46
> To: axis-user@ws.apache.org
> Subject: Re: WSDL2Java Question
>
> Marius,
>
> Given that xsd:long is derived from xsd:int restricted by maxInclusive

> and minInclusive, it actually makes more sense for you to derive from 
> xsd:int rather than xsd:long.
>
> But that's just a nit. This smells like a bug.
> xsd:long should map to long, not to int; but since you've derived a 
> type, the return type should be your value type, SessionId.
>
> But I don't understand why you have two methods.
>
> Could you please post the WSDL and XSD?
>
> Anne
>
> On 8/23/06, Marius Hugo <[EMAIL PROTECTED]> wrote:
> >
> >
> > This is the first time that I am working with axis and I must now 
> > migrate someone else's code
> >
> > from axis to axis2, so I'm a little clueless...
> >
> > I just have a few simple questions concerning what WSDL2Java
> generated:
> >
> >    In ye olden xsd and wsdl:
> >     -  He declared a simple type (xs:long),  " SessionId " .
> >     -  He also added restrictions (minInclusive and maxInclusive) to

> > that type
> >     -  He also declared that one of the responses that I send, uses 
> > that type as a field .
> >     -  From what I've learned, all of this looks right and it worked

> > on the previous version of axis
> >
> >     -  I then used WSDL2Java to generate code:
> >                         it generated 
> > com.company.product.webservice.types.SessionId
> >                         it also generated the Document that uses 
> > this type
> >
> >     - In the generated document, the following methods are available

> > (well, there are others:):
> >
> >          - int getSessionId();
> >          - com.company.product.webservice.types.SessionId
> > xgetSessionId();
> >
> >
> > NOW (these questions apply to both getters and setters)
> >
> >     What is the difference between the two methods?
> >
> >     Are the restrictions imposed on both of them?
> >
> >     Why does the one method return an int, when SessionId was 
> > defined as a long?
> >
> >     If I were to go send this Document off as a SOAP message, what
> will
> >     I be sending? I mean, if I say went and set both values or just
> the one?
> > Will I
> >     be sending both values that I set, cause that doesn't really 
> > make
> sense
> >     to me.
> >
> >
> >
> > Thanks,
> > Marius
>
> ---------------------------------------------------------------------
> 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