Using Netbeans for Web Services.

R

RedGrittyBrick

I'm using the Netbeans IDE to generate client code from WSDL for a
web-service.

The code generated is not taking into account some parts of the
definitions (time = \d\d:\d\d:\d\d) and this results in error messages
from the web-service.

Should I expect Netbeans to handle this better?

Do I need to dig through dozens of generated classes to see if I can
find where it incorrectly serializes the data and fix it myself?

Should I provide some intelligent feedback to the suppliers of the WSDL+XSD?

*** What do other folk do?



The WSDL referers to XSD files that contain definitions like this:

<xs:complexType name="HeaderType">
<xs:sequence>
<xs:element name="DateOfPreparation" type="bbb:DateType"/>
<xs:element name="TimeOfPreparation" type="bbb:TimeType"/>
</xs:sequence>
</xs:complexType>

<xs:simpleType name="TimeType">
<xs:restriction base="xs:time">
<xs:pattern value="\d{2}:\d{2}:\d{2}(\.\d+)?"/>
</xs:restriction>
</xs:simpleType>


NetBeans generates an API that can be used like this

headerType.setTimeOfPreparation(new GregorianCalendar());


However the transmitted XML clearly ignores the XSD restriction patterns:

<a:DateOfPreparation>2009-05-27T12:27:19.109+01:00</a:DateOfPreparation>
<a:TimeOfPreparation>2009-05-27T12:27:19.109+01:00</a:TimeOfPreparation>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top