NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
arinte
Joined: 22 Oct 2008 Posts: 11
|
Posted: Wed Jan 28, 2009 2:31 pm Post subject: XSD and JAX-WS |
|
|
We created an xsd with all those rules, and then had a wsdl that imported that xsd. But when we generate a web service and deploy it it seems all of our rules are lost when you look at the xsd via the webservice page (http://localhost:8080/SwitchWSService/SwitchWebService?xsd=1)
For example this:
<xsd:element name="tn">
<xsd:annotation>
<xsd:documentation>TN is required for all actions on a line.</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="current_number" type="tns:telephone_number_type">
</xsd:element>
<xsd:element name="new_number" type="tns:telephone_number_type" minOccurs="0">
</xsd:element>
</xsd:sequence>
<xsd:attribute name="action" type="tns:update_actions"/>
</xsd:complexType>
</xsd:element>
<xsd:simpleType name="telephone_number_type">
<xsd:restriction base="xsd:string">
<xsd:pattern value="[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]"/>
</xsd:restriction>
</xsd:simpleType>
Is reduced to this (it loses the type information on the current_/new_number and by losing the type it loses the restriction, which will make the validation I wanted to do useless):
- <xs:element name="tn">
- <xs:complexType>
- <xs:sequence>
<xs:element name="current_number" type="xs:string" />
<xs:element name="new_number" type="xs:string" minOccurs="0" />
</xs:sequence>
<xs:attribute name="action" type="tns:update_actions" />
</xs:complexType>
</xs:element> |
|
| Back to top |
|
 |
mcora
Joined: 30 Jan 2009 Posts: 1
|
Posted: Fri Jan 30, 2009 10:32 am Post subject: Re: XSD and JAX-WS |
|
|
It's happening the same here.
I broke some webservices and after some searching I discover that the cause can be this bug.
IMHO it happened after the plugins update of one-two dayes ago. |
|
| Back to top |
|
 |
alex.brooker
Joined: 18 Feb 2009 Posts: 13 Location: Dorset, UK
|
Posted: Sat Feb 28, 2009 6:03 pm Post subject: axis2 setting? |
|
|
Hi,
if you are using axis2 you can set the parameter 'useoriginalwsdl' and this will preserve your wsdl and schema (I think).
In NB, browse in file view to: <project>/xml-resources/axis2/META-INF/services.xml and edit the file by adding the following line:
<parameter name="useoriginalwsdl">true</parameter>
with the other parameter in the file, probably ServiceClass. Then rebuild, redeploy and if neccessary restart the server, then browse to the wsdl in your web browser of choice
hope that's useful,
Alex |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|