[jbossws-users] Namespace problem: Requested element {http://gaws.mec.com/rta/ws/types}businessDate is not allowed in this position in the sequence.

Douglas Fraser drf at blackchairdvd.com
Sat May 12 14:45:52 EDT 2007


hi everyone,

   I have JBoss 4.0.5.GA, and am using JBoss WS 1.2.1.  I have created a
web service (using wstools - not wscompile etc) and the beans, ear etc
deploy fine.   The WSDL generated from wstools looks ok (to me).  But
when I try to use a client written in PHP (using the SOAP extension) I
am getting this all the time:

Caused by: org.jboss.xb.binding.JBossXBRuntimeException: Requested
element {http://gaws.mec.com/rta/ws/types}businessDate is not allowed in
this position in the sequence. The next element should be businessDate
         at
org.jboss.xb.binding.sunday.unmarshalling.SequenceBinding$1.startElement(SequenceBinding.java:219)
         at
org.jboss.xb.binding.sunday.unmarshalling.ModelGroupBinding$Cursor.startElement(ModelGroupBinding.java:159)
         at
org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler.startElement(SundayContentHandler.java:277)
         at
org.jboss.xb.binding.parser.sax.SaxJBossXBParser$DelegatingContentHandler.startElement(SaxJBossXBParser.java:323)
         at
org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)


this is the SOAP Request

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="http://gaws.mec.com/rta/ws/types">
<SOAP-ENV:Body>
<ns1:notifyStatusChange>
<ns1:businessDate>2007-05-02T12:00:00</ns1:businessDate>
<ns1:community>testing</ns1:community>
<ns1:status>OPEN</ns1:status>
</ns1:notifyStatusChange>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

As you can see, the fields within the notifyStatusChange structure are
given a namespace of ns1.   the WSDL is defined as such:

   <schema targetNamespace='http://gaws.mec.com/rta/ws/types'
xmlns='http://www.w3.org/2001/XMLSchema'
xmlns:soap11-enc='http://schemas.xmlsoap.org/soap/encoding/'
xmlns:tns='http://gaws.mec.com/rta/ws/types'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
    <complexType name='NotifyAccountControl'>
     <sequence>
      <element name='account' type='int'/>
      <element name='accountStatus' nillable='true' type='string'/>
      <element name='agentNumber' type='int'/>
      <element name='balance' nillable='true' type='decimal'/>

      <element name='businessDate' nillable='true' type='dateTime'/>
      <element name='community' nillable='true' type='string'/>
      <element name='division' nillable='true' type='string'/>
      <element name='rejectReason' nillable='true' type='string'/>
      <element name='timeZone' nillable='true' type='string'/>
      <element name='transactionDate' nillable='true' type='dateTime'/>
      <element name='transactionType' nillable='true' type='string'/>
      <element name='window' type='int'/>
     </sequence>
    </complexType>

.... and so on

so .... obviously JBoss does not like the subfields being tagged with a
namespace (as far as I can tell, all my research has been of no help).
But I can't figure out how to get the PHP client to stop tagging the
subfields.  I am not an expert on WSDL etc so I am not even sure if the
PHP client should be doing that.  Should something in the WSDL change
(as the PHP is working off that as a basis)?

So...  is there anything I can do to the Java code to get it to stop
being so sensitive?   Is this a valid error?

Or does anyone know what to do in the PHP (I tried using the nusoap
library and that worked even worse...)?

Or do I just have to write a Java based client for testing as
anything-but-java is not up to spec like JBossWS is?
But then the real client (another company using Microsoft .NET) is
probably going to have problems....

Help!

thanks
doug




More information about the jbossws-users mailing list